From 75409ecbe2c9c2ec1a30d234d9f822522c5cc39e Mon Sep 17 00:00:00 2001 From: SpaghettiTerrible <154935133+SpaghettiTerrible@users.noreply.github.com> Date: Thu, 28 Nov 2024 04:14:06 +0300 Subject: [PATCH] Fix AI cryo spawn --- code/modules/jobs/job_types/_job.dm | 3 +++ code/modules/jobs/job_types/ai.dm | 1 + code/modules/mob/dead/new_player/new_player.dm | 10 +++++++--- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/code/modules/jobs/job_types/_job.dm b/code/modules/jobs/job_types/_job.dm index 57cc1207a05..50f74906e85 100644 --- a/code/modules/jobs/job_types/_job.dm +++ b/code/modules/jobs/job_types/_job.dm @@ -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() . = ..() diff --git a/code/modules/jobs/job_types/ai.dm b/code/modules/jobs/job_types/ai.dm index 7905537950a..4a0ca575b2d 100644 --- a/code/modules/jobs/job_types/ai.dm +++ b/code/modules/jobs/job_types/ai.dm @@ -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) diff --git a/code/modules/mob/dead/new_player/new_player.dm b/code/modules/mob/dead/new_player/new_player.dm index 7b99c8ee452..7c2fb764067 100644 --- a/code/modules/mob/dead/new_player/new_player.dm +++ b/code/modules/mob/dead/new_player/new_player.dm @@ -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