mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2024-11-06 02:20:24 +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 active_blocks = {} -- These only contain active blocks near players (i.e., not forceloaded ones)
|
||||||
local handle_active_blocks_step = 2
|
local handle_active_blocks_step = 2
|
||||||
local handle_active_blocks_timer = 0
|
|
||||||
local function active_blocks_step()
|
local function active_blocks_step()
|
||||||
local active_block_range = tonumber(minetest.setting_get("active_block_range")) or 2
|
local active_block_range = tonumber(minetest.setting_get("active_block_range")) or 2
|
||||||
local new_active_blocks = {}
|
local new_active_blocks = {}
|
||||||
|
|
|
@ -103,14 +103,11 @@ end
|
||||||
random_messages.set_interval()
|
random_messages.set_interval()
|
||||||
random_messages.read_messages()
|
random_messages.read_messages()
|
||||||
|
|
||||||
local TIMER = 0
|
local function step()
|
||||||
minetest.register_globalstep(function(dtime)
|
random_messages.show_message()
|
||||||
TIMER = TIMER + dtime;
|
minetest.after(MESSAGE_INTERVAL, step)
|
||||||
if TIMER > MESSAGE_INTERVAL then
|
end
|
||||||
random_messages.show_message()
|
minetest.after(0, step)
|
||||||
TIMER = 0
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
|
|
||||||
local register_chatcommand_table = {
|
local register_chatcommand_table = {
|
||||||
params = "viewmessages | removemessage <number> | addmessage <number>",
|
params = "viewmessages | removemessage <number> | addmessage <number>",
|
||||||
|
|
Loading…
Reference in New Issue
Block a user