mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-19 02:54:41 +01:00
Merge pull request #9620 from variableundefined/GearSpawn
Fixes latejoin AI spawning in arrivals
This commit is contained in:
@@ -412,8 +412,45 @@ var/global/datum/controller/occupations/job_master
|
||||
|
||||
return 1
|
||||
|
||||
/datum/controller/occupations/proc/AssignRank(var/mob/living/carbon/human/H, var/rank, var/joined_late = 0)
|
||||
if(!H)
|
||||
return null
|
||||
var/datum/job/job = GetJob(rank)
|
||||
|
||||
/datum/controller/occupations/proc/EquipRank(var/mob/living/carbon/human/H, var/rank, var/joined_late = 0)
|
||||
H.job = rank
|
||||
|
||||
var/alt_title = null
|
||||
|
||||
if(H.mind)
|
||||
H.mind.assigned_role = rank
|
||||
alt_title = H.mind.role_alt_title
|
||||
|
||||
CreateMoneyAccount(H, rank, job)
|
||||
|
||||
to_chat(H, "<B>You are the [alt_title ? alt_title : rank].</B>")
|
||||
to_chat(H, "<b>As the [alt_title ? alt_title : rank] you answer directly to [job.supervisors]. Special circumstances may change this.</b>")
|
||||
to_chat(H, "<b>For more information on how the station works, see <a href=\"https://nanotrasen.se/wiki/index.php/Standard_Operating_Procedure\">Standard Operating Procedure (SOP)</a></b>")
|
||||
if(job.is_service)
|
||||
to_chat(H, "<b>As a member of Service, make sure to read up on your <a href=\"https://nanotrasen.se/wiki/index.php/Standard_Operating_Procedure_(Service)\">Department SOP</a></b>")
|
||||
if(job.is_supply)
|
||||
to_chat(H, "<b>As a member of Supply, make sure to read up on your <a href=\"https://nanotrasen.se/wiki/index.php/Standard_Operating_Procedure_(Supply)\">Department SOP</a></b>")
|
||||
if(job.is_command)
|
||||
to_chat(H, "<b>As an important member of Command, read up on your <a href=\"https://nanotrasen.se/wiki/index.php/Standard_Operating_Procedure_(Command)\">Department SOP</a></b>")
|
||||
if(job.is_legal)
|
||||
to_chat(H, "<b>Your job requires complete knowledge of <a href=\"https://nanotrasen.se/wiki/index.php/Space_law\">Space Law</a> and <a href=\"https://nanotrasen.se/wiki/index.php/Legal_Standard_Operating_Procedure\">Legal Standard Operating Procedure</a></b>")
|
||||
if(job.is_engineering)
|
||||
to_chat(H, "<b>As a member of Engineering, make sure to read up on your <a href=\"https://nanotrasen.se/wiki/index.php/Standard_Operating_Procedure_(Engineering)\">Department SOP</a></b>")
|
||||
if(job.is_medical)
|
||||
to_chat(H, "<b>As a member of Medbay, make sure to read up on your <a href=\"https://nanotrasen.se/wiki/index.php/Standard_Operating_Procedure_(Medical)\">Department SOP</a></b>")
|
||||
if(job.is_science)
|
||||
to_chat(H, "<b>As a member of Science, make sure to read up on your <a href=\"https://nanotrasen.se/wiki/index.php/Standard_Operating_Procedure_(Science)\">Department SOP</a></b>")
|
||||
if(job.is_security)
|
||||
to_chat(H, "<b>As a member of Security, you are to know <a href=\"https://nanotrasen.se/wiki/index.php/Space_law\">Space Law</a>, <a href=\"https://nanotrasen.se/wiki/index.php/Legal_Standard_Operating_Procedure\">Legal Standard Operating Procedure</a>, as well as your <a href=\"https://nanotrasen.se/wiki/index.php/Standard_Operating_Procedure_(Security)\">Department SOP</a></b>")
|
||||
if(job.req_admin_notify)
|
||||
to_chat(H, "<b>You are playing a job that is important for the game progression. If you have to disconnect, please notify the admins via adminhelp.</b>")
|
||||
|
||||
return H
|
||||
/datum/controller/occupations/proc/EquipRank(mob/living/carbon/human/H, rank, joined_late = 0) // Equip and put them in an area
|
||||
if(!H)
|
||||
return null
|
||||
|
||||
@@ -457,40 +494,11 @@ var/global/datum/controller/occupations/job_master
|
||||
H.buckled.loc = H.loc
|
||||
H.buckled.dir = H.dir
|
||||
|
||||
var/alt_title = null
|
||||
if(H.mind)
|
||||
H.mind.assigned_role = rank
|
||||
alt_title = H.mind.role_alt_title
|
||||
|
||||
CreateMoneyAccount(H, rank, job)
|
||||
|
||||
if(job)
|
||||
var/new_mob = job.equip(H)
|
||||
if(ismob(new_mob))
|
||||
H = new_mob
|
||||
|
||||
to_chat(H, "<B>You are the [alt_title ? alt_title : rank].</B>")
|
||||
to_chat(H, "<b>As the [alt_title ? alt_title : rank] you answer directly to [job.supervisors]. Special circumstances may change this.</b>")
|
||||
to_chat(H, "<b>For more information on how the station works, see <a href=\"https://nanotrasen.se/wiki/index.php/Standard_Operating_Procedure\">Standard Operating Procedure (SOP)</a></b>")
|
||||
if(job.is_service)
|
||||
to_chat(H, "<b>As a member of Service, make sure to read up on your <a href=\"https://nanotrasen.se/wiki/index.php/Standard_Operating_Procedure_(Service)\">Department SOP</a></b>")
|
||||
if(job.is_supply)
|
||||
to_chat(H, "<b>As a member of Supply, make sure to read up on your <a href=\"https://nanotrasen.se/wiki/index.php/Standard_Operating_Procedure_(Supply)\">Department SOP</a></b>")
|
||||
if(job.is_command)
|
||||
to_chat(H, "<b>As an important member of Command, read up on your <a href=\"https://nanotrasen.se/wiki/index.php/Standard_Operating_Procedure_(Command)\">Department SOP</a></b>")
|
||||
if(job.is_legal)
|
||||
to_chat(H, "<b>Your job requires complete knowledge of <a href=\"https://nanotrasen.se/wiki/index.php/Space_law\">Space Law</a> and <a href=\"https://nanotrasen.se/wiki/index.php/Legal_Standard_Operating_Procedure\">Legal Standard Operating Procedure</a></b>")
|
||||
if(job.is_engineering)
|
||||
to_chat(H, "<b>As a member of Engineering, make sure to read up on your <a href=\"https://nanotrasen.se/wiki/index.php/Standard_Operating_Procedure_(Engineering)\">Department SOP</a></b>")
|
||||
if(job.is_medical)
|
||||
to_chat(H, "<b>As a member of Medbay, make sure to read up on your <a href=\"https://nanotrasen.se/wiki/index.php/Standard_Operating_Procedure_(Medical)\">Department SOP</a></b>")
|
||||
if(job.is_science)
|
||||
to_chat(H, "<b>As a member of Science, make sure to read up on your <a href=\"https://nanotrasen.se/wiki/index.php/Standard_Operating_Procedure_(Science)\">Department SOP</a></b>")
|
||||
if(job.is_security)
|
||||
to_chat(H, "<b>As a member of Security, you are to know <a href=\"https://nanotrasen.se/wiki/index.php/Space_law\">Space Law</a>, <a href=\"https://nanotrasen.se/wiki/index.php/Legal_Standard_Operating_Procedure\">Legal Standard Operating Procedure</a>, as well as your <a href=\"https://nanotrasen.se/wiki/index.php/Standard_Operating_Procedure_(Security)\">Department SOP</a></b>")
|
||||
if(job.req_admin_notify)
|
||||
to_chat(H, "<b>You are playing a job that is important for the game progression. If you have to disconnect, please notify the admins via adminhelp.</b>")
|
||||
|
||||
if(job && H)
|
||||
job.after_spawn(H)
|
||||
|
||||
|
||||
@@ -316,11 +316,10 @@
|
||||
job_master.AssignRole(src, rank, 1)
|
||||
|
||||
var/mob/living/character = create_character() //creates the human and transfers vars and mind
|
||||
|
||||
character = job_master.AssignRank(character, rank, 1) //equips the human
|
||||
|
||||
// AIs don't need a spawnpoint, they must spawn at an empty core
|
||||
if(character.mind.assigned_role == "AI")
|
||||
|
||||
var/mob/living/silicon/ai/ai_character = character.AIize() // AIize the character, but don't move them yet
|
||||
|
||||
// IsJobAvailable for AI checks that there is an empty core available in this list
|
||||
|
||||
Reference in New Issue
Block a user