diff --git a/code/defines/obj/clothing/gloves.dm b/code/defines/obj/clothing/gloves.dm
index b0a349e2415..656803a6d0d 100644
--- a/code/defines/obj/clothing/gloves.dm
+++ b/code/defines/obj/clothing/gloves.dm
@@ -60,6 +60,7 @@
siemens_coefficient = 0
protective_temperature = 1100
heat_transfer_coefficient = 0.05
+ var/draining = 0
/obj/item/clothing/gloves/stungloves/
name = "Stungloves"
diff --git a/code/defines/obj/clothing/suit.dm b/code/defines/obj/clothing/suit.dm
index 59271a796bb..d0713ffb1b0 100644
--- a/code/defines/obj/clothing/suit.dm
+++ b/code/defines/obj/clothing/suit.dm
@@ -364,8 +364,7 @@
radiation_protection = 0.75
var/affecting = null
var/active = 0
- var/charge = 10000.0
- var/maxcharge = 10000.0//Super high capacity charge but abilities eat a chunk of it./N
+ var/charge = 10000.0//The ninja suit does not have a top capacity. It's like a portable power sink.
var/initialize = 0
var/sbombs = 10.0
diff --git a/code/game/machinery/camera.dm b/code/game/machinery/camera.dm
index e05ce8cdd7f..282ddd1dfa7 100644
--- a/code/game/machinery/camera.dm
+++ b/code/game/machinery/camera.dm
@@ -52,11 +52,14 @@
if (istype(M, /mob/new_player))
continue //cameras can't follow people who haven't started yet DUH OR DIDN'T YOU KNOW THAT
//Cameras can't track people wearing an agent card or a ninja hood.
- if (istype(M, /mob/living/carbon/human) && (istype(M:wear_id, /obj/item/weapon/card/id/syndicate)||istype(M:head, /obj/item/clothing/head/helmet/space/space_ninja)))
- continue
+ if (istype(M, /mob/living/carbon/human))
+ if(istype(M:wear_id, /obj/item/weapon/card/id/syndicate))
+ continue
+ if(istype(M:head, /obj/item/clothing/head/helmet/space/space_ninja)&&!M:head:canremove)
+ continue
if(!istype(M.loc, /turf)) //in a closet or something, AI can't see him anyways
continue
- var/area/wizard_station/A = locate()//So that wizards are not tracked by the AI until they leave their sanctuary./N
+ var/area/wizard_station/A = locate()//So that wizards are not tracked by the AI until they leave their sanctuary. Unless they talk on radio/N
if(M in A.contents)
continue
if(M.invisibility)//cloaked
@@ -97,10 +100,15 @@
while (usr:cameraFollow == target)
if (usr:cameraFollow == null)
return
- else if (istype(target, /mob/living/carbon/human) && istype(target:wear_id, /obj/item/weapon/card/id/syndicate))
- usr << "Follow camera mode ended."
- usr:cameraFollow = null
- return
+ else if (istype(target, /mob/living/carbon/human))
+ if(istype(target:wear_id, /obj/item/weapon/card/id/syndicate))
+ usr << "Follow camera mode terminated."
+ usr:cameraFollow = null
+ return
+ if(istype(target:head, /obj/item/clothing/head/helmet/space/space_ninja)&&!target:head:canremove)
+ usr << "Follow camera mode terminated."
+ usr:cameraFollow = null
+ return
else if(istype(target.loc,/obj/dummy))
usr << "Follow camera mode ended."
usr:cameraFollow = null
diff --git a/code/game/objects/items/clothing.dm b/code/game/objects/items/clothing.dm
index 19a7bc42981..13460f2b620 100644
--- a/code/game/objects/items/clothing.dm
+++ b/code/game/objects/items/clothing.dm
@@ -219,6 +219,7 @@ NINJA MASK
..()
/obj/item/clothing/under/examine()
+ set src in view()
..()
switch(src.sensor_mode)
if(0)
@@ -264,6 +265,7 @@ NINJA MASK
usr << "You enable the mag-pulse traction system."
/obj/item/clothing/shoes/magboots/examine()
+ set src in view()
..()
var/state = "disabled"
if(src.flags&NOSLIP)
@@ -296,9 +298,33 @@ NINJA MASK
//SPESS NINJA STUFF
/obj/item/clothing/suit/space/space_ninja/New()
-//Fix for the examine issue mentioned below. Followup: this doesn't fix anything. I'll need to take a look at how examine works.
src.verbs += /obj/item/clothing/suit/space/space_ninja/proc/init
+/obj/item/clothing/suit/space/space_ninja/proc/ntick(var/mob/living/carbon/human/U as mob)
+ set hidden = 1
+ set background = 1
+
+ spawn while(initialize&&charge>=0)//Suit on and has power.
+ if(!initialize) return//When turned off the proc stops.
+ var/A = 5//Energy cost each tick.
+ if(istype(U.get_active_hand(), /obj/item/weapon/blade))//Sword check.
+ if(charge<=0)//If no charge left.
+ U.drop_item()//Sword is dropped from active hand (and deleted).
+ else A += 20//Otherwise, more energy consumption.
+ else if(istype(U.get_inactive_hand(), /obj/item/weapon/blade))
+ if(charge<=0)
+ U.swap_hand()//swap hand
+ U.drop_item()//drop sword
+ else A += 20
+ else if(active)
+ A += 25
+ charge-=A
+ if(charge<0)
+ charge=0
+ active=0
+// stat("Ninja","#Current Charge: [abs(charge/100)]%",)
+ sleep(10)
+
/obj/item/clothing/suit/space/space_ninja/proc/init()
set name = "Initialize Suit"
set desc = "Initializes the suit for field operation."
@@ -308,6 +334,10 @@ NINJA MASK
var/mob/living/carbon/human/U = usr
U << "\blue Now initializing..."
sleep(40)
+ if(U.mind.assigned_role=="Mime")
+ U << "\red FATAL ERROR: 382200-*#00CODE RED\nUNAUTHORIZED USE DETECTED\nCOMMENCING SUB-R0UTIN3 13...\nTERMINATING U-U-USER..."
+ U.gib()
+ return
if(!istype(U.head, /obj/item/clothing/head/helmet/space/space_ninja))
U << "\red ERROR: 100113 UNABLE TO LOCATE HEAD GEAR\nABORTING..."
return
@@ -325,16 +355,20 @@ NINJA MASK
sleep(40)
U << "\blue Extending neural-net interface...\nNow monitoring brain wave pattern..."
sleep(40)
- if(U.stat==2)
+ if(U.stat==2||U.health<=0)
U << "\red FATAL ERROR: 344--93#&&21 BRAIN WAV3 PATT$RN RED\nA-A-AB0RTING..."
+ U.head:canremove=1
+ U.shoes:canremove=1
+ U.gloves:canremove=1
+ src.canremove=1
return
U << "\blue Linking neural-net interface...\nPattern \green GREEN\blue, continuing operation."
sleep(40)
U << "\blue VOID-shift device status: ONLINE.\nCLOAK-tech device status: ONLINE."
sleep(40)
- U << "\blue Primary system status: ONLINE.\nBackup system status: ONLINE.\nCurrent energy capacity: [src.charge]."
+ U << "\blue Primary system status: ONLINE.\nBackup system status: ONLINE.\nCurrent energy capacity: [src.charge]."
sleep(40)
- U << "\blue All systems operational. Welcome to SpiderOS, [U.real_name]."
+ U << "\blue All systems operational. Welcome to SpiderOS, [U.real_name]."
U.verbs += /mob/proc/ninjashift
U.verbs += /mob/proc/ninjajaunt
U.verbs += /mob/proc/ninjasmoke
@@ -352,6 +386,7 @@ NINJA MASK
src.affecting=U
src.slowdown=0
U.shoes:slowdown--
+ src.ntick(usr)
else
if(usr.mind&&usr.mind.special_role=="Space Ninja")
usr << "\red You do not understand how this suit functions."
@@ -388,13 +423,16 @@ NINJA MASK
U.mind.special_verbs -= /mob/proc/ninjasmoke
U.mind.special_verbs -= /mob/proc/ninjapulse
U.mind.special_verbs -= /mob/proc/ninjablade
- U << "\blue Logging off, [U:real_name]. Shutting down SpiderOS."
+ U << "\blue Logging off, [U:real_name]. Shutting down SpiderOS."
sleep(40)
U << "\blue Primary system status: OFFLINE.\nBackup system status: OFFLINE."
sleep(40)
U << "\blue VOID-shift device status: OFFLINE.\nCLOAK-tech device status: OFFLINE."
+ if(active)//Shutdowns stealth.
+ active=0
+ src.verbs -= /obj/item/clothing/suit/space/space_ninja/proc/toggle
sleep(40)
- if(U.stat==2||U.health<=0)
+ if(U.stat||U.health<=0)
U << "\red FATAL ERROR: 412--GG##&77 BRAIN WAV3 PATT$RN RED\nI-I-INITIATING S-SELf DeStrCuCCCT%$#@@!!$^#!..."
spawn(10)
U << "\red #3#"
@@ -419,7 +457,6 @@ NINJA MASK
U << "\blue Unsecuring external locking mechanism...\nNeural-net abolished.\nOperation status: FINISHED."
src.verbs += /obj/item/clothing/suit/space/space_ninja/proc/init
src.verbs -= /obj/item/clothing/suit/space/space_ninja/proc/deinit
- src.verbs -= /obj/item/clothing/suit/space/space_ninja/proc/toggle
src.initialize=0
src.affecting=null
src.slowdown=1
@@ -449,18 +486,16 @@ NINJA MASK
for(var/mob/O in oviewers(usr, null))
O << "[usr.name] vanishes into thin air!"
-//So apparently, examine won't show up as a verb when
-//viewing an object equipped on the hud
-//and that object having other verbs?
-//Doesn't really make any sense
/obj/item/clothing/suit/space/space_ninja/examine()
+ set src in view()
..()
if(src.initialize)
- usr << "All systems operational. Current energy capacity: [src.charge]."
+ usr << "All systems operational. Current energy capacity: [src.charge]."
if(src.active)
- usr << "The CLOAK-tech device is active."
+ usr << "The CLOAK-tech device is active."
else
- usr << "The CLOAK-tech device is offline."
+ usr << "The CLOAK-tech device is inactive."
+ usr << "There are [src.sbombs] smoke bombs remaining."
/obj/item/clothing/mask/gas/space_ninja/New()
src.verbs += /obj/item/clothing/mask/gas/space_ninja/proc/togglev
@@ -531,6 +566,7 @@ NINJA MASK
usr << "Switching mode to Night Vision."
/obj/item/clothing/mask/gas/space_ninja/examine()
+ set src in view()
..()
var/mode = "Night Vision"
var/voice = "inactive"
diff --git a/code/modules/admin/verbs/striketeam.dm b/code/modules/admin/verbs/striketeam.dm
index 1dc8b881608..6608a000a90 100644
--- a/code/modules/admin/verbs/striketeam.dm
+++ b/code/modules/admin/verbs/striketeam.dm
@@ -257,26 +257,21 @@ Useful for copy pasta since I'm lazy.*/
//SPACE NINJA ABILITIES
-/*
-// src << "\red Something has gone awry and you are missing one or more pieces of equipment."
-
-/mob/proc/ninjagear()
- if(!istype(src:wear_suit, /obj/item/clothing/suit/space/space_ninja)) return 0
- else if(!istype(src:head, /obj/item/clothing/head/helmet/space/space_ninja)) return 0
- else if(!istype(src:gloves, /obj/item/clothing/gloves/space_ninja)) return 0
- else if(!istype(src:shoes, /obj/item/clothing/shoes/space_ninja)) return 0
- else return 1
-
-/mob/proc/ninjacost(var/cost)
- if(cost>src.wear_suit:energy)
+//X is optional, tells the proc to check for stealth.
+/mob/proc/ninjacost(C,X)
+ var/mob/living/carbon/human/U = src
+ if(U.stat)
+ U << "\red You must be conscious to do this."
return 0
- else
- src.wear_suit:energy=src.wear_suit:energy-cost
+ else if(X&&U.wear_suit:active)
+ U << "\red You must deactivate the CLOAK-tech device prior to using this ability."
+ return 0
+ else if(U.wear_suit:charge>=C*10)
return 1
+ else
+ U << "\red Not enough energy."
+ return 0
-//else if (istype(src.wear_mask, /obj/item/clothing/mask/gas/space_ninja))
- // switch(src.wear_mask:mode)
-*/
//Smoke
//Summons smoke in radius of user.
//Not sure why this would be useful (it's not) but whatever. Ninjas need their smoke bombs.
@@ -288,15 +283,16 @@ Useful for copy pasta since I'm lazy.*/
if(src.stat)
src << "\red You must be conscious to do this."
return
- //add energy cost check
- //add warning message for low energy
+ if(!src:wear_suit:sbombs)
+ src << "\red There are no more smoke bombs remaining."
+ return
+ src:wear_suit:sbombs--
+ src << "\blue There are [src:wear_suit:sbombs] smoke bombs remaining."
var/datum/effects/system/bad_smoke_spread/smoke = new /datum/effects/system/bad_smoke_spread()
smoke.set_up(10, 0, src.loc)
smoke.start()
playsound(src.loc, 'bamf.ogg', 50, 2)
- //subtract cost(5)
-
//9-10 Tile Teleport
//Click to to teleport 9-10 tiles in direction facing.
@@ -305,11 +301,9 @@ Useful for copy pasta since I'm lazy.*/
set desc = "Utilizes the internal VOID-shift device to rapidly transit in direction facing."
set category = "Ninja"
- if(src.stat)
- src << "\red You must be conscious to do this."
+ var/C = 100
+ if(!ninjacost(C,1))
return
- //add energy cost check
- //add warning message for low energy
var/list/turfs = new/list()
var/turf/picked
@@ -371,11 +365,11 @@ Useful for copy pasta since I'm lazy.*/
playsound(src.loc, "sparks", 50, 1)
anim(src.loc,'mob.dmi',src,"phasein")
- spawn(0) //Any living mobs in teleport area are gibbed.
+ spawn(0)//Any living mobs in teleport area are gibbed.
for(var/mob/living/M in picked)
if(M==src) continue
M.gib()
- //subtract cost(10)
+ src:wear_suit:charge-=(C*10)
//Right Click Teleport
//Right click to teleport somewhere, almost exactly like admin jump to turf.
@@ -384,11 +378,10 @@ Useful for copy pasta since I'm lazy.*/
set desc = "Utilizes the internal VOID-shift device to rapidly transit to a destination in view."
set category = null//So it does not show up on the panel but can still be right-clicked.
- if(src.stat)
- src << "\red You must be conscious to do this."
+ var/C = 200
+ if(!ninjacost(C,1))
return
- //add energy cost check
- //add warning message for low energy
+
if(T.density)
src << "\red You cannot teleport into solid walls."
return
@@ -409,11 +402,11 @@ Useful for copy pasta since I'm lazy.*/
playsound(src.loc, 'sparks2.ogg', 50, 1)
anim(src.loc,'mob.dmi',src,"phasein")
- spawn(0) //Any living mobs in teleport area are gibbed.
+ spawn(0)//Any living mobs in teleport area are gibbed.
for(var/mob/living/M in T)
if(M==src) continue
M.gib()
- //subtract cost(20)
+ src:wear_suit:charge-=(C*10)
//EMP Pulse
//Disables nearby tech equipment.
@@ -422,35 +415,33 @@ Useful for copy pasta since I'm lazy.*/
set desc = "Disable any nearby technology with a electro-magnetic pulse."
set category = "Ninja"
- if(src.stat)
- src << "\red You must be conscious to do this."
+ var/C = 250
+ if(!ninjacost(C,1))
return
- //add energy cost check
- //add warning message for low energy
+ playsound(src.loc, 'EMPulse.ogg', 60, 2)
empulse(src, 4, 6) //Procs sure are nice. Slightly weaker than wizard's disable tch.
- //subtract cost(25)
+ src:wear_suit:charge-=(C*10)
-/mob/proc/ninjablade()
//Summon Energy Blade
//Summons a blade of energy in active hand.
+/mob/proc/ninjablade()
set name = "Energy Blade"
set desc = "Create a focused beam of energy in your active hand."
set category = "Ninja"
- if(src.stat)
- src << "\red You must be conscious to do this."
+ var/C = 10
+ if(!ninjacost(C))
return
- //add energy cost check
- //add warning message for low energy
-
if(!src.get_active_hand()&&!istype(src.get_inactive_hand(), /obj/item/weapon/blade))
var/obj/item/weapon/blade/W = new()
W.spark_system.start()
playsound(src.loc, "sparks", 50, 1)
src.put_in_hand(W)
+
+ src:wear_suit:charge-=(C*10)
/*
/mob/proc/ninjastar(var/mob/living/M in oview())
*/
\ No newline at end of file
diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm
index 80f51f66354..9f4362c6c99 100644
--- a/code/modules/mob/living/carbon/human/human.dm
+++ b/code/modules/mob/living/carbon/human/human.dm
@@ -172,7 +172,8 @@
if (src.mind)
if (src.mind.special_role == "Changeling")
stat("Chemical Storage", src.chem_charges)
-
+ if (istype(src.wear_suit, /obj/item/clothing/suit/space/space_ninja)&&src.wear_suit:initialize)
+ stat("Energy Charge", abs(src.wear_suit:charge/100))
/mob/living/carbon/human/bullet_act(flag, A as obj, var/datum/organ/external/def_zone)
var/shielded = 0
diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm
index c412bf50ec2..20ab278a911 100644
--- a/code/modules/power/apc.dm
+++ b/code/modules/power/apc.dm
@@ -437,6 +437,35 @@
/obj/machinery/power/apc/attack_hand(mob/user)
add_fingerprint(user)
+ if(ishuman(user))
+ var/mob/living/carbon/human/U = user
+ if(istype(U.gloves, /obj/item/clothing/gloves/space_ninja)&&!U.gloves:canremove&&!U.gloves:draining)
+ var/obj/item/clothing/suit/space/space_ninja/S = U.wear_suit
+ var/obj/item/clothing/gloves/space_ninja/G = U.gloves
+// emagged = 1
+// locked = 0
+ user << "\blue Now charging battery..."
+ G.draining = 1
+ if(cell&&cell.charge)
+ while(cell.charge>0)
+ var/drain = rand(500,1500)
+ if(cell.charge[drain] energy from the APC ([cell.charge] charge remaining)."
+ else break
+ G.draining = 0
+ return
+ else
+ U << "\red This machine has run dry of power. You must find another."
+ return
+
if(opened && (!istype(user, /mob/living/silicon)))
if(cell)
usr.put_in_hand(cell)
@@ -455,8 +484,6 @@
user.machine = src
src.interact(user)
-
-
/obj/machinery/power/apc/proc/interact(mob/user)
if ( (get_dist(src, user) > 1 ))
diff --git a/sound/effects/EMPulse.ogg b/sound/effects/EMPulse.ogg
new file mode 100644
index 00000000000..f9b7066454d
Binary files /dev/null and b/sound/effects/EMPulse.ogg differ