diff options
author | tpart <tpart120@proton.me> | 2024-08-19 17:53:17 +0200 |
---|---|---|
committer | tpart <tpart120@proton.me> | 2024-08-19 17:53:21 +0200 |
commit | 2916d8af9b6458dd97fe313c7775f4780ee6c82d (patch) | |
tree | eeed9b7be99c010151fb68b71e42c844b96eeeb5 /client/map/items/glass_fill.gd | |
parent | 947ea54a0dfe0093f658c371dc1a8aef3df61b61 (diff) | |
download | hurrycurry-2916d8af9b6458dd97fe313c7775f4780ee6c82d.tar hurrycurry-2916d8af9b6458dd97fe313c7775f4780ee6c82d.tar.bz2 hurrycurry-2916d8af9b6458dd97fe313c7775f4780ee6c82d.tar.zst |
Add glass fill item & Implement water glass
Diffstat (limited to 'client/map/items/glass_fill.gd')
-rw-r--r-- | client/map/items/glass_fill.gd | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/client/map/items/glass_fill.gd b/client/map/items/glass_fill.gd new file mode 100644 index 00000000..8b1e18f0 --- /dev/null +++ b/client/map/items/glass_fill.gd @@ -0,0 +1,27 @@ +# Hurry Curry! - a game about cooking +# Copyright 2024 nokoe +# +# 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 GlassFill +extends Glass + +var fill: MeshInstance3D = load("res://map/items/glass_fill.tscn").instantiate() + +func _init(owned_by_: Node3D): + super(owned_by_) + add_child(fill) + +func set_color(c: Color): + var mat: BaseMaterial3D = fill.get_active_material(0) + mat.albedo_color = c |