Small fixes

This commit is contained in:
Rendo 2026-07-01 09:42:21 +05:00
commit 1e3ed6a55d
11 changed files with 92 additions and 12 deletions

View file

@ -2,17 +2,16 @@ extends GPUParticles3D
@export var inventory: Inventory
@export var particles: GPUParticles3D
var tween: Tween
func _on_inventory_reacted_with_gasses(gasses: Array[RuntimeSubstanceData]) -> void:
if tween:
tween.kill()
tween = create_tween()
particles.emitting = true
emitting = true
tween.tween_interval(2.)
tween.tween_callback(func():
particles.emitting = false
emitting = false
for gas in gasses:
inventory.extract_substance(gas.substance.get_formula(),gas.amount)
)