From 389ab241b8e83bd591419eccc608ee3fb545e4a0 Mon Sep 17 00:00:00 2001 From: tpart Date: Fri, 13 Sep 2024 21:37:44 +0200 Subject: Add lettuce and sliced lettuce models; Implement items --- client/map/item_factory.gd | 4 +++- client/map/items/lettuce.gd | 21 +++++++++++++++++++++ client/map/items/lettuce.res | Bin 0 -> 17892 bytes client/map/items/lettuce.tscn | 10 ++++++++++ client/map/items/sliced_lettuce.gd | 21 +++++++++++++++++++++ client/map/items/sliced_lettuce.res | Bin 0 -> 5178 bytes client/map/items/sliced_lettuce.tscn | 10 ++++++++++ 7 files changed, 65 insertions(+), 1 deletion(-) create mode 100644 client/map/items/lettuce.gd create mode 100644 client/map/items/lettuce.res create mode 100644 client/map/items/lettuce.tscn create mode 100644 client/map/items/sliced_lettuce.gd create mode 100644 client/map/items/sliced_lettuce.res create mode 100644 client/map/items/sliced_lettuce.tscn (limited to 'client/map') diff --git a/client/map/item_factory.gd b/client/map/item_factory.gd index 38d9f1c0..97edd66f 100644 --- a/client/map/item_factory.gd +++ b/client/map/item_factory.gd @@ -42,9 +42,11 @@ static func produce(full_name: String, owned_by: Node3D) -> Item: "seared-patty": return SearedPatty.new(owned_by) "rice": return Rice.new(owned_by) "sliced-fish": return SlicedFish.new(owned_by) - "sliced-tomato": return SlicedTomato.new(owned_by) "strawberry": return Strawberry.new(owned_by) "tomato": return Tomato.new(owned_by) + "sliced-tomato": return SlicedTomato.new(owned_by) + "lettuce": return Lettuce.new(owned_by) + "sliced-lettuce": return SlicedLettuce.new(owned_by) "pot": return Pot.new(owned_by, contents) "foodprocessor": return FoodProcessor.new(owned_by, contents) diff --git a/client/map/items/lettuce.gd b/client/map/items/lettuce.gd new file mode 100644 index 00000000..fef657dc --- /dev/null +++ b/client/map/items/lettuce.gd @@ -0,0 +1,21 @@ +# 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 . +# +class_name Lettuce +extends Item + +func _init(owned_by_: Node3D): + super(owned_by_) + base.add_child(load("res://map/items/lettuce.tscn").instantiate()) diff --git a/client/map/items/lettuce.res b/client/map/items/lettuce.res new file mode 100644 index 00000000..0ae1a660 Binary files /dev/null and b/client/map/items/lettuce.res differ diff --git a/client/map/items/lettuce.tscn b/client/map/items/lettuce.tscn new file mode 100644 index 00000000..c4ca7cb9 --- /dev/null +++ b/client/map/items/lettuce.tscn @@ -0,0 +1,10 @@ +[gd_scene load_steps=2 format=3 uid="uid://cuf8vwqk6xujk"] + +[ext_resource type="ArrayMesh" uid="uid://cyomlupimgm43" path="res://map/items/lettuce.res" id="1_axcdp"] + +[node name="Lettuce" 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_axcdp") +skeleton = NodePath("") diff --git a/client/map/items/sliced_lettuce.gd b/client/map/items/sliced_lettuce.gd new file mode 100644 index 00000000..18f27fff --- /dev/null +++ b/client/map/items/sliced_lettuce.gd @@ -0,0 +1,21 @@ +# 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 . +# +class_name SlicedLettuce +extends Item + +func _init(owned_by_: Node3D): + super(owned_by_) + base.add_child(load("res://map/items/sliced_lettuce.tscn").instantiate()) diff --git a/client/map/items/sliced_lettuce.res b/client/map/items/sliced_lettuce.res new file mode 100644 index 00000000..4680f32b Binary files /dev/null and b/client/map/items/sliced_lettuce.res differ diff --git a/client/map/items/sliced_lettuce.tscn b/client/map/items/sliced_lettuce.tscn new file mode 100644 index 00000000..3fb675c6 --- /dev/null +++ b/client/map/items/sliced_lettuce.tscn @@ -0,0 +1,10 @@ +[gd_scene load_steps=2 format=3 uid="uid://c8tjoqcdn1gpj"] + +[ext_resource type="ArrayMesh" uid="uid://jkb0e8d584uo" path="res://map/items/sliced_lettuce.res" id="1_y7x7n"] + +[node name="SlicedLettuce" 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_y7x7n") +skeleton = NodePath("") -- cgit v1.2.3-70-g09d2