You can now cancel AI intellicard wiping (#21944)

* You can now cancel AI intellicard wiping

* OUTSIDE HELP
This commit is contained in:
Joan Lung
2016-12-06 11:53:00 +13:00
committed by oranges
parent 4ad8d89d03
commit 9df03b0daf
3 changed files with 18 additions and 16 deletions
+13 -11
View File
@@ -62,17 +62,19 @@
return
switch(action)
if("wipe")
var/confirm = alert("Are you sure you want to wipe this card's memory? This cannot be undone once started.", name, "Yes", "No")
if(confirm == "Yes" && !..())
flush = TRUE
if(AI && AI.loc == src)
AI.suiciding = TRUE
AI << "Your core files are being wiped!"
while(AI.stat != DEAD)
AI.adjustOxyLoss(2)
AI.updatehealth()
sleep(10)
flush = FALSE
if(flush)
flush = FALSE
else
var/confirm = alert("Are you sure you want to wipe this card's memory?", name, "Yes", "No")
if(confirm == "Yes" && !..())
flush = TRUE
if(AI && AI.loc == src)
AI << "Your core files are being wiped!"
while(AI.stat != DEAD && flush)
AI.adjustOxyLoss(1)
AI.updatehealth()
sleep(5)
flush = FALSE
. = TRUE
if("wireless")
AI.control_disabled = !AI.control_disabled