diff options
| author | metamuffin <metamuffin@disroot.org> | 2024-08-19 13:07:50 +0200 | 
|---|---|---|
| committer | metamuffin <metamuffin@disroot.org> | 2024-08-19 13:07:50 +0200 | 
| commit | 317a358046830e6c23dce5d133880e8f86a5526f (patch) | |
| tree | 451259f627fb7f907e5dbe859afd10586a74f3c8 /client/map/items/pot_items.gd | |
| parent | 3e321f4e844d6517f21ea40b5c82bb33e7ed4334 (diff) | |
| download | hurrycurry-317a358046830e6c23dce5d133880e8f86a5526f.tar hurrycurry-317a358046830e6c23dce5d133880e8f86a5526f.tar.bz2 hurrycurry-317a358046830e6c23dce5d133880e8f86a5526f.tar.zst | |
merge pot and fp items into single files
Diffstat (limited to 'client/map/items/pot_items.gd')
| -rw-r--r-- | client/map/items/pot_items.gd | 92 | 
1 files changed, 92 insertions, 0 deletions
| diff --git a/client/map/items/pot_items.gd b/client/map/items/pot_items.gd new file mode 100644 index 00000000..65ee1bd8 --- /dev/null +++ b/client/map/items/pot_items.gd @@ -0,0 +1,92 @@ +# Hurry Curry! - a game about cooking +# Copyright 2024 metamuffin +# 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 PotItems + +class MochiDoughP extends PotFill: +	func _init(owned_by_: Node3D): +		super(owned_by_) +		set_color(Color(1.,1.,.3)) + +class RiceP extends Pot: +	var fill: MeshInstance3D = load("res://map/items/rice_content.tscn").instantiate() +	func _init(owned_by_: Node3D): +		super(owned_by_) +		set_color(Color(1.,1.,.8)) +		add_child(fill) +	func set_color(c: Color): +		var mat: BaseMaterial3D = fill.get_active_material(0) +		mat.albedo_color = c + +class RiceFlourP extends PotFill: +	func _init(owned_by_: Node3D): +		super(owned_by_) +		set_color(Color(1.,1.,.8)) + +class TomatoJuiceP extends PotFill: +	func _init(owned_by_: Node3D): +		super(owned_by_) +		set_color(Color(1.,0.,0.)) + +class TomatoSoupP extends PotFill: +	func _init(owned_by_: Node3D): +		super(owned_by_) +		set_color(Color(1.,.3, .2)) + +class RawSteakP extends Pot: +	func _init(owned_by_: Node3D): +		super(owned_by_) +		base.add_child(preload("res://map/items/raw_steak.tscn").instantiate()) + +	func progress(p: float, warn: bool): +		super(p, warn) +		if sound_id == null: +			sound_id = Sound.item_progress(self, preload("res://map/items/sounds/frying.ogg"), null) + +class LeekP extends Pot: +	func _init(owned_by_: Node3D): +		super(owned_by_) +		var leek: Node3D = load("res://map/items/leek.tscn").instantiate() +		leek.rotation_degrees = Vector3(14.5, 0, -25) +		leek.position.x = .03 +		base.add_child(leek) + +class LeekTomatoJuiceP extends TomatoJuiceP: +	func _init(owned_by_: Node3D): +		super(owned_by_) +		var leek: Node3D = load("res://map/items/leek.tscn").instantiate() +		leek.rotation_degrees = Vector3(14.5, 0, -25) +		leek.position.x = .03 +		base.add_child(leek) + +class CookedRice extends RiceP: +	func _init(owned_by_: Node3D): +		super(owned_by_) +		set_color(Color(1.,1.,1.)) + +class BurnedP extends PotFill: +	func _init(owned_by_: Node3D): +		super(owned_by_) +		steam.color = Color(0.,0.,0.) +		set_color(Color(.1, .1, .1)) + +	func _ready(): +		steam.emitting = true + +class SteakP extends Pot: +	func _init(owned_by_: Node3D): +		super(owned_by_) +		base.add_child(load("res://map/items/steak.tscn").instantiate()) | 
