extends Node

var amount: float = 1.0

func _on_interactible_interacted(with: DraggableObject) -> void:
	if with.is_in_group("flask"):
		with.get_node("%Inventory").add_inventory(%Inventory.extract(%Inventory.total_amount * amount))
		GuiSignalBus.push("%s содержимого пробирки перелито" % [str(amount*100)+"%"])


func _on_h_slider_value_changed(value: float) -> void:
	amount = value
	$"../HBoxContainer/Label".text = str(int(value*100.0)).pad_zeros(3) + "%"
