sanity check

This commit is contained in:
Linzolle
2020-02-13 15:20:01 -06:00
parent 083a6e4c19
commit 790b7bf9cc
2 changed files with 6 additions and 3 deletions

View File

@@ -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

View File

@@ -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)