forked from nalc/random_messages
Merge pull request #3 from tacotexmex/patch-1
Replace deprecated settings method
This commit is contained in:
commit
55e197dc6e
6
init.lua
6
init.lua
|
@ -29,13 +29,13 @@ function table.random( t )
|
||||||
end
|
end
|
||||||
|
|
||||||
function random_messages.initialize() --Set the interval in minetest.conf.
|
function random_messages.initialize() --Set the interval in minetest.conf.
|
||||||
minetest.setting_set("random_messages_interval",120)
|
minetest.settings:set("random_messages_interval",120)
|
||||||
minetest.setting_save();
|
minetest.settings:save();
|
||||||
return 120
|
return 120
|
||||||
end
|
end
|
||||||
|
|
||||||
function random_messages.set_interval() --Read the interval from minetest.conf(set it if it doesn'st exist)
|
function random_messages.set_interval() --Read the interval from minetest.conf(set it if it doesn'st exist)
|
||||||
MESSAGE_INTERVAL = tonumber(minetest.setting_get("random_messages_interval")) or random_messages.initialize()
|
MESSAGE_INTERVAL = tonumber(minetest.settings:get("random_messages_interval")) or random_messages.initialize()
|
||||||
end
|
end
|
||||||
|
|
||||||
function random_messages.check_params(name,func,params)
|
function random_messages.check_params(name,func,params)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user