luk3yx / minetest-cloaking

Allows players to go invisible in Minetest!
MIT License
4 stars 3 forks source link

Minetest cloaking mod

Allows admins to become invisible and appear as if they are not in-game at all. Inspired by Star Trek's cloaking device.

What is cloaking?

In this instance, cloaking is a way to go invisible and become undetectable by most mods (unless they explicitly want to detect cloaked players, so they can still send chat messages to them).

Why is cloaking so hacky?

The aim of cloaking is to trick other mods into thinking the player is not in-game, and a lot of hacks are used to do this.

Help, it crashes

If it crashes, it is either caused by a mod not liking non-existent players running around, or by a bug in cloaking itself.

How do I use cloaking?

Cloaking adds a modding API and some chatcommands. All of the chatcommands require the "cloaking" privilege to execute, with the exception of /uncloak when used on yourself.

How do I download cloaking?

You can either run git clone https://git.minetest.land/luk3yx/cloaking.git or download this mod from ContentDB.

How do I use the API?

Cloaking adds the following functions:

Any above functions requiring "player" as a parameter also accept a player name, provided the player is online.

It also adds the following functions that ignore cloaked players and can interact with them: cloaking.get_connected_players, cloaking.get_objects_inside_radius and cloaking.get_player_by_name.

If you have made chatcommand work with players that aren't in-game, you can add _allow_while_cloaked = true to the chatcommand definition. If you explicitly don't want your chatcommand working with cloaked players, you can add _disallow_while_cloaked = true to the definition. These modifications do not require that you add cloaking as a dependency, as when cloaking is not loaded this parameter is simply ignored.

Backported bugfixes

To ensure server stability, the cloaking mod backports the following bugfixes if it determines they are necessary for your server:

If you do not want this for whatever reason (although I do not recommend it), you can disable these backports by adding cloaking.backport_bugfixes = false to your minetest.conf.