diff --git a/code/_onclick/other_mobs.dm b/code/_onclick/other_mobs.dm index 30e6883d24..6ee7d51091 100644 --- a/code/_onclick/other_mobs.dm +++ b/code/_onclick/other_mobs.dm @@ -91,6 +91,8 @@ var/obj/item/clothing/gloves/G = gloves if(istype(G) && G.Touch(A,0)) // for magic gloves return + if (istype(glasses) && glasses.ranged_attack(src,A,mouseparams)) + return for(var/datum/mutation/human/HM in dna.mutations) HM.on_ranged_attack(src, A, mouseparams) diff --git a/code/modules/clothing/glasses/_glasses.dm b/code/modules/clothing/glasses/_glasses.dm index 1a178158d8..a80cf6fba3 100644 --- a/code/modules/clothing/glasses/_glasses.dm +++ b/code/modules/clothing/glasses/_glasses.dm @@ -54,6 +54,9 @@ H.blur_eyes(5) eyes.applyOrganDamage(5) +/obj/item/clothing/glasses/proc/ranged_attack(mob/living/carbon/human/user,atom/A, params) + return FALSE + /obj/item/clothing/glasses/meson name = "optical meson scanner" desc = "Used by engineering and mining staff to see basic structural and terrain layouts through walls, regardless of lighting conditions." diff --git a/code/modules/clothing/glasses/disablerglasses.dm b/code/modules/clothing/glasses/disablerglasses.dm new file mode 100644 index 0000000000..a46e4c8339 --- /dev/null +++ b/code/modules/clothing/glasses/disablerglasses.dm @@ -0,0 +1,15 @@ +/obj/item/clothing/glasses/hud/security/sunglasses/disablers + name = "true stunglasses" + desc = "Made for only the best of shitsec. Wear 'em like you're gonna robust all of those fuckers." + var/beamtype = /obj/item/projectile/beam/disabler //change for adminbus + +/obj/item/clothing/glasses/hud/security/sunglasses/disablers/ranged_attack(mob/living/carbon/human/user,atom/A, params) + user.changeNext_move(CLICK_CD_RANGE) + var/obj/item/projectile/beam/disabler/LE = new beamtype( loc ) + playsound(usr.loc, 'sound/weapons/taser2.ogg', 75, 1) + LE.firer = src + LE.def_zone = user.get_organ_target() + LE.preparePixelProjectile(A, src, params) + LE.fire() + return TRUE + //shamelessly copied \ No newline at end of file diff --git a/tgstation.dme b/tgstation.dme index 252cd8ab3e..d92fbff5d9 100755 --- a/tgstation.dme +++ b/tgstation.dme @@ -1599,6 +1599,7 @@ #include "code\modules\clothing\clothing.dm" #include "code\modules\clothing\ears\_ears.dm" #include "code\modules\clothing\glasses\_glasses.dm" +#include "code\modules\clothing\glasses\disablerglasses.dm" #include "code\modules\clothing\glasses\engine_goggles.dm" #include "code\modules\clothing\glasses\hud.dm" #include "code\modules\clothing\glasses\phantomthief.dm"