| 214 | } |
| 215 | |
| 216 | int LuaScriptInterface::Autorun() |
| 217 | { |
| 218 | if (!Platform::FileExists("autorun.lua")) |
| 219 | { |
| 220 | lua_pushliteral(L, "autorun.lua not found"); |
| 221 | return 1; |
| 222 | } |
| 223 | if (luaL_loadfile(L, "autorun.lua") || tpt_lua_pcall(L, 0, 0, 0, eventTraitInterface)) |
| 224 | { |
| 225 | Log(CommandInterface::LogError, LuaGetError()); |
| 226 | return 1; |
| 227 | } |
| 228 | Log(CommandInterface::LogWarning, "Loaded autorun.lua"); |
| 229 | return 0; |
| 230 | } |
| 231 | |
| 232 | void CommandInterface::SetToolIndex(ByteString identifier, std::optional<int> index) |
| 233 | { |
no test coverage detected