

var element = null

func set_element(new_element):
	if self.element != null:
		self.clear()

	self.element = new_element


func clear():
	if self.element == null:
		return

	self.element.queue_free()
	self.element = null


func release():
	if self.element != null:
		self.element = null


func is_present():
	return self.element != null


func get_dict():
	if self.element == null:
		return {
			"name" : null,
			"rotation" : 0,
		}
	else:
		return self.element.get_dict()
