Skip to content

Commit 5fd9447

Browse files
committed
DynRPG - easyrpg_raw: Numeric Parameters can call destiny constants
implementation is a bit ugly, need help to clear this
1 parent 51db8bf commit 5fd9447

1 file changed

Lines changed: 18 additions & 2 deletions

File tree

src/dynrpg_easyrpg.cpp

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,24 @@ bool DynRpg::EasyRpgPlugin::EasyRaw(dyn_arg_list args, Game_Interpreter* interpr
134134
}
135135

136136
for (size_t i = 2; i < args.size(); ++i) {
137-
auto [int_arg] = DynRpg::ParseArgs<int>(func, args.subspan(i), &okay);
138-
output_args.push_back(int_arg);
137+
138+
139+
auto currArg = args[i];
140+
141+
if (currArg.find("@") == 0) {
142+
currArg = currArg.substr(1);
143+
currArg = Constants.get("DestinyScript", currArg);
144+
145+
auto int_arg = stoi(currArg);
146+
okay = true;
147+
output_args.push_back(int_arg);
148+
}
149+
else {
150+
auto [int_arg] = DynRpg::ParseArgs<int>(func, args.subspan(i), &okay);
151+
output_args.push_back(int_arg);
152+
}
153+
154+
139155
if (!okay) {
140156
return true;
141157
}

0 commit comments

Comments
 (0)