From 7d43a12644a27bec2d4344f00bee79eddf888a77 Mon Sep 17 00:00:00 2001 From: tpart Date: Sat, 7 Sep 2024 18:34:52 +0200 Subject: Add sliced bun model & Implement item --- client/map/item_factory.gd | 1 + client/map/items/sliced_bun.gd | 21 +++++++++++++++++++++ client/map/items/sliced_bun.tscn | 16 ++++++++++++++++ client/map/items/sliced_bun_bottom.res | Bin 0 -> 6662 bytes client/map/items/sliced_bun_top.res | Bin 0 -> 11225 bytes 5 files changed, 38 insertions(+) create mode 100644 client/map/items/sliced_bun.gd create mode 100644 client/map/items/sliced_bun.tscn create mode 100644 client/map/items/sliced_bun_bottom.res create mode 100644 client/map/items/sliced_bun_top.res (limited to 'client') diff --git a/client/map/item_factory.gd b/client/map/item_factory.gd index 9ababd3a..8a2d8b5a 100644 --- a/client/map/item_factory.gd +++ b/client/map/item_factory.gd @@ -21,6 +21,7 @@ static func produce(name: String, owned_by: Node3D) -> Item: match name: "bread-slice": return BreadSlice.new(owned_by) "bun": return Bun.new(owned_by) + "sliced-bun": return SlicedBun.new(owned_by) "bread": return Bread.new(owned_by) "burned": return Burned.new(owned_by) "coconut": return Coconut.new(owned_by) diff --git a/client/map/items/sliced_bun.gd b/client/map/items/sliced_bun.gd new file mode 100644 index 00000000..40c0c014 --- /dev/null +++ b/client/map/items/sliced_bun.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 SlicedBun +extends Item + +func _init(owned_by_: Node3D): + super(owned_by_) + base.add_child(load("res://map/items/sliced_bun.tscn").instantiate()) diff --git a/client/map/items/sliced_bun.tscn b/client/map/items/sliced_bun.tscn new file mode 100644 index 00000000..961d0f70 --- /dev/null +++ b/client/map/items/sliced_bun.tscn @@ -0,0 +1,16 @@ +[gd_scene load_steps=3 format=3 uid="uid://cm88wpf64l4fu"] + +[ext_resource type="ArrayMesh" uid="uid://c1qyv55xpv30n" path="res://map/items/sliced_bun_bottom.res" id="1_plvi5"] +[ext_resource type="ArrayMesh" uid="uid://dy180cecs6rb1" path="res://map/items/sliced_bun_top.res" id="2_l6cg2"] + +[node name="SlicedBun" type="Node3D"] + +[node name="MeshBottom" type="MeshInstance3D" parent="."] +transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 0, 0, 0) +mesh = ExtResource("1_plvi5") +skeleton = NodePath("") + +[node name="MeshTop" type="MeshInstance3D" parent="."] +transform = Transform3D(0.433013, 0.25, 0, -0.25, 0.433013, 0, 0, 0, 0.5, 0.18, 0.08, 0) +mesh = ExtResource("2_l6cg2") +skeleton = NodePath("") diff --git a/client/map/items/sliced_bun_bottom.res b/client/map/items/sliced_bun_bottom.res new file mode 100644 index 00000000..df7bab99 Binary files /dev/null and b/client/map/items/sliced_bun_bottom.res differ diff --git a/client/map/items/sliced_bun_top.res b/client/map/items/sliced_bun_top.res new file mode 100644 index 00000000..fc88dcbe Binary files /dev/null and b/client/map/items/sliced_bun_top.res differ -- cgit v1.2.3-70-g09d2