Fixes ORM Exploit

This commit is contained in:
AzuleUtama
2018-11-30 11:41:22 +00:00
parent f793ba9189
commit dc7a6ca809
+2
View File
@@ -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)