Loading data/modules/match.lua +2 −2 Original line number Diff line number Diff line Loading @@ -268,9 +268,9 @@ local function match_loop(context, dispatcher, tick, state, messages) print("match " .. context.match_id .. " tick " .. tick) print("match " .. context.match_id .. " messages:\n" .. du.print_r(messages)) end -- if tick < 10 then if tick < 10 then return state -- end end end --[[ Loading data/modules/runonce_check.lua +11 −0 Original line number Diff line number Diff line Loading @@ -22,8 +22,19 @@ local nk = require("nakama") nk.run_once(function(context) assert(context.execution_mode, "run_once") -- nk.match_create("match", {debug = true}) end) nk.run_once(function(context) error("Should not be executed.") end) local function rpc_signal(context, payload) local matches = nk.match_list(1, true) if #matches < 1 then error("no matches") end return nk.match_signal(matches[1].match_id, payload) end nk.register_rpc(rpc_signal, "rpc_signal") Loading
data/modules/match.lua +2 −2 Original line number Diff line number Diff line Loading @@ -268,9 +268,9 @@ local function match_loop(context, dispatcher, tick, state, messages) print("match " .. context.match_id .. " tick " .. tick) print("match " .. context.match_id .. " messages:\n" .. du.print_r(messages)) end -- if tick < 10 then if tick < 10 then return state -- end end end --[[ Loading
data/modules/runonce_check.lua +11 −0 Original line number Diff line number Diff line Loading @@ -22,8 +22,19 @@ local nk = require("nakama") nk.run_once(function(context) assert(context.execution_mode, "run_once") -- nk.match_create("match", {debug = true}) end) nk.run_once(function(context) error("Should not be executed.") end) local function rpc_signal(context, payload) local matches = nk.match_list(1, true) if #matches < 1 then error("no matches") end return nk.match_signal(matches[1].match_id, payload) end nk.register_rpc(rpc_signal, "rpc_signal")