[mod] WorldEdit HUD Helper [0.5] [worldedit_hud_helper]

Post Reply
Starbeamrainbowlabs
Member
Posts: 66
Joined: Sat May 26, 2018 11:25
GitHub: sbrl
Location: Nowhere, Everywhere, and Somewhere inbetween
Contact:

[mod] WorldEdit HUD Helper [0.5] [worldedit_hud_helper]

by Starbeamrainbowlabs » Post

I'm back with another small quality-of-life improvement mod!

This time, I noticed that I only used 2 pieces of information from the debug info output - the direction I'm looking in (+/- X/Z), and the name of the node I'm looking at. To this end - in an attempt to reduce visual noise (and make taking screenshots easier) - I've written another mod.

It's based on advanced_gui, and despite the name, it doesn't actually depend on worldedit.



It displays the name of the node you're looking at, and the direction you're facing in the HUD. It also adds the //hud chat command to toggle it on and off.

Here's a screenshot:

Image

Here are some more screenshots:
Spoiler
Image
Image
Image

► Changelog

  • v0.1: 14th September 2018
    • Initial release.
  • v0.2: 16th September 2018
    • Fix undeclared global variable access.
  • v0.3: 2nd May 2020
    • Fix potential bug in raycast
    • Ignore `wielded_light:*` nodes when raycasting
  • v0.4: 31st May 2021
    • Fix deprecation warning for `getpos` → `get_pos` (#2)
  • v0.5: 31st July 2021
    • Add `//hudoffset [<offset_in_pixels>]` chat command to adjust the vertical offset of the HUD (fixes #1)
    • Persist per-player settings to disk (per-world)

► Download

I strongly recommend using git to clone the repository to install this mod. If you can't, then I've provided an always up-to-date download link too :-)

Note that if I don't reply to your message on here, I'll be much more responsive if you open an issue against the repository..

Image Repository | Clone | Download (Previous versions) | Issue Tracker

License: MPL-2.0 (Mozilla Public License 2.0) - no textures present
Mod dependencies: none
Last edited by Starbeamrainbowlabs on Sat Jul 31, 2021 01:53, edited 3 times in total.

User avatar
LMD
Member
Posts: 1397
Joined: Sat Apr 08, 2017 08:16
GitHub: appgurueu
IRC: appguru[eu]
In-game: LMD
Location: Germany
Contact:

Re: [mod] WorldEdit HUD Helper [0.2] [worldedit_hud_helper]

by LMD » Post

What a nice mod ! However, probably display Node Description instead of name, or even better, both...
My stuff: Projects - Mods - Website

Starbeamrainbowlabs
Member
Posts: 66
Joined: Sat May 26, 2018 11:25
GitHub: sbrl
Location: Nowhere, Everywhere, and Somewhere inbetween
Contact:

Re: [mod] WorldEdit HUD Helper [0.2] [worldedit_hud_helper]

by Starbeamrainbowlabs » Post

LMD wrote:What a nice mod ! However, probably display Node Description instead of name, or even better, both...
Ah, good thinking - and thanks! I originally made this because I'm always needing the node name for worldedit commands, like //replace. I could always add a configuration option to display the node description or something. What do you think?

User avatar
LMD
Member
Posts: 1397
Joined: Sat Apr 08, 2017 08:16
GitHub: appgurueu
IRC: appguru[eu]
In-game: LMD
Location: Germany
Contact:

Re: [mod] WorldEdit HUD Helper [0.2] [worldedit_hud_helper]

by LMD » Post

Probably add config, and make default setting : Show both description and nodename. Chatcommands to toggle would be nice too...
My stuff: Projects - Mods - Website

Starbeamrainbowlabs
Member
Posts: 66
Joined: Sat May 26, 2018 11:25
GitHub: sbrl
Location: Nowhere, Everywhere, and Somewhere inbetween
Contact:

Re: [mod] WorldEdit HUD Helper [0.2] [worldedit_hud_helper]

by Starbeamrainbowlabs » Post

Good idea! Is there a reference sheet on config options? I'm unsure on how to do that, being new to modding minetest and all (not new to programming though :P).

There is a chat command to toggle it already - //hud :-)

I should probably document it in this forum post as well as the readme :P

User avatar
pilcrow
Member
Posts: 25
Joined: Thu Sep 12, 2013 09:10

Re: [mod] WorldEdit HUD Helper [0.2] [worldedit_hud_helper]

by pilcrow » Post

Starbeamrainbowlabs wrote:Is there a reference sheet on config options?
I know it's been over a month, but I see no one replied to you yet. In general, the dev wiki is useful for figuring out the usage/syntax of minetest functions. In this particular case, though, the page for minetest.settings is pretty lacking. For a working example of both reading and writing settings, you can look at the first few lines of my Flying Saucer mod (though note that I only use number and bool settings; just remove the 'tonumber' calls if you want your setting to be a string instead).

Starbeamrainbowlabs
Member
Posts: 66
Joined: Sat May 26, 2018 11:25
GitHub: sbrl
Location: Nowhere, Everywhere, and Somewhere inbetween
Contact:

Re: [mod] WorldEdit HUD Helper [0.2] [worldedit_hud_helper]

by Starbeamrainbowlabs » Post

pilcrow wrote:
Starbeamrainbowlabs wrote:Is there a reference sheet on config options?
I know it's been over a month, but I see no one replied to you yet. In general, the dev wiki is useful for figuring out the usage/syntax of minetest functions. In this particular case, though, the page for minetest.settings is pretty lacking. For a working example of both reading and writing settings, you can look at the first few lines of my Flying Saucer mod (though note that I only use number and bool settings; just remove the 'tonumber' calls if you want your setting to be a string instead).
Hey, thanks! I'll take a look when I've got some time. I would have replied sooner, but email notifications don't appear to be functioning for me :-/

Post Reply

Who is online

Users browsing this forum: No registered users and 40 guests