|
| | ScriptRuntime (toast::Box< toast::Node > node, const std::vector< assets::Handle< assets::Script > > &scripts, uint64_t group=0, std::optional< size_t > placed=std::nullopt) |
|
| ScriptRuntime (const ScriptRuntime &)=delete |
|
auto | operator= (const ScriptRuntime &) -> ScriptRuntime &=delete |
|
void | call (toast::TickFunctionList phase) noexcept |
| | Dispatch a TickFunctionList phase.
|
|
void | call (std::string_view fn_name) noexcept |
| | Call a named function on all instances.
|
|
auto | hasFunction (std::string_view fn_name) const noexcept -> bool |
| | True if any attached script instance exposes a callable field with this name.
|
|
auto | functions () const noexcept -> std::vector< LuaFunctionDesc > |
|
void | callWithLuaStack (std::string_view name, lua_State *l, int args_base, int n_args) noexcept |
|
auto | callEventMethod (std::string_view name, lua_State *l, int event_index) noexcept -> bool |
|
void | callWithAnyArgs (std::string_view name, std::span< const std::any > args) noexcept |
| | Ccall with args provided as std::any values.
|
|
void | setVar (std::string_view name, const std::any &value) noexcept |
| | Writes value to the variable named name.
|
|
auto | getVar (std::string_view name) const noexcept -> std::any |
| | Reads the variable named name.
|
|
auto | luaSignals () const -> std::vector< std::string > |
|
auto | luaSignalConnections (std::string_view name) const -> std::vector< signals::ConnectionInfo > |
|
auto | luaSignalArgTypes (std::string_view name) const -> std::vector< std::string > |
|
auto | connectLuaSignal (std::string_view name, toast::Node &target, std::string_view function, bool forwards_args) -> bool |
|
auto | disconnectLuaSignal (std::string_view name, toast::Node &target, std::string_view function) -> bool |
|
void | clearLuaSignal (std::string_view name) |
|
auto | instanceCount () const noexcept -> size_t |
| | Number of attached script instances.
|
|
auto | instanceSchema (size_t index) const noexcept -> const ScriptSchema * |
| | Schema of one instance.
|
|
auto | instanceScript (size_t index) const noexcept -> std::string_view |
| | Script asset path of one instance.
|
|
auto | getVarByPath (size_t index, std::string_view path) const noexcept -> std::any |
| | Reads a variable of one instance through its schema path.
|
|
auto | setVarByPath (size_t index, std::string_view path, const std::any &value) noexcept -> bool |
| | Writes a variable of one instance through its schema path.
|
|
auto | schemaVersion () const noexcept -> uint32_t |
| | Unique for every runtime that was ever built, so it also tells a rebuilt runtime from the one it replaced.
|
|
auto | hasTick (toast::TickFunctionList mask=toast::TickFunctionList::tick_mask) const noexcept -> bool |
| | True if any instance defines a function matching the given phases.
|
|
auto | stateIndex () const noexcept -> size_t |
| | Index of the pooled Lua state this runtime is bound to.
|
|
auto | token () const noexcept -> const std::shared_ptr< RuntimeToken > & |
| | Flips to dead as the runtime is torn down. Everything that calls into the scripts later holds it.
|
|
auto | executing () const noexcept -> bool |
| | True while a call into this runtime is on some thread's stack.
|