Crop sprites — atlas art + four growable kinds
Replaces the procedural stem-and-circle draw with an ElvGames atlas-backed Sprite2D. Crops now pick a per-kind 64×32 (or 80×32) sheet from art/sprites/crops/ and slice cols 0..3 across the SOWN..READY stage range (TILLED keeps the bare dirt rect). The plant sprite is anchored so its bottom edge sits at the tile bottom, matching the tree convention. Four kinds wired in: wheat, potato, corn, strawberry. The boot demo's crop patch now plants one column per kind so all four show up in the spring start state. Harvest outputs map: wheat/corn → grain, potato/strawberry → vegetable. Tooltip already capitalises crop_kind so 'Corn' / 'Strawberry' show through with no UI change.
This commit is contained in:
parent
f67c12c51f
commit
c93f889ff1
10 changed files with 261 additions and 42 deletions
|
|
@ -561,15 +561,30 @@ func _seed_phase5_demo_buildings() -> void:
|
|||
meal_bill.mode = Bill.Mode.FOREVER
|
||||
hearth.add_bill(meal_bill)
|
||||
|
||||
# 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),
|
||||
# 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],
|
||||
]
|
||||
for ct in crop_tiles:
|
||||
var crop_tiles: Array[Vector2i] = []
|
||||
for entry in crop_plan:
|
||||
var ct: Vector2i = entry[0]
|
||||
var kind: StringName = entry[1]
|
||||
crop_tiles.append(ct)
|
||||
var c: Crop = CROP_SCENE.instantiate()
|
||||
add_child(c)
|
||||
c.setup(ct, Crop.KIND_WHEAT, Crop.Stage.SOWN)
|
||||
c.setup(ct, kind, 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
|
||||
|
|
@ -581,7 +596,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 wheat crops sown, %d pre-baked breads placed" % [
|
||||
Audit.log("world", "phase 7 demo: Millstone+Hearth built, %d crops sown (mixed kinds), %d pre-baked breads placed" % [
|
||||
crop_tiles.size(), snack_tiles.size()
|
||||
])
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue