Einharr / SeedshipRelaunchWeb

4 stars 2 forks source link

Add in ability to set planet traits in debug mode #31

Open alexjyong opened 2 years ago

alexjyong commented 2 years ago

Would be nice to be able to set a planet with given traits in debug mode.

You can do this with the web debugger but having an option would be useful to do it in UI

alexjyong commented 2 years ago

@Einharr sent me this:

`It's, actually, pretty much the same 850+ line.

Well, my take on this would be:

We store planet from the interface input same way as generator uses it:
(d for desired. Here's example)
    dPlanet = new planet(
      either("Non-breathable", "Toxic", "Corrosive", "None"),
      either("Very High", "Very Low", "Very High", "Very Low", "Low", "High"),
      either("Very Hot", "Very Cold", "Very Hot", "Very Cold", "Cold", "Hot"),
      either("Ice-covered surface", "Trace", "None", "None"),
      either("Poor", "None", "None"),
      PlanetAnomalies,
      PlanetAnomaliesReal,
      CurPlanetDescription = null,
      nativeTechLevel,
      PlanetNatives,
      nativeCulture,
      0,
    );

We add if 

  if (predefindePlanet== true) {
    cPlanet =dPlanet;
  }

at the beginning of the planet generator (850+line)

and flag predefindePlanet=false; in the end of planet gen.

Then we fire
predefindePlanet=true;
nextPlanet();`