public bool FunctionExecute(Dynel Self, Dynel Caller, object Target, object[] Arguments) { string text = (string)Arguments[0]; SystemText.Send(((Character)Self).Client, text, 0); return(true); }
public string GetSystemText(int textID, ref bool autoClose) { SystemText[] ssourceSet = null; SystemText ssource = null; if (gameText != null) { ssourceSet = gameText.System; if (ssourceSet != null) { for (int i = 0; i < ssourceSet.Length; i++) { ssource = ssourceSet[i]; if (ssource != null) { if (ssource.Id == textID) { autoClose = ssource.AutoClose; return(ssource.Text); } } } } } return(null); }
public void Clear() { PlatformText ptext = null; SystemText stext = null; DialogueText dtext = null; ItemText itext = null; if (Platform != null) { for (int i = 0; i < Platform.Length; i++) { ptext = Platform[i]; if (ptext != null) { ptext.Clear(); Platform[i] = null; } } Platform = null; } if (System != null) { for (int i = 0; i < System.Length; i++) { stext = System[i]; if (stext != null) { stext.Clear(); System[i] = null; } } System = null; } if (Dialogue != null) { for (int i = 0; i < Dialogue.Length; i++) { dtext = Dialogue[i]; if (dtext != null) { dtext.Clear(); Dialogue[i] = null; } } Dialogue = null; } if (Items != null) { for (int i = 0; i < Items.Length; i++) { itext = Items[i]; if (itext != null) { itext.Clear(); Items[i] = null; } } Items = null; } }
public string Text(string identifier, string defaultText) { if (SystemTextDictionary == null) { InitSystemTextDictionary(); } var text = SystemTextDictionary != null && SystemTextDictionary.ContainsKey(identifier) ? SystemTextDictionary[identifier] : null; if (text != null) { return(text); } var newSystemText = new SystemText { Identifier = identifier, TextEng = defaultText }; try { db.SystemTexts.Add(newSystemText); db.SaveChanges(); SystemTextDictionary = null; HttpContext.Current.Application["SystemTextsAll"] = GetSystemTexts(); } catch (Exception ex) { // LogHelper.LogError(ex); } return(newSystemText.TextEng); }
private static void Dat2Excel(string filename) { var taiko = new SystemText(File.ReadAllBytes(filename)); Console.WriteLine("正在处理: {0}", filename); taiko.Export(Path.ChangeExtension(filename, "xlsx")); taiko.Dispose(); }
private static void Excel2Dat(string filename) { var taiko = new SystemText(); Console.WriteLine("正在处理: {0}", filename); taiko.Import4Excel(filename); taiko.SaveAs(Path.ChangeExtension(filename, "dat"), taiko.TextTitle); taiko.Dispose(); }
public string GetEquipAttributeName(PlayerAgent.EquipAttribute attribute) { SystemText[] ssourceSet = null; SystemText ssource = null; int textID = INVALID_TEXT_ID; if (gameText != null) { ssourceSet = gameText.System; if (ssourceSet != null) { switch (attribute) { case PlayerAgent.EquipAttribute.Accel: textID = TEXT_ID_EQUIP_ATTR_ACCEL; break; case PlayerAgent.EquipAttribute.MaxSpeed: textID = TEXT_ID_EQUIP_ATTR_MAXSPEED; break; case PlayerAgent.EquipAttribute.MaxHP: textID = TEXT_ID_EQUIP_ATTR_MAXHP; break; case PlayerAgent.EquipAttribute.MaxMP: textID = TEXT_ID_EQUIP_ATTR_MAXMP; break; case PlayerAgent.EquipAttribute.Attack: textID = TEXT_ID_EQUIP_ATTR_ATTACK; break; case PlayerAgent.EquipAttribute.MaxFrequency: textID = TEXT_ID_EQUIP_ATTR_MAXFREQUENCY; break; } if (textID != INVALID_TEXT_ID) { for (int i = 0; i < ssourceSet.Length; i++) { ssource = ssourceSet[i]; if (ssource != null) { if (ssource.Id == textID) { return(ssource.Text); } } } } } } return(null); }
public static string LocalizeText(SystemText type) { LanguageManagerBase instance = LanguageManagerBase.Instance; if (instance != null) { return(instance.LocalizeText("SystemText", type.ToString())); } Debug.LogWarning("LanguageManager is NULL"); return(type.ToString()); }
/// <summary> /// 指定のキーのテキストを、設定された言語に翻訳して取得 /// </summary> /// <param name="type"></param> /// <returns></returns> public static string LocalizeText(SystemText type) { LanguageManagerBase language = LanguageManagerBase.Instance; if (language != null) { return language.LocalizeText(LanguageDataName, type.ToString()); } else { Debug.LogWarning("LanguageManager is NULL"); return type.ToString(); } }
public string GetEquipBodyPartName(PlayerAgent.EquipBodyPart bodyPart) { SystemText[] ssourceSet = null; SystemText ssource = null; int textID = INVALID_TEXT_ID; if (gameText != null) { ssourceSet = gameText.System; if (ssourceSet != null) { switch (bodyPart) { case PlayerAgent.EquipBodyPart.Head: textID = TEXT_ID_EQUIP_PART_HEAD; break; case PlayerAgent.EquipBodyPart.Neck: textID = TEXT_ID_EQUIP_PART_NECK; break; case PlayerAgent.EquipBodyPart.Torso: textID = TEXT_ID_EQUIP_PART_TORSO; break; case PlayerAgent.EquipBodyPart.Arms: textID = TEXT_ID_EQUIP_PART_ARMS; break; case PlayerAgent.EquipBodyPart.Legs: textID = TEXT_ID_EQUIP_PART_LEGS; break; } if (textID != INVALID_TEXT_ID) { for (int i = 0; i < ssourceSet.Length; i++) { ssource = ssourceSet[i]; if (ssource != null) { if (ssource.Id == textID) { return(ssource.Text); } } } } } } return(null); }
/// <summary> /// 指定のキーのテキストを、設定された言語に翻訳して取得 /// </summary> /// <param name="type"></param> /// <returns></returns> public static string LocalizeText(SystemText type) { LanguageManagerBase language = LanguageManagerBase.Instance; if (language != null) { return(language.LocalizeText(LanguageDataName, type.ToString())); } else { Debug.LogWarning("LanguageManager is NULL"); return(type.ToString()); } }
private void OpenFile(string filename) { try { openFileName = Path.GetFileNameWithoutExtension(filename); byte[] bytes; bytes = File.ReadAllBytes(filename); taiko = new SystemText(bytes); hexViewer = new HexView(bytes); ListViewUpdata(); HexViewUpdata(); } catch (Exception) { throw; } }
public string GetMenuOptionText(MenuSimple.ChoiceEffect optionEffect) { SystemText[] ssourceSet = null; SystemText ssource = null; int textID = INVALID_TEXT_ID; if (gameText != null) { ssourceSet = gameText.System; if (ssourceSet != null) { switch (optionEffect) { case MenuSimple.ChoiceEffect.Pause: textID = TEXT_ID_MENU_OPTION_PAUSE; break; case MenuSimple.ChoiceEffect.Unpause: textID = TEXT_ID_MENU_OPTION_UNPAUSE; break; case MenuSimple.ChoiceEffect.CloseMenu: textID = TEXT_ID_MENU_OPTION_CLOSE_MENU; break; case MenuSimple.ChoiceEffect.OpenMap: textID = TEXT_ID_MENU_OPTION_OPEN_MAP; break; case MenuSimple.ChoiceEffect.OpenInventory: textID = TEXT_ID_MENU_OPTION_OPEN_INVENTORY; break; case MenuSimple.ChoiceEffect.QuitGame: textID = TEXT_ID_MENU_OPTION_QUIT_GAME; break; case MenuSimple.ChoiceEffect.Equip: textID = TEXT_ID_MENU_OPTION_EQUIP; break; case MenuSimple.ChoiceEffect.Unequip: textID = TEXT_ID_MENU_OPTION_UNEQUIP; break; case MenuSimple.ChoiceEffect.Use: textID = TEXT_ID_MENU_OPTION_USE; break; } if (textID != INVALID_TEXT_ID) { for (int i = 0; i < ssourceSet.Length; i++) { ssource = ssourceSet[i]; if (ssource != null) { if (ssource.Id == textID) { return(ssource.Text); } } } } } } return(null); }
public override void Load(ExtendedBinaryReader fileReader, bool keepOpen = false) { // Read STSC base.Load(fileReader); StreamBlock block; // System text block = GetStreamBlockAndJump(0, fileReader); while (!EndOfBlock(fileReader, block)) { SystemText.Add(fileReader.ReadStringElsewhere()); } // CGs block = GetStreamBlockAndJump(1, fileReader); while (!EndOfBlock(fileReader, block)) { CGs.Add(fileReader.ReadStruct <CGEntry>()); } // Movies block = GetStreamBlockAndJump(2, fileReader); while (!EndOfBlock(fileReader, block)) { Movies.Add(fileReader.ReadStruct <MovieEntry>()); } // Memories block = GetStreamBlockAndJump(3, fileReader); while (!EndOfBlock(fileReader, block)) { Memories.Add(fileReader.ReadStruct <MemoryEntry>()); } // Characters block = GetStreamBlockAndJump(4, fileReader); while (!EndOfBlock(fileReader, block)) { Characters.Add(fileReader.ReadStruct <CharacterEntry>()); } // Unknown2 block = GetStreamBlockAndJump(5, fileReader); while (!EndOfBlock(fileReader, block)) { Unknown2.Add(fileReader.ReadStruct <Unknown2Entry>()); } // Unknown3 block = GetStreamBlockAndJump(6, fileReader); while (!EndOfBlock(fileReader, block)) { Unknown3.Add(fileReader.ReadStruct <Unknown3Entry>()); } // Voices block = GetStreamBlockAndJump(7, fileReader); while (!EndOfBlock(fileReader, block)) { Voices.Add(fileReader.ReadStruct <VoiceEntry>()); } // Unknown4 block = GetStreamBlockAndJump(8, fileReader); while (!EndOfBlock(fileReader, block)) { Unknown4.Add(fileReader.ReadStruct <Unknown4Entry>()); } // Older versions may not include art books and drama CDs if (Version == 7) { // Art Book Page block = GetStreamBlockAndJump(9, fileReader); while (!EndOfBlock(fileReader, block)) { ArtBookPages.Add(fileReader.ReadStruct <ArtBookPageEntry>()); } // DramaCDs block = GetStreamBlockAndJump(10, fileReader); while (!EndOfBlock(fileReader, block)) { DramaCDs.Add(fileReader.ReadStruct <DramaCDEntry>()); } } }