Skip to content

Commit 75409ec

Browse files
Fix AI cryo spawn
1 parent 75ebd39 commit 75409ec

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

code/modules/jobs/job_types/_job.dm

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,9 @@
136136
/// Minimal character age for this job
137137
var/required_character_age
138138

139+
/// For jobs like AI or Prisoner. If you do not want for role to be spawn in common cryo
140+
var/do_not_spawn_in_common_cryo = FALSE // ARK ADDITION
141+
139142

140143
/datum/job/New()
141144
. = ..()

code/modules/jobs/job_types/ai.dm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
random_spawns_possible = FALSE
2222
job_flags = JOB_NEW_PLAYER_JOINABLE | JOB_EQUIP_RANK | JOB_BOLD_SELECT_TEXT | JOB_CANNOT_OPEN_SLOTS
2323
config_tag = "AI"
24+
do_not_spawn_in_common_cryo = TRUE
2425

2526

2627
/datum/job/ai/after_spawn(mob/living/spawned, client/player_client)

code/modules/mob/dead/new_player/new_player.dm

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -216,9 +216,13 @@
216216
transfer_character()
217217

218218
SSjob.equip_rank(character, job, character.client)
219-
// job.after_latejoin_spawn(character) ARK STATION REMOVED
220-
var/atom/spawn_point = pick(GLOB.valid_for_spawn_cryopods) // ARK STATION ADDITION
221-
spawn_point.join_player_here(character) // ARK STATION EDIT
219+
// ARK STATION CHANGE START
220+
if(job.do_not_spawn_in_common_cryo) // Check if we want to spawn it in station common cryo
221+
job.after_latejoin_spawn(character) // If no - proceed job custom spawn parameters
222+
if(!job.do_not_spawn_in_common_cryo) // If it's casual worker, spawn him in cryo
223+
var/atom/spawn_point = pick(GLOB.valid_for_spawn_cryopods)
224+
spawn_point.join_player_here(character)
225+
// ARK STATION CHANGE END
222226

223227
#define IS_NOT_CAPTAIN 0
224228
#define IS_ACTING_CAPTAIN 1

0 commit comments

Comments
 (0)