I know that I don't document things too well, true. Sorry for that confusion. Any chance you can write up some documentation on those 3 crafting hooks into the wiki, too?
Bug fix is done

I'll try to write all basic documentation (hooks and classes description)
Although I might need some help in things I don't quite understand (for example JSON)
Ignore json, it is used only for PAK files saving and for some reason it has been exported to Lua, I think by accident

We discussed this with FakeTruth, and we'd like to ask you for your permission to merge this plugin into the Core. It is, after all, a "basic functionality", so it would make sense to have it "out of the box". Also, it would mean SVN versioning for the code

Would you be willing to make this contribution?
Sure thing

Merge!
But leave possibility to set BONUS factor, please)
As of Rev 635 the Fixies plugin source is integrated into Core. No need to download this separate plugin.
I appologize, but seems like you forgot "if fixing items are damaged" check

Here's "fixed" oncraftingnorecipe.lua, and below there's added bit of code:
Code:
if (
(Items[1].m_ItemHealth == 0) or
(Items[2].m_ItemHealth == 0)
)
then
-- Only damaged items may be fixed
return false
end
Cheers

(06-20-2012, 09:41 AM)Taugeshtu Wrote: [ -> ]I appologize, but seems like you forgot "if fixing items are damaged" check 
Here's "fixed" oncraftingnorecipe.lua, and below there's added bit of code:
Code:
if (
(Items[1].m_ItemHealth == 0) or
(Items[2].m_ItemHealth == 0)
)
then
-- Only damaged items may be fixed
return false
end
Cheers 
Your code is wrong. Tools and weapons do not get their health set to 0 when damaged. You need some way of comparing to their values when new.
Oh dear, it seems I didn't use the latest version of Fixies

Sorry for that.
Cedeel, are you sure? I think a newly crafted tool gets health of 0 and each time it is used the value increments, until the tool breaks. So what we're calling "health" is actually "damage". So the code should be okay - if at least one of the items is undamaged, don't let the user repair it.
(06-20-2012, 05:49 PM)xoft Wrote: [ -> ]Oh dear, it seems I didn't use the latest version of Fixies
Sorry for that.
Cedeel, are you sure? I think a newly crafted tool gets health of 0 and each time it is used the value increments, until the tool breaks. So what we're calling "health" is actually "damage". So the code should be okay - if at least one of the items is undamaged, don't let the user repair it.
Awesome, wasn't around the code to check, it just seemed wrong to me
