DFRPGRandomDungeonGenerator
DFRPGRandomDungeonGenerator copied to clipboard
Doors between rooms are not "shared"
There's two related problems here:
- When two rooms are adjacent, both rooms may knock doors into the wall between them. This increases the number of doors in a wall shared with two rooms to approximately twice the intended value
- Each room only manages the list of doors it opened, and does not know about doors opened by other rooms into its area, even though to a human that door is clearly part of both areas.
This results in a) a funny number of doors that b) are inevitably not completely described
EDIT:
- [ ] Create central door registry (include door object, and co-ordinates)
- [ ] move door creation to a separate pass after room creation
- [ ] door creation needs to check the registry to ensure no conflict
- [ ] write a method to determine if a room wall is shared with another room
- [ ] door creation needs to inform the room on the other side of the wall
Probably related to #61 - the solution for one should help with the other anyways.
Additional issue is that the two rooms may knock a door through the same grid position
The many door issues I think are best handled by pulling door code out of the room generation. Have a door pass after creating all the rooms. Create a central door registry to check against to prevent "overlap" as part of this.