[Mod] Mid-Measure [1.0] [mid_measure]

Post Reply
User avatar
ANAND
Member
Posts: 335
Joined: Sun Jan 28, 2018 12:54
GitHub: magnetar47
IRC: MAGNETAR ANAND
In-game: ANAND and all names with Tomato
Location: India
Contact:

[Mod] Mid-Measure [1.0] [mid_measure]

by ANAND » Post

[Mod] Mid-Measure [1.0] [mid_measure]

Mid-Measure is a Minetest mod which can be used for quickly calculating the distance (in all three axes) between two nodes, and ascertaining their mid-point, both of which are displayed in the chat (as of now; refer to TODO section below)

The calculations are performed right after pos2 has been marked, and if auto-reset has been enabled, will reset after the configured number of seconds.

Partly inspired by Minetest-WorldEdit

Screenshot
Image

License: MIT
Mod Dependencies: default (optional, see below)


Custom settings
  • mid_measure.auto_reset - Auto-reset duration. Accepts a value of n seconds, where 0 <= n <= 3600. If n==0, auto-reset is disabled (not recommended for server environments).
  • mid_measure.enable_crafting - Enables crafting (disabled by default) of marker tool if true. The craft-recipe depends on `default` mod.
How does this work?
  • Mark the first node by either of the two methods given below:
    • Standing on a node and typing `/mark1`.
    • Left-clicking on a node with the Marker.
  • Mark the second node by either of the two methods given below:
    • Standing on a node and typing `/mark2`.
    • Left-clicking on another node with the Marker.
  • The distance will automatically be calculated after marking the second node, and the mid-point will be highlighted as well.
  • Click on pos1 / pos2 / mid-point or type `/reset_mark` to manually reset at anytime.
Craft-recipe for marker tool
The craft-recipe is quite simple actually. It's very similar to the recipe for torches, but the coal lump is replaced by a mese crystal fragment here.

Code: Select all

[Mese Crystal fragment]
        [Stick]
View Code
Download
My Mods

cdb_NXKPOcRlgUGdMyf8uLoUQvnMGIfuaHmp

User avatar
Stix
Member
Posts: 1385
Joined: Fri Aug 04, 2017 14:19
IRC: nil
In-game: Stix [+alts]
Location: USA

Re: [Mod] Mid-Measure [1.0] [mid_measure]

by Stix » Post

Im assuming you made this to make creating CTF maps easier? ;-).
But on-topic ive been wanting something like this for a long time, as im always making errors when discerning the middle node in a line ;-).
Hey, what can i say? I'm the bad guy.

User avatar
ANAND
Member
Posts: 335
Joined: Sun Jan 28, 2018 12:54
GitHub: magnetar47
IRC: MAGNETAR ANAND
In-game: ANAND and all names with Tomato
Location: India
Contact:

Re: [Mod] Mid-Measure [1.0] [mid_measure]

by ANAND » Post

Stix wrote:Im assuming you made this to make creating CTF maps easier? ;-).
Good guess, but this was made for creative servers and survival servers in general.

For the CTF maps, the ctf_map mod handles all the barrier placing, map dimensions, etc.
My Mods

cdb_NXKPOcRlgUGdMyf8uLoUQvnMGIfuaHmp

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 34 guests