mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2024-11-05 18:10:26 +01:00
[random_messages & pipeworks] Change globalsteps, remove variables
- For #179
This commit is contained in:
parent
e538a7a152
commit
7bf6c9e16e
|
@ -53,7 +53,6 @@ end
|
|||
|
||||
local active_blocks = {} -- These only contain active blocks near players (i.e., not forceloaded ones)
|
||||
local handle_active_blocks_step = 2
|
||||
local handle_active_blocks_timer = 0
|
||||
local function active_blocks_step()
|
||||
local active_block_range = tonumber(minetest.setting_get("active_block_range")) or 2
|
||||
local new_active_blocks = {}
|
||||
|
|
|
@ -103,14 +103,11 @@ end
|
|||
random_messages.set_interval()
|
||||
random_messages.read_messages()
|
||||
|
||||
local TIMER = 0
|
||||
minetest.register_globalstep(function(dtime)
|
||||
TIMER = TIMER + dtime;
|
||||
if TIMER > MESSAGE_INTERVAL then
|
||||
random_messages.show_message()
|
||||
TIMER = 0
|
||||
end
|
||||
end)
|
||||
local function step()
|
||||
random_messages.show_message()
|
||||
minetest.after(MESSAGE_INTERVAL, step)
|
||||
end
|
||||
minetest.after(0, step)
|
||||
|
||||
local register_chatcommand_table = {
|
||||
params = "viewmessages | removemessage <number> | addmessage <number>",
|
||||
|
|
Loading…
Reference in New Issue
Block a user