I have a problem with the logic of climate, water is an object? or is it a climate?
the tile_x.is_empty() function returns false when the climate is water, is this an error?
I need a function that indicates if the tile is empty, and that it works in the water and on land.
you can use the following check
return tile.is_water() && (tile.find_object(mo_building)==null) && (tile.find_object(mo_depot_water)==null)
on water tiles, and is_empty() for all other tiles.
Quote from: Dwachs on May 29, 2018, 06:21:35 PMyou can use the following check return tile.is_water() && (tile.find_object(mo_building)==null) && (tile.find_object(mo_depot_water)==null)
on water tiles, and is_empty() for all other tiles.
Thanks, although I confess that I would like it to be practical, using only one function. ;)
Edit.This works well:
tile.get_objects().get_count() != 0