aboutsummaryrefslogtreecommitdiff
path: root/client/map
diff options
context:
space:
mode:
Diffstat (limited to 'client/map')
-rw-r--r--client/map/item_factory.gd12
-rw-r--r--client/map/items/glass.gd3
-rw-r--r--client/map/items/icecream.tscn2
3 files changed, 14 insertions, 3 deletions
diff --git a/client/map/item_factory.gd b/client/map/item_factory.gd
index 6cd160c1..904160f0 100644
--- a/client/map/item_factory.gd
+++ b/client/map/item_factory.gd
@@ -16,8 +16,17 @@
class_name ItemFactory
extends Object
+class ParsedItem:
+ var name: String
+ var contents: Array
+
+ func _init(full_name: String):
+ var c = Array(full_name.split(":"))
+ name = c[0]
+ contents = c[1].split(",") if c.size() > 1 else []
+
static func produce(full_name: String, owned_by: Node3D) -> Item:
- var item = Global.ParsedItem.new(full_name)
+ var item = ParsedItem.new(full_name)
match item.name:
"bun": return Bun.new(owned_by)
@@ -33,7 +42,6 @@ static func produce(full_name: String, owned_by: Node3D) -> Item:
"fish": return Fish.new(owned_by)
"flour": return Flour.new(owned_by)
"leek": return Leek.new(owned_by)
- "strawberry-icecream": return Icecream.new(owned_by, Color(.98, .55, .71))
"strawberry-mochi": return Mochi.new(owned_by, Color(.98, .70, .75))
"nigiri": return Nigiri.new(owned_by)
"steak": return Steak.new(owned_by)
diff --git a/client/map/items/glass.gd b/client/map/items/glass.gd
index 62a4fb56..900a3eba 100644
--- a/client/map/items/glass.gd
+++ b/client/map/items/glass.gd
@@ -26,6 +26,9 @@ func _init(owned_by_: Node3D, contents: Array):
"water": item = GlassFill.new(self, Color(.5, .6, .8))
"strawberry-shake": item = GlassFill.new(self, Color(.98, .55, .71))
"tomato-juice": item = GlassFill.new(self, Color(1., .0, .0))
+ "strawberry-icecream":
+ base.add_child(Icecream.new(self, Color(.98, .55, .71)))
+ item = GlassFill.new(self, Color(.98, .55, .71))
_: push_error("Glass fill not implemented: %s" % contents)
base.add_child(item)
diff --git a/client/map/items/icecream.tscn b/client/map/items/icecream.tscn
index b5dd322a..97eb32cf 100644
--- a/client/map/items/icecream.tscn
+++ b/client/map/items/icecream.tscn
@@ -68,7 +68,7 @@ cull_mode = 2
roughness = 0.690035
[node name="IceCream" type="MeshInstance3D"]
-transform = Transform3D(0.75, 0, 0, 0, 0.75, 0, 0, 0, 0.75, 0, 0, 0)
+transform = Transform3D(0.6, 0, 0, 0, 0.6, 0, 0, 0, 0.6, 0, 0.2, 0)
mesh = SubResource("ArrayMesh_vb1ms")
skeleton = NodePath("")
surface_material_override/1 = SubResource("StandardMaterial3D_2ckef")