Skip to content

Commit

Permalink
Makes the crew manifest into TGUI + Sorts the late-join menu (#2662)
Browse files Browse the repository at this point in the history
* Refactor crew manifest in lobby, ghost and AI actions (#58275)

Co-authored-by: celotajstg <[email protected]>

* Job re-arranging 1.0, ports department bitflags from #57174

* Prevent negative open positions in crew manifest (#58300)

* Resolve open position issues in crew manifest

* Use the classes helper for multiple classes

Co-authored-by: celotajstg <[email protected]>

* fixes, and adds icons to all command jobs on the crew manifest

* code for the bad implementation of TGUI linters-- god

* removes duplicate entries from the crew manifest

* review requests

* fixes the fixer global list

* the demon core is missing a non-erroring comma

* moves rats to the fixer tab

* bump

* experimental patch to the runtimes

---------

Co-authored-by: celotajstg <[email protected]>
Co-authored-by: celotajstg <[email protected]>
  • Loading branch information
3 people authored Jan 14, 2025
1 parent 32c404a commit 7a0d5a9
Show file tree
Hide file tree
Showing 97 changed files with 646 additions and 121 deletions.
9 changes: 9 additions & 0 deletions code/__DEFINES/jobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@

#define JOB_DISPLAY_ORDER_DEFAULT 0

#define DEPARTMENT_SECURITY (1<<0)
#define DEPARTMENT_COMMAND (1<<1)
#define DEPARTMENT_SERVICE (1<<2)
#define DEPARTMENT_CARGO (1<<3)
#define DEPARTMENT_ENGINEERING (1<<4)
#define DEPARTMENT_SCIENCE (1<<5)
#define DEPARTMENT_MEDICAL (1<<6)
#define DEPARTMENT_SILICON (1<<7)

//Command
#define JOB_DISPLAY_ORDER_MANAGER 1
#define JOB_DISPLAY_ORDER_SEPHIRAH 2
Expand Down
106 changes: 106 additions & 0 deletions code/__DEFINES/~lobotomy_defines/jobs.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
#define DEPARTMENT_W_CORP (1<<10)
#define DEPARTMENT_R_CORP (1<<11)
#define DEPARTMENT_HANA (1<<12)
#define DEPARTMENT_ASSOCIATION (1<<13)
#define DEPARTMENT_CITY_ANTAGONIST (1<<13)
#define DEPARTMENT_FIXERS (1<<14)

GLOBAL_LIST_INIT(w_corp_positions, list(
"W-Corp Representative",
"W-Corp L3 Squad Captain",
"W-Corp L2 Type A Lieutenant",
"W-Corp L2 Type B Support Agent",
"W-Corp L2 Type C Weapon Specialist",
"W-Corp L2 Type D Spear Agent",
"W-Corp L1 Cleanup Agent",
))

GLOBAL_LIST_INIT(r_corp_positions, list(
// 4th Pack Command
"Ground Commander",
"Lieutenant Commander",
"Operations Officer",
"Rabbit Squad Captain",
"Reindeer Squad Captain",
"Rhino Squad Captain",
"Raven Squad Captain",

// 5th Pack Command
"Assault Commander",
"Base Commander",
"Support Officer",
"Rat Squad Leader",
"Rooster Squad Leader",
"Raccoon Squad Leader",
"Roadrunner Squad Leader",

// 4th Pack troops
"R-Corp Suppressive Rabbit",
"R-Corp Assault Rabbit",
"R-Corp Medical Reindeer",
"R-Corp Berserker Reindeer",
"R-Corp Gunner Rhino",
"R-Corp Hammer Rhino",
"R-Corp Scout Raven",
"R-Corp Support Raven",

// 5th Pack troops
"R-Corp Rat",
"R-Corp Rooster",
"R-Corp Raccoon Spy",
"R-Corp Raccoon Sniper",
"R-Corp Roadrunner",
))

GLOBAL_LIST_INIT(hana_positions, list(
"Hana Administrator",
"Hana Representative",
"Hana Intern",
))

GLOBAL_LIST_INIT(fixer_positions, list(
"East Office Director",
"East Office Fixer",
"North Office Director",
"North Office Fixer",

"Association Section Director",
"Association Veteran",
"Association Fixer",
"Roaming Association Fixer",

"Medical Fixer Assistant",
"Fixer",
"Rat", // most fitting, somehow
))

GLOBAL_LIST_INIT(association_positions, list(
"Association Section Director",
"Association Veteran",
"Association Fixer",
"Roaming Association Fixer",
))

GLOBAL_LIST_INIT(city_antagonist_positions, list(
"Index Messenger",
"Index Proxy",
"Index Proselyte",

"Blade Lineage Cutthroat",
"Blade Lineage Salsu",
"Blade Lineage Ronin",
"Blade Lineage Roaming Salsu",

"Grand Inquisitor",
"N Corp Grosshammer",
"N Corp Mittlehammer",
"N Corp Kleinhammer",

"Thumb Sottocapo",
"Thumb Capo",
"Thumb Soldato",

"Kurokumo Kashira",
"Kurokumo Hosa",
"Kurokumo Wakashu",
))
1 change: 1 addition & 0 deletions code/_globalvars/tgui.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
GLOBAL_DATUM(crew_manifest_tgui, /datum/crew_manifest)
18 changes: 12 additions & 6 deletions code/controllers/subsystem/maptype.dm
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,26 @@ SUBSYSTEM_DEF(maptype)
var/list/nofear = list("limbus_labs")

//What departments are we looking at
var/list/departments = list("Command","Security","Service")
var/list/departments = list("Command", "Security", "Service")


/datum/controller/subsystem/maptype/Initialize()
..()

//Badda Bing Badda Da. This makes the latejoin menu cleaner
switch(SSmaptype.maptype)
if("wonderlabs", "city", "fixers")
departments = list("Command", "Security", "Service", "Science")
if("wonderlabs")
departments = list("Command", "Fixers", "Security", "Service")
if("city")
departments = list("Command", "Hana", "Association", "Syndicate", "Fixers", "Medical", "Security", "Service")
if("fixers")
departments = list("Command", "Hana", "Association", "Fixers", "Medical", "Service")
if("limbus_labs")
departments = list("Command", "Security","Medical", "Science", "Service" )
if("rcorp", "wcorp")
departments = list("Command", "Security")
departments = list("Command", "Security", "Medical", "Science", "Engineering", "Service" )
if("rcorp")
departments = list("Command", "R Corp", "Medical")
if("wcorp")
departments = list("Command", "W Corp")

var/list/all_jobs = subtypesof(/datum/job)
if(!all_jobs.len)
Expand Down
53 changes: 46 additions & 7 deletions code/datums/datacore.dm
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,15 @@
"Science",
"Supply",
"Service",
"Silicon"
"Silicon",
// LOBOTOMYCORPORATION ADDITION START
"W Corp",
"R Corp",
"Hana",
"Association",
"Syndicate",
"Fixers",
// LOBOTOMYCORPORATION ADDITION END
)
var/list/departments = list(
"Command" = GLOB.command_positions,
Expand All @@ -158,8 +166,18 @@
"Science" = GLOB.science_positions,
"Supply" = GLOB.supply_positions,
"Service" = GLOB.service_positions,
"Silicon" = GLOB.nonhuman_positions
"Silicon" = GLOB.nonhuman_positions,
// LOBOTOMYCORPORATION ADDITION START
"W Corp" = GLOB.w_corp_positions,
"R Corp" = GLOB.r_corp_positions,
"Hana" = GLOB.hana_positions,
"Association" = GLOB.association_positions,
"Syndicate" = GLOB.city_antagonist_positions,
"Fixers" = GLOB.fixer_positions,
// LOBOTOMYCORPORATION ADDITION END
)
var/list/heads = GLOB.command_positions + list("Quartermaster")

for(var/datum/data/record/t in GLOB.data_core.general)
var/name = t.fields["name"]
var/rank = t.fields["rank"]
Expand All @@ -170,12 +188,33 @@
if((rank in jobs) || (true_rank in jobs)) //Tegu edit - alt job titles
if(!manifest_out[department])
manifest_out[department] = list()
manifest_out[department] += list(list(
"name" = name,
"rank" = rank
))
// LOBOTOMYCORPORATION ADDITION START
var/duplicate_found = FALSE
for(var/list/data as anything in manifest_out[department])
if(findtext(data["name"], name) && rank == data["rank"])
duplicate_found = TRUE
if(length(data) == 2)
data["count"] = 1
data["count"]++
data["name"] = "x[data["count"]] [name]"
continue

if(duplicate_found)
has_department = TRUE
continue
// LOBOTOMYCORPORATION ADDITION END
// Append to beginning of list if captain or department head
if (rank == "Captain" || (department != "Command" && (rank in heads)))
manifest_out[department] = list(list(
"name" = name,
"rank" = rank
)) + manifest_out[department]
else
manifest_out[department] += list(list(
"name" = name,
"rank" = rank
))
has_department = TRUE
break
if(!has_department)
if(!manifest_out["Misc"])
manifest_out["Misc"] = list()
Expand Down
3 changes: 3 additions & 0 deletions code/modules/jobs/job_types/_job.dm
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@

var/bounty_types = CIV_JOB_BASIC

///Bitfield of departments this job belongs wit
var/departments = NONE

/// Should this job be allowed to be picked for the bureaucratic error event?
var/allow_bureaucratic_error = TRUE

Expand Down
1 change: 1 addition & 0 deletions code/modules/jobs/job_types/agent.dm
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
minimal_access = list()

allow_bureaucratic_error = FALSE
departments = DEPARTMENT_SECURITY

job_important = "You are a L-Corp Agent. Your job is to work on and suppress Abnormalities. Use :h to talk on your departmental radio."

Expand Down
10 changes: 6 additions & 4 deletions code/modules/jobs/job_types/assistant.dm
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,15 @@ GLOBAL_LIST_EMPTY(spawned_clerks)
spawn_positions = 0
supervisors = "absolutely everyone"
selection_color = "#dddddd"
access = list(ACCESS_ROBOTICS) //See /datum/job/assistant/get_access()
minimal_access = list(ACCESS_ROBOTICS) //See /datum/job/assistant/get_access()
// Let their be bot maintenance!

outfit = /datum/outfit/job/assistant
antag_rep = 7 //persistant currency but currently unusable
antag_rep = 7 // Persistant currency but currently unusable
display_order = JOB_DISPLAY_ORDER_CLERK

access = list(ACCESS_ROBOTICS) // Let their be bot maintenance!
minimal_access = list(ACCESS_ROBOTICS)
departments = DEPARTMENT_SERVICE

liver_traits = list(TRAIT_GREYTIDE_METABOLISM)

allow_bureaucratic_error = FALSE
Expand Down
1 change: 1 addition & 0 deletions code/modules/jobs/job_types/captain.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
display_order = JOB_DISPLAY_ORDER_CAPTAIN

access = list(ACCESS_COMMAND) // LC13:To-Do
departments = DEPARTMENT_COMMAND | DEPARTMENT_SECURITY
exp_requirements = 6000
exp_type = EXP_TYPE_CREW
exp_type_department = EXP_TYPE_SECURITY
Expand Down
1 change: 1 addition & 0 deletions code/modules/jobs/job_types/city/HHPP.dm
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ HHPP Employee
selection_color = "#dddddd"
access = list(ACCESS_KITCHEN)
minimal_access = list(ACCESS_KITCHEN)
departments = DEPARTMENT_SERVICE
outfit = /datum/outfit/job/chef
antag_rep = 7
display_order = JOB_DISPLAY_ORDER_HHPP
Expand Down
1 change: 1 addition & 0 deletions code/modules/jobs/job_types/city/backstreets_butcher.dm
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Backstreets Butcher
selection_color = "#555555"
access = list(ACCESS_GENETICS)
minimal_access = list(ACCESS_GENETICS)
departments = DEPARTMENT_SERVICE // They can provide you a service, before you're eaten
outfit = /datum/outfit/job/butcher
display_order = JOB_DISPLAY_ORDER_ANTAG
exp_requirements = 300
Expand Down
1 change: 1 addition & 0 deletions code/modules/jobs/job_types/city/carnival.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
selection_color = "#555555"
access = list(ACCESS_CARGO)
minimal_access = list(ACCESS_CARGO)
departments = DEPARTMENT_SERVICE
outfit = /datum/outfit/job/carnival
display_order = JOB_DISPLAY_ORDER_ANTAG
exp_requirements = 300
Expand Down
2 changes: 1 addition & 1 deletion code/modules/jobs/job_types/city/civilian.dm
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ Civilian
selection_color = "#dddddd"
access = list(ACCESS_LAWYER)
minimal_access = list(ACCESS_LAWYER)
departments = DEPARTMENT_SERVICE
outfit = /datum/outfit/job/civilian
antag_rep = 7
display_order = JOB_DISPLAY_ORDER_CIVILIAN

allow_bureaucratic_error = FALSE
maptype = list("city", "fixers")
paycheck = 170
Expand Down
2 changes: 2 additions & 0 deletions code/modules/jobs/job_types/city/doctor.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

access = list(ACCESS_MEDICAL)
minimal_access = list(ACCESS_MEDICAL)
departments = DEPARTMENT_COMMAND | DEPARTMENT_MEDICAL
paycheck = PAYCHECK_MEDIUM
paycheck_department = ACCOUNT_MED

Expand Down Expand Up @@ -126,6 +127,7 @@
exp_requirements = 180

display_order = JOB_DISPLAY_ORDER_MEDICALASSIST
departments = DEPARTMENT_MEDICAL | DEPARTMENT_FIXERS
maptype = list("wonderlabs", "city", "fixers")
job_important = "You are an a medical fixer. Your job is to explore the backstreets to grab dead fixers to bring back to the clinic."

Expand Down
2 changes: 2 additions & 0 deletions code/modules/jobs/job_types/city/fixer/east.dm
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
trusted_only = TRUE
access = list(ACCESS_MINING_STATION, ACCESS_RC_ANNOUNCE) // East office is 54
minimal_access = list(ACCESS_MINING_STATION, ACCESS_RC_ANNOUNCE)
departments = DEPARTMENT_COMMAND | DEPARTMENT_FIXERS
maptype = list("city-small", "wonderlabs")

job_attribute_limit = 80
Expand Down Expand Up @@ -66,6 +67,7 @@
display_order = JOB_DISPLAY_ORDER_FIXER
access = list(ACCESS_MINING_STATION)
minimal_access = list(ACCESS_MINING_STATION)
departments = DEPARTMENT_FIXERS
maptype = "wonderlabs"

job_attribute_limit = 60
Expand Down
4 changes: 3 additions & 1 deletion code/modules/jobs/job_types/city/fixer/north.dm
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@
display_order = JOB_DISPLAY_ORDER_FIXERLEAD
paycheck = 100
trusted_only = TRUE
access = list(ACCESS_XENOBIOLOGY, ACCESS_RC_ANNOUNCE) // Numero 55
access = list(ACCESS_XENOBIOLOGY, ACCESS_RC_ANNOUNCE)
minimal_access = list(ACCESS_XENOBIOLOGY, ACCESS_RC_ANNOUNCE)
departments = DEPARTMENT_COMMAND | DEPARTMENT_FIXERS
maptype = list("city-small", "wonderlabs")

job_attribute_limit = 80
Expand Down Expand Up @@ -66,6 +67,7 @@
display_order = JOB_DISPLAY_ORDER_FIXER
access = list(ACCESS_XENOBIOLOGY)
minimal_access = list(ACCESS_XENOBIOLOGY)
departments = DEPARTMENT_FIXERS
maptype = "wonderlabs"

job_attribute_limit = 60
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
display_order = JOB_DISPLAY_ORDER_SYNDICATEGOON
access = list(ACCESS_SYNDICATE)
minimal_access = list(ACCESS_SYNDICATE)
departments = DEPARTMENT_CITY_ANTAGONIST
paycheck = 150
maptype = list("city")
job_important = "You belong to the Blade Lineage, a band of wandering swordsmen. \
Expand Down
1 change: 1 addition & 0 deletions code/modules/jobs/job_types/city/prosthetic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

access = list(ACCESS_GENETICS)
minimal_access = list(ACCESS_GENETICS)
departments = DEPARTMENT_MEDICAL | DEPARTMENT_SERVICE
paycheck = 700 //You need a lot of money
paycheck_department = ACCOUNT_MED

Expand Down
1 change: 1 addition & 0 deletions code/modules/jobs/job_types/city/rat.dm
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Scavenger
selection_color = "#555555"
access = list(ACCESS_LAWYER)
minimal_access = list(ACCESS_LAWYER)
departments = DEPARTMENT_FIXERS // Close enough
outfit = /datum/outfit/job/scavenger
antag_rep = 7
display_order = JOB_DISPLAY_ORDER_ANTAG
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
trusted_only = TRUE
access = list(ACCESS_SYNDICATE, ACCESS_SYNDICATE_LEADER)
minimal_access = list(ACCESS_SYNDICATE, ACCESS_SYNDICATE_LEADER)
departments = DEPARTMENT_COMMAND | DEPARTMENT_CITY_ANTAGONIST
paycheck = 700
maptype = list("city")
job_important = "This is a roleplay role. You are the leader of this band of wandering swordsmen. \
Expand Down
Loading

0 comments on commit 7a0d5a9

Please sign in to comment.