diff --git a/code/__DEFINES/role_preferences.dm b/code/__DEFINES/role_preferences.dm index db23d9ac73b..80fd173c43b 100644 --- a/code/__DEFINES/role_preferences.dm +++ b/code/__DEFINES/role_preferences.dm @@ -31,6 +31,9 @@ // Role tags for EVERYONE! #define ROLE_DEMON "demon" #define ROLE_SENTIENT "sentient animal" +#define ROLE_GOLEM "golem" +#define ROLE_ROBOT_BRAIN "robot brain" +#define ROLE_ASH_WALKER "ash walker" #define ROLE_GUARDIAN "guardian" #define ROLE_MORPH "morph" #define ROLE_ERT "emergency response team" @@ -49,7 +52,7 @@ //Missing assignment means it's not a gamemode specific role, IT'S NOT A BUG OR ERROR. //The gamemode specific ones are just so the gamemodes can query whether a player is old enough //(in game days played) to play that role -GLOBAL_LIST_INIT(special_roles, list( +GLOBAL_LIST_INIT(special_roles_antags, list( ROLE_ABDUCTOR = /datum/game_mode/abduction, // Abductor ROLE_BLOB, // Blob ROLE_CHANGELING = /datum/game_mode/changeling, // Changeling @@ -57,22 +60,31 @@ GLOBAL_LIST_INIT(special_roles, list( ROLE_GUARDIAN, // Guardian ROLE_MORPH, // Morph ROLE_OPERATIVE = /datum/game_mode/nuclear, // Operative - ROLE_PAI, // PAI ROLE_REVENANT, // Revenant ROLE_REV = /datum/game_mode/revolution, // Revolutionary - ROLE_SENTIENT, // Sentient animal ROLE_DEMON, // Slaguther demon ROLE_ELITE, // Lavaland Elite - ROLE_TRADER, // Trader ROLE_TRAITOR = /datum/game_mode/traitor, // Traitor - ROLE_TOURIST, // Tourist ROLE_VAMPIRE = /datum/game_mode/vampire, // Vampire ROLE_ALIEN, // Xenomorph ROLE_WIZARD = /datum/game_mode/wizard, // Wizard ROLE_MIND_FLAYER, + // UNUSED/BROKEN ANTAGS // ROLE_HOG_GOD = /datum/game_mode/hand_of_god, // ROLE_HOG_CULTIST = /datum/game_mode/hand_of_god, // ROLE_MONKEY = /datum/game_mode/monkey, Sooner or later these are going to get ported // ROLE_GANG = /datum/game_mode/gang )) + +GLOBAL_LIST_INIT(special_roles_neutral, list( + ROLE_ASH_WALKER, + ROLE_GOLEM, + ROLE_PAI, // PAI + ROLE_ROBOT_BRAIN, + ROLE_SENTIENT, // Sentient animal + ROLE_TOURIST, // Tourist + ROLE_TRADER, // Trader +)) + +GLOBAL_LIST_INIT(special_roles, special_roles_antags | special_roles_neutral) diff --git a/code/__DEFINES/rolebans.dm b/code/__DEFINES/rolebans.dm index c400ddb5c3e..b4d3d033424 100644 --- a/code/__DEFINES/rolebans.dm +++ b/code/__DEFINES/rolebans.dm @@ -24,5 +24,6 @@ GLOBAL_LIST_INIT(other_roles, list( ROLE_GHOST, ROLEBAN_AHUD, ROLEBAN_RECORDS, - ROLE_ELITE + ROLE_ELITE, + ROLE_ASH_WALKER, )) diff --git a/code/game/jobs/job_globals.dm b/code/game/jobs/job_globals.dm index d9d1f77e289..c1f92fdaca5 100644 --- a/code/game/jobs/job_globals.dm +++ b/code/game/jobs/job_globals.dm @@ -105,7 +105,8 @@ GLOBAL_LIST_INIT(nonhuman_positions, list( "AI", "Cyborg", "Drone", - "pAI" + "pAI", + "golem", )) /proc/get_job_datums() diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index 856fcd6db9b..42216be641e 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -219,6 +219,7 @@ jobs_to_ban += temp.title if("nonhumandept") jobs_to_ban += "pAI" + jobs_to_ban += ROLE_GOLEM for(var/jobPos in GLOB.nonhuman_positions) if(!jobPos) continue var/datum/job/temp = SSjobs.GetJob(jobPos) @@ -683,7 +684,7 @@ counter = 0 jobs += "" - //Non-Human (Green) + // Non-Human (Green) counter = 0 jobs += "" jobs += "" @@ -703,18 +704,24 @@ jobs += "" counter = 0 - //Drone + // Drone if(jobban_isbanned(M, "Drone")) jobs += "" else jobs += "" - //pAI + // pAI if(jobban_isbanned(M, "pAI")) jobs += "" else jobs += "" + // golem + if(jobban_isbanned(M, ROLE_GOLEM)) + jobs += "" + else + jobs += "" + jobs += "
Non-human Positions
DroneDronepAIpAIgolemgolem
" //Antagonist (Orange) @@ -824,6 +831,7 @@ joblist += temp.title if("nonhumandept") joblist += "pAI" + joblist += ROLE_GOLEM for(var/jobPos in GLOB.nonhuman_positions) if(!jobPos) continue var/datum/job/temp = SSjobs.GetJob(jobPos) diff --git a/code/modules/awaymissions/mission_code/ghost_role_spawners/golems.dm b/code/modules/awaymissions/mission_code/ghost_role_spawners/golems.dm index fffd99baa84..080c70420da 100644 --- a/code/modules/awaymissions/mission_code/ghost_role_spawners/golems.dm +++ b/code/modules/awaymissions/mission_code/ghost_role_spawners/golems.dm @@ -87,10 +87,10 @@ var/area/A = get_area(src) if(!mapload && A) if(COOLDOWN_FINISHED(src, ghost_flash_cooldown)) - notify_ghosts("\A [initial(species.prefix)] golem shell has been completed in [A.name].", source = src) + notify_ghosts("\A [initial(species.prefix)] golem shell has been completed in [A.name].", source = src, role = ROLE_GOLEM) COOLDOWN_START(src, ghost_flash_cooldown, 20 MINUTES) else - notify_ghosts("\A [initial(species.prefix)] golem shell has been completed in [A.name].", source = src, flashwindow = FALSE) + notify_ghosts("\A [initial(species.prefix)] golem shell has been completed in [A.name].", source = src, role = ROLE_GOLEM, flashwindow = FALSE) if(has_owner && creator) important_info = "Serve your creator, even if they are an antag." flavour_text = "You are a golem created to serve your creator." diff --git a/code/modules/client/preference/preferences.dm b/code/modules/client/preference/preferences.dm index 5c7f52ec484..f8879f25944 100644 --- a/code/modules/client/preference/preferences.dm +++ b/code/modules/client/preference/preferences.dm @@ -1,5 +1,7 @@ /// Minimum age (in days) for accounts to play these roles. GLOBAL_LIST_INIT(special_role_times, list( + ROLE_ROBOT_BRAIN = 0, + ROLE_GOLEM = 0, ROLE_PAI = 0, ROLE_GUARDIAN = 0, ROLE_TRAITOR = 7, @@ -492,26 +494,11 @@ GLOBAL_LIST_INIT(special_role_times, list( if(TAB_ANTAG) // Antagonist's Preferences (and maps) dat += "
" - dat += "

Special Role Settings

" - if(jobban_isbanned(user, ROLE_SYNDICATE)) - dat += "You are banned from special roles." - be_special = list() - else - for(var/i in GLOB.special_roles) - if(jobban_isbanned(user, i)) - dat += "Be [capitalize(i)]: \[BANNED]
" - else if(!player_old_enough_antag(user.client, i)) - var/available_in_days_antag = available_in_days_antag(user.client, i) - var/role_available_in_playtime = get_exp_format(role_available_in_playtime(user.client, i)) - if(available_in_days_antag) - dat += "Be [capitalize(i)]: \[IN [(available_in_days_antag)] DAYS]
" - else if(role_available_in_playtime) - dat += "Be [capitalize(i)]: \[IN [(role_available_in_playtime)]]
" - else - dat += "Be [capitalize(i)]: \[ERROR]
" - else - var/is_special = (i in src.be_special) - dat += "Be [capitalize(i)]:[(is_special) ? "Yes" : "No"]
" + dat += "

Antagonist Role Settings

" + dat += get_role_settings(user, GLOB.special_roles_antags) + dat += "

Neutral Role Settings

" + dat += get_role_settings(user, GLOB.special_roles_neutral) + dat += "

Total Playtime:

" if(!GLOB.configuration.jobs.enable_exp_tracking) dat += SPAN_WARNING("Playtime tracking is not enabled.") @@ -638,6 +625,30 @@ GLOBAL_LIST_INIT(special_role_times, list( popup.set_content(dat.Join("")) popup.open(FALSE) +/datum/preferences/proc/get_role_settings(mob/user, list/global_role_list) + var/html + if(jobban_isbanned(user, ROLE_SYNDICATE)) + html += "You are banned from special roles." + be_special = list() + return html + + for(var/role in global_role_list) + if(jobban_isbanned(user, role)) + html += "Be [capitalize(role)]: \[BANNED]
" + else if(!player_old_enough_antag(user.client, role)) + var/available_in_days_antag = available_in_days_antag(user.client, role) + var/role_available_in_playtime = get_exp_format(role_available_in_playtime(user.client, role)) + if(available_in_days_antag) + html += "Be [capitalize(role)]: \[IN [(available_in_days_antag)] DAYS]
" + else if(role_available_in_playtime) + html += "Be [capitalize(role)]: \[IN [(role_available_in_playtime)]]
" + else + html += "Be [capitalize(role)]: \[ERROR]
" + else + var/is_special = (role in src.be_special) + html += "Be [capitalize(role)]:[(is_special) ? "Yes" : "No"]
" + return html + /datum/preferences/proc/open_load_dialog(mob/user) var/dat = "" dat += "
" diff --git a/code/modules/mob/living/brain/robotic_brain.dm b/code/modules/mob/living/brain/robotic_brain.dm index f6d35623749..48f5f367462 100644 --- a/code/modules/mob/living/brain/robotic_brain.dm +++ b/code/modules/mob/living/brain/robotic_brain.dm @@ -47,7 +47,7 @@ var/area/our_area = get_area(src) icon_state = searching_icon searching = TRUE - notify_ghosts("A robotic brain has been activated in [our_area.name].", source = src, flashwindow = FALSE, action = NOTIFY_ATTACK) + notify_ghosts("A robotic brain has been activated in [our_area.name].", source = src, flashwindow = FALSE, role = ROLE_ROBOT_BRAIN, action = NOTIFY_ATTACK) addtimer(CALLBACK(src, PROC_REF(reset_search)), 60 SECONDS) // This should not ever happen, but let's be safe diff --git a/code/modules/ruins/lavalandruin_code/ash_walker_den.dm b/code/modules/ruins/lavalandruin_code/ash_walker_den.dm index 38df29ba503..bafe3214b97 100644 --- a/code/modules/ruins/lavalandruin_code/ash_walker_den.dm +++ b/code/modules/ruins/lavalandruin_code/ash_walker_den.dm @@ -81,7 +81,7 @@ . = ..() var/area/A = get_area(src) if(A) - notify_ghosts("An ash walker egg is ready to hatch in \the [A.name].", source = src, action = NOTIFY_ATTACK, flashwindow = FALSE) + notify_ghosts("An ash walker egg is ready to hatch in \the [A.name].", source = src, action = NOTIFY_ATTACK, flashwindow = FALSE, role = ROLE_ASH_WALKER) /datum/outfit/ashwalker name = "Ashwalker"