Skip to content

Commit

Permalink
bugfix: fixed resource exploit for ore redemption (ss220-space#3796)
Browse files Browse the repository at this point in the history
  • Loading branch information
Vladisvell authored and Etrnlmelancholy committed Jan 3, 2024
1 parent f2883ce commit 1c84c36
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion code/modules/mining/machine_redemption.dm
Original file line number Diff line number Diff line change
Expand Up @@ -332,12 +332,14 @@
return FALSE
var/stored = get_num_smeltable_alloy(D)
var/desired = min(amount, stored, MAX_STACK_SIZE)
if(!desired)
return FALSE
materials.use_amount(D.materials, desired)
// Spawn the alloy
var/result = new D.build_path(src)
if(istype(result, /obj/item/stack))
var/obj/item/stack/A = result
A.amount = amount
A.amount = desired
unload_mineral(A)
else
unload_mineral(result)
Expand Down

0 comments on commit 1c84c36

Please sign in to comment.