diff options
author | tpart <tpart120@proton.me> | 2024-09-13 19:07:31 +0200 |
---|---|---|
committer | tpart <tpart120@proton.me> | 2024-09-13 19:07:31 +0200 |
commit | 5e95797d7cff71c261f0c97c3c1fe96882b89650 (patch) | |
tree | c2b95f7aa5b89c893854b961ca4763b9befc75cb /client/map | |
parent | 08f94a71a66999c95a4382d08978ee78fb786132 (diff) | |
download | hurrycurry-5e95797d7cff71c261f0c97c3c1fe96882b89650.tar hurrycurry-5e95797d7cff71c261f0c97c3c1fe96882b89650.tar.bz2 hurrycurry-5e95797d7cff71c261f0c97c3c1fe96882b89650.tar.zst |
Re-implement glass fill; Update steaks because godot keeps changing it back
Diffstat (limited to 'client/map')
-rw-r--r-- | client/map/item_factory.gd | 2 | ||||
-rw-r--r-- | client/map/items/glass.gd | 10 | ||||
-rw-r--r-- | client/map/items/glass_fill.gd | 8 | ||||
-rw-r--r-- | client/map/items/seared_steak.res | bin | 14183 -> 14192 bytes | |||
-rw-r--r-- | client/map/items/steak.res | bin | 14014 -> 14012 bytes |
5 files changed, 13 insertions, 7 deletions
diff --git a/client/map/item_factory.gd b/client/map/item_factory.gd index 8f0d6d85..ce5e3710 100644 --- a/client/map/item_factory.gd +++ b/client/map/item_factory.gd @@ -49,4 +49,4 @@ static func produce(full_name: String, owned_by: Node3D) -> Item: "glass": return Glass.new(owned_by, contents) "plate": return Plate.new(owned_by, contents) - _: return GenericItem.new(owned_by, full_name) + _: return GenericItem.new(owned_by, name) diff --git a/client/map/items/glass.gd b/client/map/items/glass.gd index 2e2452f6..e64cb2a0 100644 --- a/client/map/items/glass.gd +++ b/client/map/items/glass.gd @@ -19,7 +19,15 @@ extends Item func _init(owned_by_: Node3D, contents: Array): super(owned_by_) add_child(load("res://map/items/glass.tscn").instantiate()) - # TODO + + for i in contents: + var item: Item + match i: + "water": item = GlassFill.new(self, Color(.5, .6, .8)) + "strawberry-shake": item = GlassFill.new(self, Color(.98, .55, .71)) + _: push_error("Glass fill not implemented: %s" % contents) + + base.add_child(item) func setup_sounds(): # TODO: Add custom glass sounds; For now use plate sounds as they are similar diff --git a/client/map/items/glass_fill.gd b/client/map/items/glass_fill.gd index 8b1e18f0..dc03f784 100644 --- a/client/map/items/glass_fill.gd +++ b/client/map/items/glass_fill.gd @@ -14,14 +14,12 @@ # along with this program. If not, see <https://www.gnu.org/licenses/>. # class_name GlassFill -extends Glass +extends Item var fill: MeshInstance3D = load("res://map/items/glass_fill.tscn").instantiate() -func _init(owned_by_: Node3D): +func _init(owned_by_: Node3D, c: Color): super(owned_by_) - add_child(fill) - -func set_color(c: Color): var mat: BaseMaterial3D = fill.get_active_material(0) mat.albedo_color = c + add_child(fill) diff --git a/client/map/items/seared_steak.res b/client/map/items/seared_steak.res Binary files differindex 68aaa171..aa4ac1d4 100644 --- a/client/map/items/seared_steak.res +++ b/client/map/items/seared_steak.res diff --git a/client/map/items/steak.res b/client/map/items/steak.res Binary files differindex f94e895c..8deb7f8a 100644 --- a/client/map/items/steak.res +++ b/client/map/items/steak.res |