spawn tile check fix
All checks were successful
linting & formatting / build (push) Successful in 19s
itch.io publish action / build (web, html) (push) Successful in 3m32s

This commit is contained in:
duncgibbs 2026-04-20 13:33:56 -05:00
parent 70c49d768c
commit d4a72156f8
2 changed files with 8 additions and 7 deletions

View File

@ -165,12 +165,12 @@ func initialize() -> void:
ground.coords = coord ground.coords = coord
ground.position = tile_map.map_to_local(coord) ground.position = tile_map.map_to_local(coord)
tiles[coord] = ground tiles[coord] = ground
#var extra_spawn_coord := Vector2i(randi_range(1, max_x - 1), randi_range(1, max_y - 1)) var extra_spawn_coord := Vector2i(randi_range(1, max_x - 1), randi_range(1, max_y - 1))
#var extra_spawn = [UP_SPAWN, RIGHT_SPAWN, DOWN_SPAWN, LEFT_SPAWN].pick_random().instantiate() var extra_spawn = [UP_SPAWN, RIGHT_SPAWN, DOWN_SPAWN, LEFT_SPAWN].pick_random().instantiate()
#board_state.add_child(extra_spawn) board_state.add_child(extra_spawn)
#extra_spawn.coords = extra_spawn_coord extra_spawn.coords = extra_spawn_coord
#extra_spawn.position = tile_map.map_to_local(extra_spawn_coord) extra_spawn.position = tile_map.map_to_local(extra_spawn_coord)
#tiles[extra_spawn_coord] = extra_spawn tiles[extra_spawn_coord] = extra_spawn
static func get_next_direction(direction: Direction, count: int = 1) -> Direction: static func get_next_direction(direction: Direction, count: int = 1) -> Direction:

View File

@ -18,7 +18,7 @@ var paused: bool = true
func _ready() -> void: func _ready() -> void:
match spawn_size: match spawn_size:
Size.SMALL: Size.SMALL:
spawn_left = 1 spawn_left = 10
func pause() -> void: func pause() -> void:
@ -49,3 +49,4 @@ func _physics_process(delta: float) -> void:
citizen.position = position citizen.position = position
citizen.set_offset(Vector2(randf_range(-40, 40), randf_range(-40, 40))) citizen.set_offset(Vector2(randf_range(-40, 40), randf_range(-40, 40)))
citizen.direction = direction citizen.direction = direction
citizen.handle_tile_area_exited(null)