feat: Add initial core game scene, player script, and static Tekton manager.
This commit is contained in:
+3
-1
@@ -528,6 +528,9 @@ func _setup_host_game():
|
||||
stop_n_go_manager._setup_arena()
|
||||
elif LobbyManager.game_mode == "Tekton Doors" and portal_mode_manager:
|
||||
portal_mode_manager.setup_arena_locally()
|
||||
else:
|
||||
# Randomize grid first to ensure Floor 0 is walkable for pre-calculation
|
||||
randomize_game_grid()
|
||||
|
||||
# 1. PVT: Pre-calculate Static Tekton positions AFTER arena size is known
|
||||
_precalculate_static_positions()
|
||||
@@ -725,7 +728,6 @@ func _start_game():
|
||||
# Spawn Static Tektons and random tiles BEFORE countdown (Free Mode Only)
|
||||
# Exclude for Stop n Go and Tekton Doors
|
||||
if LobbyManager.game_mode != "Stop n Go" and LobbyManager.game_mode != "Tekton Doors":
|
||||
randomize_game_grid()
|
||||
spawn_static_tektons()
|
||||
|
||||
# Tekton Doors: Randomize connections BEFORE countdown so colors show
|
||||
|
||||
@@ -1217,6 +1217,14 @@ func is_position_occupied(pos: Vector2i) -> bool:
|
||||
if p.is_player_moving and p.target_position == pos:
|
||||
return true
|
||||
|
||||
# Prevent overlap with Static Tekton Stands (3x3 area)
|
||||
if enhanced_gridmap:
|
||||
for stand in get_tree().get_nodes_in_group("StaticTektonStands"):
|
||||
var local_pos = enhanced_gridmap.to_local(stand.global_position)
|
||||
var stand_map_pos = enhanced_gridmap.local_to_map(local_pos)
|
||||
if abs(pos.x - stand_map_pos.x) <= 1 and abs(pos.y - stand_map_pos.z) <= 1:
|
||||
return true
|
||||
|
||||
return false
|
||||
|
||||
func find_valid_starting_position() -> Vector2i:
|
||||
|
||||
@@ -42,9 +42,9 @@ func calculate_spawn_points(count: int, gridmap: Node) -> Array[Vector2i]:
|
||||
# If count > 5, we only return 5 because that's the max safe non-adjacent set in 3x3
|
||||
var spawn_points: Array[Vector2i] = []
|
||||
|
||||
var iterations = min(count, target_indices.size())
|
||||
for i in range(iterations):
|
||||
var zone_idx = target_indices[i]
|
||||
for zone_idx in target_indices:
|
||||
if spawn_points.size() >= count:
|
||||
break
|
||||
var zone = zones[zone_idx]
|
||||
|
||||
# Determine Position Type for Bias
|
||||
|
||||
Reference in New Issue
Block a user