summaryrefslogtreecommitdiff
path: root/scripts/tower_manager.gd
diff options
context:
space:
mode:
authorbd <bdunahu@operationnull.com>2025-05-29 14:57:11 -0400
committerbd <bdunahu@operationnull.com>2025-05-29 14:57:11 -0400
commit32f322b36e9a9fbdd673dcf0f13bc20cc2369e50 (patch)
treeed3ce6232e158895faa0376d6845ec628af8fcc1 /scripts/tower_manager.gd
parent0f6253876681955020005e7c29429b59250af601 (diff)
Dim already purchased upgrades rather than remove, deep copy
Diffstat (limited to 'scripts/tower_manager.gd')
-rw-r--r--scripts/tower_manager.gd2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/tower_manager.gd b/scripts/tower_manager.gd
index 89f037d..808052e 100644
--- a/scripts/tower_manager.gd
+++ b/scripts/tower_manager.gd
@@ -31,7 +31,7 @@ func _handle_upgrade(upgrade_index : int, tower : StaticBody2D):
if GameData.get_life() >= upgrade_cost:
GameData.subtract_life(upgrade_cost)
tower.apply_upgrade(upgrades[upgrade_index]["effects"])
- upgrades.remove_at(upgrade_index)
+ upgrades[upgrade_index]["is_valid"] = false
func _handle_place_tower(tower_index : int, tile_position : Vector2i):
if _tower_data.size() > tower_index: