Skip to content

Commit

Permalink
Prevent HoS and Blueshield from overflowing
Browse files Browse the repository at this point in the history
  • Loading branch information
Absolucy committed Oct 6, 2024
1 parent e9d8c55 commit 8f2430f
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 2 deletions.
2 changes: 2 additions & 0 deletions code/datums/station_traits/negative_traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,13 @@
/datum/station_trait/overflow_job_bureaucracy/get_report()
return "[name] - It seems for some reason we put out the wrong job-listing for the overflow role this shift...I hope you like [chosen_job_name]s."

/* monkestation removal: reimplemented in [monkestation\code\datums\station_traits\negative_traits.dm]
/datum/station_trait/overflow_job_bureaucracy/proc/set_overflow_job_override(datum/source)
SIGNAL_HANDLER
var/datum/job/picked_job = pick(SSjob.joinable_occupations)
chosen_job_name = lowertext(picked_job.title) // like Chief Engineers vs like chief engineers
SSjob.set_overflow_role(picked_job.type)
monkestation end */

/datum/station_trait/slow_shuttle
name = "Slow Shuttle"
Expand Down
11 changes: 11 additions & 0 deletions monkestation/code/datums/station_traits/negative_traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,14 @@
show_in_report = TRUE
report_message = "The Clown Planet has discovered a weakness in the ID scanners of specific airlocks."
trait_to_give = STATION_TRAIT_CLOWN_BRIDGE

/datum/station_trait/overflow_job_bureaucracy/proc/set_overflow_job_override(datum/source)
SIGNAL_HANDLER
var/datum/job/picked_job
var/list/possible_jobs = SSjob.joinable_occupations.Copy()
while(length(possible_jobs) && !picked_job?.allow_overflow)
picked_job = pick_n_take(possible_jobs)
if(!picked_job)
CRASH("Failed to find valid job to pick for overflow!")
chosen_job_name = lowertext(picked_job.title) // like Chief Engineers vs like chief engineers
SSjob.set_overflow_role(picked_job.type)
6 changes: 4 additions & 2 deletions monkestation/code/modules/blueshield/job.dm
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
exp_granted_type = EXP_TYPE_CREW
config_tag = "BLUESHIELD"

allow_bureaucratic_error = FALSE
allow_overflow = FALSE

outfit = /datum/outfit/job/blueshield
plasmaman_outfit = /datum/outfit/plasmaman/blueshield

Expand Down Expand Up @@ -41,8 +44,7 @@
rpg_title = "Guard"
job_flags = JOB_ANNOUNCE_ARRIVAL | JOB_CREW_MANIFEST | JOB_EQUIP_RANK | JOB_CREW_MEMBER | JOB_NEW_PLAYER_JOINABLE | JOB_REOPEN_ON_ROUNDSTART_LOSS | JOB_ASSIGN_QUIRKS | JOB_CAN_BE_INTERN

alt_titles = list(
)
alt_titles = list()

/datum/outfit/job/blueshield
name = "Blueshield"
Expand Down
3 changes: 3 additions & 0 deletions monkestation/code/modules/jobs/job_types/_job.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/datum/job
/// If this job is eligible to be picked for the overflow station trait or not.
var/allow_overflow = TRUE
2 changes: 2 additions & 0 deletions monkestation/code/modules/jobs/job_types/head_of_security.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/datum/job/head_of_security
allow_overflow = FALSE
2 changes: 2 additions & 0 deletions tgstation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -7101,6 +7101,7 @@
#include "monkestation\code\modules\job_xp\milestones\botany_milestones.dm"
#include "monkestation\code\modules\job_xp\preferences\base_preferences.dm"
#include "monkestation\code\modules\job_xp\preferences\xp_handlers.dm"
#include "monkestation\code\modules\jobs\job_types\_job.dm"
#include "monkestation\code\modules\jobs\job_types\brig_physician.dm"
#include "monkestation\code\modules\jobs\job_types\candysalesman.dm"
#include "monkestation\code\modules\jobs\job_types\chaplain.dm"
Expand All @@ -7110,6 +7111,7 @@
#include "monkestation\code\modules\jobs\job_types\ghost.dm"
#include "monkestation\code\modules\jobs\job_types\godzilla.dm"
#include "monkestation\code\modules\jobs\job_types\gorilla.dm"
#include "monkestation\code\modules\jobs\job_types\head_of_security.dm"
#include "monkestation\code\modules\jobs\job_types\security_assistant.dm"
#include "monkestation\code\modules\jobs\job_types\skeleton.dm"
#include "monkestation\code\modules\jobs\job_types\yellowclown.dm"
Expand Down

0 comments on commit 8f2430f

Please sign in to comment.