Replaces disarm right click action with tgstation/tgstation#42958 's disarm action, also ports the removal of non-help intent pushing from that same pr

This commit is contained in:
deathride58
2019-03-04 21:05:50 -05:00
parent bf829a2d79
commit d8f738184b
6 changed files with 207 additions and 23 deletions
@@ -892,6 +892,21 @@
. = ..(M,force,check_loc)
stop_pulling()
/mob/living/carbon/human/proc/is_shove_knockdown_blocked() //If you want to add more things that block shove knockdown, extend this
var/list/body_parts = list(head, wear_mask, wear_suit, w_uniform, back, gloves, shoes, belt, s_store, glasses, ears, wear_id) //Everything but pockets. Pockets are l_store and r_store. (if pockets were allowed, putting something armored, gloves or hats for example, would double up on the armor)
for(var/bp in body_parts)
if(istype(bp, /obj/item/clothing))
var/obj/item/clothing/C = bp
if(C.blocks_shove_knockdown)
return TRUE
return FALSE
/mob/living/carbon/human/proc/clear_shove_slowdown()
remove_movespeed_modifier(SHOVE_SLOWDOWN_ID)
var/active_item = get_active_held_item()
if(is_type_in_typecache(active_item, GLOB.shove_disarming_types))
visible_message("<span class='warning'>[src.name] regains their grip on \the [active_item]!</span>", "<span class='warning'>You regain your grip on \the [active_item]</span>", null, COMBAT_MESSAGE_RANGE)
/mob/living/carbon/human/do_after_coefficent()
. = ..()
. *= physiology.do_after_speed
+3
View File
@@ -170,6 +170,9 @@
var/mob/living/L = M
if(L.has_trait(TRAIT_PUSHIMMUNE))
return 1
//If they're a human, and they're not in help intent, block pushing
if(ishuman(M) && (M.a_intent != INTENT_HELP))
return TRUE
//anti-riot equipment is also anti-push
for(var/obj/item/I in M.held_items)
if(!istype(M, /obj/item/clothing))