-
Notifications
You must be signed in to change notification settings - Fork 565
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# About the pull request Switches several uses of `view` over to `dview` and related procs/defines instead. Only swaps over where it would be inappropriate for native BYOND darkness to effect the results, i.e. it cares about a lack of obstructions rather than actual visibility. Created `doview()` and `USE_DOVIEW` as the `oview` version of `dview`. Tweaked `dview` and related procs to work slightly more like `view` would. `view` is from the perspective of the provided atom, seeing itself, its loc (usually a turf), and if on a turf, any surrounding turfs. `dview` set its loc to the provided atom, meaning it was in the *contents* of that atom, and would see itself and its loc (the atom)... which, as an atom, means it wouldn't see surrounding turfs. Existing uses of `dview` got around this by using `get_turf` on the provided atom. I changed the behavior so this wasn't necessary, allowing you to `dview` from the perspective of a atom and have it work like `view` would. Perhaps that should just be a built-in `get_turf` instead, but this more closely matches how `view` works. Used `HIDE_INVISIBLE_OBSERVER` as the see invis for `dview` as all the uses I saw were for in-character things, and thus should only effect things that were also in-character. Anything as invisible as an observer or more is assumed to be out-of-character. <!-- Remove this text and explain what the purpose of your PR is. Mention if you have tested your changes. If you changed a map, make sure you used the mapmerge tool. If this is an Issue Correction, you can type "Fixes Issue #169420" to link the PR to the corresponding Issue number #169420. Remember: something that is self-evident to you might not be to others. Explain your rationale fully, even if you feel it goes without saying. --> # Explain why it's good for the game Should (currently) have no effect on the game as native BYOND darkness isn't used (all areas have luminosity), but is one step towards allowing that system to work appropriately if enabled. # Testing Photographs and Procedure <details> <summary>Screenshots & Videos</summary> Performance testing. All procs in question return a list of atoms. The procs of interest: ![image](https://github.com/user-attachments/assets/d4b487c9-5b8d-470e-8692-c7b2d8045d19) Current, with darkness disabled (area luminosity = 1): ![image](https://github.com/user-attachments/assets/f6ab0229-c868-4f9c-a98a-541357dd0a65) No performance difference between `view` and `dview`. As a test, darkness enabled (area luminosity = 0): ![image](https://github.com/user-attachments/assets/bb60b345-0df7-45f3-8f09-a97fdfd43cd9) `dview` is notably slower than `view`, likely because `view` has smaller lists of things it can see due to darkness and thus shorter loops. </details> # Changelog No player facing changes. --------- Co-authored-by: Drathek <[email protected]>
- Loading branch information
Showing
25 changed files
with
92 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.