mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-19 11:58:39 +01:00
Job subsystem & Player Spawn Tweaks (#2403)
Converts the job controller into a subsystem, including absolute paths. Also cleans up some mob despawn code. changes: The job master is now a subsystem. Job init moved out of EMI. Custom loadout now properly overrides job equipment on spawn. Odin despawn timers are now deleted on arrival shuttle launch. Cryogenic storage despawn is now handled by the job controller. Backpack equipping has been fully moved to equip_backpack(). equip_backpack() will now equip departmental backpacks. Job backpack selection is now set via. vars instead of overriding a proc. Fixes #2180.
This commit is contained in:
@@ -96,17 +96,12 @@
|
||||
if (!pref.player_alt_titles)
|
||||
pref.player_alt_titles = new()
|
||||
|
||||
if(!job_master)
|
||||
return
|
||||
|
||||
for(var/datum/job/job in job_master.occupations)
|
||||
for(var/datum/job/job in SSjobs.occupations)
|
||||
var/alt_title = pref.player_alt_titles[job.title]
|
||||
if(alt_title && !(alt_title in job.alt_titles))
|
||||
pref.player_alt_titles -= job.title
|
||||
|
||||
/datum/category_item/player_setup_item/occupation/content(mob/user, limit = 16, list/splitJobs = list("Chief Medical Officer"))
|
||||
if(!job_master)
|
||||
return
|
||||
|
||||
. += "<tt><center>"
|
||||
. += "<b>Choose occupation chances</b><br>Unavailable occupations are crossed out.<br>"
|
||||
@@ -116,8 +111,7 @@
|
||||
|
||||
//The job before the current job. I only use this to get the previous jobs color when I'm filling in blank rows.
|
||||
var/datum/job/lastJob
|
||||
if (!job_master) return
|
||||
for(var/datum/job/job in job_master.occupations)
|
||||
for(var/datum/job/job in SSjobs.occupations)
|
||||
|
||||
index += 1
|
||||
if((index >= limit) || (job.title in splitJobs))
|
||||
@@ -222,7 +216,7 @@
|
||||
pref.player_alt_titles[job.title] = new_title
|
||||
|
||||
/datum/category_item/player_setup_item/occupation/proc/SetJob(mob/user, role)
|
||||
var/datum/job/job = job_master.GetJob(role)
|
||||
var/datum/job/job = SSjobs.GetJob(role)
|
||||
if(!job)
|
||||
return 0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user