extends Area3D


@export var enabled: bool = false
@export_range(0,10,0.01,"or_greater","suffix:градус/с") var power: float = 0.1
var flasks: Array[DraggableObject] = []

func _process(delta: float) -> void:
	if enabled:
		for flask in flasks:
			flask.get_node("Inventory").mean_temperature += delta * power

func _on_area_entered(area: Area3D) -> void:
	if area.is_in_group("flask"):
		flasks.append(area)


func _on_area_exited(area: Area3D) -> void:
	if area.is_in_group("flask"):
		flasks.erase(area)
