mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 05:30:05 +01:00
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:
@@ -505,6 +505,9 @@ GLOBAL_LIST_INIT(durathread_recipes, list ( \
|
||||
. = ..()
|
||||
. += GLOB.durathread_recipes
|
||||
|
||||
/obj/item/stack/sheet/durathread/on_item_crafted(mob/builder, atom/created)
|
||||
created.set_armor_rating(CONSUME, max(50, created.get_armor_rating(CONSUME)))
|
||||
|
||||
/obj/item/stack/sheet/cotton
|
||||
name = "raw cotton bundle"
|
||||
desc = "A bundle of raw cotton ready to be spun on the loom."
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user