Skip to content

Commit

Permalink
dynrpg raw - support destiny constants
Browse files Browse the repository at this point in the history
implementation is a bit ugly, need help to clear this
  • Loading branch information
jetrotal committed Nov 1, 2023
1 parent 351b918 commit 5259545
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions src/dynrpg_easyrpg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,24 @@ bool DynRpg::EasyRpgPlugin::EasyRaw(dyn_arg_list args, Game_Interpreter* interpr
}

for (size_t i = 2; i < args.size(); ++i) {
auto [int_arg] = DynRpg::ParseArgs<int>(func, args.subspan(i), &okay);
output_args.push_back(int_arg);


auto currArg = args[i];

if (currArg.find("@") == 0) {
currArg = currArg.substr(1);
currArg = Constants.get("DestinyScript", currArg);

auto int_arg = stoi(currArg);
okay = bool(int_arg);
output_args.push_back(int_arg);
}
else {
auto [int_arg] = DynRpg::ParseArgs<int>(func, args.subspan(i), &okay);
output_args.push_back(int_arg);
}


if (!okay) {
return true;
}
Expand Down

0 comments on commit 5259545

Please sign in to comment.