Full random map generation, and testing of some new generation tech.

This commit is contained in:
gdz
2025-12-08 21:55:24 +01:00
parent c57076cd52
commit f8b4ab793c

View File

@@ -77,9 +77,13 @@ func _populate_cell(coords: Vector2i, source_id: int, atlas_coords: Vector2i) ->
GroundLayer.set_cell.call_deferred(coords, source_id, atlas_coords, alternativeTileId)
# full random (absolute nonsense)
func _pick_random_tile() -> Vector2i:
# Make all Tiles green
return Vector2i(1, 1)
var atlasSize: Vector2i = _source.get_atlas_grid_size()
var rndX: int = randi_range(0, atlasSize.x)
var rndY: int = randi_range(0, atlasSize.y)
return Vector2i(rndX, rndY)
func _is_empty(pos: Vector2i) -> bool:
# Check if the cell is empty (source_id is -1)