|
OpenTTD Source 20251104-master-g3befbdd52f
|
Implementation of a dummy Script. More...
#include "../stdafx.h"#include <squirrel.h>#include "../string_func.h"#include "../strings_func.h"#include "../core/format.hpp"#include "../safeguards.h"Go to the source code of this file.
Functions | |
| void | Script_CreateDummyInfo (HSQUIRRELVM vm, std::string_view type, std::string_view dir) |
| Run the dummy info.nut. | |
| static std::vector< std::string > | EscapeQuotesAndSlashesAndSplitOnNewLines (const std::string &message) |
| Split the given message on newlines (' ') and escape quotes and (back)slashes, so they can be properly interpreted as string constants by the Squirrel compiler. | |
| void | Script_CreateDummy (HSQUIRRELVM vm, StringID string, std::string_view type) |
| Run the dummy AI and let it generate an error message. | |
Implementation of a dummy Script.
Definition in file script_info_dummy.cpp.
|
static |
Split the given message on newlines ('
') and escape quotes and (back)slashes, so they can be properly interpreted as string constants by the Squirrel compiler.
| message | The message that we want to sanitize for use in Squirrel code. |
Definition at line 61 of file script_info_dummy.cpp.
Referenced by Script_CreateDummy().
| void Script_CreateDummy | ( | HSQUIRRELVM | vm, |
| StringID | string, | ||
| std::string_view | type | ||
| ) |
Run the dummy AI and let it generate an error message.
Definition at line 81 of file script_info_dummy.cpp.
References EscapeQuotesAndSlashesAndSplitOnNewLines(), and GetString().
Referenced by AIInstance::LoadDummyScript().
| void Script_CreateDummyInfo | ( | HSQUIRRELVM | vm, |
| std::string_view | type, | ||
| std::string_view | dir | ||
| ) |
Run the dummy info.nut.
Definition at line 29 of file script_info_dummy.cpp.