uwarp-space
2026-03-01
Game mechanics wiring sprint covering code reviews #13–#41: haggling XP, pricing mode, scoreboard, corp membership, sector wipe, force tick, ship assign, gold ship hydration, and SQLite audit improvements
244 files · 16,476+ · 1,158-
Haggling and Trading
3 files changed
trading.pyHaggling XP quality tiers implemented; pricing_mode toggle (haggle vs fixed) added; trade XP formula corrected to 5×qtytrading.pyTrade XP formula updated; pricing mode logic wired_reports_players.pyScoreboard high_score_type wiring and top-20 consistency fixed
- Haggling XP now uses quality tiers rather than a flat value, matching the Gold reference formula
remediate
behavioral
1 file
trading.py
- Pricing mode toggle added — servers can switch between haggle and fixed pricing at runtime via ServerConfig
instantiate
behavioral
2 files
trading.pyconfig.py
- Trade XP formula corrected to 5×qty per CR #36; combat XP deviations documented
remediate
internal
1 file
trading.py
Scoreboard and Rankings
2 files changed
_reports_players.pyScoreboard high_score_type wiring and top-20 consistency fixed (CR #37)config.pyhigh_score_type and rankings_type bridged to ServerConfig
- Scoreboard high_score_type wiring fixed, top-20 consistency enforced (CR #37)
remediate
internal
1 file
_reports_players.py
- Port1/spaceport closed out as Gold deviations (CR #38); ticks/NPC audit verified cabal→Ferrengi replacement complete (CR #39)
specify
internal
1 file
config.py
- CR #40 combat XP formulas implemented, ServerConfig knobs added; CR #41 Gold mechanics audit completed covering banking, corps, shipyard, robbery, and ranks
remediate
internal
1 file
combat.py
SysOp API Extensions
2 files changed
worker_sysop.pySector wipe, corp membership, force tick, and ship assign sysop endpoints addedservice.pyServe command wired to CLI; sysop API integration tests added
- New sysop endpoints: sector wipe, corp membership management, force tick, and ship assign — all wired into the sysop API
instantiate
behavioral
1 file
worker_sysop.py
- Serve command wired to CLI; sysop API integration tests added
qualify
behavioral
1 file
service.py
SQLite Storage
2 files changed
_game_state_persistence.pyRound-trip extended sqlite state fixed; audit coverage improvedgame_loader.pyGold ship instances restored from sqlite on load
Gold Ship Hydration
3 files changed
_gold_ship_sync.pyGold ship state synchronized through player loads and saves_game_state_persistence.pyGold ship instances restored from sqlite; dirty players persisted to dat files_purchases_shipyard.pyGold ship state shown in shipyard display
- Gold ship names hydrated into player records on load; gold ship state shown in shipyard display
instantiate
behavioral
2 files
_gold_ship_sync.py_purchases_shipyard.py
- Gold ship instances restored from SQLite on game load; dirty players now persisted back to .dat files correctly
remediate
internal
1 file
_game_state_persistence.py
Game Mechanics (CR #13–#35)
6 files changed
combat.pyPhoton death gate, toll validation, fighter decay, combat mechanics, photon kills, and fighter validation fixed across CRs #29–#35economy.pyLoan interest, bounty validation, atmosphere/shields purchase wiredmovement.pyDisruptor side effects persisted; retreat costs fixedconstants.pyLOAN_DANGER_MULTIPLIER wired; VALID_COMMODITIES deduplicatedmanagement.pyCorp join mechanics fixed (CR #32)management.pyNegative planet_id guard added; planet destroy null crash fixed
- 8 unwired game mechanics from CR #13 and CR #15 wired: atmosphere/shields purchase, retreat costs, loan interest, bounty validation
instantiate
internal
2 files
economy.pybank.py
- 10 game mechanic and data integrity bugs from CR #28–#35 fixed: mine_owner, corp is_active, turn ordering, constants, bank match, port turn loss, planet destroy null crash, photon death gate, toll validation, fighter decay
remediate
internal
3 files
combat.pymanagement.pymanagement.py
File Format
1 file changed
port.pyCanonical TW2002 file format reference added; parser format boundaries clarified
Cleanup
1 file changed
pyproject.tomlundef-terminal workspace wiring removed from workspace dependencies