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
+2
View File
@@ -24,6 +24,8 @@
var/can_flashlight = 0
var/scan_reagents = 0 //Can the wearer see reagents while it's equipped?
var/blocks_shove_knockdown = FALSE //Whether wearing the clothing item blocks the ability for shove to knock down.
var/clothing_flags = NONE
//Var modification - PLEASE be careful with this I know who you are and where you live
+2 -1
View File
@@ -110,13 +110,14 @@
/obj/item/clothing/suit/armor/riot
name = "riot suit"
desc = "A suit of semi-flexible polycarbonate body armor with heavy padding to protect against melee attacks."
desc = "A suit of semi-flexible polycarbonate body armor with heavy padding to protect against melee attacks. Helps the wearer resist shoving in close quarters."
icon_state = "riot"
item_state = "swat_suit"
body_parts_covered = CHEST|GROIN|LEGS|FEET|ARMS|HANDS
cold_protection = CHEST|GROIN|LEGS|FEET|ARMS|HANDS
heat_protection = CHEST|GROIN|LEGS|FEET|ARMS|HANDS
armor = list("melee" = 50, "bullet" = 10, "laser" = 10, "energy" = 10, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 80)
blocks_shove_knockdown = TRUE
strip_delay = 80
equip_delay_other = 60
@@ -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))