Spy on block-stacking players
Go to file
jkoci 35fa0aaa63 Merge branch 'issue/2' 2023-04-09 14:01:18 +02:00
.luacheckrc Prepare luacheckrc for unitttests 2022-08-30 20:28:44 +02:00
00-tooling.lua Linting using luacheck 2022-08-29 22:45:42 +02:00
01-config.lua #2 Fix default value of logger 2023-04-09 12:53:33 +02:00
02-internal.lua Format using stylua 2022-08-29 22:40:24 +02:00
99-setup.lua Format using stylua 2022-08-29 22:40:24 +02:00
LICENSE I don't like MIT license... I hope BSD-3 will be fine. 2022-08-30 20:22:13 +02:00
Makefile Helper makefile 2022-08-30 20:22:34 +02:00
README.md I don't like MIT license... I hope BSD-3 will be fine. 2022-08-30 20:22:13 +02:00
init.lua #1 reenable access to mod/world paths 2023-04-09 13:59:07 +02:00
mod.conf Initial commit 2022-08-29 22:39:36 +02:00

README.md

watchtower

Purpose

This mod will watch over players, checking if any of them stacks a tower of blocks.

Tower in this mod is defined to be uninterrupted placings of blocks in the same x and z coord, with y steadily increasing by 1 each time a block is placed.

Download

Canonical location of this mod is https://gitea.your-land.de/Ravise/watchtower

Installation

This mod does not create any releases. Simply git clone the repository. Latest production version of the code is found in "master" branch.

Usage

This mod is a library with very limited default settings. Servers are expected to provide their own integration mod, depending on this library.

Configuration

This mod vaguely follows yl_template. See 01-config.lua for list of configurable options.

Hooks

This mod exposes following hooks:

  • watchtower.callbacks.on_maybe_tower Called, when player reaches "maybe (33%)" height of stacking blocks.
  • watchtower.callbacks.on_perhaps_tower Called, when player reaches "perhaps (66%)" height of stacking blocks.
  • watchtower.callbacks.on_tower Called, when player reaches the limit of height.
  • watchtower.callbacks.on_double_tower Called, when player reaches double the limit of height.

All hooks are expected to be function with following signature:

callback = function(player, pos, height)

  • player is ObjRef to the player, who causes the event
  • pos is {x, y, z} table describing the position of the top block of the tower
  • height is the tower height

There are no checks on the callbacks functions (e.g. the callbacks are NOT run inside pcall)! Be responsible and verify your integration.

Uninstall

This mod does create any files, temporary or persistent. This mod does not insert any records into server's database. To uninstall, simply remove the mod directory.

License

BSD-3. See LICENSE for details.