-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ceilings on outdoor levels #86
base: master
Are you sure you want to change the base?
Conversation
This will also need some changes after next vanilla merge, to replace |
On the 8.0-savebreaking branch soon there is an "unused" bitfield in struct rm that is intended to have bits allocated away from it for new purposes such as this. |
136c455
to
5602add
Compare
Rebased onto 8.0-savebreaking |
(poorly, apparently...) |
5602add
to
6cd879f
Compare
7513983
to
5394e89
Compare
Add the function, make it work (once a bit is defined to be used with it), make it accessible from level files.
...instead of a level-wide ceiling/no-ceiling, when appropriate.
This is arguably a better approach than the previous one, in that it allows for rock traps to generate randomly indoors (or under some other kind of ceiling) even on levels that are flagged 'outdoors'. However, it's a bit wasteful since any outdoors level without 'indoor' areas will spend a bunch of cycles trying to place the trap before finally giving up. Maybe not that big a deal in the big picture though.
Instead of checking for any adjacent ceiling, require ceiling directly above the hero or monster reading the scroll. This avoids the need for more complicated feedback (e.g. "the ceiling rumbles nearby" or similar when there's no ceiling directly above you), and I think it probably makes sense anyway... This also allows us to drop the boolean param from ceiling_exists.
Storing it in 'flags' was causing it to be overwritten when a door or other furniture was added to a square. It should be consistent even when furniture, etc, changes.
aosdict pointed out there's no definitive indication that it's a courtyard, and players who consider the possibility of a courtyard may waste scrolls of earth standing in it, which would be frustrating.
I wouldn't include this in the actual release/master branch, since it sloppily relies on overwriting the color and piggybacking off the inverse video effect of object piles, but it's useful for testing purposes. If this were to be a permanent addition to the game I'd add some new flag like MG_CEILING that could be used for this purpose, but I doubt it's worth it. I'm including it in this branch just so that others can use it for testing if desired, because it's convenient.
Rebased onto master, so the coordxy stuff should be taken care of. Could probably take a look at it properly now and potentially adopt it (optionally after dropping the wizceiling option and squashing everything). |
Opening this PR just to document the ceiling stuff I did a while ago. Needs
an extra field in struct rm so not for immediate use.