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
|
|
@ -372,6 +372,28 @@ func _draw() -> void:
|
|||
draw_circle(Vector2(c.x, c.y - 10), 4.0, leaf_a)
|
||||
draw_circle(Vector2(c.x - 5, c.y - 6), 3.0, leaf_b)
|
||||
draw_circle(Vector2(c.x + 5, c.y - 5), 3.0, leaf_b)
|
||||
&"paint_crop_wheat", &"paint_crop_potato", &"paint_crop_corn", &"paint_crop_strawberry":
|
||||
# Tilled-soil patch with a small sprout — represents a crop zone designation.
|
||||
# Kind-specific accent colour on the sprout top distinguishes the four tools.
|
||||
var soil := Color(0.32, 0.20, 0.10)
|
||||
var soil_hi := Color(0.48, 0.30, 0.14)
|
||||
var stem_col := Color(0.35, 0.55, 0.20)
|
||||
var sprout_col: Color
|
||||
match tool_id:
|
||||
&"paint_crop_wheat": sprout_col = Color(0.90, 0.80, 0.25) # golden wheat
|
||||
&"paint_crop_potato": sprout_col = Color(0.80, 0.72, 0.40) # pale tan
|
||||
&"paint_crop_corn": sprout_col = Color(0.95, 0.90, 0.30) # bright yellow
|
||||
&"paint_crop_strawberry": sprout_col = Color(0.90, 0.25, 0.25) # red berry
|
||||
_: sprout_col = Color(0.40, 0.75, 0.30)
|
||||
# Soil patch.
|
||||
draw_rect(Rect2(c.x - 14, c.y + 0, 28, 16), soil)
|
||||
draw_rect(Rect2(c.x - 14, c.y + 0, 28, 3), soil_hi)
|
||||
draw_rect(Rect2(c.x - 14, c.y + 0, 28, 16), outline, false, 1.0)
|
||||
# Three small sprouts evenly spaced across the patch.
|
||||
var xs: Array[float] = [c.x - 6.0, c.x, c.x + 6.0]
|
||||
for sx in xs:
|
||||
draw_line(Vector2(sx, c.y + 0), Vector2(sx, c.y - 10), stem_col, 1.5)
|
||||
draw_circle(Vector2(sx, c.y - 12), 3.0, sprout_col)
|
||||
_:
|
||||
# Unknown tool — small grey placeholder.
|
||||
draw_rect(Rect2(c.x - 12, c.y - 12, 24, 24), Color(0.50, 0.50, 0.50))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue