mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-30 00:29:02 +01:00
Kicks Martial Arts out of the attack chain (yippee), makes it use signals, plus a large clean up of existing martial arts (#81097)
## About The Pull Request - Kicks Martial Arts out of the attack chain. - All Martial Arts attacks are now handled via unarmed attack or grab signals - This means all martial arts are now technically on the living level, allowing any mob that can unarmed attack to martial arts. Sort of. YMMV. - All martial arts block checking is now handled by the arts themselves, meaning you can selectively decide for a martial arts strike to not be blocked. Maybe good for the future. - A comprehensive cleanup of all existing martial arts. Improving var names, code, adding some missing animation calls, etc. Fixes #74829 ## Why It's Good For The Game Untangles the mess that is martial arts, making it a lot easier to work with the attack chain and making it overall a ton more consistent. ## Changelog 🆑 Melbert refactor: Big martial arts refactor, they should now overall act a ton more consistent. Also technically any mob can do martial arts. Let me know if something is funky. /🆑 --------- Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
desc = "Teaches you the arts of Krav Maga in 5 short instructional videos beamed directly into your eyeballs."
|
||||
icon = 'icons/obj/scrolls.dmi'
|
||||
icon_state ="scroll2"
|
||||
var/datum/martial_art/krav_maga/style = new
|
||||
var/datum/martial_art/krav_maga/style
|
||||
|
||||
/obj/item/implant/krav_maga/get_data()
|
||||
var/dat = {"<b>Implant Specifications:</b><BR>
|
||||
@@ -13,17 +13,23 @@
|
||||
<b>Function:</b> Teaches even the clumsiest host the arts of Krav Maga."}
|
||||
return dat
|
||||
|
||||
/obj/item/implant/krav_maga/Initialize(mapload)
|
||||
. = ..()
|
||||
style = new()
|
||||
style.allow_temp_override = FALSE
|
||||
|
||||
/obj/item/implant/krav_maga/Destroy()
|
||||
QDEL_NULL(style)
|
||||
return ..()
|
||||
|
||||
/obj/item/implant/krav_maga/activate()
|
||||
. = ..()
|
||||
var/mob/living/carbon/human/H = imp_in
|
||||
if(!ishuman(H))
|
||||
if(isnull(imp_in.mind))
|
||||
return
|
||||
if(!H.mind)
|
||||
if(style.fully_remove(imp_in))
|
||||
return
|
||||
if(H.mind.has_martialart(MARTIALART_KRAVMAGA))
|
||||
style.remove(H)
|
||||
else
|
||||
style.teach(H,1)
|
||||
|
||||
style.teach(imp_in, TRUE)
|
||||
|
||||
/obj/item/implanter/krav_maga
|
||||
name = "implanter (krav maga)"
|
||||
|
||||
Reference in New Issue
Block a user