aboutsummaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authortpart <tpart120@proton.me>2025-09-15 22:12:25 +0200
committertpart <tpart120@proton.me>2025-09-15 22:12:25 +0200
commit0b780e2271e63f10a2580afe9507d18d735527f8 (patch)
tree4a186427d97b718f3b9e1c2a914103a0ee085aa1 /client
parent2ab827a9975b59490a9f46a7d22b9fd387879c18 (diff)
downloadhurrycurry-0b780e2271e63f10a2580afe9507d18d735527f8.tar
hurrycurry-0b780e2271e63f10a2580afe9507d18d735527f8.tar.bz2
hurrycurry-0b780e2271e63f10a2580afe9507d18d735527f8.tar.zst
Change strawberry ice cream recipe & models
Diffstat (limited to 'client')
-rw-r--r--client/game.gd4
-rw-r--r--client/global.gd10
-rw-r--r--client/map/item_factory.gd12
-rw-r--r--client/map/items/glass.gd3
-rw-r--r--client/map/items/icecream.tscn2
5 files changed, 16 insertions, 15 deletions
diff --git a/client/game.gd b/client/game.gd
index c0c0bb55..76308349 100644
--- a/client/game.gd
+++ b/client/game.gd
@@ -218,7 +218,7 @@ func handle_packet(p):
if p.message != null:
if "item" in p.message:
var item_name: String = item_names[p.message.item]
- var parsed_item := Global.ParsedItem.new(item_name)
+ var parsed_item := ItemFactory.ParsedItem.new(item_name)
var ingredients := [parsed_item.name]
ingredients.append_array(parsed_item.contents)
@@ -300,7 +300,7 @@ func handle_packet(p):
update_tutorial_running.emit(tutorial_running)
if p.success:
- var completed_item := Global.ParsedItem.new(item_names[p.item])
+ var completed_item := ItemFactory.ParsedItem.new(item_names[p.item])
var played: Array = Global.get_profile("tutorial_ingredients_played")
played.append(completed_item.name)
played.append_array(completed_item.contents)
diff --git a/client/global.gd b/client/global.gd
index f308f847..c7ee555e 100644
--- a/client/global.gd
+++ b/client/global.gd
@@ -220,16 +220,6 @@ func array_has_all(parent: Array, children: Array) -> bool:
return false
return true
-# TODO orphan
-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 []
-
func configure_viewport_aa(vp: Viewport, aa: String) -> void:
match aa:
"disabled":
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")