From 27da7b9972056d998d54c81a6e8b9ba1511f021b Mon Sep 17 00:00:00 2001 From: Aurorablade Date: Thu, 14 Dec 2017 00:38:03 -0500 Subject: [PATCH] DENIED --- code/__HELPERS/game.dm | 2 +- code/game/gamemodes/miniantags/borer/borer.dm | 3 +++ code/game/response_team.dm | 2 +- .../mob/living/carbon/brain/posibrain.dm | 4 ++-- .../modules/mob/living/silicon/pai/recruit.dm | 2 +- .../mob/living/silicon/robot/drone/drone.dm | 2 +- .../silicon/robot/drone/drone_manufacturer.dm | 2 +- .../hostile/terror_spiders/ghost.dm | 2 +- code/modules/mob/mob_helpers.dm | 21 ++++++++++++------- .../research/xenobiology/xenobiology.dm | 2 +- 10 files changed, 26 insertions(+), 16 deletions(-) diff --git a/code/__HELPERS/game.dm b/code/__HELPERS/game.dm index 2d2acdbbba5..150eb9baac0 100644 --- a/code/__HELPERS/game.dm +++ b/code/__HELPERS/game.dm @@ -457,7 +457,7 @@ proc/pollCandidates(Question, be_special_type, antag_age_check = 0, poll_time = if(config.use_exp_restrictions && min_hours) if(G.client.get_exp_living_num() < min_hours * 60) continue - if(G.has_enabled_antagHUD) + if(canPosses(G)) continue spawn(0) G << 'sound/misc/notice2.ogg'//Alerting them to their consideration diff --git a/code/game/gamemodes/miniantags/borer/borer.dm b/code/game/gamemodes/miniantags/borer/borer.dm index 245da95e23a..210959aeb93 100644 --- a/code/game/gamemodes/miniantags/borer/borer.dm +++ b/code/game/gamemodes/miniantags/borer/borer.dm @@ -123,6 +123,9 @@ GrantBorerActions() /mob/living/simple_animal/borer/attack_ghost(mob/user) + if(canPosses(user)) + to_chat(user, "Upon using the antagHUD you forfeited the ability to join the round.") + return if(jobban_isbanned(user, "Syndicate")) return if(key) diff --git a/code/game/response_team.dm b/code/game/response_team.dm index f8a11af6026..120cca9bbe8 100644 --- a/code/game/response_team.dm +++ b/code/game/response_team.dm @@ -51,7 +51,7 @@ var/ert_request_answered = 0 to_chat(src, "This role is not yet available to you. You need to wait another [player_age_check] days.") return 0 - if(has_enabled_antagHUD == 1 && config.antag_hud_restricted) + if(canPosses(src)) to_chat(src, "Upon using the antagHUD you forfeited the ability to join the round.") return 0 diff --git a/code/modules/mob/living/carbon/brain/posibrain.dm b/code/modules/mob/living/carbon/brain/posibrain.dm index 037a3f520b3..9f6f3a09eec 100644 --- a/code/modules/mob/living/carbon/brain/posibrain.dm +++ b/code/modules/mob/living/carbon/brain/posibrain.dm @@ -47,7 +47,7 @@ to_chat(O, "\A [src] has been activated. (Teleport | Sign Up)") /obj/item/device/mmi/posibrain/proc/check_observer(var/mob/dead/observer/O) - if(O.has_enabled_antagHUD == 1 && config.antag_hud_restricted) + if(canPosses(O)) return 0 if(jobban_isbanned(O, "Cyborg") || jobban_isbanned(O,"nonhumandept")) return 0 @@ -133,7 +133,7 @@ if(!check_observer(O)) to_chat(O, "You cannot be \a [src].") return - if(O.has_enabled_antagHUD == 1 && config.antag_hud_restricted) + if(canPosses(O)) to_chat(O, "Upon using the antagHUD you forfeited the ability to join the round.") return if(jobban_isbanned(O, "Cyborg") || jobban_isbanned(O,"nonhumandept")) diff --git a/code/modules/mob/living/silicon/pai/recruit.dm b/code/modules/mob/living/silicon/pai/recruit.dm index f29b402dd50..7f5703ddc22 100644 --- a/code/modules/mob/living/silicon/pai/recruit.dm +++ b/code/modules/mob/living/silicon/pai/recruit.dm @@ -360,7 +360,7 @@ var/datum/paiController/paiController // Global handler for pAI candidates return 0 if(!player_old_enough_antag(O.client,ROLE_PAI)) return 0 - if(O.has_enabled_antagHUD == 1 && config.antag_hud_restricted) + if(canPosses(O)) return 0 if(!(O in respawnable_list)) return 0 diff --git a/code/modules/mob/living/silicon/robot/drone/drone.dm b/code/modules/mob/living/silicon/robot/drone/drone.dm index c0e8af8e998..5ac0cd2473e 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone.dm @@ -263,7 +263,7 @@ /mob/living/silicon/robot/drone/proc/request_player() for(var/mob/dead/observer/O in player_list) - if(O.has_enabled_antagHUD == 1 && config.antag_hud_restricted) + if(canPosses(O)) continue if(jobban_isbanned(O,"nonhumandept") || jobban_isbanned(O,"Drone")) continue diff --git a/code/modules/mob/living/silicon/robot/drone/drone_manufacturer.dm b/code/modules/mob/living/silicon/robot/drone/drone_manufacturer.dm index 767a78e1f77..9aaddcdca2f 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone_manufacturer.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone_manufacturer.dm @@ -118,7 +118,7 @@ var/joinedasobserver = 0 if(istype(src,/mob/dead/observer)) var/mob/dead/observer/G = src - if(G.has_enabled_antagHUD == 1 && config.antag_hud_restricted) + if(canPosses(G)) to_chat(usr, "Upon using the antagHUD you forfeited the ability to join the round.") return if(G.started_as_observer == 1) diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/ghost.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/ghost.dm index 2124a31078c..e39e135499b 100644 --- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/ghost.dm +++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/ghost.dm @@ -16,7 +16,7 @@ humanize_prompt += " Role: [spider_role_summary]" if(user.ckey in ts_ckey_blacklist) error_on_humanize = "You are not able to control any terror spider this round." - else if(user.has_enabled_antagHUD == 1 && config.antag_hud_restricted) + else if(canPosses(user)) error_on_humanize = "You have enabled antag HUD and are unable to re-enter the round." else if(spider_awaymission) error_on_humanize = "Terror spiders that are part of an away mission cannot be controlled by ghosts." diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index 43b12417215..46123015a23 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -51,17 +51,17 @@ return 1 return 0 -proc/isLivingSSD(mob/M) +/proc/isLivingSSD(mob/M) return istype(M) && M.player_logged && M.stat != DEAD -proc/isAntag(A) +/proc/isAntag(A) if(istype(A, /mob/living/carbon)) var/mob/living/carbon/C = A if(C.mind && C.mind.special_role) return 1 return 0 -proc/isNonCrewAntag(A) +/proc/isNonCrewAntag(A) if(!isAntag(A)) return 0 @@ -85,21 +85,28 @@ proc/isNonCrewAntag(A) return 1 -proc/iscuffed(A) +/proc/canPosses(A) + var/mob/dead/observer/G = A + if(G.has_enabled_antagHUD == 1 && config.antag_hud_restricted) + return 0 + return 1 + + +/proc/iscuffed(A) if(istype(A, /mob/living/carbon)) var/mob/living/carbon/C = A if(C.handcuffed) return 1 return 0 -proc/hassensorlevel(A, var/level) +/proc/hassensorlevel(A, var/level) var/mob/living/carbon/human/H = A if(istype(H) && istype(H.w_uniform, /obj/item/clothing/under)) var/obj/item/clothing/under/U = H.w_uniform return U.sensor_mode >= level return 0 -proc/getsensorlevel(A) +/proc/getsensorlevel(A) var/mob/living/carbon/human/H = A if(istype(H) && istype(H.w_uniform, /obj/item/clothing/under)) var/obj/item/clothing/under/U = H.w_uniform @@ -170,7 +177,7 @@ proc/getsensorlevel(A) p++ return t -proc/slur(phrase, var/list/slurletters = ("'"))//use a different list as an input if you want to make robots slur with $#@%! characters +/proc/slur(phrase, var/list/slurletters = ("'"))//use a different list as an input if you want to make robots slur with $#@%! characters phrase = html_decode(phrase) var/leng=lentext(phrase) var/counter=lentext(phrase) diff --git a/code/modules/research/xenobiology/xenobiology.dm b/code/modules/research/xenobiology/xenobiology.dm index c3a0c1a030a..93e8fb51b7a 100644 --- a/code/modules/research/xenobiology/xenobiology.dm +++ b/code/modules/research/xenobiology/xenobiology.dm @@ -458,7 +458,7 @@ return FALSE if(!O.can_reenter_corpse) return FALSE - if(O.has_enabled_antagHUD == 1 && config.antag_hud_restricted) + if(canPosses(O)) return FALSE return TRUE