Giter Site home page Giter Site logo

cornernote / bridgetool Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kilarin/bridgetool

0.0 2.0 0.0 130 KB

A Minetest mod that adds a new "bridge tool" that makes placing stone (or glass, earth, or any material) while building a bridge in no-fly mode easy.

Lua 100.00%

bridgetool's Introduction

This mod adds a new "bridge tool" that makes placing stone (or glass, earth, or any material) while building a bridge in no-fly mode easy.

Bridge Tool Version 2.2

The bridge tool has 3 modes that can be switched by left clicking with the tool.

And you can switch the WIDTH of the path built by holding down the SNEAK key and left clicking.

alt text

The inventory image changes with the mode indicates exactly how the bridge tool builds in that mode. For width of 2 and 3 you will note either 2 or 3 little blue squares appear below the main image to let you know what the width is.

On a right click, the bridge tool will attempt to use whatever material is in the inventory slot directly to the right of the bridge tool to build in the direction indicated by the mode

In mode 1 it will build FORWARD in a straight line:

alt text

This saves you a lot of time pressing the sneak button and leaning over the edge so you can click on the outward face of the node. Please note that the bridge tool can build out in any of the 4 directions depending on what way you are facing when you right click.

In mode 2 the bridge tool builds DOWN diagonally:

alt text

This is perhaps the most important function of the bridge tool because what seems like it should be simple, building down from a bridge you are standing on, is virtually impossible without this tool.

In mode 3 the bridge tool builds UP diagonally:

alt text

This is not hard to do without the tool, but using the tool saves you several steps.

And when you select a width of 2 or 3 by holding down the sneak button and left clicking the tool will build a path of that width:

alt text

alt text

If the bridge tool can not build where you asked it to, or if it runs out of material in the stack to the right of the tool, it will notify you of the problem via chat message.

The bridge tool is crafted using 3 steel ingots in a v shape, and one mese crystal:

steel ingot,                     ,steel ingot
           ,    steel ingot      ,
           ,mese crystal fragment,

alt text

The inventory image will switch from the tool itself to the mode image the first time you left click with the tool.

The bridge tool automatically orients stairs in the proper direction. When building a 3 node wide stair, the tool will ensure that all stairs point the correct direction. And when building forward, the tool will orient the stair downward.

And the bridge tool is now configured to wear out. If you wish to implement this feature edit the init.lua and change the value of WEAR_PER_USE from 0 to whatever you wish. (Max wear is 65535 and wear will be applied for each node of width of the path you are building)

Video:

Excalibur Zero created a video demonstrating this mod:

https://www.youtube.com/watch?v=j2E9ojtyitc

Author: Kilarin (Donald Hines)

Credits:

My son helped me with some ideas for this mod. I got a lot of code examples from the screwdriver mod in minetest_game by RealBadAngel, Maciej Kasatkin. I also copied and modified the screwdriver's mode number images for use in the bridge tool inventory images.

Topywo suggested adding wear, correcting down stair orientation, and using not_in_creative_inventory. Sokomine suggested adding width so that you could build 2 or 3 wide.

Dependencies:

soft depends on default, but without default you have no recipe.

Incompatibilities:

Problems have been reported when using this mod with inventory tweak

License:

code CC0, textures CC BY-SA 3.0

github source:

https://github.com/Kilarin/bridgetool

Download:

https://github.com/Kilarin/bridgetool/archive/master.zip

To install:

Simply unzip the file into your mods folder, then rename the resulting folder from bridgetool-master to bridgetool

OR, simply install it directly from minetest using the online mod repository.

Mod Database:

If you use this mod, please consider reviewing it on the MineTest Mod Database.

https://forum.minetest.net/mmdb/mod/bridgetool/

Changelog

--Version 2.2

Added new global enable_chat_warn at top of init.lua that can be set to NO if you don't want bridgetool warning messages to appear in chat.

Removed dependency upon default. Put the recipie inside an if checking for default so that in the unlikely case someone is running this without default, they still could. they would just have to use /giveme or creative mode to get the tools

Corrected two undeclared globals to locals.

Renamed the git repository to bridgetool-master to be in line with other mods.

--Version 2.1

Corrected fact that 3 wide stairs would sometimes orient the 3rd stair the wrong way

Modified stair orientation when using mode 1(forward) so that the stair will face down (since the only reason you would use the "forward" option with this tool and a staircase is to begin a down stair.)

---Version 2.0

Added width of 2 or 3

corrected down stair orientation

added not_in_creative_inventory=1 to all of the "mode" versions of the tool

added wear option

---Version 1.0

Initial release

bridgetool's People

Contributors

excaliburzero avatar kilarin avatar

Watchers

 avatar  avatar

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.