Changeset - r28393:22113f00c2f2
[Not reviewed]
master
0 1 0
Jonathan G Rennison - 11 months ago 2024-01-04 01:51:40
j.g.rennison@gmail.com
Change: Allow STRING/STRINGN to use all remaining parameters in game script mode
1 file changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/strings.cpp
Show inline comments
 
@@ -1118,7 +1118,7 @@ static void FormatString(StringBuilder &
 
				StringID string_id = args.GetNextParameter<StringID>();
 
				if (game_script && GetStringTab(string_id) != TEXT_TAB_GAMESCRIPT_START) break;
 
				/* It's prohibited for the included string to consume any arguments. */
 
				StringParameters tmp_params(args, 0);
 
				StringParameters tmp_params(args, game_script ? args.GetDataLeft() : 0);
 
				GetStringWithArgs(builder, string_id, tmp_params, next_substr_case_index, game_script);
 
				next_substr_case_index = 0;
 
				break;
 
@@ -1138,7 +1138,7 @@ static void FormatString(StringBuilder &
 
				if (game_script && size > args.GetDataLeft()) {
 
					builder += "(too many parameters)";
 
				} else {
 
					StringParameters sub_args(args, size);
 
					StringParameters sub_args(args, game_script ? args.GetDataLeft() : size);
 
					GetStringWithArgs(builder, string_id, sub_args, next_substr_case_index, game_script);
 
					args.AdvanceOffset(size);
 
				}
0 comments (0 inline, 0 general)