Cytopia icon indicating copy to clipboard operation
Cytopia copied to clipboard

when placing a tile, occupy neighboring tiles for >1x1 buildings

Open SimplyLiz opened this issue 2 years ago • 2 comments

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 avatar Apr 06 '22 17:04 SimplyLiz

@SimplyLiz we could have some sort of special Node just to occupy it and it will include a pointer to the origin Node ?

Mograbi avatar May 01 '22 20:05 Mograbi

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

SimplyLiz avatar May 02 '22 13:05 SimplyLiz