From 95032936ce3c742682186de88d3cbbcb5c960944 Mon Sep 17 00:00:00 2001 From: Amunak Date: Sat, 29 Nov 2014 00:31:27 +0100 Subject: [PATCH] Separated pAI and posibrain candidacy, fixed their jobbans. You can now toggle special role candidacy for pAIs and Positronic Brains separately. A pAI jobban will now display correctly. People will be banned from posibrain if they have a jobban on both AI and Cyborg (this is reflected in the character creation GUI as well). Using 'never for this round' on the pAI popup is no longer irreversible. --- code/modules/client/preferences.dm | 10 ++++------ code/modules/mob/living/carbon/brain/posibrain.dm | 6 +++--- code/modules/mob/living/silicon/pai/recruit.dm | 6 +----- code/setup.dm | 8 +++++--- 4 files changed, 13 insertions(+), 17 deletions(-) diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index a126d862b77..833d99f9fd8 100755 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -11,13 +11,14 @@ var/global/list/special_roles = list( //keep synced with the defines BE_* in set "malf AI" = IS_MODE_COMPILED("malfunction"), // 4 "revolutionary" = IS_MODE_COMPILED("revolution"), // 5 "alien candidate" = 1, //always show // 6 - "pAI candidate" = 1, // -- TLE // 7 + "positronic brain" = 1, // 7 "cultist" = IS_MODE_COMPILED("cult"), // 8 "infested monkey" = IS_MODE_COMPILED("monkey"), // 9 "ninja" = "true", // 10 "vox raider" = IS_MODE_COMPILED("heist"), // 11 "diona" = 1, // 12 "mutineer" = IS_MODE_COMPILED("mutiny"), // 13 + "pAI candidate" = 1, // -- TLE // 14 ) //used for alternate_option @@ -430,11 +431,8 @@ datum/preferences var/n = 0 for (var/i in special_roles) if(special_roles[i]) //if mode is available on the server - if(jobban_isbanned(user, i)) - dat += "Be [i]: \[BANNED]
" - else if(i == "pai candidate") - if(jobban_isbanned(user, "pAI")) - dat += "Be [i]: \[BANNED]
" + if(jobban_isbanned(user, i) || (i == "positronic brain" && jobban_isbanned(user, "AI") && jobban_isbanned(user, "Cyborg")) || (i == "pAI candidate" && jobban_isbanned(user, "pAI"))) + dat += "Be [i]: \[BANNED]
" else dat += "Be [i]: [src.be_special&(1<
" n++ diff --git a/code/modules/mob/living/carbon/brain/posibrain.dm b/code/modules/mob/living/carbon/brain/posibrain.dm index 535952ace8d..0917381c4df 100644 --- a/code/modules/mob/living/carbon/brain/posibrain.dm +++ b/code/modules/mob/living/carbon/brain/posibrain.dm @@ -28,10 +28,10 @@ for(var/mob/dead/observer/O in player_list) if(O.has_enabled_antagHUD == 1 && config.antag_hud_restricted) continue - if(jobban_isbanned(O, "pAI")) + if(jobban_isbanned(O, "AI") && jobban_isbanned(O, "Cyborg")) continue if(O.client) - if(O.client.prefs.be_special & BE_PAI) + if(O.client.prefs.be_special & BE_AI) question(O.client) /obj/item/device/mmi/posibrain/proc/question(var/client/C) @@ -44,7 +44,7 @@ if(response == "Yes") transfer_personality(C.mob) else if (response == "Never for this round") - C.prefs.be_special ^= BE_PAI + C.prefs.be_special ^= BE_AI /obj/item/device/mmi/posibrain/transfer_identity(var/mob/living/carbon/H) diff --git a/code/modules/mob/living/silicon/pai/recruit.dm b/code/modules/mob/living/silicon/pai/recruit.dm index 228af457ae4..03004103168 100644 --- a/code/modules/mob/living/silicon/pai/recruit.dm +++ b/code/modules/mob/living/silicon/pai/recruit.dm @@ -371,8 +371,4 @@ var/datum/paiController/paiController // Global handler for pAI candidates if(response == "Yes") recruitWindow(C.mob) else if (response == "Never for this round") - var/warning = alert(C, "Are you sure? This action will be undoable and you will need to wait until next round.", "You sure?", "Yes", "No") - if(warning == "Yes") - asked[C.key] = INFINITY - else - question(C) + C.prefs.be_special ^= BE_PAI diff --git a/code/setup.dm b/code/setup.dm index 524c498f62a..7de8cfc9871 100644 --- a/code/setup.dm +++ b/code/setup.dm @@ -664,13 +664,14 @@ var/list/robot_module_types = list("Standard", "Engineering", "Construction", "S #define BE_MALF 16 #define BE_REV 32 #define BE_ALIEN 64 -#define BE_PAI 128 +#define BE_AI 128 #define BE_CULTIST 256 #define BE_MONKEY 512 #define BE_NINJA 1024 #define BE_RAIDER 2048 #define BE_PLANT 4096 #define BE_MUTINEER 8192 +#define BE_PAI 16384 var/list/be_special_flags = list( "Traitor" = BE_TRAITOR, @@ -680,13 +681,14 @@ var/list/be_special_flags = list( "Malf AI" = BE_MALF, "Revolutionary" = BE_REV, "Xenomorph" = BE_ALIEN, - "pAI" = BE_PAI, + "Positronic Brain" = BE_AI, "Cultist" = BE_CULTIST, "Monkey" = BE_MONKEY, "Ninja" = BE_NINJA, "Raider" = BE_RAIDER, "Diona" = BE_PLANT, - "Mutineer" = BE_MUTINEER + "Mutineer" = BE_MUTINEER, + "pAI" = BE_PAI ) #define AGE_MIN 17 //youngest a character can be