mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-01-05 23:11:52 +00:00
Cell.use checks instead of just minuses. Yay for code!
This commit is contained in:
@@ -109,7 +109,7 @@ Not sure why this would be useful (it's not) but whatever. Ninjas need their smo
|
||||
playsound(U.loc, 'sound/effects/EMPulse.ogg', 60, 2)
|
||||
empulse(U, 2, 3) //Procs sure are nice. Slightly weaker than wizard's disable tch.
|
||||
s_coold = 2
|
||||
cell.charge-=(C*10)
|
||||
cell.use(C*10)
|
||||
return
|
||||
|
||||
//=======//ENERGY BLADE//=======//
|
||||
@@ -129,7 +129,7 @@ Not sure why this would be useful (it's not) but whatever. Ninjas need their smo
|
||||
spark_system.start()
|
||||
playsound(U.loc, "sparks", 50, 1)
|
||||
U.put_in_hands(W)
|
||||
cell.charge-=(C*10)
|
||||
cell.use(C*10)
|
||||
else
|
||||
U << "\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.
|
||||
@@ -173,7 +173,7 @@ This could be a lot better but I'm too tired atm.*/
|
||||
A.current = curloc
|
||||
A.yo = targloc.y - curloc.y
|
||||
A.xo = targloc.x - curloc.x
|
||||
cell.charge-=(C*100)// Ninja stars now cost 100 energy, stil la fair chunk to avoid spamming, will run out of power quickly if used 3 or more times
|
||||
cell.use(C*100)// Ninja stars now cost 100 energy, stil la fair chunk to avoid spamming, will run out of power quickly if used 3 or more times
|
||||
A.process()
|
||||
else
|
||||
U << "\red There are no targets in view."
|
||||
@@ -210,7 +210,7 @@ Must right click on a mob to activate.*/
|
||||
E.master = U
|
||||
spawn(0)//Parallel processing.
|
||||
E.process(M)
|
||||
cell.charge-=(C*100) // Nets now cost what should be most of a standard battery, since your taking someone out of the round
|
||||
cell.use(C*100) // Nets now cost what should be most of a standard battery, since your taking someone out of the round
|
||||
else
|
||||
U << "They are already trapped inside an energy net."
|
||||
else
|
||||
|
||||
@@ -520,7 +520,10 @@ ________________________________________________________________________________
|
||||
if(damage>1)//So they don't spam it when energy is a factor.
|
||||
spark_system.start()//SPARKS THERE SHALL BE SPARKS
|
||||
U.electrocute_act(damage, src,0.1,1)//The last argument is a safety for the human proc that checks for gloves.
|
||||
cell.charge -= damage
|
||||
if(cell.charge < damage)
|
||||
cell.use(cell.charge)
|
||||
else
|
||||
cell.use(damage)
|
||||
else
|
||||
A << "\red <b>ERROR</b>: \black Not enough energy remaining."
|
||||
|
||||
|
||||
@@ -21,8 +21,9 @@
|
||||
|
||||
/obj/machinery/floodlight/process()
|
||||
if(on)
|
||||
cell.charge -= use
|
||||
if(cell.charge <= 0)
|
||||
if(cell.charge >= use)
|
||||
cell.use(use)
|
||||
else
|
||||
on = 0
|
||||
updateicon()
|
||||
SetLuminosity(0)
|
||||
|
||||
Reference in New Issue
Block a user