Skip to content

minetest mod to show grid of current map-block (also HUD of position in space and time)

License

Notifications You must be signed in to change notification settings

SwissalpS/postool

Repository files navigation

ContentDB luacheck License Minetest

PosTool mod for Minetest

Adds configurable HUD elements for current: position (node and block) and time. If advtrains is installed, it can also display railway time. If mesecons_debug is installed, this info can also be displayed.

Use chat command /postool to invoke formspec to toggle elements and position of HUD.

Screenshots

Pick a location.

Use the tool.

Invoke formspec with /postool

Example display of HUD

The progress-bar shows the mesecons usage in current block. It changes colour based on penalty.

When not disabled and user is not standing in the middle block of a chunk, then a smaller, green grid shows in which direction the chunk borders are. The closer to the orange grid the green one is, the closer a chunk border is in that direction.

PosTool

Crafting recipe:

		|       |       | glass |
		|       | torch |       |
		| stick |       |       |

Punch or place with PosTool to show a grid of the map-block at that position. If PosTool is used on a node, that nodes position will be used otherwise players position.

Settings

Settings with default values:

# HUD offsets in screen percentage
postool.hud.offsetx						0.8
postool.hud.offsety						0.95
# HUD z_index (does not seem to work)
postool.hud.offsetz						-111
# how to separate x, y and z values
postool.hud.posseparator				' | '
# titles in HUD and formspec
postool.hud.titletrain					'Railway Time: '
postool.hud.titletime					'Time: '
postool.hud.titlenode					'Node: '
postool.hud.titleblock					'Block: '
postool.hud.titlemesecons				'Mesecons: '
# value shown in HUD when
# advtrains is not enabled
postool.hud.titletrainna				'advtrains not enabled'
# main HUD switch
postool.hud.defaultshowmain				false (0/1)
# which items to initially show
postool.hud.defaultshowtrain			false (0/1)
postool.hud.defaultshowtime				false (0/1)
postool.hud.defaultshownode				true (0/1)
postool.hud.defaultshowblock			true (0/1)
postool.hud.defaultshowmesecons			false (0/1)
postool.hud.defaultshowmeseconsdetails	false (0/1)
# wait at least this long
# before updating HUD (seconds)
postool.hud.minupdateinterval			2
# how long to show grid for
# when tool is used
postool.tool.griddisplayduration		12
postool.tool.suppresschunkindicator	false (0/1)
postool.tool.usevizlib                    false (0/1)

Supported Games

Originally created for default Minetest game and should work with most other games. When xcompat is installed, crafting recipe for the wand adapts to any games supported by xcompat.

Thanks

This mod was strongly inspired by poshud. Some techniques I borrowed from missions. I also want to mention replacer <- Coil0's version <- Sokomine's version and protector as I used parts of them too. @6r1d for screenshots and support

Thanks also to the users of pandorabox.io for feedback and inspiration to actually write this mod. @Huhhila for pushing the mapchunk indicator idea. On #minetest IRC/discord @Warr1024, @hlqkj and @Krock for chiming in the discussion.

Thanks to @BuckarooBanzay for helping debugging postool in node-breakers.

(If you feel I should include you by name, just submit a PR)

About

minetest mod to show grid of current map-block (also HUD of position in space and time)

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages