generated from your-land/yl_template
Replace wrong core with correct minetest table
This commit is contained in:
parent
37acf04236
commit
b50d0fea33
14
init.lua
14
init.lua
@ -4,14 +4,14 @@
|
||||
|
||||
-- Changelog
|
||||
|
||||
local mod_start_time = core.get_us_time()
|
||||
core.log("action", "[MOD] yl_scheduler loading")
|
||||
local mod_start_time = minetest.get_us_time()
|
||||
minetest.log("action", "[MOD] yl_scheduler loading")
|
||||
|
||||
yl_scheduler = {}
|
||||
yl_scheduler.error = {}
|
||||
yl_scheduler.modstorage = core.get_mod_storage()
|
||||
yl_scheduler.modpath = core.get_modpath("yl_scheduler") .. DIR_DELIM
|
||||
yl_scheduler.worldpath = core.get_worldpath() .. DIR_DELIM
|
||||
yl_scheduler.modstorage = minetest.get_mod_storage()
|
||||
yl_scheduler.modpath = minetest.get_modpath("yl_scheduler") .. DIR_DELIM
|
||||
yl_scheduler.worldpath = minetest.get_worldpath() .. DIR_DELIM
|
||||
|
||||
yl_scheduler.information = {}
|
||||
yl_scheduler.information.version = "0.0.1"
|
||||
@ -29,5 +29,5 @@ dofile(yl_scheduler.modpath .. "initialize.lua")
|
||||
--dofile(yl_scheduler.modpath .. "globalsteps.lua")
|
||||
dofile(yl_scheduler.modpath .. "chatcommands.lua")
|
||||
|
||||
local mod_end_time = (core.get_us_time() - mod_start_time) / 1000000
|
||||
core.log("action", "[MOD] yl_scheduler loaded in [" .. mod_end_time .. "s]")
|
||||
local mod_end_time = (minetest.get_us_time() - mod_start_time) / 1000000
|
||||
minetest.log("action", "[MOD] yl_scheduler loaded in [" .. mod_end_time .. "s]")
|
||||
|
@ -3,7 +3,7 @@
|
||||
local debug = yl_scheduler.settings.debug or true
|
||||
|
||||
local function say(text)
|
||||
if debug then core.log("action", "[MOD] yl_scheduler : " .. text) end
|
||||
if debug then minetest.log("action", "[MOD] yl_scheduler : " .. text) end
|
||||
end
|
||||
|
||||
-- Helpers
|
||||
@ -24,8 +24,7 @@ end
|
||||
|
||||
local function is_uuid_duplicate(UUID)
|
||||
for i, task in ipairs(yl_scheduler.tasks) do
|
||||
-- HERE
|
||||
core.log("action",
|
||||
say("action",
|
||||
"task.id=" .. dump(task.id) .. ", UUID=" .. dump(UUID))
|
||||
if task.id == UUID then return true end
|
||||
end
|
||||
@ -232,12 +231,12 @@ local function load_all_tasks()
|
||||
yl_scheduler.tasks = sort_by_timestamp(tasks)
|
||||
|
||||
if bad == 0 then
|
||||
core.log("action",
|
||||
minetest.log("action",
|
||||
"[MOD] yl_scheduler : bad = " .. tostring(bad) .. ", good = " ..
|
||||
tostring(good) .. ", total = " .. tostring(total))
|
||||
return true, good, bad
|
||||
else
|
||||
core.log("warning",
|
||||
minetest.log("warning",
|
||||
"[MOD] yl_scheduler : bad = " .. tostring(bad) .. ", good = " ..
|
||||
tostring(good) .. ", total = " .. tostring(total))
|
||||
return false, good, bad
|
||||
|
Loading…
Reference in New Issue
Block a user