From 180b786bff761c9301898ca732d7bf24af6f14c7 Mon Sep 17 00:00:00 2001 From: tpart Date: Mon, 16 Sep 2024 15:47:08 +0200 Subject: Add cheese and sliced cheese models; Implement items --- client/map/item_factory.gd | 2 ++ client/map/items/cheese.gd | 21 +++++++++++++++++++++ client/map/items/cheese.res | Bin 0 -> 10028 bytes client/map/items/cheese.tscn | 10 ++++++++++ client/map/items/sliced_cheese.gd | 21 +++++++++++++++++++++ client/map/items/sliced_cheese.res | Bin 0 -> 3862 bytes client/map/items/sliced_cheese.tscn | 10 ++++++++++ 7 files changed, 64 insertions(+) create mode 100644 client/map/items/cheese.gd create mode 100644 client/map/items/cheese.res create mode 100644 client/map/items/cheese.tscn create mode 100644 client/map/items/sliced_cheese.gd create mode 100644 client/map/items/sliced_cheese.res create mode 100644 client/map/items/sliced_cheese.tscn (limited to 'client') diff --git a/client/map/item_factory.gd b/client/map/item_factory.gd index a1694cc0..31885cfe 100644 --- a/client/map/item_factory.gd +++ b/client/map/item_factory.gd @@ -25,6 +25,8 @@ static func produce(full_name: String, owned_by: Node3D) -> Item: match name: "bun": return Bun.new(owned_by) + "cheese": return Cheese.new(owned_by) + "sliced-cheese": return SlicedCheese.new(owned_by) "dirt": return Dirt.new(owned_by) "sliced-bun": return SlicedBun.new(owned_by) "sliced-bun-top": return SlicedBunTop.new(owned_by) diff --git a/client/map/items/cheese.gd b/client/map/items/cheese.gd new file mode 100644 index 00000000..b3d1bc89 --- /dev/null +++ b/client/map/items/cheese.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 Cheese +extends Item + +func _init(owned_by_: Node3D): + super(owned_by_) + base.add_child(load("res://map/items/cheese.tscn").instantiate()) diff --git a/client/map/items/cheese.res b/client/map/items/cheese.res new file mode 100644 index 00000000..6f868980 Binary files /dev/null and b/client/map/items/cheese.res differ diff --git a/client/map/items/cheese.tscn b/client/map/items/cheese.tscn new file mode 100644 index 00000000..515262c8 --- /dev/null +++ b/client/map/items/cheese.tscn @@ -0,0 +1,10 @@ +[gd_scene load_steps=2 format=3 uid="uid://0lbjf2sie4rk"] + +[ext_resource type="ArrayMesh" uid="uid://cshqtme8isvmw" path="res://map/items/cheese.res" id="1_p24nf"] + +[node name="Cheese" 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_p24nf") +skeleton = NodePath("") diff --git a/client/map/items/sliced_cheese.gd b/client/map/items/sliced_cheese.gd new file mode 100644 index 00000000..26673bad --- /dev/null +++ b/client/map/items/sliced_cheese.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 SlicedCheese +extends Item + +func _init(owned_by_: Node3D): + super(owned_by_) + base.add_child(load("res://map/items/sliced_cheese.tscn").instantiate()) diff --git a/client/map/items/sliced_cheese.res b/client/map/items/sliced_cheese.res new file mode 100644 index 00000000..ece9c0e0 Binary files /dev/null and b/client/map/items/sliced_cheese.res differ diff --git a/client/map/items/sliced_cheese.tscn b/client/map/items/sliced_cheese.tscn new file mode 100644 index 00000000..4e9ba406 --- /dev/null +++ b/client/map/items/sliced_cheese.tscn @@ -0,0 +1,10 @@ +[gd_scene load_steps=2 format=3 uid="uid://cfdfhxgo4ot7m"] + +[ext_resource type="ArrayMesh" uid="uid://2qsg2dadmf1y" path="res://map/items/sliced_cheese.res" id="1_bbycg"] + +[node name="SlicedCheese" type="Node3D"] + +[node name="Mesh" type="MeshInstance3D" parent="."] +transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 0, 0.04, 0) +mesh = ExtResource("1_bbycg") +skeleton = NodePath("") -- cgit v1.2.3-70-g09d2