class_name BuildingDefinitions extends RefCounted const ORDER: PackedStringArray = ["mothership", "ship_crafter", "command_center", "extractor", "transport_hub", "ship_lab", "gas_burner"] const DEFINITIONS: Dictionary = { "mothership": preload("res://MothershipBuildingDefinition.tres"), "ship_crafter": preload("res://CrafterBuildingDefinition.tres"), "command_center": preload("res://CommandBuildingDefinition.tres"), "extractor": preload("res://ExtractorBuildingDefinition.tres"), "transport_hub": preload("res://TransportHubBuildingDefinition.tres"), "ship_lab": preload("res://ShipLabBuildingDefinition.tres"), "gas_burner": preload("res://GasBurnerBuildingDefinition.tres"), } static func get_definition(definition_id: String) -> Resource: return DEFINITIONS.get(definition_id) static func all() -> Array: var result: Array = [] for definition_id in ORDER: result.append(DEFINITIONS[definition_id]) return result