TinyAdventure/ui/debug/build_system.gd

24 lines
814 B
GDScript
Raw Normal View History

2024-12-28 11:49:18 +01:00
extends MarginContainer
var build_system:BuildSystem = null
@onready var build_system_active_label: Label = %BuildSystemActiveLabel
@onready var build_system_hover_object: Label = %BuildSystemHoverObject
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(_delta: float) -> void:
if build_system == null:
build_system_active_label.text = "Not found"
build_system_hover_object.text = ""
return
if build_system.is_active:
build_system_active_label.text = "true"
else:
build_system_active_label.text = "false"
if build_system.hovered_existing_structure and not build_system.hovered_existing_structure.is_queued_for_deletion():
build_system_hover_object.text = build_system.hovered_existing_structure.get_path()
else:
build_system_hover_object.text = ""