Пример #1
0
			// Token: 0x060000D3 RID: 211 RVA: 0x00007AE0 File Offset: 0x00005CE0
			private static void CheckDRDrugDefinitions2()
			{
				List<string> newMSDRValues = new List<string>();
				if (DRSettings.MSDRValues2 != null && DRSettings.MSDRValues2.Count > 0)
				{
					foreach (string value in DRSettings.MSDRValues2)
					{
						string mal = MSDRUtility.HValuePart(value);
						if (MSDRUtility.MaladyUsed(mal))
						{
							int end = 1;
							if (value.EndsWith("2"))
							{
								end = 2;
							}
							string drug = MSDRUtility.DValuePart(value);
							if (DefDatabase<ThingDef>.GetNamed(drug, false) != null)
							{
								int t = MSDRUtility.TValuePart(value);
								bool b = MSDRUtility.BValuePart(value);
								string oldValue = MSDRUtility.ConvertToDRValue(t, mal, drug, b, end);
								GenCollection.AddDistinct<string>(newMSDRValues, oldValue);
							}
							else
							{
								string newValue = MSDRUtility.ConvertToDRValue(24, mal, null, true, end);
								GenCollection.AddDistinct<string>(newMSDRValues, newValue);
							}
						}
					}
				}
				DRSettings.MSDRValues2 = newMSDRValues;
			}
Пример #2
0
        // Token: 0x06000056 RID: 86 RVA: 0x000059CC File Offset: 0x00003BCC
        public static void SetDRValues(string m, string d, int t, bool b, int numof, List <string> master, out List <string> newMaster)
        {
            newMaster = new List <string>();
            string newValue = MSDRUtility.ConvertToDRValue(t, m, d, b, numof);

            if (master != null)
            {
                bool beenSet = false;
                if (master.Count > 0)
                {
                    foreach (string value in master)
                    {
                        string a   = MSDRUtility.HValuePart(value);
                        int    num = MSDRUtility.NumValuePart(value);
                        if (a != m)
                        {
                            GenCollection.AddDistinct <string>(newMaster, value);
                        }
                        else if (num != numof)
                        {
                            GenCollection.AddDistinct <string>(newMaster, value);
                        }
                        else
                        {
                            GenCollection.AddDistinct <string>(newMaster, newValue);
                            beenSet = true;
                        }
                    }
                }
                if (!beenSet)
                {
                    GenCollection.AddDistinct <string>(newMaster, newValue);
                }
            }
        }
Пример #3
0
 // Token: 0x0600005B RID: 91 RVA: 0x00005C64 File Offset: 0x00003E64
 public static void ClearDRValues(string m, bool doAll, List <string> master, out List <string> newMaster)
 {
     newMaster = new List <string>();
     if (!doAll && master != null && master.Count > 0)
     {
         foreach (string value in master)
         {
             if (MSDRUtility.HValuePart(value) != m)
             {
                 GenCollection.AddDistinct <string>(newMaster, value);
             }
         }
     }
 }
Пример #4
0
 // Token: 0x0600005A RID: 90 RVA: 0x00005BF4 File Offset: 0x00003DF4
 public static bool GetValueDRBills(string m, List <string> master)
 {
     if (m != null && master != null && master.Count > 0)
     {
         foreach (string value in master)
         {
             if (MSDRUtility.HValuePart(value) == m)
             {
                 return(MSDRUtility.BValuePart(value));
             }
         }
         return(true);
     }
     return(true);
 }
Пример #5
0
 // Token: 0x06000057 RID: 87 RVA: 0x00005A84 File Offset: 0x00003C84
 public static int GetValueDRnumof(string m, List <string> master)
 {
     if (m != null && master != null && master.Count > 0)
     {
         foreach (string value in master)
         {
             if (MSDRUtility.HValuePart(value) == m)
             {
                 return(MSDRUtility.NumValuePart(value));
             }
         }
         return(1);
     }
     return(1);
 }
Пример #6
0
 // Token: 0x06000059 RID: 89 RVA: 0x00005B74 File Offset: 0x00003D74
 public static string GetValueDRDrug(string m, List <string> master, int num)
 {
     if (m != null && master != null && master.Count > 0)
     {
         foreach (string value in master)
         {
             string Hdef  = MSDRUtility.HValuePart(value);
             int    numof = MSDRUtility.NumValuePart(value);
             if (Hdef == m && numof == num)
             {
                 return(MSDRUtility.DValuePart(value));
             }
         }
     }
     return(null);
 }