From 1e34269e0c53d2bf5a19491e74b096748d3fffc2 Mon Sep 17 00:00:00 2001 From: robbym Date: Tue, 3 Apr 2018 03:00:01 -0700 Subject: [PATCH] Fixes 0 value not being saved in constant memory circuits (#36867) * Fixes 0 value not being saved in constant memory circuits * Fixes 0 value not being loaded in constant memory circuits * Switched to isnull proc for null checks --- code/modules/integrated_electronics/core/saved_circuits.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/integrated_electronics/core/saved_circuits.dm b/code/modules/integrated_electronics/core/saved_circuits.dm index 1fd3212a82..abb183dfaf 100644 --- a/code/modules/integrated_electronics/core/saved_circuits.dm +++ b/code/modules/integrated_electronics/core/saved_circuits.dm @@ -40,7 +40,7 @@ component_params["inputs"] = saved_inputs var/special = save_special() - if(special) + if(!isnull(special)) component_params["special"] = special return component_params @@ -107,7 +107,7 @@ pin.write_data_to_pin(input_value) // TODO: support for special input types, such as internal refs and maybe typepaths - if(component_params["special"]) + if(!isnull(component_params["special"])) load_special(component_params["special"]) /obj/item/integrated_circuit/proc/load_special(special_data)