OpenTTD Source: src/script/script_info_dummy.cpp File Reference

OpenTTD Source 14.0-beta3

Functions
script_info_dummy.cpp File Reference
`#include "../stdafx.h"`
`#include <squirrel.h>`
`#include "../string_func.h"`
`#include "../strings_func.h"`
`#include "../3rdparty/fmt/format.h"`
`#include "../safeguards.h"`

Go to the source code of this file.

## Functions
void | Script_CreateDummyInfo (HSQUIRRELVM vm, const char *type, const char *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. More...
void | Script_CreateDummy (HSQUIRRELVM vm, StringID string, const char *type)
| Run the dummy AI and let it generate an error message.

## Detailed Description

Implementation of a dummy Script.

Definition in file script_info_dummy.cpp.

## Function Documentation

## ◆ EscapeQuotesAndSlashesAndSplitOnNewLines()

static std::vector<std::string> EscapeQuotesAndSlashesAndSplitOnNewLines | ( | const std::string & | message | ) |
| 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.

Parameters

  message | The message that we want to sanitize for use in Squirrel code.

Returns
  Vector with sanitized strings to use as string constant in Squirrel code.

Definition at line 61 of file script_info_dummy.cpp.

Referenced by Script_CreateDummy().