Compare commits
No commits in common. "c93f889ff1a406dbb38544b4b8bb2ccad4a0d5ca" and "6abd53c6f52b6a16b0a44b6e90bb40c052c53a04" have entirely different histories.
c93f889ff1
...
6abd53c6f5
22 changed files with 42 additions and 290 deletions
Binary file not shown.
|
Before Width: | Height: | Size: 907 B |
|
|
@ -1,40 +0,0 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dnojyvpvkbgp"
|
||||
path="res://.godot/imported/FG_Crops_Corns.png-52c1e938a7347a7a7cc4f2d86fb0cf6a.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://art/sprites/crops/FG_Crops_Corns.png"
|
||||
dest_files=["res://.godot/imported/FG_Crops_Corns.png-52c1e938a7347a7a7cc4f2d86fb0cf6a.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 658 B |
|
|
@ -1,40 +0,0 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://bog4kf8oxem3c"
|
||||
path="res://.godot/imported/FG_Crops_Potato.png-88c3e45c5fd7242fdfc215cb59085e31.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://art/sprites/crops/FG_Crops_Potato.png"
|
||||
dest_files=["res://.godot/imported/FG_Crops_Potato.png-88c3e45c5fd7242fdfc215cb59085e31.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 765 B |
|
|
@ -1,40 +0,0 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://c3wjj1t2ye2wr"
|
||||
path="res://.godot/imported/FG_Crops_Strawberry.png-76d99d39b51e1c404f00c643db378da4.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://art/sprites/crops/FG_Crops_Strawberry.png"
|
||||
dest_files=["res://.godot/imported/FG_Crops_Strawberry.png-76d99d39b51e1c404f00c643db378da4.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 472 B |
|
|
@ -1,40 +0,0 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://hbjgdtt0tkpe"
|
||||
path="res://.godot/imported/FG_Crops_Wheat.png-e1d42717b3eaa01ef1c1aae3ae9445e7.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://art/sprites/crops/FG_Crops_Wheat.png"
|
||||
dest_files=["res://.godot/imported/FG_Crops_Wheat.png-e1d42717b3eaa01ef1c1aae3ae9445e7.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
|
|
@ -28,11 +28,6 @@ var stockpiles: Array = [] # Array of StorageDestination (StockpileZone for
|
|||
# its _ready(). Don't access before the world scene is mounted.
|
||||
var pathfinder = null
|
||||
|
||||
## Reference to the in-scene Designation controller. Wired by world.gd _ready
|
||||
## so entities completing a job can call World.clear_designation_at(tile) to
|
||||
## remove the lingering ghost paint without depending on the scene tree path.
|
||||
var designation_ctl = null
|
||||
|
||||
# Phase 5 — build queue. Holds Wall/Floor/Door/Crate ghost entities (not yet
|
||||
# completed). ConstructionProvider iterates this for the nearest buildable site.
|
||||
# Entities call register_build_site() in _ready and unregister_build_site() when
|
||||
|
|
@ -88,14 +83,6 @@ var grave_markers: Array = []
|
|||
var items_needing_haul: Dictionary = {}
|
||||
|
||||
|
||||
## Clear the designation ghost at `tile`, if any. Entities call this from
|
||||
## their _complete / fell / mined handlers so the visual highlight disappears
|
||||
## once the job is done. Safe no-op if designation_ctl isn't wired (headless).
|
||||
func clear_designation_at(tile: Vector2i) -> void:
|
||||
if designation_ctl != null:
|
||||
designation_ctl.clear_cell(tile)
|
||||
|
||||
|
||||
func register_work_provider(wp) -> void:
|
||||
assert(wp != null, "World.register_work_provider: provider is null")
|
||||
if not work_providers.has(wp):
|
||||
|
|
|
|||
|
|
@ -279,7 +279,6 @@ func _complete() -> void:
|
|||
if sprite != null:
|
||||
sprite.modulate.a = 1.0
|
||||
queue_redraw()
|
||||
World.clear_designation_at(tile)
|
||||
Audit.log("bed", "%s built at %s" % [label_text, tile])
|
||||
# Phase 13 — notify BeautySystem so nearby tile beauty scores update.
|
||||
var bs = World.get("beauty_system")
|
||||
|
|
|
|||
|
|
@ -149,9 +149,6 @@ func mined() -> void:
|
|||
Audit.log("big_rock", "mined 2×2 at %s; %d stone drops" % [origin_tile, STONE_DROPS_ON_MINE])
|
||||
if Audio != null:
|
||||
Audio.play_sfx(&"mine_tick")
|
||||
# BigRocks span 2×2 — clear the designation stamp from every footprint tile.
|
||||
for ft in footprint_tiles():
|
||||
World.clear_designation_at(ft)
|
||||
queue_free()
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -15,12 +15,9 @@ class_name Crop extends Node2D
|
|||
|
||||
const TILE_SIZE_PX: int = 16
|
||||
|
||||
## Available crop kinds. Each maps to an ElvGames 64×32 sprite sheet
|
||||
## (4 stages × 16w × 32h, plant anchored to bottom row).
|
||||
const KIND_WHEAT: StringName = &"wheat"
|
||||
const KIND_POTATO: StringName = &"potato"
|
||||
const KIND_CORN: StringName = &"corn"
|
||||
const KIND_STRAWBERRY: StringName = &"strawberry"
|
||||
## Phase 7 ships wheat and potato. Phase 17 expands (berry, hop) per design.md.
|
||||
const KIND_WHEAT: StringName = &"wheat"
|
||||
const KIND_POTATO: StringName = &"potato"
|
||||
|
||||
## Sim ticks per growth stage. 200 ticks × 4 stages = 800 total.
|
||||
## At 20 Hz × 5× speed = 100 ticks/sec → 8 real seconds per stage, 32 seconds full grow.
|
||||
|
|
@ -29,20 +26,6 @@ const STAGE_COUNT: int = 4
|
|||
|
||||
enum Stage { TILLED, SOWN, GROWING_1, GROWING_2, GROWING_3, READY }
|
||||
|
||||
## Per-kind sprite atlas. Strawberry / Corn are 80×32 (5 stages) — we still slice
|
||||
## the first 4 cols, which gives the same progression (the 5th col is a
|
||||
## post-harvest regrow frame we don't use).
|
||||
const _CROP_TEXTURES: Dictionary = {
|
||||
KIND_WHEAT: preload("res://art/sprites/crops/FG_Crops_Wheat.png"),
|
||||
KIND_POTATO: preload("res://art/sprites/crops/FG_Crops_Potato.png"),
|
||||
KIND_CORN: preload("res://art/sprites/crops/FG_Crops_Corns.png"),
|
||||
KIND_STRAWBERRY: preload("res://art/sprites/crops/FG_Crops_Strawberry.png"),
|
||||
}
|
||||
|
||||
## Width / height of one stage cell in pixels.
|
||||
const _STAGE_W: int = 16
|
||||
const _STAGE_H: int = 32
|
||||
|
||||
@export var crop_kind: StringName = KIND_WHEAT
|
||||
@export var tile: Vector2i = Vector2i.ZERO
|
||||
|
||||
|
|
@ -54,9 +37,6 @@ var stage_progress: int = 0
|
|||
# indoor detection for this crop instance so we don't flood the audit log.
|
||||
var _logged_indoor: bool = false
|
||||
|
||||
# Child Sprite2D — created in _ready, region_rect updated whenever stage flips.
|
||||
var _sprite: Sprite2D = null
|
||||
|
||||
const ITEM_SCENE: PackedScene = preload("res://scenes/entities/item.tscn")
|
||||
|
||||
|
||||
|
|
@ -64,7 +44,6 @@ const ITEM_SCENE: PackedScene = preload("res://scenes/entities/item.tscn")
|
|||
|
||||
func _ready() -> void:
|
||||
position = _tile_to_world(tile)
|
||||
_build_sprite()
|
||||
World.register_crop(self)
|
||||
EventBus.sim_tick.connect(_on_sim_tick)
|
||||
queue_redraw()
|
||||
|
|
@ -83,9 +62,6 @@ func setup(p_tile: Vector2i, p_kind: StringName, p_stage: Stage = Stage.SOWN) ->
|
|||
stage = p_stage
|
||||
stage_progress = 0
|
||||
position = _tile_to_world(tile)
|
||||
if _sprite != null:
|
||||
_sprite.texture = _texture_for(crop_kind)
|
||||
_refresh_sprite_region()
|
||||
queue_redraw()
|
||||
Audit.log("crop", "spawned %s at %s (stage=%s)" % [crop_kind, tile, Stage.keys()[stage]])
|
||||
|
||||
|
|
@ -111,7 +87,6 @@ func on_harvest_tick() -> void:
|
|||
it.setup(item_type, 1, tile)
|
||||
stage = Stage.TILLED
|
||||
stage_progress = 0
|
||||
_refresh_sprite_region()
|
||||
Audit.log("crop", "harvested %s at %s → %s" % [crop_kind, tile, item_type])
|
||||
queue_redraw()
|
||||
|
||||
|
|
@ -123,7 +98,6 @@ func on_sow_tick() -> void:
|
|||
return
|
||||
stage = Stage.SOWN
|
||||
stage_progress = 0
|
||||
_refresh_sprite_region()
|
||||
Audit.log("crop", "sown %s at %s" % [crop_kind, tile])
|
||||
queue_redraw()
|
||||
|
||||
|
|
@ -148,7 +122,6 @@ func _on_sim_tick(_n: int) -> void:
|
|||
if stage_progress >= STAGE_TICKS:
|
||||
stage_progress = 0
|
||||
stage = (int(stage) + 1) as Stage
|
||||
_refresh_sprite_region()
|
||||
queue_redraw()
|
||||
if stage == Stage.READY:
|
||||
Audit.log("crop", "%s ready at %s" % [crop_kind, tile])
|
||||
|
|
@ -183,70 +156,53 @@ static func from_dict(d: Dictionary) -> Dictionary:
|
|||
# ── render ────────────────────────────────────────────────────────────────────
|
||||
|
||||
func _draw() -> void:
|
||||
# Tilled-soil base draws under the plant sprite. Stays visible at every stage
|
||||
# so the player sees the patch as cultivated.
|
||||
# Tilled-soil base: a small dark-earth square.
|
||||
var soil_color := Color(0.32, 0.20, 0.10)
|
||||
var soil_dark := Color(0.22, 0.14, 0.06)
|
||||
draw_rect(Rect2(Vector2(-7.0, -7.0), Vector2(14.0, 14.0)), soil_color)
|
||||
draw_rect(Rect2(Vector2(-7.0, -7.0), Vector2(14.0, 14.0)), soil_dark, false, 1.0)
|
||||
|
||||
if stage == Stage.TILLED:
|
||||
return # Bare soil — no plant drawn.
|
||||
|
||||
# ── sprite helpers ────────────────────────────────────────────────────────────
|
||||
# stage_idx: 0 = SOWN, 4 = READY
|
||||
var stage_idx := int(stage) - int(Stage.SOWN)
|
||||
var height: float = lerp(2.0, 12.0, float(stage_idx) / float(STAGE_COUNT))
|
||||
var plant_color := _plant_color_for(crop_kind)
|
||||
|
||||
func _build_sprite() -> void:
|
||||
_sprite = Sprite2D.new()
|
||||
_sprite.name = "Sprite"
|
||||
_sprite.texture = _texture_for(crop_kind)
|
||||
_sprite.region_enabled = true
|
||||
_sprite.centered = true
|
||||
# 32-tall sprite anchored so its bottom edge sits at the tile's bottom row
|
||||
# (local +8 from tile centre). Sprite half-height = 16 → offset.y = 8 - 16 = -8.
|
||||
_sprite.offset = Vector2(0, -8)
|
||||
# Draw the plant above the soil rect but below pawns/items.
|
||||
_sprite.z_index = 0
|
||||
add_child(_sprite)
|
||||
_refresh_sprite_region()
|
||||
# Stem
|
||||
draw_rect(Rect2(Vector2(-2.0, 5.0 - height), Vector2(4.0, height)), plant_color)
|
||||
|
||||
# Foliage circle grows in from GROWING_2 onward
|
||||
if stage_idx >= 2:
|
||||
draw_circle(Vector2(0.0, 5.0 - height), 3.0 + float(stage_idx), plant_color)
|
||||
|
||||
func _refresh_sprite_region() -> void:
|
||||
if _sprite == null:
|
||||
return
|
||||
var idx := _sprite_stage_index(stage)
|
||||
if idx < 0:
|
||||
_sprite.visible = false
|
||||
return
|
||||
_sprite.visible = true
|
||||
_sprite.region_rect = Rect2(idx * _STAGE_W, 0, _STAGE_W, _STAGE_H)
|
||||
|
||||
|
||||
## Map game-stage to one of the 4 sprite columns. TILLED has no plant frame.
|
||||
## SOWN..GROWING_2 step through cols 0..2; GROWING_3 and READY both land on
|
||||
## col 3 (mature). The harvest designation overlay is what cues the player
|
||||
## that READY is ready — sprite alone doesn't need a fifth frame.
|
||||
func _sprite_stage_index(s: Stage) -> int:
|
||||
match s:
|
||||
Stage.TILLED: return -1
|
||||
Stage.SOWN: return 0
|
||||
Stage.GROWING_1: return 1
|
||||
Stage.GROWING_2: return 2
|
||||
Stage.GROWING_3: return 3
|
||||
Stage.READY: return 3
|
||||
_: return 0
|
||||
# Ready accent — grain head or potato cap
|
||||
if stage == Stage.READY:
|
||||
draw_circle(Vector2(0.0, 5.0 - height), 2.0, _ready_accent_for(crop_kind))
|
||||
|
||||
|
||||
# ── helpers ───────────────────────────────────────────────────────────────────
|
||||
|
||||
func _texture_for(kind: StringName) -> Texture2D:
|
||||
return _CROP_TEXTURES.get(kind, _CROP_TEXTURES[KIND_WHEAT])
|
||||
|
||||
|
||||
func _harvest_output_for(kind: StringName) -> StringName:
|
||||
match kind:
|
||||
KIND_WHEAT: return Item.TYPE_GRAIN
|
||||
KIND_POTATO: return Item.TYPE_VEGETABLE
|
||||
KIND_CORN: return Item.TYPE_GRAIN
|
||||
KIND_STRAWBERRY: return Item.TYPE_VEGETABLE
|
||||
_: return Item.TYPE_VEGETABLE
|
||||
KIND_WHEAT: return Item.TYPE_GRAIN
|
||||
KIND_POTATO: return Item.TYPE_VEGETABLE
|
||||
_: return Item.TYPE_VEGETABLE # fallback
|
||||
|
||||
|
||||
func _plant_color_for(kind: StringName) -> Color:
|
||||
match kind:
|
||||
KIND_WHEAT: return Color(0.50, 0.65, 0.20) # bright green sprout
|
||||
KIND_POTATO: return Color(0.30, 0.55, 0.20) # darker green
|
||||
_: return Color(0.40, 0.60, 0.20)
|
||||
|
||||
|
||||
func _ready_accent_for(kind: StringName) -> Color:
|
||||
match kind:
|
||||
KIND_WHEAT: return Color(0.95, 0.85, 0.20) # golden grain head
|
||||
KIND_POTATO: return Color(0.95, 0.60, 0.30) # orange potato cap
|
||||
_: return Color(1.0, 0.4, 0.4)
|
||||
|
||||
|
||||
func _tile_to_world(t: Vector2i) -> Vector2:
|
||||
|
|
|
|||
|
|
@ -181,5 +181,4 @@ func _complete() -> void:
|
|||
if sprite != null:
|
||||
sprite.modulate.a = 1.0
|
||||
queue_redraw()
|
||||
World.clear_designation_at(tile)
|
||||
Audit.log("door", "door completed at %s" % tile)
|
||||
|
|
|
|||
|
|
@ -172,5 +172,4 @@ func _complete() -> void:
|
|||
# Floors do NOT block pathfinding — no pathfinder call here.
|
||||
World.mark_floor_tile(tile, floor_material)
|
||||
queue_redraw()
|
||||
World.clear_designation_at(tile)
|
||||
Audit.log("floor", "%s floor completed at %s" % [floor_material, tile])
|
||||
|
|
|
|||
|
|
@ -224,5 +224,4 @@ func from_dict(d: Dictionary) -> void:
|
|||
func _complete_dig() -> void:
|
||||
_dug = true
|
||||
queue_redraw()
|
||||
World.clear_designation_at(tile)
|
||||
Audit.log("grave_slot", "grave dug at %s (ready for burial)" % tile)
|
||||
|
|
|
|||
|
|
@ -124,7 +124,6 @@ func mined() -> void:
|
|||
Audit.log("rock", "mined at %s; %d stone drop" % [tile, STONE_DROPS_ON_MINE])
|
||||
if Audio != null:
|
||||
Audio.play_sfx(&"mine_tick")
|
||||
World.clear_designation_at(tile)
|
||||
queue_free()
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -245,7 +245,6 @@ func _complete() -> void:
|
|||
if _light != null:
|
||||
_light.enabled = _is_on
|
||||
queue_redraw()
|
||||
World.clear_designation_at(tile)
|
||||
Audit.log("torch", "built at %s" % tile)
|
||||
# Phase 13 — notify BeautySystem so nearby tile beauty scores update.
|
||||
var bs = World.get("beauty_system")
|
||||
|
|
|
|||
|
|
@ -119,7 +119,6 @@ func fell() -> void:
|
|||
Audit.log("tree", "felled at %s; %d wood drops" % [tile, drops_count])
|
||||
if Audio != null:
|
||||
Audio.play_sfx(&"tree_fell")
|
||||
World.clear_designation_at(tile)
|
||||
queue_free()
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -241,5 +241,4 @@ func _complete() -> void:
|
|||
queue_redraw()
|
||||
|
||||
queue_redraw()
|
||||
World.clear_designation_at(tile)
|
||||
Audit.log("wall", "%s wall completed at %s" % [wall_material, tile])
|
||||
|
|
|
|||
|
|
@ -419,7 +419,6 @@ func _complete() -> void:
|
|||
if _light != null:
|
||||
_light.enabled = is_on()
|
||||
queue_redraw()
|
||||
World.clear_designation_at(tile)
|
||||
Audit.log("workbench", "%s built at %s" % [label_text, tile])
|
||||
# Phase 13 — notify BeautySystem so nearby tile beauty scores update.
|
||||
# Hearth gets base beauty 4 (warm glow); other benches get 1.
|
||||
|
|
|
|||
|
|
@ -143,7 +143,6 @@ func on_build_tick() -> void:
|
|||
if build_progress >= BUILD_TICKS:
|
||||
_completed = true
|
||||
emit_signal("contents_changed")
|
||||
World.clear_designation_at(tile)
|
||||
Audit.log("crate", "built at %s (capacity %d)" % [tile, CAPACITY])
|
||||
queue_redraw()
|
||||
|
||||
|
|
|
|||
|
|
@ -185,9 +185,6 @@ func _ready() -> void:
|
|||
|
||||
# Designation: bind the paint surface + the Selection guard.
|
||||
designation_ctl.bind(designation_layer, selection)
|
||||
# Expose on the autoload so entities can clear their ghost stamp on
|
||||
# completion (Tree.fell, Wall._complete, etc.).
|
||||
World.designation_ctl = designation_ctl
|
||||
|
||||
# Register all 10 providers — Decision iterates by .priority desc.
|
||||
# doctor=9 > sleep=8 > eat=7 > construction=6 > chop=5 ≈ plant=5 > mine=4
|
||||
|
|
@ -561,30 +558,15 @@ func _seed_phase5_demo_buildings() -> void:
|
|||
meal_bill.mode = Bill.Mode.FOREVER
|
||||
hearth.add_bill(meal_bill)
|
||||
|
||||
# Mixed crops east of the cabin, near the trees. One column per kind so the
|
||||
# player sees the four atlas variants side-by-side from the boot demo.
|
||||
var crop_plan: Array = [
|
||||
[Vector2i(54, 24), Crop.KIND_WHEAT],
|
||||
[Vector2i(54, 25), Crop.KIND_WHEAT],
|
||||
[Vector2i(54, 26), Crop.KIND_WHEAT],
|
||||
[Vector2i(55, 24), Crop.KIND_POTATO],
|
||||
[Vector2i(55, 25), Crop.KIND_POTATO],
|
||||
[Vector2i(55, 26), Crop.KIND_POTATO],
|
||||
[Vector2i(56, 24), Crop.KIND_CORN],
|
||||
[Vector2i(56, 25), Crop.KIND_CORN],
|
||||
[Vector2i(56, 26), Crop.KIND_CORN],
|
||||
[Vector2i(57, 24), Crop.KIND_STRAWBERRY],
|
||||
[Vector2i(57, 25), Crop.KIND_STRAWBERRY],
|
||||
[Vector2i(57, 26), Crop.KIND_STRAWBERRY],
|
||||
# Wheat crops east of the cabin, near the trees.
|
||||
var crop_tiles: Array[Vector2i] = [
|
||||
Vector2i(54, 24), Vector2i(54, 25), Vector2i(54, 26),
|
||||
Vector2i(55, 24), Vector2i(55, 25), Vector2i(55, 26),
|
||||
]
|
||||
var crop_tiles: Array[Vector2i] = []
|
||||
for entry in crop_plan:
|
||||
var ct: Vector2i = entry[0]
|
||||
var kind: StringName = entry[1]
|
||||
crop_tiles.append(ct)
|
||||
for ct in crop_tiles:
|
||||
var c: Crop = CROP_SCENE.instantiate()
|
||||
add_child(c)
|
||||
c.setup(ct, kind, Crop.Stage.SOWN)
|
||||
c.setup(ct, Crop.KIND_WHEAT, Crop.Stage.SOWN)
|
||||
|
||||
# Pre-baked breads + a vegetable meal so pawns can eat before the
|
||||
# full cooking chain finishes. Phase 17 may remove these as cooking
|
||||
|
|
@ -596,7 +578,7 @@ func _seed_phase5_demo_buildings() -> void:
|
|||
bread_item.setup(Item.TYPE_BREAD, 1, st)
|
||||
bread_item.quality = Item.Quality.NORMAL
|
||||
|
||||
Audit.log("world", "phase 7 demo: Millstone+Hearth built, %d crops sown (mixed kinds), %d pre-baked breads placed" % [
|
||||
Audit.log("world", "phase 7 demo: Millstone+Hearth built, %d wheat crops sown, %d pre-baked breads placed" % [
|
||||
crop_tiles.size(), snack_tiles.size()
|
||||
])
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue