From 2edc8e4dcfaf9950b8485c97f65dad739fea0fe8 Mon Sep 17 00:00:00 2001 From: innominata Date: Tue, 31 Aug 2021 21:08:06 +1200 Subject: [PATCH] theme dev --- GalacticScale2/Scripts/Bootstrap.cs | 127 ++++++++++++++---- .../Scripts/GalacticScale2.0/Init.cs | 4 + .../PlanetModelingManager/Algorithm.cs | 15 ++- .../ModelingPlanetCoroutine.cs | 1 + .../UpdateUniversalPosition.cs | 2 +- .../Planet Generation/Modeler.cs | 4 + .../Planet Generation/PlanetAlgorithm.cs | 21 ++- .../SettingsUI/MainSettings.cs | 13 +- .../Terrain Generation/GenerateTerrain6.cs | 2 +- .../Utils/HandleLocalStarPlanets.cs | 2 +- .../Vege Generation/GenerateVeges1.cs | 2 +- 11 files changed, 152 insertions(+), 41 deletions(-) diff --git a/GalacticScale2/Scripts/Bootstrap.cs b/GalacticScale2/Scripts/Bootstrap.cs index 467575a6..72e8e41a 100644 --- a/GalacticScale2/Scripts/Bootstrap.cs +++ b/GalacticScale2/Scripts/Bootstrap.cs @@ -1,21 +1,20 @@ -using System; -using System.Collections; +using System.Collections; using System.IO; using System.Reflection; using BepInEx; using BepInEx.Logging; +using GSSerializer; using HarmonyLib; using UnityEngine; namespace GalacticScale { - public partial class GS2 { public static int PreferencesVersion = 2104; } - - + + [BepInPlugin("dsp.galactic-scale.2", "Galactic Scale 2 Plug-In", VERSION)] [BepInDependency("space.customizing.console", BepInDependency.DependencyFlags.SoftDependency)] // [BepInDependency("nebula.api", BepInDependency.DependencyFlags.HardDependency)] @@ -24,14 +23,14 @@ public class Bootstrap : BaseUnityPlugin public const string VERSION = "2.1.13.0"; public new static ManualLogSource Logger; - + // Internal Variables public static Queue buffer = new Queue(); public static PlanetData TeleportPlanet; public static StarData TeleportStar; public static bool TeleportEnabled; public static int timer; - + internal void Awake() { var v = Assembly.GetExecutingAssembly().GetName().Version; @@ -101,22 +100,105 @@ private void FixedUpdate() // { // if (GameMain.localPlanet != null && GameMain.mainPlayer != null) GS2.Warn((GameMain.localPlanet.uPosition - GameMain.mainPlayer.uPosition).magnitude + " distance"); // } - if (GS2.Config.Dev && VFInput.control && VFInput.shift && VFInput._rotate) + if (VFInput.control && VFInput.alt && VFInput.shift && VFInput._moveRight) + { + GS2.Config.EnableDevMode(); + } + if (GS2.Config.Dev && VFInput.control && VFInput.shift && VFInput._rotate && GameMain.localPlanet != null) { - if (!GameMain.isPaused && !DSPGame.IsMenuDemo) + var filename = Path.Combine(GS2.DataDir, "WorkingTheme.json"); + if (!File.Exists(filename)) { - - GameMain.Pause(); - UIRoot.instance.uiGame.escMenu._Open(); + var oldTheme = GS2.GetGSPlanet(GameMain.localPlanet).GsTheme; + var fs = new fsSerializer(); + fs.TrySerialize(oldTheme, out var data); + var json = fsJsonPrinter.PrettyJson(data); + File.WriteAllText(filename, json); + GS2.ShowMessage("WorkingTheme.json has been exported. Use the same key combination to reload it"); + return; } - else if (!GameMain.isPaused) - { - GameMain.Pause(); + GameMain.mainPlayer.controller.movementStateInFrame = EMovementState.Sail; + GameMain.mainPlayer.controller.actionSail.ResetSailState(); + GameCamera.instance.SyncForSailMode(); + // if (!GameMain.isPaused && !DSPGame.IsMenuDemo) + // { + // + // GameMain.Pause(); + // UIRoot.instance.uiGame.escMenu._Open(); + // } + // else if (!GameMain.isPaused) + // { + // GameMain.Pause(); + // + // } + // UIRoot.instance.OpenOptionWindow(); + // GS2.Warn($"********* Loading {GS2.Config.ImportFilename}"); + // GS2.Config.LoadJsonGalaxy(GS2.Config.ImportFilename); + var p = GameMain.localStar.planets[GameMain.localPlanet.index]; + var gsPlanet = GS2.GetGSPlanet(p); + GS2.GetGSStar(p.star).counter = p.index; + // GameMain.localPlanet.Unload(); + // PlanetModelingManager.currentModelingStage = 0; + // PlanetModelingManager.currentModelingSeamNormal = 0; + // PlanetModelingManager.currentModelingPlanet = p; + var newTheme = GS2.LoadJsonTheme(filename); + GS2.Warn($"LOADED THEME {newTheme.Name} CustomGen:{newTheme.CustomGeneration} TA:{newTheme.TerrainSettings.Algorithm}"); + newTheme.Process(); + gsPlanet.Theme = newTheme.Name; - } - UIRoot.instance.OpenOptionWindow(); - GS2.Warn($"********* Loading {GS2.Config.ImportFilename}"); - GS2.Config.LoadJsonGalaxy(GS2.Config.ImportFilename); + // var t = GS2.GetGSPlanet(p).GsTheme; + // t.initialized = false; + // t.terrainMaterial.Tint = Color.red; + // t.oceanMaterial.Tint = Color.green; + // t.terrainMaterial.CopyFrom = "GasGiant.terrainMat"; + // t.terrainMat = null; + // t.oceanMat = null; + // t.atmosMat = null; + // t.minimapMat = null; + // t.thumbMat = null; + // + // p.terrainMaterial = null; + // p.oceanMaterial = null; + // p.atmosMaterial = null; + // p.minimapMaterial = null; + // t.Process(); + // int themeId = newTheme.UpdateThemeProtoSet(); + // p.star.planets[p.index] = GS2.CreatePlanet(ref p.star, GS2.GetGSPlanet(p), new GS2.Random(p.seed)); + p.Free(); + p.data = null; + p.factory = null; + p.terrainMaterial = null; + p.oceanMaterial = null; + p.atmosMaterial = null; + p.minimapMaterial = null; + // p.theme = themeId; + GS2.SetPlanetTheme(p, gsPlanet); + // p.data = new PlanetRawData((int)(p.radius/4)*4); + GameMain.localStar.planets[p.index] = p; + gsPlanet.planetData = p; + PlanetModelingManager.RequestLoadPlanet(p); + GameMain.data.LeavePlanet(); + // GS2.Warn(t.terrainMaterial.Tint.ToString()); + // p.Unload(); + // UnityEngine.Object.Destroy(p.gameObject); + // // GameMain.data.ArrivePlanet(p); + // PlanetModelingManager.RequestLoadPlanet(p); + // if (PlanetModelingManager.currentModelingPlanet != null) + // { + // try + // { + // PlanetModelingManager.ModelingPlanetMain(PlanetModelingManager.currentModelingPlanet); + // } + // catch (Exception message) + // { + // GS2.Warn(message.ToString()); + // PlanetModelingManager.currentModelingPlanet.Unload(); + // PlanetModelingManager.currentModelingPlanet.factoryLoaded = false; + // PlanetModelingManager.currentModelingPlanet = null; + // PlanetModelingManager.currentModelingStage = 0; + // PlanetModelingManager.currentModelingSeamNormal = 0; + // } + // } } timer++; @@ -125,8 +207,7 @@ private void FixedUpdate() //GS2.Warn("FixedUpdate"); if (!GS2.Config.CheatMode) return; if (DSPGame.IsMenuDemo) return; - if (TeleportStar == null && TeleportPlanet == null || TeleportEnabled == false || - !(GameMain.localStar != null && GameMain.localStar.loaded)) return; + if (TeleportStar == null && TeleportPlanet == null || TeleportEnabled == false || !(GameMain.localStar != null && GameMain.localStar.loaded)) return; if (TeleportPlanet != null) { GS2.Warn($"TP to Planet {TeleportPlanet?.name} of star {TeleportPlanet?.star?.name}"); @@ -151,7 +232,7 @@ public static void Debug(object data, LogLevel logLevel, bool isActive) while (buffer.Count > 0) { var o = buffer.Dequeue(); - var l = ((object data, LogLevel loglevel, bool isActive)) o; + var l = ((object data, LogLevel loglevel, bool isActive))o; if (l.isActive) Logger.Log(l.loglevel, "Q:" + l.data); } @@ -191,7 +272,5 @@ private IEnumerator Teleport(StarData star) GameMain.mainPlayer.transform.localScale = Vector3.one; GameCamera.instance.FrameLogic(); } - - } } \ No newline at end of file diff --git a/GalacticScale2/Scripts/GalacticScale2.0/Init.cs b/GalacticScale2/Scripts/GalacticScale2.0/Init.cs index 70228d75..af568183 100644 --- a/GalacticScale2/Scripts/GalacticScale2.0/Init.cs +++ b/GalacticScale2/Scripts/GalacticScale2.0/Init.cs @@ -111,6 +111,10 @@ public static void Init() Log("End"); } + public static void ShowMessage(string message, string title = "Galactic Scale", string button = "OK") + { + UIMessageBox.Show(title.Translate(), message.Translate(), button.Translate(), 0); + } public static void OnMenuLoaded() { if (MenuHasLoaded) return; diff --git a/GalacticScale2/Scripts/GalacticScale2.0/Patches/PlanetModelingManager/Algorithm.cs b/GalacticScale2/Scripts/GalacticScale2.0/Patches/PlanetModelingManager/Algorithm.cs index 51da3811..9ff7da18 100644 --- a/GalacticScale2/Scripts/GalacticScale2.0/Patches/PlanetModelingManager/Algorithm.cs +++ b/GalacticScale2/Scripts/GalacticScale2.0/Patches/PlanetModelingManager/Algorithm.cs @@ -8,21 +8,24 @@ public partial class PatchOnPlanetModelingManager [HarmonyPatch(typeof(PlanetModelingManager), "Algorithm")] public static bool Algorithm(PlanetData planet, ref PlanetAlgorithm __result) { - //GS2.Log("Start"); + // GS2.Log("Start"); if (DSPGame.IsMenuDemo) return true; if (GS2.Vanilla) return true; - //GS2.Log("CHOOSING ALGORITHM FOR " + planet.displayName + " rawdata?"+(planet.data != null)); + // GS2.Log("CHOOSING ALGORITHM FOR " + planet.displayName + " rawdata?"+(planet.data != null)); var gsPlanet = GS2.GetGSPlanet(planet); + GS2.Warn(gsPlanet.Theme); var gsTheme = GS2.ThemeLibrary.Find(gsPlanet.Theme); - //GS2.Log("Use Custom Generation? " + gsTheme.CustomGeneration); + // GS2.Log("Use Custom Generation? " + gsTheme.CustomGeneration); if (!GS2.ThemeLibrary.Find(gsPlanet.Theme).CustomGeneration) - //GS2.Log("CHOSE COMPLETELY VANILLA"); + { + // GS2.Log("CHOSE COMPLETELY VANILLA"); return true; - //GS2.Log("USING CUSTOM GENERATION FOR PLANET " + planet.displayName); + } + // GS2.Log("USING CUSTOM GENERATION FOR PLANET " + planet.displayName); __result = new GS2PlanetAlgorithm(gsPlanet); //new GS2PlanetAlgorithm(gsPlanet); __result.Reset(5, planet); - //GS2.Log("PatchOnPlanetModellingManager|Algorithm|" + __result.planet.name+"|End|"+__result.seed); + // GS2.Log("PatchOnPlanetModellingManager|Algorithm|" + __result.planet.name+"|End|"+__result.seed); return false; } } diff --git a/GalacticScale2/Scripts/GalacticScale2.0/Patches/PlanetModelingManager/ModelingPlanetCoroutine.cs b/GalacticScale2/Scripts/GalacticScale2.0/Patches/PlanetModelingManager/ModelingPlanetCoroutine.cs index 7ff6490c..7e22dfa7 100644 --- a/GalacticScale2/Scripts/GalacticScale2.0/Patches/PlanetModelingManager/ModelingPlanetCoroutine.cs +++ b/GalacticScale2/Scripts/GalacticScale2.0/Patches/PlanetModelingManager/ModelingPlanetCoroutine.cs @@ -8,6 +8,7 @@ public partial class PatchOnPlanetModelingManager [HarmonyPatch(typeof(PlanetModelingManager), "ModelingPlanetCoroutine")] public static bool ModelingPlanetCoroutine() { + // GS2.Log("ModelingPlanetCoroutine"); Modeler.ModelingCoroutine(); return false; } diff --git a/GalacticScale2/Scripts/GalacticScale2.0/Patches/PlanetSimulator/UpdateUniversalPosition.cs b/GalacticScale2/Scripts/GalacticScale2.0/Patches/PlanetSimulator/UpdateUniversalPosition.cs index c78096c4..548c7ef8 100644 --- a/GalacticScale2/Scripts/GalacticScale2.0/Patches/PlanetSimulator/UpdateUniversalPosition.cs +++ b/GalacticScale2/Scripts/GalacticScale2.0/Patches/PlanetSimulator/UpdateUniversalPosition.cs @@ -14,7 +14,7 @@ public static bool UpdateUniversalPosition(ref PlanetSimulator __instance, ref S Vector3 cameraPos) { if (__instance.planetData == null || __instance.planetData.loading || - __instance.planetData.factoryLoading) return false; + __instance.planetData.factoryLoading || __instance.planetData == PlanetModelingManager.currentModelingPlanet) return false; __instance.SetLayers(); var localPlanet = GameMain.localPlanet; diff --git a/GalacticScale2/Scripts/GalacticScale2.0/Planet Generation/Modeler.cs b/GalacticScale2/Scripts/GalacticScale2.0/Planet Generation/Modeler.cs index 30858675..64ab6b13 100644 --- a/GalacticScale2/Scripts/GalacticScale2.0/Planet Generation/Modeler.cs +++ b/GalacticScale2/Scripts/GalacticScale2.0/Planet Generation/Modeler.cs @@ -29,6 +29,7 @@ private static double distanceTo(PlanetData planet) public static bool Compute(ref ThreadFlag ___planetComputeThreadFlag, ref ThreadFlagLock ___planetComputeThreadFlagLock, ref Thread ___planetComputeThread) { + GS2.Log("Compute"); object obj = null; lock (planetComputeThreadFlagLock) { @@ -94,11 +95,13 @@ public static bool Compute(ref ThreadFlag ___planetComputeThreadFlag, var num4 = 0.0; if (planetData.data == null) { + GS2.Log($"Creating Planet {planetData.name}"); highStopwatch.Begin(); planetData.data = new PlanetRawData(planetData.precision); planetData.modData = planetData.data.InitModData(planetData.modData); planetData.data.CalcVerts(); planetData.aux = new PlanetAuxData(planetData); + GS2.Log("Generating Terrain"); planetAlgorithm.GenerateTerrain(planetData.mod_x, planetData.mod_y); planetAlgorithm.CalcWaterPercent(); num2 = highStopwatch.duration; @@ -106,6 +109,7 @@ public static bool Compute(ref ThreadFlag ___planetComputeThreadFlag, if (planetData.factory == null) { + GS2.Log("Creating Factory"); highStopwatch.Begin(); if (planetData.type != EPlanetType.Gas) planetAlgorithm.GenerateVegetables(); num3 = highStopwatch.duration; diff --git a/GalacticScale2/Scripts/GalacticScale2.0/Planet Generation/PlanetAlgorithm.cs b/GalacticScale2/Scripts/GalacticScale2.0/Planet Generation/PlanetAlgorithm.cs index 04ad1fdc..9a248d82 100644 --- a/GalacticScale2/Scripts/GalacticScale2.0/Planet Generation/PlanetAlgorithm.cs +++ b/GalacticScale2/Scripts/GalacticScale2.0/Planet Generation/PlanetAlgorithm.cs @@ -10,8 +10,8 @@ public class GS2PlanetAlgorithm : PlanetAlgorithm public GS2PlanetAlgorithm(GSPlanet gsPlanet) { - //GS2.Log("GS2PlanetAlgorithm|Constructor|Begin"); - //GS2.Log("GS2PlanetAlgorithm|Constructor|CREATING CUSTOM PLANET ALGORITHM FOR " + gsPlanet.Name); + GS2.Log("GS2PlanetAlgorithm|Constructor|Begin"); + GS2.Log("GS2PlanetAlgorithm|Constructor|CREATING CUSTOM PLANET ALGORITHM FOR " + gsPlanet.Name); //GS2.Log("GS2PlanetAlgorithm|Constructor|Selecting Theme " + gsPlanet.Theme); var gSTheme = GSSettings.ThemeLibrary.Find(gsPlanet.Theme); //GS2.Log("GS2PlanetAlgorithm|Constructor|Selected Theme"); @@ -26,16 +26,20 @@ public GS2PlanetAlgorithm(GSPlanet gsPlanet) //GS2.Log("GS2PlanetAlgorithm|Constructor|Terrain Algo: " + gsTheme.TerrainSettings.Algorithm + " Vein Algo: " + gsTheme.VeinSettings.Algorithm + " Vege Algo: " + gsTheme.VegeSettings.Algorithm); if (gsTheme.TerrainSettings.Algorithm == "Vanilla") - //GS2.Log("GS2PlanetAlgorithm|Constructor|Terrain Algo Being Set to Vanilla"); + { + GS2.Log("GS2PlanetAlgorithm|Constructor|Terrain Algo Being Set to Vanilla"); terrainAlgo = (p, modX, modY) => { //GS2.Log("GS2PlanetAlgorithm|Constructor|Vanilla Terrain Algo Running"); baseAlgorithm.GenerateTerrain(modX, modY); }; + } else - //GS2.Log("GS2PlanetAlgorithm|Constructor|Terrain Algo Being Set to " + gsTheme.TerrainSettings.Algorithm); + { + GS2.Log("GS2PlanetAlgorithm|Constructor|Terrain Algo Being Set to " + gsTheme.TerrainSettings.Algorithm); terrainAlgo = GS2.TerrainAlgorithmLibrary.Find(gsTheme.TerrainSettings.Algorithm); - //this.terrainAlgo = (gsTheme.TerrainSettings.Algorithm == "Vanilla") ? (GSPlanet p, double modX, double modY) => { baseAlgorithm.GenerateTerrain(modX, modY); } : + //this.}terrainAlgo = (gsTheme.TerrainSettings.Algorithm == "Vanilla") ? (GSPlanet p, double modX, double modY) => { baseAlgorithm.GenerateTerrain(modX, modY); } : + } if (gsTheme.VeinSettings.Algorithm == "Vanilla") veinAlgo = (p, sketchOnly) => @@ -49,11 +53,16 @@ public GS2PlanetAlgorithm(GSPlanet gsPlanet) if (gsTheme.VegeSettings.Algorithm == "Vanilla") vegeAlgo = p => { - //GS2.Log("GS2PlanetAlgorithm|Constructor|Vanilla Vege Algo Running"); + GS2.Log("GS2PlanetAlgorithm|Constructor|Vanilla Vege Algo Running"); baseAlgorithm.GenerateVegetables(); }; else + { + GS2.Log("GS2PlanetAlgorithm|Constructor|GS Vege Algo Running"); + vegeAlgo = GS2.VegeAlgorithmLibrary.Find(gsTheme.VegeSettings.Algorithm); + GS2.Warn("NonstandardVegealgo"); + } //this.vegeAlgo = (gsTheme.VegeSettings.Algorithm == "Vanilla") ? (GSPlanet p) => { // GS2.Log("GS2.VeinAlgorithmLibrary.Find(gsTheme.VegeSettings.Algorithm);") diff --git a/GalacticScale2/Scripts/GalacticScale2.0/SettingsUI/MainSettings.cs b/GalacticScale2/Scripts/GalacticScale2.0/SettingsUI/MainSettings.cs index dc13e242..0ee60d47 100644 --- a/GalacticScale2/Scripts/GalacticScale2.0/SettingsUI/MainSettings.cs +++ b/GalacticScale2/Scripts/GalacticScale2.0/SettingsUI/MainSettings.cs @@ -38,6 +38,11 @@ public bool MinifyJson set => Preferences.Set("Minify JSON", value); } + public void EnableDevMode() + { + Preferences.Set("Dev", true); + GS2.SavePreferences(); + } public bool FixCopyPaste => true; //Preferences.GetBool("Fix CopyPaste", true); public string GeneratorID => Preferences.GetString("Generator ID", "space.customizing.generators.vanilla"); @@ -149,7 +154,13 @@ public void Init() DebugOptions.Add(GSUI.Checkbox("Force Rare Spawn".Translate(), false, "Force Rare Spawn", null, "Ignore randomness/distance checks".Translate())); _cheatModeCheckbox = DebugOptions.Add(GSUI.Checkbox("Cheat Mode".Translate(), false, "Cheat Mode", null, "All Research, TP by ctrl-click nav arrow".Translate())); DebugOptions.Add(GSUI.Slider("Ship Speed Multiplier".Translate(), 1f, 1f, 100f, "Logistics Ship Multi", null, "Multiplier for Warp Speed of Ships".Translate())); - // DebugOptions.Add(GSUI.Button("Fix Binary Star Position".Translate(), "Now", ResetBinaryStars, null, "Will need to be saved and loaded to apply".Translate())); + DebugOptions.Add(GSUI.Button("Set ResourceMulti Infinite".Translate(), "Now", (o)=> + { + // GS2.WarnJson(gameDesc); + gameDesc.resourceMultiplier = 100; + GSSettings.GalaxyParams.resourceMulti = 100; + GS2.WarnJson(gameDesc.resourceMultiplier); + }, null, "Will need to be saved and loaded to apply".Translate())); // DebugOptions.Add(GSUI.Button("Test", "Now", (o) => // { // Warn("ExternalThemes:"); diff --git a/GalacticScale2/Scripts/GalacticScale2.0/Terrain Generation/GenerateTerrain6.cs b/GalacticScale2/Scripts/GalacticScale2.0/Terrain Generation/GenerateTerrain6.cs index b924efe7..4f54d7dc 100644 --- a/GalacticScale2/Scripts/GalacticScale2.0/Terrain Generation/GenerateTerrain6.cs +++ b/GalacticScale2/Scripts/GalacticScale2.0/Terrain Generation/GenerateTerrain6.cs @@ -9,7 +9,7 @@ public static void GenerateTerrain6(GSPlanet gsPlanet, double modX = 0.0, double { if (gsPlanet == null) {GS2.Warn("gsPlanet Null");return;} random = new GS2.Random(gsPlanet.Seed); - // GS2.Log($"USING GSTA6 FOR {gsPlanet.Name} with seed {GSSettings.Seed}"); + GS2.Log($"USING GSTA6 FOR {gsPlanet.Name} with seed {GSSettings.Seed}"); var t = gsPlanet.GsTheme.TerrainSettings; //GS2.Log("Generate Terrain for "+gsPlanet.Name + " " + t.landModifier ); var xPrecision = t.xFactor; diff --git a/GalacticScale2/Scripts/GalacticScale2.0/Utils/HandleLocalStarPlanets.cs b/GalacticScale2/Scripts/GalacticScale2.0/Utils/HandleLocalStarPlanets.cs index 50eda70b..6dcd7a8a 100644 --- a/GalacticScale2/Scripts/GalacticScale2.0/Utils/HandleLocalStarPlanets.cs +++ b/GalacticScale2/Scripts/GalacticScale2.0/Utils/HandleLocalStarPlanets.cs @@ -166,7 +166,7 @@ private static void SearchPlanet() var planet = closestStar.planets[i]; if (DistanceTo(planet) < TransisionDistance(planet)) { - GS2.Log($"Switching to {planet.name}"); + // GS2.Log($"Switching to {planet.name}"); closestPlanet = planet; break; } diff --git a/GalacticScale2/Scripts/GalacticScale2.0/Vege Generation/GenerateVeges1.cs b/GalacticScale2/Scripts/GalacticScale2.0/Vege Generation/GenerateVeges1.cs index dd5049c9..238a4a00 100644 --- a/GalacticScale2/Scripts/GalacticScale2.0/Vege Generation/GenerateVeges1.cs +++ b/GalacticScale2/Scripts/GalacticScale2.0/Vege Generation/GenerateVeges1.cs @@ -9,7 +9,7 @@ public static class VegeAlgorithms public static void GenerateVeges1(GSPlanet gsPlanet) { - //GS2.Log("GenerateVeges1|" + gsPlanet.Name); + GS2.Log("GenerateVeges1|" + gsPlanet.Name); GS2.Warn($"USING GS2 Vege FOR {gsPlanet.Name} with seed {GSSettings.Seed}"); var planet = gsPlanet.planetData; var themeProto = LDB.themes.Select(planet.theme);