extends Node2D

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

func _on_Terminal_item_used(item_id):
	if global.game_vars.has("cartridge_used"):
		return
	var inv = global.inventory
	if item_id == inv.Items.cartridge:
		if inv.remove_item(item_id):
			var anim: AnimationPlayer = global.player.animation_player
			anim.play("Victory")
			global.game_vars["cartridge_used"] = true


func _on_Door_used():
	if !global.game_vars.has("rec_cartridge_used"):
		global.change_music("outdoors")
