mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-24 12:37:50 +01:00
#Huge code overhaul and cleanup for ninjas. Basically, the suit is about as modular now as I probably care to make it. Admins, read the commented text under Admin Notes, in space_ninja.dm. Tell your friends.
#Ninja suit now supports pAIs. Further functionality will probably come from their development. #Ninja suit can now replenish chemicals from beakers. Simply use a beaker on the suit and it will do the rest, if the beaker contains the right combination of chemicals. #Draining from a wire is now done through clicking instead of a verb. There is no more delay to it. #Ninja stars cost a bit more energy than before. #Ninja suit will start initializing automatically (and quickly) when ninja spawned. #Minor sprite fix for female ninja suit. #Note: AI-related verbs for the ninja suit will be bugged until BYOND 484 comes out. Not a huge deal but worth noting. #The has_reagent() proc will now return the reagent being checked for, instead of 1. Will return 0 if reagent is not found (or the amount does not match). Removed a duplicate arithrazine entry. #AIs should now properly camera_cancel() when carded/physically transfered. #Fixed a small menu display bug for AI cards. AI cards should now properly auto close their window when appropriate. #AI holograms should now project above everything. #Mal AIs can now choose to display an alternative (and awesome) sprite. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1655 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -300,7 +300,7 @@
|
||||
..()
|
||||
var/mob/living/U = usr
|
||||
//Looking for master was kind of pointless since PDAs don't appear to have one.
|
||||
if (U.contents.Find(src) || (istype(loc, /turf) && get_dist(src, U) <= 1))
|
||||
if ( U.contents.Find(src) || ( istype(loc, /turf) && in_range(src, U) ) )
|
||||
if ( !(U.stat || U.restrained()) )
|
||||
|
||||
add_fingerprint(U)
|
||||
@@ -627,7 +627,7 @@
|
||||
var/input=alert("Would you like to inert the card or update owner information?",,"Insert","Update")
|
||||
//Basic safety check. If either both objects are held by user or PDA is on ground and card is in hand.
|
||||
|
||||
if ( (user.contents.Find(src) && user.contents.Find(C)) || (istype(loc, /turf) && get_dist(src, user) <= 1 && user.contents.Find(C)) )
|
||||
if ( (user.contents.Find(src) && user.contents.Find(C)) || (istype(loc, /turf) && in_range(src, user) && user.contents.Find(C)) )
|
||||
if ( !(user.stat || user.restrained()) )//If they can still act.
|
||||
if(input=="Insert")
|
||||
id_check(user, 2)
|
||||
|
||||
@@ -63,35 +63,52 @@
|
||||
dat += "<b>AI nonfunctional</b>"
|
||||
else
|
||||
if (!src.flush)
|
||||
dat += {"<A href='byond://?src=\ref[src];choice=Wipe'>Wipe AI</A>"}
|
||||
dat += {"<A href='byond://?src=\ref[src];choice=Wipe;user=\ref[user]'>Wipe AI</A>"}
|
||||
else
|
||||
dat += "<b>Wipe in progress</b>"
|
||||
dat += {"<a href='byond://?src=\ref[src];choice=Wireless'>[A.control_disabled ? "Enable" : "Disable"] Wireless Activity</a>"}
|
||||
dat += "<br>"
|
||||
dat += {"<a href='byond://?src=\ref[src];choice=Close'> Close</a>"}
|
||||
dat += {"<a href='byond://?src=\ref[src];choice=Wireless;user=\ref[user]'>[A.control_disabled ? "Enable" : "Disable"] Wireless Activity</a>"}
|
||||
dat += "<br>"
|
||||
dat += {"<a href='byond://?src=\ref[src];choice=Close;user=\ref[user]'> Close</a>"}
|
||||
user << browse(dat, "window=aicard")
|
||||
onclose(user, "aicard")
|
||||
return
|
||||
|
||||
Topic(href, href_list)
|
||||
switch(href_list["choice"])
|
||||
/*Let's define the user. It's safer to do it this way, rather than defaulting to usr.
|
||||
For very long menu lines, usr is probably a lot more convenient.*/
|
||||
var/mob/U = href_list["user"]
|
||||
if (!in_range(src, U)||U.machine!=src)//If they are not in range of 1 or less or their machine is not the card (ie, clicked on something else).
|
||||
U << browse(null, "window=aicard")
|
||||
U.machine = null
|
||||
return
|
||||
|
||||
add_fingerprint(U)
|
||||
U.machine = src
|
||||
|
||||
switch(href_list["choice"])//Now we switch based on choice.
|
||||
if ("Close")
|
||||
usr << browse(null, "window=aicard")
|
||||
usr.machine = null
|
||||
U << browse(null, "window=aicard")
|
||||
U.machine = null
|
||||
return
|
||||
|
||||
if ("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")
|
||||
flush = 1
|
||||
for(var/mob/living/silicon/ai/A in src)
|
||||
A.suiciding = 1
|
||||
A << "Your core files are being wiped!"
|
||||
while (A.stat != 2)
|
||||
A.oxyloss += 2
|
||||
A.updatehealth()
|
||||
sleep(10)
|
||||
flush = 0
|
||||
if(isnull(src)||!in_range(src, U)||U.machine!=src)
|
||||
U << browse(null, "window=aicard")
|
||||
U.machine = null
|
||||
return
|
||||
else
|
||||
flush = 1
|
||||
for(var/mob/living/silicon/ai/A in src)
|
||||
A.suiciding = 1
|
||||
A << "Your core files are being wiped!"
|
||||
while (A.stat != 2)
|
||||
A.oxyloss += 2
|
||||
A.updatehealth()
|
||||
sleep(10)
|
||||
flush = 0
|
||||
|
||||
if ("Wireless")
|
||||
for(var/mob/living/silicon/ai/A in src)
|
||||
@@ -101,7 +118,7 @@
|
||||
overlays -= image('pda.dmi', "aicard-on")
|
||||
else
|
||||
overlays += image('pda.dmi', "aicard-on")
|
||||
attack_self(usr)
|
||||
attack_self(U)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -47,6 +47,7 @@
|
||||
return
|
||||
|
||||
Topic(href, href_list)
|
||||
|
||||
if(href_list["setdna"])
|
||||
if(pai.master_dna)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user