Cytopia
Cytopia copied to clipboard
when placing a tile, occupy neighboring tiles for >1x1 buildings
When a tile is placed, neighboring nodes are not correctly marked as occupied. event manager also uses some hacks to check if a tile is free or not. In SetTileID, the current behavior is to set the tile ID of each node that is being occupied by >1x1 buildings. All occupied except the origin node are set to not render to hide this.
We need to find a better solution to occupy neighboring tiles, so that in event manager when placing a tile the node is marked correctly as occupied.
@SimplyLiz we could have some sort of special Node just to occupy it and it will include a pointer to the origin Node ?
I will move the setTileID functionality completely from Map
to MapNode
and keep pointers of the neighboring coordinates for multitiles and the functions to check for OriginPoint and so on in MapNode.
Imho it makes more sense that mapnodes know if they are multitile or if they are singlenodes. I've done most of this in my z-order branch already, but this is a total mess. This will take me some time to fix though