Added Functions (Very Scuffed w/ Claude): - #5
Open
SimonLeeCats wants to merge 1 commit into
Open
Conversation
Collaborator
Author
|
its lowkirkly cooked |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is lowkey scuffed AF and I'm not sure if this is gonna break the system... I've tested it locally and everything seems to work on my end however, I only tested it locally so I'm not sure how it works if it was deployed.
Summary
Claude Description:
Bug fixes
tsx not found — fixed by pointing @feastfite/shared package.json to its TypeScript source so services don't need a build step
Services getting ECONNREFUSED — caused by the shared package having no dist/ folder; same fix above resolved it
Territory service missing ECONOMY_SERVICE_URL and VOTE_SERVICE_URL in .env so inter-service HTTP calls failed locally
Double Points item
New user_boosts table tracks active boosts with an expiry time
awardPoints() in the ledger checks for an active boost and doubles any positive delta automatically — no changes needed anywhere points are awarded
POST /boosts/activate consumes one from inventory and writes a 1-hour boost row
GET /boosts/active returns active boosts with expiry timestamps
Frontend shows an ACTIVATE button when you own one, and a live countdown timer when it's running
Territory Shield item
shielded_until column added to the territories table
POST /territories/:id/shield verifies you own the territory, consumes the item from economy, sets a 24-hour shield
Claim route rejects challengers immediately with 423 if the territory is shielded — the fight never starts
voteWinner consumer also checks the shield as a safety net for votes already in progress
Map polygons get a solid gold border when shielded so it's visible at a glance
Territory panel shows a gold "🛡️ Shielded" banner with the exact expiry time instead of the claim button
Battering Ram item
/inventory/use generalized to work for any consumable (was hardcoded to battering ram only)
Frontend shows locked territories in a picker when you click USE, lets you pick one and smash the lock
Self-contesting prevention
Backend rejects claims where owner_id === userId with a 409
Frontend shows "You own this territory" instead of the claim button