diff --git a/code/game/jobs/job/support.dm b/code/game/jobs/job/support.dm index 1c72973938f..1564fdc46be 100644 --- a/code/game/jobs/job/support.dm +++ b/code/game/jobs/job/support.dm @@ -166,7 +166,8 @@ H.dna.default_blocks.Add(GLOB.soberblock) H.check_mutations = 1 ADD_TRAIT(H, TRAIT_TABLE_LEAP, ROUNDSTART_TRAIT) - + var/datum/martial_art/judo/under_siege/bouncer_delight = new + bouncer_delight.teach(H) /datum/job/chef diff --git a/code/game/objects/items/weapons/batons.dm b/code/game/objects/items/weapons/batons.dm index 99c93f82aa0..e33b513f58c 100644 --- a/code/game/objects/items/weapons/batons.dm +++ b/code/game/objects/items/weapons/batons.dm @@ -66,7 +66,7 @@ * * user - The attacking user */ /obj/item/melee/classic_baton/proc/baton_knockdown(mob/living/target, mob/living/user) - if(user.mind?.martial_art?.no_baton) + if(user.mind?.martial_art?.no_baton && user.mind?.martial_art?.can_use(user)) to_chat(user, user.mind.martial_art.no_baton_reason) return if(issilicon(target)) diff --git a/code/game/objects/items/weapons/stunbaton.dm b/code/game/objects/items/weapons/stunbaton.dm index a8115cc2f4a..cb84e0d4ec1 100644 --- a/code/game/objects/items/weapons/stunbaton.dm +++ b/code/game/objects/items/weapons/stunbaton.dm @@ -170,7 +170,7 @@ user.visible_message("[user] accidentally hits [user.p_themselves()] with [src]!", "You accidentally hit yourself with [src]!") return - if(user.mind?.martial_art?.no_baton) + if(user.mind?.martial_art?.no_baton && user.mind?.martial_art?.can_use(user)) to_chat(user, user.mind.martial_art.no_baton_reason) return if(issilicon(M)) // Can't stunbaton borgs and AIs diff --git a/code/modules/martial_arts/judo.dm b/code/modules/martial_arts/judo.dm index a1b49e86d8c..7ade349de0e 100644 --- a/code/modules/martial_arts/judo.dm +++ b/code/modules/martial_arts/judo.dm @@ -63,3 +63,33 @@ /datum/martial_art/cqc/explaination_footer(user) to_chat(user, "Your unarmed strikes hit about twice as hard as your peers, on average.") + +/datum/martial_art/judo/under_siege + name = "Professional Bodyguarding" + var/static/list/areas_under_siege = typecacheof(list(/area/crew_quarters/kitchen, /area/crew_quarters/bar)) + +/datum/martial_art/judo/under_siege/teach(mob/living/carbon/human/H, make_temporary) + RegisterSignal(H, COMSIG_AREA_ENTERED, PROC_REF(bar_check)) + return ..() + +/datum/martial_art/judo/under_siege/remove(mob/living/carbon/human/H) + UnregisterSignal(H, COMSIG_AREA_ENTERED) + return ..() + +/datum/martial_art/judo/under_siege/proc/bar_check(mob/living/carbon/human/H, area/entered_area) + SIGNAL_HANDLER + if(!is_type_in_typecache(entered_area, areas_under_siege)) + var/list/held_items = list(H.get_active_hand(), H.get_inactive_hand()) + for(var/obj/item/slapper/parry/smacking_hand in held_items) + qdel(smacking_hand) + can_parry = FALSE + weight = 0 + else + can_parry = TRUE + weight = 5 + +/datum/martial_art/judo/under_siege/can_use(mob/living/carbon/human/H) + var/area/A = get_area(H) + if(!(is_type_in_typecache(A, areas_under_siege))) + return FALSE + return ..()