extends Area

signal picked_up

export var item_name: String
export var item_amount: int = 1
var player: Node

func on_player_interact(p_player) -> bool:
	monitorable = false
	emit_signal("picked_up")
	player = p_player
	$AudioStreamPlayer.play()
	return true

func _on_AudioStreamPlayer_finished():
	player.modify_inventory(item_name, item_amount)
	queue_free()
