temp fix for enabling language switching
This commit is contained in:
@@ -36,7 +36,7 @@ namespace Qoo.Ks
|
||||
int no = Akb.SearchFile(id.Name);
|
||||
AKB_FILEINFO info = Akb.GetFileInfo(no);
|
||||
string name = info.Name;
|
||||
if (!this.m_DataList.ContainsKey(name))
|
||||
if (!this.m_DataList.ContainsKey(name))
|
||||
{
|
||||
string path = Akb.GetDirInfo((int)info.nDirNo).Name;
|
||||
UnityFile file = Singleton<UnityFileLoader>.Instance.LoadKsFile(path + "/" + name + ".txt");
|
||||
@@ -47,6 +47,19 @@ namespace Qoo.Ks
|
||||
string script = Encoding.Unicode.GetString(file.Data);
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user