Skip to content

Commit

Permalink
Lost spacebar
Browse files Browse the repository at this point in the history
  • Loading branch information
i1yadobr authored and rufuszero committed Apr 19, 2024
1 parent 2f4bdb7 commit c92792f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions code/modules/client/preference_setup/loadout/gear_tweaks.dm
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@
var/list/choices = jobs_to_paths[job.type]
if(!(job.type in jobs_to_paths) || length(choices) < 2)
continue

var/choice = text2path(metadata["[job.type]"]) || choices[1]
.["[job.title]: [get_initial_name(choice)]"] = job.type

Expand All @@ -184,6 +185,7 @@
var/datum/job/job = get_valid_current_job()
if(!istype(job))
return

var/text_path = metadata["[job.type]"]
gear_data.path = text2path(text_path)
if(!gear_data.path)
Expand All @@ -192,8 +194,10 @@
/datum/gear_tweak/departmental/proc/get_valid_current_job()
if(current_job && (current_job.type in jobs_to_paths))
return current_job

if(!length(selected_jobs))
return

for(var/datum/job/job in selected_jobs)
if(!istype(job))
CRASH("Expected /datum/job, got [job]")
Expand Down
3 changes: 3 additions & 0 deletions code/modules/client/preference_setup/loadout/loadout.dm
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,7 @@ var/list/hash_to_gear = list()
. += " <a href='?src=\ref[src];tweak=\ref[tweak];subtype=[tweak_contents[name]]'>[name]</a>"
. += "<br>"
continue

if(tweak_contents)
. += " <a href='?src=\ref[src];tweak=\ref[tweak]'>[tweak_contents]</a>"
. += "<br>"
Expand Down Expand Up @@ -744,6 +745,7 @@ var/list/hash_to_gear = list()
for(var/datum/gear_tweak/gt in gear_tweaks)
if(istype(gt, /datum/gear_tweak/departmental))
return TRUE

return FALSE

/datum/gear/proc/set_selected_jobs(job_high, selected_jobs)
Expand All @@ -754,6 +756,7 @@ var/list/hash_to_gear = list()
for(var/datum/gear_tweak/departmental/gt in gear_tweaks)
if(!istype(gt, /datum/gear_tweak/departmental))
continue

gt.set_selected_jobs(job_high, selected_jobs)

/datum/gear_data
Expand Down

0 comments on commit c92792f

Please sign in to comment.