extends Node2D

onready var global: Node = get_node("/root/Global")

onready var box = $Box

func _ready():
	if global.game_vars.has("vynil_grabbed"):
		grabbed_vynil()

func _on_Box_used():
	if global.inventory.add_item(global.inventory.Items.vynil):
		global.game_vars["vynil_grabbed"] = true
		grabbed_vynil()

func grabbed_vynil() -> void:
	box.queue_free()
