From b6ac55c6b8047ee56198d5d51ea4e0dcfc9010bc Mon Sep 17 00:00:00 2001 From: Kashargul <144968721+Kashargul@users.noreply.github.com> Date: Sat, 7 Dec 2024 21:42:15 +0100 Subject: [PATCH 1/3] fix a potential server crash --- code/modules/food/kitchen/smartfridge/engineering.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/food/kitchen/smartfridge/engineering.dm b/code/modules/food/kitchen/smartfridge/engineering.dm index 721f5040dac..ed370ef3fd7 100644 --- a/code/modules/food/kitchen/smartfridge/engineering.dm +++ b/code/modules/food/kitchen/smartfridge/engineering.dm @@ -16,7 +16,7 @@ persistent = /datum/persistent/storage/smartfridge/sheet_storage/lossy /obj/machinery/smartfridge/sheets/accept_check(var/obj/item/O) - return istype(O, /obj/item/stack/material) + return istype(O, /obj/item/stack/material) && !istype(O, /obj/item/stack/material/cyborg) /obj/machinery/smartfridge/sheets/vend(datum/stored_item/stack/I, var/count) var/amount = I.get_amount() @@ -48,4 +48,4 @@ /obj/machinery/smartfridge/sheets/mining/persistent persistent = /datum/persistent/storage/smartfridge/sheet_storage /obj/machinery/smartfridge/sheets/mining/persistent_lossy - persistent = /datum/persistent/storage/smartfridge/sheet_storage/lossy \ No newline at end of file + persistent = /datum/persistent/storage/smartfridge/sheet_storage/lossy From 204c8c3ddbd184cd78e1311d186003b7c5805283 Mon Sep 17 00:00:00 2001 From: Kashargul <144968721+Kashargul@users.noreply.github.com> Date: Sat, 7 Dec 2024 21:55:24 +0100 Subject: [PATCH 2/3] also exclude it here --- code/modules/persistence/storage/smartfridge.dm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/modules/persistence/storage/smartfridge.dm b/code/modules/persistence/storage/smartfridge.dm index 44b5b3abdb2..70e154c9ec2 100644 --- a/code/modules/persistence/storage/smartfridge.dm +++ b/code/modules/persistence/storage/smartfridge.dm @@ -55,6 +55,8 @@ . = list() for(var/obj/item/stack/material/S as anything in L) var/real_path = istext(S) ? text2path(S) : S + if(ispath(real_path, /obj/item/stack/material/cyborg)) + continue if(!ispath(real_path, /obj/item/stack/material)) log_debug("Warning: Sheet_storage persistent datum tried to create [S]") continue From c44f4603c4366e10970c9ae9b1008bdf650e3218 Mon Sep 17 00:00:00 2001 From: Kashargul <144968721+Kashargul@users.noreply.github.com> Date: Sat, 7 Dec 2024 21:56:39 +0100 Subject: [PATCH 3/3] actually log it --- code/modules/persistence/storage/smartfridge.dm | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/code/modules/persistence/storage/smartfridge.dm b/code/modules/persistence/storage/smartfridge.dm index 70e154c9ec2..fd019cfa130 100644 --- a/code/modules/persistence/storage/smartfridge.dm +++ b/code/modules/persistence/storage/smartfridge.dm @@ -55,9 +55,7 @@ . = list() for(var/obj/item/stack/material/S as anything in L) var/real_path = istext(S) ? text2path(S) : S - if(ispath(real_path, /obj/item/stack/material/cyborg)) - continue - if(!ispath(real_path, /obj/item/stack/material)) + if(!ispath(real_path, /obj/item/stack/material) || ispath(real_path, /obj/item/stack/material/cyborg)) log_debug("Warning: Sheet_storage persistent datum tried to create [S]") continue