Made building consume resources

Now may build more than one if resources allow
building placement is red/green for indicating success
This commit is contained in:
2024-03-10 07:50:26 -05:00
parent 856b6a0400
commit d74bfda9a3
8 changed files with 53 additions and 9 deletions

View File

@@ -37,3 +37,6 @@ func get_location_data(pos: Vector2i) -> CellData:
func change_location_resource(pos: Vector2i, data: GameResource) -> void:
world_data[pos].change_resource(data)
world_grid.set_cell(Constants.TilemapLayers.ENVIRONMENT, pos, 0, data.atlas_location)
func change_location_building(pos: Vector2i, data: BuildingBase) -> void:
world_data[pos].change_building(data)