Giter Site home page Giter Site logo

minetest-mods / anvil Goto Github PK

View Code? Open in Web Editor NEW
13.0 9.0 19.0 155 KB

Minetest mod providing an anvil with which to repair worn tools

License: GNU General Public License v3.0

Lua 100.00%
minetest mod minetest-mod anvil tool repair intllib i18n

anvil's Introduction

Anvil mod by Sokomine, originally a part of the Cottages mod but extracted to stand alone.

This anvil (and its associated hammer) allows a player to repair worn tools. Place the worn tool in the anvil's inventory and strike it with the hammer to improve its condition.

By default, a hammer can be repaired on the anvil just like any other tool, allowing for infinite recycling of worn tools. Set "anvil_hammer_is_repairable false" to prevent this.

Any tool belonging to the group "not_repaired_by_anvil" can't be repaired at an anvil.

The API function anvil.make_unrepairable(item_name) can be used as a convenience function to add this group to an already-registered tool.

anvil's People

Contributors

berengma avatar coil0 avatar cpyte-engine-developer avatar facedeer avatar fluxionary avatar gabriel1379 avatar hlqkj avatar imre84 avatar josegamestest avatar louisroyer avatar niklp09 avatar ogelgames avatar panquesito7 avatar s-s-x avatar smalljoker avatar swissalps avatar zmv7 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

anvil's Issues

Anvil wear level

I'm thinking of ways to reduce the impact the anvil has on gameplay. I looked at MC and they've solved it partly by having the anvil wear out and crack over time, raising the cost of using them in the longer term. How about that?

Crash, undefined global

You missed a couple of changes to "anvil.setting.item_displacement", at init.lua lines 290 and 328:

2017-06-18 13:49:49: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'anvil' in callback LuaLBM::trigger(): ...ival_World/worldmods/dreambuilder_modpack/anvil/init.lua:328: attempt to perform arithmetic on global 'anvil_item_displacement' (a nil value)
2017-06-18 13:49:49: ERROR[Main]: stack traceback:
2017-06-18 13:49:49: ERROR[Main]:       ...ival_World/worldmods/dreambuilder_modpack/anvil/init.lua:328: in function 'func'
2017-06-18 13:49:49: ERROR[Main]:       /usr/share/minetest/builtin/profiler/instrumentation.lua:106: in function </usr/share/minetest/builtin/profiler/instrumentation.lua:100>

Item duplication: Steel pickaxe

Hey - this is a neat mod! With the low durability of the earlier tools, I've found this mod essential so I don't keep going through loads of picks - and thus loads of resources. However, if I place a steel pickaxe on the anvil, it doesn't leave my inventory - leading to an item duplication glitch! Weirdly I don't have this problem with a steel shovel, for example.

Translation issues

since a few commits ago those message appear in the client console:

2020-03-19 21:42:42: ERROR[Main]: Ignoring empty translation for "@1 cannot be repaired with an anvil."
2020-03-19 21:42:42: ERROR[Main]: Ignoring empty translation for "@1's anvil"
2020-03-19 21:42:42: ERROR[Main]: Ignoring empty translation for "A tool for repairing other tools in conjunction with a blacksmith's hammer."
2020-03-19 21:42:42: ERROR[Main]: Ignoring empty translation for "Right-click on this anvil with a damaged tool to place the damaged tool upon it. You can then repair the damaged tool by striking it with a blacksmith's hammer. Repeated blows may be necessary to fully repair a badly worn to
2020-03-19 21:42:42: ERROR[Main]: ol. To retrieve the tool either punch or right-click the anvil with an empty hand."
2020-03-19 21:42:42: ERROR[Main]: Ignoring empty translation for "Steel blacksmithing hammer"
2020-03-19 21:42:42: ERROR[Main]: Ignoring empty translation for "Use this hammer to strike blows upon an anvil bearing a damaged tool and you can repair it. It can also be used for smashing stone, but it is not well suited to this task."
2020-03-19 21:42:42: ERROR[Main]: Ignoring empty translation for "Your @1 has been repaired successfully."

Improvements

Here's a suggestion in order to do away with the formspec. The mod is halfway there with the floating overlay graphics, but it feels out of place.

If an itemframe-like placement of items on the anvil was possible, it would be clear from afar what item was placed. Players would place an item on the anvil with a right-click, then smash away with the hammer (visually on the actual placed item) until the item was restored. The health of the item could either be displayed as graphics embedded on the anvil, as sign-like text content and/or by playing different sounds according to item health level.

Duplication of objects

This happens when a tool is removed with the right click in a different box

Example:
screenshot_20170421_192427
Placed with right-click from the box 1
screenshot_20170421_192429
When you remove the element from the anvil by selecting box 2, it returns two tools
screenshot_20170421_192441

craft recipe conflict

looks like the hammer recipe is identic to default:sign_wall_steel

Maybe change it to:

XXX steel_ingot steel_ingot
XXX steel_ingot steel_ingot
group:stick XXX steel_ingot

?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.