mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-13 03:33:21 +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)
|
playsound(U.loc, 'sound/effects/EMPulse.ogg', 60, 2)
|
||||||
empulse(U, 2, 3) //Procs sure are nice. Slightly weaker than wizard's disable tch.
|
empulse(U, 2, 3) //Procs sure are nice. Slightly weaker than wizard's disable tch.
|
||||||
s_coold = 2
|
s_coold = 2
|
||||||
cell.charge-=(C*10)
|
cell.use(C*10)
|
||||||
return
|
return
|
||||||
|
|
||||||
//=======//ENERGY BLADE//=======//
|
//=======//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()
|
spark_system.start()
|
||||||
playsound(U.loc, "sparks", 50, 1)
|
playsound(U.loc, "sparks", 50, 1)
|
||||||
U.put_in_hands(W)
|
U.put_in_hands(W)
|
||||||
cell.charge-=(C*10)
|
cell.use(C*10)
|
||||||
else
|
else
|
||||||
U << "\red You can only summon one blade. Try dropping an item first."
|
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.
|
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.current = curloc
|
||||||
A.yo = targloc.y - curloc.y
|
A.yo = targloc.y - curloc.y
|
||||||
A.xo = targloc.x - curloc.x
|
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()
|
A.process()
|
||||||
else
|
else
|
||||||
U << "\red There are no targets in view."
|
U << "\red There are no targets in view."
|
||||||
@@ -210,7 +210,7 @@ Must right click on a mob to activate.*/
|
|||||||
E.master = U
|
E.master = U
|
||||||
spawn(0)//Parallel processing.
|
spawn(0)//Parallel processing.
|
||||||
E.process(M)
|
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
|
else
|
||||||
U << "They are already trapped inside an energy net."
|
U << "They are already trapped inside an energy net."
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -520,7 +520,10 @@ ________________________________________________________________________________
|
|||||||
if(damage>1)//So they don't spam it when energy is a factor.
|
if(damage>1)//So they don't spam it when energy is a factor.
|
||||||
spark_system.start()//SPARKS THERE SHALL BE SPARKS
|
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.
|
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
|
else
|
||||||
A << "\red <b>ERROR</b>: \black Not enough energy remaining."
|
A << "\red <b>ERROR</b>: \black Not enough energy remaining."
|
||||||
|
|
||||||
|
|||||||
@@ -21,8 +21,9 @@
|
|||||||
|
|
||||||
/obj/machinery/floodlight/process()
|
/obj/machinery/floodlight/process()
|
||||||
if(on)
|
if(on)
|
||||||
cell.charge -= use
|
if(cell.charge >= use)
|
||||||
if(cell.charge <= 0)
|
cell.use(use)
|
||||||
|
else
|
||||||
on = 0
|
on = 0
|
||||||
updateicon()
|
updateicon()
|
||||||
SetLuminosity(0)
|
SetLuminosity(0)
|
||||||
|
|||||||
@@ -268,7 +268,7 @@
|
|||||||
if(G.cell)
|
if(G.cell)
|
||||||
if(M.a_intent == "hurt")//Stungloves. Any contact will stun the alien.
|
if(M.a_intent == "hurt")//Stungloves. Any contact will stun the alien.
|
||||||
if(G.cell.charge >= 2500)
|
if(G.cell.charge >= 2500)
|
||||||
G.cell.charge -= 2500
|
G.cell.use(2500)
|
||||||
|
|
||||||
Weaken(5)
|
Weaken(5)
|
||||||
if (stuttering < 5)
|
if (stuttering < 5)
|
||||||
|
|||||||
@@ -248,7 +248,7 @@
|
|||||||
if(G.cell)
|
if(G.cell)
|
||||||
if(M.a_intent == "hurt")//Stungloves. Any contact will stun the alien.
|
if(M.a_intent == "hurt")//Stungloves. Any contact will stun the alien.
|
||||||
if(G.cell.charge >= 2500)
|
if(G.cell.charge >= 2500)
|
||||||
G.cell.charge -= 2500
|
G.cell.use(2500)
|
||||||
|
|
||||||
Weaken(5)
|
Weaken(5)
|
||||||
if (stuttering < 5)
|
if (stuttering < 5)
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
if(G.cell)
|
if(G.cell)
|
||||||
if(M.a_intent == "hurt")//Stungloves. Any contact will stun the alien.
|
if(M.a_intent == "hurt")//Stungloves. Any contact will stun the alien.
|
||||||
if(G.cell.charge >= 2500)
|
if(G.cell.charge >= 2500)
|
||||||
G.cell.charge -= 2500
|
G.cell.use(2500)
|
||||||
visible_message("\red <B>[src] has been touched with the stun gloves by [M]!</B>")
|
visible_message("\red <B>[src] has been touched with the stun gloves by [M]!</B>")
|
||||||
M.attack_log += text("\[[time_stamp()]\] <font color='red'>Stungloved [src.name] ([src.ckey])</font>")
|
M.attack_log += text("\[[time_stamp()]\] <font color='red'>Stungloved [src.name] ([src.ckey])</font>")
|
||||||
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been stungloved by [M.name] ([M.ckey])</font>")
|
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been stungloved by [M.name] ([M.ckey])</font>")
|
||||||
|
|||||||
@@ -440,7 +440,7 @@
|
|||||||
if(G.cell)
|
if(G.cell)
|
||||||
if(M.a_intent == "hurt")//Stungloves. Any contact will stun the alien.
|
if(M.a_intent == "hurt")//Stungloves. Any contact will stun the alien.
|
||||||
if(G.cell.charge >= 2500)
|
if(G.cell.charge >= 2500)
|
||||||
G.cell.charge -= 2500
|
G.cell.use(2500)
|
||||||
for(var/mob/O in viewers(src, null))
|
for(var/mob/O in viewers(src, null))
|
||||||
if ((O.client && !( O.blinded )))
|
if ((O.client && !( O.blinded )))
|
||||||
O.show_message("\red <B>[src] has been touched with the stun gloves by [M]!</B>", 1, "\red You hear someone fall.", 2)
|
O.show_message("\red <B>[src] has been touched with the stun gloves by [M]!</B>", 1, "\red You hear someone fall.", 2)
|
||||||
|
|||||||
@@ -229,7 +229,7 @@
|
|||||||
if(G.cell)
|
if(G.cell)
|
||||||
if(M.a_intent == "hurt")//Stungloves. Any contact will stun the alien.
|
if(M.a_intent == "hurt")//Stungloves. Any contact will stun the alien.
|
||||||
if(G.cell.charge >= 2500)
|
if(G.cell.charge >= 2500)
|
||||||
G.cell.charge -= 2500
|
G.cell.use(2500)
|
||||||
Weaken(5)
|
Weaken(5)
|
||||||
if (stuttering < 5)
|
if (stuttering < 5)
|
||||||
stuttering = 5
|
stuttering = 5
|
||||||
|
|||||||
@@ -77,7 +77,7 @@
|
|||||||
user << "<span class='notice'>[arrow] plinks and crackles as it begins to glow red-hot.</span>"
|
user << "<span class='notice'>[arrow] plinks and crackles as it begins to glow red-hot.</span>"
|
||||||
arrow.throwforce = 15
|
arrow.throwforce = 15
|
||||||
arrow.icon_state = "metal-rod-superheated"
|
arrow.icon_state = "metal-rod-superheated"
|
||||||
cell.charge -= 500
|
cell.use(500)
|
||||||
return
|
return
|
||||||
|
|
||||||
if(istype(W, /obj/item/weapon/cell))
|
if(istype(W, /obj/item/weapon/cell))
|
||||||
@@ -91,7 +91,7 @@
|
|||||||
user << "<span class='notice'>[arrow] plinks and crackles as it begins to glow red-hot.</span>"
|
user << "<span class='notice'>[arrow] plinks and crackles as it begins to glow red-hot.</span>"
|
||||||
arrow.throwforce = 15
|
arrow.throwforce = 15
|
||||||
arrow.icon_state = "metal-rod-superheated"
|
arrow.icon_state = "metal-rod-superheated"
|
||||||
cell.charge -= 500
|
cell.use(500)
|
||||||
else
|
else
|
||||||
user << "<span class='notice'>[src] already has a cell installed.</span>"
|
user << "<span class='notice'>[src] already has a cell installed.</span>"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user