Merge pull request #47855 from zxaber/oh_sheet

[s] Fixes a material dupe bug
This commit is contained in:
ShizCalev
2019-11-19 00:22:20 -05:00
committed by GitHub
+4
View File
@@ -315,6 +315,8 @@
amount -= used
if(check)
zero_amount()
for(var/i in custom_materials)
custom_materials[i] = amount * mats_per_stack
update_icon()
update_weight()
return TRUE
@@ -413,6 +415,8 @@
if(!use(amount, TRUE, FALSE))
return FALSE
var/obj/item/stack/F = new type(user? user : drop_location(), amount, FALSE)
for(var/i in F.custom_materials)
custom_materials[i] -= F.custom_materials[i]
. = F
F.copy_evidences(src)
if(user)