From 6d3e66f41c69b622260abc83be44963bc4702ce4 Mon Sep 17 00:00:00 2001 From: Crazylemon64 Date: Thu, 3 Nov 2016 14:01:09 -0700 Subject: [PATCH] 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 --- code/ATMOSPHERICS/atmospherics.dm | 5 +- code/__DEFINES/mob.dm | 5 +- code/datums/cargoprofile.dm | 16 +--- code/game/atoms.dm | 9 +++ code/game/atoms_movable.dm | 12 +++ code/game/dna/dna_modifier.dm | 8 -- .../miniantags/abduction/machinery/camera.dm | 5 +- .../abduction/machinery/experiment.dm | 5 +- code/game/gamemodes/wizard/artefact.dm | 6 +- code/game/machinery/OpTable.dm | 5 +- code/game/machinery/Sleeper.dm | 12 --- code/game/machinery/adv_med.dm | 6 -- code/game/machinery/camera/camera.dm | 14 ++++ .../machinery/computer/camera_advanced.dm | 80 ++++++++++--------- code/game/machinery/cryo.dm | 12 +-- code/game/machinery/cryopod.dm | 22 +---- code/game/machinery/programmable_unloader.dm | 6 +- code/game/machinery/rechargestation.dm | 16 +--- code/game/machinery/suit_storage_unit.dm | 52 ++++-------- code/game/mecha/equipment/mecha_equipment.dm | 1 + .../mecha/equipment/tools/mining_tools.dm | 14 +++- code/game/mecha/mecha.dm | 12 +-- code/game/objects/buckling.dm | 5 +- .../objects/items/weapons/gift_wrappaper.dm | 4 +- .../items/weapons/implants/implantchair.dm | 10 +-- .../structures/crates_lockers/closets.dm | 12 ++- .../crates_lockers/closets/statue.dm | 12 +-- code/game/objects/structures/morgue.dm | 8 ++ code/modules/admin/topic.dm | 8 -- code/modules/clothing/clothing.dm | 4 +- code/modules/clothing/glasses/glasses.dm | 5 +- code/modules/clothing/head/misc_special.dm | 2 + code/modules/mining/mine_items.dm | 5 +- .../mob/living/carbon/alien/humanoid/login.dm | 6 -- code/modules/mob/living/carbon/alien/life.dm | 42 ++++++---- code/modules/mob/living/carbon/brain/life.dm | 17 ---- code/modules/mob/living/carbon/carbon.dm | 46 +++++++++++ code/modules/mob/living/carbon/human/human.dm | 11 +++ .../mob/living/carbon/human/inventory.dm | 19 +++++ code/modules/mob/living/carbon/human/life.dm | 5 -- .../living/carbon/human/species/species.dm | 44 +++++++--- code/modules/mob/living/carbon/life.dm | 42 +++++----- code/modules/mob/living/life.dm | 18 +++++ code/modules/mob/living/silicon/ai/ai.dm | 9 ++- code/modules/mob/living/silicon/ai/life.dm | 73 +++++++++-------- code/modules/mob/living/silicon/ai/logout.dm | 6 +- code/modules/mob/living/silicon/pai/pai.dm | 7 +- .../mob/living/silicon/robot/inventory.dm | 15 ++-- code/modules/mob/living/silicon/robot/life.dm | 52 ++++++------ .../mob/living/simple_animal/bot/mulebot.dm | 13 +-- .../mob/living/simple_animal/simple_animal.dm | 16 ++++ code/modules/mob/login.dm | 7 +- code/modules/mob/mob.dm | 28 ++++++- code/modules/recycling/disposal.dm | 28 ++----- .../research/xenobiology/xenobio_camera.dm | 4 +- code/modules/surgery/organs/augments_eyes.dm | 10 +-- paradise.dme | 1 - 57 files changed, 506 insertions(+), 411 deletions(-) delete mode 100644 code/modules/mob/living/carbon/alien/humanoid/login.dm diff --git a/code/ATMOSPHERICS/atmospherics.dm b/code/ATMOSPHERICS/atmospherics.dm index aeadda0a7b4..fad455ed438 100644 --- a/code/ATMOSPHERICS/atmospherics.dm +++ b/code/ATMOSPHERICS/atmospherics.dm @@ -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) diff --git a/code/__DEFINES/mob.dm b/code/__DEFINES/mob.dm index bf9c479d3e8..7ab8a19f86d 100644 --- a/code/__DEFINES/mob.dm +++ b/code/__DEFINES/mob.dm @@ -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) \ No newline at end of file +#define is_admin(user) (check_rights(R_ADMIN, 0, (user)) != 0) diff --git a/code/datums/cargoprofile.dm b/code/datums/cargoprofile.dm index ab98e25c547..437a30a4dce 100644 --- a/code/datums/cargoprofile.dm +++ b/code/datums/cargoprofile.dm @@ -643,9 +643,7 @@ //this is necessarily damaging var/damage = rand(1,5) to_chat(M, "The unloading machine grabs you with a hard metallic claw!") - if(M.client) - M.client.eye = master - M.client.perspective = EYE_PERSPECTIVE + M.reset_view(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, "The unloading machine grabs you with a hard metallic claw!") - 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 \ No newline at end of file +#undef MAXCOIL diff --git a/code/game/atoms.dm b/code/game/atoms.dm index c60d726236b..663d6c5a8f9 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -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 diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm index 7f4b0574450..758359d2029 100644 --- a/code/game/atoms_movable.dm +++ b/code/game/atoms_movable.dm @@ -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_view(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)) diff --git a/code/game/dna/dna_modifier.dm b/code/game/dna/dna_modifier.dm index 63c42687b67..48f6384c5b0 100644 --- a/code/game/dna/dna_modifier.dm +++ b/code/game/dna/dna_modifier.dm @@ -156,8 +156,6 @@ to_chat(usr, "Subject cannot have abiotic items on.") 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, "The scanner is locked!") 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" diff --git a/code/game/gamemodes/miniantags/abduction/machinery/camera.dm b/code/game/gamemodes/miniantags/abduction/machinery/camera.dm index 8d6a3e08c2e..7d74aa3660d 100644 --- a/code/game/gamemodes/miniantags/abduction/machinery/camera.dm +++ b/code/game/gamemodes/miniantags/abduction/machinery/camera.dm @@ -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_view(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 diff --git a/code/game/gamemodes/miniantags/abduction/machinery/experiment.dm b/code/game/gamemodes/miniantags/abduction/machinery/experiment.dm index aea520a48cc..755bd21e2e5 100644 --- a/code/game/gamemodes/miniantags/abduction/machinery/experiment.dm +++ b/code/game/gamemodes/miniantags/abduction/machinery/experiment.dm @@ -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" \ No newline at end of file + icon_state = "experiment-open" diff --git a/code/game/gamemodes/wizard/artefact.dm b/code/game/gamemodes/wizard/artefact.dm index 689fb350b0d..0c0c461318b 100644 --- a/code/game/gamemodes/wizard/artefact.dm +++ b/code/game/gamemodes/wizard/artefact.dm @@ -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_view(target) spawn(100) - user.reset_view() + user.reset_view(null) user.unset_machine() if("r_leg","l_leg") to_chat(user, "You move the doll's legs around.") diff --git a/code/game/machinery/OpTable.dm b/code/game/machinery/OpTable.dm index e901a245bea..873b86d9400 100644 --- a/code/game/machinery/OpTable.dm +++ b/code/game/machinery/OpTable.dm @@ -96,12 +96,9 @@ user.visible_message("[user] climbs on the operating table.","You climb on the operating table.") else visible_message("[C] has been laid on the operating table by [user].") - 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) diff --git a/code/game/machinery/Sleeper.dm b/code/game/machinery/Sleeper.dm index d5179a9c19b..cbffb21e9ac 100644 --- a/code/game/machinery/Sleeper.dm +++ b/code/game/machinery/Sleeper.dm @@ -343,9 +343,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]" @@ -420,9 +417,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" @@ -521,10 +515,6 @@ to_chat(user, ">The sleeper is already occupied!") 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]" @@ -562,8 +552,6 @@ to_chat(usr, "The sleeper is already occupied!") return usr.stop_pulling() - usr.client.perspective = EYE_PERSPECTIVE - usr.client.eye = src usr.forceMove(src) src.occupant = usr src.icon_state = "[base_icon]" diff --git a/code/game/machinery/adv_med.dm b/code/game/machinery/adv_med.dm index 8ea98b53c8b..2bdcdfc0986 100644 --- a/code/game/machinery/adv_med.dm +++ b/code/game/machinery/adv_med.dm @@ -93,9 +93,6 @@ if(M.abiotic()) to_chat(user, "Subject cannot have abiotic items on.") 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" diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm index 1270b782ecd..fa5da723855 100644 --- a/code/game/machinery/camera/camera.dm +++ b/code/game/machinery/camera/camera.dm @@ -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 diff --git a/code/game/machinery/computer/camera_advanced.dm b/code/game/machinery/computer/camera_advanced.dm index ea3ba02ea1f..7f685639191 100644 --- a/code/game/machinery/computer/camera_advanced.dm +++ b/code/game/machinery/computer/camera_advanced.dm @@ -41,61 +41,70 @@ 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) + else + user.unset_machine() + else + give_eye_control(user) + eyeobj.setLoc(eyeobj.loc) + + +/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_view(eyeobj) /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 +136,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_view(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 diff --git a/code/game/machinery/cryo.dm b/code/game/machinery/cryo.dm index 67414971337..4f7fe0d64cd 100644 --- a/code/game/machinery/cryo.dm +++ b/code/game/machinery/cryo.dm @@ -406,9 +406,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 @@ -431,9 +428,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)) @@ -494,3 +488,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. diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index 4c462b5a05c..e48a5f44b32 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -442,11 +442,7 @@ to_chat(user, "\The [src] is in use.") 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, "\The [src] is in use.") 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, "You stop [L == user ? "climbing into the cryo pod." : "putting [L] into the cryo pod."]") 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) diff --git a/code/game/machinery/programmable_unloader.dm b/code/game/machinery/programmable_unloader.dm index 3bed121322b..9d886996168 100644 --- a/code/game/machinery/programmable_unloader.dm +++ b/code/game/machinery/programmable_unloader.dm @@ -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_view(null) + to_chat(M, "The machine turns off, and you fall out.") return diff --git a/code/game/machinery/rechargestation.dm b/code/game/machinery/rechargestation.dm index 342b24fa055..ac88d755561 100644 --- a/code/game/machinery/rechargestation.dm +++ b/code/game/machinery/rechargestation.dm @@ -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 diff --git a/code/game/machinery/suit_storage_unit.dm b/code/game/machinery/suit_storage_unit.dm index d48a21709c0..b50fc3566d8 100644 --- a/code/game/machinery/suit_storage_unit.dm +++ b/code/game/machinery/suit_storage_unit.dm @@ -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, "The machine kicks you out!") - if(user.loc != src.loc) - to_chat(OCCUPANT, "You leave the not-so-cozy confines of the SSU.") - - 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, "The machine kicks you out!") + if(user.loc != loc) + to_chat(OCCUPANT, "You leave the not-so-cozy confines of the SSU.") + 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 /* diff --git a/code/game/mecha/equipment/mecha_equipment.dm b/code/game/mecha/equipment/mecha_equipment.dm index 12303c7767d..c60a560d19b 100644 --- a/code/game/mecha/equipment/mecha_equipment.dm +++ b/code/game/mecha/equipment/mecha_equipment.dm @@ -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) diff --git a/code/game/mecha/equipment/tools/mining_tools.dm b/code/game/mecha/equipment/tools/mining_tools.dm index 4f7211282c9..6146e326023 100644 --- a/code/game/mecha/equipment/tools/mining_tools.dm +++ b/code/game/mecha/equipment/tools/mining_tools.dm @@ -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 diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index 20cedf6895f..71dd1d33a42 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -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' @@ -1178,12 +1179,8 @@ return 0 var/mob/brainmob = mmi_as_oc.brainmob brainmob.reset_view(src) - /* - brainmob.client.eye = src - brainmob.client.perspective = EYE_PERSPECTIVE - */ 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 @@ -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 diff --git a/code/game/objects/buckling.dm b/code/game/objects/buckling.dm index 4c61393d9f7..0297a372dff 100644 --- a/code/game/objects/buckling.dm +++ b/code/game/objects/buckling.dm @@ -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) diff --git a/code/game/objects/items/weapons/gift_wrappaper.dm b/code/game/objects/items/weapons/gift_wrappaper.dm index 6dcbef385b0..7bdf299d711 100644 --- a/code/game/objects/items/weapons/gift_wrappaper.dm +++ b/code/game/objects/items/weapons/gift_wrappaper.dm @@ -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_view(null) qdel(src) diff --git a/code/game/objects/items/weapons/implants/implantchair.dm b/code/game/objects/items/weapons/implants/implantchair.dm index a464e5914ef..141f9b14f89 100644 --- a/code/game/objects/items/weapons/implants/implantchair.dm +++ b/code/game/objects/items/weapons/implants/implantchair.dm @@ -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, "The [src.name] is already occupied!") 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" diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm index ed0092cf60d..733cb9eb36d 100644 --- a/code/game/objects/structures/crates_lockers/closets.dm +++ b/code/game/objects/structures/crates_lockers/closets.dm @@ -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_view(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("[src] is blown apart by the bolt of electricity!", "You hear a metallic screeching sound.") 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) diff --git a/code/game/objects/structures/crates_lockers/closets/statue.dm b/code/game/objects/structures/crates_lockers/closets/statue.dm index 3f49d3e3bde..c330ad11a01 100644 --- a/code/game/objects/structures/crates_lockers/closets/statue.dm +++ b/code/game/objects/structures/crates_lockers/closets/statue.dm @@ -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" \ No newline at end of file + icon_state = "corgi" diff --git a/code/game/objects/structures/morgue.dm b/code/game/objects/structures/morgue.dm index 90122f2280b..68bd915ac77 100644 --- a/code/game/objects/structures/morgue.dm +++ b/code/game/objects/structures/morgue.dm @@ -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, "You attempt to slide yourself out of \the [src]...") 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 */ diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index 237acd8ed7e..3b8e33d04f8 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -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") diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index e2acbed5f66..2e3eebe28a9 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -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) ..() - diff --git a/code/modules/clothing/glasses/glasses.dm b/code/modules/clothing/glasses/glasses.dm index 4ae3e230762..51d6c78274d 100644 --- a/code/modules/clothing/glasses/glasses.dm +++ b/code/modules/clothing/glasses/glasses.dm @@ -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 diff --git a/code/modules/clothing/head/misc_special.dm b/code/modules/clothing/head/misc_special.dm index eb04efcc380..67e4f697eff 100644 --- a/code/modules/clothing/head/misc_special.dm +++ b/code/modules/clothing/head/misc_special.dm @@ -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) diff --git a/code/modules/mining/mine_items.dm b/code/modules/mining/mine_items.dm index 9e4f7289532..83e794b9d20 100644 --- a/code/modules/mining/mine_items.dm +++ b/code/modules/mining/mine_items.dm @@ -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 ..() \ No newline at end of file + return ..() diff --git a/code/modules/mob/living/carbon/alien/humanoid/login.dm b/code/modules/mob/living/carbon/alien/humanoid/login.dm deleted file mode 100644 index 914371a969d..00000000000 --- a/code/modules/mob/living/carbon/alien/humanoid/login.dm +++ /dev/null @@ -1,6 +0,0 @@ -/mob/living/carbon/alien/humanoid/Login() - ..() - if(!isturf(loc)) - client.eye = loc - client.perspective = EYE_PERSPECTIVE - return diff --git a/code/modules/mob/living/carbon/alien/life.dm b/code/modules/mob/living/carbon/alien/life.dm index cf602694233..80585fad863 100644 --- a/code/modules/mob/living/carbon/alien/life.dm +++ b/code/modules/mob/living/carbon/alien/life.dm @@ -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 diff --git a/code/modules/mob/living/carbon/brain/life.dm b/code/modules/mob/living/carbon/brain/life.dm index 74d096d9518..e61f8750901 100644 --- a/code/modules/mob/living/carbon/brain/life.dm +++ b/code/modules/mob/living/carbon/brain/life.dm @@ -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 diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 76946fbe00b..a26b5e967af 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -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() diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 170673d2395..d11cf95efb0 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -724,6 +724,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) diff --git a/code/modules/mob/living/carbon/human/inventory.dm b/code/modules/mob/living/carbon/human/inventory.dm index 88b81dcef4a..2c13cb4fd7b 100644 --- a/code/modules/mob/living/carbon/human/inventory.dm +++ b/code/modules/mob/living/carbon/human/inventory.dm @@ -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 diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index cfeb6e88faa..9a27d2baa67 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -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 diff --git a/code/modules/mob/living/carbon/human/species/species.dm b/code/modules/mob/living/carbon/human/species/species.dm index 2af29aefe72..0d43bb9bfeb 100644 --- a/code/modules/mob/living/carbon/human/species/species.dm +++ b/code/modules/mob/living/carbon/human/species/species.dm @@ -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. @@ -506,15 +507,6 @@ 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)) @@ -684,3 +676,37 @@ 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 + + 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.glasses) + var/obj/item/clothing/glasses/G = H.glasses + H.sight |= G.vision_flags + H.see_in_dark = max(G.darkness_view, H.see_in_dark) + if(G.invis_override) + H.see_invisible = G.invis_override + else + H.see_invisible = min(G.invis_view, H.see_invisible) + + 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 diff --git a/code/modules/mob/living/carbon/life.dm b/code/modules/mob/living/carbon/life.dm index 5e0841168e0..91661304144 100644 --- a/code/modules/mob/living/carbon/life.dm +++ b/code/modules/mob/living/carbon/life.dm @@ -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() diff --git a/code/modules/mob/living/life.dm b/code/modules/mob/living/life.dm index e7222caa910..9238ab52309 100644 --- a/code/modules/mob/living/life.dm +++ b/code/modules/mob/living/life.dm @@ -238,6 +238,24 @@ /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 diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index 95f9362684b..67ffa0a2ab5 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -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 \ No newline at end of file + malf_picker = new /datum/module_picker + +/mob/living/silicon/ai/reset_view(atom/A) + if(camera_light_on) + light_cameras() + if(istype(A, /obj/machinery/camera)) + current = A + . = ..() diff --git a/code/modules/mob/living/silicon/ai/life.dm b/code/modules/mob/living/silicon/ai/life.dm index 6599c31c5ce..8aa97881edf 100644 --- a/code/modules/mob/living/silicon/ai/life.dm +++ b/code/modules/mob/living/silicon/ai/life.dm @@ -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) @@ -16,11 +21,16 @@ death() return 0 - if(malfhack) - if(malfhack.aidisabled) - to_chat(src, "ERROR: APC access disabled, hack attempt canceled.") - 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, "ERROR: APC access disabled, hack attempt canceled.") + 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, "You have lost power!") 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] \ No newline at end of file + 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 diff --git a/code/modules/mob/living/silicon/ai/logout.dm b/code/modules/mob/living/silicon/ai/logout.dm index acc6220bc46..00945ad84b7 100644 --- a/code/modules/mob/living/silicon/ai/logout.dm +++ b/code/modules/mob/living/silicon/ai/logout.dm @@ -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 \ No newline at end of file + return diff --git a/code/modules/mob/living/silicon/pai/pai.dm b/code/modules/mob/living/silicon/pai/pai.dm index 7979ad150b4..592095df121 100644 --- a/code/modules/mob/living/silicon/pai/pai.dm +++ b/code/modules/mob/living/silicon/pai/pai.dm @@ -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("[src] neatly folds inwards, compacting down to a rectangular card.", "You neatly fold inwards, compacting down to a rectangular card.") stop_pulling() - if(client) - client.perspective = EYE_PERSPECTIVE - client.eye = card + reset_view(card) // If we are being held, handle removing our holder from their inv. var/obj/item/weapon/holder/H = loc diff --git a/code/modules/mob/living/silicon/robot/inventory.dm b/code/modules/mob/living/silicon/robot/inventory.dm index d843203ebc3..4e05ff4a402 100644 --- a/code/modules/mob/living/silicon/robot/inventory.dm +++ b/code/modules/mob/living/silicon/robot/inventory.dm @@ -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) diff --git a/code/modules/mob/living/silicon/robot/life.dm b/code/modules/mob/living/silicon/robot/life.dm index ca480d987f8..afa2d0667c4 100644 --- a/code/modules/mob/living/silicon/robot/life.dm +++ b/code/modules/mob/living/silicon/robot/life.dm @@ -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() diff --git a/code/modules/mob/living/simple_animal/bot/mulebot.dm b/code/modules/mob/living/simple_animal/bot/mulebot.dm index 9fcc921a4c9..d1d08107c5d 100644 --- a/code/modules/mob/living/simple_animal/bot/mulebot.dm +++ b/code/modules/mob/living/simple_animal/bot/mulebot.dm @@ -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_view(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_view(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_view(null) /mob/living/simple_animal/bot/mulebot/call_bot() ..() diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index cc5b319c84f..24ad47a16cb 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -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 diff --git a/code/modules/mob/login.dm b/code/modules/mob/login.dm index fcf53fd3cba..8380b495c73 100644 --- a/code/modules/mob/login.dm +++ b/code/modules/mob/login.dm @@ -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_view(loc) if(ckey in deadmins) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 6415d077cf0..c958b20fba2 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -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) diff --git a/code/modules/recycling/disposal.dm b/code/modules/recycling/disposal.dm index 232d2a9b3c5..d05ba79ee6d 100644 --- a/code/modules/recycling/disposal.dm +++ b/code/modules/recycling/disposal.dm @@ -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) @@ -488,6 +476,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 @@ -1355,11 +1347,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_view(null) /obj/effect/decal/cleanable/blood/gibs/pipe_eject(var/direction) var/list/dirs diff --git a/code/modules/research/xenobiology/xenobio_camera.dm b/code/modules/research/xenobiology/xenobio_camera.dm index 4eb8d06ceb3..7b27642722b 100644 --- a/code/modules/research/xenobiology/xenobio_camera.dm +++ b/code/modules/research/xenobiology/xenobio_camera.dm @@ -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) \ No newline at end of file + qdel(M) diff --git a/code/modules/surgery/organs/augments_eyes.dm b/code/modules/surgery/organs/augments_eyes.dm index 407a6b02777..83c9ab128b6 100644 --- a/code/modules/surgery/organs/augments_eyes.dm +++ b/code/modules/surgery/organs/augments_eyes.dm @@ -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, "[aug_message]") - 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) diff --git a/paradise.dme b/paradise.dme index b66cc8dd006..94cf8409c7d 100644 --- a/paradise.dme +++ b/paradise.dme @@ -1485,7 +1485,6 @@ #include "code\modules\mob\living\carbon\alien\humanoid\humanoid.dm" #include "code\modules\mob\living\carbon\alien\humanoid\inventory.dm" #include "code\modules\mob\living\carbon\alien\humanoid\life.dm" -#include "code\modules\mob\living\carbon\alien\humanoid\login.dm" #include "code\modules\mob\living\carbon\alien\humanoid\queen.dm" #include "code\modules\mob\living\carbon\alien\humanoid\update_icons.dm" #include "code\modules\mob\living\carbon\alien\humanoid\caste\drone.dm"