#Improving the support for tools

1 messages ยท Page 1 of 1 (latest)

orchid tartan
#

we got hammah textures now

tranquil smelt
orchid tartan
tranquil smelt
#

for the recipe itself it deducts 1 durability off the file for the rod in this example?

orchid tartan
#

dont see why would it be different

#

the hammer gets damaged for making the plates, needed to craft the file too

tranquil smelt
#

wonder how you implemented the durability reduction from recipes, that is all ๐Ÿ™‚

orchid tartan
tranquil smelt
#

code wise

orchid tartan
#

its just a event subscription to pre item craft

#

then checking if the recipe has a tool requirement

#

then find a tool in inventory

#

try to check if enough durability

#

if not just cancel the craft

tranquil smelt
#

I see, what if I cancel the craft, will I get back the dura? ๐Ÿ™ƒ

tranquil smelt
#

๐Ÿ˜„

orchid tartan
#

so real

tranquil smelt
#

ok, scripted ๐Ÿ‘
I was looking into durability recipes in the past (especially for something like grinding wheels/balls or sawblades) - for crafting machines.
Guess in case of handcrafting this is a viable solution ๐Ÿ™‚

orchid tartan
#

with machines if its via slots its prob even easier

tranquil smelt
#

I'll have another look at this on the weekend ๐Ÿ‘

orchid tartan
#

yea

tranquil smelt
#

(basically when recipe finished, move sawblade from output to input, drain 1 dura - because the recipe has to require the tool)

orchid tartan
#

yeah thats mega easy

#

just dont encode the sawblade in the recipe directly

#

and handle it urself

#

via the machines code

tranquil smelt
#

well then the recipe could work without a sawblade - that's my thought ๐Ÿค”

orchid tartan
#

i havent looked at all events/hooks there are

tranquil smelt
#

ye disabled by script shenanigans ๐Ÿ˜„

#

thanks for the input ๐Ÿ‘

#

Greg on! ๐Ÿ™‚