Skip to content

Commit

Permalink
Merge pull request #3529 from X0-11/melee-fix
Browse files Browse the repository at this point in the history
a different approach to fixing melee strikes
  • Loading branch information
BDpuffy420 authored Feb 2, 2024
2 parents eaed241 + 967515b commit aa71799
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions code/modules/halo/misc/melee_strikes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -31,24 +31,24 @@

/obj/item/New()
if(melee_strikes)
melee_strikes += null //Purposefully added, so the stance-switch system can allow you to switch to no-stance for lunges and such.
for(var/type in melee_strikes)
if(isnull(type))
continue
var/strike = new type
melee_strikes -= type
melee_strikes += strike
melee_strikes += null //Purposefully added, so the stance-switch system can allow you to switch to no-stance for lunges and such.
. = ..()

/obj/item/proc/has_melee_strike(var/mob/user)
if(isnull(melee_strikes) || melee_strikes.len == 0)
if(isnull(melee_strikes))
return null
if(isnull(melee_strike))
melee_strike = melee_strikes[1]
if(!isnull(melee_strike))
melee_strike.strike_active(user)

return 1
return melee_strike

/obj/item/proc/verb_swap_stances()
set name = "Swap Stances"
Expand Down

0 comments on commit aa71799

Please sign in to comment.