extends Interactable class_name Machine const MAX_MACHINE_LEVEL = 3 var level : int = 1 var type : MachineType func pointer_text() -> String: return type.name static func get_level_color(l : int) -> Color: match l: 1: return Color("4ed38a") 2: return Color("4ec6ee") 3: return Color("bd70e2") _: return Color("bd70e2") static func instantiate_machine(machine_type : MachineType, machine_level = 1) -> Machine: var new_machine : Machine = machine_type.scene.instantiate() as Machine new_machine.level = machine_level new_machine.type = machine_type return new_machine func save() -> EntityData: return MachineData.new(self)