aboutsummaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authornokoe <nokoe@mailbox.org>2025-12-13 21:31:30 +0100
committernokoe <nokoe@mailbox.org>2025-12-13 21:31:30 +0100
commit3976a555d2ec26c1529ced29d1860f2a24ba086f (patch)
tree1d95745fc6ad10a271aa4f0d7791accb95694fff /client
parentc01289d4c42e4fc24399401e45042a474feb8620 (diff)
downloadhurrycurry-3976a555d2ec26c1529ced29d1860f2a24ba086f.tar
hurrycurry-3976a555d2ec26c1529ced29d1860f2a24ba086f.tar.bz2
hurrycurry-3976a555d2ec26c1529ced29d1860f2a24ba086f.tar.zst
generic crate
Diffstat (limited to 'client')
-rw-r--r--client/map/tiles/crate.gd20
-rw-r--r--client/map/tiles/trash.gd2
2 files changed, 19 insertions, 3 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)