22 {
new Color(140, 100, 235),
23 new Color(180, 110, 210),
24 new Color(150, 140, 190),
25 new Color(140, 190, 210),
26 new Color(90, 200, 170),
27 new Color(65, 230, 160),
28 new Color(20, 220, 70) },
29 {
new Color(50, 20, 110, 130),
30 new Color(150, 30, 120, 150),
31 new Color(200, 50, 130, 190),
32 new Color(250, 70, 150, 240),
33 new Color(200, 80, 130, 255),
34 new Color(75, 0, 160),
35 new Color(127, 0, 255) },
36 {
new Color(90, 180, 140),
37 new Color(130, 145, 190),
38 new Color(165, 110, 225),
39 new Color(95, 55, 240),
40 new Color(45, 0, 250),
41 new Color(20, 0, 240),
42 new Color(10, 0, 150) },
43 {
new Color(90, 180, 40),
44 new Color(130, 145, 90),
45 new Color(165, 110, 145),
46 new Color(95, 55, 160),
47 new Color(45, 0, 130),
48 new Color(20, 0, 130),
49 new Color(10, 0, 150) },
50 {
new Color(50, 20, 110, 130),
51 new Color(150, 30, 120, 150),
52 new Color(200, 50, 130, 190),
53 new Color(250, 70, 150, 240),
54 new Color(200, 80, 130, 255),
55 new Color(75, 0, 160),
56 new Color(127, 0, 255) },
57 {
new Color(55, 60, 140),
58 new Color(65, 85, 155),
59 new Color(175, 105, 165),
60 new Color(90, 130, 180),
61 new Color(105, 150, 190),
62 new Color(120, 175, 205),
63 new Color(135, 200, 220)},
72 StarSystemAPI system = context.system;
73 SectorEntityToken parent = context.center;
74 if (context.parent !=
null) parent = context.parent;
76 boolean isStar =
false;
77 boolean hasAtmosphere =
false;
78 if (parent instanceof PlanetAPI) {
79 PlanetAPI planet = (PlanetAPI) parent;
80 isStar = planet.isStar();
81 hasAtmosphere = planet.getSpec().getAtmosphereThickness() > 0;
82 }
else if (parent == context.system.getCenter()) {
86 if (context.parent !=
null) parent = context.parent;
95 float midRadius = (parent.getRadius() +
WIDTH_PLANET) / 2f;
98 float visStartRadius = parent.getRadius();
99 float visEndRadius = parent.getRadius() +
WIDTH_PLANET + 50f;
100 float auroraProbability = 0f;
104 if (isStar || context.orbitIndex > 0) {
106 midRadius = context.currentRadius + bandWidth / 2f;
107 visStartRadius = context.currentRadius;
108 visEndRadius = context.currentRadius + bandWidth;
113 auroraProbability = 1f;
117 }
else if (hasAtmosphere) {
121 SectorEntityToken magField = system.addTerrain(Terrain.MAGNETIC_FIELD,
122 new MagneticFieldParams(bandWidth,
131 magField.setCircularOrbit(parent, 0, 0, 100);
133 GenResult result =
new GenResult();
134 result.onlyIncrementByWidth = !isStar;
135 result.orbitalWidth = orbitalWidth;
136 result.entities.add(magField);