From e469d27b2351fd6e8bac1989d15aeb523efb3bfe Mon Sep 17 00:00:00 2001 From: tpart Date: Mon, 16 Sep 2024 14:15:04 +0200 Subject: Implement dirt item --- client/map/item_factory.gd | 1 + client/map/items/dirt.gd | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 client/map/items/dirt.gd (limited to 'client/map') diff --git a/client/map/item_factory.gd b/client/map/item_factory.gd index ba57b97e..a1694cc0 100644 --- a/client/map/item_factory.gd +++ b/client/map/item_factory.gd @@ -25,6 +25,7 @@ static func produce(full_name: String, owned_by: Node3D) -> Item: match name: "bun": return Bun.new(owned_by) + "dirt": return Dirt.new(owned_by) "sliced-bun": return SlicedBun.new(owned_by) "sliced-bun-top": return SlicedBunTop.new(owned_by) "sliced-bun-bottom": return SlicedBunBottom.new(owned_by) diff --git a/client/map/items/dirt.gd b/client/map/items/dirt.gd new file mode 100644 index 00000000..ddf05b54 --- /dev/null +++ b/client/map/items/dirt.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 Dirt +extends Item + +func _init(owned_by_: Node3D): + super(owned_by_) + base.add_child(load("res://map/items/dirt.tscn").instantiate()) -- cgit v1.2.3-70-g09d2