528e22875d
- Rename enum GAUNTLET→CANDY_SURVIVAL, all gauntlet_*→candy_survival_* - Rename files: gauntlet_manager→candy_survival_manager, candy_cannon→candy_survival_npc, gauntlet.tscn→candy_survival.tscn - Rewrite candy_survival_manager.gd: blueprints, candy stack, Mekton delivery, Sugar Rush, knock/ghost charges, sticky-as-wall - Update player_movement_manager.gd: smack→knock system, ghost integration - All Candy Survival issues (#54-57, #65-70) retitled per boss design - Shared managers (goals_cycle, goal, player_race, playerboard, turn) untouched
35 lines
1.0 KiB
GDScript
35 lines
1.0 KiB
GDScript
extends Node
|
|
|
|
# Minimal EnhancedGridMap stand-in for Candy Survival headless tests. Records
|
|
# set_cell_item calls so lifecycle tests can run the local sync path without a
|
|
# real GridMap. Only the surface the manager touches is implemented.
|
|
|
|
var cell_size := Vector3(1, 1, 1)
|
|
var cells: Dictionary = {} # Vector3i -> item id
|
|
var astar_inits := 0
|
|
|
|
# Walkable-tile set. Items in this list are passable for the bot planner.
|
|
# By default everything is walkable except the items the bot calls out
|
|
# explicitly via `non_walkable_items`.
|
|
var non_walkable_items: Array[int] = []
|
|
var columns: int = 20
|
|
var rows: int = 20
|
|
|
|
func is_position_valid(pos: Vector2i) -> bool:
|
|
return pos.x >= 0 and pos.x < columns and pos.y >= 0 and pos.y < rows
|
|
|
|
func set_cell_item(pos: Vector3i, item: int, _orientation: int = 0) -> void:
|
|
if item == -1:
|
|
cells.erase(pos)
|
|
else:
|
|
cells[pos] = item
|
|
|
|
func get_cell_item(pos: Vector3i) -> int:
|
|
return cells.get(pos, -1)
|
|
|
|
func initialize_astar() -> void:
|
|
astar_inits += 1
|
|
|
|
func update_grid_data() -> void:
|
|
pass
|