Go to file
Luke aka SwissalpS 1b031ebd4c
Extend mod to also support invites (#15)
MAJOR MOD CHANGE

As before, moderators can silently observe any player that is not observing another player. (configurable)

New: Players can invite other players to observe them. Invitations can be accepted or denied. (configurable privileges, defaults to interact)

All the chat-commands are configurable.
Temporary privileges can be given to observers, same set for sneak-observers and invited ones or separate set.
2022-03-08 17:03:18 +01:00
.github/workflows Extend mod to also support invites (#15) 2022-03-08 17:03:18 +01:00
spec Extend mod to also support invites (#15) 2022-03-08 17:03:18 +01:00
.gitignore Add .gitignore and .luacheckrc 2016-08-05 19:54:08 +02:00
.luacheckrc Extend mod to also support invites (#15) 2022-03-08 17:03:18 +01:00
LICENSE Extend mod to also support invites (#15) 2022-03-08 17:03:18 +01:00
README.md Extend mod to also support invites (#15) 2022-03-08 17:03:18 +01:00
init.lua Extend mod to also support invites (#15) 2022-03-08 17:03:18 +01:00
mod.conf Extend mod to also support invites (#15) 2022-03-08 17:03:18 +01:00
settingtypes.txt Extend mod to also support invites (#15) 2022-03-08 17:03:18 +01:00

README.md

Spectator Mode

luacheck mineunit License Minetest

A mod for Minetest allowing you to watch other players in their 3rd person view. You're invisible and undetectable for the players when you're in this mode.

Can be useful for admins or moderators in their task of monitoring. Requires the privilege watch.

Normal players can also invite others to observe them.

Dependencies

Requirements

This mod requires MT 5.0.0 and above.

Commands

All the commands can be modified in settings, here they are listed with their default names.

/watch <player name> silently attach to player
/unwatch (get back to your initial position)
/watchme <player name>[,<player2 name] ... playerN name]] invite player(s) to observe caller.
/smn reject an invitation
/smy accept an invitation

Settings

All settings can be set in minetest.conf or accessed via mod with the global field of same name.
See settingtypes.txt

Privileges

Both privileges are registered if no other mod has already done so.

Compatibility

Before sending invites, beerchat's player meta entry is checked to make sure muted players can't invite.
Other mods can override spectator_mode.is_permited_to_invite(name_target, name_watcher) to add own conditions of when who can invite whom.

Moderators are kept breathing when observing via '/watch' command. Other mods can override this to add more functionality: spectator_mode.keep_alive(name_watcher).

spectator_mode.on_respawnplayer(watcher) can be overidden to adjust what happens when an attached player dies and respawns. Without change, the observer is detached for a split second then re-attached.

While attaching a player, his hud flags are mostly turned off. Other mods can override the behaviour with their own implementation of
function spectator_mode.turn_off_hud_hook(player, flags, new_hud_flags)

  • player The PlayerObjectRef of player that is to be attached.
  • flags The player's HUD-flags prior to attaching.
  • new_hud_flags The table that can be manipulated and will be set as new flags.

Original mod DWTFYW Copyright (C) 2015 Jean-Patrick Guerrero jeanpatrick.guerrero@gmail.com Since 20220217 MIT and CC-BY-SA-3.0see LICENSE The MIT applies to all code in this project that is not otherwise protected. see LICENSE The CC-BY-SA-3.0 license applies to textures and any other content in this project which is not source code.