Merge pull request #11374 from Detective-Google/AI-cryo

Adds a verb for AIs to cryo
This commit is contained in:
kevinz000
2020-03-08 11:09:48 -07:00
committed by GitHub
+25
View File
@@ -1004,3 +1004,28 @@
. = ..()
if(.)
end_multicam()
/mob/living/silicon/ai/verb/ai_cryo()
set name = "AI Cryogenic Stasis"
set desc = "Puts the current AI personality into cryogenic stasis, freeing the space for another."
set category = "AI Commands"
if(incapacitated())
return
switch(alert("Would you like to enter cryo? This will ghost you. Remember to AHELP before cryoing out of important roles, even with no admins online.",,"Yes.","No."))
if("Yes.")
src.ghostize(FALSE, penalize = TRUE)
var/announce_rank = "Artificial Intelligence,"
if(GLOB.announcement_systems.len)
// Sends an announcement the AI has cryoed.
var/obj/machinery/announcement_system/announcer = pick(GLOB.announcement_systems)
announcer.announce("CRYOSTORAGE", src.real_name, announce_rank, list())
new /obj/structure/AIcore/latejoin_inactive(loc)
if(src.mind)
//Handle job slot/tater cleanup.
if(src.mind.assigned_role == "AI")
SSjob.FreeRole("AI")
src.mind.special_role = null
qdel(src)
else
return