From 790b7bf9cc2b8a3b405efbeab076a50bc31cf9b0 Mon Sep 17 00:00:00 2001 From: Linzolle Date: Thu, 13 Feb 2020 15:20:01 -0600 Subject: [PATCH] sanity check --- .../components/crafting/recipes/recipes_weapon_and_ammo.dm | 2 +- code/modules/projectiles/gun.dm | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/code/datums/components/crafting/recipes/recipes_weapon_and_ammo.dm b/code/datums/components/crafting/recipes/recipes_weapon_and_ammo.dm index 01152e3b30..104b58ca28 100644 --- a/code/datums/components/crafting/recipes/recipes_weapon_and_ammo.dm +++ b/code/datums/components/crafting/recipes/recipes_weapon_and_ammo.dm @@ -10,7 +10,7 @@ /datum/crafting_recipe/pin_removal/check_requirements(mob/user, list/collected_requirements) var/obj/item/gun/G = collected_requirements[/obj/item/gun][1] - if (G.no_pin_required) + if (G.no_pin_required || !G.pin) return FALSE return TRUE diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index f8128452f4..29d31b28fd 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -79,8 +79,11 @@ /obj/item/gun/Initialize() . = ..() - if(pin && !no_pin_required) - pin = new pin(src) + if(pin) + if(no_pin_required) + pin = null + else + pin = new pin(src) if(gun_light) alight = new (src) if(zoomable)