Stunglove overhaul: part one.

Stun gloves are now made by wiring a pair of gloves, and then attaching a battery- this shows up on the object sprite, but not on your character.
Stungloves use 2500 charge per stun! This means that some low capacity batteries will make useless stungloves.
To get your old inconspicous gloves back, simply cut away the wire and battery.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2439 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
petethegoat@gmail.com
2011-10-29 02:15:50 +00:00
parent c0d8adf42f
commit 7524bca986
12 changed files with 152 additions and 83 deletions
@@ -571,18 +571,24 @@
..()
if(M.gloves && M.gloves.elecgen == 1)//Stungloves. Any contact will stun the alien.
if(M.gloves.uses > 0)
M.gloves.uses--
if (weakened < 5)
weakened = 5
if (stuttering < 5)
stuttering = 5
if (stunned < 5)
stunned = 5
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)
if(M.gloves)
if(M.gloves.cell)
if(M.a_intent == "hurt")//Stungloves. Any contact will stun the alien.
if(M.gloves.cell.charge >= 2500)
M.gloves.cell.charge -= 2500
if (weakened < 5)
weakened = 5
if (stuttering < 5)
stuttering = 5
if (stunned < 5)
stunned = 5
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)
return
else
M << "\red Not enough charge! "
return
switch(M.a_intent)
@@ -351,18 +351,24 @@
..()
if(M.gloves && M.gloves.elecgen == 1)//Stungloves. Any contact will stun the alien.
if(M.gloves.uses > 0)
M.gloves.uses--
if (weakened < 5)
weakened = 5
if (stuttering < 5)
stuttering = 5
if (stunned < 5)
stunned = 5
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)
if(M.gloves)
if(M.gloves.cell)
if(M.a_intent == "hurt")//Stungloves. Any contact will stun the alien.
if(M.gloves.cell.charge >= 2500)
M.gloves.cell.charge -= 2500
if (weakened < 5)
weakened = 5
if (stuttering < 5)
stuttering = 5
if (stunned < 5)
stunned = 5
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)
return
else
M << "\red Not enough charge! "
return
switch(M.a_intent)
@@ -9,20 +9,21 @@
visible_message("\red <B>[M] attempted to touch [src]!</B>")
return 0
if((M.gloves && M.gloves.elecgen == 1))
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>")
if(M.gloves.uses <= 0)
M.gloves.elecgen = 0
visible_message("\red <B>[src] has been touched with the stun gloves by [M]!</B>")
M << "\red Not enough charge! "
return
M.gloves.uses--
var/armorblock = run_armor_check(M.zone_sel.selecting, "energy")
apply_effects(5,5,0,0,5,0,0,armorblock)
visible_message("\red <B>[src] has been touched with the stun gloves by [M]!</B>")
return 1
if(M.gloves)
if(M.gloves.cell)
if(M.a_intent == "hurt")
if(M.gloves.cell.charge >= 2500)
M.gloves.cell.charge -= 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>")
var/armorblock = run_armor_check(M.zone_sel.selecting, "energy")
apply_effects(5,5,0,0,5,0,0,armorblock)
return 1
else
M << "\red Not enough charge! "
visible_message("\red <B>[src] has been touched with the stun gloves by [M]!</B>")
return
switch(M.a_intent)
if("help")
@@ -452,12 +452,18 @@
if(M.gloves && M.gloves.elecgen == 1)//Stungloves. Any contact will stun the alien.
if(M.gloves.uses > 0)
M.gloves.uses--
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)
if(M.gloves)
if(M.gloves.cell)
if(M.a_intent == "hurt")//Stungloves. Any contact will stun the alien.
if(M.gloves.cell.charge >= 2500)
M.gloves.cell.charge -= 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)
return
else
M << "\red Not enough charge! "
return
switch(M.a_intent)
+18 -16
View File
@@ -156,22 +156,24 @@
if (istype(loc, /turf) && istype(loc.loc, /area/start))
M << "No attacking people at spawn, you jackass."
return
if ((M:gloves && M:gloves.elecgen == 1 && M.a_intent == "hurt") /*&& (!istype(src:wear_suit, /obj/item/clothing/suit/judgerobe))*/)
if(M:gloves.uses > 0)
M:gloves.uses--
if (weakened < 5)
weakened = 5
if (stuttering < 5)
stuttering = 5
if (stunned < 5)
stunned = 5
for(var/mob/O in viewers(src, null))
if (O.client)
O.show_message("\red <B>[src] has been touched with the stun gloves by [M]!</B>", 1, "\red You hear someone fall", 2)
else
M:gloves.elecgen = 0
M << "\red Not enough charge! "
return
if(M.gloves)
if(M.gloves.cell)
if(M.a_intent == "hurt")
if(M.gloves.cell.charge >= 2500)
M.gloves.cell.charge -= 2500
if (weakened < 5)
weakened = 5
if (stuttering < 5)
stuttering = 5
if (stunned < 5)
stunned = 5
for(var/mob/O in viewers(src, null))
if (O.client)
O.show_message("\red <B>[src] has been touched with the stun gloves by [M]!</B>", 1, "\red You hear someone fall", 2)
return
else
M << "\red Not enough charge! "
return
if (M.a_intent == "help")
help_shake_act(M)
-19
View File
@@ -62,25 +62,6 @@
..()
return
/obj/item/clothing/gloves/attackby(obj/item/weapon/W, mob/user)
if(istype(W, /obj/item/weapon/cable_coil))
var/obj/item/weapon/cable_coil/C = W
if(!istype(src, /obj/item/clothing/gloves/yellow))
if(!wired)
if(C.amount >= 2)
C.amount -= 2
wired = 1
user << "You wrap some wires around [src]."
else
user << "There is not enough wire to cover [src]."
else
user << "[src] is already wired."
else
..()
return
// the power cable object
/obj/structure/cable/New()
+4 -1
View File
@@ -77,6 +77,8 @@
//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.
/obj/item/weapon/cell/attackby(obj/item/W, mob/user)
..()
//HONK HONK GLOVES NERF -Pete
/*
var/obj/item/clothing/gloves/G = W
if(istype(G))
// var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread
@@ -98,8 +100,9 @@
use(G.uses*1000)
updateicon()
user << "\red These gloves are now electrically charged!"
*/
else if(istype(W, /obj/item/weapon/reagent_containers/syringe))
if(istype(W, /obj/item/weapon/reagent_containers/syringe))
var/obj/item/weapon/reagent_containers/syringe/S = W
user << "You inject the solution into the power cell."