Better Zones Client/Server

This commit is contained in:
hyperion51 2020-03-31 13:44:18 +01:00
commit 4b8a300c0a
16 changed files with 223 additions and 42 deletions

View file

@ -176,8 +176,8 @@ public class ZoneGenerator
var beltCandidates = rosette
? root.AllPlanets().Where(p => p != root && p.Parent != root && p.Mass < global.BeltMassCeiling && !binaries.Contains(p))
: root.AllPlanets().Where(p => p != root && p.Mass < global.BeltMassCeiling && !binaries.Contains(p));
foreach(var planet in beltCandidates)
if (random.NextFloat() < global.BeltProbability)
foreach(var planet in beltCandidates.Reverse())
if (random.NextFloat() < global.BeltProbability && !planet.Parent.Children.Any(p=>p.Belt))
planet.Belt = true;
return root.AllPlanets().ToArray();