mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-30 16:47:13 +01:00
You can now cancel AI intellicard wiping (#21944)
* You can now cancel AI intellicard wiping * OUTSIDE HELP
This commit is contained in:
@@ -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
|
||||
|
||||
+4
-4
File diff suppressed because one or more lines are too long
@@ -19,7 +19,7 @@
|
||||
<ui-display title={{data.name || "Empty Card"}} button>
|
||||
{{#partial button}}
|
||||
{{#if data.name}}
|
||||
<ui-button icon='trash' state='{{data.wiping || data.isDead ? "disabled" : null}}' action='wipe'>Wipe AI</ui-button>
|
||||
<ui-button icon='trash' state='{{data.isDead ? "disabled" : null}}' action='wipe'>{{data.wiping ? "Stop Wiping" : "Wipe"}} AI</ui-button>
|
||||
{{/if}}
|
||||
{{/partial}}
|
||||
{{#if data.name}}
|
||||
|
||||
Reference in New Issue
Block a user