1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-27 17:28:41 +00:00
This commit is contained in:
Desour 2025-02-22 12:21:36 +01:00
parent 478e9bef17
commit a70fee4d35
8 changed files with 44 additions and 53 deletions

View file

@ -232,6 +232,14 @@ if core.set_read_node and core.set_push_node then
core.set_read_node = nil
local function push_node(content, param1, param2)
if false then -- TODO: tmp
print(dump(debug.traceback()))
--~ error()
for i = 0, 10 do
print("i="..i)
print(dump(debug.getinfo(i)))
end
end
return {name = content2name[content], param1 = param1, param2 = param2}
end
core.set_push_node(push_node)

View file

@ -7,7 +7,28 @@ local mypath = scriptpath .. "sscsm_client".. DIR_DELIM
-- not exposed to outer context
local builtin_shared = {}
-- placeholders
-- FIXME: send actual content defs to sscsm env
function core.get_content_id(name)
return tonumber(name)
end
function core.get_name_from_content_id(id)
return tostring(id)
end
assert(loadfile(commonpath .. "item_s.lua"))(builtin_shared)
assert(loadfile(commonpath .. "register.lua"))(builtin_shared)
assert(loadfile(mypath .. "register.lua"))(builtin_shared)
dofile(commonpath .. "after.lua")
-- TODO: tmp
local function dings()
print(dump(core.get_node_or_nil(vector.zero())))
core.after(1, dings)
end
--~ core.after(0, dings)
print(core.get_current_modname())