Example #1
0
 public WorldGenSpawnConditions Clone()
 {
     return(new WorldGenSpawnConditions()
     {
         Group = Group,
         MinLightLevel = MinLightLevel,
         MaxLightLevel = MaxLightLevel,
         LightLevelType = LightLevelType,
         HerdSize = HerdSize?.Clone(),
         Companions = Companions?.Clone() as AssetLocation[],
         InsideBlockCodes = InsideBlockCodes?.Clone() as AssetLocation[],
         RequireSolidGround = RequireSolidGround,
         TryOnlySurface = TryOnlySurface,
         MinTemp = MinTemp,
         MaxTemp = MaxTemp,
         MinRain = MinRain,
         MaxRain = MaxRain,
         ClimateValueMode = ClimateValueMode,
         MinForest = MinForest,
         MaxForest = MaxForest,
         MinShrubs = MinShrubs,
         MaxShrubs = MaxShrubs,
         MinForestOrShrubs = MinForestOrShrubs,
         TriesPerChunk = TriesPerChunk?.Clone()
     });
 }
Example #2
0
 /// <summary>
 /// Duplicates the properties, which includes cloning the stack that was eaten.
 /// </summary>
 /// <returns></returns>
 public TransitionableProperties Clone()
 {
     return(new TransitionableProperties()
     {
         FreshHours = FreshHours.Clone(),
         TransitionHours = TransitionHours.Clone(),
         TransitionRatio = TransitionRatio,
         TransitionedStack = TransitionedStack?.Clone(),
         Type = Type
     });
 }