| 92 | } |
| 93 | |
| 94 | bool command_method(const char *method, color_ostream &out) { |
| 95 | // Calls a lua function with no parameters. |
| 96 | |
| 97 | auto L = Lua::Core::State; |
| 98 | Lua::StackUnwinder top(L); |
| 99 | |
| 100 | if (!lua_checkstack(L, 1)) |
| 101 | return false; |
| 102 | |
| 103 | if (!Lua::PushModulePublic(out, L, "plugins.stockflow", method)) |
| 104 | return false; |
| 105 | |
| 106 | if (!Lua::SafeCall(out, L, 0, 0)) |
| 107 | return false; |
| 108 | |
| 109 | return true; |
| 110 | } |
| 111 | |
| 112 | bool stockpile_method(const char *method, building_stockpilest *sp) { |
| 113 | // Combines the select_order and toggle_trigger method calls, |
no test coverage detected