|
@@ -40,25 +40,43 @@ public class Menu : MonoBehaviour
|
|
|
|
|
|
public static bool ProcScript(Maid maid, string filename, bool f_bTemp = false, SubProp f_SubProp = null)
|
|
|
{
|
|
|
+ return Menu.ProcScript(maid, new MaidProp
|
|
|
+ {
|
|
|
+ strFileName = filename,
|
|
|
+ strTempFileName = filename
|
|
|
+ }, f_bTemp, f_SubProp);
|
|
|
+ }
|
|
|
+
|
|
|
+ public static bool ProcScript(Maid maid, MaidProp mp, bool f_bTemp = false, SubProp f_SubProp = null)
|
|
|
+ {
|
|
|
+ string text;
|
|
|
+ if (f_bTemp)
|
|
|
+ {
|
|
|
+ text = mp.strTempFileName;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ text = mp.strFileName;
|
|
|
+ }
|
|
|
bool flag = false;
|
|
|
- string text = string.Empty;
|
|
|
+ string text2 = string.Empty;
|
|
|
byte[] array = null;
|
|
|
- if (filename.IndexOf("mod_") == 0)
|
|
|
+ if (text.IndexOf("mod_") == 0)
|
|
|
{
|
|
|
flag = true;
|
|
|
- text = Menu.GetModPathFileName(filename);
|
|
|
- if (string.IsNullOrEmpty(text))
|
|
|
+ text2 = Menu.GetModPathFileName(text);
|
|
|
+ if (string.IsNullOrEmpty(text2))
|
|
|
{
|
|
|
return false;
|
|
|
}
|
|
|
- filename = Menu.GetBaseItemFromMod(text);
|
|
|
+ text = Menu.GetBaseItemFromMod(text2);
|
|
|
try
|
|
|
{
|
|
|
- using (FileStream fileStream = new FileStream(text, FileMode.Open))
|
|
|
+ using (FileStream fileStream = new FileStream(text2, FileMode.Open))
|
|
|
{
|
|
|
if (fileStream == null)
|
|
|
{
|
|
|
- Debug.LogWarning("MODアイテムメニューファイルが見つかりません。" + filename);
|
|
|
+ Debug.LogWarning("MODアイテムメニューファイルが見つかりません。" + text);
|
|
|
return false;
|
|
|
}
|
|
|
array = new byte[fileStream.Length];
|
|
@@ -67,18 +85,18 @@ public class Menu : MonoBehaviour
|
|
|
}
|
|
|
catch (Exception ex)
|
|
|
{
|
|
|
- Debug.LogError("ProcScript MODアイテムメニューファイルが読み込めませんでした。 : " + filename + " : " + ex.Message);
|
|
|
+ Debug.LogError("ProcScript MODアイテムメニューファイルが読み込めませんでした。 : " + text + " : " + ex.Message);
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
|
byte[] cd = null;
|
|
|
try
|
|
|
{
|
|
|
- using (AFileBase afileBase = GameUty.FileOpen(filename, null))
|
|
|
+ using (AFileBase afileBase = GameUty.FileOpen(text, null))
|
|
|
{
|
|
|
if (afileBase == null || !afileBase.IsValid())
|
|
|
{
|
|
|
- Debug.LogError("アイテムメニューファイルが見つかりません。" + filename);
|
|
|
+ Debug.LogError("アイテムメニューファイルが見つかりません。" + text);
|
|
|
return false;
|
|
|
}
|
|
|
cd = afileBase.ReadAll();
|
|
@@ -86,74 +104,107 @@ public class Menu : MonoBehaviour
|
|
|
}
|
|
|
catch (Exception ex2)
|
|
|
{
|
|
|
- Debug.LogError("ProcScript アイテムメニューファイルが読み込めませんでした。 : " + filename + " : " + ex2.Message);
|
|
|
+ Debug.LogError("ProcScript アイテムメニューファイルが読み込めませんでした。 : " + text + " : " + ex2.Message);
|
|
|
return false;
|
|
|
}
|
|
|
- Menu.ProcScriptBin(maid, cd, filename, f_bTemp, f_SubProp);
|
|
|
+ Menu.ProcScriptBin(maid, cd, mp, f_bTemp, f_SubProp);
|
|
|
if (flag)
|
|
|
{
|
|
|
- Menu.ProcModScriptBin(maid, array, text, false);
|
|
|
+ Menu.ProcModScriptBin(maid, array, text2, false);
|
|
|
}
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
private static void ProcScriptBin(Maid maid, byte[] cd, string filename, bool f_bTemp = false, SubProp f_SubProp = null)
|
|
|
{
|
|
|
+ Menu.ProcScriptBin(maid, cd, new MaidProp
|
|
|
+ {
|
|
|
+ strFileName = filename,
|
|
|
+ strTempFileName = filename
|
|
|
+ }, f_bTemp, f_SubProp);
|
|
|
+ }
|
|
|
+
|
|
|
+ private static void ProcScriptBin(Maid maid, byte[] cd, MaidProp mp, bool f_bTemp = false, SubProp f_SubProp = null)
|
|
|
+ {
|
|
|
+ string text;
|
|
|
+ if (f_bTemp)
|
|
|
+ {
|
|
|
+ text = mp.strTempFileName;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ text = mp.strFileName;
|
|
|
+ }
|
|
|
TBody body = maid.body0;
|
|
|
+ if (mp.idx == 61 || mp.idx == 64 || mp.idx == 65 || mp.idx == 66)
|
|
|
+ {
|
|
|
+ TBodySkin slot = body.GetSlot(1);
|
|
|
+ if (slot.PartsVersion < 110)
|
|
|
+ {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
List<Menu.LastParam> list = new List<Menu.LastParam>();
|
|
|
BinaryReader binaryReader = new BinaryReader(new MemoryStream(cd), Encoding.UTF8);
|
|
|
- string text = binaryReader.ReadString();
|
|
|
- NDebug.Assert(text == "CM3D2_MENU", "ProcScriptBin 例外 : ヘッダーファイルが不正です。" + text);
|
|
|
- int num = binaryReader.ReadInt32();
|
|
|
- string str = binaryReader.ReadString();
|
|
|
string text2 = binaryReader.ReadString();
|
|
|
+ NDebug.Assert(text2 == "CM3D2_MENU", "ProcScriptBin 例外 : ヘッダーファイルが不正です。" + text2);
|
|
|
+ int num = binaryReader.ReadInt32();
|
|
|
string text3 = binaryReader.ReadString();
|
|
|
string text4 = binaryReader.ReadString();
|
|
|
+ string text5 = binaryReader.ReadString();
|
|
|
+ string text6 = binaryReader.ReadString();
|
|
|
long num2 = (long)binaryReader.ReadInt32();
|
|
|
bool flag = false;
|
|
|
- string text5 = string.Empty;
|
|
|
- string text6 = string.Empty;
|
|
|
string text7 = string.Empty;
|
|
|
+ string text8 = string.Empty;
|
|
|
+ string text9 = string.Empty;
|
|
|
string slotname = string.Empty;
|
|
|
+ int version = 100;
|
|
|
for (;;)
|
|
|
{
|
|
|
try
|
|
|
{
|
|
|
for (;;)
|
|
|
{
|
|
|
- IL_90:
|
|
|
+ IL_102:
|
|
|
int num3 = (int)binaryReader.ReadByte();
|
|
|
- text6 = text5;
|
|
|
- text5 = string.Empty;
|
|
|
+ text8 = text7;
|
|
|
+ text7 = string.Empty;
|
|
|
if (num3 == 0)
|
|
|
{
|
|
|
break;
|
|
|
}
|
|
|
for (int i = 0; i < num3; i++)
|
|
|
{
|
|
|
- text5 = text5 + "\"" + binaryReader.ReadString() + "\" ";
|
|
|
+ text7 = text7 + "\"" + binaryReader.ReadString() + "\" ";
|
|
|
}
|
|
|
- if (!(text5 == string.Empty))
|
|
|
+ if (!(text7 == string.Empty))
|
|
|
{
|
|
|
- goto IL_F5;
|
|
|
+ goto IL_169;
|
|
|
}
|
|
|
}
|
|
|
break;
|
|
|
- IL_F5:
|
|
|
- string stringCom = UTY.GetStringCom(text5);
|
|
|
- string[] stringList = UTY.GetStringList(text5);
|
|
|
+ IL_169:
|
|
|
+ string stringCom = UTY.GetStringCom(text7);
|
|
|
+ string[] stringList = UTY.GetStringList(text7);
|
|
|
if (stringCom == "end")
|
|
|
{
|
|
|
break;
|
|
|
}
|
|
|
if (stringCom == "name")
|
|
|
{
|
|
|
- goto IL_1057;
|
|
|
+ goto IL_13C4;
|
|
|
+ }
|
|
|
+ if (stringCom == "ver")
|
|
|
+ {
|
|
|
+ TBodySkin slot2 = body.GetSlot(stringList[1]);
|
|
|
+ version = int.Parse(stringList[2]);
|
|
|
+ goto IL_13C4;
|
|
|
}
|
|
|
if (stringCom == "アイテム")
|
|
|
{
|
|
|
Menu.SetMaidItemTemp(maid, stringList[1], f_bTemp);
|
|
|
- goto IL_1057;
|
|
|
+ goto IL_13C4;
|
|
|
}
|
|
|
if (stringCom == "アイテム条件")
|
|
|
{
|
|
@@ -161,46 +212,46 @@ public class Menu : MonoBehaviour
|
|
|
if (stringList[2] == "に何か")
|
|
|
{
|
|
|
bool flag2 = false;
|
|
|
- TBodySkin slot = body.GetSlot(slotname2);
|
|
|
+ TBodySkin slot3 = body.GetSlot(slotname2);
|
|
|
if (stringList[3] == "有る")
|
|
|
{
|
|
|
- if (slot.obj != null)
|
|
|
+ if (slot3.obj != null)
|
|
|
{
|
|
|
flag2 = true;
|
|
|
}
|
|
|
}
|
|
|
else if (stringList[3] == "無い")
|
|
|
{
|
|
|
- if (slot.obj == null)
|
|
|
+ if (slot3.obj == null)
|
|
|
{
|
|
|
flag2 = true;
|
|
|
}
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- NDebug.Assert("アイテム条件が不正です。「有る」か「無い」かを指定してください。\n" + text5, false);
|
|
|
+ NDebug.Assert("アイテム条件が不正です。「有る」か「無い」かを指定してください。\n" + text7, false);
|
|
|
}
|
|
|
if (stringList[4] == "なら")
|
|
|
{
|
|
|
if (flag2)
|
|
|
{
|
|
|
Menu.SetMaidItemTemp(maid, stringList[5], f_bTemp);
|
|
|
- goto IL_222;
|
|
|
+ goto IL_2C3;
|
|
|
}
|
|
|
- goto IL_222;
|
|
|
- IL_222:
|
|
|
- goto IL_239;
|
|
|
+ goto IL_2C3;
|
|
|
+ IL_2C3:
|
|
|
+ goto IL_2DA;
|
|
|
}
|
|
|
- NDebug.Assert("アイテム条件が不正です。「なら」が必要です。\n" + text5, false);
|
|
|
- goto IL_239;
|
|
|
- IL_239:
|
|
|
- goto IL_36D;
|
|
|
+ NDebug.Assert("アイテム条件が不正です。「なら」が必要です。\n" + text7, false);
|
|
|
+ goto IL_2DA;
|
|
|
+ IL_2DA:
|
|
|
+ goto IL_40E;
|
|
|
}
|
|
|
if (stringList[2] == "が")
|
|
|
{
|
|
|
bool flag3 = false;
|
|
|
- TBodySkin slot2 = body.GetSlot(slotname2);
|
|
|
- if (slot2.m_strModelFileName == stringList[3])
|
|
|
+ TBodySkin slot4 = body.GetSlot(slotname2);
|
|
|
+ if (slot4.m_strModelFileName == stringList[3])
|
|
|
{
|
|
|
flag3 = true;
|
|
|
}
|
|
@@ -209,24 +260,24 @@ public class Menu : MonoBehaviour
|
|
|
if (flag3)
|
|
|
{
|
|
|
Menu.SetMaidItemTemp(maid, stringList[5], f_bTemp);
|
|
|
- goto IL_29E;
|
|
|
+ goto IL_33F;
|
|
|
}
|
|
|
- goto IL_29E;
|
|
|
- IL_29E:
|
|
|
- goto IL_2B5;
|
|
|
+ goto IL_33F;
|
|
|
+ IL_33F:
|
|
|
+ goto IL_356;
|
|
|
}
|
|
|
- NDebug.Assert("アイテム条件が不正です。「なら」が必要です。\n" + text5, false);
|
|
|
- goto IL_2B5;
|
|
|
- IL_2B5:
|
|
|
- goto IL_36D;
|
|
|
+ NDebug.Assert("アイテム条件が不正です。「なら」が必要です。\n" + text7, false);
|
|
|
+ goto IL_356;
|
|
|
+ IL_356:
|
|
|
+ goto IL_40E;
|
|
|
}
|
|
|
if (!(stringList[2] == "のアイテムパラメータの"))
|
|
|
{
|
|
|
- goto IL_36D;
|
|
|
+ goto IL_40E;
|
|
|
}
|
|
|
bool flag4 = false;
|
|
|
- TBodySkin slot3 = body.GetSlot(slotname2);
|
|
|
- string param = slot3.GetParam(stringList[3].ToLower());
|
|
|
+ TBodySkin slot5 = body.GetSlot(slotname2);
|
|
|
+ string param = slot5.GetParam(stringList[3].ToLower());
|
|
|
if (stringList[4] == "が")
|
|
|
{
|
|
|
if (stringList[5].ToLower() == param)
|
|
@@ -236,104 +287,144 @@ public class Menu : MonoBehaviour
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- NDebug.Assert("アイテム条件が不正です。「が」が必要です。\n" + text5, false);
|
|
|
+ NDebug.Assert("アイテム条件が不正です。「が」が必要です。\n" + text7, false);
|
|
|
}
|
|
|
if (stringList[6] == "なら")
|
|
|
{
|
|
|
if (flag4)
|
|
|
{
|
|
|
Menu.SetMaidItemTemp(maid, stringList[7], f_bTemp);
|
|
|
- goto IL_356;
|
|
|
+ goto IL_3F7;
|
|
|
}
|
|
|
- goto IL_356;
|
|
|
- IL_356:
|
|
|
- goto IL_36D;
|
|
|
+ goto IL_3F7;
|
|
|
+ IL_3F7:
|
|
|
+ goto IL_40E;
|
|
|
}
|
|
|
- NDebug.Assert("アイテム条件が不正です。「なら」が必要です。\n" + text5, false);
|
|
|
- goto IL_36D;
|
|
|
- IL_36D:
|
|
|
- goto IL_1057;
|
|
|
+ NDebug.Assert("アイテム条件が不正です。「なら」が必要です。\n" + text7, false);
|
|
|
+ goto IL_40E;
|
|
|
+ IL_40E:
|
|
|
+ goto IL_13C4;
|
|
|
+ }
|
|
|
+ if (stringCom == "if")
|
|
|
+ {
|
|
|
+ if (stringList[1].IndexOf("maidprop[") != 0)
|
|
|
+ {
|
|
|
+ goto IL_58E;
|
|
|
+ }
|
|
|
+ string value = stringList[1].Substring(9, stringList[1].Length - 9 - 1);
|
|
|
+ MPN mpn = (MPN)Enum.Parse(typeof(MPN), value, false);
|
|
|
+ MaidProp prop = maid.GetProp(mpn);
|
|
|
+ if (!(stringList[2] == "==") || !(stringList[3] == "nothing") || prop.nFileNameRID != 0 || !(stringList[4] == "?") || stringList[5].IndexOf("setprop[") != 0)
|
|
|
+ {
|
|
|
+ goto IL_58E;
|
|
|
+ }
|
|
|
+ string value2 = stringList[5].Substring(8, stringList[5].Length - 8 - 1);
|
|
|
+ MPN idx = (MPN)Enum.Parse(typeof(MPN), value2, false);
|
|
|
+ if (!(stringList[6] == "="))
|
|
|
+ {
|
|
|
+ goto IL_58E;
|
|
|
+ }
|
|
|
+ string text10;
|
|
|
+ if (stringList[7].IndexOf("getprop[") == 0)
|
|
|
+ {
|
|
|
+ string value3 = stringList[7].Substring(8, stringList[7].Length - 8 - 1);
|
|
|
+ MPN mpn2 = (MPN)Enum.Parse(typeof(MPN), value3, false);
|
|
|
+ MaidProp prop2 = maid.GetProp(mpn2);
|
|
|
+ text10 = prop2.strFileName;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ text10 = stringList[7];
|
|
|
+ }
|
|
|
+ if (!string.IsNullOrEmpty(text10))
|
|
|
+ {
|
|
|
+ maid.SetProp(idx, text10, 0, false, false);
|
|
|
+ goto IL_58E;
|
|
|
+ }
|
|
|
+ goto IL_58E;
|
|
|
+ IL_58E:
|
|
|
+ goto IL_13C4;
|
|
|
}
|
|
|
if (stringCom == "アイテムパラメータ")
|
|
|
{
|
|
|
if (stringList.Length == 4)
|
|
|
{
|
|
|
- string text8 = stringList[1];
|
|
|
- string text9 = stringList[2].ToLower();
|
|
|
- string text10 = stringList[3].ToLower();
|
|
|
+ string text11 = stringList[1];
|
|
|
+ string text12 = stringList[2].ToLower();
|
|
|
+ string text13 = stringList[3].ToLower();
|
|
|
list.Add(new Menu.LastParam(0, stringCom, new string[]
|
|
|
{
|
|
|
- text8,
|
|
|
- text9,
|
|
|
- text10
|
|
|
+ text11,
|
|
|
+ text12,
|
|
|
+ text13
|
|
|
}));
|
|
|
- goto IL_3E2;
|
|
|
+ goto IL_603;
|
|
|
}
|
|
|
- Debug.LogError("アイテムパラメータ 命令の引数が不正です。SlotNameを明示的に指定しする必要があります。アイテムパラメータ <スロット名> <変数名> <値> の順です。" + text5);
|
|
|
- goto IL_3E2;
|
|
|
- IL_3E2:
|
|
|
- goto IL_1057;
|
|
|
+ Debug.LogError("アイテムパラメータ 命令の引数が不正です。SlotNameを明示的に指定しする必要があります。アイテムパラメータ <スロット名> <変数名> <値> の順です。" + text7);
|
|
|
+ goto IL_603;
|
|
|
+ IL_603:
|
|
|
+ goto IL_13C4;
|
|
|
}
|
|
|
if (stringCom == "半脱ぎ" || stringCom == "リソース参照")
|
|
|
{
|
|
|
string key;
|
|
|
- string value;
|
|
|
+ string value4;
|
|
|
if (stringCom == "半脱ぎ")
|
|
|
{
|
|
|
key = "半脱ぎ";
|
|
|
- value = stringList[1];
|
|
|
+ value4 = stringList[1];
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
key = stringList[1];
|
|
|
- value = stringList[2];
|
|
|
+ value4 = stringList[2];
|
|
|
}
|
|
|
- int hashCode = Path.GetFileName(filename.ToLower()).ToLower().GetHashCode();
|
|
|
+ int hashCode = Path.GetFileName(text.ToLower()).ToLower().GetHashCode();
|
|
|
SortedDictionary<string, string> sortedDictionary;
|
|
|
if (Menu.m_dicResourceRef.TryGetValue(hashCode, out sortedDictionary))
|
|
|
{
|
|
|
string empty = string.Empty;
|
|
|
if (sortedDictionary.TryGetValue(key, out empty))
|
|
|
{
|
|
|
- sortedDictionary[key] = value;
|
|
|
- goto IL_494;
|
|
|
+ sortedDictionary[key] = value4;
|
|
|
+ goto IL_6B5;
|
|
|
}
|
|
|
- sortedDictionary.Add(key, value);
|
|
|
- goto IL_494;
|
|
|
- IL_494:
|
|
|
- goto IL_4B9;
|
|
|
+ sortedDictionary.Add(key, value4);
|
|
|
+ goto IL_6B5;
|
|
|
+ IL_6B5:
|
|
|
+ goto IL_6DA;
|
|
|
}
|
|
|
sortedDictionary = new SortedDictionary<string, string>();
|
|
|
- sortedDictionary.Add(key, value);
|
|
|
+ sortedDictionary.Add(key, value4);
|
|
|
Menu.m_dicResourceRef.Add(hashCode, sortedDictionary);
|
|
|
- goto IL_4B9;
|
|
|
- IL_4B9:
|
|
|
- goto IL_1057;
|
|
|
+ goto IL_6DA;
|
|
|
+ IL_6DA:
|
|
|
+ goto IL_13C4;
|
|
|
}
|
|
|
if (stringCom == "set")
|
|
|
{
|
|
|
- goto IL_1057;
|
|
|
+ goto IL_13C4;
|
|
|
}
|
|
|
if (stringCom == "setname")
|
|
|
{
|
|
|
- goto IL_1057;
|
|
|
+ goto IL_13C4;
|
|
|
}
|
|
|
if (stringCom == "setslotitem")
|
|
|
{
|
|
|
string tag = stringList[1];
|
|
|
uint val = uint.Parse(stringList[2]);
|
|
|
maid.SetProp(tag, (int)val, false);
|
|
|
- goto IL_1057;
|
|
|
+ goto IL_13C4;
|
|
|
}
|
|
|
if (stringCom == "additem")
|
|
|
{
|
|
|
- string text11 = text7;
|
|
|
+ string text14 = text9;
|
|
|
if (stringList.Length > 1)
|
|
|
{
|
|
|
- text11 = stringList[2];
|
|
|
+ text14 = stringList[2];
|
|
|
}
|
|
|
- slotname = text11;
|
|
|
- if (text11 == "body")
|
|
|
+ slotname = text14;
|
|
|
+ if (text14 == "body")
|
|
|
{
|
|
|
body.LoadBody_R(stringList[1], maid);
|
|
|
}
|
|
@@ -352,77 +443,77 @@ public class Menu : MonoBehaviour
|
|
|
attachSlot = "ボーンにアタッチ";
|
|
|
attachName = stringList[4];
|
|
|
}
|
|
|
- if (text11 == "handitemr")
|
|
|
+ if (text14 == "handitemr")
|
|
|
{
|
|
|
attachSlot = "ボーンにアタッチ";
|
|
|
attachName = "_IK_handR";
|
|
|
}
|
|
|
- if (text11 == "handiteml")
|
|
|
+ if (text14 == "handiteml")
|
|
|
{
|
|
|
attachSlot = "ボーンにアタッチ";
|
|
|
attachName = "_IK_handL";
|
|
|
}
|
|
|
- body.AddItem((MPN)Enum.Parse(typeof(MPN), text7, true), text11, stringList[1], attachSlot, attachName, f_bTemp);
|
|
|
- body.SetVisibleNodeSlot(text11, true, "_ALL_");
|
|
|
- goto IL_1057;
|
|
|
+ body.AddItem((MPN)Enum.Parse(typeof(MPN), text9, true), text14, stringList[1], attachSlot, attachName, f_bTemp, version);
|
|
|
+ body.SetVisibleNodeSlot(text14, true, "_ALL_");
|
|
|
+ goto IL_13C4;
|
|
|
}
|
|
|
if (stringCom == "nofloory")
|
|
|
{
|
|
|
TBody.SlotID index = (TBody.SlotID)Enum.Parse(typeof(TBody.SlotID), stringList[1], true);
|
|
|
body.goSlot[(int)index].m_bHitFloorY = false;
|
|
|
- goto IL_1057;
|
|
|
+ goto IL_13C4;
|
|
|
}
|
|
|
if (stringCom == "saveitem")
|
|
|
{
|
|
|
- text3 = stringList[1];
|
|
|
- goto IL_1057;
|
|
|
+ text5 = stringList[1];
|
|
|
+ goto IL_13C4;
|
|
|
}
|
|
|
if (stringCom == "category")
|
|
|
{
|
|
|
- text7 = stringList[1];
|
|
|
- goto IL_1057;
|
|
|
+ text9 = stringList[1];
|
|
|
+ goto IL_13C4;
|
|
|
}
|
|
|
if (stringCom == "maskitem")
|
|
|
{
|
|
|
if (stringList.Length > 1)
|
|
|
{
|
|
|
string maskslot = stringList[1];
|
|
|
- body.AddMask(text7, maskslot);
|
|
|
- goto IL_6E7;
|
|
|
+ body.AddMask(text9, maskslot);
|
|
|
+ goto IL_90A;
|
|
|
}
|
|
|
- goto IL_6E7;
|
|
|
- IL_6E7:
|
|
|
- goto IL_1057;
|
|
|
+ goto IL_90A;
|
|
|
+ IL_90A:
|
|
|
+ goto IL_13C4;
|
|
|
}
|
|
|
if (stringCom == "delitem")
|
|
|
{
|
|
|
- string slotname3 = text7;
|
|
|
+ string slotname3 = text9;
|
|
|
if (stringList.Length > 1)
|
|
|
{
|
|
|
slotname3 = stringList[1];
|
|
|
}
|
|
|
- body.DelItem((MPN)Enum.Parse(typeof(MPN), text7, true), slotname3);
|
|
|
- goto IL_1057;
|
|
|
+ body.DelItem((MPN)Enum.Parse(typeof(MPN), text9, true), slotname3);
|
|
|
+ goto IL_13C4;
|
|
|
}
|
|
|
if (stringCom == "node消去")
|
|
|
{
|
|
|
- body.SetVisibleNodeSlot(text7, false, stringList[1]);
|
|
|
- goto IL_1057;
|
|
|
+ body.SetVisibleNodeSlot(text9, false, stringList[1]);
|
|
|
+ goto IL_13C4;
|
|
|
}
|
|
|
if (stringCom == "node表示")
|
|
|
{
|
|
|
- body.SetVisibleNodeSlot(text7, true, stringList[1]);
|
|
|
- goto IL_1057;
|
|
|
+ body.SetVisibleNodeSlot(text9, true, stringList[1]);
|
|
|
+ goto IL_13C4;
|
|
|
}
|
|
|
if (stringCom == "パーツnode消去")
|
|
|
{
|
|
|
- body.SetVisibleNodeSlotParts(text7, stringList[1], false, stringList[2]);
|
|
|
- goto IL_1057;
|
|
|
+ body.SetVisibleNodeSlotParts(text9, stringList[1], false, stringList[2]);
|
|
|
+ goto IL_13C4;
|
|
|
}
|
|
|
if (stringCom == "パーツnode表示")
|
|
|
{
|
|
|
- body.SetVisibleNodeSlotParts(text7, stringList[1], true, stringList[2]);
|
|
|
- goto IL_1057;
|
|
|
+ body.SetVisibleNodeSlotParts(text9, stringList[1], true, stringList[2]);
|
|
|
+ goto IL_13C4;
|
|
|
}
|
|
|
if (stringCom == "color")
|
|
|
{
|
|
@@ -431,58 +522,62 @@ public class Menu : MonoBehaviour
|
|
|
string prop_name = stringList[3];
|
|
|
Color col = new Color(float.Parse(stringList[4]) / 255f, float.Parse(stringList[5]) / 255f, float.Parse(stringList[6]) / 255f, float.Parse(stringList[7]) / 255f);
|
|
|
body.ChangeCol(name, matno, prop_name, col);
|
|
|
- goto IL_1057;
|
|
|
+ goto IL_13C4;
|
|
|
}
|
|
|
if (stringCom == "mancolor")
|
|
|
{
|
|
|
Color manColor = new Color(float.Parse(stringList[1]) / 255f, float.Parse(stringList[2]) / 255f, float.Parse(stringList[3]) / 255f, 1f);
|
|
|
maid.ManColor = manColor;
|
|
|
maid.ManColorUpdate();
|
|
|
- goto IL_1057;
|
|
|
+ goto IL_13C4;
|
|
|
}
|
|
|
if (stringCom == "tex" || stringCom == "テクスチャ変更")
|
|
|
{
|
|
|
- string text12 = stringList[1];
|
|
|
+ string text15 = stringList[1];
|
|
|
int matno2 = int.Parse(stringList[2]);
|
|
|
string prop_name2 = stringList[3];
|
|
|
- string filename2 = stringList[4];
|
|
|
+ string filename = stringList[4];
|
|
|
MaidParts.PARTS_COLOR parts_COLOR = MaidParts.PARTS_COLOR.NONE;
|
|
|
if (stringList.Length == 6)
|
|
|
{
|
|
|
- string text13 = stringList[5];
|
|
|
+ string text16 = stringList[5];
|
|
|
try
|
|
|
{
|
|
|
- parts_COLOR = (MaidParts.PARTS_COLOR)Enum.Parse(typeof(MaidParts.PARTS_COLOR), text13.ToUpper());
|
|
|
+ parts_COLOR = (MaidParts.PARTS_COLOR)Enum.Parse(typeof(MaidParts.PARTS_COLOR), text16.ToUpper());
|
|
|
}
|
|
|
catch
|
|
|
{
|
|
|
- NDebug.Assert("無限色IDがありません。" + text13, false);
|
|
|
+ NDebug.Assert("無限色IDがありません。" + text16, false);
|
|
|
}
|
|
|
}
|
|
|
- body.ChangeTex(text12, matno2, prop_name2, filename2, null, parts_COLOR);
|
|
|
+ if (mp.idx == 61)
|
|
|
+ {
|
|
|
+ matno2 = 7;
|
|
|
+ }
|
|
|
+ body.ChangeTex(text15, matno2, prop_name2, filename, null, parts_COLOR);
|
|
|
if (parts_COLOR != MaidParts.PARTS_COLOR.NONE)
|
|
|
{
|
|
|
maid.Parts.SetPartsColor(parts_COLOR, maid.Parts.GetPartsColor(parts_COLOR));
|
|
|
}
|
|
|
- if ((text7 == "skin" || text7 == "haircolor") && !flag)
|
|
|
+ if ((text9 == "skin" || text9 == "haircolor") && !flag)
|
|
|
{
|
|
|
- body.RestoreShader(text12);
|
|
|
- goto IL_994;
|
|
|
+ body.RestoreShader(text15);
|
|
|
+ goto IL_BC7;
|
|
|
}
|
|
|
- goto IL_994;
|
|
|
- IL_994:
|
|
|
- goto IL_1057;
|
|
|
+ goto IL_BC7;
|
|
|
+ IL_BC7:
|
|
|
+ goto IL_13C4;
|
|
|
}
|
|
|
if (stringCom == "prop")
|
|
|
{
|
|
|
string tag2 = stringList[1];
|
|
|
string s = stringList[2];
|
|
|
maid.SetProp(tag2, int.Parse(s), false);
|
|
|
- goto IL_1057;
|
|
|
+ goto IL_13C4;
|
|
|
}
|
|
|
if (stringCom == "テクスチャ乗算")
|
|
|
{
|
|
|
- goto IL_1057;
|
|
|
+ goto IL_13C4;
|
|
|
}
|
|
|
if (stringCom == "テクスチャ合成")
|
|
|
{
|
|
@@ -490,15 +585,15 @@ public class Menu : MonoBehaviour
|
|
|
{
|
|
|
NDebug.Assert("テクスチャ合成 の引数が不正です。" + stringList.Length, false);
|
|
|
}
|
|
|
- if ((text7 == "accTatoo" || text7 == "hokuro") && !filename.Contains("_del"))
|
|
|
+ if ((text9 == "accTatoo" || text9 == "hokuro") && !text.Contains("_del"))
|
|
|
{
|
|
|
body.MulTexSet(stringList[1], int.Parse(stringList[2]), stringList[3], int.Parse(stringList[4]), stringList[5], (GameUty.SystemMaterial)Enum.Parse(typeof(GameUty.SystemMaterial), stringList[6]), true, 0, 0, 0f, 0f, true, f_SubProp, 1f, 1024);
|
|
|
- goto IL_AF7;
|
|
|
+ goto IL_D2A;
|
|
|
}
|
|
|
body.MulTexSet(stringList[1], int.Parse(stringList[2]), stringList[3], int.Parse(stringList[4]), stringList[5], (GameUty.SystemMaterial)Enum.Parse(typeof(GameUty.SystemMaterial), stringList[6]), false, 0, 0, 0f, 0f, false, null, 1f, 1024);
|
|
|
- goto IL_AF7;
|
|
|
- IL_AF7:
|
|
|
- goto IL_1057;
|
|
|
+ goto IL_D2A;
|
|
|
+ IL_D2A:
|
|
|
+ goto IL_13C4;
|
|
|
}
|
|
|
if (stringCom == "テクスチャセット合成")
|
|
|
{
|
|
@@ -507,7 +602,7 @@ public class Menu : MonoBehaviour
|
|
|
NDebug.Assert("テクスチャセット合成 の引数が不正です。" + stringList.Length, false);
|
|
|
}
|
|
|
body.MulTexSet(stringList[1], int.Parse(stringList[2]), stringList[3], int.Parse(stringList[4]), stringList[5], (GameUty.SystemMaterial)Enum.Parse(typeof(GameUty.SystemMaterial), stringList[6]), true, 0, 0, 0f, 0f, true, null, 1f, 1024);
|
|
|
- goto IL_1057;
|
|
|
+ goto IL_13C4;
|
|
|
}
|
|
|
if (stringCom == "マテリアル変更")
|
|
|
{
|
|
@@ -515,7 +610,7 @@ public class Menu : MonoBehaviour
|
|
|
int f_nMatNo = int.Parse(stringList[2]);
|
|
|
string f_strFileName = stringList[3];
|
|
|
body.ChangeMaterial(f_strSlotName, f_nMatNo, f_strFileName);
|
|
|
- goto IL_1057;
|
|
|
+ goto IL_13C4;
|
|
|
}
|
|
|
if (stringCom == "shader")
|
|
|
{
|
|
@@ -524,14 +619,14 @@ public class Menu : MonoBehaviour
|
|
|
string f_strShaderFileName = stringList[3];
|
|
|
body.ChangeShader(f_strSlotName2, f_nMatNo2, f_strShaderFileName);
|
|
|
flag = true;
|
|
|
- goto IL_1057;
|
|
|
+ goto IL_13C4;
|
|
|
}
|
|
|
if (stringCom == "アタッチポイントの設定")
|
|
|
{
|
|
|
if (stringList.Length < 5)
|
|
|
{
|
|
|
- Debug.LogError("アタッチポイントの設定引数の数が不正です。 " + text5 + " " + str);
|
|
|
- goto IL_CBA;
|
|
|
+ Debug.LogError("アタッチポイントの設定引数の数が不正です。 " + text7 + " " + text3);
|
|
|
+ goto IL_EED;
|
|
|
}
|
|
|
Vector3 v = new Vector3(float.Parse(stringList[2]), float.Parse(stringList[3]), float.Parse(stringList[4]));
|
|
|
Quaternion q = Quaternion.identity;
|
|
@@ -541,12 +636,12 @@ public class Menu : MonoBehaviour
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- Debug.LogError("アタッチポイントの設定引数に角度指定がありません。 " + text5 + " " + str);
|
|
|
+ Debug.LogError("アタッチポイントの設定引数に角度指定がありません。 " + text7 + " " + text3);
|
|
|
}
|
|
|
body.SetAttachPoint(slotname, stringList[1], v, q, f_bTemp);
|
|
|
- goto IL_CBA;
|
|
|
- IL_CBA:
|
|
|
- goto IL_1057;
|
|
|
+ goto IL_EED;
|
|
|
+ IL_EED:
|
|
|
+ goto IL_13C4;
|
|
|
}
|
|
|
if (stringCom == "blendset")
|
|
|
{
|
|
@@ -559,12 +654,12 @@ public class Menu : MonoBehaviour
|
|
|
float val2 = float.Parse(stringList[3 + j * 2]);
|
|
|
body.Face.morph.SetValueBlendSet(blendSetName, tag3, val2);
|
|
|
}
|
|
|
- goto IL_1057;
|
|
|
+ goto IL_13C4;
|
|
|
}
|
|
|
if (stringCom == "paramset")
|
|
|
{
|
|
|
- body.Face.NewParamSet(text5);
|
|
|
- goto IL_1057;
|
|
|
+ body.Face.NewParamSet(text7);
|
|
|
+ goto IL_13C4;
|
|
|
}
|
|
|
if (stringCom == "commenttype")
|
|
|
{
|
|
@@ -573,42 +668,80 @@ public class Menu : MonoBehaviour
|
|
|
maid.status.partsDic.Add(stringList[1], string.Empty);
|
|
|
}
|
|
|
maid.status.partsDic[stringList[1]] = stringList[2];
|
|
|
- goto IL_1057;
|
|
|
+ goto IL_13C4;
|
|
|
}
|
|
|
if (stringCom == "useredit")
|
|
|
{
|
|
|
if (stringList[2].ToLower() == "material")
|
|
|
{
|
|
|
- body.SetMaterialProperty(text7, stringList[3], int.Parse(stringList[4]), stringList[5], stringList[6], stringList[7], false);
|
|
|
- goto IL_E12;
|
|
|
+ body.SetMaterialProperty(text9, stringList[3], int.Parse(stringList[4]), stringList[5], stringList[6], stringList[7], false);
|
|
|
+ goto IL_1045;
|
|
|
}
|
|
|
- goto IL_E12;
|
|
|
- IL_E12:
|
|
|
- goto IL_1057;
|
|
|
+ goto IL_1045;
|
|
|
+ IL_1045:
|
|
|
+ goto IL_13C4;
|
|
|
}
|
|
|
if (stringCom == "bonemorph")
|
|
|
{
|
|
|
- if (stringList.Length < 9)
|
|
|
+ if (9 > stringList.Length || stringList.Length > 10)
|
|
|
+ {
|
|
|
+ Debug.LogError("BoneMorpの設定引数の数が不正です。 " + text7 + " " + text3);
|
|
|
+ }
|
|
|
+ if (stringList.Length == 9)
|
|
|
+ {
|
|
|
+ body.bonemorph.ChangeMorphPosValue(stringList[1], stringList[2], new Vector3(float.Parse(stringList[3]), float.Parse(stringList[4]), float.Parse(stringList[5])), new Vector3(float.Parse(stringList[6]), float.Parse(stringList[7]), float.Parse(stringList[8])));
|
|
|
+ goto IL_120B;
|
|
|
+ }
|
|
|
+ string text17 = stringList[1].ToLower();
|
|
|
+ string strPropName = stringList[2];
|
|
|
+ string f_strBoneName = stringList[3];
|
|
|
+ Vector3 f_fAddMin = new Vector3(float.Parse(stringList[4]), float.Parse(stringList[5]), float.Parse(stringList[6]));
|
|
|
+ Vector3 f_fAddMax = new Vector3(float.Parse(stringList[7]), float.Parse(stringList[8]), float.Parse(stringList[9]));
|
|
|
+ if (text17 != null)
|
|
|
{
|
|
|
- Debug.LogError("BoneMorpの設定引数の数が不正です。 " + text5 + " " + str);
|
|
|
+ if (text17 == "pos")
|
|
|
+ {
|
|
|
+ body.bonemorph.ChangeMorphPosValue(strPropName, f_strBoneName, f_fAddMin, f_fAddMax);
|
|
|
+ goto IL_120B;
|
|
|
+ }
|
|
|
+ if (text17 == "rot")
|
|
|
+ {
|
|
|
+ body.bonemorph.ChangeMorphRotatioValue(strPropName, f_strBoneName, f_fAddMin, f_fAddMax);
|
|
|
+ goto IL_120B;
|
|
|
+ }
|
|
|
+ if (text17 == "scl")
|
|
|
+ {
|
|
|
+ body.bonemorph.ChangeMorphSclValue(strPropName, f_strBoneName, f_fAddMin, f_fAddMax);
|
|
|
+ goto IL_120B;
|
|
|
+ }
|
|
|
}
|
|
|
- body.bonemorph.ChangeMorphPosValue(stringList[1], stringList[2], new Vector3(float.Parse(stringList[3]), float.Parse(stringList[4]), float.Parse(stringList[5])), new Vector3(float.Parse(stringList[6]), float.Parse(stringList[7]), float.Parse(stringList[8])));
|
|
|
- goto IL_1057;
|
|
|
+ Debug.LogError(string.Concat(new string[]
|
|
|
+ {
|
|
|
+ "BoneMorpのタイプ指定が不正です[",
|
|
|
+ text17,
|
|
|
+ "]\n",
|
|
|
+ text7,
|
|
|
+ " ",
|
|
|
+ text3
|
|
|
+ }));
|
|
|
+ goto IL_120B;
|
|
|
+ IL_120B:
|
|
|
+ goto IL_13C4;
|
|
|
}
|
|
|
if (stringCom == "length")
|
|
|
{
|
|
|
if (stringList.Length != 11)
|
|
|
{
|
|
|
- Debug.LogError("lengthの設定引数の数が不正です。 " + text5 + " " + str);
|
|
|
+ Debug.LogError("lengthの設定引数の数が不正です。 " + text7 + " " + text3);
|
|
|
}
|
|
|
body.SetHairLengthDataList(stringList[1], stringList[2], stringList[3], stringList[4], new Vector3(float.Parse(stringList[5]), float.Parse(stringList[6]), float.Parse(stringList[7])), new Vector3(float.Parse(stringList[8]), float.Parse(stringList[9]), float.Parse(stringList[10])));
|
|
|
- goto IL_1057;
|
|
|
+ goto IL_13C4;
|
|
|
}
|
|
|
if (stringCom == "anime")
|
|
|
{
|
|
|
if (stringList.Length < 3)
|
|
|
{
|
|
|
- Debug.LogError("animeの設定引数の数が不正です。 " + text5 + " " + str);
|
|
|
+ Debug.LogError("animeの設定引数の数が不正です。 " + text7 + " " + text3);
|
|
|
}
|
|
|
TBody.SlotID f_slot = (TBody.SlotID)Enum.Parse(typeof(TBody.SlotID), stringList[1], true);
|
|
|
body.ItemAnimationLoad(f_slot, stringList[2]);
|
|
@@ -618,7 +751,7 @@ public class Menu : MonoBehaviour
|
|
|
f_bLoop = (stringList[3] == "loop");
|
|
|
}
|
|
|
body.ItemAnimationPlay(f_slot, stringList[2], f_bLoop);
|
|
|
- goto IL_1057;
|
|
|
+ goto IL_13C4;
|
|
|
}
|
|
|
if (stringCom == "param2")
|
|
|
{
|
|
@@ -626,44 +759,44 @@ public class Menu : MonoBehaviour
|
|
|
{
|
|
|
string slotname4 = stringList[1];
|
|
|
body.GetSlot(slotname4).SetParam2(stringList[2], stringList[3]);
|
|
|
- goto IL_1011;
|
|
|
+ goto IL_137E;
|
|
|
}
|
|
|
- Debug.LogError("param2の設定引数の数が不正です。 " + text5 + " " + str);
|
|
|
- goto IL_1011;
|
|
|
- IL_1011:
|
|
|
- goto IL_1057;
|
|
|
+ Debug.LogError("param2の設定引数の数が不正です。 " + text7 + " " + text3);
|
|
|
+ goto IL_137E;
|
|
|
+ IL_137E:
|
|
|
+ goto IL_13C4;
|
|
|
}
|
|
|
if (stringCom == "animematerial")
|
|
|
{
|
|
|
TBody.SlotID f_slot2 = (TBody.SlotID)Enum.Parse(typeof(TBody.SlotID), stringList[1], true);
|
|
|
string s2 = stringList[2];
|
|
|
body.MaterialAnimatorAdd(f_slot2, int.Parse(s2));
|
|
|
- goto IL_1057;
|
|
|
+ goto IL_13C4;
|
|
|
}
|
|
|
- goto IL_1057;
|
|
|
- IL_1057:
|
|
|
- goto IL_10DA;
|
|
|
+ goto IL_13C4;
|
|
|
+ IL_13C4:
|
|
|
+ goto IL_1447;
|
|
|
}
|
|
|
catch (Exception ex)
|
|
|
{
|
|
|
Debug.LogError(string.Concat(new string[]
|
|
|
{
|
|
|
"Exception ",
|
|
|
- Path.GetFileName(filename),
|
|
|
+ Path.GetFileName(text),
|
|
|
" 現在処理中だった行 = ",
|
|
|
- text5,
|
|
|
+ text7,
|
|
|
" 以前の行 = ",
|
|
|
- text6,
|
|
|
+ text8,
|
|
|
" ",
|
|
|
ex.Message,
|
|
|
"StackTrace:\n",
|
|
|
ex.StackTrace
|
|
|
}));
|
|
|
- NDebug.Assert("メニューファイル処理中にエラーが発生しました。" + Path.GetFileName(filename), true);
|
|
|
- goto IL_10DA;
|
|
|
+ NDebug.Assert("メニューファイル処理中にエラーが発生しました。" + Path.GetFileName(text), true);
|
|
|
+ goto IL_1447;
|
|
|
}
|
|
|
- IL_10DA:
|
|
|
- goto IL_90;
|
|
|
+ IL_1447:
|
|
|
+ goto IL_102;
|
|
|
}
|
|
|
list.Sort((Menu.LastParam a, Menu.LastParam b) => a.nOrder - a.nOrder);
|
|
|
for (int k = 0; k < list.Count; k++)
|
|
@@ -671,8 +804,8 @@ public class Menu : MonoBehaviour
|
|
|
Menu.LastParam lastParam = list[k];
|
|
|
if (lastParam.strComm == "アイテムパラメータ")
|
|
|
{
|
|
|
- TBodySkin slot4 = body.GetSlot(lastParam.aryArgs[0]);
|
|
|
- slot4.SetParam(lastParam.aryArgs[1], lastParam.aryArgs[2]);
|
|
|
+ TBodySkin slot6 = body.GetSlot(lastParam.aryArgs[0]);
|
|
|
+ slot6.SetParam(lastParam.aryArgs[1], lastParam.aryArgs[2]);
|
|
|
}
|
|
|
}
|
|
|
binaryReader.Close();
|
|
@@ -753,7 +886,7 @@ public class Menu : MonoBehaviour
|
|
|
Directory.CreateDirectory(text);
|
|
|
}
|
|
|
StreamWriter streamWriter = new StreamWriter(text + "\\" + text2 + ".txt", false, Encoding.UTF8);
|
|
|
- streamWriter.WriteLine("出力バージョン\t" + 1210);
|
|
|
+ streamWriter.WriteLine("出力バージョン\t" + 1230);
|
|
|
streamWriter.WriteLine("基本アイテム\t" + filename.Replace(" ", ":"));
|
|
|
try
|
|
|
{
|