public AreaLineInformation(AreaDefinition source, string line) { Value = GetValueFromLine(source, line); AreaString = line.Substring(0, line.Length - Value.Length); Value = Value.Trim(); AreaString = AreaString.Trim(); }
public static bool ParseAreaEvent(object value, string parsedFile, string parsedKey, out MapAreaName areaName) { areaName = MapAreaName.Internal_None; if (!(value is string AreaString)) { return(Program.ReportFailure(parsedFile, parsedKey, $"Value '{value}' was expected to be a string")); } if (AreaString == "Daytime") { areaName = MapAreaName.Daytime; StringToEnumConversion <MapAreaName> .SetCustomParsedEnum(areaName); return(true); } if (AreaString == "PovusNightlyQuest") { areaName = MapAreaName.PovusNightlyQuest; StringToEnumConversion <MapAreaName> .SetCustomParsedEnum(areaName); return(true); } int AreaIndex = AreaString.LastIndexOf('_'); if (AreaIndex > 0) { int KeyIndex = AreaString.LastIndexOf('_', AreaIndex - 1); if (KeyIndex > 0) { string AreaName = AreaString.Substring(AreaIndex + 1); string KeyName = AreaString.Substring(KeyIndex + 1, AreaIndex - KeyIndex - 1); string QuestName = AreaString.Substring(0, KeyIndex); if (AreaName == "Ilmari") { AreaName = "Desert1"; } else if (AreaName == "Kur") { AreaName = "KurMountains"; } MapAreaName ParsedAreaName = MapAreaName.Internal_None; bool Result = StringToEnumConversion <MapAreaName> .SetEnum((MapAreaName valueEnum) => ParsedAreaName = valueEnum, AreaName); areaName = ParsedAreaName; return(Result); } } return(Program.ReportFailure(parsedFile, parsedKey, $"Unknown area '{AreaString}'")); }
// Use this for initialization void Start() { if (File.Exists(GeneralSettingPath)) { Debug.Log("aaa"); LoadSettings(GeneralSettingPath); WriteStartupLog(LogPath, DateTime.Now + SMDefine.GetSysMsg("Space_Tag") + SMDefine.GetSysMsg("Operation_Tag") + SMDefine.GetSysMsg("OperationMsg_001") + "(" + GeneralSettingPath + ")"); } Define = GetComponent <GameObjectDefine>(); SMDefine = GetComponent <SystemMessageDefine>(); ItemStr = GetComponent <ItemString>(); RDStr = GetComponent <RandomDialogString>(); AreaStr = GetComponent <AreaString>(); TalkStr = GetComponent <TalkString>(); LangLdr = GetComponent <LanguageLoader>(); SysSet = GetComponent <SystemSettings>(); StringTablePath = Application.dataPath + "/Resources/stringtable/"; StringTable_UIPath = StringTablePath + "jp/" + stringtable_UI_FileName; GeneralSettingPath = Application.dataPath + "/Resources/GeneralSettings.csv"; LogPath = Application.dataPath + "/log/Startup.log"; if (!Directory.Exists(Application.dataPath + "/log/")) { Directory.CreateDirectory(Application.dataPath + "/log/"); } if (!File.Exists(LogPath)) { File.Create(LogPath).Close(); } DefineLoadFiles(); //Debug.Log("File Define Loaded"); LoadSystemDefine(StringTable_System); //Debug.Log("System Define Loaded"); LoggingSystemInfo(); //Debug.Log("SystemInfo Loaded"); LoadFiles(); //Debug.Log("System Loaded"); Debug.Log(GeneralSettingPath); //GameStartBtnTextPath = GameObject.Find(Define.GameMenu_StartBtnText).GetComponent<Text>(); //ClickText = GameObject.Find(Define.GameMenu_ClickText).GetComponent<Text>(); }