mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-22 17:18:39 +00:00
move dings test code out of builtin
This commit is contained in:
parent
272cd207b7
commit
0ccbc283ad
2 changed files with 14 additions and 11 deletions
|
@ -20,14 +20,3 @@ assert(loadfile(commonpath .. "register.lua"))(builtin_shared)
|
||||||
assert(loadfile(mypath .. "register.lua"))(builtin_shared)
|
assert(loadfile(mypath .. "register.lua"))(builtin_shared)
|
||||||
|
|
||||||
dofile(commonpath .. "after.lua")
|
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())
|
|
||||||
|
|
|
@ -168,12 +168,26 @@ Client::Client(
|
||||||
std::string enable_sscsm = g_settings->get("enable_sscsm");
|
std::string enable_sscsm = g_settings->get("enable_sscsm");
|
||||||
if (enable_sscsm == "singleplayer") { //FIXME: enum
|
if (enable_sscsm == "singleplayer") { //FIXME: enum
|
||||||
auto event1 = std::make_unique<SSCSMEventUpdateVFSFiles>();
|
auto event1 = std::make_unique<SSCSMEventUpdateVFSFiles>();
|
||||||
|
|
||||||
|
// some simple test code
|
||||||
event1->files.emplace_back("sscsm_test0:init.lua",
|
event1->files.emplace_back("sscsm_test0:init.lua",
|
||||||
R"=+=(
|
R"=+=(
|
||||||
print("sscsm_test0: loading")
|
print("sscsm_test0: loading")
|
||||||
|
|
||||||
--print(dump(_G))
|
--print(dump(_G))
|
||||||
--print(debug.traceback())
|
--print(debug.traceback())
|
||||||
|
|
||||||
|
do
|
||||||
|
local pos = vector.zero()
|
||||||
|
local function print_nodes()
|
||||||
|
print(string.format("node at %s: %s", pos, dump(core.get_node_or_nil(pos))))
|
||||||
|
pos = pos:offset(1, 0, 0)
|
||||||
|
core.after(1, print_nodes)
|
||||||
|
end
|
||||||
|
core.after(0, print_nodes)
|
||||||
|
end
|
||||||
)=+=");
|
)=+=");
|
||||||
|
|
||||||
m_sscsm_controller->runEvent(this, std::move(event1));
|
m_sscsm_controller->runEvent(this, std::move(event1));
|
||||||
|
|
||||||
auto event2 = std::make_unique<SSCSMEventLoadMods>();
|
auto event2 = std::make_unique<SSCSMEventLoadMods>();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue