class_name ResourceDefinitions extends RefCounted const ORE_ID: String = "ore" const GAS_ID: String = "gas" const ENERGY_ID: String = "energy" const DARK_MATTER_ID: String = "dark_matter" const ORDER: PackedStringArray = [ORE_ID, GAS_ID, ENERGY_ID, DARK_MATTER_ID] const DEFINITIONS: Dictionary = { ORE_ID: preload("res://resources/OreResourceDefinition.tres"), GAS_ID: preload("res://resources/GasResourceDefinition.tres"), ENERGY_ID: preload("res://resources/EnergyResourceDefinition.tres"), DARK_MATTER_ID: preload("res://resources/DarkMatterResourceDefinition.tres"), } static func get_definition(resource_id: String) -> Resource: return DEFINITIONS.get(resource_id) static func ids() -> PackedStringArray: return ORDER