|
|
|
@ -36,7 +36,7 @@ namespace Qoo.Ks
|
|
|
|
int no = Akb.SearchFile(id.Name);
|
|
|
|
int no = Akb.SearchFile(id.Name);
|
|
|
|
AKB_FILEINFO info = Akb.GetFileInfo(no);
|
|
|
|
AKB_FILEINFO info = Akb.GetFileInfo(no);
|
|
|
|
string name = info.Name;
|
|
|
|
string name = info.Name;
|
|
|
|
if (!this.m_DataList.ContainsKey(name))
|
|
|
|
if (!this.m_DataList.ContainsKey(name))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
string path = Akb.GetDirInfo((int)info.nDirNo).Name;
|
|
|
|
string path = Akb.GetDirInfo((int)info.nDirNo).Name;
|
|
|
|
UnityFile file = Singleton<UnityFileLoader>.Instance.LoadKsFile(path + "/" + name + ".txt");
|
|
|
|
UnityFile file = Singleton<UnityFileLoader>.Instance.LoadKsFile(path + "/" + name + ".txt");
|
|
|
|
@ -47,6 +47,19 @@ namespace Qoo.Ks
|
|
|
|
string script = Encoding.Unicode.GetString(file.Data);
|
|
|
|
string script = Encoding.Unicode.GetString(file.Data);
|
|
|
|
this.m_DataList.Add(name, script);
|
|
|
|
this.m_DataList.Add(name, script);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
//Force files to be realoaded every time to enable language switching
|
|
|
|
|
|
|
|
//TODO: Find a way to only reload the cache when language has actually been switched
|
|
|
|
|
|
|
|
string path = Akb.GetDirInfo((int)info.nDirNo).Name;
|
|
|
|
|
|
|
|
UnityFile file = Singleton<UnityFileLoader>.Instance.LoadKsFile(path + "/" + name + ".txt");
|
|
|
|
|
|
|
|
while (!file.IsReadEnd)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
yield return 0;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
string script = Encoding.Unicode.GetString(file.Data);
|
|
|
|
|
|
|
|
this.m_DataList[name] = script;
|
|
|
|
|
|
|
|
}
|
|
|
|
yield break;
|
|
|
|
yield break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|