Reverted 1624. The proc in question is for regular players only. This may change in the future but not right now.

New sound effect for ninja phasing.
Added a female-only ninja suit sprite. Will conform to the character once initialized.
Stealth is now a an equipment verb and functions a little different from before. I may tweak it a bit in the near future.
BYOND fixed a verb bug in r484. Certain ninja verbs will now function as intended once the release version comes out. I've went ahead and made the necessary code adjustments for it.
More ninja code cleanup in preparation for a few things.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1627 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
noisomehollow@lycos.com
2011-05-28 23:12:31 +00:00
parent c3d2869749
commit 54bddf8c76
10 changed files with 246 additions and 184 deletions

View File

@@ -169,9 +169,18 @@
var/say_message = null // When you are understood by others. Currently only used by aliens and monkeys in their say_quote procs var/say_message = null // When you are understood by others. Currently only used by aliens and monkeys in their say_quote procs
//Generic list for proc holders. Only way I can see to enable certain verbs/procs. Should be modified if needed. //Generic list for proc holders. Only way I can see to enable certain verbs/procs. Should be modified if needed.
var/proc_holder_list[] = list()//Right now only displays for the AI. var/proc_holder_list[] = list()//Right now unused.
//Also unlike the spell list, this would only store the object in contents, not an object in itself. //Also unlike the spell list, this would only store the object in contents, not an object in itself.
/* Add this line to whatever stat module you need in order to use the proc holder list.
Unlike the object spell system, it's also possible to attach verb procs from these objects to right-click menus.
This requires creating a verb for the object proc holder.
if (proc_holder_list.len)//Generic list for proc_holder objects.
for(var/obj/proc_holder/P in proc_holder_list)
statpanel("[P.panel]","",P)
*/
//Wizard mode, but can be used in other modes thanks to the brand new "Give Spell" badmin button //Wizard mode, but can be used in other modes thanks to the brand new "Give Spell" badmin button
var/obj/proc_holder/spell/list/spell_list = list() var/obj/proc_holder/spell/list/spell_list = list()

View File

@@ -23,9 +23,7 @@ In the case that they are not, I imagine the game will run-time error like crazy
return 1 return 1
switch(X) switch(X)
if(1) if(1)
if(s_active) cancel_stealth()//Get rid of it.
U << "\red You must deactivate the CLOAK-tech device prior to using this ability."
return 1
if(2) if(2)
if(s_bombs<=0) if(s_bombs<=0)
U << "\red There are no more smoke bombs remaining." U << "\red There are no more smoke bombs remaining."
@@ -84,7 +82,7 @@ In the case that they are not, I imagine the game will run-time error like crazy
spawn(0) spawn(0)
spark_system.start() spark_system.start()
playsound(U.loc, 'Deconstruct.ogg', 50, 1) playsound(U.loc, 'phasein.ogg', 25, 1)
playsound(U.loc, "sparks", 50, 1) playsound(U.loc, "sparks", 50, 1)
anim(U.loc,U,'mob.dmi',,"phasein") anim(U.loc,U,'mob.dmi',,"phasein")
@@ -123,7 +121,7 @@ In the case that they are not, I imagine the game will run-time error like crazy
spawn(0) spawn(0)
spark_system.start() spark_system.start()
playsound(U.loc, 'Deconstruct.ogg', 50, 1) playsound(U.loc, 'phasein.ogg', 25, 1)
playsound(U.loc, 'sparks2.ogg', 50, 1) playsound(U.loc, 'sparks2.ogg', 50, 1)
anim(U.loc,U,'mob.dmi',,"phasein") anim(U.loc,U,'mob.dmi',,"phasein")
@@ -336,7 +334,7 @@ Allows to gib up to five squares in a straight line. Seriously.*/
spawn(0) spawn(0)
spark_system.start() spark_system.start()
playsound(U.loc, 'Deconstruct.ogg', 50, 1) playsound(U.loc, 'phasein.ogg', 25, 1)
playsound(U.loc, "sparks", 50, 1) playsound(U.loc, "sparks", 50, 1)
anim(U.loc,U,'mob.dmi',,"phasein") anim(U.loc,U,'mob.dmi',,"phasein")
s_coold = 1 s_coold = 1
@@ -408,7 +406,7 @@ Allows to gib up to five squares in a straight line. Seriously.*/
spawn(0) spawn(0)
spark_system.start() spark_system.start()
playsound(U.loc, 'Deconstruct.ogg', 50, 1) playsound(U.loc, 'phasein.ogg', 25, 1)
playsound(U.loc, "sparks", 50, 1) playsound(U.loc, "sparks", 50, 1)
anim(U.loc,U,'mob.dmi',,"phasein") anim(U.loc,U,'mob.dmi',,"phasein")
s_coold = 1 s_coold = 1

View File

@@ -34,9 +34,16 @@ ________________________________________________________________________________
..() ..()
return return
/obj/item/clothing/suit/space/space_ninja/proc/terminate()
//Simply deletes all the attachments and self, killing all related procs.
del(n_hood)
del(n_gloves)
del(n_shoes)
del(src)
/obj/item/clothing/suit/space/space_ninja/proc/killai(var/mob/living/silicon/ai/A as mob) /obj/item/clothing/suit/space/space_ninja/proc/killai(var/mob/living/silicon/ai/A as mob)
if(A.client) if(A.client)
A << "\red Self-destruct protocol dete-- *bzzzzz*" A << "\red Self-erase protocol dete-- *bzzzzz*"
A << browse(null, "window=hack spideros") A << browse(null, "window=hack spideros")
AI = null AI = null
A.death(1)//Kill A.death(1)//Kill
@@ -51,11 +58,63 @@ ________________________________________________________________________________
U << "\red <b>ERROR</b>: \black Remote access channel disabled." U << "\red <b>ERROR</b>: \black Remote access channel disabled."
return return
/obj/item/clothing/suit/space/space_ninja/proc/stealth()
set name = "Toggle Stealth"
set desc = "Utilize the internal CLOAK-tech device to activate or deactivate stealth-camo."
set category = "Ninja Equip"
toggle_stealth()
return
/obj/item/clothing/suit/space/space_ninja/proc/toggle_stealth()
var/mob/living/carbon/human/U = affecting
/* This was a test for a new cloaking system. WIP.
if(!s_active)
spawn(0)
anim(U.loc,U,'mob.dmi',,"cloak")
var/image/I = image('mob.dmi',affecting,"ninjatest2")
for(var/mob/O in oviewers(U, null))
O << "[U.name] vanishes into thin air!"
I.override = 1
affecting << I
s_active = !s_active
else
spawn(0)
anim(U.loc,U,'mob.dmi',,"uncloak")
for(var/mob/O in oviewers(U, null))
O << "[U.name] appears from thin air!"
s_active = !s_active
*/
if(s_active)
cancel_stealth()
else
spawn(0)
anim(U.loc,U,'mob.dmi',,"cloak")
s_active=!s_active
U << "\blue You are now invisible to normal detection."
for(var/mob/O in oviewers(U))
O.show_message("[U.name] vanishes into thin air!",1)
return
/obj/item/clothing/suit/space/space_ninja/proc/cancel_stealth()
var/mob/living/carbon/human/U = affecting
if(s_active)
spawn(0)
anim(U.loc,U,'mob.dmi',,"uncloak")
s_active=!s_active
U << "\blue You are now visible."
for(var/mob/O in oviewers(U))
O.show_message("[U.name] appears from thin air!",1)
return 1
return 0
/obj/item/clothing/suit/space/space_ninja/proc/ntick(var/mob/living/carbon/human/U as mob) /obj/item/clothing/suit/space/space_ninja/proc/ntick(var/mob/living/carbon/human/U as mob)
set background = 1 set background = 1
spawn while(cell.charge>=0)//Runs in the background while the suit is initialized. spawn while(cell.charge>=0)//Runs in the background while the suit is initialized.
if(affecting.monkeyizing) terminate()//Kills the suit and attached objects. if(affecting&&affecting.monkeyizing) terminate()//Kills the suit and attached objects.
if(!s_initialized) return//When turned off the proc stops. if(!s_initialized) return//When turned off the proc stops.
if(s_coold) s_coold--//Checks for ability s_cooldown. if(s_coold) s_coold--//Checks for ability s_cooldown.
var/A = 5//Energy cost each tick. var/A = 5//Energy cost each tick.
@@ -69,15 +128,13 @@ ________________________________________________________________________________
U.swap_hand()//swap hand U.swap_hand()//swap hand
U.drop_item()//drop sword U.drop_item()//drop sword
else A += 20 else A += 20
if(s_active) if(s_active)//If stealth is active.
A += 25 A += 25
else else
if(prob(25)) if(prob(25))
U.bruteloss += 1 U.bruteloss += 1
A = 200 A = 200
cell.charge-=A cell.charge-=A
if(U.stat)//If the ninja gets paralyzed, they can still try and jaunt away (since they can adrenaline boost and then jaunt).
s_active=0
if(cell.charge<=0) if(cell.charge<=0)
if(kamikaze) if(kamikaze)
U.say("I DIE TO LIVE AGAIN!") U.say("I DIE TO LIVE AGAIN!")
@@ -85,16 +142,9 @@ ________________________________________________________________________________
U.death() U.death()
return return
cell.charge=0 cell.charge=0
s_active=0 cancel_stealth()
sleep(10)//Checks every second. sleep(10)//Checks every second.
/obj/item/clothing/suit/space/space_ninja/proc/terminate()
//Simply deletes all the attachments and self.
del(n_hood)
del(n_gloves)
del(n_shoes)
del(src)
/obj/item/clothing/suit/space/space_ninja/proc/init() /obj/item/clothing/suit/space/space_ninja/proc/init()
set name = "Initialize Suit" set name = "Initialize Suit"
set desc = "Initializes the suit for field operation." set desc = "Initializes the suit for field operation."
@@ -140,7 +190,10 @@ ________________________________________________________________________________
canremove=1 canremove=1
verbs += /obj/item/clothing/suit/space/space_ninja/proc/init verbs += /obj/item/clothing/suit/space/space_ninja/proc/init
return return
icon_state = "s-ninjan" if(U.gender==FEMALE)
icon_state = "s-ninjanf"
else
icon_state = "s-ninjan"
U.gloves.icon_state = "s-ninjan" U.gloves.icon_state = "s-ninjan"
U.gloves.item_state = "s-ninjan" U.gloves.item_state = "s-ninjan"
U.update_clothing() U.update_clothing()
@@ -154,6 +207,7 @@ ________________________________________________________________________________
grant_ninja_verbs() grant_ninja_verbs()
verbs += /obj/item/clothing/suit/space/space_ninja/proc/deinit verbs += /obj/item/clothing/suit/space/space_ninja/proc/deinit
verbs += /obj/item/clothing/suit/space/space_ninja/proc/spideros verbs += /obj/item/clothing/suit/space/space_ninja/proc/spideros
verbs += /obj/item/clothing/suit/space/space_ninja/proc/stealth
n_gloves.verbs += /obj/item/clothing/gloves/space_ninja/proc/drain_wire n_gloves.verbs += /obj/item/clothing/gloves/space_ninja/proc/drain_wire
n_gloves.verbs += /obj/item/clothing/gloves/space_ninja/proc/toggled n_gloves.verbs += /obj/item/clothing/gloves/space_ninja/proc/toggled
affecting=U affecting=U
@@ -200,7 +254,7 @@ ________________________________________________________________________________
sleep(40) sleep(40)
U << "\blue VOID-shift device status: <B>OFFLINE</B>.\nCLOAK-tech device status: <B>OFFLINE</B>." U << "\blue VOID-shift device status: <B>OFFLINE</B>.\nCLOAK-tech device status: <B>OFFLINE</B>."
if(s_active)//Shutdowns stealth. if(s_active)//Shutdowns stealth.
s_active=!s_active cancel_stealth()
sleep(40) sleep(40)
if(U.stat||U.health<=0) if(U.stat||U.health<=0)
U << "\red <B>FATAL ERROR</B>: 412--GG##&77 BRAIN WAV3 PATT$RN <B>RED</B>\nI-I-INITIATING S-SELf DeStrCuCCCT%$#@@!!$^#!..." U << "\red <B>FATAL ERROR</B>: 412--GG##&77 BRAIN WAV3 PATT$RN <B>RED</B>\nI-I-INITIATING S-SELf DeStrCuCCCT%$#@@!!$^#!..."
@@ -235,6 +289,7 @@ ________________________________________________________________________________
affecting=null affecting=null
slowdown=1 slowdown=1
verbs += /obj/item/clothing/suit/space/space_ninja/proc/init verbs += /obj/item/clothing/suit/space/space_ninja/proc/init
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/stealth
icon_state = "s-ninja" icon_state = "s-ninja"
U.update_clothing() U.update_clothing()
@@ -376,7 +431,7 @@ ________________________________________________________________________________
dat += "<ul>" dat += "<ul>"
dat += "<li><i>Voice masking</i> generates a random name the ninja can use over the radio and in-person. Although, the former use is recommended.</li>" dat += "<li><i>Voice masking</i> generates a random name the ninja can use over the radio and in-person. Although, the former use is recommended.</li>"
dat += "<li><i>Toggling vision</i> cycles to one of the following: thermal, meson, or darkness vision. The starting mode allows one to scout the identity of those in view, revealing their role. Traitors, revolutionaries, wizards, and other such people will be made known to you.</li>" dat += "<li><i>Toggling vision</i> cycles to one of the following: thermal, meson, or darkness vision. The starting mode allows one to scout the identity of those in view, revealing their role. Traitors, revolutionaries, wizards, and other such people will be made known to you.</li>"
dat += "<li><i>Stealth</i>, when activated, drains more battery charge and works similarly to a syndicate cloak.</li>" dat += "<li><i>Stealth</i>, when activated, drains more battery charge and works similarly to a syndicate cloak. The cloak will deactivate when most Abilities are utilized.</li>"
dat += "<li><i>On-board AI</i>: The suit is able to download an AI much like an intelicard. Check with SpiderOS for details once downloaded.</li>" dat += "<li><i>On-board AI</i>: The suit is able to download an AI much like an intelicard. Check with SpiderOS for details once downloaded.</li>"
dat += "<li><i>SpiderOS</i> is a specialized, PDA-like screen that allows for a small variety of functions, such as injecting healing chemicals directly from the suit. You are using it now, if that was not already obvious. You may also download AI modules directly to the OS.</li>" dat += "<li><i>SpiderOS</i> is a specialized, PDA-like screen that allows for a small variety of functions, such as injecting healing chemicals directly from the suit. You are using it now, if that was not already obvious. You may also download AI modules directly to the OS.</li>"
dat += "</ul>" dat += "</ul>"
@@ -432,8 +487,7 @@ ________________________________________________________________________________
dat += "<h4>Laws:</h4><ul>[laws]<li><a href='byond://?src=\ref[src];choice=Override Laws;target=\ref[A]'><i>*Override Laws*</i></a></li></ul>" dat += "<h4>Laws:</h4><ul>[laws]<li><a href='byond://?src=\ref[src];choice=Override Laws;target=\ref[A]'><i>*Override Laws*</i></a></li></ul>"
if (A.stat == 2)//If AI dies while inside the card, such as suiciding. if (A.stat == 2)//If AI dies while inside the card, such as suiciding.
AI = null killai(A)
del(A)//Delete A.
U << "Artificial Intelligence has self-terminated. Rebooting..." U << "Artificial Intelligence has self-terminated. Rebooting..."
spideros()//Refresh. spideros()//Refresh.
else else
@@ -501,20 +555,8 @@ ________________________________________________________________________________
// var/return_to = copytext(temp, 1, (length(temp)))//length has to be to the length of the thing because by default it's length+1 // var/return_to = copytext(temp, 1, (length(temp)))//length has to be to the length of the thing because by default it's length+1
// spideros = text2num(return_to)//Maximum length here is 6. Use (return_to, X) to specify larger strings if needed. // spideros = text2num(return_to)//Maximum length here is 6. Use (return_to, X) to specify larger strings if needed.
if("Stealth") if("Stealth")
if(s_active) toggle_stealth()
spawn(0)
anim(U.loc,U,'mob.dmi',,"uncloak")
s_active=!s_active
U << "\blue You are now visible."
for(var/mob/O in oviewers(U, null))
O << "[U.name] appears from thin air!"
else
spawn(0)
anim(U.loc,U,'mob.dmi',,"cloak")
s_active=!s_active
U << "\blue You are now invisible to normal detection."
for(var/mob/O in oviewers(U, null))
O << "[U.name] vanishes into thin air!"
if("0")//Menus are numbers, see note above. 0 is the hub. if("0")//Menus are numbers, see note above. 0 is the hub.
spideros=0 spideros=0
if("1")//Begin normal menus 1-9. if("1")//Begin normal menus 1-9.
@@ -560,7 +602,10 @@ ________________________________________________________________________________
U << "\red Do or Die, <b>LET'S ROCK!!</b>" U << "\red Do or Die, <b>LET'S ROCK!!</b>"
if(verbs.Find(/obj/item/clothing/suit/space/space_ninja/proc/deinit))//To hopefully prevent engaging kamikaze and de-initializing at the same time. if(verbs.Find(/obj/item/clothing/suit/space/space_ninja/proc/deinit))//To hopefully prevent engaging kamikaze and de-initializing at the same time.
grant_kamikaze_verbs() grant_kamikaze_verbs()
icon_state = "s-ninjak" if(U.gender==FEMALE)
icon_state = "s-ninjakf"
else
icon_state = "s-ninjak"
if(n_gloves) if(n_gloves)
n_gloves.icon_state = "s-ninjak" n_gloves.icon_state = "s-ninjak"
n_gloves.item_state = "s-ninjak" n_gloves.item_state = "s-ninjak"
@@ -642,11 +687,12 @@ ________________________________________________________________________________
U << "\red <b>WARNING</b>: PRO0GRE--S 2&3%" U << "\red <b>WARNING</b>: PRO0GRE--S 2&3%"
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/deinit verbs -= /obj/item/clothing/suit/space/space_ninja/proc/deinit
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/spideros verbs -= /obj/item/clothing/suit/space/space_ninja/proc/spideros
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/stealth
sleep(40) sleep(40)
if(AI==A) if(AI==A)
A << "Shutting down external protocol..." A << "Shutting down external protocol..."
U << "\red <b>WARNING</b>: PPPFRRROGrESS 677^%" U << "\red <b>WARNING</b>: PPPFRRROGrESS 677^%"
s_active = 0 cancel_stealth()
sleep(40) sleep(40)
if(AI==A) if(AI==A)
A << "Connecting to kernel..." A << "Connecting to kernel..."
@@ -685,9 +731,6 @@ ________________________________________________________________________________
A << browse(null, "window=hack spideros") A << browse(null, "window=hack spideros")
return return
//Remove this if verbs work.
var/obj/proc_holder/ai_hack_ninja/ninja_spideros = locate() in A//What is the object granting access to proc? Find it.
switch(href_list["choice"]) switch(href_list["choice"])
if("Close") if("Close")
A << browse(null, "window=hack spideros") A << browse(null, "window=hack spideros")
@@ -729,9 +772,7 @@ ________________________________________________________________________________
return return
if(isnull(P)||P.toff)//So it doesn't freak out if the object no-longer exists. if(isnull(P)||P.toff)//So it doesn't freak out if the object no-longer exists.
A << "\red Error: unable to deliver message." A << "\red Error: unable to deliver message."
//hack_spideros() hack_spideros()
//Remove this if verbs work.
ninja_spideros.Click()
return return
P.tnote += "<i><b>&larr; From [A]:</b></i><br>[t]<br>"//Oh ai, u so silly P.tnote += "<i><b>&larr; From [A]:</b></i><br>[t]<br>"//Oh ai, u so silly
if (!P.silent) if (!P.silent)
@@ -837,9 +878,7 @@ ________________________________________________________________________________
U << "[href_list["choice"]] suddenly triggered!" U << "[href_list["choice"]] suddenly triggered!"
ninjaboost() ninjaboost()
//hack_spideros()//Calls spideros for AI. hack_spideros()
//Remove this if verbs work.
ninja_spideros.Click()
return return
/obj/item/clothing/suit/space/space_ninja/examine() /obj/item/clothing/suit/space/space_ninja/examine()
@@ -1246,8 +1285,8 @@ ________________________________________________________________________________
set src in view() set src in view()
..() ..()
var/mode = "Night Vision" var/mode
var/voice = "inactive" var/voice
switch(mode) switch(mode)
if(0) if(0)
mode = "Scouter" mode = "Scouter"
@@ -1316,17 +1355,14 @@ The sprite for the net is kind of ugly but I couldn't come up with a better one.
switch(severity) switch(severity)
if(1.0) if(1.0)
health-=50 health-=50
healthcheck()
if(2.0) if(2.0)
health-=50 health-=50
healthcheck()
if(3.0) if(3.0)
if (prob(50)) if (prob(50))
health-=50 health-=50
healthcheck()
else else
health-=25 health-=25
healthcheck() healthcheck()
return return
/obj/effects/energy_net/blob_act() /obj/effects/energy_net/blob_act()

View File

@@ -6,7 +6,35 @@ ________________________________________________________________________________
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/ */
/client/proc/space_ninja() /proc/space_ninja_arrival()//This is the random event proc. WIP
/*
var/datum/game_mode/current_mode = ticker.mode
switch (current_mode.config_tag)
if ("revolution")
if ("cult")
if (src in current_mode:cult)
if ("wizard")
if (current_mode:wizard && src == current_mode:wizard)
if ("changeling")
if (src in current_mode:changelings)
if ("malfunction")
if (src in current_mode:malf_ai)
if ("nuclear")
if(src in current_mode:syndicates)
*/
return
/client/proc/space_ninja()//This is the admin button.
set category = "Fun" set category = "Fun"
set name = "Spawn Space Ninja" set name = "Spawn Space Ninja"
set desc = "Spawns a space ninja for when you need a teenager with an attitude." set desc = "Spawns a space ninja for when you need a teenager with an attitude."
@@ -19,31 +47,31 @@ ________________________________________________________________________________
if(alert("Are you sure you want to send in a space ninja?",,"Yes","No")=="No") if(alert("Are you sure you want to send in a space ninja?",,"Yes","No")=="No")
return return
var/input = null var/input
while(!input) while(!input)
input = input(src, "Please specify which mission the space ninja shall undertake.", "Specify Mission", "") input = input(src, "Please specify which mission the space ninja shall undertake.", "Specify Mission", "")
if(!input) if(!input)
if(alert("Error, no mission set. Do you want to exit the setup process?",,"Yes","No")=="Yes") if(alert("Error, no mission set. Do you want to exit the setup process?",,"Yes","No")=="Yes")
return return
var/list/locList = list() var/list/spawn_list = list()
for(var/obj/landmark/X in world) for(var/obj/landmark/X in world)
if (X.name == "carpspawn") if (X.name == "carpspawn")
locList.Add(X) spawn_list.Add(X)
if(!locList.len) if(!spawn_list.len)
alert("No spawn location could be found. Aborting.") alert("No spawn location could be found. Aborting.")
return return
var/admin_name = src var/admin_name = src
var/mob/living/carbon/human/new_ninja = create_space_ninja(pick(locList)) var/mob/living/carbon/human/new_ninja = create_space_ninja(pick(spawn_list))
var/mob/dead/observer/G var/mob/dead/observer/G
var/list/candidates = list() var/list/candidates = list()
for(G in world) for(G in world)
if(G.client) //Was restricted to non-admins before. Removed the admin check, as it is retarded. -- Urist if(G.client&&!G.client.holder)
//if(((G.client.inactivity/10)/60) <= 5) //Again, removed a check. Usually when an admin makes a ninja, they ask that person first, so the check is redundant. //if(G.client)//Good for testing. Admins can spawn ninja equipment if they want to.
//I've also got reports of even non-admins that asked for ninjaification being exempt from the ninja list, which I believe that check is responsible for. if(((G.client.inactivity/10)/60) <= 5)
candidates.Add(G) candidates.Add(G)
if(candidates.len) if(candidates.len)
G = input("Pick character to spawn as the Space Ninja", "Active Players", G) in candidates//It will auto-pick a person when there is only one candidate. G = input("Pick character to spawn as the Space Ninja", "Active Players", G) in candidates//It will auto-pick a person when there is only one candidate.
new_ninja.mind.key = G.key new_ninja.mind.key = G.key
@@ -134,8 +162,10 @@ client/proc/create_space_ninja(obj/spawn_point)
verbs += /obj/item/clothing/suit/space/space_ninja/proc/ninjawalk verbs += /obj/item/clothing/suit/space/space_ninja/proc/ninjawalk
verbs += /obj/item/clothing/suit/space/space_ninja/proc/ninjamirage verbs += /obj/item/clothing/suit/space/space_ninja/proc/ninjamirage
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/stealth
kamikaze = 1 kamikaze = 1
s_active = 0 cancel_stealth()
/obj/item/clothing/suit/space/space_ninja/proc/remove_kamikaze_verbs() /obj/item/clothing/suit/space/space_ninja/proc/remove_kamikaze_verbs()
verbs += /obj/item/clothing/suit/space/space_ninja/proc/ninjashift verbs += /obj/item/clothing/suit/space/space_ninja/proc/ninjashift
@@ -148,16 +178,17 @@ client/proc/create_space_ninja(obj/spawn_point)
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ninjawalk verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ninjawalk
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ninjamirage verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ninjamirage
verbs += /obj/item/clothing/suit/space/space_ninja/proc/stealth
kamikaze = 0 kamikaze = 0
k_unlock = 0 k_unlock = 0
/*Commented out due to BYOND bugs. Workaround used instead for the time being.
/obj/item/clothing/suit/space/space_ninja/proc/grant_AI_verbs() /obj/item/clothing/suit/space/space_ninja/proc/grant_AI_verbs()
verbs += /obj/item/clothing/suit/space/space_ninja/proc/ai_hack_ninja verbs += /obj/item/clothing/suit/space/space_ninja/proc/ai_hack_ninja
verbs += /obj/item/clothing/suit/space/space_ninja/proc/ai_return_control verbs += /obj/item/clothing/suit/space/space_ninja/proc/ai_return_control
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/deinit verbs -= /obj/item/clothing/suit/space/space_ninja/proc/deinit
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/spideros verbs -= /obj/item/clothing/suit/space/space_ninja/proc/spideros
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/stealth
s_control = 0 s_control = 0
@@ -166,33 +197,7 @@ client/proc/create_space_ninja(obj/spawn_point)
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ai_return_control verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ai_return_control
verbs += /obj/item/clothing/suit/space/space_ninja/proc/deinit verbs += /obj/item/clothing/suit/space/space_ninja/proc/deinit
verbs += /obj/item/clothing/suit/space/space_ninja/proc/spideros verbs += /obj/item/clothing/suit/space/space_ninja/proc/spideros
verbs += /obj/item/clothing/suit/space/space_ninja/proc/stealth
s_control = 1
*/
/obj/item/clothing/suit/space/space_ninja/proc/grant_AI_verbs()
var/obj/proc_holder/ai_return_control/A_C = new(AI)
var/obj/proc_holder/ai_hack_ninja/B_C = new(AI)
var/obj/proc_holder/ai_instruction/C_C = new(AI)
new/obj/proc_holder/ai_holo_clear(AI)
AI.proc_holder_list += A_C
AI.proc_holder_list += B_C
AI.proc_holder_list += C_C
s_control = 0
/obj/item/clothing/suit/space/space_ninja/proc/remove_AI_verbs()
var/obj/proc_holder/ai_return_control/A_C = locate() in AI
var/obj/proc_holder/ai_hack_ninja/B_C = locate() in AI
var/obj/proc_holder/ai_instruction/C_C = locate() in AI
var/obj/proc_holder/ai_holo_clear/D_C = locate() in AI
del(A_C)
del(B_C)
del(C_C)
del(D_C)
AI.proc_holder_list = list()
verbs += /obj/item/clothing/suit/space/space_ninja/proc/deinit
verbs += /obj/item/clothing/suit/space/space_ninja/proc/spideros
s_control = 1 s_control = 1
@@ -215,9 +220,7 @@ client/proc/create_space_ninja(obj/spawn_point)
affecting << I affecting << I
affecting << "<i>An image flicks to life nearby. It appears visible to you only.</i>" affecting << "<i>An image flicks to life nearby. It appears visible to you only.</i>"
var/obj/proc_holder/ai_holo_clear/D_C = locate() in AI verbs += /obj/item/clothing/suit/space/space_ninja/proc/ai_holo_clear
AI.proc_holder_list += D_C
//verbs += /obj/item/clothing/suit/space/space_ninja/proc/ai_holo_clear
ai_holo_process()//Move to initialize ai_holo_process()//Move to initialize
else else
@@ -234,22 +237,10 @@ client/proc/create_space_ninja(obj/spawn_point)
del(hologram.i_attached) del(hologram.i_attached)
del(hologram) del(hologram)
if(!s_control)//Meant to be used all the time but for now this'll do. verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ai_holo_clear
var/obj/proc_holder/ai_holo_clear/D_C = locate() in AI
AI.proc_holder_list -= D_C
//verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ai_holo_clear
return return
sleep(10)//Checks every second. sleep(10)//Checks every second.
/*I've tried a lot of stuff but adding verbs to the AI while inside an object, inside another object, did not want to work properly.
This is the best work-around I could come up with. Uses objects to then display to panel, based on the object spell system.
Can be added on to pretty easily.
Leaving this commented out until BYOND fixes the verb panel bug.
It would be better to switch to this (from proc_holder) if the bug does get fixed.
/obj/item/clothing/suit/space/space_ninja/proc/ai_instruction()//Let's the AI know what they can do. /obj/item/clothing/suit/space/space_ninja/proc/ai_instruction()//Let's the AI know what they can do.
set name = "Instructions" set name = "Instructions"
set desc = "Displays a list of helpful information." set desc = "Displays a list of helpful information."
@@ -289,64 +280,7 @@ It would be better to switch to this (from proc_holder) if the bug does get fixe
AI << "You have seized your hacking attempt. [affecting] has regained control." AI << "You have seized your hacking attempt. [affecting] has regained control."
affecting << "<b>UPDATE</b>: [AI.real_name] has ceased hacking attempt. All systems clear." affecting << "<b>UPDATE</b>: [AI.real_name] has ceased hacking attempt. All systems clear."
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ai_holo_clear verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ai_return_control
return
*/
//Workaround
/obj/proc_holder/ai_holo_clear
name = "Clear Hologram"
desc = "Stops projecting the current holographic image."
panel = "AI Ninja Equip"
density = 0
opacity = 0
/obj/proc_holder/ai_holo_clear/Click()
var/obj/item/clothing/suit/space/space_ninja/S = loc.loc//This is so stupid but makes sure certain things work. AI.SUIT
del(S.hologram.i_attached)
del(S.hologram)
var/obj/proc_holder/ai_holo_clear/D_C = locate() in S.AI
S.AI.proc_holder_list -= D_C
return
/obj/proc_holder/ai_instruction//Let's the AI know what they can do.
name = "Instructions"
desc = "Displays a list of helpful information."
panel = "AI Ninja Equip"
density = 0
opacity = 0
/obj/proc_holder/ai_instruction/Click()
loc << "The menu you are seeing will contain other commands if they become available.\nRight click a nearby turf to display an AI Hologram. It will only be visible to you and your host. You can move it freely using normal movement keys--it will disappear if placed too far away."
/obj/proc_holder/ai_hack_ninja//Generic proc holder to make sure the two verbs below work propely.
name = "Hack SpiderOS"
desc = "Hack directly into the Black Widow(tm) neuro-interface."
panel = "AI Ninja Equip"
density = 0
opacity = 0
/obj/proc_holder/ai_hack_ninja/Click()//When you click on it.
var/obj/item/clothing/suit/space/space_ninja/S = loc.loc
S.hack_spideros()
return
/obj/proc_holder/ai_return_control
name = "Relinquish Control"
desc = "Return control to the user."
panel = "AI Ninja Equip"
density = 0
opacity = 0
/obj/proc_holder/ai_return_control/Click()
var/mob/living/silicon/ai/A = loc
var/obj/item/clothing/suit/space/space_ninja/S = A.loc
A << browse(null, "window=hack spideros")//Close window
A << "You have seized your hacking attempt. [S.affecting] has regained control."
S.affecting << "<b>UPDATE</b>: [A.real_name] has ceased hacking attempt. All systems clear."
S.remove_AI_verbs()
return return
/obj/item/clothing/suit/space/space_ninja/proc/hack_spideros() /obj/item/clothing/suit/space/space_ninja/proc/hack_spideros()
@@ -466,6 +400,99 @@ It would be better to switch to this (from proc_holder) if the bug does get fixe
A << browse(dat,"window=hack spideros;size=400x444;border=1;can_resize=0;can_close=0;can_minimize=0") A << browse(dat,"window=hack spideros;size=400x444;border=1;can_resize=0;can_close=0;can_minimize=0")
//OLD & UNUSED===================================
/*
I've tried a lot of stuff but adding verbs to the AI while inside an object, inside another object, did not want to work properly.
This was the best work-around I could come up with at the time. Uses objects to then display to panel, based on the object spell system.
Can be added on to pretty easily.
BYOND fixed the verb bugs so this is no longer necessary. I prefer verb panels.
/obj/item/clothing/suit/space/space_ninja/proc/grant_AI_verbs()
var/obj/proc_holder/ai_return_control/A_C = new(AI)
var/obj/proc_holder/ai_hack_ninja/B_C = new(AI)
var/obj/proc_holder/ai_instruction/C_C = new(AI)
new/obj/proc_holder/ai_holo_clear(AI)
AI.proc_holder_list += A_C
AI.proc_holder_list += B_C
AI.proc_holder_list += C_C
s_control = 0
/obj/item/clothing/suit/space/space_ninja/proc/remove_AI_verbs()
var/obj/proc_holder/ai_return_control/A_C = locate() in AI
var/obj/proc_holder/ai_hack_ninja/B_C = locate() in AI
var/obj/proc_holder/ai_instruction/C_C = locate() in AI
var/obj/proc_holder/ai_holo_clear/D_C = locate() in AI
del(A_C)
del(B_C)
del(C_C)
del(D_C)
AI.proc_holder_list = list()
verbs += /obj/item/clothing/suit/space/space_ninja/proc/deinit
verbs += /obj/item/clothing/suit/space/space_ninja/proc/spideros
verbs += /obj/item/clothing/suit/space/space_ninja/proc/stealth
s_control = 1
//Workaround
/obj/proc_holder/ai_holo_clear
name = "Clear Hologram"
desc = "Stops projecting the current holographic image."
panel = "AI Ninja Equip"
density = 0
opacity = 0
/obj/proc_holder/ai_holo_clear/Click()
var/obj/item/clothing/suit/space/space_ninja/S = loc.loc//This is so stupid but makes sure certain things work. AI.SUIT
del(S.hologram.i_attached)
del(S.hologram)
var/obj/proc_holder/ai_holo_clear/D_C = locate() in S.AI
S.AI.proc_holder_list -= D_C
return
/obj/proc_holder/ai_instruction//Let's the AI know what they can do.
name = "Instructions"
desc = "Displays a list of helpful information."
panel = "AI Ninja Equip"
density = 0
opacity = 0
/obj/proc_holder/ai_instruction/Click()
loc << "The menu you are seeing will contain other commands if they become available.\nRight click a nearby turf to display an AI Hologram. It will only be visible to you and your host. You can move it freely using normal movement keys--it will disappear if placed too far away."
/obj/proc_holder/ai_hack_ninja//Generic proc holder to make sure the two verbs below work propely.
name = "Hack SpiderOS"
desc = "Hack directly into the Black Widow(tm) neuro-interface."
panel = "AI Ninja Equip"
density = 0
opacity = 0
/obj/proc_holder/ai_hack_ninja/Click()//When you click on it.
var/obj/item/clothing/suit/space/space_ninja/S = loc.loc
S.hack_spideros()
return
/obj/proc_holder/ai_return_control
name = "Relinquish Control"
desc = "Return control to the user."
panel = "AI Ninja Equip"
density = 0
opacity = 0
/obj/proc_holder/ai_return_control/Click()
var/mob/living/silicon/ai/A = loc
var/obj/item/clothing/suit/space/space_ninja/S = A.loc
A << browse(null, "window=hack spideros")//Close window
A << "You have seized your hacking attempt. [S.affecting] has regained control."
S.affecting << "<b>UPDATE</b>: [A.real_name] has ceased hacking attempt. All systems clear."
S.remove_AI_verbs()
return
*/
//DEBUG=================================== //DEBUG===================================
/* /*
@@ -590,7 +617,7 @@ mob/verb/remove_object_panel()
I made this as a test for a possible ninja ability (or perhaps more) for a certain mob to see hallucinations. I made this as a test for a possible ninja ability (or perhaps more) for a certain mob to see hallucinations.
The thing here is that these guys have to be coded to do stuff as they are simply images that you can't even click on. The thing here is that these guys have to be coded to do stuff as they are simply images that you can't even click on.
Their movement is also awkward and overlaps. That is why you attached them to objects.
/mob/verb/TestNinjaShadow() /mob/verb/TestNinjaShadow()
set name = "Test Ninja Ability" set name = "Test Ninja Ability"
set category = "Ninja Debug" set category = "Ninja Debug"
@@ -599,7 +626,7 @@ Their movement is also awkward and overlaps.
var/safety = 4 var/safety = 4
for(var/turf/T in oview(5)) for(var/turf/T in oview(5))
if(prob(20)) if(prob(20))
var/current_clone = image('mob.dmi',T,"s-ninja",dir) var/current_clone = image('mob.dmi',T,"s-ninja")
safety-- safety--
spawn(0) spawn(0)
src << current_clone src << current_clone

View File

@@ -42,7 +42,7 @@
avnums.Remove(tempnum) avnums.Remove(tempnum)
BLINDBLOCK = tempnum BLINDBLOCK = tempnum
/* This was use for something before, I think, but is not worth the effort to process now. /* This was used for something before, I think, but is not worth the effort to process now.
/proc/setupcorpses() /proc/setupcorpses()
for (var/obj/landmark/A in world) for (var/obj/landmark/A in world)
if (A.name == "Corpse") if (A.name == "Corpse")

View File

@@ -1353,8 +1353,6 @@
l_hand.screen_loc = ui_lhand l_hand.screen_loc = ui_lhand
var/shielded = 0 var/shielded = 0
for (var/obj/item/device/shield/S in src) for (var/obj/item/device/shield/S in src)
if (S.active) if (S.active)
@@ -1366,10 +1364,8 @@
shielded = 2 shielded = 2
break break
for (var/obj/item/clothing/suit/space/space_ninja/S in src)//Same as a regular cloaking device but more ninja./N if(istype(wear_suit, /obj/item/clothing/suit/space/space_ninja)&&wear_suit:s_active)
if (S.s_active) shielded = 2
shielded = 2
break
if (shielded == 2) if (shielded == 2)
invisibility = 2 invisibility = 2

View File

@@ -78,10 +78,6 @@
else else
stat(null, text("Systems nonfunctional")) stat(null, text("Systems nonfunctional"))
if (proc_holder_list.len)//Generic list for proc_holder objects.
for(var/obj/proc_holder/P in proc_holder_list)
statpanel("[P.panel]","",P)
/mob/living/silicon/ai/proc/ai_alerts() /mob/living/silicon/ai/proc/ai_alerts()
set category = "AI Commands" set category = "AI Commands"
set name = "Show Alerts" set name = "Show Alerts"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 140 KiB

After

Width:  |  Height:  |  Size: 145 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 34 KiB

BIN
sound/effects/phasein.ogg Normal file

Binary file not shown.