Merge pull request #6507 from Citadel-Station-13/upstream-merge-37375
[MIRROR] fixes cqc working outside chef assigned areas
This commit is contained in:
@@ -20,6 +20,9 @@
|
||||
/datum/martial_art/proc/grab_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
return 0
|
||||
|
||||
/datum/martial_art/proc/can_use(mob/living/carbon/human/H)
|
||||
return TRUE
|
||||
|
||||
/datum/martial_art/proc/add_to_streak(element,mob/living/carbon/human/D)
|
||||
if(D != current_target)
|
||||
current_target = D
|
||||
|
||||
+44
-30
@@ -18,31 +18,40 @@
|
||||
just_a_cook = TRUE
|
||||
|
||||
/datum/martial_art/cqc/proc/drop_restraining()
|
||||
restraining = 0
|
||||
restraining = FALSE
|
||||
|
||||
/datum/martial_art/cqc/can_use(mob/living/carbon/human/H)
|
||||
if(just_a_cook && !(is_type_in_typecache(get_area(H), areas_under_siege)))
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/datum/martial_art/cqc/proc/check_streak(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
if(!can_use(A))
|
||||
return FALSE
|
||||
if(findtext(streak,SLAM_COMBO))
|
||||
streak = ""
|
||||
Slam(A,D)
|
||||
return 1
|
||||
return TRUE
|
||||
if(findtext(streak,KICK_COMBO))
|
||||
streak = ""
|
||||
Kick(A,D)
|
||||
return 1
|
||||
return TRUE
|
||||
if(findtext(streak,RESTRAIN_COMBO))
|
||||
streak = ""
|
||||
Restrain(A,D)
|
||||
return 1
|
||||
return TRUE
|
||||
if(findtext(streak,PRESSURE_COMBO))
|
||||
streak = ""
|
||||
Pressure(A,D)
|
||||
return 1
|
||||
return TRUE
|
||||
if(findtext(streak,CONSECUTIVE_COMBO))
|
||||
streak = ""
|
||||
Consecutive(A,D)
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
/datum/martial_art/cqc/proc/Slam(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
if(!can_use(A))
|
||||
return FALSE
|
||||
if(!D.stat || !D.IsKnockdown())
|
||||
D.visible_message("<span class='warning'>[A] slams [D] into the ground!</span>", \
|
||||
"<span class='userdanger'>[A] slams you into the ground!</span>")
|
||||
@@ -50,9 +59,11 @@
|
||||
D.apply_damage(10, BRUTE)
|
||||
D.Knockdown(120)
|
||||
add_logs(A, D, "cqc slammed")
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/datum/martial_art/cqc/proc/Kick(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
if(!can_use(A))
|
||||
return FALSE
|
||||
if(!D.stat || !D.IsKnockdown())
|
||||
D.visible_message("<span class='warning'>[A] kicks [D] back!</span>", \
|
||||
"<span class='userdanger'>[A] kicks you back!</span>")
|
||||
@@ -67,27 +78,33 @@
|
||||
playsound(get_turf(A), 'sound/weapons/genhit1.ogg', 50, 1, -1)
|
||||
D.SetSleeping(300)
|
||||
D.adjustBrainLoss(15, 150)
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/datum/martial_art/cqc/proc/Pressure(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
if(!can_use(A))
|
||||
return FALSE
|
||||
D.visible_message("<span class='warning'>[A] forces their arm on [D]'s neck!</span>")
|
||||
D.adjustStaminaLoss(60)
|
||||
playsound(get_turf(A), 'sound/weapons/cqchit1.ogg', 50, 1, -1)
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/datum/martial_art/cqc/proc/Restrain(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
if(restraining)
|
||||
return
|
||||
if(!can_use(A))
|
||||
return FALSE
|
||||
if(!D.stat)
|
||||
D.visible_message("<span class='warning'>[A] locks [D] into a restraining position!</span>", \
|
||||
"<span class='userdanger'>[A] locks you into a restraining position!</span>")
|
||||
D.adjustStaminaLoss(20)
|
||||
D.Stun(100)
|
||||
restraining = 1
|
||||
restraining = TRUE
|
||||
addtimer(CALLBACK(src, .proc/drop_restraining), 50, TIMER_UNIQUE)
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/datum/martial_art/cqc/proc/Consecutive(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
if(!can_use(A))
|
||||
return FALSE
|
||||
if(!D.stat)
|
||||
D.visible_message("<span class='warning'>[A] strikes [D]'s abdomen, neck and back consecutively</span>", \
|
||||
"<span class='userdanger'>[A] strikes your abdomen, neck and back consecutively!</span>")
|
||||
@@ -97,15 +114,14 @@
|
||||
A.put_in_hands(I)
|
||||
D.adjustStaminaLoss(50)
|
||||
D.apply_damage(25, BRUTE)
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/datum/martial_art/cqc/grab_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
if(just_a_cook)
|
||||
if(!is_type_in_typecache(get_area(A), areas_under_siege))
|
||||
return 0
|
||||
if(!can_use(A))
|
||||
return FALSE
|
||||
add_to_streak("G",D)
|
||||
if(check_streak(A,D))
|
||||
return 1
|
||||
return TRUE
|
||||
if(A.grab_state >= GRAB_AGGRESSIVE)
|
||||
D.grabbedby(A, 1)
|
||||
else
|
||||
@@ -115,15 +131,14 @@
|
||||
add_logs(A, D, "grabbed", addition="aggressively")
|
||||
A.grab_state = GRAB_AGGRESSIVE //Instant aggressive grab
|
||||
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/datum/martial_art/cqc/harm_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
if(just_a_cook)
|
||||
if(!is_type_in_typecache(get_area(A), areas_under_siege))
|
||||
return 0
|
||||
if(!can_use(A))
|
||||
return FALSE
|
||||
add_to_streak("H",D)
|
||||
if(check_streak(A,D))
|
||||
return 1
|
||||
return TRUE
|
||||
add_logs(A, D, "CQC'd")
|
||||
A.do_attack_animation(D)
|
||||
var/picked_hit_type = pick("CQC'd", "Big Bossed")
|
||||
@@ -146,16 +161,15 @@
|
||||
D.apply_damage(10, BRUTE)
|
||||
D.Knockdown(60)
|
||||
add_logs(A, D, "cqc sweeped")
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/datum/martial_art/cqc/disarm_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
if(just_a_cook)
|
||||
if(!is_type_in_typecache(get_area(A), areas_under_siege))
|
||||
return 0
|
||||
if(!can_use(A))
|
||||
return FALSE
|
||||
add_to_streak("D",D)
|
||||
var/obj/item/I = null
|
||||
if(check_streak(A,D))
|
||||
return 1
|
||||
return TRUE
|
||||
if(prob(65))
|
||||
if(!D.stat || !D.IsKnockdown() || !restraining)
|
||||
I = D.get_active_held_item()
|
||||
@@ -175,13 +189,13 @@
|
||||
D.visible_message("<span class='danger'>[A] puts [D] into a chokehold!</span>", \
|
||||
"<span class='userdanger'>[A] puts you into a chokehold!</span>")
|
||||
D.SetSleeping(400)
|
||||
restraining = 0
|
||||
restraining = FALSE
|
||||
if(A.grab_state < GRAB_NECK)
|
||||
A.grab_state = GRAB_NECK
|
||||
else
|
||||
restraining = 0
|
||||
return 0
|
||||
return 1
|
||||
restraining = FALSE
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/mob/living/carbon/human/proc/CQC_help()
|
||||
set name = "Remember The Basics"
|
||||
|
||||
Reference in New Issue
Block a user