aboutsummaryrefslogtreecommitdiff
path: root/scripts/load_turrets.gd
diff options
context:
space:
mode:
authorjacopograndi <jacopo.grandi@outlook.it>2022-01-16 17:14:36 +0100
committerjacopograndi <jacopo.grandi@outlook.it>2022-01-16 17:14:36 +0100
commit5781b7dad68c3e01d83365f73b0d35d9e5252f97 (patch)
treedada65ab375ed8287b33e6ffe023f5df5e666d24 /scripts/load_turrets.gd
parent8e5358aaefa1df729ffc02047e53b62705d6b3b1 (diff)
control system
Diffstat (limited to 'scripts/load_turrets.gd')
-rw-r--r--scripts/load_turrets.gd8
1 files changed, 7 insertions, 1 deletions
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 = []