aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortpart <tpart120@proton.me>2024-08-19 21:37:59 +0200
committertpart <tpart120@proton.me>2024-08-19 21:37:59 +0200
commitafbea7fcf5f66b08d7ef0ed4e617678b8c20bda0 (patch)
treeca6ceb68a8f2a68c9d07acf3d3217e244c93bf71
parent222b6c4050ce497999cee39f594861b72ab44b05 (diff)
downloadhurrycurry-afbea7fcf5f66b08d7ef0ed4e617678b8c20bda0.tar
hurrycurry-afbea7fcf5f66b08d7ef0ed4e617678b8c20bda0.tar.bz2
hurrycurry-afbea7fcf5f66b08d7ef0ed4e617678b8c20bda0.tar.zst
Add mochi model & Implement strawberry mochi
-rw-r--r--client/map/item_factory.gd4
-rw-r--r--client/map/items/icecream.tscn1
-rw-r--r--client/map/items/mochi.gd27
-rw-r--r--client/map/items/mochi.resbin0 -> 2674 bytes
-rw-r--r--client/map/items/mochi.tscn11
-rw-r--r--client/map/items/mochi_items.gd (renamed from client/map/items/icecream_items.gd)6
6 files changed, 43 insertions, 6 deletions
diff --git a/client/map/item_factory.gd b/client/map/item_factory.gd
index 014c80b4..7abcfdc2 100644
--- a/client/map/item_factory.gd
+++ b/client/map/item_factory.gd
@@ -27,6 +27,7 @@ static func produce(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-mochi": return MochiItems.StrawberryM.new(owned_by)
"nigiri": return Nigiri.new(owned_by)
"raw-steak": return RawSteak.new(owned_by)
"rice": return Rice.new(owned_by)
@@ -83,11 +84,10 @@ static func produce(name: String, owned_by: Node3D) -> Item:
"bread-slice-sliced-tomato-steak-plate": return PlateItems.BreadSliceSlicedTomatoSteakP.new(owned_by)
"bread-slice-steak-plate": return PlateItems.BreadSliceSteakP.new(owned_by)
"curry-plate": return PlateItems.CurryP.new(owned_by)
- "strawberry-icecream-plate": return PlateItems.StrawberryIcecreamP.new(owned_by)
-
"dirty-plate": return PlateItems.DirtyP.new(owned_by)
"nigiri-plate": return PlateItems.NigiriP.new(owned_by)
"steak-plate": return PlateItems.SteakP.new(owned_by)
+ "strawberry-icecream-plate": return PlateItems.StrawberryIcecreamP.new(owned_by)
"tomato-soup-plate": return PlateItems.TomatoSoupP.new(owned_by)
var t: return GenericItem.new(owned_by, t)
diff --git a/client/map/items/icecream.tscn b/client/map/items/icecream.tscn
index 71d5440a..b5dd322a 100644
--- a/client/map/items/icecream.tscn
+++ b/client/map/items/icecream.tscn
@@ -65,7 +65,6 @@ shadow_mesh = SubResource("ArrayMesh_fh0mf")
resource_local_to_scene = true
resource_name = "Ice"
cull_mode = 2
-albedo_color = Color(0.706654, 0.706654, 0.706654, 0)
roughness = 0.690035
[node name="IceCream" type="MeshInstance3D"]
diff --git a/client/map/items/mochi.gd b/client/map/items/mochi.gd
new file mode 100644
index 00000000..77e0ca41
--- /dev/null
+++ b/client/map/items/mochi.gd
@@ -0,0 +1,27 @@
+# Hurry Curry! - a game about cooking
+# Copyright 2024 tpart
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, version 3 of the License only.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
+#
+class_name Mochi
+extends Item
+
+var model: MeshInstance3D = load("res://map/items/mochi.tscn").instantiate()
+
+func _init(owned_by_: Node3D):
+ super(owned_by_)
+ add_child(model)
+
+func set_color(c: Color):
+ var mat: BaseMaterial3D = model.get_active_material(0)
+ mat.albedo_color = c
diff --git a/client/map/items/mochi.res b/client/map/items/mochi.res
new file mode 100644
index 00000000..d9a4a97b
--- /dev/null
+++ b/client/map/items/mochi.res
Binary files differ
diff --git a/client/map/items/mochi.tscn b/client/map/items/mochi.tscn
new file mode 100644
index 00000000..aaf20af6
--- /dev/null
+++ b/client/map/items/mochi.tscn
@@ -0,0 +1,11 @@
+[gd_scene load_steps=3 format=3 uid="uid://2warur3hlxao"]
+
+[ext_resource type="ArrayMesh" uid="uid://c3s71kxt7nhfb" path="res://map/items/mochi.res" id="1_ygb5f"]
+
+[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_c143l"]
+
+[node name="Mochi" type="MeshInstance3D"]
+transform = Transform3D(0.15, 0, 0, 0, 0.104, 0, 0, 0, 0.15, 0, 0.075, 0)
+mesh = ExtResource("1_ygb5f")
+skeleton = NodePath("")
+surface_material_override/0 = SubResource("StandardMaterial3D_c143l")
diff --git a/client/map/items/icecream_items.gd b/client/map/items/mochi_items.gd
index 5fb019f2..2759f228 100644
--- a/client/map/items/icecream_items.gd
+++ b/client/map/items/mochi_items.gd
@@ -13,9 +13,9 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
-class_name IcecreamItems
+class_name MochiItems
-class StrawberryI extends IcecreamPlate:
+class StrawberryM extends Mochi:
func _init(owned_by_: Node3D):
super(owned_by_)
- set_color(Color(1., .3, .2))
+ set_color(Color(.98, .70, .75))