minetest-mods / anvil

Minetest mod providing an anvil with which to repair worn tools
GNU General Public License v3.0
14 stars 18 forks source link

Add technic to optional depends #24

Closed hlqkj closed 3 years ago

hlqkj commented 3 years ago

The technic exclusions in init.lua#L25 were not working on my game because they were being executed before technic was loaded.

In general, when a mod references another this one should be listed in optional_depends to ensure a correct load order, so I added that (and also on depends.txt since it's still there).

Also, the two checks on init.lua#L285 and 286 are actually useless. I this removed them since there is a dedicated API to do that: anvil.make_unrepairable(). Would be both redundant and bad separation of concerns...

I also suggest to add exclusions for all the other rechargeable technic tools, given that the mod already had some "support" technic items and considering that those tools make a tricky use of the itemstack wear. I can do aspecific PR if appreciated, would've been out of the scope of this one.

hlqkj commented 3 years ago

Done. Thank you for approving this.

hlqkj commented 3 years ago

Sorry all, I did forget to add the different modes of the drills, just fixed that. Hope I didn't forget anything this time :)