Skip to content

Commit

Permalink
TGS Test Merge (#7165)
Browse files Browse the repository at this point in the history
  • Loading branch information
cm13-github committed Nov 16, 2024
2 parents 355aa62 + 7728f59 commit 74f959d
Show file tree
Hide file tree
Showing 38 changed files with 3,791 additions and 134 deletions.
23 changes: 23 additions & 0 deletions code/__DEFINES/job.dm
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,11 @@ GLOBAL_LIST_INIT(job_squad_roles, JOB_SQUAD_ROLES_LIST)
#define JOB_MEDIC_ROLES_LIST list(JOB_SQUAD_MEDIC, JOB_CMO, JOB_DOCTOR, JOB_NURSE, JOB_RESEARCHER, JOB_SURGEON)

#define JOB_CORPORATE_LIAISON "Corporate Liaison"

#define JOB_COMBAT_REPORTER "Combat Correspondent"
#define JOB_CIVIL_ROLES /datum/timelock/civil
#define JOB_CIVIL_ROLES_LIST list(JOB_COMBAT_REPORTER)

#define JOB_MESS_SERGEANT "Mess Technician"
#define JOB_SYNTH "Synthetic"
#define JOB_SYNTH_K9 "Synthetic K9"
Expand Down Expand Up @@ -214,6 +218,9 @@ GLOBAL_LIST_INIT(job_command_roles, JOB_COMMAND_ROLES_LIST)
#define ROLES_WY_CORPORATE list(JOB_EXECUTIVE_SUPERVISOR, JOB_EXECUTIVE_SPECIALIST, JOB_SENIOR_EXECUTIVE, JOB_EXECUTIVE, JOB_JUNIOR_EXECUTIVE, JOB_TRAINEE)
#define ROLES_WY_LEADERSHIP list(JOB_DIRECTOR, JOB_PMC_DIRECTOR, JOB_CHIEF_EXECUTIVE, JOB_DIVISION_MANAGER, JOB_ASSISTANT_MANAGER)

#define JOB_CORPORATE_ROLES /datum/timelock/corporate
#define JOB_CORPORATE_ROLES_LIST list(JOB_CORPORATE_LIAISON, JOB_WO_CORPORATE_LIAISON, JOB_DIRECTOR, JOB_PMC_DIRECTOR, JOB_CHIEF_EXECUTIVE, JOB_DIVISION_MANAGER, JOB_ASSISTANT_MANAGER, JOB_EXECUTIVE_SUPERVISOR, JOB_EXECUTIVE_SPECIALIST, JOB_SENIOR_EXECUTIVE, JOB_EXECUTIVE, JOB_JUNIOR_EXECUTIVE, JOB_TRAINEE)

//-------- WY Goons --------//
#define JOB_WY_GOON "WY Corporate Security"
#define JOB_WY_GOON_TECH "WY Corporate Security Technician"
Expand Down Expand Up @@ -373,6 +380,22 @@ GLOBAL_LIST_INIT(job_command_roles, JOB_COMMAND_ROLES_LIST)

#define DUTCH_JOB_LIST list(JOB_DUTCH_ARNOLD, JOB_DUTCH_RIFLEMAN, JOB_DUTCH_MINIGUNNER, JOB_DUTCH_FLAMETHROWER, JOB_DUTCH_MEDIC)

//---------- RESPONDERS ----------//
/// This root job should never appear ingame, it's used to select the character slot.
#define JOB_FAX_RESPONDER "Fax Responder"
#define JOB_FAX_RESPONDER_USCM_HC "USCM-HC Communications Officer"
#define JOB_FAX_RESPONDER_USCM_PVST "Provost Communications Officer"
#define JOB_FAX_RESPONDER_WY "WY Communications Executive"
#define JOB_FAX_RESPONDER_UPP "UPP Communications Officer"
#define JOB_FAX_RESPONDER_TWE "TWE Communications Officer"
#define JOB_FAX_RESPONDER_CLF "CLF Information Correspondant"
#define JOB_FAX_RESPONDER_CMB "CMB Deputy Operations Officer"
#define JOB_FAX_RESPONDER_PRESS "Free Press Relay Operator"

#define FAX_RESPONDER_JOB_LIST list(JOB_FAX_RESPONDER_USCM_HC, JOB_FAX_RESPONDER_USCM_PVST, JOB_FAX_RESPONDER_WY, JOB_FAX_RESPONDER_UPP, JOB_FAX_RESPONDER_TWE, JOB_FAX_RESPONDER_CLF, JOB_FAX_RESPONDER_CMB, JOB_FAX_RESPONDER_PRESS)


//---------- ANTAG ----------//
#define JOB_PREDATOR "Predator"
#define JOB_XENOMORPH "Xenomorph"
#define JOB_XENOMORPH_QUEEN "Queen"
Expand Down
14 changes: 6 additions & 8 deletions code/__DEFINES/mode.dm
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@
#define ROLE_WHITELISTED 16
#define ROLE_NO_ACCOUNT 32
#define ROLE_CUSTOM_SPAWN 64
#define ROLE_HIDDEN 128
//=================================================

//Role defines, specifically lists of roles for job bans, crew manifests and the like.
Expand Down Expand Up @@ -151,7 +152,7 @@ GLOBAL_LIST_INIT(ROLES_WO, list(JOB_WO_CO, JOB_WO_XO, JOB_WO_CORPORATE_LIAISON,

//Groundside roles
GLOBAL_LIST_INIT(ROLES_XENO, list(JOB_XENOMORPH_QUEEN, JOB_XENOMORPH))
GLOBAL_LIST_INIT(ROLES_WHITELISTED, list(JOB_SYNTH_SURVIVOR, JOB_CO_SURVIVOR, JOB_PREDATOR))
GLOBAL_LIST_INIT(ROLES_WHITELISTED, list(JOB_SYNTH_SURVIVOR, JOB_CO_SURVIVOR, JOB_PREDATOR, JOB_FAX_RESPONDER))
GLOBAL_LIST_INIT(ROLES_SPECIAL, list(JOB_SURVIVOR))

GLOBAL_LIST_INIT(ROLES_USCM, ROLES_CIC + GLOB.ROLES_POLICE + GLOB.ROLES_AUXIL_SUPPORT + GLOB.ROLES_MISC + GLOB.ROLES_ENGINEERING + GLOB.ROLES_REQUISITION + GLOB.ROLES_MEDICAL + GLOB.ROLES_MARINES - ROLES_WO)
Expand Down Expand Up @@ -211,13 +212,8 @@ GLOBAL_LIST_INIT(whitelist_hierarchy, list(WHITELIST_NORMAL, WHITELIST_COUNCIL,
///Senior Enlisted Advisor, auto granted by R_MENTOR
#define WHITELIST_MENTOR (1<<15)


#define WHITELISTS_GENERAL (WHITELIST_YAUTJA|WHITELIST_COMMANDER|WHITELIST_SYNTHETIC|WHITELIST_MENTOR|WHITELIST_JOE)
#define WHITELISTS_COUNCIL (WHITELIST_YAUTJA_COUNCIL|WHITELIST_COMMANDER_COUNCIL|WHITELIST_SYNTHETIC_COUNCIL)
#define WHITELISTS_LEGACY_COUNCIL (WHITELIST_YAUTJA_COUNCIL_LEGACY|WHITELIST_COMMANDER_COUNCIL_LEGACY|WHITELIST_SYNTHETIC_COUNCIL_LEGACY)
#define WHITELISTS_LEADER (WHITELIST_YAUTJA_LEADER|WHITELIST_COMMANDER_LEADER|WHITELIST_SYNTHETIC_LEADER)

#define WHITELIST_EVERYTHING (WHITELISTS_GENERAL|WHITELISTS_COUNCIL|WHITELISTS_LEADER)
///Fax Responder
#define WHITELIST_FAX_RESPONDER (1<<16)

#define COUNCIL_LIST list(WHITELIST_COMMANDER_COUNCIL, WHITELIST_SYNTHETIC_COUNCIL, WHITELIST_YAUTJA_COUNCIL)
#define SENATOR_LIST list(WHITELIST_COMMANDER_LEADER, WHITELIST_SYNTHETIC_LEADER, WHITELIST_YAUTJA_LEADER)
Expand All @@ -241,6 +237,7 @@ DEFINE_BITFIELD(whitelist_status, list(
"WHITELIST_SYNTHETIC_COUNCIL_LEGACY" = WHITELIST_SYNTHETIC_COUNCIL_LEGACY,
"WHITELIST_SYNTHETIC_LEADER" = WHITELIST_SYNTHETIC_LEADER,
"WHITELIST_MENTOR" = WHITELIST_MENTOR,
"WHITELIST_FAX_RESPONDER" = WHITELIST_FAX_RESPONDER,
))

//=================================================
Expand Down Expand Up @@ -294,6 +291,7 @@ DEFINE_BITFIELD(whitelist_status, list(
#define FACTION_HUNTED "Hunted"
#define FACTION_ZOMBIE "Zombie"
#define FACTION_MONKEY "Monkey" // Nanu
#define FACTION_FAX "Fax Responder"

#define FACTION_LIST_MARINE list(FACTION_MARINE)
#define FACTION_LIST_HUMANOID list(FACTION_MARINE, FACTION_PMC, FACTION_WY, FACTION_WY_DEATHSQUAD, FACTION_CLF, FACTION_CONTRACTOR, FACTION_MARSHAL, FACTION_UPP, FACTION_FREELANCER, FACTION_SURVIVOR, FACTION_NEUTRAL, FACTION_COLONIST, FACTION_MERCENARY, FACTION_DUTCH, FACTION_HEFA, FACTION_GLADIATOR, FACTION_PIRATE, FACTION_PIZZA, FACTION_SOUTO, FACTION_YAUTJA, FACTION_ZOMBIE, FACTION_TWE, FACTION_HUNTED)
Expand Down
5 changes: 5 additions & 0 deletions code/__DEFINES/radio.dm
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@
#define RADIO_CHANNEL_BUG_A "Listening Device A"
#define RADIO_CHANNEL_BUG_B "Listening Device B"

//Fax Responder Bugs
#define RADIO_CHANNEL_FAX_WY "WY Monitor"
#define RADIO_CHANNEL_FAX_USCM_HC "USCM-HC Monitor"
#define RADIO_CHANNEL_FAX_USCM_PVST "Provost Monitor"

//1-Channel ERTs
#define RADIO_CHANNEL_DUTCH_DOZEN "DD"
#define RADIO_CHANNEL_VAI "VAI"
Expand Down
1 change: 1 addition & 0 deletions code/__DEFINES/urls.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@
#define URL_WIKI_MACROS "Macros"
#define URL_WIKI_SOP "Standard_Operating_Procedure"
#define URL_WIKI_CO_RULES "CO_Council_Rulings"
#define URL_WIKI_FAX_RESPONDER "Fax_Responder"
15 changes: 15 additions & 0 deletions code/controllers/subsystem/communications.dm
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,11 @@ Radiochat range: 1441 to 1489 (most devices refuse to be tune to other frequency
#define BUG_A_FREQ 1290
#define BUG_B_FREQ 1291

//Listening Bugs (1296-1300)
#define FAX_WY_FREQ 1296
#define FAX_USCM_HC_FREQ 1297
#define FAX_USCM_PVST_FREQ 1298

//General Radio
#define MIN_FREQ 1460 // ------------------------------------------------------
#define PUB_FREQ 1461
Expand Down Expand Up @@ -210,6 +215,10 @@ GLOBAL_LIST_INIT(radiochannels, list(

RADIO_CHANNEL_BUG_A = BUG_A_FREQ,
RADIO_CHANNEL_BUG_B = BUG_B_FREQ,

RADIO_CHANNEL_FAX_WY = FAX_WY_FREQ,
RADIO_CHANNEL_FAX_USCM_HC = FAX_USCM_HC_FREQ,
RADIO_CHANNEL_FAX_USCM_PVST = FAX_USCM_PVST_FREQ,
))

// Response Teams
Expand All @@ -227,6 +236,9 @@ GLOBAL_LIST_INIT(radiochannels, list(
//Listening Device Frequencies
#define BUG_FREQS list(BUG_A_FREQ, BUG_B_FREQ)

//Fax Responder internal monitor frequencies
#define FAX_RESP_FREQS list(FAX_WY_FREQ, FAX_USCM_HC_FREQ, FAX_USCM_PVST_FREQ)

//Depts - used for colors in headset.dm, as well as deciding what the marine comms tower can listen into
#define DEPT_FREQS list(COMM_FREQ, MED_FREQ, ENG_FREQ, SEC_FREQ, SENTRY_FREQ, ALPHA_FREQ, BRAVO_FREQ, CHARLIE_FREQ, DELTA_FREQ, ECHO_FREQ, CRYO_FREQ, REQ_FREQ, JTAC_FREQ, INTEL_FREQ, WY_FREQ)

Expand Down Expand Up @@ -304,6 +316,9 @@ SUBSYSTEM_DEF(radio)
"[CLF_ENGI_FREQ]" = "opforeng",
"[CLF_MED_FREQ]" = "opformed",
"[CLF_CCT_FREQ]" = "opforcct",
"[FAX_WY_FREQ]" = "airadio",
"[FAX_USCM_HC_FREQ]" = "aiprivradio",
"[FAX_USCM_PVST_FREQ]" = "aiprivradio",
)

/datum/controller/subsystem/radio/proc/add_object(obj/device as obj, new_frequency as num, filter = null as text|null)
Expand Down
3 changes: 3 additions & 0 deletions code/datums/emergency_calls/ert_stations.dm
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,6 @@

/datum/lazy_template/ert/uscm_station
map_name = "uscm_ert_station"

/datum/lazy_template/fax_response_base
map_name = "fax_responder_base"
12 changes: 12 additions & 0 deletions code/datums/skills/civilian.dm
Original file line number Diff line number Diff line change
Expand Up @@ -224,3 +224,15 @@ CIVILIAN
SKILL_FIREARMS = SKILL_FIREARMS_TRAINED,
SKILL_LEADERSHIP = SKILL_LEAD_TRAINED,
)

/datum/skills/civilian/fax_responder
name = "Comms Relay Worker" //Used for fax responder presets, allowing use of appropriate HUDs and basics.
skills = list(
SKILL_ENDURANCE = SKILL_ENDURANCE_TRAINED,
SKILL_LEADERSHIP = SKILL_LEAD_MASTER,
SKILL_OVERWATCH = SKILL_OVERWATCH_TRAINED,
SKILL_MEDICAL = SKILL_MEDICAL_TRAINED,
SKILL_ENGINEER = SKILL_ENGINEER_NOVICE,
SKILL_VEHICLE = SKILL_VEHICLE_SMALL,
SKILL_INTEL = SKILL_INTEL_EXPERT,
)
4 changes: 4 additions & 0 deletions code/game/area/admin_level.dm
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,10 @@
soundscape_playlist = SCAPE_PL_ELEVATOR_MUSIC
icon_state = "yellow"

/area/adminlevel/ert_station/fax_response_station
name = "Sector Comms Relay"
icon_state = "green"

//Simulation area
/area/adminlevel/simulation
name = "Simulated Reality"
Expand Down
102 changes: 102 additions & 0 deletions code/game/gamemodes/cm_initialize.dm
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ Additional game mode variables.
var/list/dead_queens // A list of messages listing the dead queens
var/list/predators = list()
var/list/joes = list()
var/list/fax_responders = list()

var/xeno_required_num = 0 //We need at least one. You can turn this off in case we don't care if we spawn or don't spawn xenos.
var/xeno_starting_num = 0 //To clamp starting xenos.
Expand Down Expand Up @@ -255,6 +256,107 @@ Additional game mode variables.

return new_predator

//===================================================\\
//FAX RESPONDER INITIATLIZE\\
//===================================================\\
/datum/game_mode/proc/check_fax_responder_late_join(mob/responder, show_warning = TRUE)
if(!responder.client)
return FALSE
if(!(responder?.client.check_whitelist_status(WHITELIST_FAX_RESPONDER)))
if(show_warning)
to_chat(responder, SPAN_WARNING("You are not whitelisted!"))
return FALSE
if(show_warning && tgui_alert(responder, "Confirm joining as a Fax Responder.", "Confirmation", list("Yes", "No"), 10 SECONDS) != "Yes")
return FALSE
if(!get_fax_responder_slots(responder))
if(show_warning)
to_chat(responder, SPAN_WARNING("No slots available!"))
return FALSE
return TRUE

/datum/game_mode/proc/get_fax_responder_slots(mob/responder_candidate)
var/list/options = list()
if(!responder_candidate.client)
return FALSE
if(!(responder_candidate.client.check_whitelist_status(WHITELIST_FAX_RESPONDER)))
to_chat(responder_candidate, SPAN_WARNING("You are not whitelisted!"))
return FALSE

for(var/job in FAX_RESPONDER_JOB_LIST)
var/datum/job/fax_responder_job = GLOB.RoleAuthority.roles_by_name[job]
var/job_max = fax_responder_job.total_positions
if((fax_responder_job.current_positions < job_max) && fax_responder_job.can_play_role(responder_candidate.client))
options += job
return options

/datum/game_mode/proc/attempt_to_join_as_fax_responder(mob/responder_candidate, from_lobby = FALSE)
var/list/options = get_fax_responder_slots(responder_candidate)
if(!options || !options.len)
to_chat(responder_candidate, SPAN_WARNING("No Available Slot!"))
if(from_lobby)
var/mob/new_player/lobbied = responder_candidate
lobbied.new_player_panel()
return FALSE

var/choice = tgui_input_list(responder_candidate, "What Fax Responder do you want to join as?", "Which Responder?", options, 30 SECONDS)
if(!(choice in FAX_RESPONDER_JOB_LIST))
to_chat(responder_candidate, SPAN_WARNING("Error: No valid responder selected."))
if(from_lobby)
var/mob/new_player/lobbied = responder_candidate
lobbied.new_player_panel()
return FALSE

if(!transform_fax_responder(responder_candidate, choice))
if(from_lobby)
var/mob/new_player/lobbied = responder_candidate
lobbied.new_player_panel()
return FALSE

if(responder_candidate)
responder_candidate.moveToNullspace() //Nullspace it for garbage collection later.
return TRUE

/datum/game_mode/proc/transform_fax_responder(mob/responder_candidate, sub_job)
//set waitfor = FALSE

if(!(sub_job in FAX_RESPONDER_JOB_LIST))
return FALSE

if(!responder_candidate.client) // Legacy - probably due to spawn code sync sleeps
log_debug("Null client attempted to transform_fax_responder")
return FALSE
if(!loaded_fax_base)
loaded_fax_base = SSmapping.lazy_load_template(/datum/lazy_template/fax_response_base, force = TRUE)
if(!loaded_fax_base)
log_debug("Error loading fax response base!")
return FALSE

responder_candidate.client.prefs.find_assigned_slot(JOB_FAX_RESPONDER)

var/turf/spawn_point = get_turf(pick(GLOB.latejoin_by_job[sub_job]))
var/mob/living/carbon/human/new_responder = new(spawn_point)
responder_candidate.mind.transfer_to(new_responder, TRUE)
new_responder.client?.prefs.copy_all_to(new_responder, JOB_FAX_RESPONDER, TRUE, TRUE)

var/datum/job/fax_responder_job = GLOB.RoleAuthority.roles_by_name[sub_job]

if(!fax_responder_job)
qdel(new_responder)
return FALSE

// This is usually done in assign_role, a proc which is not executed in this case, since check_fax_responder_late_join is running its own checks.
fax_responder_job.current_positions++
GLOB.RoleAuthority.equip_role(new_responder, fax_responder_job, new_responder.loc)
SSticker.minds += new_responder.mind

message_admins(FONT_SIZE_XL(SPAN_RED("([new_responder.key]) joined as a [sub_job], [new_responder.real_name].")))
new_responder.add_fax_responder()

return TRUE


//===================================================\\
Expand Down
2 changes: 1 addition & 1 deletion code/game/gamemodes/colonialmarines/whiskey_outpost.dm
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
/datum/job/civilian/doctor/whiskey = JOB_DOCTOR,
/datum/job/civilian/researcher/whiskey = JOB_RESEARCHER,
/datum/job/logistics/engineering/whiskey = JOB_CHIEF_ENGINEER,
/datum/job/logistics/tech/maint/whiskey = JOB_MAINT_TECH,
/datum/job/logistics/maint/whiskey = JOB_MAINT_TECH,
/datum/job/logistics/cargo/whiskey = JOB_CARGO_TECH,
/datum/job/civilian/liaison/whiskey = JOB_CORPORATE_LIAISON,
/datum/job/marine/leader/whiskey = JOB_SQUAD_LEADER,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,12 +189,12 @@ Ensure power is up, and the bunker is well defended. You share your bunker crew
//*************************************
//---------------MAINT TECH-------------
//*************************************/
/datum/job/logistics/tech/maint/whiskey
/datum/job/logistics/maint/whiskey
title = JOB_WO_ORDNANCE_TECH
supervisors = "the bunker crew master and the quartermaster"
gear_preset = /datum/equipment_preset/wo/bc

/datum/job/logistics/tech/maint/whiskey/generate_entry_message(mob/living/carbon/human/H)
/datum/job/logistics/maint/whiskey/generate_entry_message(mob/living/carbon/human/H)
. = {"You've worked here for a while, figuring it was a pretty comfy job. Now you gotta fight for your life. Have fun with that.
Assist both the Bunker Crew Master and the Quartermaster in their duties."}

Expand Down
3 changes: 3 additions & 0 deletions code/game/gamemodes/game_mode.dm
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ GLOBAL_VAR_INIT(cas_tracking_id_increment, 0) //this var used to assign unique t

var/hardcore = FALSE

///Whether or not the fax response station has loaded.
var/loaded_fax_base = FALSE

/datum/game_mode/New()
..()
if(taskbar_icon)
Expand Down
15 changes: 15 additions & 0 deletions code/game/jobs/job/civilians/civilian.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,18 @@
/datum/timelock/medic/New(name, time_required, list/roles)
. = ..()
src.roles = JOB_MEDIC_ROLES_LIST

/datum/timelock/corporate
name = "Corporate Roles"

/datum/timelock/corporate/New(name, time_required, list/roles)
. = ..()
src.roles = JOB_CORPORATE_ROLES_LIST


/datum/timelock/civil
name = "Civil Roles"

/datum/timelock/civil/New(name, time_required, list/roles)
. = ..()
src.roles = JOB_CIVIL_ROLES_LIST
Loading

0 comments on commit 74f959d

Please sign in to comment.