minetest-mods / xdecor

A decoration mod for Minetest meant to be light, simple and well-featured
Other
29 stars 46 forks source link

Add Method for Other Mods to Check if Items are Repairable #147

Closed AntumDeluge closed 3 years ago

AntumDeluge commented 3 years ago

Exposes workbench.repairable method via xdecor.workbench_repairable to mods so they can use it to check if an item is repairable.

Adds xdecor:is_repairable method for mods to check if an item is repairable with workbench.

SmallJoker commented 3 years ago

How about adding an API function instead? Complementary for xdecor:register_repairable, a xdecor:is_repairable could be added to not expose an internal table. That'll also ease maintenance and code cleanups, if it ever happens.

AntumDeluge commented 3 years ago

@SmallJoker Good point, not sure why I didn't do it that way. I think because I forked a version of the workbench & made it work similarly to that & thought it would be easier. I'll get it fixed.

I'm sorry, I'm working on so many different things that I forget what I have already done. I'll get this fixed.

AntumDeluge commented 3 years ago

Let me know if that is good.