Exemple #1
0
 public static float GetFishSpeciesTotalCommonality(ThingDef_FishSpeciesProperties.AquaticEnvironment aquaticEnvironment, ThingDef_FishSpeciesProperties.LivingTime livingTime)
 {
     if ((aquaticEnvironment == ThingDef_FishSpeciesProperties.AquaticEnvironment.Sea) &&
         (livingTime == ThingDef_FishSpeciesProperties.LivingTime.Day))
     {
         return(seaDayFishSpeciesTotalCommonality);
     }
     else if ((aquaticEnvironment == ThingDef_FishSpeciesProperties.AquaticEnvironment.Sea) &&
              (livingTime == ThingDef_FishSpeciesProperties.LivingTime.Night))
     {
         return(seaNightFishSpeciesTotalCommonality);
     }
     else if ((aquaticEnvironment == ThingDef_FishSpeciesProperties.AquaticEnvironment.Marsh) &&
              (livingTime == ThingDef_FishSpeciesProperties.LivingTime.Day))
     {
         return(marshDayFishSpeciesTotalCommonality);
     }
     else if ((aquaticEnvironment == ThingDef_FishSpeciesProperties.AquaticEnvironment.Marsh) &&
              (livingTime == ThingDef_FishSpeciesProperties.LivingTime.Night))
     {
         return(marshNightFishSpeciesTotalCommonality);
     }
     else
     {
         Log.Warning("FishIndustry: this aquatic environment/living time combination is not implemented.");
         return(0f);
     }
 }
Exemple #2
0
 public static List <ThingDef> GetFishSpeciesList(ThingDef_FishSpeciesProperties.AquaticEnvironment aquaticEnvironment, ThingDef_FishSpeciesProperties.LivingTime livingTime)
 {
     if (fishSpeciesListsAreInitialized == false)
     {
         InitializeFishSpeciesListsAndTotalCommonality();
         fishSpeciesListsAreInitialized = true;
     }
     if ((aquaticEnvironment == ThingDef_FishSpeciesProperties.AquaticEnvironment.Sea) &&
         (livingTime == ThingDef_FishSpeciesProperties.LivingTime.Day))
     {
         return(seaDayFishSpeciesList);
     }
     else if ((aquaticEnvironment == ThingDef_FishSpeciesProperties.AquaticEnvironment.Sea) &&
              (livingTime == ThingDef_FishSpeciesProperties.LivingTime.Night))
     {
         return(seaNightFishSpeciesList);
     }
     else if ((aquaticEnvironment == ThingDef_FishSpeciesProperties.AquaticEnvironment.Marsh) &&
              (livingTime == ThingDef_FishSpeciesProperties.LivingTime.Day))
     {
         return(marshDayFishSpeciesList);
     }
     else if ((aquaticEnvironment == ThingDef_FishSpeciesProperties.AquaticEnvironment.Marsh) &&
              (livingTime == ThingDef_FishSpeciesProperties.LivingTime.Night))
     {
         return(marshNightFishSpeciesList);
     }
     else
     {
         Log.Warning("FishIndustry: this aquatic environment/living time combination is not implemented.");
         return(null);
     }
 }