aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortpart <tpart120@proton.me>2024-09-16 15:39:30 +0200
committertpart <tpart120@proton.me>2024-09-16 15:39:34 +0200
commit503e0c59f8eb6186dd21171b7aaa0127a8580588 (patch)
tree0c373f99abab809310ac6c19e2151fb5bab300aa
parentcf235a807dbde2e6c69598a524d87f70085fd774 (diff)
downloadhurrycurry-503e0c59f8eb6186dd21171b7aaa0127a8580588.tar
hurrycurry-503e0c59f8eb6186dd21171b7aaa0127a8580588.tar.bz2
hurrycurry-503e0c59f8eb6186dd21171b7aaa0127a8580588.tar.zst
Fix plate fills offset
-rw-r--r--client/map/items/plate.gd13
-rw-r--r--client/map/items/plate_fill.tscn2
2 files changed, 8 insertions, 7 deletions
diff --git a/client/map/items/plate.gd b/client/map/items/plate.gd
index f8afba5a..6e154072 100644
--- a/client/map/items/plate.gd
+++ b/client/map/items/plate.gd
@@ -32,13 +32,14 @@ func _init(owned_by_: Node3D, contents: Array):
for c in contents:
var item: Item
match c:
- "curry": item = PlateFill.new(self, Color(.75, .45, .1))
- "tomato-soup": item = PlateFill.new(self, Color(1., .3, .2))
+ "curry": add_child(PlateFill.new(self, Color(.75, .45, .1)))
+ "tomato-soup": add_child(PlateFill.new(self, Color(1., .3, .2)))
_: item = ItemFactory.produce(c, base)
- base.add_child(item)
- item.position.y = height_sum
- @warning_ignore("static_called_on_instance")
- height_sum += item.height()
+ if item != null:
+ base.add_child(item)
+ item.position.y = height_sum
+ @warning_ignore("static_called_on_instance")
+ height_sum += item.height()
func setup_sounds():
take_sound.setup([preload("res://map/items/sounds/plate_take.ogg")])
diff --git a/client/map/items/plate_fill.tscn b/client/map/items/plate_fill.tscn
index 290e8994..1ba34231 100644
--- a/client/map/items/plate_fill.tscn
+++ b/client/map/items/plate_fill.tscn
@@ -6,7 +6,7 @@
resource_local_to_scene = true
[node name="PlateFill" type="MeshInstance3D"]
-transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 0, -0.04, 0)
+transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 0, 0, 0)
mesh = ExtResource("1_dgygv")
skeleton = NodePath("")
surface_material_override/0 = SubResource("StandardMaterial3D_q0leg")