mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 19:47:22 +01:00
#Fixed a few items not being examinable when on the hud.
#Most ninja suit abilities will not be available unless the suit is initialized (such as stealth and the alike). #Ninja suit now comes with a basic energy system. It begins with 10000 and depletes 5 energy/tick. Having an energy blade depeletes +20 energy. Having stealth active depelets +25 energy. #Ninjas start with 10 smoke bombs. When used they are gone forever. #Other abilities now require and use energy. #Recovering energy is possible by clicking on APCs with an empty hand, ~1000e/5 seconds. There is no battery energy limit. Plan to add more ways to get energy later. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1438 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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: <B>[abs(charge/100)]</B>%",)
|
||||
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 <B>FATAL ERROR</B>: 382200-*#00CODE <B>RED</B>\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 <B>ERROR</B>: 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 <B>FATAL ERROR</B>: 344--93#&&21 BRAIN WAV3 PATT$RN <B>RED</B>\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 <B>GREEN</B>\blue, continuing operation."
|
||||
sleep(40)
|
||||
U << "\blue VOID-shift device status: <B>ONLINE</B>.\nCLOAK-tech device status: <B>ONLINE</B>."
|
||||
sleep(40)
|
||||
U << "\blue Primary system status: <B>ONLINE</B>.\nBackup system status: <B>ONLINE</B>.\nCurrent energy capacity: <B>[src.charge]<B>."
|
||||
U << "\blue Primary system status: <B>ONLINE</B>.\nBackup system status: <B>ONLINE</B>.\nCurrent energy capacity: <B>[src.charge]</B>."
|
||||
sleep(40)
|
||||
U << "\blue All systems operational. Welcome to SpiderOS, [U.real_name]."
|
||||
U << "\blue All systems operational. Welcome to <B>SpiderOS</B>, [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 <B>SpiderOS</B>."
|
||||
sleep(40)
|
||||
U << "\blue Primary system status: <B>OFFLINE</B>.\nBackup system status: <B>OFFLINE</B>."
|
||||
sleep(40)
|
||||
U << "\blue VOID-shift device status: <B>OFFLINE</B>.\nCLOAK-tech device status: <B>OFFLINE</B>."
|
||||
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 <B>FATAL ERROR</B>: 412--GG##&77 BRAIN WAV3 PATT$RN <B>RED</B>\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: <B>FINISHED</B>."
|
||||
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: <B>[src.charge]<B>."
|
||||
usr << "All systems operational. Current energy capacity: <B>[src.charge]</B>."
|
||||
if(src.active)
|
||||
usr << "The CLOAK-tech device is active."
|
||||
usr << "The CLOAK-tech device is <B>active</B>."
|
||||
else
|
||||
usr << "The CLOAK-tech device is offline."
|
||||
usr << "The CLOAK-tech device is <B>inactive</B>."
|
||||
usr << "There are <B>[src.sbombs]</B> 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 <B>Night Vision</B>."
|
||||
|
||||
/obj/item/clothing/mask/gas/space_ninja/examine()
|
||||
set src in view()
|
||||
..()
|
||||
var/mode = "Night Vision"
|
||||
var/voice = "inactive"
|
||||
|
||||
@@ -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 <B>[src:wear_suit:sbombs]</B> 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())
|
||||
*/
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
drain = cell.charge
|
||||
if (do_after(user,50))
|
||||
var/datum/effects/system/spark_spread/spark_system = new /datum/effects/system/spark_spread()
|
||||
spark_system.set_up(5, 0, src.loc)
|
||||
spark_system.start()
|
||||
playsound(src.loc, "sparks", 50, 1)
|
||||
cell.charge-=drain
|
||||
S.charge+=drain
|
||||
U << "\blue Gained <B>[drain]</B> energy from the APC (<B>[cell.charge]</B> 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 ))
|
||||
|
||||
Reference in New Issue
Block a user