mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-27 14:07:51 +01:00
Polishes up the reset_view proc, which is basically
`reset_perspective` from tgstation. Also adds various support for remote viewing lenses - like cameras not transmitting xray vision, among other things Recommit because we're using different compiler versions
This commit is contained in:
+27
-1
@@ -487,6 +487,7 @@ var/list/slot_equipment_priority = list( \
|
||||
return 0 //Unsupported slot
|
||||
//END HUMAN
|
||||
|
||||
// If you're looking for `reset_perspective`, that's a synonym for this proc.
|
||||
/mob/proc/reset_view(atom/A)
|
||||
if(client)
|
||||
if(istype(A, /atom/movable))
|
||||
@@ -499,8 +500,33 @@ var/list/slot_equipment_priority = list( \
|
||||
else
|
||||
client.perspective = EYE_PERSPECTIVE
|
||||
client.eye = loc
|
||||
return
|
||||
return 1
|
||||
|
||||
/mob/living/reset_view(atom/A)
|
||||
. = ..()
|
||||
if(.)
|
||||
// Above check means the mob has a client
|
||||
update_sight()
|
||||
if(client.eye != src)
|
||||
var/atom/AT = client.eye
|
||||
AT.get_remote_view_fullscreens(src)
|
||||
else
|
||||
clear_fullscreen("remote_view", 0)
|
||||
update_pipe_vision()
|
||||
|
||||
/mob/dead/reset_view(atom/A)
|
||||
if(client)
|
||||
if(ismob(client.eye) && (client.eye != src))
|
||||
// Note to self: Use `client.eye` for ghost following in place
|
||||
// of periodic ghost updates
|
||||
var/mob/target = client.eye
|
||||
target.following_mobs -= src
|
||||
. = ..()
|
||||
if(.)
|
||||
// Allows sharing HUDs with ghosts
|
||||
if(hud_used)
|
||||
client.screen = list()
|
||||
hud_used.show_hud(hud_used.hud_version)
|
||||
|
||||
/mob/proc/show_inv(mob/user)
|
||||
user.set_machine(src)
|
||||
|
||||
Reference in New Issue
Block a user