From 7aa02108d9f9a226b49c2994d0cdfbb178bb6ab2 Mon Sep 17 00:00:00 2001 From: Eugene Shih Date: Wed, 13 Sep 2023 21:28:32 -0500 Subject: [PATCH 1/2] SM now comes in crates Per issue #7994, quick check for SM shard and crates the order if SM is present in order --- code/controllers/subsystems/trade.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/controllers/subsystems/trade.dm b/code/controllers/subsystems/trade.dm index f7005ef5738..523362fd420 100644 --- a/code/controllers/subsystems/trade.dm +++ b/code/controllers/subsystems/trade.dm @@ -446,7 +446,7 @@ SUBSYSTEM_DEF(trade) var/obj/structure/closet/secure_closet/personal/trade/C var/count_of_all = collect_counts_from(shopList) var/price_for_all = collect_price_for_list(shopList) - if(isnum(count_of_all) && count_of_all > 1) + if((isnum(count_of_all) && count_of_all > 1) || shopList.Find("/obj/machinery/power/supermatter") > -1) C = senderBeacon.drop(/obj/structure/closet/secure_closet/personal/trade) if(is_order) C.locked = TRUE From 16eae66ad1f829ebd5eacfbf4b85f4066f303452 Mon Sep 17 00:00:00 2001 From: Eugene Shih Date: Fri, 15 Sep 2023 12:48:42 -0500 Subject: [PATCH 2/2] Fix for always true find() returns 0 if item is not found, not -1 apparently --- code/controllers/subsystems/trade.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/controllers/subsystems/trade.dm b/code/controllers/subsystems/trade.dm index 523362fd420..764d7bd4bb3 100644 --- a/code/controllers/subsystems/trade.dm +++ b/code/controllers/subsystems/trade.dm @@ -446,7 +446,7 @@ SUBSYSTEM_DEF(trade) var/obj/structure/closet/secure_closet/personal/trade/C var/count_of_all = collect_counts_from(shopList) var/price_for_all = collect_price_for_list(shopList) - if((isnum(count_of_all) && count_of_all > 1) || shopList.Find("/obj/machinery/power/supermatter") > -1) + if((isnum(count_of_all) && count_of_all > 1) || shopList.Find("/obj/machinery/power/supermatter") > 0) C = senderBeacon.drop(/obj/structure/closet/secure_closet/personal/trade) if(is_order) C.locked = TRUE