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

cannot join as certain ERTs if you dont have enough relavent playtime. #6764

Merged
merged 10 commits into from
Aug 1, 2024
Merged
Show file tree
Hide file tree
Changes from 8 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
10 changes: 10 additions & 0 deletions code/datums/emergency_calls/cryo_spec.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,16 @@
shuttle_id = ""
spawn_max_amount = TRUE

/datum/emergency_call/cryo_spec/remove_nonqualifiers(list/datum/mind/candidates_list)
var/list/datum/mind/candidates_clean = list()
for(var/datum/mind/single_candidate in candidates_list)
if(check_timelock(single_candidate?.current?.client, JOB_SQUAD_ROLES_LIST, time_required_for_job))
Drulikar marked this conversation as resolved.
Show resolved Hide resolved
candidates_clean.Add(single_candidate)
continue
if(single_candidate.current)
to_chat(single_candidate.current, SPAN_WARNING("You didn't qualify for the ERT beacon because you dont have the specialist job unlocked!"))
kiVts marked this conversation as resolved.
Show resolved Hide resolved
return candidates_clean

/datum/emergency_call/cryo_spec/create_member(datum/mind/mind, turf/override_spawn_loc)
set waitfor = FALSE
if(SSmapping.configs[GROUND_MAP].map_name == MAP_WHISKEY_OUTPOST)
Expand Down
4 changes: 4 additions & 0 deletions code/datums/emergency_calls/emergency_call.dm
Original file line number Diff line number Diff line change
Expand Up @@ -224,11 +224,15 @@

addtimer(CALLBACK(src, TYPE_PROC_REF(/datum/emergency_call, spawn_candidates), quiet_launch, announce_incoming, override_spawn_loc), 30 SECONDS)

/datum/emergency_call/proc/remove_nonqualifiers(list/datum/mind/candidates_list)
return candidates_list //everyone gets selected on 99% of distress beacons.

/datum/emergency_call/proc/spawn_candidates(quiet_launch = FALSE, announce_incoming = TRUE, override_spawn_loc)
if(SSticker.mode)
SSticker.mode.picked_calls -= src

SEND_SIGNAL(src, COMSIG_ERT_SETUP)
candidates = remove_nonqualifiers(candidates)

if(length(candidates) < mob_min && !spawn_max_amount)
message_admins("Aborting distress beacon, not enough candidates: found [length(candidates)].")
Expand Down
11 changes: 10 additions & 1 deletion code/datums/emergency_calls/inspection.dm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//USCM Provost
/datum/emergency_call/inspection_provost
name = "Inspection - USCM Provost - ML knowledge required."
name = "Inspection - USCM Provost - ML knowledge and MP playtime required."
mob_max = 2
mob_min = 1
probability = 0
Expand All @@ -9,6 +9,15 @@
..()
objectives = "Investigate any issues with ML enforcement on the [MAIN_SHIP_NAME]."

/datum/emergency_call/inspection_provost/remove_nonqualifiers(list/datum/mind/candidates_list)
var/list/datum/mind/candidates_clean = list()
for(var/datum/mind/single_candidate in candidates_list)
if(check_timelock(single_candidate?.current?.client, JOB_POLICE, time_required_for_job))
Drulikar marked this conversation as resolved.
Show resolved Hide resolved
candidates_clean.Add(single_candidate)
continue
if(single_candidate.current)
to_chat(single_candidate.current, SPAN_WARNING("You didn't qualify for the ERT beacon because you dont have enough playtime (5 Hours) as military police!"))
kiVts marked this conversation as resolved.
Show resolved Hide resolved
return candidates_clean

/datum/emergency_call/inspection_provost/create_member(datum/mind/M, turf/override_spawn_loc)
var/turf/T = override_spawn_loc ? override_spawn_loc : get_spawn_point()
Expand Down
Loading