From 5781b7dad68c3e01d83365f73b0d35d9e5252f97 Mon Sep 17 00:00:00 2001 From: jacopograndi Date: Sun, 16 Jan 2022 17:14:36 +0100 Subject: control system --- scripts/load_turrets.gd | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'scripts/load_turrets.gd') diff --git a/scripts/load_turrets.gd b/scripts/load_turrets.gd index 2b96652..ddb7800 100644 --- a/scripts/load_turrets.gd +++ b/scripts/load_turrets.gd @@ -17,7 +17,13 @@ func _ready(): loaded = true func get_saveload(): - if saveload == null: saveload = get_tree().root.get_child(0).get_node("saveload") + if saveload == null: saveload = get_tree().root.get_node("world").get_node("saveload") + +func get_upg_turrets(turret_name): + var results = [] + for turr in info[turret_name].get("upgrades", []): + results += [info[turr]] + return results func get_base_turrets(): var results = [] -- cgit v1.2.3-54-g00ecf