private static string TryGetString(string fqn, GomObjectData textRetriever) { string locBucket = textRetriever.ValueOrDefault <string>("strLocalizedTextRetrieverBucket", null); long strId = textRetriever.ValueOrDefault <long>("strLocalizedTextRetrieverStringID", -1); string defaultStr = textRetriever.ValueOrDefault <string>("strLocalizedTextRetrieverDesignModeText", String.Empty); if ((locBucket == null) || (strId == -1)) { return(defaultStr); } StringTable strTable = null; try { strTable = StringTable.Find(locBucket); } catch { strTable = null; } if (strTable == null) { return(defaultStr); } string result = strTable.GetText(strId, fqn); return(result ?? defaultStr); }
static AreaLoader() { strTable = StringTable.Find("str.sys.worldmap"); }
static CrewSkill() { fqnMap = new Dictionary <Profession, CrewSkill>(); nameTable = StringTable.Find("str.prf.professions"); }
static SchematicLoader() { missionStrTable = StringTable.Find("str.prf.missions"); }
static ClassSpecLoader() { classNames = StringTable.Find("str.gui.classnames"); idMap = new Dictionary <ulong, Models.ClassSpec>(); nameMap = new Dictionary <string, Models.ClassSpec>(); }
static PackageAbilityLoader() { strTable = StringTable.Find("str.abl.player.skill_trees"); }
static MapNoteLoader() { taxiTerminals = StringTable.Find("str.tax.terminals"); }
static ItemSetLoader() { strTable = StringTable.Find("str.itm.setbonuses"); }
static AdvancedClassLoader() { classNames = StringTable.Find("str.gui.classnames"); }
public static string GetName(long id) { StringTable st = StringTable.Find("str.itm.modifiers"); return(st.GetText(nameOffset + id, "whatever")); }
static CompanionLoader() { strTable = StringTable.Find("str.sys.worldmap"); }