Files
Bubberstation/code/game/objects/items/implants/implant_krav_maga.dm
MrMelbert 52678d41b5 Everyone is kung fu fighting: Refactors martial arts / You can have multiple martial arts and swap between them (#89840)
## About The Pull Request

Refactors martial arts off the mind. Don't worry the martial arts you
learn still transfer with mindswap

Instead, they are just tracked on a list on the mob, and they also
independently track the datum that created them

This fixes a lot of jank with martial arts, like say, having your krav
maga gloves transfer across slime clones or something...

But it also opens an opportunity: As we track all martial arts
available, I added a verb (ic tab) that lets you swap between the ones
you know


![image](https://github.com/user-attachments/assets/6db1fc14-2859-444b-88ed-773962602f85)

(Some don't let you swap like that one brain trauma)

## Why It's Good For The Game

Aforementioned fixes a lot of jank

Recently martial arts have just been up and disappearing and this was
entirely spurred on by that bug

Probably fixes #84710 (haven't checked) 
Probably fixes #89247
Probably fixes #89948
Probably fixes #90067

## Changelog

🆑 Melbert
refactor: Refactored martial arts, if you notice any oddities like
managing to know two martial arts at once or having your powers
disappear, report it!
add: If you know multiple martial arts, such as krav maga from gloves
and cqc from a book, you can now swap between them at will via a button
in the IC tab!
/🆑

---------

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2025-03-16 03:16:49 +00:00

42 lines
1.2 KiB
Plaintext

/obj/item/implant/krav_maga
name = "krav maga implant"
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"
/// The martial art style this implant teaches.
var/datum/martial_art/krav_maga/style
/obj/item/implant/krav_maga/get_data()
var/dat = {"<b>Implant Specifications:</b><BR>
<b>Name:</b> Krav Maga Implant<BR>
<b>Life:</b> 4 hours after death of host<BR>
<b>Implant Details:</b> <BR>
<b>Function:</b> Teaches even the clumsiest host the arts of Krav Maga."}
return dat
/obj/item/implant/krav_maga/Initialize(mapload)
. = ..()
style = new(src)
/obj/item/implant/krav_maga/Destroy()
QDEL_NULL(style)
return ..()
/obj/item/implant/krav_maga/activate()
. = ..()
if(isnull(imp_in.mind))
return
if(style.unlearn(imp_in))
return
style.teach(imp_in)
/obj/item/implanter/krav_maga
name = "implanter (krav maga)"
imp_type = /obj/item/implant/krav_maga
/obj/item/implantcase/krav_maga
name = "implant case - 'Krav Maga'"
desc = "A glass case containing an implant that can teach the user the arts of Krav Maga."
imp_type = /obj/item/implant/krav_maga