Skip to content

Delete nine config blocks that nothing read and most of which lied - #204

Merged
0xward merged 1 commit into
mainfrom
claude/nullstate-onchain-text-q6g2a3
Jul 30, 2026
Merged

Delete nine config blocks that nothing read and most of which lied#204
0xward merged 1 commit into
mainfrom
claude/nullstate-onchain-text-q6g2a3

Conversation

@0xward

@0xward 0xward commented Jul 30, 2026

Copy link
Copy Markdown
Owner

Build-order item #5. 285 lines → 158. No behaviour change.

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 were also wrong, which in a file with that name is worse than not existing:

Block Claimed Actually
bunkers 6 bunkers × 3 floors 5 × 5
specialItems Golden Key at "bunker 1, floor 3" 16% roll in any lockable container, plus fragments
loot container yields 3–8 items rolls 2–4 slots
burnRewards rarity split 40/30/20/8/2 real weights give ~59/26/11/3.5/0.6
ui a main menu list the world map replaced it
persistence 30s autosave event-driven, 60s safety net

These 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 removed: season, seasonRewards, docNotes, and six dead fields inside pass (freePassesAvailable, seasonsDuration, playLimitFree, playLimitWithPass, seasonResetDay, dropRateModifier, exclusiveSkinId).

On deleting seasonRewards

The $20/$5/$3 is safe to drop. The contract owns those amounts via setRankRewards, and they are recorded in scripts/deposit-reward.js's own docstring plus docs/index.md, docs/leaderboard.md and docs/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 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 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 every GAME_CONFIG.*, PASS.* and CFG.* access in the repo.

One dangling reference fixed: the energy comment pointed at pass.playLimitFree, which this change deletes. It now explains what that pair was and why energy replaced it.

Verification

tsc --noEmit clean · next build passes, /game unchanged at 138 kB · lint 34 errors, unchanged from main · check:market, audit, check:copy, check:cssvars all pass.


Generated by Claude Code

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.
@vercel

vercel Bot commented Jul 30, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
nullstate Ready Ready Preview Jul 30, 2026 5:48pm

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@0xward
0xward merged commit fe3dbfe into main Jul 30, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant