From 680a0521366a0bb0e89d10b1a8ae5bed33551166 Mon Sep 17 00:00:00 2001 From: mwerezak Date: Wed, 1 Jul 2015 01:04:21 -0400 Subject: [PATCH 1/6] Fixes check_eye() for AI, pAI, and helm console reset_view() is no longer called every time check_eye() is. Instead it is called only when the mob's eye should change. --- code/modules/mob/living/silicon/ai/ai.dm | 3 +-- code/modules/mob/living/silicon/pai/pai.dm | 1 - code/modules/overmap/ships/computers/helm.dm | 9 +++++---- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index 32c2b643b0..15a1ee2f8a 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -388,8 +388,7 @@ var/list/ai_verbs_default = list( /mob/living/silicon/ai/check_eye(var/mob/user as mob) if (!camera) - return null - user.reset_view(camera) + return -1 return 0 /mob/living/silicon/ai/restrained() diff --git a/code/modules/mob/living/silicon/pai/pai.dm b/code/modules/mob/living/silicon/pai/pai.dm index e575c2d7c4..84a9400171 100644 --- a/code/modules/mob/living/silicon/pai/pai.dm +++ b/code/modules/mob/living/silicon/pai/pai.dm @@ -124,7 +124,6 @@ /mob/living/silicon/pai/check_eye(var/mob/user as mob) if (!src.current) return -1 - user.reset_view(src.current) return 0 /mob/living/silicon/pai/blob_act() diff --git a/code/modules/overmap/ships/computers/helm.dm b/code/modules/overmap/ships/computers/helm.dm index a0611c6866..e15de31969 100644 --- a/code/modules/overmap/ships/computers/helm.dm +++ b/code/modules/overmap/ships/computers/helm.dm @@ -53,11 +53,10 @@ /obj/machinery/computer/helm/check_eye(var/mob/user as mob) if (!manual_control) - return null + return -1 if (!get_dist(user, src) > 1 || user.blinded || !linked ) - return null - user.reset_view(linked) - return 1 + return -1 + return 0 /obj/machinery/computer/helm/attack_hand(var/mob/user as mob) if(..()) @@ -67,6 +66,8 @@ if(!isAI(user)) user.set_machine(src) + if(linked) + user.reset_view(linked) ui_interact(user) From 49e92488364cb0cbdd4beb95a643a681df0f97ab Mon Sep 17 00:00:00 2001 From: mwerezak Date: Wed, 1 Jul 2015 01:08:06 -0400 Subject: [PATCH 2/6] Fixes looking through cameras retaining the sight flags of worn glasses. --- code/modules/mob/living/carbon/human/life.dm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index fed5b3dba4..58f4f0f2aa 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -1233,7 +1233,7 @@ damageoverlay.overlays += I if( stat == DEAD ) - sight |= (SEE_TURFS|SEE_MOBS|SEE_OBJS) + sight = SEE_TURFS|SEE_MOBS|SEE_OBJS|SEE_SELF see_in_dark = 8 if(!druggy) see_invisible = SEE_INVISIBLE_LEVEL_TWO if(healths) healths.icon_state = "health7" //DEAD healthmeter @@ -1256,7 +1256,7 @@ */ else - sight &= ~(SEE_TURFS|SEE_MOBS|SEE_OBJS) + sight = SEE_SELF see_in_dark = species.darksight see_invisible = see_in_dark>2 ? SEE_INVISIBLE_LEVEL_ONE : SEE_INVISIBLE_LIVING @@ -1411,7 +1411,7 @@ if(viewflags < 0) reset_view(null, 0) else if(viewflags) - sight |= viewflags + sight = viewflags //when viewing from a machine, use only the sight flags that the machine provides else var/isRemoteObserve = 0 if((mRemote in mutations) && remoteview_target) From ba981f8783242c1fb303acd17e6c82536e9b798a Mon Sep 17 00:00:00 2001 From: mwerezak Date: Sun, 12 Jul 2015 20:21:38 -0400 Subject: [PATCH 3/6] Fixes glasses interfering with species vision modes and cult ghost viewing. --- code/modules/mob/living/carbon/human/life.dm | 20 +++++++------------ .../living/carbon/human/species/species.dm | 2 +- .../human/species/xenomorphs/alien_species.dm | 2 +- 3 files changed, 9 insertions(+), 15 deletions(-) diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 58f4f0f2aa..950a9143fb 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -1256,7 +1256,7 @@ */ else - sight = SEE_SELF + sight = species.vision_flags see_in_dark = species.darksight see_invisible = see_in_dark>2 ? SEE_INVISIBLE_LEVEL_ONE : SEE_INVISIBLE_LIVING @@ -1265,29 +1265,23 @@ see_in_dark = 8 if(!druggy) see_invisible = SEE_INVISIBLE_LEVEL_TWO - if(seer==1) + if(seer) var/obj/effect/rune/R = locate() in loc if(R && R.word1 == cultwords["see"] && R.word2 == cultwords["hell"] && R.word3 == cultwords["join"]) see_invisible = SEE_INVISIBLE_OBSERVER else - see_invisible = SEE_INVISIBLE_LIVING seer = 0 - var/tmp/glasses_processed = 0 + var/equipped_glasses = glasses var/obj/item/weapon/rig/rig = back if(istype(rig) && rig.visor) if(!rig.helmet || (head && rig.helmet == head)) if(rig.visor && rig.visor.vision && rig.visor.active && rig.visor.vision.glasses) - glasses_processed = 1 - process_glasses(rig.visor.vision.glasses) + equipped_glasses = rig.visor.vision.glasses + if(equipped_glasses) + process_glasses(equipped_glasses) - if(glasses && !glasses_processed) - glasses_processed = 1 - process_glasses(glasses) - - if(!glasses_processed && (species.vision_flags > 0)) - sight |= species.vision_flags - if(!seer && !glasses_processed) + if(!seer) see_invisible = SEE_INVISIBLE_LIVING if(healths) diff --git a/code/modules/mob/living/carbon/human/species/species.dm b/code/modules/mob/living/carbon/human/species/species.dm index 1162c84236..8090207b41 100644 --- a/code/modules/mob/living/carbon/human/species/species.dm +++ b/code/modules/mob/living/carbon/human/species/species.dm @@ -37,7 +37,7 @@ var/list/unarmed_attacks = null // For empty hand harm-intent attack var/brute_mod = 1 // Physical damage multiplier. var/burn_mod = 1 // Burn damage multiplier. - var/vision_flags = 0 // Same flags as glasses. + var/vision_flags = SEE_SELF // Same flags as glasses. // Death vars. var/gibber_type = /obj/effect/gibspawner/human diff --git a/code/modules/mob/living/carbon/human/species/xenomorphs/alien_species.dm b/code/modules/mob/living/carbon/human/species/xenomorphs/alien_species.dm index a854d0e6db..7debde5870 100644 --- a/code/modules/mob/living/carbon/human/species/xenomorphs/alien_species.dm +++ b/code/modules/mob/living/carbon/human/species/xenomorphs/alien_species.dm @@ -42,7 +42,7 @@ breath_type = null poison_type = null - vision_flags = SEE_MOBS + vision_flags = SEE_SELF|SEE_MOBS has_organ = list( "heart" = /datum/organ/internal/heart, From 0e71efea1841ad95d4757bf6641bb8511ce8ea11 Mon Sep 17 00:00:00 2001 From: GinjaNinja32 Date: Sun, 26 Jul 2015 11:03:36 +0100 Subject: [PATCH 4/6] Changes player planel to always display key if present --- code/modules/admin/player_panel.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/admin/player_panel.dm b/code/modules/admin/player_panel.dm index 5de314db4c..ebbd506413 100644 --- a/code/modules/admin/player_panel.dm +++ b/code/modules/admin/player_panel.dm @@ -358,7 +358,7 @@ dat += "NA" - dat += {"[(M.client ? "[M.client]" : "No client")] + dat += {"[M.key ? (M.client ? M.key : "[M.key] (DC)") : "No key"] X PM "} From 631c30732d060a1e0b2f52adbe32842d9bd06eab Mon Sep 17 00:00:00 2001 From: PsiOmegaDelta Date: Mon, 27 Jul 2015 11:24:44 +0200 Subject: [PATCH 5/6] Adds admin message log to the spawn verb. The spawn-verb no longer only makes an entry in the admin log but also messages admins, making it less sneaky. --- code/modules/admin/admin.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index c51ffbff82..33807a6e06 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -1051,7 +1051,7 @@ var/global/floorIsLava = 0 else new chosen(usr.loc) - log_admin("[key_name(usr)] spawned [chosen] at ([usr.x],[usr.y],[usr.z])") + log_and_message_admins("spawned [chosen] at ([usr.x],[usr.y],[usr.z])") feedback_add_details("admin_verb","SA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! From 81c40c14b1ea5fa4be4a959bd255b2a04ee9681b Mon Sep 17 00:00:00 2001 From: PsiOmegaDelta Date: Mon, 27 Jul 2015 11:47:55 +0200 Subject: [PATCH 6/6] Compacts down the game panel spawn logging and makes it always notify admins. --- code/modules/admin/topic.dm | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index 3b701b27da..7b58274479 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -1784,18 +1784,7 @@ var/mob/M = O M.real_name = obj_name - if (number == 1) - log_admin("[key_name(usr)] created a [english_list(paths)]") - for(var/path in paths) - if(ispath(path, /mob)) - message_admins("[key_name_admin(usr)] created a [english_list(paths)]", 1) - break - else - log_admin("[key_name(usr)] created [number]ea [english_list(paths)]") - for(var/path in paths) - if(ispath(path, /mob)) - message_admins("[key_name_admin(usr)] created [number]ea [english_list(paths)]", 1) - break + log_and_message_admins("created [number] [english_list(paths)]") return else if(href_list["secretsfun"])