From 26724e002b0fd8792ba69cf4974cff5146866ecb Mon Sep 17 00:00:00 2001 From: Bone White Date: Tue, 17 Jun 2014 20:08:51 +0100 Subject: [PATCH] Shock Gloves fix Two separate changes were required. 1) commenting out the (assumedly bad) re-declaration of RangedAttack in other_mobs.dm and 2) moving the line "if(!mutations.len) return" BELOW the power glove line. This means people without powers can use the gloves also. It's tested as working, but I haven't tested to see if it's broken any other ranged attacks due to what I changed. You may want to text xeno projectiles etc and anything else that uses RangedAttack. --- code/_onclick/click.dm | 3 ++- code/_onclick/other_mobs.dm | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm index 715b8eda90e..17ee4689026 100644 --- a/code/_onclick/click.dm +++ b/code/_onclick/click.dm @@ -167,9 +167,9 @@ animals lunging, etc. */ /mob/proc/RangedAttack(var/atom/A, var/params) - if(!mutations.len) return if(ishuman(src) && (istype(src:gloves, /obj/item/clothing/gloves/yellow/power)) && a_intent == "harm") PowerGlove(A) + if(!mutations.len) return if((M_LASER in mutations) && a_intent == "harm") LaserEyes(A) // moved into a proc below return @@ -302,6 +302,7 @@ var/turf/U = get_turf(A) var/obj/structure/cable/cable = locate() in T if(!cable || !istype(cable)) + src << "No cable" return if(world.time < G.next_shock) src << "[G] aren't ready to shock again!" diff --git a/code/_onclick/other_mobs.dm b/code/_onclick/other_mobs.dm index eceb3659fd2..e4cc4bbcb5e 100644 --- a/code/_onclick/other_mobs.dm +++ b/code/_onclick/other_mobs.dm @@ -20,7 +20,12 @@ /mob/living/carbon/human/RestrainedClickOn(var/atom/A) return + + +// Commented out to prevent overwriting RangedAttack in click.dm ~ Bone White +/* /mob/living/carbon/human/RangedAttack(var/atom/A) + world << "Ranged Attack Start! other_mobs" if(!gloves && !mutations.len) return var/obj/item/clothing/gloves/G = gloves if((M_LASER in mutations) && a_intent == "harm") @@ -41,6 +46,8 @@ return A.attack_tk(src) +*/ + /* Animals & All Unspecified */