equal
deleted
inserted
replaced
117 Returns a string that is used in the engine in localized form. For example, "Round draw!". Useful to avoid repeating common gameplay-relevant texts in Lua which reduces redundancy. |
117 Returns a string that is used in the engine in localized form. For example, "Round draw!". Useful to avoid repeating common gameplay-relevant texts in Lua which reduces redundancy. |
118 |
118 |
119 * `stringType`: One of: |
119 * `stringType`: One of: |
120 * `"TMsgStrId"` for basic messages (section `01` in `en.txt`) or |
120 * `"TMsgStrId"` for basic messages (section `01` in `en.txt`) or |
121 * `"TGoalStrId"` for strings used to describe game rules in the mission panel (section `05` in `en.txt`) |
121 * `"TGoalStrId"` for strings used to describe game rules in the mission panel (section `05` in `en.txt`) |
122 * `msgId`: The corresponding message ID (see https://hg.hedgewars.org/hedgewars/file/tip/hedgewars/uTypes.pas for a list of IDs; look for `TMsgStrId` and `TGoalStrId`) |
122 * `msgId`: The corresponding message ID (see [StringIDs]) |
123 |
123 |
124 Example: |
124 Example: |
125 <code language="lua"> |
125 <code language="lua"> |
126 -- Shows the "round draw" text from the engine, localized to the player's language |
126 -- Shows the "round draw" text from the engine, localized to the player's language |
127 AddCaption(GetEngineString("TMsgStrId", sidDraw), capcolDefault, capgrpGameState) |
127 AddCaption(GetEngineString("TMsgStrId", sidDraw), capcolDefault, capgrpGameState) |