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
+8 -2
View File
@@ -7,11 +7,14 @@
protective_temperature = 400
heat_transfer_coefficient = 0.25
siemens_coefficient = 0.50
var/elecgen = 0
var/uses = 0
// var/elecgen = 0 //WHAT THE FUCK IS THIS SHIT OH GOD WHY ;-;
// var/uses = 0 //NOPE NOPE NOPE NOPE
var/wired = 0
var/obj/item/weapon/cell/cell = 0
body_parts_covered = HANDS
//(CAPS IS CRUISE CONTROL FOR COOL AS WE ALL KNOW)
/obj/item/clothing/gloves/white
name = "White Gloves"
desc = "These look pretty fancy."
@@ -92,6 +95,8 @@
var/mindrain = 200
var/maxdrain = 400
//BEEP BEEP IT'S THE COMMENT BRIGADE -Pete
/*
/obj/item/clothing/gloves/stungloves/
name = "Stungloves"
desc = "These gloves are electrically charged."
@@ -100,6 +105,7 @@
siemens_coefficient = 0.30
elecgen = 1
uses = 10
*/
/obj/item/clothing/gloves/yellow
desc = "These gloves are electrically insulated."
@@ -0,0 +1,47 @@
/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(!wired)
if(C.amount >= 2)
C.amount -= 2
wired = 1
user << "You wrap some wires around [src]."
update_icon()
else
user << "There is not enough wire to cover [src]."
else
user << "[src] are already wired."
else if(istype(W, /obj/item/weapon/cell))
if(!wired)
user << "[src] need to be wired first."
else if(!cell)
user.drop_item()
W.loc = src
cell = W
user << "You attach a cell to [src]."
update_icon()
else
user << "[src] already have a cell."
else if(istype(W, /obj/item/weapon/wirecutters))
if(cell)
user << "You cut the cell away from [src]."
cell.loc = get_turf(src.loc)
cell = 0
update_icon()
return
if(wired) //wires disappear into the void because fuck that shit
user << "You cut the wires away from [src]."
wired = 0
update_icon()
..()
return
/obj/item/clothing/gloves/update_icon() //beep beep this'll probably break everything
..()
overlays = null
if(wired)
overlays += "gloves_wire"
if(cell)
overlays += "gloves_cell"
@@ -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."
+11 -1
View File
@@ -39,7 +39,7 @@
<tr>
<td valign='top'>
<b>Credits: </b><br>
<font size='2'><b>Coders:</b> TLE, NEO, Errorage, muskets, veryinky, Skie, Noise, Numbers, Agouri, Noka, Urist McDorf, Uhangi, Darem, Mport, rastaf0, Doohl, Superxpdude, Rockdtben, ConstantA<br></font>
<font size='2'><b>Coders:</b> TLE, NEO, Errorage, muskets, veryinky, Skie, Noise, Numbers, Agouri, Noka, Urist McDorf, Uhangi, Darem, Mport, rastaf0, Doohl, Superxpdude, Rockdtben, ConstantA, Petethegoat<br></font>
<font size='2'><b>Spriters:</b> Agouri, Cheridan, Cruazy Guest, Deeaych, Deuryn, Matty406, Microwave, ShiftyEyesShady, Skie, Uhangi, Veyveyr, Petethegoat<br></font>
<font size='2'><b>Sounds:</b> Skie, Lasty<br></font>
<font size='2'><b>Thanks to:</b> CDK Station devs, GoonStation devs, the original SpaceStation developers and Erikat for the title image</font>
@@ -54,6 +54,16 @@ Stuff which is in development and not yet visible to players or just code relate
(ie. code improvements for expandability, etc.) should not be listed here. They
should be listed in the changelog upon commit tho. Thanks. -->
<b><font color='blue'>29 October 2011</font><b>
<ul>
<li><b>Petethegoat updated:</b>
<ul>
<li>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 <i>useless</i> stungloves. To get your old inconspicous gloves back, simply cut away the wire and battery. <b>Yet to come:</b> insulated gloves losing their insulative properties when wired, and stungloves taking extra damage from shocked doors.</li>
</ul>
</li>
</ul>
<b><font color='blue'>27 October 2011</font><b>
<ul>
<li><b>Mport updated:</b>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

+1
View File
@@ -627,6 +627,7 @@
#include "code\game\objects\items\weapons\plant_bag.dm"
#include "code\game\objects\items\weapons\RCD.dm"
#include "code\game\objects\items\weapons\RSF.dm"
#include "code\game\objects\items\weapons\stungloves.dm"
#include "code\game\objects\items\weapons\surgery_tools.dm"
#include "code\game\objects\items\weapons\swords_axes_etc.dm"
#include "code\game\objects\items\weapons\table_rack_parts.dm"