Skip to content

Commit

Permalink
why was i using that proc for this
Browse files Browse the repository at this point in the history
  • Loading branch information
X0-11 committed Feb 2, 2024
1 parent 3928d59 commit f30f4d8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion code/_onclick/item_attack.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
7 changes: 5 additions & 2 deletions code/modules/halo/misc/melee_strikes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion code/modules/halo/weapons/_lunging.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit f30f4d8

Please sign in to comment.