Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

a different approach to fixing melee strikes #3529

Merged
merged 1 commit into from
Feb 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading