diff --git a/code/__DEFINES/combat.dm b/code/__DEFINES/combat.dm index d219736abe..d12fe77448 100644 --- a/code/__DEFINES/combat.dm +++ b/code/__DEFINES/combat.dm @@ -159,6 +159,9 @@ #define SHOVE_STAGGER_DURATION 35 /// how long they're off balance for #define SHOVE_OFFBALANCE_DURATION 30 +//Shove disarming item list +GLOBAL_LIST_INIT(shove_disarming_types, typecacheof(list( + /obj/item/gun))) //Embedded objects diff --git a/code/datums/status_effects/debuffs.dm b/code/datums/status_effects/debuffs.dm index 1c49f61996..a958d20276 100644 --- a/code/datums/status_effects/debuffs.dm +++ b/code/datums/status_effects/debuffs.dm @@ -108,7 +108,7 @@ /datum/status_effect/off_balance/on_remove() var/active_item = owner.get_active_held_item() - if(active_item) + if(is_type_in_typecache(active_item, GLOB.shove_disarming_types)) owner.visible_message("[owner.name] regains their grip on \the [active_item]!", "You regain your grip on \the [active_item]", null, COMBAT_MESSAGE_RANGE) return ..() diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm index 1aa3749589..c1a797dea0 100644 --- a/code/modules/mob/living/carbon/human/species.dm +++ b/code/modules/mob/living/carbon/human/species.dm @@ -2038,6 +2038,8 @@ GLOBAL_LIST_EMPTY(roundstart_race_names) user, "You shove [target.name]!") target.Stagger(SHOVE_STAGGER_DURATION) var/obj/item/target_held_item = target.get_active_held_item() + if(!is_type_in_typecache(target_held_item, GLOB.shove_disarming_types)) + target_held_item = null if(!target.has_status_effect(STATUS_EFFECT_OFF_BALANCE)) if(target_held_item) if(!HAS_TRAIT(target_held_item, TRAIT_NODROP))