diff options
Diffstat (limited to 'client')
-rw-r--r-- | client/map/item_factory.gd | 2 | ||||
-rw-r--r-- | client/map/items/mochi.gd | 8 | ||||
-rw-r--r-- | client/map/items/mochi_items.gd | 21 |
3 files changed, 4 insertions, 27 deletions
diff --git a/client/map/item_factory.gd b/client/map/item_factory.gd index 3a97af6e..b91a0da0 100644 --- a/client/map/item_factory.gd +++ b/client/map/item_factory.gd @@ -38,7 +38,7 @@ static func produce(full_name: String, owned_by: Node3D) -> Item: "flour": return Flour.new(owned_by) "leek": return Leek.new(owned_by) "strawberry-icecream": return Icecream.new(owned_by, Color(.98, .55, .71)) - "strawberry-mochi": return MochiItems.StrawberryM.new(owned_by) + "strawberry-mochi": return Mochi.new(owned_by, Color(.98, .70, .75)) "nigiri": return Nigiri.new(owned_by) "steak": return Steak.new(owned_by) "seared-steak": return SearedSteak.new(owned_by) diff --git a/client/map/items/mochi.gd b/client/map/items/mochi.gd index 77e0ca41..3f873d10 100644 --- a/client/map/items/mochi.gd +++ b/client/map/items/mochi.gd @@ -18,10 +18,8 @@ extends Item var model: MeshInstance3D = load("res://map/items/mochi.tscn").instantiate() -func _init(owned_by_: Node3D): +func _init(owned_by_: Node3D, color: Color): super(owned_by_) - add_child(model) - -func set_color(c: Color): var mat: BaseMaterial3D = model.get_active_material(0) - mat.albedo_color = c + mat.albedo_color = color + base.add_child(model) diff --git a/client/map/items/mochi_items.gd b/client/map/items/mochi_items.gd deleted file mode 100644 index 2759f228..00000000 --- a/client/map/items/mochi_items.gd +++ /dev/null @@ -1,21 +0,0 @@ -# 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 MochiItems - -class StrawberryM extends Mochi: - func _init(owned_by_: Node3D): - super(owned_by_) - set_color(Color(.98, .70, .75)) |