diff options
author | tpart <tpart120@proton.me> | 2024-09-16 14:15:04 +0200 |
---|---|---|
committer | tpart <tpart120@proton.me> | 2024-09-16 14:15:05 +0200 |
commit | e469d27b2351fd6e8bac1989d15aeb523efb3bfe (patch) | |
tree | 17d5c41120ad6e757f6ff29715e907b00963b9d1 /client/map | |
parent | 2700a246df66e17c745f03b4a7b809dbb97ac083 (diff) | |
download | hurrycurry-e469d27b2351fd6e8bac1989d15aeb523efb3bfe.tar hurrycurry-e469d27b2351fd6e8bac1989d15aeb523efb3bfe.tar.bz2 hurrycurry-e469d27b2351fd6e8bac1989d15aeb523efb3bfe.tar.zst |
Implement dirt item
Diffstat (limited to 'client/map')
-rw-r--r-- | client/map/item_factory.gd | 1 | ||||
-rw-r--r-- | client/map/items/dirt.gd | 21 |
2 files changed, 22 insertions, 0 deletions
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 <https://www.gnu.org/licenses/>. +# +class_name Dirt +extends Item + +func _init(owned_by_: Node3D): + super(owned_by_) + base.add_child(load("res://map/items/dirt.tscn").instantiate()) |