sow no longer needs grain + add crop zone paint tools
Bug: pawns weren't replanting. _find_sow required a TYPE_GRAIN item as seed, but Millstone's flour bill (FOREVER) consumed all grain before sow could claim it. With CookingProvider now priority 6, grain contention is fatal — TILLED crops sit forever. Fix: removed the grain requirement. Sow is now Rimworld-style — the designation triggers work; no input is consumed. _find_sow returns a 2-toil job (walk → interact). Crop.on_sow_tick just flips stage to SOWN. Feature: 4 new paint tools in BuildDrawer's new "Farm" section column — TOOL_PAINT_CROP_WHEAT/POTATO/CORN/STRAWBERRY. Painting a grass tile spawns a TILLED Crop entity that pawns then sow. World rejects non-grass tiles, occupied tiles, and non-walkable terrain. 9 new string keys, kind-specific thumbnail draws (gold/tan/yellow/red). MCP verified: 12 forced-TILLED crops fully cycled TILLED → SOWN → growth → READY within ~3000 ticks. Paint tool spawned wheat crop at (35, 30); wall tile at (44, 23) correctly rejected. Followup smell: cancelling a designation on a player-painted crop will queue_free even if grown — Crop has no can_complete. Future guard could skip crops past TILLED. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
87a7beb22b
commit
c6c88acc47
6 changed files with 107 additions and 54 deletions
|
|
@ -254,6 +254,28 @@ func _build_build_tab() -> Control:
|
|||
func() -> void: _activate(&"paint_quarry", &"", Strings.t(&"tool.paint_quarry")),
|
||||
Strings.t(&"tooltip.tool.paint_quarry"))
|
||||
row.add_child(pr)
|
||||
row.add_child(VSeparator.new())
|
||||
|
||||
# Farm — crop zone paint (one per kind; no seed cost).
|
||||
var fa := _make_section_column(Strings.t(&"ui.build_drawer.section.farm"))
|
||||
var fa_grid := fa.get_child(1) as GridContainer
|
||||
_add_tool_btn(fa_grid, Strings.t(&"tool.paint_crop_wheat"),
|
||||
&"paint_crop_wheat",
|
||||
func() -> void: _activate(&"paint_crop_wheat", &"", Strings.t(&"tool.paint_crop_wheat")),
|
||||
Strings.t(&"tooltip.tool.paint_crop_wheat"))
|
||||
_add_tool_btn(fa_grid, Strings.t(&"tool.paint_crop_potato"),
|
||||
&"paint_crop_potato",
|
||||
func() -> void: _activate(&"paint_crop_potato", &"", Strings.t(&"tool.paint_crop_potato")),
|
||||
Strings.t(&"tooltip.tool.paint_crop_potato"))
|
||||
_add_tool_btn(fa_grid, Strings.t(&"tool.paint_crop_corn"),
|
||||
&"paint_crop_corn",
|
||||
func() -> void: _activate(&"paint_crop_corn", &"", Strings.t(&"tool.paint_crop_corn")),
|
||||
Strings.t(&"tooltip.tool.paint_crop_corn"))
|
||||
_add_tool_btn(fa_grid, Strings.t(&"tool.paint_crop_strawberry"),
|
||||
&"paint_crop_strawberry",
|
||||
func() -> void: _activate(&"paint_crop_strawberry", &"", Strings.t(&"tool.paint_crop_strawberry")),
|
||||
Strings.t(&"tooltip.tool.paint_crop_strawberry"))
|
||||
row.add_child(fa)
|
||||
|
||||
return row
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue