mirror of
https://github.com/minetest-mods/areas.git
synced 2024-12-22 12:52:22 +01:00
Localize areas.startTime
startTime is not used anywhere else, so localizing it makes sense and saves memory.
This commit is contained in:
parent
79e799cfa1
commit
359280a353
4
init.lua
4
init.lua
@ -7,7 +7,7 @@ areas = {}
|
|||||||
areas.factions_available = minetest.get_modpath("playerfactions") and true
|
areas.factions_available = minetest.get_modpath("playerfactions") and true
|
||||||
|
|
||||||
areas.adminPrivs = {areas=true}
|
areas.adminPrivs = {areas=true}
|
||||||
areas.startTime = os.clock()
|
local startTime = os.clock()
|
||||||
|
|
||||||
areas.modpath = minetest.get_modpath("areas")
|
areas.modpath = minetest.get_modpath("areas")
|
||||||
dofile(areas.modpath.."/settings.lua")
|
dofile(areas.modpath.."/settings.lua")
|
||||||
@ -43,6 +43,6 @@ if not minetest.registered_privileges[areas.config.self_protection_privilege] th
|
|||||||
end
|
end
|
||||||
|
|
||||||
if minetest.settings:get_bool("log_mods") then
|
if minetest.settings:get_bool("log_mods") then
|
||||||
local diffTime = os.clock() - areas.startTime
|
local diffTime = os.clock() - startTime
|
||||||
minetest.log("action", "areas loaded in "..diffTime.."s.")
|
minetest.log("action", "areas loaded in "..diffTime.."s.")
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user