mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-14 04:02:31 +00:00
Cleaned up intelicard/aifixer code some.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@164 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -44,7 +44,9 @@
|
|||||||
if(istype(I, /obj/item/device/aicard))
|
if(istype(I, /obj/item/device/aicard))
|
||||||
var/obj/item/device/aicard/C = I
|
var/obj/item/device/aicard/C = I
|
||||||
if(src.contents.len == 0)
|
if(src.contents.len == 0)
|
||||||
for(var/mob/living/silicon/ai/A in C)
|
if (C.contents.len == 0)
|
||||||
|
user << "No AI to copy over!"
|
||||||
|
else for(var/mob/living/silicon/ai/A in C)
|
||||||
A << "You have been uploaded to a stationary terminal. Sadly, there is no remote access from here."
|
A << "You have been uploaded to a stationary terminal. Sadly, there is no remote access from here."
|
||||||
user << "<b>Transfer succesful</b>: [A.name] ([rand(1000,9999)].exe) installed and executed succesfully. Local copy has been removed."
|
user << "<b>Transfer succesful</b>: [A.name] ([rand(1000,9999)].exe) installed and executed succesfully. Local copy has been removed."
|
||||||
C.icon_state = "aicard"
|
C.icon_state = "aicard"
|
||||||
@@ -59,6 +61,7 @@
|
|||||||
src.overlays += image('AIcore.dmi', "ai-fixer-full")
|
src.overlays += image('AIcore.dmi', "ai-fixer-full")
|
||||||
src.overlays -= image('AIcore.dmi', "ai-fixer-empty")
|
src.overlays -= image('AIcore.dmi', "ai-fixer-empty")
|
||||||
|
|
||||||
|
|
||||||
else
|
else
|
||||||
if(C.contents.len == 0 && src.occupant && !src.active)
|
if(C.contents.len == 0 && src.occupant && !src.active)
|
||||||
C.name = "inteliCard - [src.occupant.name]"
|
C.name = "inteliCard - [src.occupant.name]"
|
||||||
@@ -69,12 +72,16 @@
|
|||||||
else
|
else
|
||||||
C.icon_state = "aicard-full"
|
C.icon_state = "aicard-full"
|
||||||
src.overlays -= image('AIcore.dmi', "ai-fixer-full")
|
src.overlays -= image('AIcore.dmi', "ai-fixer-full")
|
||||||
src.occupant << "You have been downloaded to a mobile storage device. Remote device connection severed."
|
src.occupant << "You have been downloaded to a mobile storage device. Still no remote access."
|
||||||
user << "<b>Transfer succeeded</b>: [src.occupant.name] ([rand(1000,9999)].exe) removed from host terminal and stored within local memory."
|
user << "<b>Transfer succeeded</b>: [src.occupant.name] ([rand(1000,9999)].exe) removed from host terminal and stored within local memory."
|
||||||
src.occupant.loc = C
|
src.occupant.loc = C
|
||||||
src.occupant = null
|
src.occupant = null
|
||||||
|
else if (C.contents.len)
|
||||||
|
user << "There's already an AI in the reconstructer!"
|
||||||
|
else if (src.active)
|
||||||
|
user << "Can't remove an AI during reconstruction!"
|
||||||
|
else if (!src.occupant)
|
||||||
|
user << "No AI to remove!"
|
||||||
|
|
||||||
//src.attack_hand(user)
|
//src.attack_hand(user)
|
||||||
return
|
return
|
||||||
@@ -135,8 +142,6 @@
|
|||||||
src.overlays = null
|
src.overlays = null
|
||||||
return
|
return
|
||||||
use_power(500)
|
use_power(500)
|
||||||
if (src.overlays == null)
|
|
||||||
src.overlays += image('AIcore.dmi', "ai-fixer-empty")
|
|
||||||
|
|
||||||
src.updateDialog()
|
src.updateDialog()
|
||||||
return
|
return
|
||||||
@@ -145,17 +150,20 @@
|
|||||||
if(..())
|
if(..())
|
||||||
return
|
return
|
||||||
if (href_list["fix"])
|
if (href_list["fix"])
|
||||||
|
src.active = 1
|
||||||
src.overlays += image('AIcore.dmi', "ai-fixer-on")
|
src.overlays += image('AIcore.dmi', "ai-fixer-on")
|
||||||
while (src.occupant.health < 100)
|
while (src.occupant.health < 100)
|
||||||
src.occupant.oxyloss = max (src.occupant.oxyloss-1, 0)
|
src.occupant.oxyloss = max (src.occupant.oxyloss-1, 0)
|
||||||
src.occupant.fireloss = max (src.occupant.fireloss-1, 0)
|
src.occupant.fireloss = max (src.occupant.fireloss-1, 0)
|
||||||
src.occupant.toxloss = max (src.occupant.toxloss-1, 0)
|
src.occupant.toxloss = max (src.occupant.toxloss-1, 0)
|
||||||
src.occupant.bruteloss = max (src.occupant.bruteloss-1, 0)
|
src.occupant.bruteloss = max (src.occupant.bruteloss-1, 0)
|
||||||
sleep(10)
|
src.occupant.updatehealth()
|
||||||
if (src.occupant.health <= 0 && src.occupant.stat == 2)
|
if (src.occupant.health >= 0 && src.occupant.stat == 2)
|
||||||
src.occupant.stat = 0
|
src.occupant.stat = 0
|
||||||
src.overlays -= image('AIcore.dmi', "ai-fixer-404")
|
src.overlays -= image('AIcore.dmi', "ai-fixer-404")
|
||||||
src.overlays += image('AIcore.dmi', "ai-fixer-full")
|
src.overlays += image('AIcore.dmi', "ai-fixer-full")
|
||||||
|
src.updateUsrDialog()
|
||||||
|
sleep(10)
|
||||||
src.active = 0
|
src.active = 0
|
||||||
src.overlays -= image('AIcore.dmi', "ai-fixer-on")
|
src.overlays -= image('AIcore.dmi', "ai-fixer-on")
|
||||||
|
|
||||||
|
|||||||
@@ -19,8 +19,8 @@
|
|||||||
for(var/mob/living/silicon/ai/A in src)
|
for(var/mob/living/silicon/ai/A in src)
|
||||||
|
|
||||||
// Already have an AI
|
// Already have an AI
|
||||||
if(M.client)
|
if(M.real_name != "Inactive AI")
|
||||||
user << "<b>Transfer failed</b>: Existing daemon found on this terminal. Remove existing daemon to install a new one."
|
user << "<b>Transfer failed</b>: Existing AI found on this terminal. Remove existing AI to install a new one."
|
||||||
return
|
return
|
||||||
// else if(M.stat != A.stat)
|
// else if(M.stat != A.stat)
|
||||||
// user << "<b>Transfer failed</b>: Unable to establish connection."
|
// user << "<b>Transfer failed</b>: Unable to establish connection."
|
||||||
@@ -77,6 +77,8 @@
|
|||||||
src.icon_state = "aicard-full"
|
src.icon_state = "aicard-full"
|
||||||
O << "You have been downloaded to a mobile storage device. Remote device connection severed."
|
O << "You have been downloaded to a mobile storage device. Remote device connection severed."
|
||||||
user << "<b>Transfer succeeded</b>: [O.name] ([rand(1000,9999)].exe) removed from host terminal and stored within local memory."
|
user << "<b>Transfer succeeded</b>: [O.name] ([rand(1000,9999)].exe) removed from host terminal and stored within local memory."
|
||||||
|
else
|
||||||
|
user << "There isn't an AI on this terminal."
|
||||||
|
|
||||||
attack(mob/living/silicon/decoy/M as mob, mob/user as mob)
|
attack(mob/living/silicon/decoy/M as mob, mob/user as mob)
|
||||||
if (!istype (M, /mob/living/silicon/decoy))
|
if (!istype (M, /mob/living/silicon/decoy))
|
||||||
|
|||||||
Reference in New Issue
Block a user