So far I found engine.interface.PlayerRest, which seems to be what I want. However, if I call PlayerRest.initRest() it calls PlayerRest.checkRest(), which is defined as:
Code: Select all
function _M:restCheck()
return false, "player:restCheck() method not defined"
end
Actual question: How do you initiate player resting from the code?
If it helps, here is the current contents of my superload/engine/interface/PlayerRest.lua:
Code: Select all
local Player = require "mod.class.Player"
local _M = loadPrevious(...)
function _M:restCheck()
game.log("#RED#overload functional") -- Just so I can see an effect in the console
return Player.restCheck()
end
return _M