Remove SW pre-made stockpiles + crates: items sit until player paints storage
This commit is contained in:
parent
61d3a6bd64
commit
c81e81723c
1 changed files with 16 additions and 41 deletions
|
|
@ -1,8 +1,9 @@
|
|||
extends Node2D
|
||||
## Phase 4 world view. 80×80 TileMap, 6 layers, 3 pawns, full AI pipeline:
|
||||
## RestProvider → ChopProvider → MineProvider → HaulingProvider → idle
|
||||
## plus sample trees, rocks, and two stockpile zones with different priorities
|
||||
## for the haul-cascade demo.
|
||||
## plus sample trees and rocks. No pre-made stockpiles — items sit where they
|
||||
## are produced until the player paints storage (a stockpile zone or builds
|
||||
## a crate). This matches Rimworld parity: storage is a player decision.
|
||||
##
|
||||
## TileMap layer indices follow docs/architecture.md:
|
||||
## 0 Terrain · 1 Floor · 2 Wall · 3 Designation · 4 Roof · 5 Fog
|
||||
|
|
@ -212,7 +213,10 @@ func _ready() -> void:
|
|||
|
||||
_spawn_sample_pawns()
|
||||
_spawn_sample_harvestables()
|
||||
_spawn_sample_stockpiles()
|
||||
# No pre-made stockpiles: the player must paint their own storage. Items
|
||||
# from chop/mine/crafting sit where they're produced until a player-made
|
||||
# stockpile or crate exists for hauling. (2026-05-15 — _spawn_sample_stockpiles
|
||||
# removed; was leftover Phase 4 acceptance scaffolding south-west of the cabin.)
|
||||
_seed_phase5_demo_buildings()
|
||||
# Phase 13 — pre-stamp the cabin walls + floors on the TileMap data layers
|
||||
# so RoomDetector can see a completed enclosure at boot without waiting for
|
||||
|
|
@ -406,7 +410,7 @@ func _spawn_sample_pawns() -> void:
|
|||
World.register_pawn(p)
|
||||
|
||||
|
||||
# ── Phase 4: harvestables + stockpile zones ─────────────────────────────────
|
||||
# ── Phase 4: harvestables (stockpile-zone seeding removed 2026-05-15) ───────
|
||||
|
||||
func _spawn_sample_harvestables() -> void:
|
||||
# Untyped vars — Godot's class-name cache for class_name'd classes is
|
||||
|
|
@ -443,8 +447,8 @@ func _seed_phase5_demo_buildings() -> void:
|
|||
# • Perimeter walls (skipping the door slot)
|
||||
# • Door at (47, 28) — middle of the south wall
|
||||
# • Wood floor across the 6×5 interior (rows 23..27)
|
||||
# • One pre-built crate inside (north-east corner of the interior)
|
||||
# • Two stockpile-target crates outside (Phase 4 hauling target)
|
||||
# • One pre-built crate inside (north-east corner of the interior — the
|
||||
# cabin's starting amenity; player paints additional storage later)
|
||||
# Bumped from 8×6 → 8×7 so the north interior row (23) is free for the
|
||||
# bed sprites to extend into (beds are 1×2, anchored at the foot, head
|
||||
# extends one tile up). Previously the headboards clipped into the wall.
|
||||
|
|
@ -486,17 +490,13 @@ func _seed_phase5_demo_buildings() -> void:
|
|||
while interior_crate.is_buildable():
|
||||
interior_crate.on_build_tick()
|
||||
|
||||
# Two external stockpile-target crates south-west (Phase 4 haul destination).
|
||||
var crate_tiles: Array[Vector2i] = [Vector2i(17, 60), Vector2i(18, 60)]
|
||||
for t in crate_tiles:
|
||||
var c: Crate = CRATE_SCENE.instantiate()
|
||||
add_child(c)
|
||||
c.setup(t)
|
||||
while c.is_buildable():
|
||||
c.on_build_tick()
|
||||
# (2026-05-15) Two external SW crates removed alongside _spawn_sample_stockpiles:
|
||||
# they were Phase 4 haul-destination scaffolding, no longer needed now that
|
||||
# the player paints their own storage. The interior cabin crate above stays
|
||||
# as a starting amenity.
|
||||
|
||||
Audit.log("world", "phase 5 demo: %d walls + 1 door + %d floors queued; %d crates pre-built" % [
|
||||
wall_count, floor_count, 1 + crate_tiles.size()
|
||||
Audit.log("world", "phase 5 demo: %d walls + 1 door + %d floors queued; 1 interior crate pre-built" % [
|
||||
wall_count, floor_count
|
||||
])
|
||||
|
||||
# Phase 6 demo — two pre-built workbenches inside the cabin with bills.
|
||||
|
|
@ -631,31 +631,6 @@ func _seed_phase5_demo_buildings() -> void:
|
|||
Audit.log("world", "phase 11 demo: %d torches pre-built inside cabin" % torch_tiles.size())
|
||||
|
||||
|
||||
func _spawn_sample_stockpiles() -> void:
|
||||
# Two zones for the Phase 4 acceptance demo:
|
||||
# - Zone A (north): wood-only filter, NORMAL priority (just a wood drop)
|
||||
# - Zone B (south): wildcard, HIGH priority (the "watch wood flow upward" target)
|
||||
# When the sweep runs, wood items in Zone A get re-marked for haul and
|
||||
# eventually migrate to Zone B.
|
||||
var zone_a: StockpileZone = STOCKPILE_SCENE.instantiate()
|
||||
add_child(zone_a)
|
||||
zone_a.region = Rect2i(15, 55, 4, 4)
|
||||
zone_a.label = "Wood (Normal)"
|
||||
zone_a.priority = StorageDestination.Priority.NORMAL
|
||||
zone_a.accepted_types = [Item.TYPE_WOOD] as Array[StringName]
|
||||
zone_a.queue_redraw()
|
||||
|
||||
var zone_b: StockpileZone = STOCKPILE_SCENE.instantiate()
|
||||
add_child(zone_b)
|
||||
zone_b.region = Rect2i(15, 62, 4, 4)
|
||||
zone_b.label = "Anything (High)"
|
||||
zone_b.priority = StorageDestination.Priority.HIGH
|
||||
zone_b.accepted_types = [] as Array[StringName] # wildcard
|
||||
zone_b.queue_redraw()
|
||||
|
||||
Audit.log("world", "spawned 2 stockpiles: %s + %s" % [zone_a.label, zone_b.label])
|
||||
|
||||
|
||||
# ── Phase 5: designation → build-site spawn bridge ──────────────────────────
|
||||
|
||||
# Track build sites keyed by tile so we can find + queue_free them on cancel.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue