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 Sep 26, 2024
2 parents fc78ceb + fc14a55 commit c45d792
Show file tree
Hide file tree
Showing 76 changed files with 5,784 additions and 269 deletions.
18 changes: 18 additions & 0 deletions code/__DEFINES/job.dm
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,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 @@ -366,6 +369,21 @@ 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 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)


//---------- ANTAG ----------//
#define JOB_PREDATOR "Predator"
#define JOB_XENOMORPH "Xenomorph"
#define JOB_XENOMORPH_QUEEN "Queen"
Expand Down
13 changes: 5 additions & 8 deletions code/__DEFINES/mode.dm
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,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 All @@ -137,7 +138,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 @@ -195,13 +196,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 @@ -225,6 +221,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
8 changes: 8 additions & 0 deletions code/__DEFINES/paperwork.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#define PAPER_CATEGORY_USCM "USCM"
#define PAPER_CATEGORY_USCM_HC "USCM HC"
#define PAPER_CATEGORY_PROVOST "Provost"
#define PAPER_CATEGORY_WEYYU "Weyland Yutani"
#define PAPER_CATEGORY_UPP "UPP"
#define PAPER_CATEGORY_CMB "CMB"
#define PAPER_CATEGORY_MP "Military Police"
#define PAPER_CATEGORY_LIAISON "WY Liaison"
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"
1 change: 1 addition & 0 deletions code/datums/emergency_calls/emergency_call.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
var/list/datum/emergency_call/all_calls = list() //initialized at round start and stores the datums.
var/datum/emergency_call/picked_calls[] = list() //Which distress calls are currently active
var/ert_dispatched = FALSE
var/loaded_fax_base = FALSE

/datum/game_mode/proc/ares_online()
var/name = "ARES Online"
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
100 changes: 100 additions & 0 deletions code/game/gamemodes/cm_initialize.dm
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,106 @@ 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, FALSE)

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].")))

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
7 changes: 7 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,10 @@
/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
75 changes: 75 additions & 0 deletions code/game/jobs/job/special/responders.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
/datum/job/fax_responder
title = JOB_FAX_RESPONDER
gear_preset = /datum/equipment_preset/fax_responder
selection_class = "job_command"
supervisors = "CMSS13 Administration Staff"
total_positions = 1
spawn_positions = 1

late_joinable = FALSE

flags_startup_parameters = ROLE_ADMIN_NOTIFY|ROLE_WHITELISTED|ROLE_NO_ACCOUNT|ROLE_CUSTOM_SPAWN|ROLE_HIDDEN
flags_whitelist = WHITELIST_FAX_RESPONDER

/datum/job/fax_responder/on_config_load()
entry_message_body = "<a href='[CONFIG_GET(string/wikiarticleurl)]/[URL_WIKI_FAX_RESPONDER]'>Your job</a> is to answer faxes sent to your fax machine. You are answering on behalf of the CMSS13 staff team and are therefore expected to behave appropriately. Failure to adhere to expectations may result in loss of the role or a server ban. Non-staff players of this role are not able to authorise ERTs through their faxes."
return ..()

/datum/job/fax_responder/uscm_hc
title = JOB_FAX_RESPONDER_USCM_HC
gear_preset = /datum/equipment_preset/fax_responder/uscm

AddTimelock(/datum/job/fax_responder/uscm_hc, list(
JOB_POLICE_ROLES = 25 HOURS,
JOB_COMMAND_ROLES = 75 HOURS,
))

/datum/job/fax_responder/uscm_pvst
title = JOB_FAX_RESPONDER_USCM_PVST
gear_preset = /datum/equipment_preset/fax_responder/uscm/provost

AddTimelock(/datum/job/fax_responder/uscm_pvst, list(
JOB_POLICE_ROLES = 150 HOURS,
JOB_COMMAND_ROLES = 75 HOURS,
))

/datum/job/fax_responder/wy
title = JOB_FAX_RESPONDER_WY
gear_preset = /datum/equipment_preset/fax_responder/wey_yu

AddTimelock(/datum/job/fax_responder/wy, list(
JOB_CORPORATE_ROLES = 150 HOURS,
))

/datum/job/fax_responder/upp
title = JOB_FAX_RESPONDER_UPP
gear_preset = /datum/equipment_preset/fax_responder/upp

AddTimelock(/datum/job/fax_responder/upp, list(
JOB_COMMAND_ROLES = 75 HOURS,
))

/datum/job/fax_responder/twe
title = JOB_FAX_RESPONDER_TWE
gear_preset = /datum/equipment_preset/fax_responder/twe

AddTimelock(/datum/job/fax_responder/twe, list(
JOB_COMMAND_ROLES = 75 HOURS,
))

/datum/job/fax_responder/clf
title = JOB_FAX_RESPONDER_CLF
gear_preset = /datum/equipment_preset/fax_responder/clf

AddTimelock(/datum/job/fax_responder/clf, list(
JOB_COMMAND_ROLES = 75 HOURS,
))

/datum/job/fax_responder/cmb
title = JOB_FAX_RESPONDER_CMB
gear_preset = /datum/equipment_preset/fax_responder/cmb

AddTimelock(/datum/job/fax_responder/cmb, list(
JOB_POLICE_ROLES = 75 HOURS,
JOB_COMMAND_ROLES = 25 HOURS,
))
6 changes: 4 additions & 2 deletions code/game/jobs/whitelist.dm
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,9 @@
#define WL_PANEL_RIGHT_YAUTJA (1<<2)
#define WL_PANEL_RIGHT_MENTOR (1<<3)
#define WL_PANEL_RIGHT_OVERSEER (1<<4)
#define WL_PANEL_RIGHT_MANAGER (1<<5)
#define WL_PANEL_ALL_COUNCILS (WL_PANEL_RIGHT_CO|WL_PANEL_RIGHT_SYNTH|WL_PANEL_RIGHT_YAUTJA)
#define WL_PANEL_ALL_RIGHTS (WL_PANEL_RIGHT_CO|WL_PANEL_RIGHT_SYNTH|WL_PANEL_RIGHT_YAUTJA|WL_PANEL_RIGHT_MENTOR|WL_PANEL_RIGHT_OVERSEER)
#define WL_PANEL_ALL_RIGHTS (WL_PANEL_RIGHT_CO|WL_PANEL_RIGHT_SYNTH|WL_PANEL_RIGHT_YAUTJA|WL_PANEL_RIGHT_MENTOR|WL_PANEL_RIGHT_OVERSEER|WL_PANEL_RIGHT_MANAGER)

/datum/whitelist_panel
var/viewed_player = list()
Expand All @@ -68,7 +69,7 @@
if(person.check_whitelist_status(WHITELIST_YAUTJA_LEADER))
rights |= WL_PANEL_RIGHT_YAUTJA
if(rights == WL_PANEL_ALL_COUNCILS)
return WL_PANEL_ALL_RIGHTS
rights |= WL_PANEL_RIGHT_OVERSEER
return rights

/datum/whitelist_panel/tgui_interact(mob/user, datum/tgui/ui)
Expand Down Expand Up @@ -122,6 +123,7 @@ GLOBAL_LIST_INIT(yaut_flags, list(
GLOBAL_LIST_INIT(misc_flags, list(
list(name = "Senior Enlisted Advisor", bitflag = WHITELIST_MENTOR, permission = WL_PANEL_RIGHT_MENTOR),
list(name = "Working Joe", bitflag = WHITELIST_JOE, permission = WL_PANEL_RIGHT_SYNTH),
list(name = "Fax Responder", bitflag = WHITELIST_FAX_RESPONDER, permission = WL_PANEL_RIGHT_MANAGER),
))

/datum/whitelist_panel/ui_static_data(mob/user)
Expand Down
2 changes: 1 addition & 1 deletion code/game/machinery/computer/medical.dm
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@
var/datum/asset/asset = get_asset_datum(/datum/asset/simple/paper)
var/obj/item/paper/P = new /obj/item/paper( src.loc )
P.name = text("Scan: [], []",record.fields["name"],worldtime2text())
P.info += text("<center><img src = [asset.get_url_mappings()["wylogo.png"]]><HR><I><B>Official Weyland-Yutani Document</B><BR>Scan Record</I><HR><H2>[]</H2>\n</center>",record.fields["name"])
P.info += text("<center><img src = [asset.get_url_mappings()["logo_wy.png"]]><HR><I><B>Official Weyland-Yutani Document</B><BR>Scan Record</I><HR><H2>[]</H2>\n</center>",record.fields["name"])
for(var/datum/data/record/R as anything in GLOB.data_core.medical)
if (R.fields["name"] == record.fields["name"])
if(R.fields["last_scan_time"] && R.fields["last_scan_result"])
Expand Down
Loading

0 comments on commit c45d792

Please sign in to comment.