protected override void Init(MyObjectBuilder_DefinitionBase builder) { base.Init(builder); var ob = builder as MyObjectBuilder_PlanetGeneratorDefinition; Diameter = ob.Diameter; Deviation = ob.Deviation; StructureRatio = ob.StructureRatio; NormalNoiseValue = ob.NormalNoiseValue; HasAtmosphere = ob.HasAtmosphere; HillParams = ob.HillParams; CanyonParams = ob.CanyonParams; NumLayers = ob.NumLayers; HostilityProbability = ob.HostilityProbability; SouthPole = ob.SouthPole; NorthPole = ob.NorthPole; FloraMaterialSpawnProbability = ob.FloraMaterialSpawnProbability; OrganicHeightEnd = ob.OrganicHeightEnd; MetalsOreProbability = ob.MetalsOreProbability; GravityFalloffPower = ob.GravityFalloffPower; HostileAtmosphereColorShift = ob.HostileAtmosphereColorShift; MaterialsMaxDeph = ob.MaterialsMaxDeph; MaterialsMinDeph = ob.MaterialsMinDeph; }
private static MyCsgShapePlanetHillAttributes FillValues(MyStructureParams input, MyRandom random) { MyCsgShapePlanetHillAttributes outputValues = new MyCsgShapePlanetHillAttributes(); outputValues.BlendTreshold = random.NextFloat(input.BlendSize.Min, input.BlendSize.Max); outputValues.Treshold = random.NextFloat(input.Treshold.Min, input.Treshold.Max); outputValues.Frequency = random.NextFloat(input.Frequency.Min, input.Frequency.Max); outputValues.SizeRatio = random.NextFloat(input.SizeRatio.Min, input.SizeRatio.Max); outputValues.NumNoises = random.Next((int)input.NumNoises.Min, (int)input.NumNoises.Max); return outputValues; }