Add a message_machine wrapper around function_machine, providing simplified message functionality; change ossuary.des to use this.
Signed-off-by: Darshan Shaligram <dshaligram@users.sourceforge.net>
BGWSWJV2FNPFPBFZ67CLWC6KFOQ3UGOY4R7N23PPJMRRYQ3EHMSAC MARKER: L = lua:function_machine( {marker_type="player_at", \func=(function(marker) crawl.mpr("Something ancient and \evil stirs ahead...", "warning") end) } )
MARKER: L = lua:message_machine({marker_type="player_at", message="Something \ancient and evil stirs ahead...", channel="warning" })
function message_machine (pars)local channel = pars.channel or falselocal mtable = {message = pars.message, channel = pars.channel}pars.func = (function(marker, mtable) crawl.mpr(mtable.message, mtable.channel) end)pars.marker_params = mtablereturn FunctionMachine:new(pars)end