Skip to content

Commit

Permalink
QoL: you can on and off your dirslash from MA (#3921)
Browse files Browse the repository at this point in the history
  • Loading branch information
ROdenFL authored Nov 24, 2023
1 parent 862cf09 commit 0cccda1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions code/modules/martial_arts/martial.dm
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@
if(make_temporary)
temporary = TRUE
if(has_dirslash)
H.verbs |= /mob/living/carbon/human/proc/dirslash_enabling
H.dirslash_enabled = TRUE
if(temporary)
if(H.mind.martial_art)
Expand All @@ -182,6 +183,7 @@
return
H.mind.martial_art = null // Remove reference
H.verbs -= /mob/living/carbon/human/proc/martial_arts_help
H.verbs -= /mob/living/carbon/human/proc/dirslash_enabling
H.dirslash_enabled = initial(H.dirslash_enabled)
if(base)
base.teach(H)
Expand All @@ -197,6 +199,14 @@
return
H.mind.martial_art.give_explaination(H)

/mob/living/carbon/human/proc/dirslash_enabling()
set name = "Enable/Disable direction slash"
set desc = "If direction slash is enabled, you can attack mobs, by clicking behind their backs"
set category = "Martial Arts"
dirslash_enabled = !dirslash_enabled
to_chat(src, span_notice("Directrion slash is [dirslash_enabled? "enabled" : "disabled"] now."))


/datum/martial_art/proc/give_explaination(user = usr)
explaination_header(user)
explaination_combos(user)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/living_defines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -80,5 +80,5 @@

///if this exists AND the normal sprite is bigger than 32x32, this is the replacement icon state (because health doll size limitations). the icon will always be screen_gen.dmi
var/health_doll_icon

///If mob can attack by choosing direction
var/dirslash_enabled = FALSE

0 comments on commit 0cccda1

Please sign in to comment.