feat: Add StaticTektonManager for calculating and placing static tekton spawn points using a zone-based 3x3 grid approach.
This commit is contained in:
@@ -36,6 +36,7 @@ func calculate_spawn_points(count: int, gridmap: Node) -> Array[Vector2i]:
|
||||
# 2. Select Fixed Targets: TL(0), TR(2), Center(4), BL(6), BR(8)
|
||||
# This ensures they are never adjacent (always separated by a middle zone)
|
||||
var target_indices = [0, 2, 6, 8, 4]
|
||||
target_indices.shuffle() # Randomize which of the 5 zones we pick
|
||||
|
||||
# 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
|
||||
@@ -56,7 +57,9 @@ func calculate_spawn_points(count: int, gridmap: Node) -> Array[Vector2i]:
|
||||
8: pos_type = 3 # BR
|
||||
4: pos_type = 4 # Center
|
||||
|
||||
var pos = _pick_spot_in_zone_biased(zone, gridmap, pos_type)
|
||||
# Use PURE RANDOM spot in zone (User Request #2)
|
||||
# instead of biased corner/center logic
|
||||
var pos = _pick_spot_in_zone(zone, gridmap)
|
||||
if pos != Vector2i(-1, -1):
|
||||
spawn_points.append(pos)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user