Page 1 of 1
LuaIttemStack.drain/add_durability
Posted: Wed Jul 27, 2016 9:32 pm
by theRustyKnife
I'm sorry to bother again, but it would be really nice to have the functions to add and drain durability of a LuaItemStack, similar to what ammo has. I mean... It's possible to go without it, but it would make things much easier.
I would be ok if you didn't do this since I feel like I'm the only one messing with durability

, but it would be nice.
Thanks TRK
Re: LuaIttemStack.drain/add_durability
Posted: Thu Jul 28, 2016 11:51 am
by aubergine18
Isn't that already implemented?
viewtopic.php?f=65&t=29898
Re: LuaIttemStack.drain/add_durability
Posted: Thu Jul 28, 2016 1:52 pm
by theRustyKnife
Well, it's possible that they implemented this too, but it's not the same suggestion. What I asked before was to expose the durability of an item prototype, whereas here I'm talking about a completely different class (is it actually a class in lua?).
Essentially, I'd like durability to have the same options as ammo has - read/write from/to a stack, read the prototype definition, methods to drain and add to a stack.
But as I said, it's possible (although not too convenient) to work without it, so it's no high priority or anything

.
Re: LuaIttemStack.drain/add_durability
Posted: Thu Jul 28, 2016 10:36 pm
by Rseding91
Added for 0.13.12.