Go to file
luk3yx d8b8b40de6 Better chat3 support. 2018-10-11 12:03:29 +13:00
LICENSE.md Add mod 2018-04-01 15:11:07 +12:00
README.md Better chat3 support. 2018-10-11 12:03:29 +13:00
chat3.lua Better chat3 support. 2018-10-11 12:03:29 +13:00
chatcommands.lua Add a 'cloaking' privilege. 2018-10-09 11:45:22 +13:00
core.lua Better chat3 support. 2018-10-11 12:03:29 +13:00
depends.txt Remove formspeclib from depends.txt 2018-09-19 15:27:05 +12:00
init.lua Remove undefined global variable warnings 2018-07-26 19:21:03 +12:00
irc.lua Allow cloaked players to receive IRC messages 2018-04-14 09:54:35 +12:00

README.md

Minetest cloaking mod

Allows players to cloak and uncloak.

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, and where does it send the 'left the game' messages?

Cloaking sends no left the game messages, it leaves that up to the built-in left the game functions. The aim of cloaking is to trick other mods into thinking the player is not in-game, and for this it must be hacky.

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 two chatcommands. Both of these require the cloaking privilege to execute, however you can uncloak yourself without any privileges.

  • /cloak [victim]: Cloaks yourself, alternatively an unsuspecting victim.
  • /uncloak [victim]: Uncloaks yourself, or a victim.

How do I download cloaking?

You can either run git clone https://github.com/luk3yx/minetest-cloaking cloaking, or download a zip or tar.gz file. You will need to rename the folder from minetest-cloaking-master to cloaking for it to work properly.

How do I use the API?

Cloaking adds the following functions:

  • cloaking.cloak_player(player): Cloaks a player.
  • cloaking.uncloak_player(player): Uncloaks a player.
  • cloaking.get_cloaked_players(): Gets a list of cloaked player names.
  • cloaking.is_cloaked(player): Checks if a player is cloaked.
  • cloaking.on_chat_message(player, message): Returns true and warns player if they are cloaked and trying to send a chat message, otherwise returns nil.

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 want your chatcommand to work with cloaked players, you can add _allow_while_cloaked = true to the chatcommand definition. This does not require that you add cloaking to depends.txt, as when cloaking is not loaded this parameter is simply ignored.