[Mod] Cycle Limit [cycle_limit]

Post Reply
User avatar
LMD
Member
Posts: 1397
Joined: Sat Apr 08, 2017 08:16
GitHub: appgurueu
IRC: appguru[eu]
In-game: LMD
Location: Germany
Contact:

[Mod] Cycle Limit [cycle_limit]

by LMD » Post

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

Image


Links
Configuration

Configuration can be found under /conf/cycle_limit.json.
Default configuration:

Code: Select all

{
    "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
Last edited by LMD on Mon Dec 28, 2020 17:35, edited 15 times in total.
My stuff: Projects - Mods - Website

User avatar
texmex
Member
Posts: 1753
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: tacotexmex

Re: [Mod] Cycle Limit - limits slot switching [cycle_limit]

by texmex » Post

Sounds good to me!

But the dependency link is broken.

User avatar
LMD
Member
Posts: 1397
Joined: Sat Apr 08, 2017 08:16
GitHub: appgurueu
IRC: appguru[eu]
In-game: LMD
Location: Germany
Contact:

Re: [Mod] Cycle Limit - limits slot switching [cycle_limit]

by LMD » Post

Thanks for noting, fixed.
My stuff: Projects - Mods - Website

MoNTE48
Member
Posts: 323
Joined: Sat Apr 06, 2013 11:58
GitHub: MoNTE48
In-game: MoNTE48
Location: Internet

Re: [Mod] Cycle Limit - limits slot switching [cycle_limit]

by MoNTE48 » Post

Make the topic right, or do not post it on the forum.

User avatar
LMD
Member
Posts: 1397
Joined: Sat Apr 08, 2017 08:16
GitHub: appgurueu
IRC: appguru[eu]
In-game: LMD
Location: Germany
Contact:

Re: [Mod] Cycle Limit - limits slot switching [cycle_limit]

by LMD » Post

MoNTE48: the topic will be improved next time I run mt-content-release, it automatically edits my forum posts.
My stuff: Projects - Mods - Website

User avatar
LMD
Member
Posts: 1397
Joined: Sat Apr 08, 2017 08:16
GitHub: appgurueu
IRC: appguru[eu]
In-game: LMD
Location: Germany
Contact:

Re: [Mod] Cycle Limit - limits slot switching [cycle_limit]

by LMD » Post

LMD wrote:
Thu Apr 30, 2020 12:34
MoNTE48: the topic will be improved next time I run mt-content-release, it automatically edits my forum posts.
Update: done.
My stuff: Projects - Mods - Website

MoNTE48
Member
Posts: 323
Joined: Sat Apr 06, 2013 11:58
GitHub: MoNTE48
In-game: MoNTE48
Location: Internet

Re: [Mod] Cycle Limit [cycle_limit]

by MoNTE48 » Post

Cool, really.
Btw, maybe a modpack would be preferable to several mods? Until CDB does not support dependency auto-installing.

User avatar
texmex
Member
Posts: 1753
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: tacotexmex

Re: [Mod] Cycle Limit [cycle_limit]

by texmex » Post

Dare to say no to modpacks! =D

This mod’s functionality should become an engine feature, eventually.

User avatar
Eris
Member
Posts: 178
Joined: Thu Nov 19, 2020 23:12
IRC: definitelya Ovalo
In-game: Eris_still_crafts

Re: [Mod] Cycle Limit [cycle_limit]

by Eris » Post

Texmex is right, it would be nice having it merged with minetest_game, although it would require rewriting without hard dependencies maybe.
Jump in the caac

Post Reply

Who is online

Users browsing this forum: No registered users and 29 guests