diff options
Diffstat (limited to 'client')
-rw-r--r-- | client/map/item_factory.gd | 2 | ||||
-rw-r--r-- | client/map/items/glass.gd | 29 | ||||
-rw-r--r-- | client/map/items/glass.res | bin | 0 -> 12738 bytes | |||
-rw-r--r-- | client/map/items/glass.tscn | 10 |
4 files changed, 41 insertions, 0 deletions
diff --git a/client/map/item_factory.gd b/client/map/item_factory.gd index f7e0bdba..e92886a1 100644 --- a/client/map/item_factory.gd +++ b/client/map/item_factory.gd @@ -69,6 +69,8 @@ static func produce(name: String, owned_by: Node3D) -> Item: "tomato-foodprocessor": return FoodProcessorItems.TomatoF.new(owned_by) "tomato-juice-foodprocessor": return FoodProcessorItems.TomatoJuiceF.new(owned_by) + "glass": return Glass.new(owned_by) + "plate": return Plate.new(owned_by) "bread-slice-plate": return PlateItems.BreadSliceP.new(owned_by) "bread-slice-sliced-tomato-plate": return PlateItems.BreadSliceSlicedTomatoP.new(owned_by) diff --git a/client/map/items/glass.gd b/client/map/items/glass.gd new file mode 100644 index 00000000..e974abe9 --- /dev/null +++ b/client/map/items/glass.gd @@ -0,0 +1,29 @@ +# 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 Glass +extends Item + +func _init(owned_by_: Node3D): + super(owned_by_) + add_child(load("res://map/items/glass.tscn").instantiate()) + +func setup_sounds(): + # TODO: Add custom glass sounds; For now use plate sounds as they are similar + take_sound.setup([preload("res://map/items/sounds/plate_take.ogg")]) + put_sound.setup([preload("res://map/items/sounds/plate_put.ogg")]) + +#static func base_position() -> Vector3: +# return Vector3(0., 0.05, 0.) diff --git a/client/map/items/glass.res b/client/map/items/glass.res Binary files differnew file mode 100644 index 00000000..8386865f --- /dev/null +++ b/client/map/items/glass.res diff --git a/client/map/items/glass.tscn b/client/map/items/glass.tscn new file mode 100644 index 00000000..29bdda8b --- /dev/null +++ b/client/map/items/glass.tscn @@ -0,0 +1,10 @@ +[gd_scene load_steps=2 format=3 uid="uid://c875kaj4v7nfv"] + +[ext_resource type="ArrayMesh" uid="uid://dywkxdkny1urs" path="res://map/items/glass.res" id="1_v2eeu"] + +[node name="Glass" type="Node3D"] + +[node name="Mesh" type="MeshInstance3D" parent="."] +transform = Transform3D(0.125, 0, 0, 0, 0.125, 0, 0, 0, 0.125, 0, 0.125, 0) +mesh = ExtResource("1_v2eeu") +skeleton = NodePath("") |