Exemple #1
0
        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);
        }
Exemple #2
0
 static AreaLoader()
 {
     strTable = StringTable.Find("str.sys.worldmap");
 }
Exemple #3
0
 static CrewSkill()
 {
     fqnMap    = new Dictionary <Profession, CrewSkill>();
     nameTable = StringTable.Find("str.prf.professions");
 }
Exemple #4
0
 static SchematicLoader()
 {
     missionStrTable = StringTable.Find("str.prf.missions");
 }
Exemple #5
0
 static ClassSpecLoader()
 {
     classNames = StringTable.Find("str.gui.classnames");
     idMap      = new Dictionary <ulong, Models.ClassSpec>();
     nameMap    = new Dictionary <string, Models.ClassSpec>();
 }
Exemple #6
0
 static PackageAbilityLoader()
 {
     strTable = StringTable.Find("str.abl.player.skill_trees");
 }
Exemple #7
0
 static MapNoteLoader()
 {
     taxiTerminals = StringTable.Find("str.tax.terminals");
 }
Exemple #8
0
 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"));
        }
Exemple #11
0
 static CompanionLoader()
 {
     strTable = StringTable.Find("str.sys.worldmap");
 }