[enchanting] Update to Git patch 7a01f2f:

https://github.com/AntumMT/mtmod-enchanting/tree/7a01f2f
This commit is contained in:
AntumDeluge 2017-06-27 19:12:50 -07:00
parent d16f05250b
commit 38f21a3590
4 changed files with 11 additions and 10 deletions

View File

@ -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

View File

@ -1,7 +0,0 @@
unused_args = false
allow_defined_top = true
read_globals = {
"minetest",
"default",
}

View File

@ -1,4 +1,3 @@
default
3d_armor?
xdecor?
craft_guide?

View File

@ -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)