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.py Haggling XP quality tiers implemented; pricing_mode toggle (haggle vs fixed) added; trade XP formula corrected to 5×qty
  • trading.py Trade XP formula updated; pricing mode logic wired
  • _reports_players.py Scoreboard 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.py
    • config.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.py Scoreboard high_score_type wiring and top-20 consistency fixed (CR #37)
  • config.py high_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.py Sector wipe, corp membership, force tick, and ship assign sysop endpoints added
  • service.py Serve 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.py Round-trip extended sqlite state fixed; audit coverage improved
  • game_loader.py Gold ship instances restored from sqlite on load
  • Round-trip fidelity for extended sqlite state corrected — previously some fields were dropped on save/reload cycles remediate internal
    1 file
    • _game_state_persistence.py
  • SQLite audit coverage expanded; worker sync output formatting stabilized qualify internal
    1 file
    • game_loader.py

Gold Ship Hydration

3 files changed
  • _gold_ship_sync.py Gold ship state synchronized through player loads and saves
  • _game_state_persistence.py Gold ship instances restored from sqlite; dirty players persisted to dat files
  • _purchases_shipyard.py Gold 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.py Photon death gate, toll validation, fighter decay, combat mechanics, photon kills, and fighter validation fixed across CRs #29–#35
  • economy.py Loan interest, bounty validation, atmosphere/shields purchase wired
  • movement.py Disruptor side effects persisted; retreat costs fixed
  • constants.py LOAN_DANGER_MULTIPLIER wired; VALID_COMMODITIES deduplicated
  • management.py Corp join mechanics fixed (CR #32)
  • management.py Negative 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.py
    • bank.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.py
    • management.py
    • management.py

File Format

1 file changed
  • port.py Canonical TW2002 file format reference added; parser format boundaries clarified
  • Canonical TW2002 file format reference documented; parser format boundaries clarified specify errata
    1 file
    • port.py
1 file changed
  • pyproject.toml undef-terminal workspace wiring removed from workspace dependencies
  • undef-terminal workspace wiring removed from monorepo workspace configuration baseline internal
    1 file
    • pyproject.toml