init
This commit is contained in:
18
scripts/module_selector.gd
Normal file
18
scripts/module_selector.gd
Normal file
@@ -0,0 +1,18 @@
|
||||
extends VBoxContainer
|
||||
class_name ModuleSelector
|
||||
|
||||
@onready var location_label = %LocationLabel
|
||||
@onready var module_selector_option = %ModuleSelectorOption
|
||||
@onready var module_texture = %ModuleTexture
|
||||
@onready var description_label = %DescriptionLabel
|
||||
|
||||
var _location: GameData.ModuleType
|
||||
var modules_list: Array
|
||||
|
||||
func with_location_data(location: GameData.ModuleType, _mid_index: int = 0) -> ModuleSelector:
|
||||
_location = location
|
||||
return self
|
||||
|
||||
func _ready():
|
||||
modules_list = DataHandler.get_modules_for_location(_location)
|
||||
location_label.text = GameData.get_module_type_name(_location)
|
||||
Reference in New Issue
Block a user