Tweaked the intelicard so you can tell when an AI wipe is in progress. Made sure you can't offload an AI that is being wiped, mainly so I don't have to deal with working out any code fuckups that might happen as a result.

Removed redundant code from the AI fixer.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@144 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
n3ophyt3@gmail.com
2010-09-22 16:48:18 +00:00
parent 483bd9a421
commit a8657551f9
3 changed files with 9 additions and 8 deletions

View File

@@ -144,12 +144,6 @@
if(..())
return
if (href_list["fix"])
src.active = !src.active
if (src.occupant.stat == 2)
src.occupant.stat = 0
src.overlays -= image('AIcore.dmi', "ai-fixer-404")
src.overlays += image('AIcore.dmi', "ai-fixer-full")
src.overlays += image('AIcore.dmi', "ai-fixer-on")
while (src.occupant.health < 100)
src.occupant.oxyloss = max (src.occupant.oxyloss-1, 0)

View File

@@ -5,6 +5,7 @@
item_state = "electronic"
w_class = 2.0
flags = FPRINT | TABLEPASS | ONBELT
var/flush = null
attack(mob/living/silicon/ai/M as mob, mob/user as mob)
@@ -86,6 +87,7 @@
if (href_list["wipe"])
var/confirm = alert("Are you sure you want to wipe this card's memory? This cannot be undone once started.", "Confirm Wipe", "Yes", "No")
if(confirm == "Yes")
src.flush = 1
for(var/mob/living/silicon/ai/A in src)
A.suiciding = 1
A << "Your core files are being wiped!"
@@ -94,6 +96,7 @@
A.updatehealth()
src.attack_self(usr)
sleep(10)
src.flush = 0
if (href_list["wireless"])
for(var/mob/living/silicon/ai/A in src)
@@ -134,7 +137,11 @@
if (A.stat == 2)
dat += "<b>AI nonfunctional</b>"
else
dat += {"<A href='byond://?src=\ref[src];wipe=1'>Wipe AI</A> <A href='byond://?src=\ref[src];wireless=1'>[A.control_disabled ? "Enable" : "Disable"] Wireless Activity</A>"}
if (!src.flush)
dat += {"<A href='byond://?src=\ref[src];wipe=1'>Wipe AI</A>"}
else
dat += "<b>Wipe in progress</b>"
dat += {" <A href='byond://?src=\ref[src];wireless=1'>[A.control_disabled ? "Enable" : "Disable"] Wireless Activity</A>"}
user << browse(dat, "window=aicard")
onclose(user, "aicard")
return

View File

@@ -29,7 +29,7 @@
if (src.health <= -100.0)
death()
return
else if (src.health < 0)
else if (src.health < 0 && !istype(src.loc, /obj/machinery/computer/aifixer))
src.oxyloss++
if (src.machine)