From d4ace6200f0706f1c7e92c62c5099db1398f6d33 Mon Sep 17 00:00:00 2001 From: Poojawa Date: Thu, 27 Sep 2018 08:03:59 -0500 Subject: [PATCH] [s] Fixes ore redemption exploit (#40454) * Fixes bluespace crystal memes * Generalizes refined type check * generalizes here as well * Now now, no need to be lazy. * removes duplicate istype check --- code/modules/mining/machine_redemption.dm | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/code/modules/mining/machine_redemption.dm b/code/modules/mining/machine_redemption.dm index ce569ec055b..f3ccc31fcb7 100644 --- a/code/modules/mining/machine_redemption.dm +++ b/code/modules/mining/machine_redemption.dm @@ -52,6 +52,9 @@ var/datum/component/material_container/mat_container = materials.mat_container if (!mat_container) return + + if(O.refined_type == null) + return ore_buffer -= O @@ -179,6 +182,13 @@ if(user.transferItemToLoc(W, src)) inserted_disk = W return TRUE + + var/obj/item/stack/ore/O = W + if(istype(O)) + if(O.refined_type == null) + to_chat(user, "[O] has already been refined!") + return + return ..() /obj/machinery/mineral/ore_redemption/multitool_act(mob/living/user, obj/item/multitool/I)