From c52085671620d0460ff9d4c488a2b298681ff434 Mon Sep 17 00:00:00 2001 From: Markolie Date: Sat, 31 Jan 2015 19:48:48 +0100 Subject: [PATCH] Additional jobban options, minimum account age for antags --- code/__HELPERS/game.dm | 7 +- code/controllers/configuration.dm | 4 + code/game/gamemodes/borer/borer.dm | 2 +- code/game/gamemodes/cult/runes.dm | 4 +- code/game/gamemodes/events.dm | 2 +- code/game/gamemodes/game_mode.dm | 11 ++- code/game/machinery/computer/ai_core.dm | 2 +- code/game/objects/items/robot/robot_parts.dm | 2 +- code/modules/admin/topic.dm | 62 ++++++++++----- code/modules/admin/verbs/randomverbs.dm | 1 + code/modules/client/preferences.dm | 77 ++++++++++++++----- code/modules/events/alien_infestation.dm | 2 +- code/modules/events/borers.dm | 2 +- .../events/tgevents/alien_infestation.dm | 2 +- .../carbon/alien/special/alien_embryo.dm | 2 +- .../mob/living/carbon/brain/posibrain.dm | 4 +- .../modules/mob/living/silicon/pai/recruit.dm | 2 +- .../mob/living/silicon/robot/drone/drone.dm | 8 +- .../silicon/robot/drone/drone_manufacturer.dm | 5 +- .../modules/mob/living/simple_animal/borer.dm | 2 +- .../simple_animal/friendly/spiderbot.dm | 2 +- code/modules/mob/mob.dm | 4 + code/modules/mob/transform_procs.dm | 12 +-- code/setup.dm | 42 +++++----- config/example/config.txt | 4 + 25 files changed, 172 insertions(+), 95 deletions(-) diff --git a/code/__HELPERS/game.dm b/code/__HELPERS/game.dm index 9de817ecb89..8d8bdc4cd1f 100644 --- a/code/__HELPERS/game.dm +++ b/code/__HELPERS/game.dm @@ -313,7 +313,7 @@ proc/isInSight(var/atom/A, var/atom/B) return M return null -/proc/get_candidates(be_special_flag=0, afk_bracket=3000) +/proc/get_candidates(be_special_flag=0, afk_bracket=3000, jobban=0, override_age=0) var/list/candidates = list() // Keep looping until we find a non-afk candidate within the time bracket (we limit the bracket to 10 minutes (6000)) while(!candidates.len && afk_bracket < 6000) @@ -321,8 +321,11 @@ proc/isInSight(var/atom/A, var/atom/B) if(G.client != null) if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD)) if(!G.client.is_afk(afk_bracket) && (G.client.prefs.be_special & be_special_flag)) - candidates += G.client + if(!jobban || !jobban_isbanned(G, jobban)) + if(override_age || player_old_enough_antag(G.client,be_special_flag)) + candidates += G.client afk_bracket += 600 // Add a minute to the bracket, for every attempt + return candidates /proc/ScreenText(obj/O, maptext="", screen_loc="CENTER-7,CENTER-7", maptext_height=480, maptext_width=480) diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm index 61112befc91..5806da2e51a 100644 --- a/code/controllers/configuration.dm +++ b/code/controllers/configuration.dm @@ -115,6 +115,7 @@ var/admin_legacy_system = 0 //Defines whether the server uses the legacy admin system with admins.txt or the SQL system. Config option in config.txt var/ban_legacy_system = 0 //Defines whether the server uses the legacy banning system with the files in /data or the SQL system. Config option in config.txt var/use_age_restriction_for_jobs = 0 //Do jobs use account age restrictions? --requires database + var/use_age_restriction_for_antags = 0 //Do antags use account age restrictions? --requires database var/simultaneous_pm_warning_timeout = 100 @@ -203,6 +204,9 @@ if ("use_age_restriction_for_jobs") config.use_age_restriction_for_jobs = 1 + + if ("use_age_restriction_for_antags") + config.use_age_restriction_for_antags = 1 if ("jobs_have_minimal_access") config.jobs_have_minimal_access = 1 diff --git a/code/game/gamemodes/borer/borer.dm b/code/game/gamemodes/borer/borer.dm index 7ec3801be02..8424ca58703 100644 --- a/code/game/gamemodes/borer/borer.dm +++ b/code/game/gamemodes/borer/borer.dm @@ -32,7 +32,7 @@ // also make sure that there's at least one borer and one host recommended_enemies = max(src.num_players() / 20 * 2, 2) - var/list/datum/mind/possible_borers = get_players_for_role(BE_ALIEN) + var/list/datum/mind/possible_borers = get_candidates(BE_ALIEN,ALIEN_AFK_BRACKET,"alien") if(possible_borers.len < 2) log_admin("MODE FAILURE: BORER. NOT ENOUGH BORER CANDIDATES.") diff --git a/code/game/gamemodes/cult/runes.dm b/code/game/gamemodes/cult/runes.dm index 16d880402dd..99918fb60d1 100644 --- a/code/game/gamemodes/cult/runes.dm +++ b/code/game/gamemodes/cult/runes.dm @@ -111,7 +111,7 @@ var/list/sacrificed = list() "\red AAAAAAHHHH!.", \ "\red You hear an anguished scream.") cult_log("[key_name_admin(usr)] tried to convert [key_name_admin(M)]") - if(is_convertable_to_cult(M.mind) && !jobban_isbanned(M, "cultist"))//putting jobban check here because is_convertable uses mind as argument + if(is_convertable_to_cult(M.mind) && !jobban_isbanned(M, "cultist") && !jobban_isbanned(M,"Syndicate"))//putting jobban check here because is_convertable uses mind as argument ticker.mode.add_cultist(M.mind) M.mind.special_role = "Cultist" M << "Your blood pulses. Your head throbs. The world goes red. All at once you are aware of a horrible, horrible truth. The veil of reality has been ripped away and in the festering wound left behind something sinister takes root." @@ -373,7 +373,7 @@ var/list/sacrificed = list() break if(!ghost) return this_rune.fizzle() - if(jobban_isbanned(ghost, "cultist")) + if(jobban_isbanned(ghost, "cultist") || jobban_isbanned(ghost,"Syndicate")) return this_rune.fizzle() usr.say("Gal'h'rfikk harfrandid mud[pick("'","`")]gib!") diff --git a/code/game/gamemodes/events.dm b/code/game/gamemodes/events.dm index f013e1f3de0..13ecf672ef9 100644 --- a/code/game/gamemodes/events.dm +++ b/code/game/gamemodes/events.dm @@ -181,7 +181,7 @@ if(temp_vent.network.normal_members.len > 50) // Stops Aliens getting stuck in small networks. See: Security, Virology vents += temp_vent - var/list/candidates = get_candidates(BE_ALIEN, ALIEN_AFK_BRACKET) + var/list/candidates = get_candidates(BE_ALIEN,ALIEN_AFK_BRACKET,"alien") if(prob(40)) spawncount++ //sometimes, have two larvae spawn instead of one while((spawncount >= 1) && vents.len && candidates.len) diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm index b8f930ef4a6..e77fa66bd64 100644 --- a/code/game/gamemodes/game_mode.dm +++ b/code/game/gamemodes/game_mode.dm @@ -346,13 +346,18 @@ Implants; if(BE_REV) roletext="revolutionary" if(BE_CULTIST) roletext="cultist" if(BE_NINJA) roletext="ninja" - if(BE_RAIDER) roletext="Vox raider" + if(BE_RAIDER) roletext="raider" + if(BE_VAMPIRE) roletext="vampire" + if(BE_ALIEN) roletext="alien" + if(BE_MUTINEER) roletext="mutineer" + if(BE_BLOB) roletext="blob" // Assemble a list of active players without jobbans. for(var/mob/new_player/player in player_list) - if( player.client && player.ready ) + if(player.client && player.ready) if(!jobban_isbanned(player, "Syndicate") && !jobban_isbanned(player, roletext)) - players += player + if(player_old_enough_antag(player.client,role)) + players += player // Shuffle the players list so that it becomes ping-independent. players = shuffle(players) diff --git a/code/game/machinery/computer/ai_core.dm b/code/game/machinery/computer/ai_core.dm index f6a9ff3e8da..6b5d3abe41f 100644 --- a/code/game/machinery/computer/ai_core.dm +++ b/code/game/machinery/computer/ai_core.dm @@ -120,7 +120,7 @@ user << "\red Sticking a dead [P] into the frame would sort of defeat the purpose." return - if(jobban_isbanned(P:brainmob, "AI")) + if(jobban_isbanned(P:brainmob, "AI") || jobban_isbanned(P:brainmob,"nonhumandept")) user << "\red This [P] does not seem to fit." return diff --git a/code/game/objects/items/robot/robot_parts.dm b/code/game/objects/items/robot/robot_parts.dm index 3a5c2de0257..744d5999ff7 100644 --- a/code/game/objects/items/robot/robot_parts.dm +++ b/code/game/objects/items/robot/robot_parts.dm @@ -194,7 +194,7 @@ user << "\red The frame's firmware lets out a shrill sound, and flashes 'Abnormal Memory Engram'. It refuses to accept the [W]." return - if(jobban_isbanned(M.brainmob, "Cyborg")) + if(jobban_isbanned(M.brainmob, "Cyborg") || jobban_isbanned(M.brainmob,"nonhumandept")) user << "\red This [W] does not seem to fit." return diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index 01f003bfd95..c266d0c8508 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -583,7 +583,7 @@ //Non-Human (Green) counter = 0 jobs += "" - jobs += "" + jobs += "" for(var/jobPos in nonhuman_positions) if(!jobPos) continue var/datum/job/job = job_master.GetJob(jobPos) @@ -600,7 +600,11 @@ jobs += "" counter = 0 - //pAI isn't technically a job, but it goes in here. + if(jobban_isbanned(M, "Drone")) + jobs += "" + else + jobs += "" + if(jobban_isbanned(M, "pAI")) jobs += "" else @@ -630,11 +634,11 @@ else jobs += "" - //Nuke Operative + //Nuclear Operative if(jobban_isbanned(M, "operative") || isbanned_dept) - jobs += "" + jobs += "" else - jobs += "" + jobs += "" //Revolutionary if(jobban_isbanned(M, "revolutionary") || isbanned_dept) @@ -642,8 +646,6 @@ else jobs += "" - jobs += "" //Breaking it up so it fits nicer on the screen every 5 entries - //Cultist if(jobban_isbanned(M, "cultist") || isbanned_dept) jobs += "" @@ -656,39 +658,63 @@ else jobs += "" - + jobs += "" //Breaking it up so it fits nicer on the screen every 5 entries /* //Malfunctioning AI //Removed Malf-bans because they're a pain to impliment if(jobban_isbanned(M, "malf AI") || isbanned_dept) jobs += "" else jobs += "" +*/ //Alien - if(jobban_isbanned(M, "alien candidate") || isbanned_dept) - jobs += "" + if(jobban_isbanned(M, "alien") || isbanned_dept) + jobs += "" else - jobs += "" + jobs += "" - //Infested Monkey - if(jobban_isbanned(M, "infested monkey") || isbanned_dept) - jobs += "" + //Ninja + if(jobban_isbanned(M, "ninja") || isbanned_dept) + jobs += "" else - jobs += "" -*/ + jobs += "" + + //Raider + if(jobban_isbanned(M, "raider") || isbanned_dept) + jobs += "" + else + jobs += "" + + //Mutineer + if(jobban_isbanned(M, "mutineer") || isbanned_dept) + jobs += "" + else + jobs += "" + + //Blob + if(jobban_isbanned(M, "blob") || isbanned_dept) + jobs += "" + else + jobs += "" jobs += "
Non-human Positions
Non-human Positions
DroneDronepAI[replacetext("Changeling", " ", " ")][replacetext("Nuke Operative", " ", " ")][replacetext("Nuclear Operative", " ", " ")][replacetext("Nuke Operative", " ", " ")][replacetext("Nuclear Operative", " ", " ")][replacetext("Revolutionary", " ", " ")]
[replacetext("Cultist", " ", " ")][replacetext("Wizard", " ", " ")]
[replacetext("Malf AI", " ", " ")][replacetext("Malf AI", " ", " ")][replacetext("Alien", " ", " ")][replacetext("Alien", " ", " ")][replacetext("Alien", " ", " ")][replacetext("Alien", " ", " ")][replacetext("Infested Monkey", " ", " ")][replacetext("Ninja", " ", " ")][replacetext("Infested Monkey", " ", " ")][replacetext("Ninja", " ", " ")][replacetext("Raider", " ", " ")][replacetext("Raider", " ", " ")][replacetext("Mutineer", " ", " ")][replacetext("Mutineer", " ", " ")][replacetext("Blob", " ", " ")][replacetext("Blob", " ", " ")]
" //Other races (BLUE, because I have no idea what other color to make this) jobs += "" - jobs += "" + jobs += "" //NYMPH if(jobban_isbanned(M, "Dionaea")) jobs += "" else - jobs += "" + jobs += "" + + //NPC + if(jobban_isbanned(M, "NPC")) + jobs += "" + else + jobs += "" //ERT if(jobban_isbanned(M, "Emergency Response Team") || isbanned_dept) diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index 2b7c9e79f0e..4bcc4bec78c 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -223,6 +223,7 @@ proc/cmd_admin_mute(mob/M as mob, mute_type, automute = 0) for(var/mob/M in player_list) if(M.stat != DEAD) continue //we are not dead! if(!M.client.prefs.be_special & BE_ALIEN) continue //we don't want to be an alium + if(jobban_isbanned(M, "alien")) continue //we are jobbanned if(M.client.is_afk()) continue //we are afk if(M.mind && M.mind.current && M.mind.current.stat != DEAD) continue //we have a live body we are tied to candidates += M.ckey diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index d462d90bcc4..245f1df0710 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -2,25 +2,59 @@ var/list/preferences_datums = list() -var/global/list/special_roles = list( //keep synced with the defines BE_* in setup.dm --rastaf +var/global/list/special_roles = list( //keep synced with the defines BE_* in setup.dm //some autodetection here. - "traitor" = IS_MODE_COMPILED("traitor"), // 0 - "operative" = IS_MODE_COMPILED("nuclear"), // 1 + "pAI" = 1, // 0 + "traitor" = IS_MODE_COMPILED("traitor"), // 1 "changeling" = IS_MODE_COMPILED("changeling"), // 2 - "wizard" = IS_MODE_COMPILED("wizard"), // 3 - "malf AI" = IS_MODE_COMPILED("malfunction"), // 4 - "revolutionary" = IS_MODE_COMPILED("revolution"), // 5 - "alien candidate" = 1, //always show // 6 - "pAI candidate" = 1, // -- TLE // 7 - "cultist" = IS_MODE_COMPILED("cult"), // 8 - "plant" = 1, // 9 - "ninja" = "true", // 10 - "raider" = IS_MODE_COMPILED("heist"), // 11 - "slime" = 1, // 12 - "vampire" = IS_MODE_COMPILED("vampire"), // 13 - "mutineer" = IS_MODE_COMPILED("mutiny"), // 14 - "blob" = IS_MODE_COMPILED("blob") // 15 + "vampire" = IS_MODE_COMPILED("vampire"), // 3 + "revolutionary" = IS_MODE_COMPILED("revolution"), // 4 + "blob" = IS_MODE_COMPILED("blob"), // 5 + "operative" = IS_MODE_COMPILED("nuclear"), // 6 + "cultist" = IS_MODE_COMPILED("cult"), // 7 + "wizard" = IS_MODE_COMPILED("wizard"), // 8 + "raider" = IS_MODE_COMPILED("heist"), // 9 + "alien" = 1, // 10 + "ninja" = 1, // 11 + "mutineer" = IS_MODE_COMPILED("mutiny"), // 12 + "malf AI" = IS_MODE_COMPILED("malfunction") // 13 ) +var/global/list/special_role_times = list( //minimum age (in days) for accounts to play these roles + num2text(BE_TRAITOR) = 14, + num2text(BE_OPERATIVE) = 21, + num2text(BE_CHANGELING) = 14, + num2text(BE_WIZARD) = 21, + num2text(BE_MALF) = 30, + num2text(BE_REV) = 14, + num2text(BE_ALIEN) = 21, + num2text(BE_PAI) = 0, + num2text(BE_CULTIST) = 21, + num2text(BE_NINJA) = 21, + num2text(BE_RAIDER) = 21, + num2text(BE_VAMPIRE) = 14, + num2text(BE_MUTINEER) = 21, + num2text(BE_BLOB) = 14 +) + +/proc/player_old_enough_antag(client/C, role) + if(available_in_days_antag(C, role) == 0) + return 1 //Available in 0 days = available right now = player is old enough to play. + return 0 + +/proc/available_in_days_antag(client/C, role) + if(!C) + return 0 + if(!role) + return 0 + if(!config.use_age_restriction_for_antags) + return 0 + if(!isnum(C.player_age)) + return 0 //This is only a number if the db connection is established, otherwise it is text: "Requires database", meaning these restrictions cannot be enforced + var/minimal_player_age_antag = special_role_times[num2text(role)] + if(!isnum(minimal_player_age_antag)) + return 0 + + return max(0, minimal_player_age_antag - C.player_age) var/const/MAX_SAVE_SLOTS = 10 @@ -327,20 +361,21 @@ datum/preferences dat += "OOC Notes: Edit
" dat += "
Other
Other
Dionaea NymphDionaeaDionaea NymphNPCNPC " - dat += "

Antagonist Settings

" + dat += "

Special Role Settings

" // dat += "

" if(jobban_isbanned(user, "Syndicate")) - dat += "You are banned from antagonist roles." + dat += "You are banned from special roles." src.be_special = 0 else var/n = 0 for (var/i in special_roles) if(special_roles[i]) //if mode is available on the server + var/special_role_flag = be_special_flags[i] if(jobban_isbanned(user, i)) dat += "Be [i]: \[BANNED]
" - else if(i == "pai candidate") - if(jobban_isbanned(user, "pAI")) - dat += "Be [i]: \[BANNED]
" + else if(!player_old_enough_antag(user.client,special_role_flag)) + var/available_in_days_antag = available_in_days_antag(user.client,special_role_flag) + dat += "Be [i]: \[IN [(available_in_days_antag)] DAYS]
" else dat += "Be [i]: [src.be_special&(1<
" n++ diff --git a/code/modules/events/alien_infestation.dm b/code/modules/events/alien_infestation.dm index 64485bf701e..d3f55d43557 100644 --- a/code/modules/events/alien_infestation.dm +++ b/code/modules/events/alien_infestation.dm @@ -26,7 +26,7 @@ if(temp_vent.network.normal_members.len > 50) //Stops Aliens getting stuck in small networks. See: Security, Virology vents += temp_vent - var/list/candidates = get_candidates(BE_ALIEN) + var/list/candidates = get_candidates(BE_ALIEN,ALIEN_AFK_BRACKET,"alien") while(spawncount > 0 && vents.len && candidates.len) var/obj/vent = pick_n_take(vents) diff --git a/code/modules/events/borers.dm b/code/modules/events/borers.dm index 66a998756a1..88352307868 100644 --- a/code/modules/events/borers.dm +++ b/code/modules/events/borers.dm @@ -23,7 +23,7 @@ if(temp_vent.network.normal_members.len > 50) vents += temp_vent - var/list/candidates = get_candidates(BE_ALIEN) + var/list/candidates = get_candidates(BE_ALIEN,ALIEN_AFK_BRACKET,"alien") while(spawncount > 0 && vents.len && candidates.len) var/obj/vent = pick_n_take(vents) var/client/C = pick_n_take(candidates) diff --git a/code/modules/events/tgevents/alien_infestation.dm b/code/modules/events/tgevents/alien_infestation.dm index 322c7feaad1..0c4790cade9 100644 --- a/code/modules/events/tgevents/alien_infestation.dm +++ b/code/modules/events/tgevents/alien_infestation.dm @@ -26,7 +26,7 @@ if(temp_vent.network.normal_members.len > 50) //Stops Aliens getting stuck in small networks. See: Security, Virology vents += temp_vent - var/list/candidates = get_candidates(BE_ALIEN) + var/list/candidates = get_candidates(BE_ALIEN,,"alien") while(spawncount > 0 && vents.len && candidates.len) var/obj/vent = pick_n_take(vents) diff --git a/code/modules/mob/living/carbon/alien/special/alien_embryo.dm b/code/modules/mob/living/carbon/alien/special/alien_embryo.dm index eeb4cd08ef1..cf4edf1ab2d 100644 --- a/code/modules/mob/living/carbon/alien/special/alien_embryo.dm +++ b/code/modules/mob/living/carbon/alien/special/alien_embryo.dm @@ -74,7 +74,7 @@ var/const/ALIEN_AFK_BRACKET = 450 // 45 seconds AttemptGrow() /obj/item/alien_embryo/proc/AttemptGrow(var/gib_on_success = 1) - var/list/candidates = get_candidates(BE_ALIEN, ALIEN_AFK_BRACKET) + var/list/candidates = get_candidates(BE_ALIEN,ALIEN_AFK_BRACKET,"alien") var/client/C = null // To stop clientless larva, we will check that our host has a client diff --git a/code/modules/mob/living/carbon/brain/posibrain.dm b/code/modules/mob/living/carbon/brain/posibrain.dm index 54361ed3d36..5419b0df5d2 100644 --- a/code/modules/mob/living/carbon/brain/posibrain.dm +++ b/code/modules/mob/living/carbon/brain/posibrain.dm @@ -42,7 +42,7 @@ /obj/item/device/mmi/posibrain/proc/check_observer(var/mob/dead/observer/O) if(O.has_enabled_antagHUD == 1 && config.antag_hud_restricted) return 0 - if(jobban_isbanned(O, "pAI")) + if(jobban_isbanned(O, "pAI") || jobban_isbanned(O,"nonhumandept")) return 0 if(O.client) return 1 @@ -125,7 +125,7 @@ if(O.has_enabled_antagHUD == 1 && config.antag_hud_restricted) O << "\red Upon using the antagHUD you forfeited the ability to join the round." return - if(jobban_isbanned(O, "pAI")) + if(jobban_isbanned(O, "Cyborg") || jobban_isbanned(O,"nonhumandept")) O << "\red You are job banned from this role." return O.<< "\blue You've been added to the list of ghosts that may become this [src]. Click again to unvolunteer." diff --git a/code/modules/mob/living/silicon/pai/recruit.dm b/code/modules/mob/living/silicon/pai/recruit.dm index fd2c6fc99d9..a9e99e87e76 100644 --- a/code/modules/mob/living/silicon/pai/recruit.dm +++ b/code/modules/mob/living/silicon/pai/recruit.dm @@ -353,7 +353,7 @@ var/datum/paiController/paiController // Global handler for pAI candidates O << "\blue A pAI card is looking for personalities. (Sign Up)" //question(O.client) proc/check_recruit(var/mob/dead/observer/O) - if(jobban_isbanned(O, "pAI")) + if(jobban_isbanned(O, "pAI") || jobban_isbanned(O,"nonhumandept")) return 0 if(O.has_enabled_antagHUD == 1 && config.antag_hud_restricted) 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 cb05233a350..0073729778d 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone.dm @@ -307,15 +307,15 @@ /mob/living/silicon/robot/drone/proc/request_player() for(var/mob/dead/observer/O in player_list) - if(jobban_isbanned(O, "Cyborg")) + if(jobban_isbanned(O,"nonhumandept") || jobban_isbanned(O,"Drone")) continue if(O.client) if(O.client.prefs.be_special & BE_PAI) - question(O.client) + question(O.client,O) -/mob/living/silicon/robot/drone/proc/question(var/client/C) +/mob/living/silicon/robot/drone/proc/question(var/client/C,var/mob/M) spawn(0) - if(!C || jobban_isbanned(C,"Cyborg")) return + if(!C || !M || jobban_isbanned(M,"nonhumandept") || jobban_isbanned(M,"Drone")) return var/response = alert(C, "Someone is attempting to reboot a maintenance drone. Would you like to play as one?", "Maintenance drone reboot", "Yes", "No", "Never for this round.") if(!C || ckey) return 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 9572421ae4d..d886cb0b5a2 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone_manufacturer.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone_manufacturer.dm @@ -80,7 +80,6 @@ /mob/dead/verb/join_as_drone() - set category = "Ghost" set name = "Join As Drone" set desc = "If there is a powered, enabled fabricator in the game world with a prepared chassis, join as a maintenance drone." @@ -95,8 +94,8 @@ if (usr != src) return 0 //something is terribly wrong - if(jobban_isbanned(src,"Cyborg")) - usr << "\red You are banned from playing synthetics and cannot spawn as a drone." + if(jobban_isbanned(src,"nonhumandept") || jobban_isbanned(src,"Drone")) + usr << "\red You are banned from playing drones and cannot spawn as a drone." return var/deathtime = world.time - src.timeofdeath diff --git a/code/modules/mob/living/simple_animal/borer.dm b/code/modules/mob/living/simple_animal/borer.dm index abcd7b94627..8dae4be093b 100644 --- a/code/modules/mob/living/simple_animal/borer.dm +++ b/code/modules/mob/living/simple_animal/borer.dm @@ -510,7 +510,7 @@ mob/living/simple_animal/borer/proc/request_player() if(jobban_isbanned(O, "Syndicate")) continue if(O.client) - if(O.client.prefs.be_special & BE_ALIEN) + if(O.client.prefs.be_special & BE_ALIEN && !jobban_isbanned(O, "alien")) question(O.client) mob/living/simple_animal/borer/proc/question(var/client/C) diff --git a/code/modules/mob/living/simple_animal/friendly/spiderbot.dm b/code/modules/mob/living/simple_animal/friendly/spiderbot.dm index e0fa382af85..0854948bf6a 100644 --- a/code/modules/mob/living/simple_animal/friendly/spiderbot.dm +++ b/code/modules/mob/living/simple_animal/friendly/spiderbot.dm @@ -71,7 +71,7 @@ user << "\red [O] is dead. Sticking it into the frame would sort of defeat the purpose." return - if(jobban_isbanned(B.brainmob, "Cyborg")) + if(jobban_isbanned(B.brainmob, "Cyborg") || jobban_isbanned(B.brainmob,"nonhumandept")) user << "\red [O] does not seem to fit." return diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 4c9608945c0..6abce2c37d7 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -1223,6 +1223,10 @@ mob/proc/yank_out_object() set name = "Respawn as NPC" set category = "Ghost" + if(jobban_isbanned(usr, "NPC")) + usr << "You are banned from playing as NPC's." + return + if((usr in respawnable_list) && (stat==2 || istype(usr,/mob/dead/observer))) var/list/creatures = list("Mouse") for(var/mob/living/L in living_mob_list) diff --git a/code/modules/mob/transform_procs.dm b/code/modules/mob/transform_procs.dm index 0722950e54a..a5aad6e3999 100644 --- a/code/modules/mob/transform_procs.dm +++ b/code/modules/mob/transform_procs.dm @@ -461,19 +461,19 @@ return 1 //Antag Creatures! -/* if(ispath(MP, /mob/living/simple_animal/hostile/carp)) +/* if(ispath(MP, /mob/living/simple_animal/hostile/carp) && !jobban_isbanned(src, "Syndicate")) return 1 - if(ispath(MP, /mob/living/simple_animal/hostile/giant_spider)) + if(ispath(MP, /mob/living/simple_animal/hostile/giant_spider) && !jobban_isbanned(src, "Syndicate")) return 1 */ - if(ispath(MP, /mob/living/simple_animal/borer)) + if(ispath(MP, /mob/living/simple_animal/borer) && !jobban_isbanned(src, "alien") && !jobban_isbanned(src, "Syndicate")) return 1 - if(ispath(MP, /mob/living/carbon/alien)) + if(ispath(MP, /mob/living/carbon/alien) && !jobban_isbanned(src, "alien") && !jobban_isbanned(src, "Syndicate")) return 1 - if(ispath(MP, /mob/living/simple_animal/hostile/statue)) + if(ispath(MP, /mob/living/simple_animal/hostile/statue) && !jobban_isbanned(src, "Syndicate")) return 1 //Friendly Creatures! - if(ispath(MP, /mob/living/carbon/monkey/diona)) + if(ispath(MP, /mob/living/carbon/monkey/diona) && !jobban_isbanned(src, "Dionaea")) return 1 //Not in here? Must be untested! diff --git a/code/setup.dm b/code/setup.dm index ce7ec7b3d02..8770a2c08f4 100644 --- a/code/setup.dm +++ b/code/setup.dm @@ -731,32 +731,28 @@ var/list/TAGGERLOCATIONS = list("Disposals", #define BE_ALIEN 64 #define BE_PAI 128 #define BE_CULTIST 256 -#define BE_PLANT 512 -#define BE_NINJA 1024 -#define BE_RAIDER 2048 -#define BE_SLIME 4096 -#define BE_VAMPIRE 8192 -#define BE_MUTINEER 16384 -#define BE_BLOB 32768 +#define BE_NINJA 512 +#define BE_RAIDER 1024 +#define BE_VAMPIRE 2048 +#define BE_MUTINEER 4096 +#define BE_BLOB 8192 var/list/be_special_flags = list( - "Traitor" = BE_TRAITOR, - "Operative" = BE_OPERATIVE, - "Changeling" = BE_CHANGELING, - "Wizard" = BE_WIZARD, - "Malf AI" = BE_MALF, - "Revolutionary" = BE_REV, - "Xenomorph" = BE_ALIEN, + "traitor" = BE_TRAITOR, + "operative" = BE_OPERATIVE, + "changeling" = BE_CHANGELING, + "wizard" = BE_WIZARD, + "malf AI" = BE_MALF, + "revolutionary" = BE_REV, + "alien" = BE_ALIEN, "pAI" = BE_PAI, - "Cultist" = BE_CULTIST, - "Plant" = BE_PLANT, - "Ninja" = BE_NINJA, - "Vox Raider" = BE_RAIDER, - "Slime" = BE_SLIME, - "Vampire" = BE_VAMPIRE, - "Mutineer" = BE_MUTINEER, - "Blob" = BE_BLOB - ) + "cultist" = BE_CULTIST, + "ninja" = BE_NINJA, + "raider" = BE_RAIDER, + "vampire" = BE_VAMPIRE, + "mutineer" = BE_MUTINEER, + "blob" = BE_BLOB +) #define AGE_MIN 17 //youngest a character can be #define AGE_MAX 85 //oldest a character can be diff --git a/config/example/config.txt b/config/example/config.txt index ad4fc4c110f..1a53041a540 100644 --- a/config/example/config.txt +++ b/config/example/config.txt @@ -17,6 +17,10 @@ JOBS_HAVE_MINIMAL_ACCESS ## you have noone older than 0 days, since noone has been logged yet. Only turn this on once you have had the database up for 30 days. #USE_AGE_RESTRICTION_FOR_JOBS +## Unhash this entry to have certain antagonist roles require your account to be at least a certain number of days old to select. You can configure the exact age requirement for different antag roles by editing special_role_times in /code/modules/client/preferences.dm. +## See USE_AGE_RESTRICTION_FOR_JOBS for more information +#USE_AGE_RESTRICTION_FOR_ANTAGS + ## Unhash this to use recursive explosions, keep it hashed to use circle explosions. Recursive explosions react to walls, airlocks and blast doors, making them look a lot cooler than the boring old circular explosions. They require more CPU and are (as of january 2013) experimental #USE_RECURSIVE_EXPLOSIONS