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:
Crazylemon64
2016-12-21 17:56:57 -08:00
parent 94a6caa4b5
commit 6d3e66f41c
57 changed files with 506 additions and 411 deletions
+27 -1
View File
@@ -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)