Skip to content

Commit

Permalink
Fix AI cryo spawn
Browse files Browse the repository at this point in the history
  • Loading branch information
SpaghettiTerrible committed Nov 28, 2024
1 parent 75ebd39 commit 75409ec
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
3 changes: 3 additions & 0 deletions code/modules/jobs/job_types/_job.dm
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,9 @@
/// Minimal character age for this job
var/required_character_age

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


/datum/job/New()
. = ..()
Expand Down
1 change: 1 addition & 0 deletions code/modules/jobs/job_types/ai.dm
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
random_spawns_possible = FALSE
job_flags = JOB_NEW_PLAYER_JOINABLE | JOB_EQUIP_RANK | JOB_BOLD_SELECT_TEXT | JOB_CANNOT_OPEN_SLOTS
config_tag = "AI"
do_not_spawn_in_common_cryo = TRUE


/datum/job/ai/after_spawn(mob/living/spawned, client/player_client)
Expand Down
10 changes: 7 additions & 3 deletions code/modules/mob/dead/new_player/new_player.dm
Original file line number Diff line number Diff line change
Expand Up @@ -216,9 +216,13 @@
transfer_character()

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

#define IS_NOT_CAPTAIN 0
#define IS_ACTING_CAPTAIN 1
Expand Down

0 comments on commit 75409ec

Please sign in to comment.