diff options
| author | metamuffin <metamuffin@disroot.org> | 2024-06-24 20:35:33 +0200 | 
|---|---|---|
| committer | metamuffin <metamuffin@disroot.org> | 2024-06-24 20:35:33 +0200 | 
| commit | f59a19f24371e0f33a82ca8c290c0dd1d24e0607 (patch) | |
| tree | e4de37fa2f3c2384c86d413158ea41c7a5f9dff7 | |
| parent | 7c15d7c2ae45c1694cb6b6def98ad5c79a414d08 (diff) | |
| parent | 97a18ef35a4f4808f44d407836167c664a35a462 (diff) | |
| download | hurrycurry-f59a19f24371e0f33a82ca8c290c0dd1d24e0607.tar hurrycurry-f59a19f24371e0f33a82ca8c290c0dd1d24e0607.tar.bz2 hurrycurry-f59a19f24371e0f33a82ca8c290c0dd1d24e0607.tar.zst | |
Merge branch 'master' of codeberg.org:metamuffin/undercooked
| -rw-r--r-- | client/map/item_factory.gd | 10 | ||||
| -rw-r--r-- | client/map/items/flour.gd | 21 | ||||
| -rw-r--r-- | client/map/items/flour.res | bin | 0 -> 2775 bytes | |||
| -rw-r--r-- | client/map/items/flour.tscn | 10 | ||||
| -rw-r--r-- | client/map/items/flour_food_processor.gd | 22 | ||||
| -rw-r--r-- | client/map/items/food_processor.gd | 36 | ||||
| -rw-r--r-- | client/map/items/food_processor.res | bin | 0 -> 23961 bytes | |||
| -rw-r--r-- | client/map/items/food_processor.tscn | 10 | ||||
| -rw-r--r-- | client/map/items/food_processor_content.gd | 27 | ||||
| -rw-r--r-- | client/map/items/food_processor_content.res | bin | 0 -> 3141 bytes | |||
| -rw-r--r-- | client/map/items/food_processor_content.tscn | 8 | ||||
| -rw-r--r-- | client/map/items/processing.tscn | 26 | ||||
| -rw-r--r-- | client/map/items/tomato_food_processor.gd | 22 | ||||
| -rw-r--r-- | client/map/items/tomato_juice_food_processor.gd | 21 | ||||
| -rw-r--r-- | client/map/tiles/flour_counter.gd | 12 | ||||
| -rw-r--r-- | client/map/tiles/oven.tscn | 20 | 
16 files changed, 229 insertions, 16 deletions
| diff --git a/client/map/item_factory.gd b/client/map/item_factory.gd index fb27a5e0..3a2c67f8 100644 --- a/client/map/item_factory.gd +++ b/client/map/item_factory.gd @@ -36,5 +36,15 @@ static func produce(name: String, owned_by: Node3D) -> Item:  			return SteakPot.new(owned_by)  		"steak-plate":  			return SteakPlate.new(owned_by) +		"foodprocessor": +			return FoodProcessor.new(owned_by) +		"tomato-foodprocessor": +			return TomatoFoodProcessor.new(owned_by) +		"tomato-juice-foodprocessor": +			return TomatoJuiceFoodProcessor.new(owned_by) +		"flour": +			return Flour.new(owned_by) +		"flour-foodprocessor": +			return FlourFoodProcessor.new(owned_by)  		var t:  			return GenericItem.new(owned_by, t) diff --git a/client/map/items/flour.gd b/client/map/items/flour.gd new file mode 100644 index 00000000..1cb52ee8 --- /dev/null +++ b/client/map/items/flour.gd @@ -0,0 +1,21 @@ +# Undercooked - 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 Flour +extends Item + +func _init(owned_by_: Node3D): +	super(owned_by_) +	base.add_child(load("res://map/items/flour.tscn").instantiate()) diff --git a/client/map/items/flour.res b/client/map/items/flour.resBinary files differ new file mode 100644 index 00000000..19f2db82 --- /dev/null +++ b/client/map/items/flour.res diff --git a/client/map/items/flour.tscn b/client/map/items/flour.tscn new file mode 100644 index 00000000..c283eae5 --- /dev/null +++ b/client/map/items/flour.tscn @@ -0,0 +1,10 @@ +[gd_scene load_steps=2 format=3 uid="uid://dgo8cknr1o6ml"] + +[ext_resource type="ArrayMesh" uid="uid://b76c6o88lkei2" path="res://map/items/flour.res" id="1_55ndm"] + +[node name="Flour" type="Node3D"] + +[node name="Mesh" type="MeshInstance3D" parent="."] +transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 0, 0, 0) +mesh = ExtResource("1_55ndm") +skeleton = NodePath("") diff --git a/client/map/items/flour_food_processor.gd b/client/map/items/flour_food_processor.gd new file mode 100644 index 00000000..24ad976c --- /dev/null +++ b/client/map/items/flour_food_processor.gd @@ -0,0 +1,22 @@ +# Undercooked - 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 FlourFoodProcessor +extends FoodProcessor + +func _init(owned_by_: Node3D): +	super(owned_by_) +	processing.color = Color(.9, .9, .9) +	base.add_child(load("res://map/items/flour.tscn").instantiate()) diff --git a/client/map/items/food_processor.gd b/client/map/items/food_processor.gd new file mode 100644 index 00000000..1be3d591 --- /dev/null +++ b/client/map/items/food_processor.gd @@ -0,0 +1,36 @@ +# Undercooked - 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 FoodProcessor +extends Item + +var processing: CPUParticles3D = load("res://map/items/processing.tscn").instantiate() + +func _init(owned_by_: Node3D): +	super(owned_by_) +	add_child(load("res://map/items/food_processor.tscn").instantiate()) +	add_child(processing) + +func progress(p: float, warn: bool): +	super(p, warn) +	processing.emitting = true +	processing.rotation.y += p * TAU + +func finish(warn: bool): +	super(warn) +	processing.emitting = false + +static func base_position() -> Vector3: +	return Vector3(0., 0.4, 0.) diff --git a/client/map/items/food_processor.res b/client/map/items/food_processor.resBinary files differ new file mode 100644 index 00000000..8c0e26de --- /dev/null +++ b/client/map/items/food_processor.res diff --git a/client/map/items/food_processor.tscn b/client/map/items/food_processor.tscn new file mode 100644 index 00000000..bb95d580 --- /dev/null +++ b/client/map/items/food_processor.tscn @@ -0,0 +1,10 @@ +[gd_scene load_steps=2 format=3 uid="uid://daxjpvycs85ec"] + +[ext_resource type="ArrayMesh" uid="uid://bpjl5dlst6yg" path="res://map/items/food_processor.res" id="1_65ilg"] + +[node name="FoodProcessor" type="Node3D"] + +[node name="FoodProcessor" type="MeshInstance3D" parent="."] +transform = Transform3D(0.15, 0, 0, 0, 0.15, 0, 0, 0, 0.15, 0, 0.3, 0) +mesh = ExtResource("1_65ilg") +skeleton = NodePath("") diff --git a/client/map/items/food_processor_content.gd b/client/map/items/food_processor_content.gd new file mode 100644 index 00000000..ee8edc1c --- /dev/null +++ b/client/map/items/food_processor_content.gd @@ -0,0 +1,27 @@ +# Undercooked - 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 FoodProcessorContent +extends FoodProcessor + +var content: MeshInstance3D = load("res://map/items/food_processor_content.tscn").instantiate() + +func _init(owned_by_: Node3D): +	super(owned_by_) +	add_child(content) + +func set_color(c: Color): +	var mat: BaseMaterial3D = content.get_active_material(0) +	mat.albedo_color = c diff --git a/client/map/items/food_processor_content.res b/client/map/items/food_processor_content.resBinary files differ new file mode 100644 index 00000000..7511cc75 --- /dev/null +++ b/client/map/items/food_processor_content.res diff --git a/client/map/items/food_processor_content.tscn b/client/map/items/food_processor_content.tscn new file mode 100644 index 00000000..1ae6dba4 --- /dev/null +++ b/client/map/items/food_processor_content.tscn @@ -0,0 +1,8 @@ +[gd_scene load_steps=2 format=3 uid="uid://di5nq2vgvostp"] + +[ext_resource type="ArrayMesh" uid="uid://vkd0ty7khthl" path="res://map/items/food_processor_content.res" id="1_pyn0j"] + +[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("") diff --git a/client/map/items/processing.tscn b/client/map/items/processing.tscn new file mode 100644 index 00000000..f8deb6be --- /dev/null +++ b/client/map/items/processing.tscn @@ -0,0 +1,26 @@ +[gd_scene load_steps=3 format=3 uid="uid://sk5i14bxi0qr"] + +[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_tqrr3"] +vertex_color_use_as_albedo = true + +[sub_resource type="SphereMesh" id="SphereMesh_baneh"] +material = SubResource("StandardMaterial3D_tqrr3") +radius = 0.1 +height = 0.2 + +[node name="Processing" type="CPUParticles3D"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.6, 0) +emitting = false +amount = 15 +local_coords = true +mesh = SubResource("SphereMesh_baneh") +emission_shape = 6 +emission_ring_axis = Vector3(0, 1, 0) +emission_ring_height = 0.2 +emission_ring_radius = 0.1 +emission_ring_inner_radius = 0.0 +direction = Vector3(0, 1, 0) +spread = 180.0 +gravity = Vector3(0, 0, 0) +scale_amount_min = 0.75 +scale_amount_max = 1.1 diff --git a/client/map/items/tomato_food_processor.gd b/client/map/items/tomato_food_processor.gd new file mode 100644 index 00000000..4003e246 --- /dev/null +++ b/client/map/items/tomato_food_processor.gd @@ -0,0 +1,22 @@ +# Undercooked - 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 TomatoFoodProcessor +extends FoodProcessor + +func _init(owned_by_: Node3D): +	super(owned_by_) +	processing.color = Color(1., 0., 0.) +	base.add_child(load("res://map/items/tomato.tscn").instantiate()) diff --git a/client/map/items/tomato_juice_food_processor.gd b/client/map/items/tomato_juice_food_processor.gd new file mode 100644 index 00000000..d1fe9c7c --- /dev/null +++ b/client/map/items/tomato_juice_food_processor.gd @@ -0,0 +1,21 @@ +# Undercooked - 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 TomatoJuiceFoodProcessor +extends FoodProcessorContent + +func _init(owned_by_: Node3D): +	super(owned_by_) +	set_color(Color(1., 0., 0.)) diff --git a/client/map/tiles/flour_counter.gd b/client/map/tiles/flour_counter.gd index 237d0c66..a767f2a9 100644 --- a/client/map/tiles/flour_counter.gd +++ b/client/map/tiles/flour_counter.gd @@ -18,9 +18,9 @@ extends CounterBase  func _init(rename: String, neighbors: Array):  	super(rename, neighbors) -	# var bag = load("res://models/prefabs/map/bag.tscn").instantiate() -	# # this is supposed to be overridden -	# @warning_ignore("static_called_on_instance") -	# bag.position = interact_target() -	# bag.rotation_degrees.y = 45 -	# base.add_child(bag) +	var bag = load("res://map/items/flour.tscn").instantiate() +	# this is supposed to be overridden +	@warning_ignore("static_called_on_instance") +	bag.position = interact_target() +	bag.rotation_degrees.y = 45 +	base.add_child(bag) diff --git a/client/map/tiles/oven.tscn b/client/map/tiles/oven.tscn index 44535678..106d8c28 100644 --- a/client/map/tiles/oven.tscn +++ b/client/map/tiles/oven.tscn @@ -4,6 +4,16 @@  [ext_resource type="ArrayMesh" uid="uid://blc1q50d5ky86" path="res://map/tiles/oven_base.res" id="1_d1hwl"]  [ext_resource type="ArrayMesh" uid="uid://blb5oew3sh7ek" path="res://map/tiles/oven_door.res" id="2_i5vso"] +[sub_resource type="Animation" id="Animation_yo2v1"] +length = 0.001 +tracks/0/type = "rotation_3d" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Base/Door") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = PackedFloat32Array(0, 1, 0, 0, 0, 1) +  [sub_resource type="Animation" id="Animation_yb3ht"]  resource_name = "open"  length = 0.5 @@ -22,16 +32,6 @@ tracks/1/interp = 2  tracks/1/loop_wrap = true  tracks/1/keys = PackedFloat32Array(0, 1, 1, 1, 1, 0.1, 1, 1, 1, 1, 0.2, 1, 1, 1, 1, 0.4, 1, 1, 1, 1) -[sub_resource type="Animation" id="Animation_yo2v1"] -length = 0.001 -tracks/0/type = "rotation_3d" -tracks/0/imported = false -tracks/0/enabled = true -tracks/0/path = NodePath("Base/Door") -tracks/0/interp = 1 -tracks/0/loop_wrap = true -tracks/0/keys = PackedFloat32Array(0, 1, 0, 0, 0, 1) -  [sub_resource type="AnimationLibrary" id="AnimationLibrary_io5nw"]  _data = {  "RESET": SubResource("Animation_yo2v1"), | 
