Files
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

24 lines
1.1 KiB
Plaintext

/obj/item/skillchip/job/chef
name = "B0RK-X3 skillchip" // bork bork bork
desc = "This biochip faintly smells of garlic, which is odd for something that is normally wedged inside a user's brain. Consult a dietician before use."
skill_name = "Close Quarters Cooking"
skill_description = "A specialised form of self defence, developed by skilled sous-chef de cuisines. No man fights harder than a chef to defend his kitchen."
skill_icon = "utensils"
activate_message = span_notice("You can visualize how to defend your kitchen with martial arts.")
deactivate_message = span_notice("You forget how to control your muscles to execute kicks, slams and restraints while in a kitchen environment.")
/// The Chef CQC given by the skillchip.
var/datum/martial_art/cqc/under_siege/style
/obj/item/skillchip/job/chef/Initialize(mapload)
. = ..()
style = new(src)
style.refresh_valid_areas()
/obj/item/skillchip/job/chef/on_activate(mob/living/carbon/user, silent = FALSE)
. = ..()
style.teach(user)
/obj/item/skillchip/job/chef/on_deactivate(mob/living/carbon/user, silent = FALSE)
style.unlearn(user)
return ..()