Cell.use checks instead of just minuses. Yay for code!

This commit is contained in:
Erthilo
2013-09-01 00:16:11 +01:00
parent f31185e052
commit 5d1c4548fa
9 changed files with 18 additions and 14 deletions
@@ -268,7 +268,7 @@
if(G.cell)
if(M.a_intent == "hurt")//Stungloves. Any contact will stun the alien.
if(G.cell.charge >= 2500)
G.cell.charge -= 2500
G.cell.use(2500)
Weaken(5)
if (stuttering < 5)
@@ -248,7 +248,7 @@
if(G.cell)
if(M.a_intent == "hurt")//Stungloves. Any contact will stun the alien.
if(G.cell.charge >= 2500)
G.cell.charge -= 2500
G.cell.use(2500)
Weaken(5)
if (stuttering < 5)
@@ -22,7 +22,7 @@
if(G.cell)
if(M.a_intent == "hurt")//Stungloves. Any contact will stun the alien.
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>")
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>")
@@ -440,7 +440,7 @@
if(G.cell)
if(M.a_intent == "hurt")//Stungloves. Any contact will stun the alien.
if(G.cell.charge >= 2500)
G.cell.charge -= 2500
G.cell.use(2500)
for(var/mob/O in viewers(src, null))
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)
@@ -229,7 +229,7 @@
if(G.cell)
if(M.a_intent == "hurt")//Stungloves. Any contact will stun the alien.
if(G.cell.charge >= 2500)
G.cell.charge -= 2500
G.cell.use(2500)
Weaken(5)
if (stuttering < 5)
stuttering = 5
@@ -77,7 +77,7 @@
user << "<span class='notice'>[arrow] plinks and crackles as it begins to glow red-hot.</span>"
arrow.throwforce = 15
arrow.icon_state = "metal-rod-superheated"
cell.charge -= 500
cell.use(500)
return
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>"
arrow.throwforce = 15
arrow.icon_state = "metal-rod-superheated"
cell.charge -= 500
cell.use(500)
else
user << "<span class='notice'>[src] already has a cell installed.</span>"