Items created from durathread are now 50% more resistant to consuming (#78325)

## About The Pull Request

Title.
This means that a moth can take, on average due to rounding, double the
normal bites from an article of durathread clothing.
This commit is contained in:
Zephyr
2023-09-17 02:28:23 -04:00
committed by GitHub
parent 84501e8e0e
commit ccae3b5dd2
2 changed files with 8 additions and 0 deletions
+5
View File
@@ -401,6 +401,7 @@
if(created)
created.setDir(builder.dir)
on_item_crafted(builder, created)
// Use up the material
use(recipe.req_amount * multiplier)
@@ -431,6 +432,10 @@
return TRUE
/// Run special logic on created items after they've been successfully crafted.
/obj/item/stack/proc/on_item_crafted(mob/builder, atom/created)
return
/obj/item/stack/vv_edit_var(vname, vval)
if(vname == NAMEOF(src, amount))
add(clamp(vval, 1-amount, max_amount - amount)) //there must always be one.