private PlanetoidStat MakeRandomMoonStat(PlanetoidCategory mCategory, SystemDesirability desirability) { float radius = mCategory.Radius(); float maxHitPts = 10F; // TODO vary by desirability int capacity = 5; // TODO vary by desirability var resourceYield = CreateRandomResourceYield(desirability, ResourceCategory.Common); return new PlanetoidStat(radius, 10000F, maxHitPts, mCategory, capacity, resourceYield); }
private PlanetStat MakeRandomPlanetStat(PlanetoidCategory pCategory, SystemDesirability desirability) { float radius = pCategory.Radius(); float closeOrbitInnerRadius = radius + TempGameValues.PlanetCloseOrbitInnerRadiusAdder; float maxHitPts = 100F; // TODO vary by desirability int capacity = 25; // TODO vary by desirability var resourceYield = CreateRandomResourceYield(desirability, ResourceCategory.Common, ResourceCategory.Strategic); return new PlanetStat(radius, 1000000F, maxHitPts, pCategory, capacity, resourceYield, closeOrbitInnerRadius); }
private PlanetoidStat __MakeMoonStat(PlanetoidCategory mCategory) { float radius = mCategory.Radius(); //__GetRadius(mCategory); return new PlanetoidStat(radius, 10000F, 10F, mCategory, 5, CreateRandomResourceYield(ResourceCategory.Common)); }
private bool TryAssignMoonOrbitSlot(PlanetoidCategory mCat, int slotIndex, float startDepthForOrbitSlot, out OrbitData assignedSlot) { float depthAvailableForMoonOrbitsAroundPlanet = __systemOrbitSlotDepth; float moonObstacleZoneRadius = mCat.Radius() + TempGameValues.MoonObstacleZoneRadiusAdder; float depthReqdForOrbitSlot = moonObstacleZoneRadius * 2F; float endDepthForOrbitSlot = startDepthForOrbitSlot + depthReqdForOrbitSlot; if (endDepthForOrbitSlot > depthAvailableForMoonOrbitsAroundPlanet) { assignedSlot = null; return false; } GameTimeDuration orbitPeriod = _minMoonOrbitPeriod + (slotIndex * _moonOrbitPeriodIncrement); assignedSlot = new OrbitData(slotIndex, startDepthForOrbitSlot, endDepthForOrbitSlot, orbitPeriod); return true; }
private PlanetStat __MakePlanetStat(PlanetoidCategory pCategory) { float radius = pCategory.Radius(); //__GetRadius(pCategory); float lowOrbitRadius = radius + 1F; return new PlanetStat(radius, 1000000F, 100F, pCategory, 25, CreateRandomResourceYield(ResourceCategory.Common, ResourceCategory.Strategic), lowOrbitRadius); }