48-day year (4 seasons × 12 days), daily weather rolls, rain visual,
storm flash, Wet/Cold statuses with mood thoughts.
Three-agent fan-out — Opus prepped contracts up front (event_bus
signals, Clock season constants, Weather autoload stub) so the three
slices could run fully parallel and integrate on first try.
Calendar (Agent A):
- Clock season API — SEASON_SPRING/SUMMER/AUTUMN/WINTER constants,
current_season(), current_season_index(), day_of_season(),
current_year(), DAYS_PER_SEASON=12, DAYS_PER_YEAR=48
- EventBus.season_changed emitted on transition (mirrors phase_changed)
- Top-bar SeasonLabel ('Spring 1/12') with localized season names via
Strings.t() — season.spring/summer/autumn/winter + season.format
- Terrain TileMapLayer seasonal palette modulate
(spring=warm-green, summer=neutral, autumn=warm-orange, winter=cool-blue)
Weather (Agent B):
- autoload/weather.gd — daily roll triggered by Clock day-index change
Probability tables per season (placeholders, tune Phase 20):
spring 60% clear / 35% rain / 5% storm
summer 75% clear / 18% rain / 7% storm
autumn 50% clear / 35% rain / 12% storm / 3% cold_snap
winter 55% clear / 15% rain / 10% storm / 20% cold_snap
- EventBus.weather_changed signal
- scenes/world/rain_overlay.tscn — procedural _draw() diagonal raindrops
on a CanvasLayer (chosen over CPUParticles2D for pixel-art exactness
and to colocate storm-flash logic in one weather-aware script)
- Storm flash — Tween-driven ColorRect at random 4-8s intervals
- Save round-trip preserves _last_day_index to prevent double-rolling
Wet + Cold + Mood (Agent C):
- StatusCatalog.wet(severity 1-2) — Damp at 25, Soaked at 60 (of 100)
- StatusCatalog.cold(severity 1-3) — Mild at 25, Severe at 60, Extreme at 85
- ThoughtCatalog.damp(-3), soaked(-6), cold_thought(-4)
- Pawn._wet_accum / _cold_accum floats, ticked in _process_statuses:
+0.02/tick rain (×2 storm), -0.05/tick decay when sheltered
+0.015/tick cold winter-or-snap (×2 cold_snap)
- _sync_wet_status / _sync_cold_status — severity-flip detection with
one Audit line per transition
- _is_sheltered() v1: World.floor_layer.get_cell_source_id != -1
Phase 13 replaces with proper Room BFS
- _wet_accum / _cold_accum round-trip through Pawn.to_dict / from_dict
- Persistent thought sync in _process_thoughts after in_darkness
MCP runtime verified:
- Top-bar 'Spring 1/12' renders; green seasonal terrain tint visible
- Rain droplets render across screen; storm flash captured mid-animation
- Bram wet=26 (Damp) → wet=65 (Soaked) with mood thought (-6), mood=30
- Cora cold=30 cold_snap → Cold status sev=1 + Cold thought (-4), mood=32
- Daily weather rolls visible day 0-5 (rain → clear → rain → clear → rain)
Quick-edit fixup mid-flight: Variant inference errors on
'var old_sev := s.severity' (untyped Array loop var). Same trap as
the Phase 7 crop fix; pattern is now to always explicit-type ':='
when the rhs is non-typed-Array element access.
Delegation: 3× gdscript-refactor agents in parallel, 1× quick-edit
for the Variant-inference fix; integration + MCP verify on Opus.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
99 lines
3.8 KiB
Text
99 lines
3.8 KiB
Text
[gd_scene load_steps=18 format=3 uid="uid://rimlike_world"]
|
|
|
|
[ext_resource type="Script" path="res://scenes/world/world.gd" id="1_world"]
|
|
[ext_resource type="PackedScene" uid="uid://rimlike_camera_rig" path="res://scenes/world/camera_rig.tscn" id="2_camera"]
|
|
[ext_resource type="Script" path="res://scenes/world/pathfinder.gd" id="3_pathfinder"]
|
|
[ext_resource type="Script" path="res://scenes/world/selection.gd" id="4_selection"]
|
|
[ext_resource type="Script" path="res://scenes/ai/rest_provider.gd" id="5_rest_provider"]
|
|
[ext_resource type="Script" path="res://scenes/ai/chop_provider.gd" id="6_chop_provider"]
|
|
[ext_resource type="Script" path="res://scenes/ai/mine_provider.gd" id="7_mine_provider"]
|
|
[ext_resource type="Script" path="res://scenes/ai/hauling_provider.gd" id="8_hauling_provider"]
|
|
[ext_resource type="Script" path="res://scenes/ai/construction_provider.gd" id="9_construction_provider"]
|
|
[ext_resource type="Script" path="res://scenes/world/designation.gd" id="10_designation"]
|
|
[ext_resource type="Script" path="res://scenes/ai/crafting_provider.gd" id="11_crafting_provider"]
|
|
[ext_resource type="Script" path="res://scenes/ai/plant_provider.gd" id="12_plant_provider"]
|
|
[ext_resource type="Script" path="res://scenes/ai/eat_provider.gd" id="13_eat_provider"]
|
|
[ext_resource type="Script" path="res://scenes/ai/sleep_provider.gd" id="14_sleep_provider"]
|
|
[ext_resource type="Script" path="res://scenes/ai/doctor_provider.gd" id="15_doctor_provider"]
|
|
[ext_resource type="Script" path="res://scenes/ai/wolf_spawner.gd" id="16_wolf_spawner"]
|
|
[ext_resource type="PackedScene" uid="uid://rimlike_rain_overlay" path="res://scenes/world/rain_overlay.tscn" id="17_rain_overlay"]
|
|
|
|
[node name="World" type="Node2D"]
|
|
y_sort_enabled = true
|
|
script = ExtResource("1_world")
|
|
|
|
[node name="DarkOverlay" type="CanvasModulate" parent="."]
|
|
color = Color(1, 1, 1, 1)
|
|
|
|
[node name="Terrain" type="TileMapLayer" parent="."]
|
|
z_index = 0
|
|
|
|
[node name="Floor" type="TileMapLayer" parent="."]
|
|
z_index = 1
|
|
visible = false
|
|
|
|
[node name="Wall" type="TileMapLayer" parent="."]
|
|
z_index = 2
|
|
visible = false
|
|
|
|
[node name="Designation" type="TileMapLayer" parent="."]
|
|
z_index = 3
|
|
|
|
[node name="Roof" type="TileMapLayer" parent="."]
|
|
z_index = 4
|
|
visible = false
|
|
|
|
[node name="Fog" type="TileMapLayer" parent="."]
|
|
z_index = 5
|
|
visible = false
|
|
|
|
[node name="Pathfinder" type="Node" parent="."]
|
|
script = ExtResource("3_pathfinder")
|
|
|
|
[node name="Selection" type="Node" parent="."]
|
|
script = ExtResource("4_selection")
|
|
|
|
[node name="DesignationCtl" type="Node" parent="."]
|
|
script = ExtResource("10_designation")
|
|
|
|
[node name="RestProvider" type="Node" parent="."]
|
|
script = ExtResource("5_rest_provider")
|
|
rest_tile = Vector2i(50, 50)
|
|
|
|
[node name="ChopProvider" type="Node" parent="."]
|
|
script = ExtResource("6_chop_provider")
|
|
|
|
[node name="MineProvider" type="Node" parent="."]
|
|
script = ExtResource("7_mine_provider")
|
|
|
|
[node name="HaulingProvider" type="Node" parent="."]
|
|
script = ExtResource("8_hauling_provider")
|
|
|
|
[node name="ConstructionProvider" type="Node" parent="."]
|
|
script = ExtResource("9_construction_provider")
|
|
|
|
[node name="CraftingProvider" type="Node" parent="."]
|
|
script = ExtResource("11_crafting_provider")
|
|
|
|
[node name="PlantProvider" type="Node" parent="."]
|
|
script = ExtResource("12_plant_provider")
|
|
|
|
[node name="EatProvider" type="Node" parent="."]
|
|
script = ExtResource("13_eat_provider")
|
|
|
|
[node name="SleepProvider" type="Node" parent="."]
|
|
script = ExtResource("14_sleep_provider")
|
|
|
|
[node name="DoctorProvider" type="Node" parent="."]
|
|
script = ExtResource("15_doctor_provider")
|
|
|
|
[node name="WolfSpawner" type="Node" parent="."]
|
|
script = ExtResource("16_wolf_spawner")
|
|
|
|
[node name="WeatherLayer" type="CanvasLayer" parent="."]
|
|
layer = 5
|
|
|
|
[node name="RainOverlay" parent="WeatherLayer" instance=ExtResource("17_rain_overlay")]
|
|
|
|
[node name="CameraRig" parent="." instance=ExtResource("2_camera")]
|
|
position = Vector2(640, 640)
|