diff options
| author | tpart <tpart120@proton.me> | 2024-09-19 16:42:10 +0200 | 
|---|---|---|
| committer | tpart <tpart120@proton.me> | 2024-09-19 16:42:10 +0200 | 
| commit | 1e9607acef238a9682e580706fe5b62dd5e1d864 (patch) | |
| tree | fc2d422f9eb5d5f0ffa1e65cf591cba7b1265c7f /client/map | |
| parent | fb5f95959dd69bf96fb433c682424c57cb38d0c5 (diff) | |
| download | hurrycurry-1e9607acef238a9682e580706fe5b62dd5e1d864.tar hurrycurry-1e9607acef238a9682e580706fe5b62dd5e1d864.tar.bz2 hurrycurry-1e9607acef238a9682e580706fe5b62dd5e1d864.tar.zst | |
Fix: Steak with bun not displayed correctly (#132)
Diffstat (limited to 'client/map')
| -rw-r--r-- | client/map/items/plate.gd | 15 | 
1 files changed, 15 insertions, 0 deletions
| diff --git a/client/map/items/plate.gd b/client/map/items/plate.gd index d081450e..b3f9ff58 100644 --- a/client/map/items/plate.gd +++ b/client/map/items/plate.gd @@ -27,6 +27,11 @@ func _init(owned_by_: Node3D, contents: Array):  		contents.push_front("sliced-bun-bottom")  		contents.push_back("sliced-bun-top") +	# Seared steak should be small if combined with other items +	if contents.has("seared-steak") and contents.size() > 1: +		contents.erase("seared-steak") +		contents.append("seared-steak-small") +	  	# Stack content items on top of each other  	var height_sum := 0.  	for c in contents: @@ -35,6 +40,16 @@ func _init(owned_by_: Node3D, contents: Array):  			"curry": add_child(PlateFill.new(self, Color(.75, .45, .1)))  			"cooked-rice": add_child(load("res://map/items/cooked_rice_fill.tscn").instantiate())  			"tomato-soup": add_child(PlateFill.new(self, Color(1., .3, .2))) +			"bun": +				var bun = ItemFactory.produce(c, base) +				base.add_child(bun) +				bun.scale *= 0.5 +				bun.position += Vector3(-.1, 0, -.1) +			"seared-steak-small": +				var seared_steak = ItemFactory.produce("seared-steak", base) +				base.add_child(seared_steak) +				seared_steak.scale *= 0.5 +				seared_steak.position += Vector3(.1, 0, .1)  			_: item = ItemFactory.produce(c, base)  		if item != null:  			base.add_child(item) | 
