Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes nobody having enough hours for jobs #11544

Merged
merged 2 commits into from
Sep 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions code/controllers/subsystem/department.dm
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ SUBSYSTEM_DEF(department)

// I don't like this here, but this globallist can't take proper values on its declaration.
GLOB.exp_jobsmap = list(
EXP_TYPE_CREW = list("titles" = get_all_jobs()),
EXP_TYPE_COMMAND = list("titles" = SSdepartment.department_assoc[DEPT_NAME_COMMAND]),
EXP_TYPE_ENGINEERING = list("titles" = SSdepartment.department_assoc[DEPT_NAME_ENGINEERING]),
EXP_TYPE_MEDICAL = list("titles" = SSdepartment.department_assoc[DEPT_NAME_MEDICAL]),
EXP_TYPE_SCIENCE = list("titles" = SSdepartment.department_assoc[DEPT_NAME_SCIENCE]),
EXP_TYPE_SUPPLY = list("titles" = SSdepartment.department_assoc[DEPT_NAME_CARGO]),
EXP_TYPE_SECURITY = list("titles" = SSdepartment.department_assoc[DEPT_NAME_SECURITY]),
EXP_TYPE_SILICON = list("titles" = SSdepartment.department_assoc[DEPT_NAME_SILICON]),
EXP_TYPE_SERVICE = list("titles" = SSdepartment.department_assoc[DEPT_NAME_CIVILIAN])
EXP_TYPE_CREW = get_all_jobs(),
EXP_TYPE_COMMAND = SSdepartment.get_jobs_by_dept_id(DEPT_NAME_COMMAND),
EXP_TYPE_ENGINEERING = SSdepartment.get_jobs_by_dept_id(DEPT_NAME_ENGINEERING),
EXP_TYPE_MEDICAL = SSdepartment.get_jobs_by_dept_id(DEPT_NAME_MEDICAL),
EXP_TYPE_SCIENCE = SSdepartment.get_jobs_by_dept_id(DEPT_NAME_SCIENCE),
EXP_TYPE_SUPPLY = SSdepartment.get_jobs_by_dept_id(DEPT_NAME_CARGO),
EXP_TYPE_SECURITY = SSdepartment.get_jobs_by_dept_id(DEPT_NAME_SECURITY),
EXP_TYPE_SILICON = SSdepartment.get_jobs_by_dept_id(DEPT_NAME_SILICON),
EXP_TYPE_SERVICE = SSdepartment.get_jobs_by_dept_id(DEPT_NAME_CIVILIAN)
)

return SS_INIT_SUCCESS
Expand Down
17 changes: 8 additions & 9 deletions code/modules/jobs/job_exp.dm
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,15 @@ GLOBAL_PROTECT(exp_to_update)
/client/proc/calc_exp_type(exptype)
var/list/explist = prefs.exp.Copy()
var/amount = 0
var/list/typelist = GLOB.exp_jobsmap[exptype]
if(!typelist)
return -1
for(var/job in typelist["titles"])
if(job in explist)
amount += explist[job]
var/list/valid_jobs = GLOB.exp_jobsmap[exptype]
if(valid_jobs)
for(var/job in valid_jobs)
if(job in explist)
amount += explist[job]
// Removed job support
typelist = GLOB.exp_removed_jobsmap[exptype]
if(typelist)
for(var/job in typelist["titles"])
var/list/removed_jobs = GLOB.exp_removed_jobsmap[exptype]
if(removed_jobs)
for(var/job in removed_jobs)
if(job in explist)
amount += explist[job]
return amount
Expand Down
4 changes: 2 additions & 2 deletions code/modules/jobs/jobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ GLOBAL_PROTECT(exp_removed_jobs)

/// Put any removed jobs here so they can still show in playtime listings.
GLOBAL_LIST_INIT(exp_removed_jobsmap, list(
// EXP_TYPE_CREW = list("titles" = list("Virologist")),
// EXP_TYPE_MEDICAL = list("titles" = list("Virologist")),
// EXP_TYPE_CREW = list("Virologist"),
// EXP_TYPE_MEDICAL = list("Virologist"),
))
GLOBAL_PROTECT(exp_removed_jobsmap)

Expand Down
Loading