Skip to content

Commit

Permalink
Weyland-Yutani ID Console (#6372)
Browse files Browse the repository at this point in the history
<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
not be viewable. -->

# About the pull request
Repairs the ID mod console "centcom" variable (renames it to weyland).
Allows this new WY version of the console to correctly assign Corporate
ID Accesses and job presets.
Renames a couple PMC jobs (no impact due to no playtime tracking)
Adds a whole bunch of WY jobs, including the PMCs, so they'll now track
playtime.

# Explain why it's good for the game

Makes it a bit easier to dynamically update IDs in WY related events. I
know I've encountered plenty of times where I've wanted to add corporate
accesses to certain people but had to resort to variable editing.


# Testing Photographs and Procedure
<!-- Include any screenshots/videos/debugging steps of the modified code
functioning successfully, ideally including edge cases. -->

<!-- !! If you are modifying sprites, you **must** include one or more
in-game screenshots or videos of the new sprites. !! -->


![image](https://github.com/cmss13-devs/cmss13/assets/41653574/49dab43e-0418-4520-81c9-6d0fce1b32bb)

![image](https://github.com/cmss13-devs/cmss13/assets/41653574/ce6681f2-5c57-40db-8a1a-b872345f108b)


# Changelog

:cl:
fix: Changing an Identification Computer to is_weyland (formerly
is_centcom) now works correctly and allows assignment of corporate
accesses or presets.
code: Added two procs for interpreting WY access information in the UI.
code: Added separate role groups for PMC and Corporate job defines.
add: Added ACCESS_WY_DATABASE as a requirement to use the WY subtype
console.
add: Added a WY subtype for crew monitor.
code: Renamed the faction defines explicitly relating to static defences
due to confusion over FACTION_WY and FACTION_WEYLAND.
/:cl:

<!-- Both :cl:'s are required for the changelog to work! -->
  • Loading branch information
realforest2001 authored Jun 4, 2024
1 parent c69997b commit fa0637a
Show file tree
Hide file tree
Showing 15 changed files with 249 additions and 44 deletions.
2 changes: 1 addition & 1 deletion code/__DEFINES/access.dm
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ most of them are tied into map-placed objects. This should be reworked in the fu
#define ACCESS_WY_ARMORY 212
///Secret research or other projects with highly restricted access
#define ACCESS_WY_SECRETS 213

#define ACCESS_WY_DATABASE 214
#define ACCESS_WY_LEADERSHIP 215
///Senior leadership, the highest ranks
#define ACCESS_WY_SENIOR_LEAD 216
Expand Down
21 changes: 12 additions & 9 deletions code/__DEFINES/job.dm
Original file line number Diff line number Diff line change
Expand Up @@ -172,25 +172,25 @@ GLOBAL_LIST_INIT(job_command_roles, JOB_COMMAND_ROLES_LIST)
//------------------------------------

//-------- PMC --------//
#define JOB_PMC_STANDARD "Weyland-Yutani PMC (Standard)"
#define JOB_PMC_STANDARD "PMC Operator"
#define JOB_PMC_ENGINEER "PMC Corporate Technician"
#define JOB_PMC_MEDIC "PMC Corporate Medic"
#define JOB_PMC_DOCTOR "PMC Trauma Surgeon"
#define JOB_PMC_INVESTIGATOR "PMC Medical Investigator"
#define JOB_PMC_DETAINER "Weyland-Yutani PMC (Detainer)"
#define JOB_PMC_ELITE "PMC Elite"
#define JOB_PMC_DETAINER "PMC Security Enforcer"
#define JOB_PMC_GUNNER "PMC Support Weapons Specialist" //Renamed from Specialist to Support Specialist as it only has SG skills.
#define JOB_PMC_SNIPER "PMC Weapons Specialist" //Renamed from Sharpshooter to specialist as it uses specialist skills.
#define JOB_PMC_CREWMAN "Weyland-Yutani PMC (Crewman)"
#define JOB_PMC_NINJA "PMC Ninja"
#define JOB_PMC_CREWMAN "PMC Vehicle Crewman"
#define JOB_PMC_XENO_HANDLER "PMC Xeno Handler"
#define JOB_PMC_COMMANDO "PMC Commando"
#define JOB_PMC_LEADER "PMC Leader"
#define JOB_PMC_LEAD_INVEST "PMC Lead Investigator"
#define JOB_PMC_DIRECTOR "PMC Site Director"
#define JOB_PMC_SYNTH "PMC Support Synthetic"

#define JOB_PMC_GRUNT_LIST list(JOB_PMC_STANDARD, JOB_PMC_ENGINEER, JOB_PMC_MEDIC, JOB_PMC_INVESTIGATOR, JOB_PMC_DETAINER, JOB_PMC_ELITE, JOB_PMC_GUNNER, JOB_PMC_SNIPER, JOB_PMC_CREWMAN, JOB_PMC_NINJA, JOB_PMC_XENO_HANDLER, JOB_PMC_COMMANDO, JOB_PMC_LEADER, JOB_PMC_LEAD_INVEST)
#define ROLES_WY_PMC list(JOB_PMC_LEADER, JOB_PMC_SNIPER, JOB_PMC_GUNNER, JOB_PMC_ENGINEER, JOB_PMC_MEDIC, JOB_PMC_STANDARD)
#define ROLES_WY_PMC_AUX list(JOB_PMC_SYNTH, JOB_PMC_CREWMAN, JOB_PMC_XENO_HANDLER, JOB_PMC_DOCTOR)
#define ROLES_WY_PMC_INSPEC list(JOB_PMC_LEAD_INVEST, JOB_PMC_INVESTIGATOR, JOB_PMC_DETAINER)
#define ROLES_WY_PMC_ALL ROLES_WY_PMC + ROLES_WY_PMC_AUX + ROLES_WY_PMC_INSPEC

//-------- WY --------//

Expand All @@ -205,13 +205,16 @@ GLOBAL_LIST_INIT(job_command_roles, JOB_COMMAND_ROLES_LIST)
#define JOB_CHIEF_EXECUTIVE "Corporate Chief Executive"
#define JOB_DIRECTOR "W-Y Director"

#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)

//-------- WY Goons --------//
#define JOB_WY_GOON "WY Corporate Security"
#define JOB_WY_GOON_TECH "WY Corporate Security Technician"
#define JOB_WY_GOON_LEAD "WY Corporate Security Lead"
#define JOB_WY_GOON_RESEARCHER "WY Research Consultant"

#define JOB_WY_GOON_LIST list(JOB_WY_GOON, JOB_WY_GOON_LEAD)
#define ROLES_WY_GOONS list(JOB_WY_GOON_LEAD, JOB_WY_GOON_TECH, JOB_WY_GOON)

//---- Contractors ----//
#define JOB_CONTRACTOR "VAIPO Mercenary"
Expand Down Expand Up @@ -386,4 +389,4 @@ GLOBAL_LIST_INIT(job_command_roles, JOB_COMMAND_ROLES_LIST)

///For denying certain traits being applied to people. ie. bad leg
///'Grunt' lists are for people who wouldn't logically get the bad leg trait, ie. UPP marine counterparts.
#define JOB_ERT_GRUNT_LIST list(DUTCH_JOB_LIST, RIOT_JOB_LIST, PROVOST_JOB_LIST, CMB_GRUNT_LIST, CLF_JOB_LIST, UPP_JOB_GRUNT_LIST, UPP_COMMANDO_JOB_LIST, CONTRACTOR_JOB_LIST, JOB_WY_GOON_LIST, JOB_PMC_GRUNT_LIST)
#define JOB_ERT_GRUNT_LIST list(DUTCH_JOB_LIST, RIOT_JOB_LIST, PROVOST_JOB_LIST, CMB_GRUNT_LIST, CLF_JOB_LIST, UPP_JOB_GRUNT_LIST, UPP_COMMANDO_JOB_LIST, CONTRACTOR_JOB_LIST, ROLES_WY_GOONS, ROLES_WY_PMC_ALL)
6 changes: 3 additions & 3 deletions code/__DEFINES/sentry_laptop_configurations.dm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#define FACTION_WEYLAND "WY"
#define FACTION_HUMAN "HUMAN"
#define FACTION_COLONY "COLONY"
#define SENTRY_FACTION_WEYLAND "WY"
#define SENTRY_FACTION_HUMAN "HUMAN"
#define SENTRY_FACTION_COLONY "COLONY"

#define ROF_SINGLE "SINGLE"
#define ROF_BURST "BURST"
Expand Down
2 changes: 1 addition & 1 deletion code/datums/paygrades/factions/wy/wy.dm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/datum/paygrade/wy_ranks
name = "WYC Paygrade"
pay_multiplier = 1
default_faction = FACTION_WEYLAND
default_faction = FACTION_WY

/datum/paygrade/wy_ranks/wyc1
paygrade = PAY_SHORT_WYC1
Expand Down
2 changes: 1 addition & 1 deletion code/datums/paygrades/paygrade.dm
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ GLOBAL_LIST_INIT(co_paygrades, list(
GLOB.uscm_officer_paygrades += paygrade
if(officer_grade >= GRADE_FLAG)
GLOB.uscm_highcom_paygrades += paygrade
if(FACTION_WEYLAND,FACTION_PMC)
if(FACTION_WY,FACTION_PMC)
if(officer_grade >= GRADE_FLAG)
GLOB.wy_highcom_paygrades += paygrade

Expand Down
54 changes: 53 additions & 1 deletion code/game/jobs/access.dm
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@
ACCESS_WY_PMC_TL,
ACCESS_WY_ARMORY,
ACCESS_WY_SECRETS,
ACCESS_WY_DATABASE,
ACCESS_WY_LEADERSHIP,
ACCESS_WY_SENIOR_LEAD,
) + get_access(ACCESS_LIST_COLONIAL_ALL)
Expand All @@ -236,6 +237,7 @@
ACCESS_WY_PMC,
ACCESS_WY_PMC_TL,
ACCESS_WY_ARMORY,
ACCESS_WY_DATABASE,
ACCESS_WY_LEADERSHIP,
ACCESS_WY_SENIOR_LEAD,
) + get_access(ACCESS_LIST_COLONIAL_ALL)
Expand Down Expand Up @@ -446,6 +448,40 @@
if(ACCESS_ARES_DEBUG)
return "AI Debug"

/proc/get_region_accesses_wy(code)
switch(code)
if(0)//Everything
return get_access(ACCESS_LIST_WY_ALL)
if(1)//Corporate General
return list(ACCESS_WY_GENERAL, ACCESS_WY_COLONIAL, ACCESS_WY_EXEC)
if(2)//Corporate Security
return list(ACCESS_WY_SECURITY, ACCESS_WY_ARMORY)
if(3)//Corporate Departments
return list(ACCESS_WY_MEDICAL, ACCESS_WY_ENGINEERING, ACCESS_WY_FLIGHT, ACCESS_WY_RESEARCH)
if(4)//Corporate Leadership
return list(ACCESS_WY_LEADERSHIP, ACCESS_WY_SENIOR_LEAD, ACCESS_WY_SECRETS, ACCESS_WY_DATABASE)
if(5)//PMCs
return list(ACCESS_WY_PMC, ACCESS_WY_PMC_TL, ACCESS_WY_ARMORY)
if(6)//Civilian
return get_access(ACCESS_LIST_COLONIAL_ALL)

/proc/get_region_accesses_name_wy(code)
switch(code)
if(0)
return "All"
if(1)
return "Corporate" // Security
if(2)
return "Corporate Security" // Medbay
if(3)
return "Corporate Departments" // Research
if(4)
return "Corporate Leadership" // Engineering
if(5)
return "Corporate PMCs" // Command
if(6)
return "Civilian" // Civilian

/proc/get_weyland_access_desc(A)
switch(A)
if(ACCESS_WY_GENERAL)
Expand All @@ -463,7 +499,7 @@
if(ACCESS_WY_RESEARCH)
return "Wey-Yu Research"
if(ACCESS_WY_EXEC)
return "Wey-Yu Corporate"
return "Wey-Yu Executive"
if(ACCESS_WY_PMC)
return "Wey-Yu PMC"
if(ACCESS_WY_PMC_TL)
Expand All @@ -472,7 +508,23 @@
return "Wey-Yu Armory"
if(ACCESS_WY_SECRETS)
return "Wey-Yu HighSec"
if(ACCESS_WY_DATABASE)
return "Wey-Yu Database"
if(ACCESS_WY_LEADERSHIP)
return "Wey-Yu Leadership"
if(ACCESS_WY_SENIOR_LEAD)
return "Wey-Yu Senior Leadership"
if(ACCESS_CIVILIAN_RESEARCH)
return "Civilian Research"
if(ACCESS_CIVILIAN_COMMAND)
return "Civilian Command"
if(ACCESS_CIVILIAN_MEDBAY)
return "Civilian Medbay"
if(ACCESS_CIVILIAN_LOGISTICS)
return "Civilian Logistics"
if(ACCESS_CIVILIAN_ENGINEERING)
return "Civilian Engineering"
if(ACCESS_CIVILIAN_BRIG)
return "Civilian Brig"
if(ACCESS_CIVILIAN_PUBLIC)
return "Civilian"
110 changes: 110 additions & 0 deletions code/game/jobs/job/special/weyland_yutani.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
/datum/job/special/wey_yu
supervisors = "Weyland-Yutani Corporate Office"
title = "Weyland-Yutani Representative"
selection_class = "job_cl"
flags_startup_parameters = ROLE_CUSTOM_SPAWN
gear_preset = /datum/equipment_preset/wy/trainee

/datum/job/special/wey_yu/corporate/trainee
title = JOB_TRAINEE
gear_preset = /datum/equipment_preset/wy/trainee

/datum/job/special/wey_yu/corporate/junior_exec
title = JOB_JUNIOR_EXECUTIVE
gear_preset = /datum/equipment_preset/wy/junior_exec

/datum/job/special/wey_yu/corporate/exec
title = JOB_EXECUTIVE
gear_preset = /datum/equipment_preset/wy/exec

/datum/job/special/wey_yu/corporate/senior_exec
title = JOB_SENIOR_EXECUTIVE
gear_preset = /datum/equipment_preset/wy/senior_exec

/datum/job/special/wey_yu/corporate/exec_spec
title = JOB_EXECUTIVE_SPECIALIST
gear_preset = /datum/equipment_preset/wy/exec_spec

/datum/job/special/wey_yu/corporate/exec_supr
title = JOB_EXECUTIVE_SUPERVISOR
gear_preset = /datum/equipment_preset/wy/exec_supervisor

/datum/job/special/wey_yu/corporate/assist_man
title = JOB_ASSISTANT_MANAGER
gear_preset = /datum/equipment_preset/wy/manager/assistant_manager

/datum/job/special/wey_yu/corporate/div_man
title = JOB_DIVISION_MANAGER
gear_preset = /datum/equipment_preset/wy/manager/division_manager
supervisors = "Weyland-Yutani Directorate"

/datum/job/special/wey_yu/corporate/chief_exec
title = JOB_CHIEF_EXECUTIVE
gear_preset = /datum/equipment_preset/wy/manager/chief_executive
supervisors = "Weyland-Yutani Directorate"

/datum/job/special/wey_yu/corporate/director
title = JOB_DIRECTOR
gear_preset = /datum/equipment_preset/wy/manager/director
supervisors = "Weyland-Yutani Directorate"


// PMCS //
/datum/job/special/wey_yu/pmc
supervisors = "Weyland-Yutani PMC Dispatch"

/datum/job/special/wey_yu/pmc/standard
title = JOB_PMC_STANDARD
gear_preset = /datum/equipment_preset/pmc/pmc_standard

/datum/job/special/wey_yu/pmc/medic
title = JOB_PMC_MEDIC
gear_preset = /datum/equipment_preset/pmc/pmc_medic

/datum/job/special/wey_yu/pmc/engineer
title = JOB_PMC_ENGINEER
gear_preset = /datum/equipment_preset/pmc/technician

/datum/job/special/wey_yu/pmc/gunner
title = JOB_PMC_GUNNER
gear_preset = /datum/equipment_preset/pmc/pmc_gunner

/datum/job/special/wey_yu/pmc/sniper
title = JOB_PMC_SNIPER
gear_preset = /datum/equipment_preset/pmc/pmc_sniper

/datum/job/special/wey_yu/pmc/leader
title = JOB_PMC_LEADER
gear_preset = /datum/equipment_preset/pmc/pmc_leader

/datum/job/special/wey_yu/pmc/investigator
title = JOB_PMC_INVESTIGATOR
gear_preset = /datum/equipment_preset/pmc/pmc_med_investigator

/datum/job/special/wey_yu/pmc/lead_invest
title = JOB_PMC_LEAD_INVEST
gear_preset = /datum/equipment_preset/pmc/pmc_lead_investigator

/datum/job/special/wey_yu/pmc/detainer
title = JOB_PMC_DETAINER
gear_preset = /datum/equipment_preset/pmc/pmc_detainer

/datum/job/special/wey_yu/pmc/crewman
title = JOB_PMC_CREWMAN
gear_preset = /datum/equipment_preset/pmc/pmc_crewman

/datum/job/special/wey_yu/pmc/doctor
title = JOB_PMC_DOCTOR
gear_preset = /datum/equipment_preset/pmc/doctor

/datum/job/special/wey_yu/pmc/handler
title = JOB_PMC_XENO_HANDLER
gear_preset = /datum/equipment_preset/pmc/xeno_handler

/datum/job/special/wey_yu/pmc/synth
title = JOB_PMC_SYNTH
gear_preset = /datum/equipment_preset/pmc/synth

/datum/job/special/wey_yu/pmc/director
title = JOB_PMC_DIRECTOR
gear_preset = /datum/equipment_preset/pmc/director
Loading

0 comments on commit fa0637a

Please sign in to comment.