aboutsummaryrefslogtreecommitdiff
path: root/client/map/items
diff options
context:
space:
mode:
Diffstat (limited to 'client/map/items')
-rw-r--r--client/map/items/glass.gd10
-rw-r--r--client/map/items/glass_fill.gd8
-rw-r--r--client/map/items/seared_steak.resbin14183 -> 14192 bytes
-rw-r--r--client/map/items/steak.resbin14014 -> 14012 bytes
4 files changed, 12 insertions, 6 deletions
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
index 68aaa171..aa4ac1d4 100644
--- a/client/map/items/seared_steak.res
+++ b/client/map/items/seared_steak.res
Binary files differ
diff --git a/client/map/items/steak.res b/client/map/items/steak.res
index f94e895c..8deb7f8a 100644
--- a/client/map/items/steak.res
+++ b/client/map/items/steak.res
Binary files differ