CleverRaven/Cataclysm-DDA — pull request #8474 by BevapDin (2014-08-07 13:14:57+00:00)
Title: Fix mapgen errors

Fixes #8067 and fixes #8083 - both issues are the same.

Mansion rooms will create the left and the bottom walls all the time, and if the other two edges lead to the outside there will be walls, too. But note that mansion rooms are *not* rotated. Their creation is actually rotation independent, it only checks whether to put outside walls and whether to put windows in walls (leading to the outside).

The entrance was created the same way (left and bottom wall, no top or right wall). But than it had been rotated. As the other mansion maps are not rotated, the mansion entrance had walls somewhere else, not at left and bottom.

I moved those important left and bottom walls *behind* the rotation, so they are rotation independent again and adjusted the terrain generation to enclose the outer most map squares (that were previously always occupied by the wall, but now might not be).

Note: this does *not* affects mansion with the entrance to the north - those are already generated correctly as they are not rotated at all!

----

Military outposts:

I moved the chain gate to the outer edges of the 24x24 map squares, That means an outpost now takes up the whole 2x2 submaps space. This makes the inner part less cramped.

Also added a check for overlaying rooms. This will probably decrease the number of rooms that are created as invalid rooms are discarded.

Placing two rooms directly adjacent and making a door in the adjacent wall creates a door leading right into a wall, I added another door to make a proper doorway in this case:
```
|.....| |.....|
|-----| |--+--|
|--+--| ==> |--+--|
|.....| |.....|
|.....| |.....|
```