From 5a8ffbd19833d13a37bfdd4ac8f9dfcf1b693538 Mon Sep 17 00:00:00 2001 From: TheDZD Date: Tue, 9 Feb 2016 16:26:46 -0500 Subject: [PATCH] Jobban Tweaks --- code/game/gamemodes/cult/cult.dm | 4 ++++ code/game/gamemodes/game_mode.dm | 12 +++++++++++- code/game/gamemodes/revolution/revolution.dm | 2 ++ code/game/gamemodes/shadowling/shadowling.dm | 2 ++ code/modules/admin/topic.dm | 6 ++++++ 5 files changed, 25 insertions(+), 1 deletion(-) diff --git a/code/game/gamemodes/cult/cult.dm b/code/game/gamemodes/cult/cult.dm index a1a5d646544..2b44d364c00 100644 --- a/code/game/gamemodes/cult/cult.dm +++ b/code/game/gamemodes/cult/cult.dm @@ -186,6 +186,10 @@ cult += cult_mind add_cult_viewpoint(cult_mind.current) update_cult_icons_added(cult_mind) + cult_mind.current.attack_log += "\[[time_stamp()]\] Has been converted to the cult!" + if(jobban_isbanned(cult_mind.current, ROLE_CULTIST)) + replace_jobbaned_player(cult_mind.current, ROLE_CULTIST, ROLE_CULTIST) + return 1 diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm index b9c678c74f7..ffc89827958 100644 --- a/code/game/gamemodes/game_mode.dm +++ b/code/game/gamemodes/game_mode.dm @@ -445,4 +445,14 @@ proc/get_nt_opposed() for(var/obj/machinery/nuclearbomb/bomb in world) if(bomb && bomb.r_code && bomb.z == ZLEVEL_STATION) nukecode = bomb.r_code - return nukecode \ No newline at end of file + return nukecode + +/datum/game_mode/proc/replace_jobbaned_player(mob/living/M, role_type, pref) + var/list/mob/dead/observer/candidates = pollCandidates("Do you want to play as a [role_type]?", "[role_type]", null, pref, 100) + var/mob/dead/observer/theghost = null + if(candidates.len) + theghost = pick(candidates) + M << "Your mob has been taken over by a ghost! Appeal your job ban if you want to avoid this in the future!" + message_admins("[key_name_admin(theghost)] has taken control of ([key_name_admin(M)]) to replace a jobbanned player.") + M.ghostize() + M.key = theghost.key \ No newline at end of file diff --git a/code/game/gamemodes/revolution/revolution.dm b/code/game/gamemodes/revolution/revolution.dm index 74e81484c97..7d3176a7348 100644 --- a/code/game/gamemodes/revolution/revolution.dm +++ b/code/game/gamemodes/revolution/revolution.dm @@ -225,6 +225,8 @@ rev_mind.current << "\red You are now a revolutionary! Help your cause. Do not harm your fellow freedom fighters. You can identify your comrades by the red \"R\" icons, and your leaders by the blue \"R\" icons. Help them kill the heads to win the revolution!" rev_mind.special_role = "Revolutionary" update_rev_icons_added(rev_mind) + if(jobban_isbanned(rev_mind.current, ROLE_REV)) + replace_jobbaned_player(rev_mind.current, ROLE_REV, ROLE_REV) return 1 ////////////////////////////////////////////////////////////////////////////// //Deals with players being converted from the revolution (Not a rev anymore)// // Modified to handle borged MMIs. Accepts another var if the target is being borged at the time -- Polymorph. diff --git a/code/game/gamemodes/shadowling/shadowling.dm b/code/game/gamemodes/shadowling/shadowling.dm index 551fb869839..a11fd4a5fa6 100644 --- a/code/game/gamemodes/shadowling/shadowling.dm +++ b/code/game/gamemodes/shadowling/shadowling.dm @@ -155,6 +155,8 @@ Made by Xhuis new_thrall_mind.current << "Your body has been irreversibly altered. The attentive can see this - you may conceal it by wearing a mask." new_thrall_mind.current << "Though not nearly as powerful as your masters, you possess some weak powers. These can be found in the Thrall Abilities tab." new_thrall_mind.current << "You may communicate with your allies by speaking in the Shadowling Hivemind (:8)." + if(jobban_isbanned(new_thrall_mind.current, ROLE_SHADOWLING)) + replace_jobbaned_player(new_thrall_mind.current, ROLE_SHADOWLING, ROLE_SHADOWLING) return 1 diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index f263515d986..26813c0ba91 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -680,6 +680,12 @@ else jobs += "[replacetext("Cultist", " ", " ")]" + //Shadowling + if(jobban_isbanned(M, "shadowling") || isbanned_dept) + jobs += "[replacetext("Shadowling", " ", " ")]" + else + jobs += "[replacetext("Shadowling", " ", " ")]" + //Wizard if(jobban_isbanned(M, "wizard") || isbanned_dept) jobs += "[replacetext("Wizard", " ", " ")]"