Delete nine config blocks that nothing read and most of which lied - #204
Merged
Conversation
game-config.ts looked like the source of truth and was not. Nine of its
fourteen blocks had zero references anywhere in source, and being unused
was the smaller half of the problem — six of them were also WRONG, which
in a file with that name is worse than not existing:
bunkers claimed 6 bunkers of 3 floors. There are 5, of 5.
specialItems put the Golden Key at "bunker 1, floor 3". It is a 16%
roll in any lockable container, plus the fragment path.
loot said a container yields 3-8 items. It rolls 2-4 slots.
burnRewards published a rarity split of 40/30/20/8/2. The real
weights in items.js give ~59/26/11/3.5/0.6.
ui listed a main menu the world map replaced.
persistence claimed a 30s autosave. It is event-driven with a 60s net.
Those are not hypothetical. Every one of the first four had already been
copied verbatim into docs/game-mechanics.md and shown to players, and had
to be corrected there earlier today. This is the file that fed them.
Also gone: season, seasonRewards, docNotes, and six dead fields inside
pass. seasonRewards' $20/$5/$3 is safe to drop — the contract owns those
amounts via setRankRewards, and the CLI docstring plus three docs record
them. That is the same reasoning that removed the pass price from this
file before, which the header now cites as precedent.
The energy comment referenced pass.playLimitFree, which this change
deletes; it now explains what that pair was and why energy replaced it,
rather than pointing at a field that no longer exists.
The root cause is structural and is now stated at the top of the file: the
engine is served as static <script> and cannot import from lib/, so
anything about dungeon generation, loot tables or item rarity can only
ever be a stale copy here. What belongs is what the TypeScript side reads
— prices, energy, craft timers, pass perks. The rule is: before adding a
block, confirm a line of source will import it.
285 lines to 158. No behaviour change: tsc clean, build passes, lint
unchanged at 34, and check:market / audit / check:copy / check:cssvars
all pass.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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.
Build-order item #5. 285 lines → 158. No behaviour change.
game-config.tslooked like the source of truth and was not. Nine of its fourteen blocks had zero references anywhere in source — and being unused was the smaller half of the problem. Six were also wrong, which in a file with that name is worse than not existing:bunkersspecialItemslootburnRewardsuipersistenceThese are not hypothetical. Every one of the first four had already been copied verbatim into
docs/game-mechanics.mdand shown to players — and had to be corrected there earlier today. This is the file that fed them.Also removed:
season,seasonRewards,docNotes, and six dead fields insidepass(freePassesAvailable,seasonsDuration,playLimitFree,playLimitWithPass,seasonResetDay,dropRateModifier,exclusiveSkinId).On deleting
seasonRewardsThe $20/$5/$3 is safe to drop. The contract owns those amounts via
setRankRewards, and they are recorded inscripts/deposit-reward.js's own docstring plusdocs/index.md,docs/leaderboard.mdanddocs/rewards-system.md.That is the same reasoning that removed the pass price from this file previously — the header now cites it as precedent, since the file had already learned this lesson once and then re-accumulated nine more.
The root cause, now stated in the file
The engine (
public/game-engine/*.js) is served as static<script>and cannot import fromlib/. So anything about dungeon generation, loot tables or item rarity can only ever be a stale copy here. What belongs is what the TypeScript side actually reads: prices, energy, craft timers, pass perks.The rule at the top of the file now: before adding a block, confirm a line of source will import it.
What stayed
pass(2 live fields),energy,elixir,weaponEvolution,premiumSectors— verified by grepping everyGAME_CONFIG.*,PASS.*andCFG.*access in the repo.One dangling reference fixed: the
energycomment pointed atpass.playLimitFree, which this change deletes. It now explains what that pair was and why energy replaced it.Verification
tsc --noEmitclean ·next buildpasses,/gameunchanged at 138 kB · lint 34 errors, unchanged frommain·check:market,audit,check:copy,check:cssvarsall pass.Generated by Claude Code