Compare commits

...

5 Commits

Author SHA1 Message Date
Lars Mueller 6f3359cb12 Remove unnecessary get_player_privs call 2020-12-19 15:17:44 +01:00
Lars Mueller f135a45aa3 Code quality: use new modlib functionality 2020-07-30 00:06:30 +02:00
Lars Mueller e497d483ad Add autogenerated settingtypes 2020-06-02 23:09:22 +02:00
Lars Mueller ea1b2b9342 Optimize screenshot.png 2020-05-24 13:05:54 +02:00
Lars Mueller fec9806a89 rolling-8 2020-05-02 19:18:01 +02:00
4 changed files with 6 additions and 2 deletions

View File

@ -1 +1 @@
modlib.mod.init("cycle_limit")
modlib.mod.init()

View File

@ -21,6 +21,7 @@ minetest.register_privilege("cycle_limit", {
local interact = config.interact
if interact then
minetest.registered_privileges.interact.give_to_singleplayer = false
minetest.register_privilege("interact_mods", {
description = "Can be granted interact by mods",
give_to_singleplayer = true,
@ -34,7 +35,6 @@ if interact then
local privs = minetest.get_player_privs(name)
privs.interact = value or nil
minetest.set_player_privs(name, privs)
privs = minetest.get_player_privs(name)
end
end

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.9 KiB

After

Width:  |  Height:  |  Size: 6.5 KiB

4
settingtypes.txt Normal file
View File

@ -0,0 +1,4 @@
cycle_limit.interact (Cycle limit interact) bool true
cycle_limit.duration (Cycle limit duration) float 2 0.000000 1073741824.000000
cycle_limit.name (Cycle limit name) string Switching
cycle_limit.color (Cycle limit color) string 545AA7