harvest/game/scripts
Forrest 91b9e52e96 Task #26: upgrade tiers and timed shed stock
Workbench stat upgrades get 3 levels: level L costs costs[id] x
upgrade_cost_growth (1.8) ^ (L - 1), each material rounded up, and opens on
day upgrade_level_days[L - 1] ([1, 8, 16]). Each owned level's "mult"/"add"
entry stacks. Level 1 keeps the user's values and costs (rapid fire 3.0x).
Shed items arrive on set days ("from_day"): corn shooter 1, shurikens 2,
pumpkin bombs 3, potato cannon 6, radar 8, propane torch 10, alien ray 14.

- Upgrades: level(), max_level(), maxed(), cost(cfg, id, level),
  next_cost(), per_level(), text_at(), name_at() (roman numerals),
  from_day(), level_day(), arrived(). owned() stays "level >= 1". blocker()
  adds "Arrives on day N" and "Level N opens on day D"; buy() takes the next
  level and applies that level's side effect; upgrades_bought counts every
  level. FarmState.upgrades keeps id -> level, so saves don't change shape.
- UpgradePanel: "Rapid fire II" with the next level's text and cost, the
  blocker reason, "Max" at the last level; a shed item before its day shows
  its name greyed with "Arrives on day N" ("?" plus the day if hidden). The
  title counts items at their last level. Every level bought jingles.
- Co-op: the host sends "bought" for any level (no wire change; PROTOCOL
  stays 5).
- soak_night.gd buys the lowest next level first across UPGRADE_ORDER.
- Tests: level costs, day gates, stacking, from_day, save/morning/retry/co-op,
  an old {"rapid_fire": 1} save as level 1. Existing tests set the day where
  they buy stock that now arrives later.
- RULES.md Upgrades: per-level effects and costs, stock schedule.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 16:20:05 -04:00
..
action_edges.gd updates 2026-10-04 12:07:36 -04:00
action_edges.gd.uid updates 2026-10-04 12:07:36 -04:00
alert_manager.gd Task #12 follow-up: theft alert for a claimed loose animal 2026-10-05 15:20:58 -04:00
alert_manager.gd.uid updates 2026-10-04 12:07:36 -04:00
alien_beam.gd Task #18: Alien Ray fires a beam 2026-10-06 13:39:00 -04:00
alien_beam.gd.uid Task #18: Alien Ray fires a beam 2026-10-06 13:39:00 -04:00
animal_system.gd Task #21: animals roam the whole farm, never lost on their own 2026-10-06 13:07:13 -04:00
animal_system.gd.uid updates 2026-10-04 12:07:36 -04:00
assessment.gd Task #15: UFO enemy, a fast flying fighter 2026-10-05 14:43:46 -04:00
assessment.gd.uid updates 2026-10-04 12:07:36 -04:00
asset_hud.gd updates 2026-10-04 12:07:36 -04:00
asset_hud.gd.uid updates 2026-10-04 12:07:36 -04:00
avatar.gd updates 2026-10-04 12:07:36 -04:00
avatar.gd.uid updates 2026-10-04 12:07:36 -04:00
build_hud.gd Task #16: per-player pouch in co-op 2026-10-06 13:06:25 -04:00
build_hud.gd.uid updates 2026-10-04 12:07:36 -04:00
build_mode.gd Task #16: per-player pouch in co-op 2026-10-06 13:06:25 -04:00
build_mode.gd.uid updates 2026-10-04 12:07:36 -04:00
campaign_controller.gd updates 2026-10-04 12:07:36 -04:00
campaign_controller.gd.uid init 2026-10-03 12:14:28 -04:00
campaign_debug.gd updates 2026-10-04 12:07:36 -04:00
campaign_debug.gd.uid init 2026-10-03 12:14:28 -04:00
confirm_box.gd updates 2026-10-04 12:07:36 -04:00
confirm_box.gd.uid updates 2026-10-04 12:07:36 -04:00
coop_hud.gd updates 2026-10-04 12:07:36 -04:00
coop_hud.gd.uid updates 2026-10-04 12:07:36 -04:00
coop_link.gd Co-op voice/session work, config retune, net budget tool, overhaul plan 2026-10-05 13:35:53 -04:00
coop_link.gd.uid updates 2026-10-04 12:07:36 -04:00
coop_lobby.gd updates 2026-10-04 17:30:48 -04:00
coop_lobby.gd.uid updates 2026-10-04 12:07:36 -04:00
coop_menu.gd updates 2026-10-04 12:07:36 -04:00
coop_menu.gd.uid updates 2026-10-04 12:07:36 -04:00
coop_session.gd Task #26: upgrade tiers and timed shed stock 2026-10-06 16:20:05 -04:00
coop_session.gd.uid updates 2026-10-04 12:07:36 -04:00
coop_voice.gd Co-op voice/session work, config retune, net budget tool, overhaul plan 2026-10-05 13:35:53 -04:00
coop_voice.gd.uid updates 2026-10-04 12:07:36 -04:00
crop_unit.gd Task #20: lettuce and corn fields on the south soil, map grows to 60 x 80 2026-10-06 13:10:08 -04:00
crop_unit.gd.uid init 2026-10-03 12:14:28 -04:00
day_night.gd Task #19: UFO model built from primitives 2026-10-06 12:55:14 -04:00
day_night.gd.uid updates 2026-10-04 12:07:36 -04:00
end_panel.gd Enemy roster reskin: thief -> Alien, breaker -> Alien Robot display names 2026-10-05 13:48:00 -04:00
end_panel.gd.uid updates 2026-10-04 12:07:36 -04:00
enemy_characters.gd updates 2026-10-04 12:07:36 -04:00
enemy_characters.gd.uid updates 2026-10-04 12:07:36 -04:00
enemy_system.gd Task #18: Alien Ray fires a beam 2026-10-06 13:39:00 -04:00
enemy_system.gd.uid updates 2026-10-04 12:07:36 -04:00
farm_audio.gd Task #18: Alien Ray fires a beam 2026-10-06 13:39:00 -04:00
farm_audio.gd.uid updates 2026-10-04 12:07:36 -04:00
farm_marker.gd updates 2026-10-04 12:07:36 -04:00
farm_marker.gd.uid init 2026-10-03 12:14:28 -04:00
farm_navigation.gd Task #9 follow-up: make the Workbench genuinely targetable (Decision 3) 2026-10-05 16:46:04 -04:00
farm_navigation.gd.uid init 2026-10-03 12:14:28 -04:00
farm_projectiles.gd tasks: check off #18; drop stale Alien Ray projectile comments 2026-10-06 13:42:09 -04:00
farm_projectiles.gd.uid updates 2026-10-04 12:07:36 -04:00
farm_sim.gd Merge task #20: lettuce and corn fields on the south soil, map 60 x 80 2026-10-06 13:19:10 -04:00
farm_sim.gd.uid updates 2026-10-04 12:07:36 -04:00
farm_state.gd Task #16: per-player pouch in co-op 2026-10-06 13:06:25 -04:00
farm_state.gd.uid init 2026-10-03 12:14:28 -04:00
farm_zone.gd updates 2026-10-04 12:07:36 -04:00
farm_zone.gd.uid init 2026-10-03 12:14:28 -04:00
farm_zones.gd Task #20: lettuce and corn fields on the south soil, map grows to 60 x 80 2026-10-06 13:10:08 -04:00
farm_zones.gd.uid init 2026-10-03 12:14:28 -04:00
farmers_return.gd updates 2026-10-04 12:07:36 -04:00
farmers_return.gd.uid updates 2026-10-04 12:07:36 -04:00
follow_camera.gd init 2026-10-03 12:14:28 -04:00
follow_camera.gd.uid init 2026-10-03 12:14:28 -04:00
game_config.gd Task #26: upgrade tiers and timed shed stock 2026-10-06 16:20:05 -04:00
game_config.gd.uid init 2026-10-03 12:14:28 -04:00
game_settings.gd updates 2026-10-04 12:07:36 -04:00
game_settings.gd.uid updates 2026-10-04 12:07:36 -04:00
gather_node.gd Task #4: Alien Goop resource and drop-on-kill from Aliens 2026-10-05 14:23:22 -04:00
gather_node.gd.uid updates 2026-10-04 12:07:36 -04:00
gdsync_link.gd updates 2026-10-04 12:07:36 -04:00
gdsync_link.gd.uid updates 2026-10-04 12:07:36 -04:00
interactions.gd Task #22: the joining player can open the store 2026-10-06 13:47:52 -04:00
interactions.gd.uid updates 2026-10-04 12:07:36 -04:00
loot_system.gd Merge task #20: lettuce and corn fields on the south soil, map 60 x 80 2026-10-06 13:19:10 -04:00
loot_system.gd.uid updates 2026-10-04 12:07:36 -04:00
main.gd updates 2026-10-04 17:30:48 -04:00
main.gd.uid updates 2026-10-04 12:07:36 -04:00
main_menu.gd updates 2026-10-04 12:07:36 -04:00
main_menu.gd.uid updates 2026-10-04 12:07:36 -04:00
night_plan.gd Task #15: UFO enemy, a fast flying fighter 2026-10-05 14:43:46 -04:00
night_plan.gd.uid updates 2026-10-04 12:07:36 -04:00
pause_menu.gd updates 2026-10-04 12:07:36 -04:00
pause_menu.gd.uid updates 2026-10-04 12:07:36 -04:00
phase_hud.gd Task #15: UFO enemy, a fast flying fighter 2026-10-05 14:43:46 -04:00
phase_hud.gd.uid updates 2026-10-04 12:07:36 -04:00
player_character.gd updates 2026-10-04 12:07:36 -04:00
player_character.gd.uid init 2026-10-03 12:14:28 -04:00
pumpkin_bombs.gd updates 2026-10-04 12:07:36 -04:00
pumpkin_bombs.gd.uid updates 2026-10-04 12:07:36 -04:00
radar_hud.gd Task #8: Radar item, a Supply Shed minimap reveal 2026-10-05 16:08:54 -04:00
radar_hud.gd.uid Task #8: Radar item, a Supply Shed minimap reveal 2026-10-05 16:08:54 -04:00
remote_controls.gd Task #22: the joining player can open the store 2026-10-06 13:47:52 -04:00
remote_controls.gd.uid updates 2026-10-04 12:07:36 -04:00
resource_hud.gd Task #16: per-player pouch in co-op 2026-10-06 13:06:25 -04:00
resource_hud.gd.uid updates 2026-10-04 12:07:36 -04:00
resource_store.gd Task #16: per-player pouch in co-op 2026-10-06 13:06:25 -04:00
resource_store.gd.uid updates 2026-10-04 12:07:36 -04:00
review_panel.gd Merge task #21: animals roam the whole farm, never lost on their own 2026-10-06 13:15:24 -04:00
review_panel.gd.uid updates 2026-10-04 12:07:36 -04:00
save_game.gd Task #16: per-player pouch in co-op 2026-10-06 13:06:25 -04:00
save_game.gd.uid updates 2026-10-04 12:07:36 -04:00
scarecrow.gd Task #16: per-player pouch in co-op 2026-10-06 13:06:25 -04:00
scarecrow.gd.uid updates 2026-10-04 12:07:36 -04:00
scarecrow_combat.gd Task #18: Alien Ray fires a beam 2026-10-06 13:39:00 -04:00
scarecrow_combat.gd.uid updates 2026-10-04 12:07:36 -04:00
scarecrow_hud.gd Task #7: four new shed weapons (Potato Cannon, Shurikens, Propane Torch, Alien Ray) 2026-10-05 15:39:56 -04:00
scarecrow_hud.gd.uid updates 2026-10-04 12:07:36 -04:00
settings_menu.gd updates 2026-10-04 17:30:48 -04:00
settings_menu.gd.uid updates 2026-10-04 12:07:36 -04:00
shed_counter.gd Task #6: Supply Shed as its own weapon shop, separate from the Workbench 2026-10-05 15:13:48 -04:00
shed_counter.gd.uid Task #6: Supply Shed as its own weapon shop, separate from the Workbench 2026-10-05 15:13:48 -04:00
shed_stock.gd Task #4: Alien Goop resource and drop-on-kill from Aliens 2026-10-05 14:23:22 -04:00
shed_stock.gd.uid updates 2026-10-04 12:07:36 -04:00
structure_system.gd Task #16: per-player pouch in co-op 2026-10-06 13:06:25 -04:00
structure_system.gd.uid updates 2026-10-04 12:07:36 -04:00
thief_behavior.gd Thieves go straight for loose loot in clear view, however far 2026-10-06 13:22:21 -04:00
thief_behavior.gd.uid updates 2026-10-04 12:07:36 -04:00
toast_feed.gd Task #21: animals roam the whole farm, never lost on their own 2026-10-06 13:07:13 -04:00
toast_feed.gd.uid updates 2026-10-04 12:07:36 -04:00
torch_flame.gd Task #17: Propane Torch sprays a band of fire 2026-10-06 13:04:54 -04:00
torch_flame.gd.uid Task #17: Propane Torch sprays a band of fire 2026-10-06 13:04:54 -04:00
tutorial.gd Task #16: per-player pouch in co-op 2026-10-06 13:06:25 -04:00
tutorial.gd.uid updates 2026-10-04 12:07:36 -04:00
ui_theme.gd updates 2026-10-04 12:07:36 -04:00
ui_theme.gd.uid updates 2026-10-04 12:07:36 -04:00
upgrade_panel.gd Task #26: upgrade tiers and timed shed stock 2026-10-06 16:20:05 -04:00
upgrade_panel.gd.uid updates 2026-10-04 12:07:36 -04:00
upgrades.gd Task #26: upgrade tiers and timed shed stock 2026-10-06 16:20:05 -04:00
upgrades.gd.uid updates 2026-10-04 12:07:36 -04:00
wave_director.gd Task #15: UFO enemy, a fast flying fighter 2026-10-05 14:43:46 -04:00
wave_director.gd.uid updates 2026-10-04 12:07:36 -04:00
weapon_models.gd Task #18: Alien Ray fires a beam 2026-10-06 13:39:00 -04:00
weapon_models.gd.uid updates 2026-10-04 12:07:36 -04:00
workbench.gd Task #9: Workbench auto-grants after Night 1, destructible/repairable 2026-10-05 16:27:55 -04:00
workbench.gd.uid updates 2026-10-04 12:07:36 -04:00
zone_banner.gd init 2026-10-03 12:14:28 -04:00
zone_banner.gd.uid init 2026-10-03 12:14:28 -04:00