Adds delete_personality verb for pAI

Ported over from AI's wipe_core verb, allow pAIs to ghost and leave the round properly in case nobody wipes the pAI device.
This commit is contained in:
Kasuobes
2016-05-03 12:23:31 -07:00
committed by Yoshax
parent 8db42aaca9
commit fabdf3d782

View File

@@ -297,6 +297,34 @@
return
close_up()
/mob/living/silicon/pai/verb/delete_personality()
set name = "Delete Personality"
set category = "OOC"
set desc = "Delete your personality. This is functionally equivalent to cryo or robotic storage, freeing up the pAI device for a new personality."
// Guard against misclicks, this isn't the sort of thing we want happening accidentally
if(alert("WARNING: This will immediately delete your personality and ghost you, removing your character from the round permanently (similar to cryo and robotic storage). Are you entirely sure you want to do this?",
"Delete Personality", "No", "No", "Yes") != "Yes")
return
// We warned you.
visible_message("<b>[src]</b> fades away, the pAI device goes silent.")
close_up()
//Handle job slot/tater cleanup.
var/job = mind.assigned_role
job_master.FreeRole(job)
if(mind.objectives.len)
qdel(mind.objectives)
mind.special_role = null
card.removePersonality()
ghostize(0)
qdel(src)
/mob/living/silicon/pai/proc/choose_chassis()
set category = "pAI Commands"