diff options
| author | nokoe <nokoe@mailbox.org> | 2025-12-13 21:31:30 +0100 |
|---|---|---|
| committer | nokoe <nokoe@mailbox.org> | 2025-12-13 21:31:30 +0100 |
| commit | 3976a555d2ec26c1529ced29d1860f2a24ba086f (patch) | |
| tree | 1d95745fc6ad10a271aa4f0d7791accb95694fff | |
| parent | c01289d4c42e4fc24399401e45042a474feb8620 (diff) | |
| download | hurrycurry-3976a555d2ec26c1529ced29d1860f2a24ba086f.tar hurrycurry-3976a555d2ec26c1529ced29d1860f2a24ba086f.tar.bz2 hurrycurry-3976a555d2ec26c1529ced29d1860f2a24ba086f.tar.zst | |
generic crate
| -rw-r--r-- | client/map/tiles/crate.gd | 20 | ||||
| -rw-r--r-- | client/map/tiles/trash.gd | 2 | ||||
| -rw-r--r-- | data/maps/debug.yaml | 3 |
3 files changed, 21 insertions, 4 deletions
diff --git a/client/map/tiles/crate.gd b/client/map/tiles/crate.gd index fb0623b3..32c3dc80 100644 --- a/client/map/tiles/crate.gd +++ b/client/map/tiles/crate.gd @@ -50,5 +50,21 @@ func _init(ctx: TileFactory.TileCC): base.add_child(load("res://map/tiles/strawberry_crate.tscn").instantiate()) "tomato": base.add_child(load("res://map/tiles/tomato_crate.tscn").instantiate()) - var _item_name: - pass + var item_name: + base.add_child(load("res://map/tiles/crate.tscn").instantiate()) + for i in [ + [Vector3(0.25, 0.1, -0.2), deg_to_rad(-8)], + [Vector3(0.25, 0.15, 0.2), deg_to_rad(8)], + [Vector3(0, 0.1, -0.2), deg_to_rad(12)], + [Vector3(0, 0.1, 0.1), deg_to_rad(-6)], + [Vector3(-0.25, 0.15, -0.2), deg_to_rad(-8)], + [Vector3(-0.25, 0.1, 0.2), deg_to_rad(4)], + ]: + var crate_item_base = Node3D.new() + var crate_item = ItemFactory.produce(item_name, crate_item_base) + crate_item.position = i[0] + crate_item_base.position = i[0] + crate_item.rotation.y = i[1] + crate_item_base.rotation.y = i[1] + crate_item_base.add_child(crate_item) + base.add_child(crate_item_base) diff --git a/client/map/tiles/trash.gd b/client/map/tiles/trash.gd index 14ef9ad2..36918b52 100644 --- a/client/map/tiles/trash.gd +++ b/client/map/tiles/trash.gd @@ -14,7 +14,7 @@ # along with this program. If not, see <https://www.gnu.org/licenses/>. # class_name Trash -extends Crate +extends Counter func _init(ctx: TileFactory.TileCC): super(ctx) diff --git a/data/maps/debug.yaml b/data/maps/debug.yaml index ddf0ca60..397be888 100644 --- a/data/maps/debug.yaml +++ b/data/maps/debug.yaml @@ -18,7 +18,7 @@ default_timer: 1000000 map: - "........................" - "........................" - - "..0123456789¹²³¼½......." + - "..0123456789¹²³¼½°......" - "..~....................." - "........................" - "..ab⌷cd.ef⌷gh.ij........" @@ -67,6 +67,7 @@ tiles: "²": potato-crate -x "³": bun-crate -x "¼": noodles-crate -x + "°": crate:basket "½": trash -x "Ø": black-hole -w |