From dc7a6ca809d3178a3127b7d423f9ff2e09f1b3bf Mon Sep 17 00:00:00 2001 From: AzuleUtama <44248086+AzuleUtama@users.noreply.github.com> Date: Fri, 30 Nov 2018 11:41:22 +0000 Subject: [PATCH] Fixes ORM Exploit --- code/modules/mining/equipment_locker.dm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/modules/mining/equipment_locker.dm b/code/modules/mining/equipment_locker.dm index c6749528908..11bafb24e26 100644 --- a/code/modules/mining/equipment_locker.dm +++ b/code/modules/mining/equipment_locker.dm @@ -335,6 +335,8 @@ var/datum/design/alloy = files.FindDesignByID(alloy_id) if((check_access(inserted_id) || allowed(usr)) && alloy) var/desired = input("How many sheets?", "How many sheets would you like to smelt?", 1) as null|num + if(desired < 1) // Stops an exploit that lets you build negative alloys and get free materials + return var/smelt_amount = can_smelt_alloy(alloy) var/amount = round(min(desired,50,smelt_amount)) materials.use_amount(alloy.materials, amount)