From abd1b97d1097c76f4d448de077ca1fbe03cf1a8e Mon Sep 17 00:00:00 2001 From: Neerti Date: Thu, 9 May 2019 16:39:19 -0400 Subject: [PATCH] Merge pull request #6159 from Heroman3003/youcantcatchme Allows objects to be made uncatchable --- code/game/mecha/equipment/weapons/weapons.dm | 1 + code/game/objects/objs.dm | 1 + code/modules/mob/living/carbon/human/human_defense.dm | 3 +++ 3 files changed, 5 insertions(+) diff --git a/code/game/mecha/equipment/weapons/weapons.dm b/code/game/mecha/equipment/weapons/weapons.dm index 2be7566822..3ea93b6f77 100644 --- a/code/game/mecha/equipment/weapons/weapons.dm +++ b/code/game/mecha/equipment/weapons/weapons.dm @@ -411,6 +411,7 @@ icon_state = "missile" var/primed = null throwforce = 15 + catchable = 0 var/devastation = 0 var/heavy_blast = 1 var/light_blast = 2 diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm index 999b5fca99..520d5cb58b 100644 --- a/code/game/objects/objs.dm +++ b/code/game/objects/objs.dm @@ -7,6 +7,7 @@ var/unacidable = 0 //universal "unacidabliness" var, here so you can use it in any obj. animate_movement = 2 var/throwforce = 1 + var/catchable = 1 // can it be caught on throws/flying? var/sharp = 0 // whether this object cuts var/edge = 0 // whether this object is more likely to dismember var/pry = 0 //Used in attackby() to open doors diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index ad91eb5d96..6bd592aed6 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -477,6 +477,9 @@ emp_act if(temp && !temp.is_usable()) return FALSE // The hand isn't working in the first place + if(!O.catchable) + return FALSE + // Alright, our hand works? Time to try the catching. var/catch_chance = 90 // Default 90% catch rate