新增自定义动画类,修复道具数量显示功能,更新项目脚本配置,禁用多个项目功能,调整UI元素位置,删除无用文件。
This commit is contained in:
@@ -239,6 +239,8 @@ class Rindro_Script {
|
||||
local Key = Rindro_Script.GetBinString(FindKey);
|
||||
if (Key) {
|
||||
local StrFilePath = Key.tolower();
|
||||
local Type = StrFilePath.slice(0, StrFilePath.find("/")).tolower();
|
||||
getroottable().RindroLoadStringTable.rawset(Type, {});
|
||||
local StrFile = R_Utils.GetScriptFileReader(StrFilePath, 10240000);
|
||||
if (StrFile) {
|
||||
local StrBuffer = StrFile.Buffer.readUtf8String(StrFile.Size);
|
||||
@@ -247,7 +249,7 @@ class Rindro_Script {
|
||||
if (strobj.find(">") != null) {
|
||||
local strobjarr = split(strobj, ">");
|
||||
if (strobjarr.len() > 1) {
|
||||
getroottable().RindroLoadStringTable.rawset(strobjarr[0], Sq_ConvertWideChar(strobjarr[1], "big5"));
|
||||
getroottable().RindroLoadStringTable[Type].rawset(strobjarr[0], Sq_ConvertWideChar(strobjarr[1], "big5"));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -293,17 +295,28 @@ class Rindro_Script {
|
||||
}
|
||||
}
|
||||
|
||||
function GetLoadString(Key) {
|
||||
if (getroottable().RindroLoadStringTable.rawin(Key)) return getroottable().RindroLoadStringTable[Key];
|
||||
function GetLoadString(Type, Key) {
|
||||
if (getroottable().RindroLoadStringTable.rawin(Type) && getroottable().RindroLoadStringTable[Type].rawin(Key)) return getroottable().RindroLoadStringTable[Type][Key];
|
||||
else return "";
|
||||
}
|
||||
|
||||
function UnpackData(IO, i) {
|
||||
function UnpackData(IO, i, Type) {
|
||||
local out = "";
|
||||
IO.seek(i); //内容指示位
|
||||
local currentByte = IO.readn('c'); //内容指示位
|
||||
local after = IO.GetInt();
|
||||
switch (currentByte) {
|
||||
case 9: {
|
||||
local NewcurrentByte = IO.readn('c');
|
||||
local Newafter = IO.GetInt();
|
||||
local Buf = Rindro_Script.GetBinString(after);
|
||||
if (!Buf) {
|
||||
Buf = "";
|
||||
} else {
|
||||
Buf = Rindro_Script.GetLoadString(Type, Buf);
|
||||
}
|
||||
return Buf;
|
||||
}
|
||||
case 10: {
|
||||
IO.seek(i - 4);
|
||||
local Before = IO.readn('i');
|
||||
@@ -311,7 +324,7 @@ class Rindro_Script {
|
||||
if (!Buf) {
|
||||
Buf = "";
|
||||
} else {
|
||||
Buf = "<" + Before + "::" + Buf + "`" + Rindro_Script.GetLoadString(Buf) + "`>";
|
||||
Buf = "<" + Before + "::" + Buf + "`" + Rindro_Script.GetLoadString(Type, Buf) + "`>";
|
||||
}
|
||||
Buf = Buf + "\r\n";
|
||||
out += Buf;
|
||||
@@ -327,8 +340,7 @@ class Rindro_Script {
|
||||
Bbuf.writen(after, 'i');
|
||||
Bbuf.seek(0);
|
||||
local Buf = Bbuf.readn('f');
|
||||
out += after + '\t';
|
||||
break;
|
||||
return Buf;
|
||||
}
|
||||
case 6:
|
||||
case 8:
|
||||
@@ -338,15 +350,8 @@ class Rindro_Script {
|
||||
if (!Buf) Buf = "";
|
||||
return Buf;
|
||||
}
|
||||
case 9: {
|
||||
IO.seek(i + 6);
|
||||
local Before = IO.readn('i');
|
||||
local Buf = Rindro_Script.GetBinString(Before);
|
||||
out += Rindro_Script.GetLoadString(Buf);
|
||||
}
|
||||
default:
|
||||
out += "";
|
||||
break;
|
||||
return "";
|
||||
}
|
||||
|
||||
return out;
|
||||
@@ -363,24 +368,24 @@ class Rindro_Script {
|
||||
local i = 2;
|
||||
while (true) {
|
||||
if (i< ReadObject.Size && ReadObject.Size - i >= 5) {
|
||||
local str = Rindro_Script.UnpackData(IO, i);
|
||||
local str = Rindro_Script.UnpackData(IO, i, "equipment");
|
||||
i += 5;
|
||||
|
||||
//名称
|
||||
if (str == "[name]") {
|
||||
local RealKey = str.slice(1, str.len() - 1);
|
||||
EquipmentAtt[RealKey] <- Rindro_Script.UnpackData(IO, i);
|
||||
EquipmentAtt[RealKey] <- Rindro_Script.UnpackData(IO, i, "equipment");
|
||||
i += 5;
|
||||
}
|
||||
//装备类型
|
||||
else if (str == "[equipment type]") {
|
||||
local Buf = Rindro_Script.UnpackData(IO, i);
|
||||
local Buf = Rindro_Script.UnpackData(IO, i, "equipment");
|
||||
EquipmentAtt["equipment_type"] <- Buf.slice(1, -1);
|
||||
i += 5;
|
||||
}
|
||||
//称号动画
|
||||
else if (str == "[custom animation]") {
|
||||
local Buf = Rindro_Script.UnpackData(IO, i).tolower();
|
||||
local Buf = Rindro_Script.UnpackData(IO, i, "equipment").tolower();
|
||||
EquipmentAtt["custom_animation"] <- Buf;
|
||||
i += 5;
|
||||
}
|
||||
@@ -389,12 +394,12 @@ class Rindro_Script {
|
||||
EquipmentAtt["Aurora"] <- {};
|
||||
EquipmentAtt["Aurora"].Back <- [];
|
||||
EquipmentAtt["Aurora"].Front <- [];
|
||||
local Count = Rindro_Script.UnpackData(IO, i);
|
||||
local Count = Rindro_Script.UnpackData(IO, i, "equipment");
|
||||
i += 5;
|
||||
for (local z = 0; z< Count; z++) {
|
||||
local Layer = Rindro_Script.UnpackData(IO, i);
|
||||
local Layer = Rindro_Script.UnpackData(IO, i, "equipment");
|
||||
i += 5;
|
||||
local Path = Rindro_Script.UnpackData(IO, i).tolower();
|
||||
local Path = Rindro_Script.UnpackData(IO, i, "equipment").tolower();
|
||||
i += 5;
|
||||
if (Layer == 0) EquipmentAtt["Aurora"].Back.append(Path);
|
||||
if (Layer == 1) EquipmentAtt["Aurora"].Front.append(Path);
|
||||
@@ -405,7 +410,7 @@ class Rindro_Script {
|
||||
else if (str == "[hide layer]") {
|
||||
EquipmentAtt["hidelayer"] <- [];
|
||||
while (true) {
|
||||
local Buffer = Rindro_Script.UnpackData(IO, i);
|
||||
local Buffer = Rindro_Script.UnpackData(IO, i, "equipment");
|
||||
i += 5;
|
||||
if (Buffer == "[/hide layer]") {
|
||||
break;
|
||||
@@ -415,7 +420,7 @@ class Rindro_Script {
|
||||
}
|
||||
//Ani
|
||||
else if (str == "[animation job]") {
|
||||
local Job = Rindro_Script.UnpackData(IO, i).slice(1, -1);
|
||||
local Job = Rindro_Script.UnpackData(IO, i, "equipment").slice(1, -1);
|
||||
local SpacePos = Job.find(" ");
|
||||
if (SpacePos) {
|
||||
Job = Job.slice(0, SpacePos) + Job.slice(SpacePos + 1);
|
||||
@@ -424,24 +429,24 @@ class Rindro_Script {
|
||||
EquipmentAtt["Ani_" + Job] <- {};
|
||||
i += 5;
|
||||
|
||||
local Index1 = Rindro_Script.UnpackData(IO, i);
|
||||
local Index1 = Rindro_Script.UnpackData(IO, i, "equipment");
|
||||
i += 5;
|
||||
local Index2 = Rindro_Script.UnpackData(IO, i);
|
||||
local Index2 = Rindro_Script.UnpackData(IO, i, "equipment");
|
||||
i += 5;
|
||||
EquipmentAtt["Ani_" + Job].variation <- [Index1, Index2];
|
||||
EquipmentAtt["Ani_" + Job].layer_variation <- [];
|
||||
while (true) {
|
||||
try {
|
||||
local Ret = Rindro_Script.UnpackData(IO, i);
|
||||
local Ret = Rindro_Script.UnpackData(IO, i, "equipment");
|
||||
i += 5;
|
||||
if (Ret == "[animation job]" || (Rindro_Script.endswith(Ret, "]") && Ret != "[equipment ani script]" && Ret != "[layer variation]")) {
|
||||
i -= 5;
|
||||
break;
|
||||
} else if (Ret == "[layer variation]") {
|
||||
local InfoBuf = {};
|
||||
InfoBuf.Zorder <- Rindro_Script.UnpackData(IO, i);
|
||||
InfoBuf.Zorder <- Rindro_Script.UnpackData(IO, i, "equipment");
|
||||
i += 5;
|
||||
InfoBuf.Path <- Rindro_Script.UnpackData(IO, i);
|
||||
InfoBuf.Path <- Rindro_Script.UnpackData(IO, i, "equipment");
|
||||
i += 5;
|
||||
EquipmentAtt["Ani_" + Job].layer_variation.append(InfoBuf);
|
||||
}
|
||||
@@ -692,13 +697,14 @@ class Rindro_Script {
|
||||
function ResolvingData(IO, Func, Path) {
|
||||
local DataTable = {};
|
||||
DataTable.filepath <- Path;
|
||||
local Type = Path.slice(0, Path.find("/")).tolower();
|
||||
local DataArr = [];
|
||||
local Length = IO.len();
|
||||
if (Length >= 7) {
|
||||
local i = 2;
|
||||
while (true) {
|
||||
if (i< Length && Length - i >= 5) {
|
||||
local str = Rindro_Script.UnpackData(IO, i);
|
||||
local str = Rindro_Script.UnpackData(IO, i, Type);
|
||||
i += 5;
|
||||
DataArr.push(str);
|
||||
} else break;
|
||||
|
||||
Reference in New Issue
Block a user