mirror of
https://github.com/Qsgs-Fans/FreeKill.git
synced 2024-11-16 11:42:45 +08:00
modify algorithm
This commit is contained in:
parent
d5832b824b
commit
271001c562
|
@ -545,11 +545,11 @@ function processPrompt(prompt) {
|
||||||
raw = raw.replace(/%dest/g, luatr(getPhoto(dest).general));
|
raw = raw.replace(/%dest/g, luatr(getPhoto(dest).general));
|
||||||
|
|
||||||
if (data.length > 3) {
|
if (data.length > 3) {
|
||||||
for (let i = 4; i < data.length; i++) {
|
for (let i = data.length - 1; i > 3; i--) {
|
||||||
raw = raw.replace(new RegExp("%arg" + (i - 2), "g"), data[i]);
|
raw = raw.replace(new RegExp("%arg" + (i - 2), "g"), luatr(data[i]));
|
||||||
}
|
}
|
||||||
|
|
||||||
raw = raw.replace(new RegExp("%arg", "g"), data[3]);
|
raw = raw.replace(new RegExp("%arg", "g"), luatr(data[3]));
|
||||||
}
|
}
|
||||||
return raw;
|
return raw;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user