mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 20:16:55 +01:00
Merge pull request #5840 from Crazylemon64/adds_reset_perspective
Polishes up `reset_view`
This commit is contained in:
@@ -33,7 +33,7 @@ Pipelines + Other Objects -> Pipe network
|
||||
|
||||
/obj/machinery/atmospherics/New()
|
||||
..()
|
||||
|
||||
|
||||
if(!icon_manager)
|
||||
icon_manager = new()
|
||||
|
||||
@@ -318,3 +318,6 @@ Pipelines + Other Objects -> Pipe network
|
||||
/obj/machinery/atmospherics/singularity_pull(S, current_size)
|
||||
if(current_size >= STAGE_FIVE)
|
||||
Deconstruct()
|
||||
|
||||
/obj/machinery/atmospherics/update_remote_sight(mob/user)
|
||||
user.sight |= (SEE_TURFS|BLIND)
|
||||
|
||||
@@ -110,6 +110,9 @@
|
||||
#define CHEM_MOB_SPAWN_HOSTILE 1
|
||||
#define CHEM_MOB_SPAWN_FRIENDLY 2
|
||||
|
||||
#define TINT_IMPAIR 2 //Threshold of tint level to apply weld mask overlay
|
||||
#define TINT_BLIND 3 //Threshold of tint level to obscure vision fully
|
||||
|
||||
#define isliving(A) (istype((A), /mob/living))
|
||||
#define iscarbon(A) (istype((A), /mob/living/carbon))
|
||||
#define ishuman(A) (istype((A), /mob/living/carbon/human))
|
||||
@@ -146,4 +149,4 @@
|
||||
#define isorgan(A) (istype((A), /obj/item/organ/external))
|
||||
#define hasorgans(A) (ishuman(A))
|
||||
|
||||
#define is_admin(user) (check_rights(R_ADMIN, 0, (user)) != 0)
|
||||
#define is_admin(user) (check_rights(R_ADMIN, 0, (user)) != 0)
|
||||
|
||||
@@ -643,9 +643,7 @@
|
||||
//this is necessarily damaging
|
||||
var/damage = rand(1,5)
|
||||
to_chat(M, "<span class='danger'>The unloading machine grabs you with a hard metallic claw!</span>")
|
||||
if(M.client)
|
||||
M.client.eye = master
|
||||
M.client.perspective = EYE_PERSPECTIVE
|
||||
M.reset_perspective(master)
|
||||
M.loc = master
|
||||
master.types[M.type] = src
|
||||
M.apply_damage(damage) // todo: ugly
|
||||
@@ -699,10 +697,7 @@
|
||||
//this is necessarily damaging
|
||||
var/damage = rand(1,5)
|
||||
to_chat(M, "<span class='danger'>The unloading machine grabs you with a hard metallic claw!</span>")
|
||||
if(M.client)
|
||||
M.client.eye = master
|
||||
M.client.perspective = EYE_PERSPECTIVE
|
||||
M.loc = master
|
||||
M.forceMove(master)
|
||||
master.types[M.type] = src
|
||||
M.apply_damage(damage) // todo: ugly
|
||||
M.visible_message("\red [M.name] gets pulled into the machine!")
|
||||
@@ -710,11 +705,8 @@
|
||||
|
||||
outlet_reaction(var/atom/W,var/turf/D)
|
||||
var/mob/living/M = W
|
||||
M.loc = master.loc
|
||||
M.forceMove(master.loc)
|
||||
M.dir = master.outdir
|
||||
if(M.client)
|
||||
M.client.eye = M.client.mob
|
||||
M.client.perspective = MOB_PERSPECTIVE
|
||||
|
||||
D = get_step(D,master.outdir) // throw attempt
|
||||
eject_speed = rand(0,4)
|
||||
@@ -796,4 +788,4 @@
|
||||
var/punches = punch(M,remaining / PUNCH_WORK)
|
||||
if(punches>1)master.sleep++
|
||||
return punches * PUNCH_WORK
|
||||
#undef MAXCOIL
|
||||
#undef MAXCOIL
|
||||
|
||||
@@ -1028,7 +1028,7 @@ body
|
||||
to_chat(usr, "Mob doesn't exist anymore")
|
||||
return
|
||||
|
||||
if(!(locateUID(rem_organ) in M.internal_organs))
|
||||
if(!(rem_organ in M.internal_organs))
|
||||
to_chat(usr, "Mob does not have that organ.")
|
||||
return
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
|
||||
var/mob/living/carbon/human/caster = user
|
||||
if(caster.remoteview_target)
|
||||
caster.remoteview_target = null
|
||||
caster.reset_view(0)
|
||||
caster.reset_perspective(0)
|
||||
return 0
|
||||
|
||||
if(is_admin_level(user.z) && (!centcom_cancast || ticker.mode.name == "ragin' mages")) //Certain spells are not allowed on the centcom zlevel
|
||||
|
||||
@@ -427,6 +427,15 @@
|
||||
else
|
||||
return 0
|
||||
|
||||
// Used to provide overlays when using this atom as a viewing focus
|
||||
// (cameras, locker tint, etc.)
|
||||
/atom/proc/get_remote_view_fullscreens(mob/user)
|
||||
return
|
||||
|
||||
//the sight changes to give to the mob whose perspective is set to that atom (e.g. A mob with nightvision loses its nightvision while looking through a normal camera)
|
||||
/atom/proc/update_remote_sight(mob/living/user)
|
||||
return
|
||||
|
||||
/atom/proc/checkpass(passflag)
|
||||
return pass_flags&passflag
|
||||
|
||||
|
||||
@@ -147,6 +147,18 @@
|
||||
|
||||
return 1
|
||||
|
||||
/mob/living/forceMove(atom/destination)
|
||||
stop_pulling()
|
||||
if(buckled)
|
||||
buckled.unbuckle_mob(src,force=1)
|
||||
// in lieu of "unbuckle_all_mobs"
|
||||
if(buckled_mob)
|
||||
unbuckle_mob(buckled_mob,force=1)
|
||||
. = ..()
|
||||
if(client)
|
||||
reset_perspective(destination)
|
||||
update_canmove() //if the mob was asleep inside a container and then got forceMoved out we need to make them fall.
|
||||
|
||||
//called when src is thrown into hit_atom
|
||||
/atom/movable/proc/throw_impact(atom/hit_atom, var/speed)
|
||||
if(istype(hit_atom,/mob/living))
|
||||
|
||||
@@ -156,8 +156,6 @@
|
||||
to_chat(usr, "<span class='boldnotice'>Subject cannot have abiotic items on.</span>")
|
||||
return
|
||||
usr.stop_pulling()
|
||||
usr.client.perspective = EYE_PERSPECTIVE
|
||||
usr.client.eye = src
|
||||
usr.forceMove(src)
|
||||
src.occupant = usr
|
||||
src.icon_state = "scanner_occupied"
|
||||
@@ -258,9 +256,6 @@
|
||||
go_out()
|
||||
|
||||
/obj/machinery/dna_scannernew/proc/put_in(var/mob/M)
|
||||
if(M.client)
|
||||
M.client.perspective = EYE_PERSPECTIVE
|
||||
M.client.eye = src
|
||||
M.forceMove(src)
|
||||
src.occupant = M
|
||||
src.icon_state = "scanner_occupied"
|
||||
@@ -283,9 +278,6 @@
|
||||
to_chat(usr, "<span class='warning'>The scanner is locked!</span>")
|
||||
return
|
||||
|
||||
if(src.occupant.client)
|
||||
src.occupant.client.eye = src.occupant.client.mob
|
||||
src.occupant.client.perspective = MOB_PERSPECTIVE
|
||||
src.occupant.forceMove(src.loc)
|
||||
src.occupant = null
|
||||
src.icon_state = "scanner_open"
|
||||
|
||||
@@ -302,12 +302,12 @@
|
||||
if(istype(user.l_hand, /obj/item/tk_grab) || istype(user.r_hand, /obj/item/tk_grab/))
|
||||
to_chat(user, "<span class='warning'>Your mind is too busy with that telekinetic grab.</span>")
|
||||
user.remoteview_target = null
|
||||
user.reset_view(0)
|
||||
user.reset_perspective(0)
|
||||
return
|
||||
|
||||
if(user.client.eye != user.client.mob)
|
||||
user.remoteview_target = null
|
||||
user.reset_view(0)
|
||||
user.reset_perspective(0)
|
||||
return
|
||||
|
||||
for(var/mob/living/L in targets)
|
||||
@@ -315,7 +315,7 @@
|
||||
|
||||
if(target)
|
||||
user.remoteview_target = target
|
||||
user.reset_view(target)
|
||||
user.reset_perspective(target)
|
||||
else
|
||||
user.remoteview_target = null
|
||||
user.reset_view(0)
|
||||
user.reset_perspective(0)
|
||||
|
||||
@@ -107,6 +107,11 @@ var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology",
|
||||
return
|
||||
return
|
||||
|
||||
// This is for the seer rune, so you don't get permanent ghost sight
|
||||
/obj/effect/rune/Uncrossed(atom/movable/O)
|
||||
if(isliving(O))
|
||||
var/mob/living/L = O
|
||||
L.update_sight()
|
||||
|
||||
/obj/effect/rune/proc/get_word_string()
|
||||
if(word1 == cultwords["travel"])
|
||||
|
||||
@@ -210,6 +210,8 @@ var/list/sacrificed = list()
|
||||
|
||||
/obj/effect/rune/proc/seer()
|
||||
if(usr.loc==src.loc)
|
||||
// No. Bad cultcode. Bad.
|
||||
var/mob/living/carbon/human/H = usr
|
||||
if(usr.seer==1)
|
||||
usr.say("Rash'tla sektath mal[pick("'","`")]zua. Zasan therium viortia.")
|
||||
to_chat(usr, "\red The world beyond fades from your vision.")
|
||||
@@ -224,6 +226,7 @@ var/list/sacrificed = list()
|
||||
to_chat(usr, "\red The world beyond opens to your eyes.")
|
||||
usr.see_invisible = SEE_INVISIBLE_OBSERVER
|
||||
usr.seer = 1
|
||||
H.update_sight()
|
||||
return
|
||||
return fizzle()
|
||||
|
||||
|
||||
@@ -76,10 +76,9 @@
|
||||
origin.vest_mode_action.Remove(C)
|
||||
origin.vest_disguise_action.Remove(C)
|
||||
origin.set_droppoint_action.Remove(C)
|
||||
remote_eye.user = null
|
||||
remote_eye.eye_user = null
|
||||
C.reset_perspective(null)
|
||||
if(C.client)
|
||||
C.client.perspective = MOB_PERSPECTIVE
|
||||
C.client.eye = src
|
||||
C.client.images -= remote_eye.user_image
|
||||
for(var/datum/camerachunk/chunk in remote_eye.visibleCameraChunks)
|
||||
C.client.images -= chunk.obscured
|
||||
|
||||
@@ -203,9 +203,6 @@
|
||||
/obj/machinery/abductor/experiment/proc/eject_abductee()
|
||||
if(!occupant)
|
||||
return
|
||||
if(occupant.client)
|
||||
occupant.client.eye = occupant.client.mob
|
||||
occupant.client.perspective = MOB_PERSPECTIVE
|
||||
occupant.forceMove(get_turf(src))
|
||||
occupant = null
|
||||
icon_state = "experiment-open"
|
||||
icon_state = "experiment-open"
|
||||
|
||||
@@ -446,7 +446,7 @@
|
||||
|
||||
controlling = 0
|
||||
|
||||
reset_view(null)
|
||||
reset_perspective(null)
|
||||
machine = null
|
||||
|
||||
host.verbs -= /mob/living/carbon/proc/release_control
|
||||
@@ -562,10 +562,10 @@
|
||||
|
||||
src.forceMove(get_turf(host))
|
||||
|
||||
reset_view(null)
|
||||
reset_perspective(null)
|
||||
machine = null
|
||||
|
||||
host.reset_view(null)
|
||||
host.reset_perspective(null)
|
||||
host.machine = null
|
||||
|
||||
var/mob/living/H = host
|
||||
|
||||
@@ -817,11 +817,9 @@ var/global/list/multiverse = list()
|
||||
log_game("[user][user.key] made [target][target.key] say [wgw] with a voodoo doll.")
|
||||
if("eyes")
|
||||
user.set_machine(src)
|
||||
if(user.client)
|
||||
user.client.eye = target
|
||||
user.client.perspective = EYE_PERSPECTIVE
|
||||
user.reset_perspective(target)
|
||||
spawn(100)
|
||||
user.reset_view()
|
||||
user.reset_perspective(null)
|
||||
user.unset_machine()
|
||||
if("r_leg","l_leg")
|
||||
to_chat(user, "<span class='notice'>You move the doll's legs around.</span>")
|
||||
|
||||
@@ -96,12 +96,9 @@
|
||||
user.visible_message("[user] climbs on the operating table.","You climb on the operating table.")
|
||||
else
|
||||
visible_message("<span class='alert'>[C] has been laid on the operating table by [user].</span>")
|
||||
if(C.client)
|
||||
C.client.perspective = EYE_PERSPECTIVE
|
||||
C.client.eye = src
|
||||
C.resting = 1
|
||||
C.update_canmove()
|
||||
C.loc = src.loc
|
||||
C.forceMove(loc)
|
||||
if(user.pulling == C)
|
||||
user.stop_pulling()
|
||||
for(var/obj/O in src)
|
||||
|
||||
@@ -344,9 +344,6 @@
|
||||
return
|
||||
if(!G || !G:affecting) return
|
||||
var/mob/M = G:affecting
|
||||
if(M.client)
|
||||
M.client.perspective = EYE_PERSPECTIVE
|
||||
M.client.eye = src
|
||||
M.forceMove(src)
|
||||
src.occupant = M
|
||||
src.icon_state = "[base_icon]"
|
||||
@@ -421,9 +418,6 @@
|
||||
toggle_filter()
|
||||
if(!occupant)
|
||||
return
|
||||
if(occupant.client)
|
||||
occupant.client.eye = occupant.client.mob
|
||||
occupant.client.perspective = MOB_PERSPECTIVE
|
||||
occupant.forceMove(loc)
|
||||
occupant = null
|
||||
icon_state = "[base_icon]-open"
|
||||
@@ -522,10 +516,6 @@
|
||||
to_chat(user, "<span class='boldnotice'>>The sleeper is already occupied!</span>")
|
||||
return
|
||||
if(!L) return
|
||||
|
||||
if(L.client)
|
||||
L.client.perspective = EYE_PERSPECTIVE
|
||||
L.client.eye = src
|
||||
L.forceMove(src)
|
||||
src.occupant = L
|
||||
src.icon_state = "[base_icon]"
|
||||
@@ -563,8 +553,6 @@
|
||||
to_chat(usr, "<span class='boldnotice'>The sleeper is already occupied!</span>")
|
||||
return
|
||||
usr.stop_pulling()
|
||||
usr.client.perspective = EYE_PERSPECTIVE
|
||||
usr.client.eye = src
|
||||
usr.forceMove(src)
|
||||
src.occupant = usr
|
||||
src.icon_state = "[base_icon]"
|
||||
|
||||
@@ -93,9 +93,6 @@
|
||||
if(M.abiotic())
|
||||
to_chat(user, "<span class='notice'>Subject cannot have abiotic items on.</span>")
|
||||
return
|
||||
/*if(M.client)
|
||||
M.client.perspective = EYE_PERSPECTIVE
|
||||
M.client.eye = src*///THIS IS FUCKING POINTLESS BECAUSE OF ON-LIFE() FUCKING RESET_VIEW() AHHHHHHHHHHGGGGGGGGGG
|
||||
M.forceMove(src)
|
||||
occupant = M
|
||||
icon_state = "body_scanner_1"
|
||||
@@ -159,9 +156,6 @@
|
||||
/obj/machinery/bodyscanner/proc/go_out()
|
||||
if(!occupant || locked)
|
||||
return
|
||||
if(occupant.client)
|
||||
occupant.client.eye = occupant.client.mob
|
||||
occupant.client.perspective = MOB_PERSPECTIVE
|
||||
occupant.forceMove(loc)
|
||||
occupant = null
|
||||
icon_state = "body_scanner_0"
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
for(var/mob/O in mob_list)
|
||||
if(O.client && O.client.eye == src)
|
||||
O.unset_machine()
|
||||
O.reset_view(null)
|
||||
O.reset_perspective(null)
|
||||
to_chat(O, "The screen bursts into static.")
|
||||
..()
|
||||
|
||||
@@ -279,7 +279,7 @@
|
||||
for(var/mob/O in player_list)
|
||||
if(O.client && O.client.eye == src)
|
||||
O.unset_machine()
|
||||
O.reset_view(null)
|
||||
O.reset_perspective(null)
|
||||
to_chat(O, "The screen bursts into static.")
|
||||
|
||||
/obj/machinery/camera/proc/triggerCameraAlarm(var/duration = 0)
|
||||
@@ -387,6 +387,20 @@
|
||||
cam["z"] = 0
|
||||
return cam
|
||||
|
||||
/obj/machinery/camera/get_remote_view_fullscreens(mob/user)
|
||||
if(view_range == short_range) //unfocused
|
||||
user.overlay_fullscreen("remote_view", /obj/screen/fullscreen/impaired, 2)
|
||||
|
||||
/obj/machinery/camera/update_remote_sight(mob/living/user)
|
||||
user.see_invisible = SEE_INVISIBLE_LIVING //can't see ghosts through cameras
|
||||
if(isXRay())
|
||||
user.sight |= (SEE_TURFS|SEE_MOBS|SEE_OBJS)
|
||||
user.see_in_dark = max(user.see_in_dark, 8)
|
||||
else
|
||||
user.sight = 0
|
||||
user.see_in_dark = 2
|
||||
return 1
|
||||
|
||||
/obj/machinery/camera/portable //Cameras which are placed inside of things, such as helmets.
|
||||
var/turf/prev_turf
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
/obj/machinery/computer/security/check_eye(var/mob/user as mob)
|
||||
if((get_dist(user, src) > 1 || !( user.canmove ) || user.blinded || !( current ) || !( current.status )) && (!istype(user, /mob/living/silicon)))
|
||||
return null
|
||||
user.reset_view(current)
|
||||
user.reset_perspective(current)
|
||||
return 1
|
||||
|
||||
// Network configuration
|
||||
|
||||
@@ -41,61 +41,73 @@
|
||||
return
|
||||
if(!iscarbon(user))
|
||||
return
|
||||
var/mob/living/carbon/L = user
|
||||
|
||||
if(!current_user)
|
||||
user.set_machine(src)
|
||||
if(!eyeobj)
|
||||
CreateEye()
|
||||
GrantActions(user)
|
||||
current_user = user
|
||||
eyeobj.user = user
|
||||
eyeobj.name = "Camera Eye ([user.name])"
|
||||
L.remote_view = 1
|
||||
L.remote_control = eyeobj
|
||||
L.client.perspective = EYE_PERSPECTIVE
|
||||
if(!eyeobj.initialized)
|
||||
for(var/obj/machinery/camera/C in cameranet.cameras)
|
||||
if(!C.can_use())
|
||||
continue
|
||||
if(C.network&networks)
|
||||
eyeobj.setLoc(get_turf(C))
|
||||
break
|
||||
eyeobj.initialized = 1
|
||||
else
|
||||
eyeobj.setLoc(eyeobj.loc)
|
||||
else
|
||||
if(current_user)
|
||||
to_chat(user, "The console is already in use!")
|
||||
return
|
||||
|
||||
user.set_machine(src)
|
||||
if(!eyeobj)
|
||||
CreateEye()
|
||||
if(!eyeobj.initialized)
|
||||
var/camera_location
|
||||
for(var/obj/machinery/camera/C in cameranet.cameras)
|
||||
if(!C.can_use())
|
||||
continue
|
||||
if(C.network&networks)
|
||||
camera_location = get_turf(C)
|
||||
break
|
||||
if(camera_location)
|
||||
eyeobj.initialized = 1
|
||||
give_eye_control(user)
|
||||
eyeobj.setLoc(camera_location)
|
||||
else
|
||||
// An abberant case - silent failure is obnoxious
|
||||
to_chat(user, "<span class='warning'>ERROR: No linked and active camera network found.</span>")
|
||||
user.unset_machine()
|
||||
else
|
||||
give_eye_control(user)
|
||||
|
||||
|
||||
/obj/machinery/computer/camera_advanced/proc/give_eye_control(mob/user)
|
||||
GrantActions(user)
|
||||
current_user = user
|
||||
eyeobj.eye_user = user
|
||||
eyeobj.name = "Camera Eye ([user.name])"
|
||||
// This should be able to be excised once the full view refactor rolls out
|
||||
user.remote_view = 1
|
||||
user.remote_control = eyeobj
|
||||
user.reset_perspective(eyeobj)
|
||||
eyeobj.setLoc(eyeobj.loc)
|
||||
|
||||
/mob/camera/aiEye/remote
|
||||
name = "Inactive Camera Eye"
|
||||
var/sprint = 10
|
||||
var/cooldown = 0
|
||||
var/acceleration = 1
|
||||
var/mob/living/carbon/human/user = null
|
||||
var/mob/living/carbon/human/eye_user = null
|
||||
var/obj/machinery/computer/camera_advanced/origin
|
||||
var/initialized = 0
|
||||
var/visible_icon = 0
|
||||
var/image/user_image = null
|
||||
|
||||
/mob/camera/aiEye/remote/GetViewerClient()
|
||||
if(user)
|
||||
return user.client
|
||||
if(eye_user)
|
||||
return eye_user.client
|
||||
return null
|
||||
|
||||
/mob/camera/aiEye/remote/setLoc(T)
|
||||
if(user)
|
||||
if(!isturf(user.loc))
|
||||
if(eye_user)
|
||||
if(!isturf(eye_user.loc))
|
||||
return
|
||||
T = get_turf(T)
|
||||
loc = T
|
||||
cameranet.visibility(src)
|
||||
if(user.client)
|
||||
if(eye_user.client)
|
||||
if(visible_icon)
|
||||
user.client.images -= user_image
|
||||
eye_user.client.images -= user_image
|
||||
user_image = image(icon,loc,icon_state,FLY_LAYER)
|
||||
user.client.images += user_image
|
||||
user.client.eye = src
|
||||
eye_user.client.images += user_image
|
||||
eye_user.client.eye = src
|
||||
|
||||
/mob/camera/aiEye/remote/relaymove(mob/user,direct)
|
||||
var/initial = initial(sprint)
|
||||
@@ -127,10 +139,9 @@
|
||||
C.remote_view = 0
|
||||
remote_eye.origin.current_user = null
|
||||
remote_eye.origin.jump_action.Remove(C)
|
||||
remote_eye.user = null
|
||||
remote_eye.eye_user = null
|
||||
C.reset_perspective(null)
|
||||
if(C.client)
|
||||
C.client.perspective = MOB_PERSPECTIVE
|
||||
C.client.eye = src
|
||||
C.client.images -= remote_eye.user_image
|
||||
for(var/datum/camerachunk/chunk in remote_eye.visibleCameraChunks)
|
||||
C.client.images -= chunk.obscured
|
||||
|
||||
@@ -398,9 +398,6 @@
|
||||
/obj/machinery/atmospherics/unary/cryo_cell/proc/go_out()
|
||||
if(!occupant)
|
||||
return
|
||||
if(occupant.client)
|
||||
occupant.client.eye = occupant.client.mob
|
||||
occupant.client.perspective = MOB_PERSPECTIVE
|
||||
occupant.forceMove(get_step(loc, SOUTH)) //this doesn't account for walls or anything, but i don't forsee that being a problem.
|
||||
if(occupant.bodytemperature < 261 && occupant.bodytemperature >= 70) //Patch by Aranclanos to stop people from taking burn damage after being ejected
|
||||
occupant.bodytemperature = 261
|
||||
@@ -423,9 +420,6 @@
|
||||
if(!node)
|
||||
to_chat(usr, "\red The cell is not correctly connected to its pipe network!")
|
||||
return
|
||||
if(M.client)
|
||||
M.client.perspective = EYE_PERSPECTIVE
|
||||
M.client.eye = src
|
||||
M.stop_pulling()
|
||||
M.forceMove(src)
|
||||
if(M.health > -100 && (M.health < 0 || M.sleeping))
|
||||
@@ -486,3 +480,9 @@
|
||||
|
||||
/datum/data/function/proc/display()
|
||||
return
|
||||
|
||||
/obj/machinery/atmospherics/components/unary/cryo_cell/get_remote_view_fullscreens(mob/user)
|
||||
user.overlay_fullscreen("remote_view", /obj/screen/fullscreen/impaired, 1)
|
||||
|
||||
/obj/machinery/atmospherics/components/unary/cryo_cell/update_remote_sight(mob/living/user)
|
||||
return //we don't see the pipe network while inside cryo.
|
||||
|
||||
@@ -442,11 +442,7 @@
|
||||
to_chat(user, "<span class='boldnotice'>\The [src] is in use.</span>")
|
||||
return
|
||||
|
||||
M.loc = src
|
||||
|
||||
if(M.client)
|
||||
M.client.perspective = EYE_PERSPECTIVE
|
||||
M.client.eye = src
|
||||
M.forceMove(src)
|
||||
|
||||
time_till_despawn = initial(time_till_despawn) / willing
|
||||
|
||||
@@ -540,12 +536,8 @@
|
||||
if(src.occupant)
|
||||
to_chat(user, "<span class='boldnotice'>\The [src] is in use.</span>")
|
||||
return
|
||||
L.loc = src
|
||||
L.forceMove(src)
|
||||
time_till_despawn = initial(time_till_despawn) / willing
|
||||
|
||||
if(L.client)
|
||||
L.client.perspective = EYE_PERSPECTIVE
|
||||
L.client.eye = src
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You stop [L == user ? "climbing into the cryo pod." : "putting [L] into the cryo pod."]</span>")
|
||||
return
|
||||
@@ -637,9 +629,7 @@
|
||||
return
|
||||
|
||||
usr.stop_pulling()
|
||||
usr.client.perspective = EYE_PERSPECTIVE
|
||||
usr.client.eye = src
|
||||
usr.loc = src
|
||||
usr.forceMove(src)
|
||||
src.occupant = usr
|
||||
time_till_despawn = initial(time_till_despawn) / willing_time_divisor
|
||||
|
||||
@@ -662,11 +652,7 @@
|
||||
if(!occupant)
|
||||
return
|
||||
|
||||
if(occupant.client)
|
||||
occupant.client.eye = src.occupant.client.mob
|
||||
occupant.client.perspective = MOB_PERSPECTIVE
|
||||
|
||||
occupant.loc = get_turf(src)
|
||||
occupant.forceMove(get_turf(src))
|
||||
occupant = null
|
||||
|
||||
if(orient_right)
|
||||
|
||||
@@ -297,10 +297,8 @@
|
||||
O.loc = loc
|
||||
for(var/mob/M in contents)
|
||||
M.loc = loc
|
||||
if(M.client)
|
||||
M.client.eye = M.client.mob
|
||||
M.client.perspective = MOB_PERSPECTIVE
|
||||
to_chat(M, "\blue The machine turns off, and you fall out.")
|
||||
M.reset_perspective(null)
|
||||
to_chat(M, "<span class='notice'>The machine turns off, and you fall out.</span>")
|
||||
|
||||
return
|
||||
|
||||
|
||||
@@ -166,17 +166,12 @@
|
||||
H.updatehealth()
|
||||
|
||||
/obj/machinery/recharge_station/proc/go_out()
|
||||
if(!( src.occupant ))
|
||||
if(!occupant)
|
||||
return
|
||||
//for(var/obj/O in src)
|
||||
// O.loc = src.loc
|
||||
if(src.occupant.client)
|
||||
src.occupant.client.eye = src.occupant.client.mob
|
||||
src.occupant.client.perspective = MOB_PERSPECTIVE
|
||||
src.occupant.loc = src.loc
|
||||
src.occupant = null
|
||||
occupant.forceMove(loc)
|
||||
occupant = null
|
||||
build_icon()
|
||||
src.use_power = 1
|
||||
use_power = 1
|
||||
return
|
||||
|
||||
/obj/machinery/recharge_station/proc/restock_modules()
|
||||
@@ -300,9 +295,6 @@
|
||||
return
|
||||
|
||||
user.stop_pulling()
|
||||
if(user && user.client)
|
||||
user.client.perspective = EYE_PERSPECTIVE
|
||||
user.client.eye = src
|
||||
user.forceMove(src)
|
||||
occupant = user
|
||||
|
||||
|
||||
@@ -430,27 +430,21 @@
|
||||
|
||||
|
||||
/obj/machinery/suit_storage_unit/proc/eject_occupant(mob/user as mob)
|
||||
if(src.islocked)
|
||||
if(islocked)
|
||||
return
|
||||
|
||||
if(!src.OCCUPANT)
|
||||
if(!OCCUPANT)
|
||||
return
|
||||
// for(var/obj/O in src)
|
||||
// O.loc = src.loc
|
||||
|
||||
if(src.OCCUPANT.client)
|
||||
if(user != OCCUPANT)
|
||||
to_chat(OCCUPANT, "<font color='blue'>The machine kicks you out!</font>")
|
||||
if(user.loc != src.loc)
|
||||
to_chat(OCCUPANT, "<font color='blue'>You leave the not-so-cozy confines of the SSU.</font>")
|
||||
|
||||
src.OCCUPANT.client.eye = src.OCCUPANT.client.mob
|
||||
src.OCCUPANT.client.perspective = MOB_PERSPECTIVE
|
||||
src.OCCUPANT.loc = src.loc
|
||||
src.OCCUPANT = null
|
||||
if(!src.isopen)
|
||||
src.isopen = 1
|
||||
src.update_icon()
|
||||
if(user != OCCUPANT)
|
||||
to_chat(OCCUPANT, "<font color='blue'>The machine kicks you out!</font>")
|
||||
if(user.loc != loc)
|
||||
to_chat(OCCUPANT, "<font color='blue'>You leave the not-so-cozy confines of the SSU.</font>")
|
||||
OCCUPANT.forceMove(loc)
|
||||
OCCUPANT = null
|
||||
if(!isopen)
|
||||
isopen = 1
|
||||
update_icon()
|
||||
return
|
||||
|
||||
|
||||
@@ -487,9 +481,7 @@
|
||||
visible_message("[usr] starts squeezing into the suit storage unit!")
|
||||
if(do_after(usr, 10, target = usr))
|
||||
usr.stop_pulling()
|
||||
usr.client.perspective = EYE_PERSPECTIVE
|
||||
usr.client.eye = src
|
||||
usr.loc = src
|
||||
usr.forceMove(src)
|
||||
// usr.metabslow = 1
|
||||
src.OCCUPANT = usr
|
||||
src.isopen = 0 //Close the thing after the guy gets inside
|
||||
@@ -532,10 +524,7 @@
|
||||
if(do_after(user, 20, target = G:affecting))
|
||||
if(!G || !G.affecting) return //derpcheck
|
||||
var/mob/M = G.affecting
|
||||
if(M.client)
|
||||
M.client.perspective = EYE_PERSPECTIVE
|
||||
M.client.eye = src
|
||||
M.loc = src
|
||||
M.forceMove(src)
|
||||
src.OCCUPANT = M
|
||||
src.isopen = 0 //close ittt
|
||||
|
||||
@@ -690,10 +679,7 @@
|
||||
if(do_after(user, 20, target = G:affecting))
|
||||
if(!G || !G.affecting) return
|
||||
var/mob/M = G.affecting
|
||||
if(M.client)
|
||||
M.client.perspective = EYE_PERSPECTIVE
|
||||
M.client.eye = src
|
||||
M.loc = src
|
||||
M.forceMove(src)
|
||||
src.occupant = M
|
||||
|
||||
src.add_fingerprint(user)
|
||||
@@ -999,16 +985,12 @@
|
||||
if(!occupant)
|
||||
return
|
||||
|
||||
if(occupant.client)
|
||||
occupant.client.eye = occupant.client.mob
|
||||
occupant.client.perspective = MOB_PERSPECTIVE
|
||||
|
||||
occupant.loc = get_turf(occupant)
|
||||
occupant.forceMove(loc)
|
||||
occupant = null
|
||||
|
||||
add_fingerprint(usr)
|
||||
src.updateUsrDialog()
|
||||
src.update_icon()
|
||||
updateUsrDialog()
|
||||
update_icon()
|
||||
|
||||
return
|
||||
/*
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/Destroy()//missiles detonating, teleporter creating singularity?
|
||||
if(chassis)
|
||||
detach(chassis)
|
||||
chassis.equipment -= src
|
||||
listclearnulls(chassis.equipment)
|
||||
if(chassis.selected == src)
|
||||
|
||||
@@ -115,12 +115,22 @@
|
||||
equip_cooldown = 30
|
||||
var/scanning = 0
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/mining_scanner/New()
|
||||
/obj/item/mecha_parts/mecha_equipment/mining_scanner/attach(obj/mecha/M)
|
||||
. = ..()
|
||||
processing_objects.Add(src)
|
||||
M.occupant_sight_flags |= SEE_TURFS
|
||||
if(M.occupant)
|
||||
M.occupant.update_sight()
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/mining_scanner/detach()
|
||||
chassis.occupant_sight_flags &= ~SEE_TURFS
|
||||
processing_objects.Remove(src)
|
||||
if(chassis.occupant)
|
||||
chassis.occupant.update_sight()
|
||||
return ..()
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/mining_scanner/process()
|
||||
if(!loc)
|
||||
processing_objects.Remove(src)
|
||||
qdel(src)
|
||||
if(scanning)
|
||||
return
|
||||
|
||||
@@ -65,6 +65,7 @@
|
||||
var/max_equip = 3
|
||||
var/datum/events/events
|
||||
var/turf/crashing = null
|
||||
var/occupant_sight_flags = 0
|
||||
|
||||
|
||||
var/stepsound = 'sound/mecha/mechstep.ogg'
|
||||
@@ -1128,7 +1129,7 @@
|
||||
occupant = H
|
||||
H.stop_pulling()
|
||||
H.forceMove(src)
|
||||
H.reset_view(src)
|
||||
H.reset_perspective(src)
|
||||
add_fingerprint(H)
|
||||
//GrantActions(H, human_occupant=1)
|
||||
forceMove(loc)
|
||||
@@ -1177,13 +1178,9 @@
|
||||
to_chat(user, "<span class='notice'>\the [mmi_as_oc] is stuck to your hand, you cannot put it in \the [src]</span>")
|
||||
return 0
|
||||
var/mob/brainmob = mmi_as_oc.brainmob
|
||||
brainmob.reset_view(src)
|
||||
/*
|
||||
brainmob.client.eye = src
|
||||
brainmob.client.perspective = EYE_PERSPECTIVE
|
||||
*/
|
||||
brainmob.reset_perspective(src)
|
||||
occupant = brainmob
|
||||
brainmob.loc = src //should allow relaymove
|
||||
brainmob.forceMove(src) //should allow relaymove
|
||||
brainmob.canmove = 1
|
||||
mmi_as_oc.loc = src
|
||||
mmi_as_oc.mecha = src
|
||||
@@ -1266,7 +1263,7 @@
|
||||
var/obj/item/device/mmi/mmi = mob_container
|
||||
if(mmi.brainmob)
|
||||
L.loc = mmi
|
||||
L.reset_view()
|
||||
L.reset_perspective()
|
||||
mmi.mecha = null
|
||||
mmi.update_icon()
|
||||
L.canmove = 0
|
||||
@@ -1440,3 +1437,8 @@
|
||||
|
||||
/obj/mecha/speech_bubble(var/bubble_state = "",var/bubble_loc = src, var/list/bubble_recipients = list())
|
||||
flick_overlay(image('icons/mob/talk.dmi', bubble_loc, bubble_state,MOB_LAYER+1), bubble_recipients, 30)
|
||||
|
||||
/obj/mecha/update_remote_sight(mob/living/user)
|
||||
if(occupant_sight_flags)
|
||||
if(user == occupant)
|
||||
user.sight |= occupant_sight_flags
|
||||
|
||||
@@ -61,8 +61,8 @@
|
||||
M.adjust_fire_stacks(1)
|
||||
M.IgniteMob()
|
||||
|
||||
/atom/movable/proc/unbuckle_mob()
|
||||
if(buckled_mob && buckled_mob.buckled == src && buckled_mob.can_unbuckle(usr))
|
||||
/atom/movable/proc/unbuckle_mob(force = FALSE)
|
||||
if(buckled_mob && buckled_mob.buckled == src && (buckled_mob.can_unbuckle(usr) || force))
|
||||
. = buckled_mob
|
||||
buckled_mob.buckled = null
|
||||
buckled_mob.anchored = initial(buckled_mob.anchored)
|
||||
@@ -72,7 +72,6 @@
|
||||
|
||||
post_buckle_mob(.)
|
||||
|
||||
|
||||
//Handle any extras after buckling/unbuckling
|
||||
//Called on buckle_mob() and unbuckle_mob()
|
||||
/atom/movable/proc/post_buckle_mob(mob/living/M)
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
|
||||
/obj/item/device/camera_bug/check_eye(var/mob/user as mob)
|
||||
if(user.stat || loc != user || !user.canmove || !user.has_vision() || !current)
|
||||
user.reset_view(null)
|
||||
user.reset_perspective(null)
|
||||
user.unset_machine()
|
||||
return null
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
if(T.z != current.z || !current.can_use())
|
||||
to_chat(user, "<span class='danger'>[src] has lost the signal.</span>")
|
||||
current = null
|
||||
user.reset_view(null)
|
||||
user.reset_perspective(null)
|
||||
user.unset_machine()
|
||||
return null
|
||||
|
||||
@@ -184,7 +184,7 @@
|
||||
/obj/item/device/camera_bug/Topic(var/href,var/list/href_list)
|
||||
if(usr != loc)
|
||||
usr.unset_machine()
|
||||
usr.reset_view(null)
|
||||
usr.reset_perspective(null)
|
||||
usr << browse(null, "window=camerabug")
|
||||
return
|
||||
usr.set_machine(src)
|
||||
@@ -195,7 +195,7 @@
|
||||
if(C)
|
||||
track_mode = BUGMODE_MONITOR
|
||||
current = C
|
||||
usr.reset_view(null)
|
||||
usr.reset_perspective(null)
|
||||
interact()
|
||||
if("track" in href_list)
|
||||
var/atom/A = locate(href_list["track"])
|
||||
@@ -214,7 +214,7 @@
|
||||
interact()
|
||||
return
|
||||
if("close" in href_list)
|
||||
usr.reset_view(null)
|
||||
usr.reset_perspective(null)
|
||||
usr.unset_machine()
|
||||
current = null
|
||||
return // I do not <- I do not remember what I was going to write in this comment -Sayu, sometime later
|
||||
@@ -231,16 +231,16 @@
|
||||
current = C
|
||||
spawn(6)
|
||||
if(src.check_eye(usr))
|
||||
usr.reset_view(C)
|
||||
usr.reset_perspective(C)
|
||||
interact()
|
||||
else
|
||||
usr.unset_machine()
|
||||
usr.reset_view(null)
|
||||
usr.reset_perspective(null)
|
||||
usr << browse(null, "window=camerabug")
|
||||
return
|
||||
else
|
||||
usr.unset_machine()
|
||||
usr.reset_view(null)
|
||||
usr.reset_perspective(null)
|
||||
|
||||
interact()
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
A.loc = active_dummy.loc
|
||||
if(ismob(A))
|
||||
var/mob/M = A
|
||||
M.reset_view(null)
|
||||
M.reset_perspective(null)
|
||||
|
||||
/obj/effect/dummy/chameleon
|
||||
name = ""
|
||||
|
||||
@@ -55,9 +55,7 @@
|
||||
|
||||
for(var/mob/M in src) //Should only be one but whatever.
|
||||
M.loc = src.loc
|
||||
if(M.client)
|
||||
M.client.eye = M.client.mob
|
||||
M.client.perspective = MOB_PERSPECTIVE
|
||||
M.reset_perspective(null)
|
||||
|
||||
qdel(src)
|
||||
|
||||
|
||||
@@ -94,10 +94,7 @@
|
||||
return
|
||||
if(M == occupant) // so that the guy inside can't eject himself -Agouri
|
||||
return
|
||||
if(src.occupant.client)
|
||||
src.occupant.client.eye = src.occupant.client.mob
|
||||
src.occupant.client.perspective = MOB_PERSPECTIVE
|
||||
src.occupant.loc = src.loc
|
||||
occupant.forceMove(loc)
|
||||
if(injecting)
|
||||
implant(src.occupant)
|
||||
injecting = 0
|
||||
@@ -113,11 +110,8 @@
|
||||
if(src.occupant)
|
||||
to_chat(usr, "<span class='warning'>The [src.name] is already occupied!</span>")
|
||||
return
|
||||
if(M.client)
|
||||
M.client.perspective = EYE_PERSPECTIVE
|
||||
M.client.eye = src
|
||||
M.stop_pulling()
|
||||
M.loc = src
|
||||
M.forceMove(src)
|
||||
src.occupant = M
|
||||
src.add_fingerprint(usr)
|
||||
icon_state = "implantchair_on"
|
||||
|
||||
@@ -58,13 +58,11 @@
|
||||
|
||||
for(var/mob/M in src)
|
||||
moveMob(M, loc)
|
||||
if(M.client)
|
||||
M.client.eye = M.client.mob
|
||||
M.client.perspective = MOB_PERSPECTIVE
|
||||
|
||||
/obj/structure/closet/proc/moveMob(var/mob/M, var/atom/destination)
|
||||
loc.Exited(M)
|
||||
M.loc = destination
|
||||
M.reset_perspective(destination)
|
||||
if(isturf(loc))
|
||||
loc.Entered(M, src, ignoreRest = 1)
|
||||
else
|
||||
@@ -122,10 +120,6 @@
|
||||
if(M.buckled)
|
||||
continue
|
||||
|
||||
if(M.client)
|
||||
M.client.perspective = EYE_PERSPECTIVE
|
||||
M.client.eye = src
|
||||
|
||||
moveMob(M, src)
|
||||
itemcount++
|
||||
|
||||
@@ -428,3 +422,7 @@
|
||||
..()
|
||||
visible_message("<span class='danger'>[src] is blown apart by the bolt of electricity!</span>", "<span class='danger'>You hear a metallic screeching sound.</span>")
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/closet/get_remote_view_fullscreens(mob/user)
|
||||
if(user.stat == DEAD || !(user.sight & (SEEOBJS|SEEMOBS)))
|
||||
user.overlay_fullscreen("remote_view", /obj/screen/fullscreen/impaired, 1)
|
||||
|
||||
@@ -18,10 +18,7 @@
|
||||
if(L.buckled)
|
||||
L.buckled = 0
|
||||
L.anchored = 0
|
||||
if(L.client)
|
||||
L.client.perspective = EYE_PERSPECTIVE
|
||||
L.client.eye = src
|
||||
L.loc = src
|
||||
L.forceMove(src)
|
||||
L.disabilities += MUTE
|
||||
health = L.health + 100 //stoning damaged mobs will result in easier to shatter statues
|
||||
intialTox = L.getToxLoss()
|
||||
@@ -76,12 +73,9 @@
|
||||
O.loc = src.loc
|
||||
|
||||
for(var/mob/living/M in src)
|
||||
M.loc = src.loc
|
||||
M.forceMove(loc)
|
||||
M.disabilities -= MUTE
|
||||
M.take_overall_damage((M.health - health - 100),0) //any new damage the statue incurred is transfered to the mob
|
||||
if(M.client)
|
||||
M.client.eye = M.client.mob
|
||||
M.client.perspective = MOB_PERSPECTIVE
|
||||
|
||||
|
||||
/obj/structure/closet/statue/open()
|
||||
@@ -164,4 +158,4 @@ obj/structure/statue/angel
|
||||
icon_state = "angelseen"
|
||||
|
||||
obj/structure/statue/corgi
|
||||
icon_state = "corgi"
|
||||
icon_state = "corgi"
|
||||
|
||||
@@ -154,6 +154,10 @@
|
||||
src.attack_hand(CM)
|
||||
|
||||
|
||||
/obj/structure/morgue/get_remote_view_fullscreens(mob/user)
|
||||
if(user.stat == DEAD || !(user.sight & (SEEOBJS|SEEMOBS)))
|
||||
user.overlay_fullscreen("remote_view", /obj/screen/fullscreen/impaired, 2)
|
||||
|
||||
/*
|
||||
* Morgue tray
|
||||
*/
|
||||
@@ -393,6 +397,10 @@
|
||||
to_chat(CM, "<span class='alert'>You attempt to slide yourself out of \the [src]...</span>")
|
||||
src.attack_hand(CM)
|
||||
|
||||
/obj/structure/crematorium/get_remote_view_fullscreens(mob/user)
|
||||
if(user.stat == DEAD || !(user.sight & (SEEOBJS|SEEMOBS)))
|
||||
user.overlay_fullscreen("remote_view", /obj/screen/fullscreen/impaired, 2)
|
||||
|
||||
/*
|
||||
* Crematorium tray
|
||||
*/
|
||||
|
||||
@@ -147,7 +147,7 @@
|
||||
if(!(locate(/obj/structure/transit_tube) in loc))
|
||||
mob.loc = loc
|
||||
mob.client.Move(get_step(loc, direction), direction)
|
||||
mob.reset_view(null)
|
||||
mob.reset_perspective(null)
|
||||
|
||||
//if(moving && istype(loc, /turf/space))
|
||||
// Todo: If you get out of a moving pod in space, you should move as well.
|
||||
@@ -161,7 +161,7 @@
|
||||
if(station.icon_state == "open")
|
||||
mob.loc = loc
|
||||
mob.client.Move(get_step(loc, direction), direction)
|
||||
mob.reset_view(null)
|
||||
mob.reset_perspective(null)
|
||||
|
||||
else
|
||||
station.open_animation()
|
||||
|
||||
@@ -2235,14 +2235,6 @@
|
||||
qdel(O)
|
||||
for(var/obj/structure/grille/O in world)
|
||||
qdel(O)
|
||||
/* for(var/obj/machinery/vehicle/pod/O in world)
|
||||
for(var/mob/M in src)
|
||||
M.loc = src.loc
|
||||
if(M.client)
|
||||
M.client.perspective = MOB_PERSPECTIVE
|
||||
M.client.eye = M
|
||||
qdel(O)
|
||||
ok = 1*/
|
||||
if("monkey")
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","M")
|
||||
|
||||
@@ -151,6 +151,8 @@
|
||||
var/emagged = 0
|
||||
var/vision_flags = 0
|
||||
var/darkness_view = 0//Base human is 2
|
||||
var/invis_override = 0
|
||||
var/invis_view = SEE_INVISIBLE_LIVING
|
||||
var/invisa_view = 0
|
||||
var/color_view = null//overrides client.color while worn
|
||||
strip_delay = 20 // but seperated to allow items to protect but not impair vision, like space helmets
|
||||
@@ -343,6 +345,7 @@ BLIND // can't see anything
|
||||
src.loc = user
|
||||
user.wear_mask = null
|
||||
user.put_in_hands(src)
|
||||
H.wear_mask_update(src, toggle_off = mask_adjusted)
|
||||
usr.update_inv_wear_mask()
|
||||
usr.update_inv_head()
|
||||
for(var/X in actions)
|
||||
@@ -707,4 +710,3 @@ BLIND // can't see anything
|
||||
for(var/obj/item/clothing/accessory/A in accessories)
|
||||
A.emp_act(severity)
|
||||
..()
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
//slot_flags = SLOT_EYES
|
||||
//var/vision_flags = 0
|
||||
//var/darkness_view = 0//Base human is 2
|
||||
//var/invisa_view = 0
|
||||
var/prescription = 0
|
||||
var/prescription_upgradable = 0
|
||||
var/see_darkness = 1
|
||||
@@ -360,7 +359,9 @@
|
||||
to_chat(usr, "You push the [src] up out of your face.")
|
||||
flash_protect = 0
|
||||
tint = 0
|
||||
usr.update_inv_glasses()
|
||||
var/mob/living/carbon/user = usr
|
||||
user.update_inv_glasses()
|
||||
user.update_tint()
|
||||
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
|
||||
@@ -67,6 +67,8 @@
|
||||
to_chat(usr, "You push the [src] up out of your face.")
|
||||
flash_protect = 0
|
||||
tint = 0
|
||||
var/mob/living/carbon/C = usr
|
||||
C.update_tint()
|
||||
usr.update_inv_head() //so our mob-overlays update
|
||||
|
||||
for(var/X in actions)
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
user.unset_machine()
|
||||
return null
|
||||
|
||||
user.reset_view(S.current)
|
||||
user.reset_perspective(S.current)
|
||||
return 1
|
||||
|
||||
/*
|
||||
|
||||
@@ -237,7 +237,7 @@
|
||||
computer.update_icon()
|
||||
for(var/mob/living/L in viewers(1))
|
||||
if(!istype(L,/mob/living/silicon/ai) && L.machine == src)
|
||||
L.reset_view(null)
|
||||
L.reset_perspective(null)
|
||||
|
||||
|
||||
Reset()
|
||||
@@ -245,7 +245,7 @@
|
||||
current = null
|
||||
for(var/mob/living/L in viewers(1))
|
||||
if(!istype(L,/mob/living/silicon/ai) && L.machine == src)
|
||||
L.reset_view(null)
|
||||
L.reset_perspective(null)
|
||||
|
||||
interact()
|
||||
if(!interactable())
|
||||
@@ -265,7 +265,7 @@
|
||||
return
|
||||
|
||||
if(computer.camnet.verify_machine(current))
|
||||
usr.reset_view(current)
|
||||
usr.reset_perspective(current)
|
||||
|
||||
if(world.time - last_camera_refresh > 50 || !camera_list)
|
||||
last_camera_refresh = world.time
|
||||
@@ -302,13 +302,13 @@
|
||||
var/obj/machinery/camera/C = locate(href_list["show"])
|
||||
if(istype(C) && C.status)
|
||||
current = C
|
||||
usr.reset_view(C)
|
||||
usr.reset_perspective(C)
|
||||
interact()
|
||||
return
|
||||
|
||||
if("keyselect" in href_list)
|
||||
current = null
|
||||
usr.reset_view(null)
|
||||
usr.reset_perspective(null)
|
||||
key = input(usr,"Select a camera network key:", "Key Select", null) as null|anything in computer.list_files(/datum/file/camnet_key)
|
||||
camera_list = null
|
||||
update_icon()
|
||||
|
||||
@@ -251,9 +251,6 @@
|
||||
/obj/item/device/mobcapsule/proc/dump_contents(mob/user)
|
||||
if(captured)
|
||||
captured.forceMove(get_turf(src))
|
||||
if(captured.client)
|
||||
captured.client.eye = captured.client.mob
|
||||
captured.client.perspective = MOB_PERSPECTIVE
|
||||
captured = null
|
||||
|
||||
/obj/item/device/mobcapsule/attack_self(mob/user)
|
||||
@@ -530,4 +527,4 @@
|
||||
if(do_after(user, 20, target = src))
|
||||
new /obj/item/stack/rods(loc)
|
||||
qdel(src)
|
||||
return ..()
|
||||
return ..()
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
var/atom/movable/mob_container
|
||||
mob_container = M
|
||||
mob_container.forceMove(get_turf(src))
|
||||
M.reset_view()
|
||||
M.reset_perspective()
|
||||
|
||||
qdel(src)
|
||||
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
/mob/living/carbon/alien/humanoid/Login()
|
||||
..()
|
||||
if(!isturf(loc))
|
||||
client.eye = loc
|
||||
client.perspective = EYE_PERSPECTIVE
|
||||
return
|
||||
@@ -31,21 +31,31 @@
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/alien/update_sight()
|
||||
if(stat == DEAD || (XRAY in mutations))
|
||||
sight |= SEE_TURFS
|
||||
sight |= SEE_MOBS
|
||||
sight |= SEE_OBJS
|
||||
if(!client)
|
||||
return
|
||||
if(stat == DEAD)
|
||||
grant_death_vision()
|
||||
return
|
||||
|
||||
sight = SEE_MOBS
|
||||
if(nightvision)
|
||||
see_in_dark = 8
|
||||
see_invisible = SEE_INVISIBLE_MINIMUM
|
||||
else
|
||||
see_in_dark = 4
|
||||
see_invisible = SEE_INVISIBLE_LEVEL_TWO
|
||||
else if(stat != DEAD)
|
||||
sight |= SEE_MOBS
|
||||
sight &= ~SEE_TURFS
|
||||
sight &= ~SEE_OBJS
|
||||
if(nightvision)
|
||||
see_in_dark = 8
|
||||
see_invisible = SEE_INVISIBLE_MINIMUM
|
||||
else if(!nightvision)
|
||||
see_in_dark = 4
|
||||
see_invisible = 45
|
||||
if(see_override)
|
||||
see_invisible = see_override
|
||||
|
||||
if(client.eye != src)
|
||||
var/atom/A = client.eye
|
||||
if(A.update_remote_sight(src)) //returns 1 if we override all other sight updates.
|
||||
return
|
||||
|
||||
for(var/obj/item/organ/internal/cyberimp/eyes/E in internal_organs)
|
||||
sight |= E.vision_flags
|
||||
if(E.dark_view)
|
||||
see_in_dark = max(see_in_dark, E.dark_view)
|
||||
if(E.see_invisible)
|
||||
see_invisible = min(see_invisible, E.see_invisible)
|
||||
|
||||
if(see_override)
|
||||
see_invisible = see_override
|
||||
|
||||
@@ -62,22 +62,5 @@
|
||||
|
||||
. = 1
|
||||
|
||||
/mob/living/carbon/brain/handle_vision()
|
||||
..()
|
||||
|
||||
if(stat == 2 || (XRAY in src.mutations))
|
||||
sight |= SEE_TURFS
|
||||
sight |= SEE_MOBS
|
||||
sight |= SEE_OBJS
|
||||
see_in_dark = 8
|
||||
see_invisible = SEE_INVISIBLE_LEVEL_TWO
|
||||
else if(stat != 2)
|
||||
sight &= ~SEE_TURFS
|
||||
sight &= ~SEE_MOBS
|
||||
sight &= ~SEE_OBJS
|
||||
see_in_dark = 2
|
||||
see_invisible = SEE_INVISIBLE_LIVING
|
||||
handle_hud_icons_health()
|
||||
|
||||
/mob/living/carbon/brain/breathe()
|
||||
return
|
||||
|
||||
@@ -1039,3 +1039,49 @@ so that different stomachs can handle things in different ways VB*/
|
||||
/mob/living/carbon/proc/update_internals_hud_icon(internal_state = 0)
|
||||
if(hud_used && hud_used.internals)
|
||||
hud_used.internals.icon_state = "internal[internal_state]"
|
||||
|
||||
//to recalculate and update the mob's total tint from tinted equipment it's wearing.
|
||||
/mob/living/carbon/proc/update_tint()
|
||||
if(!tinted_weldhelh)
|
||||
return
|
||||
var/tinttotal = get_total_tint()
|
||||
if(tinttotal >= TINT_BLIND)
|
||||
overlay_fullscreen("tint", /obj/screen/fullscreen/blind)
|
||||
else if(tinttotal >= TINT_IMPAIR)
|
||||
overlay_fullscreen("tint", /obj/screen/fullscreen/impaired, 2)
|
||||
else
|
||||
clear_fullscreen("tint", 0)
|
||||
|
||||
/mob/living/carbon/proc/get_total_tint()
|
||||
. = 0
|
||||
if(istype(head, /obj/item/clothing/head))
|
||||
var/obj/item/clothing/head/HT = head
|
||||
. += HT.tint
|
||||
if(wear_mask)
|
||||
. += wear_mask.tint
|
||||
|
||||
/mob/living/carbon/human/get_total_tint()
|
||||
. = ..()
|
||||
if(glasses)
|
||||
var/obj/item/clothing/glasses/G = glasses
|
||||
. += G.tint
|
||||
|
||||
|
||||
//handle stuff to update when a mob equips/unequips a mask.
|
||||
/mob/living/proc/wear_mask_update(obj/item/clothing/C, toggle_off = 1)
|
||||
update_inv_wear_mask()
|
||||
|
||||
/mob/living/carbon/wear_mask_update(obj/item/clothing/C, toggle_off = 1)
|
||||
if(C.tint || initial(C.tint))
|
||||
update_tint()
|
||||
update_inv_wear_mask()
|
||||
|
||||
//handle stuff to update when a mob equips/unequips a headgear.
|
||||
/mob/living/carbon/proc/head_update(obj/item/I, forced)
|
||||
if(istype(I, /obj/item/clothing))
|
||||
var/obj/item/clothing/C = I
|
||||
if(C.tint || initial(C.tint))
|
||||
update_tint()
|
||||
if(I.flags_inv & HIDEMASK || forced)
|
||||
update_inv_wear_mask()
|
||||
update_inv_head()
|
||||
|
||||
@@ -721,6 +721,17 @@
|
||||
if(istype(id))
|
||||
return id
|
||||
|
||||
|
||||
|
||||
/mob/living/carbon/human/update_sight()
|
||||
if(!client)
|
||||
return
|
||||
if(stat == DEAD)
|
||||
grant_death_vision()
|
||||
return
|
||||
|
||||
species.update_sight(src)
|
||||
|
||||
//Removed the horrible safety parameter. It was only being used by ninja code anyways.
|
||||
//Now checks siemens_coefficient of the affected area by default
|
||||
/mob/living/carbon/human/electrocute_act(shock_damage, obj/source, siemens_coeff = 1, safety = 0, override = 0, tesla_shock = 0)
|
||||
|
||||
@@ -111,6 +111,13 @@
|
||||
update_inv_gloves()
|
||||
else if(I == glasses)
|
||||
glasses = null
|
||||
var/obj/item/clothing/glasses/G = I
|
||||
if(G.tint)
|
||||
update_tint()
|
||||
if(G.prescription)
|
||||
clear_fullscreen("nearsighted")
|
||||
if(G.vision_flags || G.darkness_view || G.invis_override || G.invis_view)
|
||||
update_sight()
|
||||
update_inv_glasses()
|
||||
else if(I == head)
|
||||
head = null
|
||||
@@ -118,6 +125,7 @@
|
||||
update_hair() //rebuild hair
|
||||
update_fhair()
|
||||
update_head_accessory()
|
||||
head_update(I)
|
||||
update_inv_head()
|
||||
else if(I == r_ear)
|
||||
r_ear = null
|
||||
@@ -140,6 +148,7 @@
|
||||
if(internal)
|
||||
internal = null
|
||||
update_internals_hud_icon(0)
|
||||
wear_mask_update(I, toggle_off = FALSE)
|
||||
sec_hud_set_ID()
|
||||
update_inv_wear_mask()
|
||||
else if(I == wear_id)
|
||||
@@ -203,6 +212,7 @@
|
||||
update_head_accessory(redraw_mob)
|
||||
if(hud_list.len)
|
||||
sec_hud_set_ID()
|
||||
wear_mask_update(W, toggle_off = TRUE)
|
||||
update_inv_wear_mask(redraw_mob)
|
||||
if(slot_handcuffed)
|
||||
handcuffed = W
|
||||
@@ -247,6 +257,14 @@
|
||||
update_inv_ears(redraw_mob)
|
||||
if(slot_glasses)
|
||||
glasses = W
|
||||
var/obj/item/clothing/glasses/G = W
|
||||
if(G.tint)
|
||||
update_tint()
|
||||
if(G.prescription)
|
||||
if(disabilities & NEARSIGHTED)
|
||||
overlay_fullscreen("nearsighted", /obj/screen/fullscreen/impaired, 1)
|
||||
if(G.vision_flags || G.darkness_view || G.invis_override || G.invis_view)
|
||||
update_sight()
|
||||
update_inv_glasses(redraw_mob)
|
||||
if(slot_gloves)
|
||||
gloves = W
|
||||
@@ -257,6 +275,7 @@
|
||||
update_hair(redraw_mob) //rebuild hair
|
||||
update_fhair(redraw_mob)
|
||||
update_head_accessory(redraw_mob)
|
||||
head_update(W)
|
||||
update_inv_head(redraw_mob)
|
||||
if(slot_shoes)
|
||||
shoes = W
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
|
||||
|
||||
#define TINT_IMPAIR 2 //Threshold of tint level to apply weld mask overlay
|
||||
#define TINT_BLIND 3 //Threshold of tint level to obscure vision fully
|
||||
|
||||
/mob/living/carbon/human
|
||||
|
||||
var/pressure_alert = 0
|
||||
@@ -12,11 +9,9 @@
|
||||
var/exposedtimenow = 0
|
||||
var/firstexposed = 0
|
||||
var/heartbeat = 0
|
||||
var/tinttotal = 0 // Total level of visually impairing items
|
||||
|
||||
/mob/living/carbon/human/Life()
|
||||
fire_alert = 0 //Reset this here, because both breathe() and handle_environment() have a chance to set it.
|
||||
tinttotal = tintcheck() //here as both hud updates and status updates call it
|
||||
life_tick++
|
||||
|
||||
in_stasis = 0
|
||||
@@ -899,7 +894,7 @@
|
||||
|
||||
/mob/living/carbon/human/handle_vision()
|
||||
if(machine)
|
||||
if(!machine.check_eye(src)) reset_view(null)
|
||||
if(!machine.check_eye(src)) reset_perspective(null)
|
||||
else
|
||||
var/isRemoteObserve = 0
|
||||
if((REMOTE_VIEW in mutations) && remoteview_target)
|
||||
@@ -924,7 +919,7 @@
|
||||
|
||||
if(!isRemoteObserve && client && !client.adminobs)
|
||||
remoteview_target = null
|
||||
reset_view(null)
|
||||
reset_perspective(null)
|
||||
|
||||
species.handle_vision(src)
|
||||
|
||||
|
||||
@@ -46,6 +46,7 @@
|
||||
|
||||
var/siemens_coeff = 1 //base electrocution coefficient
|
||||
|
||||
var/invis_sight = SEE_INVISIBLE_LIVING
|
||||
var/darksight = 2
|
||||
var/hazard_high_pressure = HAZARD_HIGH_PRESSURE // Dangerously high pressure.
|
||||
var/warning_high_pressure = WARNING_HIGH_PRESSURE // High pressure warning.
|
||||
@@ -470,118 +471,7 @@
|
||||
return 0
|
||||
|
||||
/datum/species/proc/handle_vision(mob/living/carbon/human/H)
|
||||
if(H.stat == DEAD)
|
||||
H.sight |= (SEE_TURFS|SEE_MOBS|SEE_OBJS)
|
||||
H.see_in_dark = 8
|
||||
if(!H.druggy)
|
||||
H.see_invisible = SEE_INVISIBLE_LEVEL_TWO
|
||||
return
|
||||
|
||||
H.sight &= ~(SEE_TURFS|SEE_MOBS|SEE_OBJS)
|
||||
|
||||
H.see_in_dark = darksight //set their variables to default, modify them later
|
||||
H.see_invisible = SEE_INVISIBLE_LIVING
|
||||
|
||||
if(H.mind && H.mind.vampire)
|
||||
if(H.mind.vampire.get_ability(/datum/vampire_passive/full))
|
||||
H.sight |= SEE_TURFS|SEE_MOBS|SEE_OBJS
|
||||
H.see_in_dark = 8
|
||||
H.see_invisible = SEE_INVISIBLE_MINIMUM
|
||||
else if(H.mind.vampire.get_ability(/datum/vampire_passive/vision))
|
||||
H.sight |= SEE_MOBS
|
||||
|
||||
|
||||
if(XRAY in H.mutations)
|
||||
H.sight |= SEE_TURFS|SEE_MOBS|SEE_OBJS
|
||||
H.see_in_dark = 8
|
||||
|
||||
H.see_invisible = SEE_INVISIBLE_MINIMUM
|
||||
|
||||
|
||||
if(H.seer == 1)
|
||||
var/obj/effect/rune/R = locate() in H.loc
|
||||
if(R && R.word1 == cultwords["see"] && R.word2 == cultwords["hell"] && R.word3 == cultwords["join"])
|
||||
H.see_invisible = SEE_INVISIBLE_OBSERVER
|
||||
else
|
||||
H.see_invisible = SEE_INVISIBLE_LIVING
|
||||
H.seer = 0
|
||||
|
||||
//This checks how much the mob's eyewear impairs their vision
|
||||
if(H.tinttotal >= TINT_IMPAIR)
|
||||
if(tinted_weldhelh)
|
||||
H.overlay_fullscreen("tint", /obj/screen/fullscreen/impaired, 2)
|
||||
if(H.tinttotal >= TINT_BLIND)
|
||||
H.EyeBlind(1)
|
||||
else
|
||||
H.clear_fullscreen("tint")
|
||||
|
||||
var/minimum_darkness_view = INFINITY
|
||||
if(H.glasses)
|
||||
if(istype(H.glasses, /obj/item/clothing/glasses))
|
||||
var/obj/item/clothing/glasses/G = H.glasses
|
||||
H.sight |= G.vision_flags
|
||||
|
||||
if(G.darkness_view)
|
||||
H.see_in_dark = G.darkness_view
|
||||
minimum_darkness_view = G.darkness_view
|
||||
|
||||
if(!G.see_darkness)
|
||||
H.see_invisible = SEE_INVISIBLE_MINIMUM
|
||||
|
||||
if(H.head)
|
||||
if(istype(H.head, /obj/item/clothing/head))
|
||||
var/obj/item/clothing/head/hat = H.head
|
||||
H.sight |= hat.vision_flags
|
||||
|
||||
if(hat.darkness_view && hat.darkness_view < minimum_darkness_view) // Pick the lowest of the two darkness_views between the glasses and helmet.
|
||||
H.see_in_dark = hat.darkness_view
|
||||
|
||||
if(!hat.see_darkness)
|
||||
H.see_invisible = SEE_INVISIBLE_MINIMUM
|
||||
|
||||
//switch(hat.HUDType)
|
||||
// if(SECHUD)
|
||||
// process_sec_hud(H,1)
|
||||
// if(MEDHUD)
|
||||
// process_med_hud(H,1)
|
||||
// if(ANTAGHUD)
|
||||
// process_antag_hud(H)
|
||||
|
||||
if(istype(H.back, /obj/item/weapon/rig)) ///ahhhg so snowflakey
|
||||
var/obj/item/weapon/rig/rig = H.back
|
||||
if(rig.visor)
|
||||
if(!rig.helmet || (H.head && rig.helmet == H.head))
|
||||
if(rig.visor && rig.visor.vision && rig.visor.active && rig.visor.vision.glasses)
|
||||
var/obj/item/clothing/glasses/G = rig.visor.vision.glasses
|
||||
if(istype(G))
|
||||
H.see_in_dark = (G.darkness_view ? G.darkness_view : darksight) // Otherwise we keep our darkness view with togglable nightvision.
|
||||
if(G.vision_flags) // MESONS
|
||||
H.sight |= G.vision_flags
|
||||
|
||||
if(!G.see_darkness)
|
||||
H.see_invisible = SEE_INVISIBLE_MINIMUM
|
||||
|
||||
//switch(G.HUDType)
|
||||
// if(SECHUD)
|
||||
// process_sec_hud(H,1)
|
||||
// if(MEDHUD)
|
||||
// process_med_hud(H,1)
|
||||
// if(ANTAGHUD)
|
||||
// process_antag_hud(H)
|
||||
|
||||
if(H.vision_type)
|
||||
H.see_in_dark = max(H.see_in_dark, H.vision_type.see_in_dark, darksight)
|
||||
H.see_invisible = H.vision_type.see_invisible
|
||||
if(H.vision_type.light_sensitive)
|
||||
H.weakeyes = 1
|
||||
H.sight |= H.vision_type.sight_flags
|
||||
|
||||
if(H.see_override) //Override all
|
||||
H.see_invisible = H.see_override
|
||||
|
||||
if(!H.client)
|
||||
return 1
|
||||
|
||||
// Right now this just handles blind, blurry, and similar states
|
||||
if(H.blinded || H.eye_blind)
|
||||
H.overlay_fullscreen("blind", /obj/screen/fullscreen/blind)
|
||||
H.throw_alert("blind", /obj/screen/alert/blind)
|
||||
@@ -684,3 +574,92 @@ It'll return null if the organ doesn't correspond, so include null checks when u
|
||||
if(!(organ_slot in has_organ))
|
||||
return null
|
||||
return has_organ[organ_slot]
|
||||
|
||||
|
||||
/datum/species/proc/update_sight(mob/living/carbon/human/H)
|
||||
H.sight = initial(H.sight)
|
||||
H.see_in_dark = darksight
|
||||
H.see_invisible = invis_sight
|
||||
|
||||
if(H.client.eye != H)
|
||||
var/atom/A = H.client.eye
|
||||
if(A.update_remote_sight(H)) //returns 1 if we override all other sight updates.
|
||||
return
|
||||
|
||||
if(H.mind && H.mind.vampire)
|
||||
if(H.mind.vampire.get_ability(/datum/vampire_passive/full))
|
||||
H.sight |= SEE_TURFS|SEE_MOBS|SEE_OBJS
|
||||
H.see_in_dark = 8
|
||||
H.see_invisible = SEE_INVISIBLE_MINIMUM
|
||||
else if(H.mind.vampire.get_ability(/datum/vampire_passive/vision))
|
||||
H.sight |= SEE_MOBS
|
||||
|
||||
for(var/obj/item/organ/internal/cyberimp/eyes/E in H.internal_organs)
|
||||
H.sight |= E.vision_flags
|
||||
if(E.dark_view)
|
||||
H.see_in_dark = E.dark_view
|
||||
if(E.see_invisible)
|
||||
H.see_invisible = min(H.see_invisible, E.see_invisible)
|
||||
|
||||
|
||||
if(H.seer == 1)
|
||||
var/obj/effect/rune/R = locate() in H.loc
|
||||
if(R && R.word1 == cultwords["see"] && R.word2 == cultwords["hell"] && R.word3 == cultwords["join"])
|
||||
H.see_invisible = SEE_INVISIBLE_OBSERVER
|
||||
else
|
||||
H.see_invisible = SEE_INVISIBLE_LIVING
|
||||
H.seer = 0
|
||||
|
||||
var/lesser_darkview_bonus = INFINITY
|
||||
// my glasses, I can't see without my glasses
|
||||
if(H.glasses)
|
||||
var/obj/item/clothing/glasses/G = H.glasses
|
||||
H.sight |= G.vision_flags
|
||||
lesser_darkview_bonus = G.darkness_view
|
||||
if(G.invis_override)
|
||||
H.see_invisible = G.invis_override
|
||||
else
|
||||
H.see_invisible = min(G.invis_view, H.see_invisible)
|
||||
|
||||
// better living through hat trading
|
||||
if(H.head)
|
||||
if(istype(H.head, /obj/item/clothing/head))
|
||||
var/obj/item/clothing/head/hat = H.head
|
||||
H.sight |= hat.vision_flags
|
||||
|
||||
if(hat.darkness_view) // Pick the lowest of the two darkness_views between the glasses and helmet.
|
||||
lesser_darkview_bonus = min(hat.darkness_view,lesser_darkview_bonus)
|
||||
|
||||
if(!hat.see_darkness)
|
||||
H.see_invisible = SEE_INVISIBLE_MINIMUM
|
||||
|
||||
if(istype(H.back, /obj/item/weapon/rig)) ///ahhhg so snowflakey
|
||||
var/obj/item/weapon/rig/rig = H.back
|
||||
if(rig.visor)
|
||||
if(!rig.helmet || (H.head && rig.helmet == H.head))
|
||||
if(rig.visor && rig.visor.vision && rig.visor.active && rig.visor.vision.glasses)
|
||||
var/obj/item/clothing/glasses/G = rig.visor.vision.glasses
|
||||
if(istype(G))
|
||||
H.see_in_dark = (G.darkness_view ? G.darkness_view : darksight) // Otherwise we keep our darkness view with togglable nightvision.
|
||||
if(G.vision_flags) // MESONS
|
||||
H.sight |= G.vision_flags
|
||||
|
||||
if(!G.see_darkness)
|
||||
H.see_invisible = SEE_INVISIBLE_MINIMUM
|
||||
|
||||
if(lesser_darkview_bonus != INFINITY)
|
||||
H.see_in_dark = max(lesser_darkview_bonus, H.see_in_dark)
|
||||
|
||||
if(H.vision_type)
|
||||
H.see_in_dark = max(H.see_in_dark, H.vision_type.see_in_dark, darksight)
|
||||
H.see_invisible = H.vision_type.see_invisible
|
||||
if(H.vision_type.light_sensitive)
|
||||
H.weakeyes = 1
|
||||
H.sight |= H.vision_type.sight_flags
|
||||
|
||||
if(XRAY in H.mutations)
|
||||
H.sight |= (SEE_TURFS|SEE_MOBS|SEE_OBJS)
|
||||
H.see_in_dark = max(H.see_in_dark, 8)
|
||||
|
||||
if(H.see_override) //Override all
|
||||
H.see_invisible = H.see_override
|
||||
|
||||
@@ -409,27 +409,33 @@
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/update_sight()
|
||||
if(!client)
|
||||
return
|
||||
if(stat == DEAD)
|
||||
sight |= SEE_TURFS
|
||||
sight |= SEE_MOBS
|
||||
sight |= SEE_OBJS
|
||||
see_in_dark = 8
|
||||
see_invisible = SEE_INVISIBLE_LEVEL_TWO
|
||||
else
|
||||
sight &= ~(SEE_TURFS|SEE_MOBS|SEE_OBJS)
|
||||
if(XRAY in mutations)
|
||||
sight |= SEE_TURFS
|
||||
sight |= SEE_MOBS
|
||||
sight |= SEE_OBJS
|
||||
see_in_dark = 8
|
||||
see_invisible = SEE_INVISIBLE_LEVEL_TWO
|
||||
grant_death_vision()
|
||||
return
|
||||
|
||||
else
|
||||
see_in_dark = 2
|
||||
see_invisible = SEE_INVISIBLE_LIVING
|
||||
see_invisible = initial(see_invisible)
|
||||
see_in_dark = initial(see_in_dark)
|
||||
sight = initial(sight)
|
||||
|
||||
if(see_override)
|
||||
see_invisible = see_override
|
||||
if(XRAY in mutations)
|
||||
grant_xray_vision()
|
||||
|
||||
if(client.eye != src)
|
||||
var/atom/A = client.eye
|
||||
if(A.update_remote_sight(src)) //returns 1 if we override all other sight updates.
|
||||
return
|
||||
|
||||
for(var/obj/item/organ/internal/cyberimp/eyes/E in internal_organs)
|
||||
sight |= E.vision_flags
|
||||
if(E.dark_view)
|
||||
see_in_dark = max(see_in_dark,E.dark_view)
|
||||
if(E.see_invisible)
|
||||
see_invisible = min(see_invisible, E.see_invisible)
|
||||
|
||||
if(see_override)
|
||||
see_invisible = see_override
|
||||
|
||||
|
||||
/mob/living/carbon/handle_hud_icons()
|
||||
|
||||
@@ -230,14 +230,32 @@
|
||||
|
||||
if(machine)
|
||||
if(!machine.check_eye(src))
|
||||
reset_view(null)
|
||||
reset_perspective(null)
|
||||
else
|
||||
if(!remote_view && !client.adminobs)
|
||||
reset_view(null)
|
||||
reset_perspective(null)
|
||||
|
||||
/mob/living/proc/update_sight()
|
||||
return
|
||||
|
||||
// Gives a mob the vision of being dead
|
||||
/mob/living/proc/grant_death_vision()
|
||||
sight |= SEE_TURFS
|
||||
sight |= SEE_MOBS
|
||||
sight |= SEE_OBJS
|
||||
see_in_dark = 8
|
||||
see_invisible = SEE_INVISIBLE_OBSERVER
|
||||
|
||||
// See through walls, dark, etc.
|
||||
// basically the same as death vision except you can't
|
||||
// see ghosts
|
||||
/mob/living/proc/grant_xray_vision()
|
||||
sight |= SEE_TURFS
|
||||
sight |= SEE_MOBS
|
||||
sight |= SEE_OBJS
|
||||
see_in_dark = 8
|
||||
see_invisible = SEE_INVISIBLE_LEVEL_TWO
|
||||
|
||||
/mob/living/proc/handle_hud_icons()
|
||||
handle_hud_icons_health()
|
||||
return
|
||||
|
||||
@@ -427,7 +427,7 @@ var/list/ai_verbs_default = list(
|
||||
/mob/living/silicon/ai/check_eye(var/mob/user as mob)
|
||||
if(!current)
|
||||
return null
|
||||
user.reset_view(current)
|
||||
user.reset_perspective(current)
|
||||
return 1
|
||||
|
||||
/mob/living/silicon/ai/blob_act()
|
||||
@@ -606,7 +606,7 @@ var/list/ai_verbs_default = list(
|
||||
adjustBruteLoss(damage)
|
||||
updatehealth()
|
||||
|
||||
/mob/living/silicon/ai/reset_view(atom/A)
|
||||
/mob/living/silicon/ai/reset_perspective(atom/A)
|
||||
if(current)
|
||||
current.set_light(0)
|
||||
if(istype(A,/obj/machinery/camera))
|
||||
@@ -1163,4 +1163,11 @@ var/list/ai_verbs_default = list(
|
||||
to_chat(src, "You are also capable of hacking APCs, which grants you more points to spend on your Malfunction powers. The drawback is that a hacked APC will give you away if spotted by the crew. Hacking an APC takes 60 seconds.")
|
||||
view_core() //A BYOND bug requires you to be viewing your core before your verbs update
|
||||
verbs += /mob/living/silicon/ai/proc/choose_modules
|
||||
malf_picker = new /datum/module_picker
|
||||
malf_picker = new /datum/module_picker
|
||||
|
||||
/mob/living/silicon/ai/reset_perspective(atom/A)
|
||||
if(camera_light_on)
|
||||
light_cameras()
|
||||
if(istype(A, /obj/machinery/camera))
|
||||
current = A
|
||||
. = ..()
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
#define POWER_RESTORATION_OFF 0
|
||||
#define POWER_RESTORATION_START 1
|
||||
#define POWER_RESTORATION_SEARCH_APC 2
|
||||
#define POWER_RESTORATION_APC_FOUND 3
|
||||
|
||||
/mob/living/silicon/ai/Life()
|
||||
//doesn't call parent because it's a horrible mess
|
||||
if(stat == DEAD)
|
||||
@@ -6,7 +11,7 @@
|
||||
var/turf/T = get_turf(src)
|
||||
if(stat != CONSCIOUS) //ai's fucked
|
||||
cameraFollow = null
|
||||
reset_view(null)
|
||||
reset_perspective(null)
|
||||
unset_machine()
|
||||
|
||||
updatehealth()
|
||||
@@ -16,11 +21,16 @@
|
||||
death()
|
||||
return 0
|
||||
|
||||
if(malfhack)
|
||||
if(malfhack.aidisabled)
|
||||
to_chat(src, "<span class='danger'>ERROR: APC access disabled, hack attempt canceled.</span>")
|
||||
malfhacking = 0
|
||||
malfhack = null
|
||||
if(!eyeobj || qdeleted(eyeobj) || !eyeobj.loc)
|
||||
view_core()
|
||||
|
||||
if(machine)
|
||||
machine.check_eye(src)
|
||||
|
||||
if(malfhack && malfhack.aidisabled)
|
||||
to_chat(src, "<span class='danger'>ERROR: APC access disabled, hack attempt canceled.</span>")
|
||||
malfhacking = 0
|
||||
malfhack = null
|
||||
|
||||
if(aiRestorePowerRoutine)
|
||||
adjustOxyLoss(1)
|
||||
@@ -29,22 +39,9 @@
|
||||
|
||||
handle_stunned()
|
||||
|
||||
var/is_blind = 0 //THIS WAS JUST FUCKING 'blind' WHICH CONFLICTED WITH A NORMAL VARIABLE
|
||||
var/area/my_area = get_area(src)
|
||||
if(istype(my_area))
|
||||
if(!my_area.power_equip && !is_type_in_list(loc, list(/obj/item, /obj/mecha)))
|
||||
is_blind = 1 //HOW THE FUCK DID THAT EVEN COMPILE JESUS CHRIST
|
||||
|
||||
if(!is_blind)
|
||||
sight |= SEE_TURFS
|
||||
sight |= SEE_MOBS
|
||||
sight |= SEE_OBJS
|
||||
|
||||
see_in_dark = 8
|
||||
see_invisible = SEE_INVISIBLE_LEVEL_TWO
|
||||
|
||||
if(see_override)
|
||||
see_invisible = see_override
|
||||
if(!lacks_power())
|
||||
|
||||
if(aiRestorePowerRoutine == 2)
|
||||
to_chat(src, "Alert cancelled. Power has been restored without our assistance.")
|
||||
@@ -57,18 +54,12 @@
|
||||
|
||||
|
||||
else
|
||||
sight &= ~SEE_TURFS
|
||||
sight &= ~SEE_MOBS
|
||||
sight &= ~SEE_OBJS
|
||||
|
||||
overlay_fullscreen("blind", /obj/screen/fullscreen/blind)
|
||||
|
||||
see_in_dark = 0
|
||||
see_invisible = SEE_INVISIBLE_LIVING
|
||||
|
||||
if(((!my_area.power_equip) || istype(T, /turf/space)) && !is_type_in_list(loc, list(/obj/item, /obj/mecha)))
|
||||
if(lacks_power())
|
||||
if(!aiRestorePowerRoutine)
|
||||
aiRestorePowerRoutine = 1
|
||||
update_sight()
|
||||
to_chat(src, "<span class='danger'>You have lost power!</span>")
|
||||
if(!is_special_character(src))
|
||||
set_zeroth_law("")
|
||||
@@ -78,7 +69,7 @@
|
||||
sleep(50)
|
||||
my_area = get_area(src)
|
||||
T = get_turf(src)
|
||||
if(my_area && my_area.power_equip && !istype(T, /turf/space))
|
||||
if(!lacks_power())
|
||||
to_chat(src, "Alert cancelled. Power has been restored without our assistance.")
|
||||
aiRestorePowerRoutine = 0
|
||||
return
|
||||
@@ -115,12 +106,11 @@
|
||||
aiRestorePowerRoutine = 2
|
||||
return
|
||||
|
||||
if(my_area.power_equip)
|
||||
if(!istype(T, /turf/space))
|
||||
to_chat(src, "Alert cancelled. Power has been restored without our assistance.")
|
||||
aiRestorePowerRoutine = 0
|
||||
clear_fullscreen("blind")
|
||||
return
|
||||
if(!lacks_power())
|
||||
to_chat(src, "Alert cancelled. Power has been restored without our assistance.")
|
||||
aiRestorePowerRoutine = 0
|
||||
clear_fullscreen("blind")
|
||||
return
|
||||
|
||||
switch(PRP)
|
||||
if(1)
|
||||
@@ -170,4 +160,17 @@
|
||||
if(client)
|
||||
var/client/C = client
|
||||
for(var/mob/living/carbon/human/H in view(eyeobj, 14))
|
||||
C.images += H.hud_list[NATIONS_HUD]
|
||||
C.images += H.hud_list[NATIONS_HUD]
|
||||
|
||||
/mob/living/silicon/ai/update_sight()
|
||||
see_invisible = initial(see_invisible)
|
||||
see_in_dark = initial(see_in_dark)
|
||||
sight = initial(sight)
|
||||
if(aiRestorePowerRoutine)
|
||||
sight = sight&~SEE_TURFS
|
||||
sight = sight&~SEE_MOBS
|
||||
sight = sight&~SEE_OBJS
|
||||
see_in_dark = 0
|
||||
|
||||
if(see_override)
|
||||
see_invisible = see_override
|
||||
|
||||
@@ -2,9 +2,5 @@
|
||||
..()
|
||||
for(var/obj/machinery/ai_status_display/O in world) //change status
|
||||
O.mode = 0
|
||||
if(!isturf(loc))
|
||||
if(client)
|
||||
client.eye = loc
|
||||
client.perspective = EYE_PERSPECTIVE
|
||||
src.view_core()
|
||||
return
|
||||
return
|
||||
|
||||
@@ -137,7 +137,7 @@
|
||||
/mob/living/silicon/pai/check_eye(var/mob/user as mob)
|
||||
if(!src.current)
|
||||
return null
|
||||
user.reset_view(src.current)
|
||||
user.reset_perspective(src.current)
|
||||
return 1
|
||||
|
||||
/mob/living/silicon/pai/blob_act()
|
||||
@@ -261,7 +261,7 @@
|
||||
usr:cameraFollow = null
|
||||
if(!C)
|
||||
src.unset_machine()
|
||||
src.reset_view(null)
|
||||
src.reset_perspective(null)
|
||||
return 0
|
||||
if(stat == 2 || !C.status || !(src.network in C.network)) return 0
|
||||
|
||||
@@ -269,7 +269,7 @@
|
||||
|
||||
src.set_machine(src)
|
||||
src:current = C
|
||||
src.reset_view(C)
|
||||
src.reset_perspective(C)
|
||||
return 1
|
||||
|
||||
/mob/living/silicon/pai/verb/reset_record_view()
|
||||
@@ -288,7 +288,7 @@
|
||||
/mob/living/silicon/pai/cancel_camera()
|
||||
set category = "pAI Commands"
|
||||
set name = "Cancel Camera View"
|
||||
src.reset_view(null)
|
||||
src.reset_perspective(null)
|
||||
src.unset_machine()
|
||||
src:cameraFollow = null
|
||||
|
||||
@@ -297,7 +297,7 @@
|
||||
/mob/living/silicon/pai/proc/pai_network_change()
|
||||
set category = "pAI Commands"
|
||||
set name = "Change Camera Network"
|
||||
src.reset_view(null)
|
||||
src.reset_perspective(null)
|
||||
src.unset_machine()
|
||||
src:cameraFollow = null
|
||||
var/cameralist[0]
|
||||
@@ -363,9 +363,6 @@
|
||||
var/obj/item/device/pda/holder = card.loc
|
||||
holder.pai = null
|
||||
|
||||
if(client)
|
||||
client.perspective = EYE_PERSPECTIVE
|
||||
client.eye = src
|
||||
forceMove(get_turf(card))
|
||||
|
||||
card.forceMove(src)
|
||||
@@ -487,9 +484,7 @@
|
||||
visible_message("<span class=notice>[src] neatly folds inwards, compacting down to a rectangular card.</span>", "<span class=notice>You neatly fold inwards, compacting down to a rectangular card.</span>")
|
||||
|
||||
stop_pulling()
|
||||
if(client)
|
||||
client.perspective = EYE_PERSPECTIVE
|
||||
client.eye = card
|
||||
reset_perspective(card)
|
||||
|
||||
// If we are being held, handle removing our holder from their inv.
|
||||
var/obj/item/weapon/holder/H = loc
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
if(istype(O,/obj/item/borg/sight))
|
||||
var/obj/item/borg/sight/S = O
|
||||
sight_mode &= ~S.sight_mode
|
||||
update_sight()
|
||||
|
||||
if(client)
|
||||
client.screen -= O
|
||||
@@ -52,6 +53,7 @@
|
||||
if((cell.charge * 100 / cell.maxcharge) < B.powerneeded)
|
||||
to_chat(src, "Not enough power to activate [B.name]!")
|
||||
return
|
||||
var/activated_thingy = null
|
||||
if(!module_state_1)
|
||||
O.mouse_opacity = initial(O.mouse_opacity)
|
||||
module_state_1 = O
|
||||
@@ -59,8 +61,7 @@
|
||||
O.plane = HUD_PLANE
|
||||
O.screen_loc = inv1.screen_loc
|
||||
contents += O
|
||||
if(istype(module_state_1,/obj/item/borg/sight))
|
||||
sight_mode |= module_state_1:sight_mode
|
||||
activated_thingy = O
|
||||
else if(!module_state_2)
|
||||
O.mouse_opacity = initial(O.mouse_opacity)
|
||||
module_state_2 = O
|
||||
@@ -68,8 +69,7 @@
|
||||
O.plane = HUD_PLANE
|
||||
O.screen_loc = inv2.screen_loc
|
||||
contents += O
|
||||
if(istype(module_state_2,/obj/item/borg/sight))
|
||||
sight_mode |= module_state_2:sight_mode
|
||||
activated_thingy = O
|
||||
else if(!module_state_3)
|
||||
O.mouse_opacity = initial(O.mouse_opacity)
|
||||
module_state_3 = O
|
||||
@@ -77,11 +77,12 @@
|
||||
O.plane = HUD_PLANE
|
||||
O.screen_loc = inv3.screen_loc
|
||||
contents += O
|
||||
if(istype(module_state_3,/obj/item/borg/sight))
|
||||
sight_mode |= module_state_3:sight_mode
|
||||
activated_thingy = O
|
||||
else
|
||||
to_chat(src, "You need to disable a module first!")
|
||||
src.update_icons()
|
||||
if(istype(activated_thingy,/obj/item/borg/sight))
|
||||
update_sight()
|
||||
update_icons()
|
||||
|
||||
/mob/living/silicon/robot/proc/uneq_active()
|
||||
uneq_module(module_active)
|
||||
|
||||
@@ -120,32 +120,38 @@
|
||||
return 1
|
||||
|
||||
/mob/living/silicon/robot/update_sight()
|
||||
if(stat == DEAD || sight_mode & BORGXRAY)
|
||||
if(!client)
|
||||
return
|
||||
if(stat == DEAD)
|
||||
grant_death_vision()
|
||||
return
|
||||
|
||||
see_invisible = initial(see_invisible)
|
||||
see_in_dark = initial(see_in_dark)
|
||||
sight = initial(sight)
|
||||
|
||||
if(client.eye != src)
|
||||
var/atom/A = client.eye
|
||||
if(A.update_remote_sight(src)) //returns 1 if we override all other sight updates.
|
||||
return
|
||||
|
||||
if(sight_mode & BORGMESON)
|
||||
sight |= SEE_TURFS
|
||||
see_invisible = min(see_invisible, SEE_INVISIBLE_MINIMUM)
|
||||
see_in_dark = 1
|
||||
|
||||
if(sight_mode & BORGXRAY)
|
||||
sight |= (SEE_TURFS|SEE_MOBS|SEE_OBJS)
|
||||
see_invisible = SEE_INVISIBLE_LIVING
|
||||
see_in_dark = 8
|
||||
|
||||
if(sight_mode & BORGTHERM)
|
||||
sight |= SEE_MOBS
|
||||
sight |= SEE_OBJS
|
||||
see_invisible = min(see_invisible, SEE_INVISIBLE_LIVING)
|
||||
see_in_dark = 8
|
||||
see_invisible = SEE_INVISIBLE_LEVEL_TWO
|
||||
else
|
||||
see_in_dark = 8
|
||||
if(sight_mode & BORGMESON && sight_mode & BORGTHERM)
|
||||
sight |= SEE_TURFS
|
||||
sight |= SEE_MOBS
|
||||
see_invisible = SEE_INVISIBLE_MINIMUM
|
||||
else if(sight_mode & BORGMESON)
|
||||
sight |= SEE_TURFS
|
||||
see_invisible = SEE_INVISIBLE_MINIMUM
|
||||
see_in_dark = 1
|
||||
else if(sight_mode & BORGTHERM)
|
||||
sight |= SEE_MOBS
|
||||
see_invisible = SEE_INVISIBLE_LEVEL_TWO
|
||||
else if(stat != DEAD)
|
||||
sight &= ~SEE_MOBS
|
||||
sight &= ~SEE_TURFS
|
||||
sight &= ~SEE_OBJS
|
||||
see_invisible = SEE_INVISIBLE_LEVEL_TWO
|
||||
if(see_override)
|
||||
see_invisible = see_override
|
||||
|
||||
if(see_override)
|
||||
see_invisible = see_override
|
||||
|
||||
/mob/living/silicon/robot/handle_hud_icons()
|
||||
update_items()
|
||||
|
||||
@@ -393,9 +393,8 @@
|
||||
passenger = M
|
||||
load = M
|
||||
can_buckle = FALSE
|
||||
if(M.client)
|
||||
M.client.perspective = EYE_PERSPECTIVE
|
||||
M.client.eye = src
|
||||
// Not sure why this is done
|
||||
reset_perspective(src)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
@@ -423,9 +422,7 @@
|
||||
|
||||
if(ismob(load))
|
||||
var/mob/M = load
|
||||
if(M.client)
|
||||
M.client.perspective = MOB_PERSPECTIVE
|
||||
M.client.eye = M
|
||||
M.reset_perspective(null)
|
||||
unbuckle_mob()
|
||||
|
||||
if(load)
|
||||
@@ -452,9 +449,7 @@
|
||||
AM.pixel_y = initial(AM.pixel_y)
|
||||
if(ismob(AM))
|
||||
var/mob/M = AM
|
||||
if(M.client)
|
||||
M.client.perspective = MOB_PERSPECTIVE
|
||||
M.client.eye = M
|
||||
M.reset_perspective(null)
|
||||
|
||||
/mob/living/simple_animal/bot/mulebot/call_bot()
|
||||
..()
|
||||
|
||||
@@ -706,6 +706,22 @@
|
||||
/mob/living/simple_animal/proc/sentience_act() //Called when a simple animal gains sentience via gold slime potion
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/update_sight()
|
||||
if(!client)
|
||||
return
|
||||
if(stat == DEAD)
|
||||
grant_death_vision()
|
||||
return
|
||||
|
||||
see_invisible = initial(see_invisible)
|
||||
see_in_dark = initial(see_in_dark)
|
||||
sight = initial(sight)
|
||||
|
||||
if(client.eye != src)
|
||||
var/atom/A = client.eye
|
||||
if(A.update_remote_sight(src)) //returns 1 if we override all other sight updates.
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/SetEarDamage()
|
||||
return
|
||||
|
||||
|
||||
@@ -43,12 +43,7 @@
|
||||
sight |= SEE_SELF
|
||||
..()
|
||||
|
||||
if(loc && !isturf(loc))
|
||||
client.eye = loc
|
||||
client.perspective = EYE_PERSPECTIVE
|
||||
else
|
||||
client.eye = src
|
||||
client.perspective = MOB_PERSPECTIVE
|
||||
reset_perspective(loc)
|
||||
|
||||
|
||||
if(ckey in deadmins)
|
||||
|
||||
+29
-3
@@ -487,7 +487,8 @@ var/list/slot_equipment_priority = list( \
|
||||
return 0 //Unsupported slot
|
||||
//END HUMAN
|
||||
|
||||
/mob/proc/reset_view(atom/A)
|
||||
// If you're looking for `reset_perspective`, that's a synonym for this proc.
|
||||
/mob/proc/reset_perspective(atom/A)
|
||||
if(client)
|
||||
if(istype(A, /atom/movable))
|
||||
client.perspective = EYE_PERSPECTIVE
|
||||
@@ -499,8 +500,33 @@ var/list/slot_equipment_priority = list( \
|
||||
else
|
||||
client.perspective = EYE_PERSPECTIVE
|
||||
client.eye = loc
|
||||
return
|
||||
return 1
|
||||
|
||||
/mob/living/reset_perspective(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_perspective(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)
|
||||
@@ -793,7 +819,7 @@ var/list/slot_equipment_priority = list( \
|
||||
/mob/verb/cancel_camera()
|
||||
set name = "Cancel Camera View"
|
||||
set category = "OOC"
|
||||
reset_view(null)
|
||||
reset_perspective(null)
|
||||
unset_machine()
|
||||
if(istype(src, /mob/living))
|
||||
if(src:cameraFollow)
|
||||
|
||||
@@ -148,7 +148,7 @@
|
||||
view = world.view //Reset the view
|
||||
winset(src, "mapwindow.map", "icon-size=[src.reset_stretch]")
|
||||
viewingCanvas = 0
|
||||
mob.reset_view()
|
||||
mob.reset_perspective()
|
||||
if(mob.hud_used)
|
||||
mob.hud_used.show_hud(HUD_STYLE_STANDARD)
|
||||
|
||||
|
||||
@@ -128,10 +128,7 @@
|
||||
for(var/mob/V in viewers(usr))
|
||||
V.show_message("[usr] starts putting [GM.name] into the disposal.", 3)
|
||||
if(do_after(usr, 20, target = GM))
|
||||
if(GM.client)
|
||||
GM.client.perspective = EYE_PERSPECTIVE
|
||||
GM.client.eye = src
|
||||
GM.loc = src
|
||||
GM.forceMove(src)
|
||||
for(var/mob/C in viewers(src))
|
||||
C.show_message("\red [GM.name] has been placed in the [src] by [user].", 3)
|
||||
qdel(G)
|
||||
@@ -189,10 +186,7 @@
|
||||
msg_admin_attack("[key_name_admin(user)] placed [key_name_admin(target)] in a disposals unit")
|
||||
else
|
||||
return
|
||||
if(target.client)
|
||||
target.client.perspective = EYE_PERSPECTIVE
|
||||
target.client.eye = src
|
||||
target.loc = src
|
||||
target.forceMove(src)
|
||||
|
||||
for(var/mob/C in viewers(src))
|
||||
if(C == user)
|
||||
@@ -215,14 +209,8 @@
|
||||
|
||||
// leave the disposal
|
||||
/obj/machinery/disposal/proc/go_out(mob/user)
|
||||
|
||||
if(user.client)
|
||||
user.client.eye = user.client.mob
|
||||
user.client.perspective = MOB_PERSPECTIVE
|
||||
user.loc = src.loc
|
||||
user.forceMove(loc)
|
||||
update()
|
||||
return
|
||||
|
||||
|
||||
// ai as human but can't flush
|
||||
/obj/machinery/disposal/attack_ai(mob/user as mob)
|
||||
@@ -489,6 +477,10 @@
|
||||
if(current_size >= STAGE_FIVE)
|
||||
qdel(src)
|
||||
|
||||
/obj/machinery/disposal/get_remote_view_fullscreens(mob/user)
|
||||
if(user.stat == DEAD || !(user.sight & (SEEOBJS|SEEMOBS)))
|
||||
user.overlay_fullscreen("remote_view", /obj/screen/fullscreen/impaired, 2)
|
||||
|
||||
// virtual disposal object
|
||||
// travels through pipes in lieu of actual items
|
||||
// contents will be items flushed by the disposal
|
||||
@@ -1356,11 +1348,7 @@
|
||||
|
||||
// check if mob has client, if so restore client view on eject
|
||||
/mob/pipe_eject(var/direction)
|
||||
if(src.client)
|
||||
src.client.perspective = MOB_PERSPECTIVE
|
||||
src.client.eye = src
|
||||
|
||||
return
|
||||
reset_perspective(null)
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/pipe_eject(var/direction)
|
||||
var/list/dirs
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
origin.feed_slime_action.Remove(C)
|
||||
origin.monkey_recycle_action.Remove(C)
|
||||
//All of this stuff below could probably be a proc for all advanced cameras, only the action removal needs to be camera specific
|
||||
remote_eye.user = null
|
||||
remote_eye.eye_user = null
|
||||
if(C.client)
|
||||
C.client.perspective = MOB_PERSPECTIVE
|
||||
C.client.eye = src
|
||||
@@ -164,4 +164,4 @@
|
||||
if(issmall(M) && M.stat)
|
||||
M.visible_message("[M] vanishes as they are reclaimed for recycling!")
|
||||
X.monkeys += 0.2
|
||||
qdel(M)
|
||||
qdel(M)
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
w_class = 1
|
||||
|
||||
var/vision_flags = 0
|
||||
var/dark_view = 0
|
||||
var/see_invisible = 0
|
||||
var/list/eye_colour = list(0,0,0)
|
||||
var/list/old_eye_colour = list(0,0,0)
|
||||
var/flash_protect = 0
|
||||
@@ -18,15 +20,11 @@
|
||||
..()
|
||||
if(aug_message && !special)
|
||||
to_chat(owner, "<span class='notice'>[aug_message]</span>")
|
||||
M.sight |= vision_flags
|
||||
M.update_sight()
|
||||
|
||||
/obj/item/organ/internal/cyberimp/eyes/remove(var/mob/living/carbon/M, var/special = 0)
|
||||
. = ..()
|
||||
M.sight ^= vision_flags
|
||||
|
||||
/obj/item/organ/internal/cyberimp/eyes/on_life()
|
||||
..()
|
||||
owner.sight |= vision_flags
|
||||
M.update_sight()
|
||||
|
||||
/obj/item/organ/internal/cyberimp/eyes/emp_act(severity)
|
||||
if(!owner)
|
||||
@@ -46,6 +44,8 @@
|
||||
implant_color = "#000000"
|
||||
origin_tech = "materials=6;programming=4;biotech=6;magnets=5"
|
||||
vision_flags = SEE_MOBS | SEE_OBJS | SEE_TURFS
|
||||
dark_view = 8
|
||||
see_invisible = SEE_INVISIBLE_MINIMUM
|
||||
|
||||
/obj/item/organ/internal/cyberimp/eyes/thermals
|
||||
name = "Thermals implant"
|
||||
|
||||
Reference in New Issue
Block a user