Mag gen & work towards AI

This commit is contained in:
2024-01-21 16:39:13 +01:00
parent 405b374b9a
commit 9e3deaf3b0
20 changed files with 341 additions and 21 deletions

View File

@ -62,8 +62,10 @@ func copy_to_map(map: TileMap) -> void:
for x in range(0, self.room_size.x):
for y in range(0, self.room_size.y):
var tile = self.get_cell_source_id(TILEMAP_LAYER, Vector2i(x, y))
var alt = self.get_cell_alternative_tile(TILEMAP_LAYER, Vector2i(x, y))
if tile != -1:
map.set_cell(TILEMAP_LAYER, Vector2i(position.x + x, position.y + y), tile, Vector2i(0, 0))
map.set_cell(TILEMAP_LAYER, Vector2i(position.x + x, position.y + y), tile, Vector2i(0, 0), alt)
else:
map.set_cell(TILEMAP_LAYER, Vector2i(position.x + x, position.y + y), -1, Vector2i(0, 0))