[Mod] ANVILS

Post Reply
User avatar
bosapara
Member
Posts: 650
Joined: Fri Apr 07, 2017 08:49

[Mod] ANVILS

by bosapara » Post

Image Download | GitHub

adapted vers of MCL2 by Wuzzy's anvil for default minetest

Image

TOOL (crashed) + TOOL (new) = TOOL (12% bonus)
TOOL (crashed) + MATERIAL = TOOL (repaired)

recommend to use it with 'Tool Rank mod'


Can repair (correct) only pickaxe / axe
With shovel / sword / hoe - problems, but if anyone can fix - will be great

____________________________

If you will use Anvil mod, delete or comment this lines at default minetest or moreblocks mod

moreblocks mod: mods\moreblocks\redefinitions.lua
default: games\minetest_game\mods\default\crafting.lua

Code: Select all

Crafting (tool repair)
--
minetest.register_craft({
	type = "toolrepair",
	additional_wear = -0.02,
})
____
________________________


PS For 'code fix' big thanx to JonyQ
Last edited by bosapara on Sun Sep 02, 2018 12:12, edited 3 times in total.

Byakuren
Member
Posts: 818
Joined: Tue Apr 14, 2015 01:59
GitHub: raymoo
IRC: Hijiri
In-game: Raymoo + Clownpiece

Re: [Mod] ANVILS

by Byakuren » Post

Remember that you need to follow the LGPL that MCL2 is licensed under, which I think in this case would just mean reproducing the license in an obvious place.
Every time a mod API is left undocumented, a koala dies.

User avatar
Krock
Developer
Posts: 4716
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

Re: [Mod] ANVILS

by Krock » Post

Byakuren wrote:would just mean reproducing the license in an obvious place.
And also stating the changes which were done. Usually it's git which tracks them, but in this case the new version was uploaded directly in one commit, which makes it impossible to see what was changed.
You should either insert a commit into the history which first only adds the original mod, then your changes afterwards. Otherwise you'll have to create a new file to note the changes plus the date of your changes (information source).
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

User avatar
bosapara
Member
Posts: 650
Joined: Fri Apr 07, 2017 08:49

Re: [Mod] ANVILS

by bosapara » Post

Krock wrote:And also stating the changes which were done. Usually it's git which tracks them, but in this case the new version was uploaded directly in one commit, which makes it impossible to see what was changed.
You should either insert a commit into the history which first only adds the original mod, then your changes afterwards. Otherwise you'll have to create a new file to note the changes plus the date of your changes (information source).
I havent any history, using git only like hosting

User avatar
bosapara
Member
Posts: 650
Joined: Fri Apr 07, 2017 08:49

Re: [Mod] ANVILS

by bosapara » Post

If you will use Anvil mod, delete or comment this lines from default minetest or moreblocks mod

It can prevent cheat with free repair

Image
____________________________

moreblocks mod: mods\moreblocks\redefinitions.lua
default: games\minetest_game\mods\default\crafting.lua

Code: Select all

Crafting (tool repair)
--
minetest.register_craft({
	type = "toolrepair",
	additional_wear = -0.02,
})

User avatar
bosapara
Member
Posts: 650
Joined: Fri Apr 07, 2017 08:49

Re: [Mod] ANVILS

by bosapara » Post

Update
____________________

Added protect to move/put/take stuff to or from anvil (still can be digged without protect mod)

Image

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest