diff options
Diffstat (limited to 'client')
-rw-r--r-- | client/map/item_factory.gd | 14 | ||||
-rw-r--r-- | client/map/items/cooked_rice_pot.gd | 21 | ||||
-rw-r--r-- | client/map/items/food_processor_content.gd | 3 | ||||
-rw-r--r-- | client/map/items/food_processor_content.tscn | 7 | ||||
-rw-r--r-- | client/map/items/leek_pot.gd (renamed from client/map/items/leek-pot.gd) | 0 | ||||
-rw-r--r-- | client/map/items/mochi_dough_pot.gd | 21 | ||||
-rw-r--r-- | client/map/items/rice.gd | 21 | ||||
-rw-r--r-- | client/map/items/rice.res | bin | 0 -> 32391 bytes | |||
-rw-r--r-- | client/map/items/rice.tscn | 10 | ||||
-rw-r--r-- | client/map/items/rice_content.res | bin | 0 -> 5424 bytes | |||
-rw-r--r-- | client/map/items/rice_content.tscn | 12 | ||||
-rw-r--r-- | client/map/items/rice_flour_food_processor.gd | 21 | ||||
-rw-r--r-- | client/map/items/rice_flour_pot.gd | 21 | ||||
-rw-r--r-- | client/map/items/rice_food_processor.gd | 22 | ||||
-rw-r--r-- | client/map/items/rice_pot.gd | 28 | ||||
-rw-r--r-- | client/map/tile_factory.gd | 2 | ||||
-rw-r--r-- | client/map/tiles/rice_crate.gd | 21 | ||||
-rw-r--r-- | client/map/tiles/rice_crate.tscn | 9 |
18 files changed, 230 insertions, 3 deletions
diff --git a/client/map/item_factory.gd b/client/map/item_factory.gd index 07054874..90d76c0d 100644 --- a/client/map/item_factory.gd +++ b/client/map/item_factory.gd @@ -86,5 +86,19 @@ static func produce(name: String, owned_by: Node3D) -> Item: return Fish.new(owned_by) "sliced-fish": return SlicedFish.new(owned_by) + "rice": + return Rice.new(owned_by) + "rice-pot": + return RicePot.new(owned_by) + "cooked-rice-pot": + return CookedRicePot.new(owned_by) + "rice-foodprocessor": + return RiceFoodProcessor.new(owned_by) + "rice-flour-foodprocessor": + return RiceFlourFoodProcessor.new(owned_by) + "rice-flour-pot": + return RiceFlourPot.new(owned_by) + "mochi-dough-pot": + return MochiDoughPot.new(owned_by) var t: return GenericItem.new(owned_by, t) diff --git a/client/map/items/cooked_rice_pot.gd b/client/map/items/cooked_rice_pot.gd new file mode 100644 index 00000000..0181eaed --- /dev/null +++ b/client/map/items/cooked_rice_pot.gd @@ -0,0 +1,21 @@ +# Hurry Curry! - a game about cooking +# Copyright 2024 nokoe +# +# 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 CookedRicePot +extends RicePot + +func _init(owned_by_: Node3D): + super(owned_by_) + set_color(Color(1., 1., 1.)) diff --git a/client/map/items/food_processor_content.gd b/client/map/items/food_processor_content.gd index dedd6a37..8968b390 100644 --- a/client/map/items/food_processor_content.gd +++ b/client/map/items/food_processor_content.gd @@ -24,6 +24,5 @@ func _init(owned_by_: Node3D): add_child(content) func set_color(c: Color): - var mat: BaseMaterial3D = content.get_active_material(0).duplicate(true) + var mat: BaseMaterial3D = content.get_active_material(0) mat.albedo_color = c - content.material_override = mat diff --git a/client/map/items/food_processor_content.tscn b/client/map/items/food_processor_content.tscn index 1ae6dba4..a1cac96e 100644 --- a/client/map/items/food_processor_content.tscn +++ b/client/map/items/food_processor_content.tscn @@ -1,8 +1,13 @@ -[gd_scene load_steps=2 format=3 uid="uid://di5nq2vgvostp"] +[gd_scene load_steps=3 format=3 uid="uid://di5nq2vgvostp"] [ext_resource type="ArrayMesh" uid="uid://vkd0ty7khthl" path="res://map/items/food_processor_content.res" id="1_pyn0j"] +[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_0xb6r"] +resource_local_to_scene = true +cull_mode = 1 + [node name="FoodProcessorContent" type="MeshInstance3D"] transform = Transform3D(0.15, 0, 0, 0, 0.15, 0, 0, 0, 0.15, 0, 0.3, 0) mesh = ExtResource("1_pyn0j") skeleton = NodePath("") +surface_material_override/0 = SubResource("StandardMaterial3D_0xb6r") diff --git a/client/map/items/leek-pot.gd b/client/map/items/leek_pot.gd index 3e5b7def..3e5b7def 100644 --- a/client/map/items/leek-pot.gd +++ b/client/map/items/leek_pot.gd diff --git a/client/map/items/mochi_dough_pot.gd b/client/map/items/mochi_dough_pot.gd new file mode 100644 index 00000000..1b7e3e33 --- /dev/null +++ b/client/map/items/mochi_dough_pot.gd @@ -0,0 +1,21 @@ +# Hurry Curry! - a game about cooking +# Copyright 2024 nokoe +# +# 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 MochiDoughPot +extends PotFill + +func _init(owned_by_: Node3D): + super(owned_by_) + set_color(Color(1., 1., .3)) diff --git a/client/map/items/rice.gd b/client/map/items/rice.gd new file mode 100644 index 00000000..634cd565 --- /dev/null +++ b/client/map/items/rice.gd @@ -0,0 +1,21 @@ +# Hurry Curry! - a game about cooking +# Copyright 2024 nokoe +# +# 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 Rice +extends Item + +func _init(owned_by_: Node3D): + super(owned_by_) + base.add_child(load("res://map/items/rice.tscn").instantiate()) diff --git a/client/map/items/rice.res b/client/map/items/rice.res Binary files differnew file mode 100644 index 00000000..c9bbd9a9 --- /dev/null +++ b/client/map/items/rice.res diff --git a/client/map/items/rice.tscn b/client/map/items/rice.tscn new file mode 100644 index 00000000..bb41f3e8 --- /dev/null +++ b/client/map/items/rice.tscn @@ -0,0 +1,10 @@ +[gd_scene load_steps=2 format=3 uid="uid://rs4b17lp80cx"] + +[ext_resource type="ArrayMesh" uid="uid://cclj4k0d1d1qk" path="res://map/items/rice.res" id="1_fmn8b"] + +[node name="Rice" type="Node3D"] + +[node name="Mesh" type="MeshInstance3D" parent="."] +transform = Transform3D(0.1, 0, 0, 0, 0.1, 0, 0, 0, 0.1, 0, 0, 0) +mesh = ExtResource("1_fmn8b") +skeleton = NodePath("") diff --git a/client/map/items/rice_content.res b/client/map/items/rice_content.res Binary files differnew file mode 100644 index 00000000..0f5dd44d --- /dev/null +++ b/client/map/items/rice_content.res diff --git a/client/map/items/rice_content.tscn b/client/map/items/rice_content.tscn new file mode 100644 index 00000000..86b6e983 --- /dev/null +++ b/client/map/items/rice_content.tscn @@ -0,0 +1,12 @@ +[gd_scene load_steps=3 format=3 uid="uid://do4qxd1d1x7cc"] + +[ext_resource type="ArrayMesh" uid="uid://dfvubawp7vieh" path="res://map/items/rice_content.res" id="1_r5kmu"] + +[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_ce6yj"] +resource_local_to_scene = true + +[node name="RiceContent" type="MeshInstance3D"] +transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 0, 0, 0) +mesh = ExtResource("1_r5kmu") +skeleton = NodePath("") +surface_material_override/0 = SubResource("StandardMaterial3D_ce6yj") diff --git a/client/map/items/rice_flour_food_processor.gd b/client/map/items/rice_flour_food_processor.gd new file mode 100644 index 00000000..e70af0fc --- /dev/null +++ b/client/map/items/rice_flour_food_processor.gd @@ -0,0 +1,21 @@ +# Hurry Curry! - a game about cooking +# Copyright 2024 nokoe +# +# 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 RiceFlourFoodProcessor +extends FoodProcessorContent + +func _init(owned_by_: Node3D): + super(owned_by_) + set_color(Color(1., 1., .8)) diff --git a/client/map/items/rice_flour_pot.gd b/client/map/items/rice_flour_pot.gd new file mode 100644 index 00000000..ee5afccc --- /dev/null +++ b/client/map/items/rice_flour_pot.gd @@ -0,0 +1,21 @@ +# Hurry Curry! - a game about cooking +# Copyright 2024 nokoe +# +# 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 RiceFlourPot +extends PotFill + +func _init(owned_by_: Node3D): + super(owned_by_) + set_color(Color(1., 1., .8)) diff --git a/client/map/items/rice_food_processor.gd b/client/map/items/rice_food_processor.gd new file mode 100644 index 00000000..205a6c7b --- /dev/null +++ b/client/map/items/rice_food_processor.gd @@ -0,0 +1,22 @@ +# Hurry Curry! - a game about cooking +# Copyright 2024 nokoe +# +# 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 RiceFoodProcessor +extends FoodProcessor + +func _init(owned_by_: Node3D): + super(owned_by_) + processing.color = Color(1., 1., .8) + base.add_child(load("res://map/items/rice.tscn").instantiate()) diff --git a/client/map/items/rice_pot.gd b/client/map/items/rice_pot.gd new file mode 100644 index 00000000..42bcd166 --- /dev/null +++ b/client/map/items/rice_pot.gd @@ -0,0 +1,28 @@ +# Hurry Curry! - a game about cooking +# Copyright 2024 nokoe +# +# 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 RicePot +extends Pot + +var fill: MeshInstance3D = load("res://map/items/rice_content.tscn").instantiate() + +func _init(owned_by_: Node3D): + super(owned_by_) + set_color(Color(1., 1., .8)) + add_child(fill) + +func set_color(c: Color): + var mat: BaseMaterial3D = fill.get_active_material(0) + mat.albedo_color = c diff --git a/client/map/tile_factory.gd b/client/map/tile_factory.gd index ccad982e..a0dd2dca 100644 --- a/client/map/tile_factory.gd +++ b/client/map/tile_factory.gd @@ -84,6 +84,8 @@ static func produce(tile_name: String, node_name: String, neighbors: Array) -> T return CeilingLamp.new(node_name, neighbors) "street": return Street.new(node_name, neighbors) + "rice-crate": + return RiceCrate.new(node_name, neighbors) var t: push_warning("tile %s unknown" % t) return GenericTile.new(node_name, neighbors, t) diff --git a/client/map/tiles/rice_crate.gd b/client/map/tiles/rice_crate.gd new file mode 100644 index 00000000..7c596d44 --- /dev/null +++ b/client/map/tiles/rice_crate.gd @@ -0,0 +1,21 @@ +# Hurry Curry! - a game about cooking +# Copyright 2024 nokoe +# +# 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 RiceCrate +extends Crate + +func _init(rename: String, neighbors: Array): + super(rename, neighbors) + base.add_child(load("res://map/tiles/rice_crate.tscn").instantiate()) diff --git a/client/map/tiles/rice_crate.tscn b/client/map/tiles/rice_crate.tscn new file mode 100644 index 00000000..72c6c540 --- /dev/null +++ b/client/map/tiles/rice_crate.tscn @@ -0,0 +1,9 @@ +[gd_scene load_steps=3 format=3 uid="uid://bk0jvgj6xg23d"] + +[ext_resource type="PackedScene" uid="uid://xdui0oya4lpb" path="res://map/tiles/crate.tscn" id="1_wfea8"] +[ext_resource type="PackedScene" uid="uid://rs4b17lp80cx" path="res://map/items/rice.tscn" id="2_fbw0j"] + +[node name="RiceCrate" instance=ExtResource("1_wfea8")] + +[node name="Rice" parent="." index="1" instance=ExtResource("2_fbw0j")] +transform = Transform3D(3, 0, 0, 0, 2, 0, 0, 0, 3, 0, 0, 0) |