feat: Introduce static Tekton stands with a new manager for strategic, non-adjacent placement and synchronized randomized shapes.

This commit is contained in:
Yogi Wiguna
2026-02-13 13:51:51 +08:00
parent 6472e47edf
commit 98f107893d
3 changed files with 53 additions and 12 deletions
+2 -2
View File
@@ -13,7 +13,7 @@ const STATIC_CONTROLLER_SCRIPT = "res://scripts/static_tekton_controller.gd"
# Mid-Left, Mid-Mid, Mid-Right
# Bot-Left, Bot-Mid, Bot-Right
func calculate_spawn_points(count: int, gridmap: Node) -> Array:
func calculate_spawn_points(count: int, gridmap: Node) -> Array[Vector2i]:
"""
Calculates random spawn positions for static tektons.
Returns an Array of Vector2i positions.
@@ -39,7 +39,7 @@ func calculate_spawn_points(count: int, gridmap: Node) -> Array:
# If count < 5, we prioritize corners then center
# If count > 5, we only return 5 because that's the max safe non-adjacent set in 3x3
var spawn_points = []
var spawn_points: Array[Vector2i] = []
var iterations = min(count, target_indices.size())
for i in range(iterations):