static */
| 46 | } |
| 47 | |
| 48 | /* static */ void ScriptController::Break(const std::string &message) |
| 49 | { |
| 50 | if (_network_dedicated || !_settings_client.gui.ai_developer_tools) return; |
| 51 | |
| 52 | ScriptObject::GetActiveInstance().Pause(); |
| 53 | |
| 54 | ScriptLog::Log(ScriptLogTypes::LOG_SQ_ERROR, fmt::format("Break: {}", message)); |
| 55 | |
| 56 | /* Inform script developer that their script has been paused and |
| 57 | * needs manual action to continue. */ |
| 58 | ShowScriptDebugWindow(ScriptObject::GetRootCompany()); |
| 59 | |
| 60 | if (!_pause_mode.Test(PauseMode::Normal)) { |
| 61 | ScriptObject::Command<CMD_PAUSE>::Do(PauseMode::Normal, true); |
| 62 | } |
| 63 | } |
| 64 | |
| 65 | /* static */ void ScriptController::Print(bool error_msg, const std::string &message) |
| 66 | { |
nothing calls this directly
no test coverage detected