Go to file
Lars Mueller 6f3359cb12 Remove unnecessary get_player_privs call 2020-12-19 15:17:44 +01:00
Readme.md rolling-6 2020-05-02 18:44:46 +02:00
default_config.json rolling-5 2020-05-02 18:40:18 +02:00
init.lua Code quality: use new modlib functionality 2020-07-30 00:06:30 +02:00
main.lua Remove unnecessary get_player_privs call 2020-12-19 15:17:44 +01:00
mod.conf rolling-5 2020-05-02 18:40:18 +02:00
screenshot.png Optimize screenshot.png 2020-05-24 13:05:54 +02:00
settingtypes.txt Add autogenerated settingtypes 2020-06-02 23:09:22 +02:00

Readme.md

Cycle Limit (cycle_limit)

Makes switching between inventory slots take time.

About

Cycle Limit only depends on modlib. Code by Lars Mueller aka LMD or appguru(eu) and licensed under the MIT license.

Part of the Limit Series: item_limit, place_limit and cycle_limit

Features

  • When switching between inventory slots, the item you are switching to will be "hidden"
  • A bar appears showing you the time left, and after it's over (or if you switch again) the hidden items reappear
  • During switching you can only use your hand
  • Hidden items are not lost if the server crashes
  • cycle_limit priv allows evasion
  • Alternative mode works by granting/removing interact
    • To prevent players from having interact, revoke both interact and interact_mods

Known issues:

  • The item is temporarily removed from the inventory
    • Can't be circumvented because else get_wield_item would return item that is being switched to
    • Accordingly, it can't be seen

Screenshot

Screenshot

Configuration

Configuration can be found under <worldpath>/conf/cycle_limit.json.

Default configuration:

{
    "name": "Switching",
    "duration": 2,
    "color": "545AA7",
    "interact": true
}
  • name is the timer name
  • duration is the time it takes to switch in seconds
  • color is a hex color (but without #)
  • interact is a boolean indicating whether the interact privilege should be revoked