extends Spatial

export var item_type: Resource setget set_item_type
var item_name: String

func set_item_type(new_value: Resource):
	item_type = new_value
	if not is_inside_tree():
		yield(self, "ready")
	item_name = item_type.name
	$ItemLabel.text = item_type.name
	for child in $visual.get_children():
		child.queue_free()
	$visual.add_child(item_type.visual_scene.instance())
	
