diff options
| -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 |