public static StudentEditorScript.StudentStats Deserialize(Dictionary <string, object> dict)
 {
     return(new StudentEditorScript.StudentStats
     {
         strength = TFUtils.LoadInt(dict, "Strength")
     });
 }
 public static StudentJson[] LoadFromJson(string path)
 {
     StudentJson[] array = new StudentJson[101];
     for (int i = 0; i < array.Length; i++)
     {
         array[i] = new StudentJson();
     }
     foreach (Dictionary <string, object> dictionary in JsonData.Deserialize(path))
     {
         int num = TFUtils.LoadInt(dictionary, "ID");
         if (num == 0)
         {
             break;
         }
         StudentJson studentJson = array[num];
         studentJson.name       = TFUtils.LoadString(dictionary, "Name");
         studentJson.realname   = TFUtils.LoadString(dictionary, "RealName");
         studentJson.gender     = TFUtils.LoadInt(dictionary, "Gender");
         studentJson.classID    = TFUtils.LoadInt(dictionary, "Class");
         studentJson.seat       = TFUtils.LoadInt(dictionary, "Seat");
         studentJson.club       = (ClubType)TFUtils.LoadInt(dictionary, "Club");
         studentJson.persona    = (PersonaType)TFUtils.LoadInt(dictionary, "Persona");
         studentJson.crush      = TFUtils.LoadInt(dictionary, "Crush");
         studentJson.breastSize = TFUtils.LoadFloat(dictionary, "BreastSize");
         studentJson.strength   = TFUtils.LoadInt(dictionary, "Strength");
         studentJson.hairstyle  = TFUtils.LoadString(dictionary, "Hairstyle");
         studentJson.color      = TFUtils.LoadString(dictionary, "Color");
         studentJson.eyes       = TFUtils.LoadString(dictionary, "Eyes");
         studentJson.eyeType    = TFUtils.LoadString(dictionary, "EyeType");
         studentJson.stockings  = TFUtils.LoadString(dictionary, "Stockings");
         studentJson.accessory  = TFUtils.LoadString(dictionary, "Accessory");
         studentJson.info       = TFUtils.LoadString(dictionary, "Info");
         if (GameGlobals.LoveSick)
         {
             studentJson.name     = studentJson.realname;
             studentJson.realname = "";
         }
         if (OptionGlobals.HighPopulation && studentJson.name == "Unknown")
         {
             studentJson.name = "Random";
         }
         float[]  array3 = StudentJson.ConstructTempFloatArray(TFUtils.LoadString(dictionary, "ScheduleTime"));
         string[] array4 = StudentJson.ConstructTempStringArray(TFUtils.LoadString(dictionary, "ScheduleDestination"));
         string[] array5 = StudentJson.ConstructTempStringArray(TFUtils.LoadString(dictionary, "ScheduleAction"));
         studentJson.scheduleBlocks = new ScheduleBlock[array3.Length];
         for (int k = 0; k < studentJson.scheduleBlocks.Length; k++)
         {
             studentJson.scheduleBlocks[k] = new ScheduleBlock(array3[k], array4[k], array5[k]);
         }
         if (num == 10 || num == 11)
         {
             for (int l = 0; l < studentJson.scheduleBlocks.Length; l++)
             {
                 studentJson.scheduleBlocks[l] = null;
             }
         }
         studentJson.success = true;
     }
     return(array);
 }
示例#3
0
 // Token: 0x0600026A RID: 618 RVA: 0x00032424 File Offset: 0x00030824
 public static StudentEditorScript.StudentPersonality Deserialize(Dictionary <string, object> dict)
 {
     return(new StudentEditorScript.StudentPersonality {
         persona = (PersonaType)TFUtils.LoadInt(dict, "Persona"),
         crush = TFUtils.LoadInt(dict, "Crush")
     });
 }
示例#4
0
 // Token: 0x06000268 RID: 616 RVA: 0x000323D4 File Offset: 0x000307D4
 public static StudentEditorScript.StudentAttendanceInfo Deserialize(Dictionary <string, object> dict)
 {
     return(new StudentEditorScript.StudentAttendanceInfo {
         classNumber = TFUtils.LoadInt(dict, "Class"),
         seatNumber = TFUtils.LoadInt(dict, "Seat"),
         club = TFUtils.LoadInt(dict, "Club")
     });
 }
示例#5
0
    // Token: 0x06000571 RID: 1393 RVA: 0x0004B05C File Offset: 0x0004945C
    public static CreditJson[] LoadFromJson(string path)
    {
        List <CreditJson> list = new List <CreditJson>();

        foreach (Dictionary <string, object> dictionary in JsonData.Deserialize(path))
        {
            list.Add(new CreditJson {
                name = TFUtils.LoadString(dictionary, "Name"),
                size = TFUtils.LoadInt(dictionary, "Size")
            });
        }
        return(list.ToArray());
    }
示例#6
0
 // Token: 0x06000270 RID: 624 RVA: 0x00032518 File Offset: 0x00030918
 public static StudentEditorScript.StudentData Deserialize(Dictionary <string, object> dict)
 {
     return(new StudentEditorScript.StudentData {
         id = TFUtils.LoadInt(dict, "ID"),
         name = TFUtils.LoadString(dict, "Name"),
         isMale = (TFUtils.LoadInt(dict, "Gender") == 1),
         attendanceInfo = StudentEditorScript.StudentAttendanceInfo.Deserialize(dict),
         personality = StudentEditorScript.StudentPersonality.Deserialize(dict),
         stats = StudentEditorScript.StudentStats.Deserialize(dict),
         cosmetics = StudentEditorScript.StudentCosmetics.Deserialize(dict),
         scheduleBlocks = StudentEditorScript.DeserializeScheduleBlocks(dict),
         info = TFUtils.LoadString(dict, "Info")
     });
 }
 public static TopicJson[] LoadFromJson(string path)
 {
     TopicJson[] array = new TopicJson[101];
     foreach (Dictionary <string, object> d in JsonData.Deserialize(path))
     {
         int num = TFUtils.LoadInt(d, "ID");
         if (num == 0)
         {
             break;
         }
         array[num] = new TopicJson();
         TopicJson topicJson = array[num];
         topicJson.topics = new int[26];
         for (int j = 1; j <= 25; j++)
         {
             topicJson.topics[j] = TFUtils.LoadInt(d, j.ToString());
         }
     }
     return(array);
 }