diff --git a/README.md b/README.md index 67d5cfad..95e100ed 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ The game includes the mods from the default [minetest_game](https://github.com/m * crafting/ * [craftguide][] ([GPL / WTFPL](mods/crafting/craftguide/LICENSE)) -- version: [86a96c3 Git][ver.craftguide] *2017-03-21* ([patched][patch.craftguide]) * [currency][] ([WTFPL][lic.currency]) -- version: [3ee673d Git][ver.currency] *2017-05-18* ([patched][patch.currency]) -* [enchanting][] ([GPL / WTFPL / CC BY-SA-NA][lic.enchanting]) -- version: [13ea31c Git][ver.enchanting] *2016-12-16* +* [enchanting][] ([GPL / WTFPL / CC BY-SA-NA][lic.enchanting]) -- version: [13ea31c Git][ver.enchanting] *2016-12-16* ([patched][patch.enchanting]) * equipment/ * [airtanks][] ([MIT][lic.airtanks]) -- version: [5787956 Git][ver.airtanks] *2017-05-13* * [slingshot][] ([MIT][lic.slingshot] / [CC0][lic.cc0]) -- version: [ef698e8 Git][ver.slingshot] *2017-06-26* @@ -539,6 +539,7 @@ The game includes the mods from the default [minetest_game](https://github.com/m [patch.crops]: https://github.com/AntumMT/mtmod-crops/tree/0c5c649 [patch.currency]: https://github.com/AntumMT/mtmod-currency/tree/9e9b1be [patch.drawers]: https://github.com/AntumMT/mtmod-drawers/tree/a77f809 +[patch.enchanting]: https://github.com/AntumMT/mtmod-enchanting/tree/7a01f2f [patch.ethereal]: https://github.com/AntumMT/mtmod-ethereal/tree/4dd599e [patch.farming_plus]: https://github.com/AntumMT/mtmod-farming_plus/tree/454a443 [patch.gems_encrustable]: https://github.com/AntumMT/mtmod-gems_encrustable/tree/791bff5 diff --git a/mods/enchanting/.luacheckrc b/mods/enchanting/.luacheckrc deleted file mode 100644 index a21bce1f..00000000 --- a/mods/enchanting/.luacheckrc +++ /dev/null @@ -1,7 +0,0 @@ -unused_args = false -allow_defined_top = true - -read_globals = { - "minetest", - "default", -} diff --git a/mods/enchanting/depends.txt b/mods/enchanting/depends.txt index 8da6a024..452e8057 100644 --- a/mods/enchanting/depends.txt +++ b/mods/enchanting/depends.txt @@ -1,4 +1,3 @@ default 3d_armor? xdecor? -craft_guide? diff --git a/mods/enchanting/init.lua b/mods/enchanting/init.lua index 8a30b22f..e652f9e5 100644 --- a/mods/enchanting/init.lua +++ b/mods/enchanting/init.lua @@ -94,6 +94,12 @@ function enchanting.on_put(pos, listname, _, stack) end end +local tool_wear = minetest.settings:get("enable_tool_wear") +if tool_wear == nil then + -- Default is enabled + tool_wear = true +end + function enchanting.fields(pos, _, fields, sender) if not next(fields) or fields.quit then return @@ -108,7 +114,9 @@ function enchanting.fields(pos, _, fields, sender) if mese:get_count() >= mese_cost and minetest.registered_tools[enchanted_tool] then minetest.sound_play("xdecor_enchanting", {to_player=sender:get_player_name(), gain=0.8}) tool:replace(enchanted_tool) - tool:add_wear(orig_wear) + if tool_wear then + tool:add_wear(orig_wear) + end mese:take_item(mese_cost) inv:set_stack("mese", 1, mese) inv:set_stack("tool", 1, tool)