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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Makes cryoing free up slots for non-unique jobs #18145

Merged
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions code/datums/jobs.dm
Expand Up @@ -68,6 +68,9 @@
var/wiki_link = null //! Link to the wiki page for this job

var/counts_as = null //! Name of a job that we count towards the cap of
///if true, cryoing won't free up slots, only ghosting will
///basically there should never be two of these
var/unique = FALSE

New()
..()
Expand Down Expand Up @@ -157,6 +160,7 @@ ABSTRACT_TYPE(/datum/job/command)
slot_card = /obj/item/card/id/command
map_can_autooverride = 0
can_join_gangs = FALSE
unique = TRUE

special_setup(mob/M, no_special_spawn)
. = ..()
Expand Down Expand Up @@ -2613,6 +2617,7 @@ ABSTRACT_TYPE(/datum/job/special/halloween/critter)
linkcolor = "#3348ff"
name = "Nanotrasen Security Consultant"
limit = 1 // backup during HELL WEEK. players will probably like it
unique = TRUE
wages = PAY_TRADESMAN
requires_whitelist = 1
requires_supervisor_job = "Head of Security"
Expand Down
3 changes: 3 additions & 0 deletions code/obj/cryotron.dm
Expand Up @@ -186,6 +186,9 @@
var/datum/db_record/crew_record = data_core.general.find_record("id", L.datacore_id)
if (!isnull(crew_record))
crew_record["p_stat"] = "In Cryogenic Storage"
var/datum/job/job = find_job_in_controller_by_string(L.job, soft=TRUE)
if (job && !job.unique)
job.assigned = max(0, job.assigned - 1)
logTheThing(LOG_STATION, L, "entered cryogenic storage at [log_loc(src)].")
return 1

Expand Down