Fixed PDA messaging.
Fixed PDA flashlight. To clarify, you can still use the PDA when you are stunned/weakened. This was always the case, apparently. You cannot use the PDA when knocked out or dead. You can now stick an ID card into a PDA without clicking 400 times (click on PDA with card in hand). Changed how the ninja suit functions in relation to energy. It will now hold a power cell as APCs/Borgs/etc. Ninjas can now replace their starting power cell (reduced to high capacity/10000) with larger capacities. Drain the cell as normal to do it. On that note, hyper-capacity (30k) cells added to research. Can now drain energy from a recharger. Much like draining from wire. Added cooldown to certain ninja abilities. It is a global cooldown; meaning, most abilities will be unusable until it finishes. Usually a second. Some icon changes for ninjas. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1540 316c924e-a436-60f5-8080-3fe189b3f50e
@@ -402,9 +402,9 @@
|
||||
overlays = null
|
||||
if( !(stat & BROKEN) )
|
||||
if(flush)
|
||||
overlays += image('disposal.dmi',src,"toilet-handle",,dir)
|
||||
overlays += image('disposal.dmi',"toilet-handle",,dir)
|
||||
if( !(stat & NOPOWER) )
|
||||
overlays += image('disposal.dmi',src,"toilet-ready",,dir)
|
||||
overlays += image('disposal.dmi',"toilet-ready",,dir)
|
||||
else
|
||||
icon_state = "toilet-broken"
|
||||
mode = 0
|
||||
|
||||
@@ -374,14 +374,14 @@
|
||||
var/affecting = null
|
||||
var/active = 0//Stealth off.
|
||||
var/kamikaze = 0//Kamikaze on or off.
|
||||
var/charge = 9000.0//Starts at 90% of normal capacity.
|
||||
var/maxcharge = 30000.0//I want the suit upgradable if the ninja is able to find the parts but for now this'll do.
|
||||
var/obj/item/weapon/cell/cell//Starts out with a high-capacity cell using new proc.
|
||||
var/initialize = 0//Suit starts off.
|
||||
var/spideros = 0//Mode of SpiderOS. This can change so I won't bother listing the modes here (0 is hub). Check ninja_equipment.dm for how it all works.
|
||||
var/unlock = 0
|
||||
var/sbombs = 10.0//Number of starting ninja smoke bombs.
|
||||
var/aboost = 3.0//Number of adrenaline boosters.
|
||||
var/amount_per_transfer_from_this = 20//How much reagent is transferred.
|
||||
var/transfera = 20//How much reagent is transferred.
|
||||
var/coold = 0//If the suit is on cooldown. Could be useful to attach different cooldowns to abilities I guess. It ticks down every second.
|
||||
var/datum/effects/system/spark_spread/spark_system
|
||||
slowdown = 1
|
||||
|
||||
|
||||
@@ -1446,11 +1446,17 @@ Total SMES charging rate should not exceed total power generation rate, or an ov
|
||||
g_amt = 60
|
||||
|
||||
/obj/item/weapon/cell/super
|
||||
name = "super-capcity power cell"
|
||||
name = "super-capacity power cell"
|
||||
origin_tech = "powerstorage=3"
|
||||
maxcharge = 20000
|
||||
g_amt = 70
|
||||
|
||||
/obj/item/weapon/cell/hyper
|
||||
name = "hyper-capacity power cell"
|
||||
origin_tech = "powerstorage=6"
|
||||
maxcharge = 30000
|
||||
g_amt = 80
|
||||
|
||||
/*/obj/item/weapon/cell/potato
|
||||
name = "Potato Battery"
|
||||
desc = "A rechargable starch based power cell."
|
||||
|
||||
@@ -5,25 +5,27 @@ All the procs here assume that the character is wearing the ninja suit if they a
|
||||
They should, as I have made every effort for that to be the case.
|
||||
In the case that they are not, I imagine the game will run-time error like crazy.
|
||||
*/
|
||||
|
||||
//Cooldown ticks off each second based on the suit recharge proc, in seconds. Default of 1 seconds. Some abilities have no cool down.
|
||||
/mob/proc/ninjacost(var/C as num,var/X as num)
|
||||
var/mob/living/carbon/human/U = src
|
||||
var/obj/item/clothing/suit/space/space_ninja/S = src:wear_suit
|
||||
if(U.stat||U.incorporeal_move)
|
||||
U << "\red You must be conscious and solid to do this."
|
||||
return 0
|
||||
else if(C&&S.charge<C*10)
|
||||
return 1
|
||||
else if(C&&S.cell.charge<C*10)
|
||||
U << "\red Not enough energy."
|
||||
return 0
|
||||
return 1
|
||||
else if(X==1&&S.active)
|
||||
U << "\red You must deactivate the CLOAK-tech device prior to using this ability."
|
||||
return 0
|
||||
return 1
|
||||
else if(X==2&&S.sbombs<=0)
|
||||
U << "\red There are no more smoke bombs remaining."
|
||||
return 0
|
||||
return 1
|
||||
else if(X==3&&S.aboost<=0)
|
||||
U << "\red You do not have any more adrenaline boosters."
|
||||
return 0
|
||||
else return 1
|
||||
return 1
|
||||
else return (S.coold)//Returns the value of the variable which counts down to zero.
|
||||
|
||||
//Smoke
|
||||
//Summons smoke in radius of user.
|
||||
@@ -33,7 +35,7 @@ In the case that they are not, I imagine the game will run-time error like crazy
|
||||
set desc = "Blind your enemies momentarily with a well-placed smoke bomb."
|
||||
set category = "Ninja"
|
||||
|
||||
if(ninjacost(,2))
|
||||
if(!ninjacost(,2))
|
||||
var/obj/item/clothing/suit/space/space_ninja/S = src:wear_suit
|
||||
S.sbombs--
|
||||
src << "\blue There are <B>[S.sbombs]</B> smoke bombs remaining."
|
||||
@@ -41,61 +43,23 @@ In the case that they are not, I imagine the game will run-time error like crazy
|
||||
smoke.set_up(10, 0, loc)
|
||||
smoke.start()
|
||||
playsound(loc, 'bamf.ogg', 50, 2)
|
||||
S.coold = 1
|
||||
return
|
||||
|
||||
//9-10 Tile Teleport
|
||||
//Click to to teleport 9-10 tiles in direction facing.
|
||||
/mob/proc/ninjajaunt()
|
||||
set name = "Phase Jaunt"
|
||||
set name = "Phase Jaunt (10E)"
|
||||
set desc = "Utilizes the internal VOID-shift device to rapidly transit in direction facing."
|
||||
set category = "Ninja"
|
||||
|
||||
var/C = 100
|
||||
if(ninjacost(C,1))
|
||||
if(!ninjacost(C,1))
|
||||
var/obj/item/clothing/suit/space/space_ninja/S = src:wear_suit
|
||||
var/list/turfs = new/list()
|
||||
var/turf/picked
|
||||
var/turf/mobloc = get_turf(loc)
|
||||
var/safety = 0
|
||||
/* switch(dir)//This can be done better but really isn't worth it in my opinion.
|
||||
if(NORTH)
|
||||
//highest Y
|
||||
//X the same
|
||||
for(var/turf/T in orange(10))
|
||||
if(T.density) continue
|
||||
if(T.x>world.maxx || T.x<1) continue
|
||||
if(T.y>world.maxy || T.y<1) continue
|
||||
if((T.y-mobloc.y)<9 || ((T.x+mobloc.x+1)-(mobloc.x*2))>2) continue
|
||||
turfs += T
|
||||
if(SOUTH)
|
||||
//lowest Y
|
||||
//X the same
|
||||
for(var/turf/T in orange(10))
|
||||
if(T.density) continue
|
||||
if(T.x>world.maxx || T.x<1) continue
|
||||
if(T.y>world.maxy || T.y<1) continue
|
||||
if((mobloc.y-T.y)<9 || ((T.x+mobloc.x+1)-(mobloc.x*2))>2) continue
|
||||
turfs += T
|
||||
if(EAST)
|
||||
//highest X
|
||||
//Y the same
|
||||
for(var/turf/T in orange(10))
|
||||
if(T.density) continue
|
||||
if(T.x>world.maxx || T.x<1) continue
|
||||
if(T.y>world.maxy || T.y<1) continue
|
||||
if((T.x-mobloc.x)<9 || ((T.y+mobloc.y+1)-(mobloc.y*2))>2) continue
|
||||
turfs += T
|
||||
if(WEST)
|
||||
//lowest X
|
||||
//Y the same
|
||||
for(var/turf/T in orange(10))
|
||||
if(T.density) continue
|
||||
if(T.x>world.maxx || T.x<1) continue
|
||||
if(T.y>world.maxy || T.y<1) continue
|
||||
if((mobloc.x-T.x)<9 || ((T.y+mobloc.y+1)-(mobloc.y*2))>2) continue
|
||||
turfs += T
|
||||
else
|
||||
safety = 1*/
|
||||
var/locx
|
||||
var/locy
|
||||
switch(dir)//Gets rectengular range for target.
|
||||
@@ -151,7 +115,8 @@ In the case that they are not, I imagine the game will run-time error like crazy
|
||||
for(var/mob/living/M in picked)
|
||||
if(M==src) continue
|
||||
M.gib()
|
||||
S.charge-=(C*10)
|
||||
S.coold = 1
|
||||
S.cell.charge-=(C*10)
|
||||
else
|
||||
src << "\red The VOID-shift device is malfunctioning, <B>teleportation failed</B>."
|
||||
return
|
||||
@@ -159,12 +124,12 @@ In the case that they are not, I imagine the game will run-time error like crazy
|
||||
//Right Click Teleport
|
||||
//Right click to teleport somewhere, almost exactly like admin jump to turf.
|
||||
/mob/proc/ninjashift(var/turf/T in oview())
|
||||
set name = "Phase Shift"
|
||||
set name = "Phase Shift (20E)"
|
||||
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.
|
||||
|
||||
var/C = 200
|
||||
if(ninjacost(C,1))
|
||||
if(!ninjacost(C,1))
|
||||
var/obj/item/clothing/suit/space/space_ninja/S = src:wear_suit
|
||||
if(!T.density)
|
||||
var/turf/mobloc = get_turf(loc)
|
||||
@@ -184,7 +149,8 @@ In the case that they are not, I imagine the game will run-time error like crazy
|
||||
for(var/mob/living/M in T)
|
||||
if(M==src) continue
|
||||
M.gib()
|
||||
S.charge-=(C*10)
|
||||
S.coold = 1
|
||||
S.cell.charge-=(C*10)
|
||||
else
|
||||
src << "\red You cannot teleport into solid walls."
|
||||
return
|
||||
@@ -192,27 +158,28 @@ In the case that they are not, I imagine the game will run-time error like crazy
|
||||
//EMP Pulse
|
||||
//Disables nearby tech equipment.
|
||||
/mob/proc/ninjapulse()
|
||||
set name = "EM Burst"
|
||||
set name = "EM Burst (25E)"
|
||||
set desc = "Disable any nearby technology with a electro-magnetic pulse."
|
||||
set category = "Ninja"
|
||||
|
||||
var/C = 250
|
||||
if(ninjacost(C,1))
|
||||
if(!ninjacost(C,1))
|
||||
var/obj/item/clothing/suit/space/space_ninja/S = src:wear_suit
|
||||
playsound(loc, 'EMPulse.ogg', 60, 2)
|
||||
empulse(src, 4, 6) //Procs sure are nice. Slightly weaker than wizard's disable tch.
|
||||
S.charge-=(C*10)
|
||||
S.coold = 2
|
||||
S.cell.charge-=(C*10)
|
||||
return
|
||||
|
||||
//Summon Energy Blade
|
||||
//Summons a blade of energy in active hand.
|
||||
/mob/proc/ninjablade()
|
||||
set name = "Energy Blade"
|
||||
set name = "Energy Blade (5E)"
|
||||
set desc = "Create a focused beam of energy in your active hand."
|
||||
set category = "Ninja"
|
||||
|
||||
var/C = 50
|
||||
if(ninjacost(C))
|
||||
if(!ninjacost(C))
|
||||
var/obj/item/clothing/suit/space/space_ninja/S = src:wear_suit
|
||||
if(!S.kamikaze)
|
||||
if(!get_active_hand()&&!istype(get_inactive_hand(), /obj/item/weapon/blade))
|
||||
@@ -220,7 +187,7 @@ In the case that they are not, I imagine the game will run-time error like crazy
|
||||
W.spark_system.start()
|
||||
playsound(loc, "sparks", 50, 1)
|
||||
put_in_hand(W)
|
||||
S.charge-=(C*10)
|
||||
S.cell.charge-=(C*10)
|
||||
else
|
||||
src << "\red You can only summon one blade. Try dropping an item first."
|
||||
else//Else you can run around with TWO energy blades. I don't know why you'd want to but cool factor remains.
|
||||
@@ -232,18 +199,19 @@ In the case that they are not, I imagine the game will run-time error like crazy
|
||||
put_in_inactive_hand(W)
|
||||
S.spark_system.start()
|
||||
playsound(loc, "sparks", 50, 1)
|
||||
S.coold = 1
|
||||
return
|
||||
|
||||
//Shoot Ninja Stars
|
||||
//Shoots ninja stars at random people.
|
||||
//This could be a lot better but I'm too tired atm.
|
||||
/mob/proc/ninjastar()
|
||||
set name = "Energy Star"
|
||||
set name = "Energy Star (3E)"
|
||||
set desc = "Launches an energy star at a random living target."
|
||||
set category = "Ninja"
|
||||
|
||||
var/C = 30
|
||||
if(ninjacost(C))
|
||||
if(!ninjacost(C))
|
||||
var/obj/item/clothing/suit/space/space_ninja/S = src:wear_suit
|
||||
var/targets[]//So yo can shoot while yo throw dawg
|
||||
targets = new()
|
||||
@@ -263,12 +231,25 @@ In the case that they are not, I imagine the game will run-time error like crazy
|
||||
A.current = curloc
|
||||
A.yo = targloc.y - curloc.y
|
||||
A.xo = targloc.x - curloc.x
|
||||
S.charge-=(C*10)
|
||||
S.cell.charge-=(C*10)
|
||||
A.process()
|
||||
else
|
||||
src << "\red There are no targets in view."
|
||||
return
|
||||
/*
|
||||
//Energy Net
|
||||
//Allows the ninja to capture people, I guess.
|
||||
/mob/proc/ninjanet()
|
||||
set name = "Energy Net"
|
||||
set desc = "Captures a fallen opponent in a net of energy."
|
||||
set category = "Ninja"
|
||||
|
||||
var/C = 200
|
||||
if(!ninjacost(C))
|
||||
var/obj/item/clothing/suit/space/space_ninja/S = src:wear_suit
|
||||
S.cell.charge-=(C*10)
|
||||
return
|
||||
*/
|
||||
//Adrenaline Boost
|
||||
//Wakes the user so they are able to do their thing. Also injects a decent dose of radium.
|
||||
//Movement impairing would indicate drugs and the like.
|
||||
@@ -277,7 +258,7 @@ In the case that they are not, I imagine the game will run-time error like crazy
|
||||
set desc = "Inject a secret chemical that will counteract all movement-impairing effects."
|
||||
set category = "Ninja"
|
||||
|
||||
if(ninjacost(,3))
|
||||
if(!ninjacost(,3))
|
||||
var/obj/item/clothing/suit/space/space_ninja/S = src:wear_suit
|
||||
//Wouldn't need to track adrenaline boosters if there was a miracle injection to get rid of paralysis and the like instantly.
|
||||
//For now, adrenaline boosters ARE the miracle injection. Well, radium, really.
|
||||
@@ -288,11 +269,13 @@ In the case that they are not, I imagine the game will run-time error like crazy
|
||||
say(pick("A CORNERED FOX IS MORE DANGEROUS THAN A JACKAL!","HURT ME MOOORRREEE!","IMPRESSIVE!"))
|
||||
spawn(70)
|
||||
S.reagents.reaction(src, 2)
|
||||
S.reagents.trans_id_to(src, "radium", S.amount_per_transfer_from_this)
|
||||
S.reagents.trans_id_to(src, "radium", S.transfera)
|
||||
src << "\red You are beginning to feal the after-effects of the injection."
|
||||
S.aboost--
|
||||
S.coold = 3
|
||||
return
|
||||
|
||||
|
||||
//KAMIKAZE=============================
|
||||
//Or otherwise known as anime mode. Which also happens to be ridiculously powerful.
|
||||
|
||||
@@ -321,7 +304,7 @@ Allows to gib up to five squares in a straight line. Seriously.*/
|
||||
set desc = "Utilizes the internal VOID-shift device to mutilate creatures in a straight line."
|
||||
set category = "Ninja"
|
||||
|
||||
if(ninjacost())
|
||||
if(!ninjacost())
|
||||
var/obj/item/clothing/suit/space/space_ninja/S = src:wear_suit
|
||||
var/locx
|
||||
var/locy
|
||||
@@ -352,7 +335,6 @@ Allows to gib up to five squares in a straight line. Seriously.*/
|
||||
else safety = 1
|
||||
if(!safety)//Cancels the teleportation if no valid turf is found. Usually when teleporting near map edge.
|
||||
say("Ai Satsugai!")
|
||||
verbs -= /mob/proc/ninjaslayer
|
||||
var/turf/picked = locate(locx,locy,mobloc.z)
|
||||
spawn(0)
|
||||
playsound(loc, "sparks", 50, 1)
|
||||
@@ -376,8 +358,7 @@ Allows to gib up to five squares in a straight line. Seriously.*/
|
||||
playsound(loc, 'Deconstruct.ogg', 50, 1)
|
||||
playsound(loc, "sparks", 50, 1)
|
||||
anim(loc,'mob.dmi',src,"phasein")
|
||||
spawn(10)
|
||||
verbs += /mob/proc/ninjaslayer
|
||||
S.coold = 1
|
||||
else
|
||||
src << "\red The VOID-shift device is malfunctioning, <B>teleportation failed</B>."
|
||||
return
|
||||
@@ -389,7 +370,7 @@ Allows to gib up to five squares in a straight line. Seriously.*/
|
||||
set desc = "Utilizes the internal VOID-shift device to create decoys and teleport behind a random target."
|
||||
set category = "Ninja"
|
||||
|
||||
if(ninjacost())//Simply checks for stat.
|
||||
if(!ninjacost())//Simply checks for stat.
|
||||
var/obj/item/clothing/suit/space/space_ninja/S = src:wear_suit
|
||||
var/targets[]
|
||||
targets = new()
|
||||
@@ -427,7 +408,6 @@ Allows to gib up to five squares in a straight line. Seriously.*/
|
||||
|
||||
if(!safety)
|
||||
say("Kumo no Shinkiro!")
|
||||
verbs -= /mob/proc/ninjamirage
|
||||
var/turf/picked = locate(locx,locy,mobloc.z)
|
||||
spawn(0)
|
||||
playsound(loc, "sparks", 50, 1)
|
||||
@@ -450,11 +430,30 @@ Allows to gib up to five squares in a straight line. Seriously.*/
|
||||
playsound(loc, 'Deconstruct.ogg', 50, 1)
|
||||
playsound(loc, "sparks", 50, 1)
|
||||
anim(loc,'mob.dmi',src,"phasein")
|
||||
|
||||
spawn(10)
|
||||
verbs += /mob/proc/ninjamirage
|
||||
S.coold = 1
|
||||
else
|
||||
src << "\red The VOID-shift device is malfunctioning, <B>teleportation failed</B>."
|
||||
else
|
||||
src << "\red There are no targets in view."
|
||||
return
|
||||
return
|
||||
|
||||
/*
|
||||
/mob/verb/TestNinjaShadow()
|
||||
set name = "Test Ninja Ability"
|
||||
set category = "Ninja"
|
||||
|
||||
if(client)
|
||||
var/safety = 4
|
||||
for(var/turf/T in oview(5))
|
||||
if(prob(20))
|
||||
var/current_clone = image('mob.dmi',T,"s-ninja",dir)
|
||||
safety--
|
||||
spawn(0)
|
||||
src << current_clone
|
||||
spawn(300)
|
||||
del(current_clone)
|
||||
spawn while(!isnull(current_clone))
|
||||
step_to(current_clone,src,1)
|
||||
sleep(5)
|
||||
if(safety<=0) break
|
||||
return */
|
||||
@@ -17,21 +17,24 @@
|
||||
reagents.add_reagent("anti_toxin", 80)
|
||||
reagents.add_reagent("radium", 80)
|
||||
reagents.add_reagent("nutriment", 80)
|
||||
cell = new/obj/item/weapon/cell/high
|
||||
cell.charge = 9000
|
||||
|
||||
/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.
|
||||
spawn while(initialize&&cell.charge>=0)//Suit on and has power.
|
||||
if(!initialize) return//When turned off the proc stops.
|
||||
if(coold) coold--//Checks for ability cooldown.
|
||||
var/A = 5//Energy cost each tick.
|
||||
if(!kamikaze)
|
||||
if(istype(U.get_active_hand(), /obj/item/weapon/blade))//Sword check.
|
||||
if(charge<=0)//If no charge left.
|
||||
if(cell.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)
|
||||
if(cell.charge<=0)
|
||||
U.swap_hand()//swap hand
|
||||
U.drop_item()//drop sword
|
||||
else A += 20
|
||||
@@ -41,13 +44,13 @@
|
||||
if(prob(25))
|
||||
U.bruteloss += 1
|
||||
A = 200
|
||||
charge-=A
|
||||
if(charge<0)
|
||||
cell.charge-=A
|
||||
if(cell.charge<0)
|
||||
if(kamikaze)
|
||||
U.say("I DIE TO LIVE AGAIN!")
|
||||
U.death()
|
||||
return
|
||||
charge=0
|
||||
cell.charge=0
|
||||
active=0
|
||||
sleep(10)//Checks every second.
|
||||
|
||||
@@ -90,11 +93,15 @@
|
||||
canremove=1
|
||||
verbs += /obj/item/clothing/suit/space/space_ninja/proc/init
|
||||
return
|
||||
icon_state = "s-ninjan"
|
||||
U.gloves.icon_state = "s-ninjan"
|
||||
U.gloves.item_state = "s-ninjan"
|
||||
U.update_clothing()
|
||||
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>[cell.charge]</B>."
|
||||
sleep(40)
|
||||
U << "\blue All systems operational. Welcome to <B>SpiderOS</B>, [U.real_name]."
|
||||
U.verbs += /mob/proc/ninjashift
|
||||
@@ -157,7 +164,6 @@
|
||||
unlock = 0
|
||||
U.incorporeal_move = 0
|
||||
U.density = 1
|
||||
icon_state = "s-ninja"
|
||||
spideros = 0
|
||||
sleep(40)
|
||||
U.verbs -= /mob/proc/ninjashift
|
||||
@@ -210,6 +216,7 @@
|
||||
U.gloves:draining=0
|
||||
U.gloves.verbs -= /obj/item/clothing/gloves/space_ninja/proc/drain_wire
|
||||
U.gloves.verbs -= /obj/item/clothing/gloves/space_ninja/proc/toggled
|
||||
icon_state = "s-ninja"
|
||||
U.update_clothing()
|
||||
if(istype(U.get_active_hand(), /obj/item/weapon/blade))//Sword check.
|
||||
U.drop_item()
|
||||
@@ -231,8 +238,6 @@
|
||||
|
||||
var/mob/living/carbon/human/U = usr
|
||||
var/dat = "<html><head><title>SpiderOS</title></head><body bgcolor=\"#3D5B43\" text=\"#DB2929\"><style>a, a:link, a:visited, a:active, a:hover { color: #DB2929; }img {border-style:none;}</style>"
|
||||
/*Here is where you would create a link for the cartridge used if the item has one.
|
||||
As noted below, it's not worth the effort to make the cartridge removable unless it's done from the hub.*/
|
||||
if(spideros==0)
|
||||
dat += "<a href='byond://?src=\ref[src];choice=Refresh'><img src=sos_7.png> Refresh</a>"
|
||||
else
|
||||
@@ -244,16 +249,12 @@
|
||||
dat += "Welcome, <b>[U.real_name]</b>.<br>"
|
||||
dat += "<br>"
|
||||
dat += "<img src=sos_10.png> Current Time: [round(world.time / 36000)+12]:[(world.time / 600 % 60) < 10 ? add_zero(world.time / 600 % 60, 1) : world.time / 600 % 60]<br>"
|
||||
dat += "<img src=sos_9.png> Battery Life: [round(charge/100)]%<br>"
|
||||
dat += "<img src=sos_9.png> Battery Life: [round(cell.charge/100)]%<br>"
|
||||
dat += "<img src=sos_11.png> Smoke Bombs: [sbombs]<br>"
|
||||
dat += "<br>"
|
||||
|
||||
switch(spideros)
|
||||
if(0)
|
||||
/*
|
||||
For items that use cartridges (PDAs), simply switch() their hub function based on the cartridge inserted.
|
||||
For ease of use, allow the removal of the cartidge only on the hub.
|
||||
*/
|
||||
dat += "<h4><img src=sos_1.png> Available Functions:</h4>"
|
||||
dat += "<ul>"
|
||||
dat += "<li><a href='byond://?src=\ref[src];choice=Stealth'><img src=sos_4.png> Toggle Stealth: [active == 1 ? "Disable" : "Enable"]</a></li>"
|
||||
@@ -349,7 +350,7 @@
|
||||
dat += "<h5>The reason they (you) are here</h5>:"
|
||||
dat += "Space ninjas are renowned throughout the known controlled space as fearless spies, infiltrators, and assassins. They are sent on missions of varying nature by Nanotrasen, the Syndicate, and other shady organizations and people. To hire a space ninja means serious business."
|
||||
dat += "<h5>Their playstyle:</h5>"
|
||||
dat += "A mix of traitor, changeling, and wizard. Ninjas rely on energy, or electricity to be precise, to keep their suits running (when out of energy, a suit hibernates). Suits gain energy from objects or creatures that contain electrical charge. APCs, cell batteries, SMES batteries, cyborgs, mechs, and exposed wires are currently supported. Through energy ninjas gain access to special powers--while all powers are tied to the ninja suit, the most useful of them are verb activated--to help them in their mission.<br>It is a constant struggle for a ninja to remain hidden long enough to recharge the suit and accomplish their objective; despite their arsenal of abilities, ninjas can die like any other. Unlike wizards, ninjas do not possess good crowd control and are typically forced to play more subdued in order to achieve their goals. Some of their abilities are specifically designed to confuse and disorient others.<br>With that said, it should be perfectly possible to completely flip the fuck out and rampage as a ninja."
|
||||
dat += "A mix of traitor, changeling, and wizard. Ninjas rely on energy, or electricity to be precise, to keep their suits running (when out of energy, a suit hibernates). Suits gain energy from objects or creatures that contain electrical charge. APCs, cell batteries, rechargers, SMES batteries, cyborgs, mechs, and exposed wires are currently supported. Through energy ninjas gain access to special powers--while all powers are tied to the ninja suit, the most useful of them are verb activated--to help them in their mission.<br>It is a constant struggle for a ninja to remain hidden long enough to recharge the suit and accomplish their objective; despite their arsenal of abilities, ninjas can die like any other. Unlike wizards, ninjas do not possess good crowd control and are typically forced to play more subdued in order to achieve their goals. Some of their abilities are specifically designed to confuse and disorient others.<br>With that said, it should be perfectly possible to completely flip the fuck out and rampage as a ninja."
|
||||
dat += "<h5>Their powers:</h5>"
|
||||
dat += "There are two primary types: powers that are activated through the suit and powers that are activated through the verb panel. Passive powers are always on. Active powers must be turned on and remain active only when there is energy to do so. All verb powers are active and their cost is listed next to them."
|
||||
dat += "<b>Powers of the suit</b>: cannot be tracked by AI (passive), faster speed (passive), stealth (active), vision switch (passive if toggled), voice masking (passive), SpiderOS (passive if toggled), energy drain (passive if toggled)."
|
||||
@@ -524,28 +525,28 @@
|
||||
U << "\red Error: the suit cannot perform this function. Out of dylovene."
|
||||
else
|
||||
reagents.reaction(U, 2)
|
||||
reagents.trans_id_to(U, "anti_toxin", amount_per_transfer_from_this)
|
||||
reagents.trans_id_to(U, "anti_toxin", transfera)
|
||||
U << "You feel a tiny prick and a sudden rush of liquid in to your veins."
|
||||
if("Dexalin Plus")
|
||||
if(!reagents.get_reagent_amount("dexalinp"))
|
||||
U << "\red Error: the suit cannot perform this function. Out of dexalinp."
|
||||
else
|
||||
reagents.reaction(U, 2)
|
||||
reagents.trans_id_to(U, "dexalinp", amount_per_transfer_from_this)
|
||||
reagents.trans_id_to(U, "dexalinp", transfera)
|
||||
U << "You feel a tiny prick and a sudden rush of liquid in to your veins."
|
||||
if("Tricordazine")
|
||||
if(!reagents.get_reagent_amount("tricordrazine"))
|
||||
U << "\red Error: the suit cannot perform this function. Out of tricordrazine."
|
||||
else
|
||||
reagents.reaction(U, 2)
|
||||
reagents.trans_id_to(U, "tricordrazine", amount_per_transfer_from_this)
|
||||
reagents.trans_id_to(U, "tricordrazine", transfera)
|
||||
U << "You feel a tiny prick and a sudden rush of liquid in to your veins."
|
||||
if("Spacelin")
|
||||
if(!reagents.get_reagent_amount("spaceacillin"))
|
||||
U << "\red Error: the suit cannot perform this function. Out of spaceacillin."
|
||||
else
|
||||
reagents.reaction(U, 2)
|
||||
reagents.trans_id_to(U, "spaceacillin", amount_per_transfer_from_this)
|
||||
reagents.trans_id_to(U, "spaceacillin", transfera)
|
||||
U << "You feel a tiny prick and a sudden rush of liquid in to your veins."
|
||||
if("Nutriment")
|
||||
if(!reagents.get_reagent_amount("nutriment"))
|
||||
@@ -562,7 +563,7 @@
|
||||
set src in view()
|
||||
..()
|
||||
if(initialize)
|
||||
usr << "All systems operational. Current energy capacity: <B>[src.charge]</B>."
|
||||
usr << "All systems operational. Current energy capacity: <B>[cell.charge]</B>."
|
||||
if(!kamikaze)
|
||||
if(active)
|
||||
usr << "The CLOAK-tech device is <B>active</B>."
|
||||
@@ -609,7 +610,6 @@
|
||||
U << "\red Procedure interrupted. Protocol terminated."
|
||||
return
|
||||
|
||||
|
||||
/obj/item/clothing/gloves/space_ninja/proc/drain(var/target_type as text, var/target, var/obj/suit, var/obj/gloves)
|
||||
//Var Initialize
|
||||
var/mob/living/carbon/human/U = usr
|
||||
@@ -625,6 +625,7 @@
|
||||
U << "\blue Now charging battery..."
|
||||
|
||||
switch(target_type)
|
||||
|
||||
if("APC")
|
||||
var/obj/machinery/power/apc/A = target
|
||||
if(A.cell&&A.cell.charge)
|
||||
@@ -634,14 +635,14 @@
|
||||
drain = rand(G.mindrain,G.maxdrain)
|
||||
if(A.cell.charge<drain)
|
||||
drain = A.cell.charge
|
||||
if(S.charge+drain>S.maxcharge)
|
||||
drain = S.maxcharge-S.charge
|
||||
if(S.cell.charge+drain>S.cell.maxcharge)
|
||||
drain = S.cell.maxcharge-S.cell.charge
|
||||
maxcapacity = 1//Reached maximum battery capacity.
|
||||
if (do_after(U,10))
|
||||
spark_system.start()
|
||||
playsound(A.loc, "sparks", 50, 1)
|
||||
A.cell.charge-=drain
|
||||
S.charge+=drain
|
||||
S.cell.charge+=drain
|
||||
totaldrain+=drain
|
||||
else break
|
||||
U << "\blue Gained <B>[totaldrain]</B> energy from the APC."
|
||||
@@ -662,64 +663,93 @@
|
||||
drain = rand(G.mindrain,G.maxdrain)
|
||||
if(A.charge<drain)
|
||||
drain = A.charge
|
||||
if(S.charge+drain>S.maxcharge)
|
||||
drain = S.maxcharge-S.charge
|
||||
if(S.cell.charge+drain>S.cell.maxcharge)
|
||||
drain = S.cell.maxcharge-S.cell.charge
|
||||
maxcapacity = 1
|
||||
if (do_after(U,10))
|
||||
spark_system.start()
|
||||
playsound(A.loc, "sparks", 50, 1)
|
||||
A.charge-=drain
|
||||
S.charge+=drain
|
||||
S.cell.charge+=drain
|
||||
totaldrain+=drain
|
||||
else break
|
||||
U << "\blue Gained <B>[totaldrain]</B> energy from the SMES cell."
|
||||
else
|
||||
U << "\red This SMES cell has run dry of power. You must find another source."
|
||||
|
||||
if("MECHA")
|
||||
var/obj/mecha/A = target
|
||||
A.occupant_message("\red Warning: Unauthorized access through sub-route 4, block H, detected.")
|
||||
if(A.get_charge())
|
||||
while(G.candrain&&A.cell.charge>0&&!maxcapacity)
|
||||
drain = rand(G.mindrain,G.maxdrain)
|
||||
if(A.cell.charge<drain)
|
||||
drain = A.cell.charge
|
||||
if(S.charge+drain>S.maxcharge)
|
||||
drain = S.maxcharge-S.charge
|
||||
maxcapacity = 1
|
||||
if (do_after(U,10))
|
||||
A.spark_system.start()
|
||||
playsound(A.loc, "sparks", 50, 1)
|
||||
A.cell.use(drain)
|
||||
S.charge+=drain
|
||||
totaldrain+=drain
|
||||
else break
|
||||
U << "\blue Gained <B>[totaldrain]</B> energy from [src]."
|
||||
if("CELL")
|
||||
var/obj/item/weapon/cell/A = target
|
||||
if(A.maxcharge>S.cell.maxcharge)
|
||||
U << "\blue Higher maximum capacity detected.\nUpgrading..."
|
||||
if (G.candrain&&do_after(U,50))
|
||||
U.drop_item()
|
||||
A.loc = S
|
||||
A.charge = min(A.charge+S.cell.charge, A.maxcharge)
|
||||
var/obj/item/weapon/cell/old_cell = S.cell
|
||||
old_cell.charge = 0
|
||||
U.put_in_hand(old_cell)
|
||||
old_cell.add_fingerprint(U)
|
||||
old_cell.corrupt()
|
||||
old_cell.updateicon()
|
||||
S.cell = A
|
||||
U << "\blue Upgrade complete. Maximum capacity: <b>[round(S.cell.charge/100)]</b>%"
|
||||
else
|
||||
U << "\red Procedure interrupted. Protocol terminated."
|
||||
else
|
||||
U << "\red The exosuit's battery has run dry of power. You must find another source."
|
||||
if(A.charge)
|
||||
if (G.candrain&&do_after(U,30))
|
||||
U << "\blue Gained <B>[A.charge]</B> energy from the cell."
|
||||
if(S.cell.charge+A.charge>S.cell.maxcharge)
|
||||
S.cell.charge=S.cell.maxcharge
|
||||
else
|
||||
S.cell.charge+=A.charge
|
||||
A.charge = 0
|
||||
G.draining = 0
|
||||
A.corrupt()
|
||||
A.updateicon()
|
||||
else
|
||||
U << "\red Procedure interrupted. Protocol terminated."
|
||||
else
|
||||
U << "\red This cell is empty and of no use."
|
||||
|
||||
if("CYBORG")
|
||||
var/mob/living/silicon/robot/A = target
|
||||
A << "\red Warning: Unauthorized access through sub-route 12, block C, detected."
|
||||
G.draining = 1
|
||||
if(A.cell&&A.cell.charge)
|
||||
while(G.candrain&&A.cell.charge>0&&!maxcapacity)
|
||||
drain = rand(G.mindrain,G.maxdrain)
|
||||
if(A.cell.charge<drain)
|
||||
drain = A.cell.charge
|
||||
if(S.charge+drain>S.maxcharge)
|
||||
drain = S.maxcharge-S.charge
|
||||
maxcapacity = 1
|
||||
if (do_after(U,10))
|
||||
A.spark_system.start()
|
||||
playsound(A.loc, "sparks", 50, 1)
|
||||
A.cell.charge-=drain
|
||||
S.charge+=drain
|
||||
totaldrain+=drain
|
||||
else break
|
||||
U << "\blue Gained <B>[totaldrain]</B> energy from [A]."
|
||||
if("MACHINERY")//Can be applied to generically to all powered machinery.
|
||||
var/obj/machinery/A = target
|
||||
if(A.powered())//If powered.
|
||||
|
||||
var/datum/effects/system/spark_spread/spark_system = new /datum/effects/system/spark_spread()
|
||||
spark_system.set_up(5, 0, A.loc)
|
||||
|
||||
var/obj/machinery/power/apc/B = A.loc.loc:get_apc()//Object.turf.area find APC
|
||||
if(B)//If APC exists. Might not if the area is unpowered like CentCom.
|
||||
var/datum/powernet/PN = B.terminal.powernet
|
||||
while(G.candrain&&!maxcapacity&&!isnull(A))//And start a proc similar to drain from wire.
|
||||
drain = rand(G.mindrain,G.maxdrain)
|
||||
var/drained = 0
|
||||
if(PN&&do_after(U,10))
|
||||
drained = min(drain, PN.avail)
|
||||
PN.newload += drained
|
||||
if(drained < drain)//if no power on net, drain apcs
|
||||
for(var/obj/machinery/power/terminal/T in PN.nodes)
|
||||
if(istype(T.master, /obj/machinery/power/apc))
|
||||
var/obj/machinery/power/apc/AP = T.master
|
||||
if(AP.operating && AP.cell && AP.cell.charge>0)
|
||||
AP.cell.charge = max(0, AP.cell.charge - 5)
|
||||
drained += 5
|
||||
else break
|
||||
S.cell.charge += drained
|
||||
if(S.cell.charge>S.cell.maxcharge)
|
||||
totaldrain += (drained-(S.cell.charge-S.cell.maxcharge))
|
||||
S.cell.charge = S.cell.maxcharge
|
||||
maxcapacity = 1
|
||||
else
|
||||
totaldrain += drained
|
||||
spark_system.start()
|
||||
if(drained==0) break
|
||||
U << "\blue Gained <B>[totaldrain]</B> energy from the power network."
|
||||
else
|
||||
U << "\red Power network could not be found. Aborting."
|
||||
else
|
||||
U << "\red Their battery has run dry of power. You must find another source."
|
||||
U << "\red This recharger is not providing energy. You must find another source."
|
||||
|
||||
if("WIRE")
|
||||
var/obj/cable/A = target
|
||||
@@ -738,16 +768,61 @@
|
||||
AP.cell.charge = max(0, AP.cell.charge - 5)
|
||||
drained += 5
|
||||
else break
|
||||
S.charge += drained
|
||||
if(S.charge>S.maxcharge)
|
||||
totaldrain += (drained-(S.charge-S.maxcharge))
|
||||
S.charge = S.maxcharge
|
||||
S.cell.charge += drained
|
||||
if(S.cell.charge>S.cell.maxcharge)
|
||||
totaldrain += (drained-(S.cell.charge-S.cell.maxcharge))
|
||||
S.cell.charge = S.cell.maxcharge
|
||||
maxcapacity = 1
|
||||
else
|
||||
totaldrain += drained
|
||||
S.spark_system.start()
|
||||
if(drained==0) break
|
||||
U << "\blue Gained <B>[totaldrain]</B> energy from the power network."
|
||||
|
||||
if("MECHA")
|
||||
var/obj/mecha/A = target
|
||||
A.occupant_message("\red Warning: Unauthorized access through sub-route 4, block H, detected.")
|
||||
if(A.get_charge())
|
||||
while(G.candrain&&A.cell.charge>0&&!maxcapacity)
|
||||
drain = rand(G.mindrain,G.maxdrain)
|
||||
if(A.cell.charge<drain)
|
||||
drain = A.cell.charge
|
||||
if(S.cell.charge+drain>S.cell.maxcharge)
|
||||
drain = S.cell.maxcharge-S.cell.charge
|
||||
maxcapacity = 1
|
||||
if (do_after(U,10))
|
||||
A.spark_system.start()
|
||||
playsound(A.loc, "sparks", 50, 1)
|
||||
A.cell.use(drain)
|
||||
S.cell.charge+=drain
|
||||
totaldrain+=drain
|
||||
else break
|
||||
U << "\blue Gained <B>[totaldrain]</B> energy from [src]."
|
||||
else
|
||||
U << "\red The exosuit's battery has run dry of power. You must find another source."
|
||||
|
||||
if("CYBORG")
|
||||
var/mob/living/silicon/robot/A = target
|
||||
A << "\red Warning: Unauthorized access through sub-route 12, block C, detected."
|
||||
G.draining = 1
|
||||
if(A.cell&&A.cell.charge)
|
||||
while(G.candrain&&A.cell.charge>0&&!maxcapacity)
|
||||
drain = rand(G.mindrain,G.maxdrain)
|
||||
if(A.cell.charge<drain)
|
||||
drain = A.cell.charge
|
||||
if(S.cell.charge+drain>S.cell.maxcharge)
|
||||
drain = S.cell.maxcharge-S.cell.charge
|
||||
maxcapacity = 1
|
||||
if (do_after(U,10))
|
||||
A.spark_system.start()
|
||||
playsound(A.loc, "sparks", 50, 1)
|
||||
A.cell.charge-=drain
|
||||
S.cell.charge+=drain
|
||||
totaldrain+=drain
|
||||
else break
|
||||
U << "\blue Gained <B>[totaldrain]</B> energy from [A]."
|
||||
else
|
||||
U << "\red Their battery has run dry of power. You must find another source."
|
||||
else//Else nothing :<
|
||||
|
||||
G.draining = 0
|
||||
@@ -806,7 +881,6 @@
|
||||
var/mob/picked = pick(names)
|
||||
voice = picked.real_name
|
||||
usr << "You are now mimicking <B>[voice]</B>."
|
||||
return
|
||||
else
|
||||
if(voice!="Unknown")
|
||||
usr << "You deactivate the voice synthesizer."
|
||||
|
||||
@@ -30,6 +30,11 @@ obj/machinery/recharger
|
||||
|
||||
/obj/machinery/recharger/attack_hand(mob/user as mob)
|
||||
src.add_fingerprint(user)
|
||||
if(ishuman(user))
|
||||
if(istype(user:gloves, /obj/item/clothing/gloves/space_ninja)&&user:gloves:candrain&&!user:gloves:draining)
|
||||
call(/obj/item/clothing/gloves/space_ninja/proc/drain)("MACHINERY",src,user:wear_suit,user:gloves)
|
||||
return
|
||||
|
||||
if (src.charging)
|
||||
src.charging.update_icon()
|
||||
src.charging.loc = src.loc
|
||||
@@ -41,7 +46,6 @@ obj/machinery/recharger
|
||||
src.charging2 = null
|
||||
use_power = 1
|
||||
|
||||
|
||||
/obj/machinery/recharger/attack_paw(mob/user as mob)
|
||||
if ((ticker && ticker.mode.name == "monkey"))
|
||||
return src.attack_hand(user)
|
||||
|
||||
@@ -290,10 +290,8 @@
|
||||
..()
|
||||
var/mob/living/U = usr
|
||||
if (U.contents.Find(src) || U.contents.Find(master) || (istype(loc, /turf) && get_dist(src, U) <= 1))
|
||||
if (U.stat || U.restrained())
|
||||
U << browse(null, "window=pda")
|
||||
return
|
||||
else
|
||||
if ( !(U.stat || U.restrained()) )
|
||||
|
||||
add_fingerprint(U)
|
||||
U.machine = src
|
||||
|
||||
@@ -302,6 +300,7 @@
|
||||
//BASIC FUNCTIONS===================================
|
||||
|
||||
if("Close")//Self explanatory
|
||||
U.machine = null
|
||||
U << browse(null, "window=pda")
|
||||
return
|
||||
if("Refresh")//Refresh, goes to the end of the proc.
|
||||
@@ -316,23 +315,7 @@
|
||||
cartridge.mode = mode
|
||||
cartridge.unlock()
|
||||
if ("Authenticate")//Checks for ID
|
||||
if (id)
|
||||
if (istype(loc, /mob))
|
||||
var/obj/item/W = loc:equipped()
|
||||
var/emptyHand = (W == null)
|
||||
if(emptyHand)
|
||||
id.DblClick()
|
||||
if(!istype(id.loc, /obj/item/device/pda))
|
||||
id = null
|
||||
else
|
||||
id.loc = loc
|
||||
id = null
|
||||
else
|
||||
var/obj/item/I = U.equipped()
|
||||
if (istype(I, /obj/item/weapon/card/id))
|
||||
U.drop_item()
|
||||
I.loc = src
|
||||
id = I
|
||||
id_check(U, 1)
|
||||
if("Eject")//Ejects the cart, only done from hub.
|
||||
if (!isnull(cartridge))
|
||||
var/turf/T = loc
|
||||
@@ -363,32 +346,28 @@
|
||||
|
||||
if("Light")
|
||||
fon = (!fon)
|
||||
if (contents.Find(src))
|
||||
if (U.contents.Find(src))
|
||||
if (fon)
|
||||
sd_SetLuminosity(U.luminosity + f_lum)
|
||||
U.sd_SetLuminosity(U.luminosity + f_lum)
|
||||
else
|
||||
sd_SetLuminosity(U.luminosity - f_lum)
|
||||
U.sd_SetLuminosity(U.luminosity - f_lum)
|
||||
else
|
||||
sd_SetLuminosity(fon * f_lum)
|
||||
updateUsrDialog()
|
||||
if("Medical Scan")
|
||||
if(scanmode == 1)
|
||||
scanmode = 0
|
||||
else if((!isnull(cartridge)) && (cartridge.access_medical))
|
||||
scanmode = 1
|
||||
updateUsrDialog()//What is this even used for?
|
||||
if("Forensic Scan")
|
||||
if(scanmode == 2)
|
||||
scanmode = 0
|
||||
else if((!isnull(cartridge)) && (cartridge.access_security))
|
||||
scanmode = 2
|
||||
updateUsrDialog()
|
||||
if("Reagent Scan")
|
||||
if(scanmode == 3)
|
||||
scanmode = 0
|
||||
else if((!isnull(cartridge)) && (cartridge.access_reagent_scanner))
|
||||
scanmode = 3
|
||||
updateUsrDialog()
|
||||
if("Honk")
|
||||
if ( !(last_honk && world.time < last_honk + 20) )
|
||||
playsound(loc, 'bikehorn.ogg', 50, 1)
|
||||
@@ -409,10 +388,8 @@
|
||||
toff = !toff
|
||||
if("Toggle Ringer")//If viewing texts then erase them, if not then toggle silent status
|
||||
silent = !silent
|
||||
updateUsrDialog()
|
||||
if("Clear")//Clears messages
|
||||
tnote = null
|
||||
updateUsrDialog()
|
||||
if("Ringtone")
|
||||
var/t = input(U, "Please enter new ringtone", name, ttone) as text
|
||||
if (in_range(src, U) && loc == U)
|
||||
@@ -448,7 +425,7 @@
|
||||
MS.send_pda_message("[P.owner]","[owner]","[t]")
|
||||
|
||||
tnote += "<i><b>→ To [P.owner]:</b></i><br>[t]<br>"
|
||||
P.tnote += "<i><b>← From <a href='byond://?src=\ref[P];editnote=\ref[src]'>[owner]</a>:</b></i><br>[t]<br>"
|
||||
P.tnote += "<i><b>← From <a href='byond://?src=\ref[P];choice=Message;target=\ref[src]'>[owner]</a>:</b></i><br>[t]<br>"
|
||||
|
||||
if (prob(15)) //Give the AI a chance of intercepting the message
|
||||
for (var/mob/living/silicon/ai/A in world)
|
||||
@@ -462,14 +439,13 @@
|
||||
P.overlays = null
|
||||
P.overlays += image('pda.dmi', "pda-r")
|
||||
if("Send Honk")//Honk virus
|
||||
if(istype(cartridge, /obj/item/weapon/cartridge/clown))
|
||||
var/obj/item/device/pda/P = locate(href_list["target"])
|
||||
if(istype(cartridge, /obj/item/weapon/cartridge/clown))//Cartridge checks are kind of unnecessary since everything is done through switch.
|
||||
var/obj/item/device/pda/P = locate(href_list["target"])//Leaving it alone in case it may do something useful, I guess.
|
||||
if(!isnull(P))
|
||||
if (!P.toff && cartridge:honk_charges > 0)
|
||||
cartridge:honk_charges--
|
||||
U.show_message("\blue Virus sent!", 1)
|
||||
P.honkamt = (rand(15,20))
|
||||
updateUsrDialog()
|
||||
else
|
||||
U << "PDA not found."
|
||||
else
|
||||
@@ -484,7 +460,6 @@
|
||||
U.show_message("\blue Virus sent!", 1)
|
||||
P.silent = 1
|
||||
P.ttone = "silence"
|
||||
updateUsrDialog()
|
||||
else
|
||||
U << "PDA not found."
|
||||
else
|
||||
@@ -507,7 +482,6 @@
|
||||
if(uplink)
|
||||
uplink.active = 0
|
||||
note = uplink.orignote
|
||||
updateUsrDialog()
|
||||
if("Detonate")//Detonate PDA
|
||||
if(istype(cartridge, /obj/item/weapon/cartridge/syndicate))
|
||||
var/obj/item/device/pda/P = locate(href_list["target"])
|
||||
@@ -535,10 +509,10 @@
|
||||
else
|
||||
U.show_message("\blue Success!", 1)
|
||||
P.explode()
|
||||
updateUsrDialog()
|
||||
else
|
||||
U << "PDA not found."
|
||||
else
|
||||
U.machine = null
|
||||
U << browse(null, "window=pda")
|
||||
return
|
||||
|
||||
@@ -548,19 +522,61 @@
|
||||
mode = text2num(href_list["choice"])
|
||||
cartridge.mode = mode
|
||||
cartridge.unlock()
|
||||
else//If can't interact.
|
||||
U.machine = null
|
||||
U << browse(null, "window=pda")
|
||||
return
|
||||
else//If not in range or not using the pda.
|
||||
U.machine = null
|
||||
U << browse(null, "window=pda")
|
||||
return
|
||||
|
||||
//EXTRA FUNCTIONS===================================
|
||||
|
||||
if (mode == 2||mode == 21)
|
||||
if (mode == 2||mode == 21)//To clear message overlays.
|
||||
overlays = null
|
||||
|
||||
if ((honkamt > 0) && (prob(60)))
|
||||
if ((honkamt > 0) && (prob(60)))//For clown virus.
|
||||
honkamt--
|
||||
playsound(loc, 'bikehorn.ogg', 30, 1)
|
||||
|
||||
for (var/mob/M in viewers(1, loc))
|
||||
if (M.client && M.machine == src)
|
||||
attack_self(M)
|
||||
if(U.machine == src)//Final safety.
|
||||
attack_self(U)//It auto-closes the menu prior if the user is not in range and so on.
|
||||
else
|
||||
U.machine = null
|
||||
U << browse(null, "window=pda")
|
||||
return
|
||||
|
||||
/obj/item/device/pda/proc/id_check(mob/user as mob, choice as num)//To check for IDs; 1 for in-pda use, 2 for out of pda use.
|
||||
if(choice == 1)
|
||||
if (id)
|
||||
if (istype(loc, /mob))
|
||||
var/obj/item/W = loc:equipped()
|
||||
var/emptyHand = (W == null)
|
||||
if(emptyHand)
|
||||
id.DblClick()
|
||||
if(!istype(id.loc, /obj/item/device/pda))
|
||||
id = null
|
||||
else
|
||||
id.loc = loc
|
||||
id = null
|
||||
else
|
||||
var/obj/item/I = user.equipped()
|
||||
if (istype(I, /obj/item/weapon/card/id))
|
||||
user.drop_item()
|
||||
I.loc = src
|
||||
id = I
|
||||
else
|
||||
var/obj/item/weapon/card/I = user.equipped()
|
||||
if(id)//Get id and replace it.
|
||||
user.drop_item()
|
||||
I.loc = src
|
||||
user.put_in_hand(id)
|
||||
id = I
|
||||
else//Insert id.
|
||||
user.drop_item()
|
||||
I.loc = src
|
||||
id = I
|
||||
return
|
||||
|
||||
// access to status display signals
|
||||
@@ -570,34 +586,30 @@
|
||||
user.drop_item()
|
||||
C.loc = src
|
||||
user << "\blue You insert [C] into [src]."
|
||||
src.cartridge = C
|
||||
cartridge = C
|
||||
if (C:radio)
|
||||
C:radio.hostpda = src
|
||||
src.updateUsrDialog()
|
||||
updateUsrDialog()
|
||||
|
||||
else if (istype(C, /obj/item/weapon/card/id) && C:registered)
|
||||
if(!src.owner)
|
||||
src.owner = C:registered
|
||||
src.ownjob = C:assignment
|
||||
src.name = "PDA-[src.owner] ([src.ownjob])"
|
||||
if(!owner)
|
||||
owner = C:registered
|
||||
ownjob = C:assignment
|
||||
name = "PDA-[owner] ([ownjob])"
|
||||
user << "\blue Card scanned."
|
||||
src.updateSelfDialog()
|
||||
return
|
||||
if(!(src.owner == C:registered))
|
||||
user << "\blue Name on card does not match registered name. Please try again."
|
||||
src.updateSelfDialog()
|
||||
return
|
||||
if((src.owner == C:registered) && (src.ownjob == C:assignment))
|
||||
user << "\blue Rank is up to date."
|
||||
src.updateSelfDialog()
|
||||
return
|
||||
if((src.owner == C:registered) && (src.ownjob != C:assignment))
|
||||
src.ownjob = C:assignment
|
||||
src.name = "PDA-[src.owner] ([src.ownjob])"
|
||||
user << "\blue Rank updated."
|
||||
src.updateSelfDialog()
|
||||
return
|
||||
|
||||
else if(alert("Would you like to inert the card or update owner information?",,"Insert","Update")=="Insert")
|
||||
id_check(user, 2)
|
||||
else
|
||||
if(!(owner == C:registered))
|
||||
user << "\blue Name on card does not match registered name. Please try again."
|
||||
else if((owner == C:registered) && (ownjob == C:assignment))
|
||||
user << "\blue Rank is up to date."
|
||||
else if((owner == C:registered) && (ownjob != C:assignment))
|
||||
ownjob = C:assignment
|
||||
name = "PDA-[owner] ([ownjob])"
|
||||
user << "\blue Rank updated."
|
||||
updateSelfDialog()
|
||||
return
|
||||
|
||||
/obj/item/device/pda/attack(mob/C as mob, mob/user as mob)
|
||||
if (istype(C, /mob/living/carbon))
|
||||
|
||||
@@ -495,6 +495,8 @@ Code:
|
||||
..()
|
||||
|
||||
if (usr.stat || usr.restrained() || !in_range(loc, usr))
|
||||
usr.machine = null
|
||||
usr << browse(null, "window=pda")
|
||||
return
|
||||
|
||||
switch(href_list["choice"])
|
||||
@@ -526,15 +528,15 @@ Code:
|
||||
|
||||
if("Send Signal")
|
||||
for(var/obj/item/assembly/r_i_ptank/R in world) //Bomblist stuff
|
||||
if((R.part1.code == src/radio:code) && (R.part1.frequency == src.radio:frequency))
|
||||
if((R.part1.code == src/radio:code) && (R.part1.frequency == radio:frequency))
|
||||
bombers += "[key_name(usr)] has activated a radio bomb (Freq: [format_frequency(src.radio:frequency)], Code: [src.radio:code]). Temp = [R.part3.air_contents.temperature-T0C]."
|
||||
spawn( 0 )
|
||||
src.radio:send_signal("ACTIVATE")
|
||||
radio:send_signal("ACTIVATE")
|
||||
return
|
||||
|
||||
if("Signal Frequency")
|
||||
var/new_frequency = sanitize_frequency(src.radio:frequency + text2num(href_list["sfreq"]))
|
||||
src.radio:set_frequency(new_frequency)
|
||||
radio:set_frequency(new_frequency)
|
||||
|
||||
if("Signal Code")
|
||||
radio:code += text2num(href_list["scode"])
|
||||
@@ -550,10 +552,10 @@ Code:
|
||||
post_status("alert", href_list["alert"])
|
||||
if("setmsg1")
|
||||
message1 = input("Line 1", "Enter Message Text", message1) as text|null
|
||||
src.updateSelfDialog()
|
||||
updateSelfDialog()
|
||||
if("setmsg2")
|
||||
message2 = input("Line 2", "Enter Message Text", message2) as text|null
|
||||
src.updateSelfDialog()
|
||||
updateSelfDialog()
|
||||
else
|
||||
post_status(href_list["statdisp"])
|
||||
|
||||
|
||||
@@ -14,11 +14,11 @@
|
||||
/obj/item/weapon/integrated_uplink/proc/print_to_host(var/text)
|
||||
if (isnull(src.hostpda))
|
||||
return
|
||||
src.hostpda.note = text
|
||||
hostpda.note = text
|
||||
|
||||
for (var/mob/M in viewers(1, src.hostpda.loc))
|
||||
if (M.client && M.machine == src.hostpda)
|
||||
src.hostpda.attack_self(M)
|
||||
hostpda.attack_self(M)
|
||||
|
||||
return
|
||||
|
||||
|
||||
@@ -742,6 +742,16 @@ datum
|
||||
materials = list("$metal" = 700, "$glass" = 70)
|
||||
build_path = "/obj/item/weapon/cell/super"
|
||||
|
||||
hyper_cell
|
||||
name = "Hyper-Capacity Power Cell"
|
||||
desc = "A power cell that holds 30000 units of energy"
|
||||
id = "hyper_cell"
|
||||
req_tech = list("powerstorage" = 6, "materials" = 4)
|
||||
reliability_base = 70
|
||||
build_type = PROTOLATHE
|
||||
materials = list("$metal" = 400, "$gold" = 150, "$silver" = 150, "$glass" = 70)
|
||||
build_path = "/obj/item/weapon/cell/hyper"
|
||||
|
||||
////////////////////////////////////////
|
||||
//////////////MISC Boards///////////////
|
||||
////////////////////////////////////////
|
||||
|
||||
@@ -82,7 +82,7 @@ When thinking about new stuff, check here to see if there are any slots unfilled
|
||||
3 | Super-Capacity Cell (20,000), Powersink, PACMAN
|
||||
4 | SUPERPACMAN
|
||||
5 | MRSPACMAN, Super Capacitor
|
||||
6 |
|
||||
6 | Hyper-Capacity Cell (30,000)
|
||||
7 |
|
||||
8 |
|
||||
9 |
|
||||
|
||||
@@ -158,7 +158,7 @@
|
||||
if (timeleft)
|
||||
stat(null, "ETA-[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]")
|
||||
|
||||
if (src.client.statpanel == "Status")
|
||||
if (client.statpanel == "Status")
|
||||
if (src.internal)
|
||||
if (!src.internal.air_contents)
|
||||
del(src.internal)
|
||||
@@ -170,7 +170,7 @@
|
||||
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", round(src.wear_suit:charge/100))
|
||||
stat("Energy Charge", round(wear_suit:cell:charge/100))
|
||||
|
||||
/mob/living/carbon/human/bullet_act(flag, A as obj, var/datum/organ/external/def_zone)
|
||||
var/shielded = 0
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
/mob/proc/Cell()
|
||||
set category = "Admin"
|
||||
set hidden = 1
|
||||
|
||||
@@ -606,9 +606,6 @@
|
||||
/obj/machinery/power/apc/proc/report()
|
||||
return "[area.name] : [equipment]/[lighting]/[environ] ([lastused_equip+lastused_light+lastused_environ]) : [cell? cell.percent() : "N/C"] ([charging])"
|
||||
|
||||
|
||||
|
||||
|
||||
/obj/machinery/power/apc/proc/update()
|
||||
if(operating && !shorted)
|
||||
area.power_light = (lighting > 1)
|
||||
@@ -652,7 +649,6 @@
|
||||
src.updateDialog()
|
||||
// if(APC_WIRE_IDSCAN) nothing happens when you cut this wire, add in something if you want whatever
|
||||
|
||||
|
||||
/obj/machinery/power/apc/proc/mend(var/wireColor)
|
||||
var/wireFlag = APCWireColorToFlag[wireColor]
|
||||
var/wireIndex = APCWireColorToIndex[wireColor] //not used in this function
|
||||
@@ -708,7 +704,6 @@
|
||||
src.aidisabled = 0
|
||||
src.updateDialog()
|
||||
|
||||
|
||||
/obj/machinery/power/apc/Topic(href, href_list)
|
||||
..()
|
||||
if (((in_range(src, usr) && istype(src.loc, /turf))) || ((istype(usr, /mob/living/silicon) && !(src.aidisabled))))
|
||||
@@ -1118,7 +1113,6 @@
|
||||
area.power_change()
|
||||
..()
|
||||
|
||||
|
||||
/obj/machinery/power/apc/proc/shock(mob/user, prb)
|
||||
if(!prob(prb))
|
||||
return 0
|
||||
|
||||
@@ -65,28 +65,8 @@
|
||||
/obj/item/weapon/cell/attack_self(mob/user as mob)
|
||||
src.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:candrain&&!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
|
||||
if(charge)
|
||||
user << "\blue Now charging battery..."
|
||||
G.draining = 1
|
||||
if (G.candrain&&do_after(user,30))
|
||||
U << "\blue Gained <B>[charge]</B> energy from the cell."
|
||||
if(S.charge+charge>S.maxcharge)
|
||||
S.charge=S.maxcharge
|
||||
else
|
||||
S.charge+=charge
|
||||
charge = 0
|
||||
G.draining = 0
|
||||
corrupt()
|
||||
updateicon()
|
||||
else
|
||||
U << "\red Procedure interrupted. Protocol terminated."
|
||||
return
|
||||
else
|
||||
U << "\red This cell is empty and of no use."
|
||||
if(istype(user:gloves, /obj/item/clothing/gloves/space_ninja)&&user:gloves:candrain&&!user:gloves:draining)
|
||||
call(/obj/item/clothing/gloves/space_ninja/proc/drain)("CELL",src,user:wear_suit,user:gloves)
|
||||
return
|
||||
|
||||
//Just because someone gets you occasionally with stun gloves doesn't mean you can put in code to kill everyone who tries to make some.
|
||||
|
||||
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 154 KiB After Width: | Height: | Size: 155 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 5.4 KiB |
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 35 KiB |