From f30f4d8e5b222930c35915f25888a15dd8604977 Mon Sep 17 00:00:00 2001 From: X0-11 Date: Fri, 2 Feb 2024 02:19:56 +0000 Subject: [PATCH] why was i using that proc for this --- code/_onclick/item_attack.dm | 2 +- code/modules/halo/misc/melee_strikes.dm | 7 +++++-- code/modules/halo/weapons/_lunging.dm | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/code/_onclick/item_attack.dm b/code/_onclick/item_attack.dm index f1dfebcc8a58f..c6f70a8f36571 100644 --- a/code/_onclick/item_attack.dm +++ b/code/_onclick/item_attack.dm @@ -26,7 +26,7 @@ avoid code duplication. This includes items that may sometimes act as a standard //I would prefer to rename this to attack(), but that would involve touching hundreds of files. /obj/item/proc/resolve_attackby(atom/A, mob/user, var/click_params) add_fingerprint(user) - if(has_melee_strike(user,1)) + if(has_melee_strike_active()) return melee_strike.do_pre_strike(user,A,src,click_params) return A.attackby(src, user, click_params) diff --git a/code/modules/halo/misc/melee_strikes.dm b/code/modules/halo/misc/melee_strikes.dm index 5d1330dae53f4..dbb969930c299 100644 --- a/code/modules/halo/misc/melee_strikes.dm +++ b/code/modules/halo/misc/melee_strikes.dm @@ -41,13 +41,16 @@ melee_strikes += strike . = ..() -/obj/item/proc/has_melee_strike(var/mob/user,var/skip_firststrike_set) +/obj/item/proc/has_melee_strike_active() + return melee_strike + +/obj/item/proc/has_melee_strike(var/mob/user) if(!melee_strikes || melee_strikes.len == 0) return 0 if(ishuman(user)) var/mob/living/carbon/human/h = user if(src in list(h.l_hand,h.r_hand) && has_melee_strike(user)) - verbs += /obj/item/proc/verb_swap_stances + verbs |= /obj/item/proc/verb_swap_stances else verbs -= /obj/item/proc/verb_swap_stances if(isnull(melee_strike)) diff --git a/code/modules/halo/weapons/_lunging.dm b/code/modules/halo/weapons/_lunging.dm index 9c80d0d3da92c..91682477e2214 100644 --- a/code/modules/halo/weapons/_lunging.dm +++ b/code/modules/halo/weapons/_lunging.dm @@ -62,7 +62,7 @@ /obj/item/afterattack(var/atom/target,var/mob/user,var/is_adjacent,var/click_params) . = ..() - if(has_melee_strike(user,1) && (is_adjacent || (melee_strike.strike_range >= get_dist( get_turf(user),target)))) + if(has_melee_strike_active() && (is_adjacent || (melee_strike.strike_range >= get_dist( get_turf(user),target)))) melee_strike.do_pre_strike(user,target,src,click_params) else do_lunge(target,user,is_adjacent,click_params) \ No newline at end of file