diff options
| -rw-r--r-- | client/map/item_factory.gd | 4 | ||||
| -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/processing.tscn | 2 | ||||
| -rw-r--r-- | client/map/items/tomato_food_processor.gd (renamed from client/map/items/tomat_food_processor.gd) | 0 | ||||
| -rw-r--r-- | client/map/tiles/flour_counter.gd | 12 | ||||
| -rw-r--r-- | client/map/tiles/oven.tscn | 20 | 
9 files changed, 74 insertions, 17 deletions
| diff --git a/client/map/item_factory.gd b/client/map/item_factory.gd index 1fa21b27..3a2c67f8 100644 --- a/client/map/item_factory.gd +++ b/client/map/item_factory.gd @@ -42,5 +42,9 @@ static func produce(name: String, owned_by: Node3D) -> Item:  			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/processing.tscn b/client/map/items/processing.tscn index 4904eb04..f8deb6be 100644 --- a/client/map/items/processing.tscn +++ b/client/map/items/processing.tscn @@ -17,7 +17,7 @@ mesh = SubResource("SphereMesh_baneh")  emission_shape = 6  emission_ring_axis = Vector3(0, 1, 0)  emission_ring_height = 0.2 -emission_ring_radius = 0.05 +emission_ring_radius = 0.1  emission_ring_inner_radius = 0.0  direction = Vector3(0, 1, 0)  spread = 180.0 diff --git a/client/map/items/tomat_food_processor.gd b/client/map/items/tomato_food_processor.gd index 4003e246..4003e246 100644 --- a/client/map/items/tomat_food_processor.gd +++ b/client/map/items/tomato_food_processor.gd 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"), | 
