Energy guns now have a visual indicator for if they are set to stun or kill (interestingly, there was existing sprites for it)

Items that have blood cleaned off of them should now properly be able to update their icon. Most notably, this includes energy weapons.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@789 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
n3ophyt3@gmail.com
2011-01-06 15:16:36 +00:00
parent b2daa86680
commit 46ddeb8074
3 changed files with 9 additions and 2 deletions
@@ -953,6 +953,12 @@ obj/item/weapon/gun/revolver/attackby(obj/item/weapon/ammo/a357/A as obj, mob/us
var/ratio = src.charges / maximum_charges
ratio = round(ratio, 0.25) * 100
src.icon_state = text("energy[]", ratio)
overlays = null
switch (mode)
if (1)
overlays += "energykill"
if (2)
overlays += "energystun"
afterattack(atom/target as mob|obj|turf|area, mob/user as mob, flag)
if ((usr.mutations & 16) && prob(50))
@@ -1016,6 +1022,7 @@ obj/item/weapon/gun/revolver/attackby(obj/item/weapon/ammo/a357/A as obj, mob/us
else if (mode == 2)
mode = 1
user << "\blue You set the gun to kill"
update_icon()
attack(mob/M as mob, mob/user as mob)
..()