Improves client.eye system + advanced camera now accepts observing of mobs #10908
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
About The Pull Request
Two improvements in this PR
/atom/var/list/eye_users
/client/var/datum/weakref/eye_weakref
camera_advanced.dm
. Exclude to review this if youThese actually can go separately, but this is specifically merged to track new atom variable
list/eye_users
in general systemBut, meanwhile, this doesn't respect your current eye. If you see things through a camera, atom_hud system still thinks you're at that z level, but your respected z should be changed to your current eye, because atom_hud should be supposed to show images on the z of where your eye is currently at.
If I tell a case, abductors will not be capable of abductee marks through their camera. That's the issue in the new atom_hud port PR.
So, this is basic implementation for a new signal, like
COMSIG_CLIENT_EYE_CHANGED
to handle atom_hud's client images to show correct on z levelbut also, it is a required system for
Why do you need to have
eye_weakref
?because DM immediately change your eye on
mob/login()
, and you lose which eye you had previously, even if your eye should be persistent.So, where do you use
eye_users
?If a thing is removed, and if it's a client's eye, we need to remove things from that client.
Example)
SSclient_vision.revoke_vision_key_from_mob("ghost", camera_mob)
camera_mob.eye_users
eye_users
How can you use
SEND_SIGNAL(EYE_Z_CHANGE)
fromset_eye()
?If
EYE_Z_CHANGE
is sent, we need to access both client image systems:atom_hud
andSSclient_vision
Both will handle which z objects should be removed from your client images, and which z objects should be newly added to you, based on your new client eye.
For example...
because
COMSIG_MOVABLE_Z_CHANGED
is not capable of managing thisI think resolving weakref on
mob/login()
seems to be unnecessary.It is necessary. just because it needs to remove your client from your old eye.
Why It's Good For The Game
Improving basic systems to progress further
Testing Photographs and Procedure
Screenshots&Videos
I've tested a lot locally. I figured it's working well.
https://youtu.be/k1axM8RbQXs
How new camera works
Changelog
🆑
code: minor port of set_eye() and reset_perspective() proc from TG, #PR 69115 (LemonInTheDark)
code: improved basic game system to track client's currently used eye
tweak: advanced camera is now visible by anyone even if it's currently used by someone. (This doesn't support the shuttle docking system, because it uses different one.)
fix: minor fix that advanced camera was still usable even if you're locker'ed
/:cl: