WilliamOverflowQvQ / StarSectorSystemGenerator

0 stars 0 forks source link

Some sample codes. #3

Open WilliamOverflowQvQ opened 3 years ago

WilliamOverflowQvQ commented 3 years ago

RunCode StarSystemAPI system = ((StarSystemAPI)Global.getSector().getStarSystem("Al Gebbar")); PlanetAPI p_Al_Gebbar = ((PlanetAPI)((StarSystemAPI)Global.getSector().getStarSystem("Al Gebbar")).getStar());

PlanetAPI p_Hope = system.addPlanet("Hope", p_Al_Gebbar, "Hope", "gas_giant", 200, 400, 7000, 720); PlanetAPI p_Hope_I = system.addPlanet("Hope I", p_Hope, "Hope I", "barren-desert", 0, 80, 800, 60); PlanetAPI p_Hope_II = system.addPlanet("Hope II", p_Hope, "Hope II", "desert1", 90, 90, 1000, 90);

system.addAsteroidBelt(p_Hope, 7, 1200,100,90,180); system.autogenerateHyperspaceJumpPoints(true,true);


RunCode StarSystemAPI system = ((StarSystemAPI)Global.getSector().getStarSystem("Al Gebbar")); PlanetAPI p_Al_Gebbar = ((PlanetAPI)((StarSystemAPI)Global.getSector().getStarSystem("Al Gebbar")).getStar()); PlanetAPI p_Hope = null; for (PlanetAPI ipapi : system.getPlanets()) { if(((PlanetAPI)ipapi).getName().equals("Hope"))p_Hope = (PlanetAPI)ipapi; }

system.addAsteroidBelt(p_Hope, 50, 1200, 256, 90, 180, Terrain.ASTEROID_BELT, null); system.addRingBand(p_Hope, "misc", "rings_dust0", 256f, 0, Color.yellow, 256f, 1200, 180);


RunCode StarSystemAPI system = ((StarSystemAPI)Global.getSector().getStarSystem("Al Gebbar")); PlanetAPI p_Al_Gebbar = ((PlanetAPI)((StarSystemAPI)Global.getSector().getStarSystem("Al Gebbar")).getStar()); for(JumpPointAPI i : system.getAutogeneratedJumpPointsInHyper()){ Console.showMessage(i); }

system.addAsteroidBelt(p_Hope, 7, 1200,100,90,180);

SectorEntityToken addAsteroidBelt(SectorEntityToken focus, int numAsteroids, float orbitRadius, float width, float minOrbitDays, float maxOrbitDays)

WilliamOverflowQvQ commented 3 years ago

RunCode StarSystemAPI system = ((StarSystemAPI)Global.getSector().getStarSystem("Al Gebbar")); PlanetAPI p_Hope = null; for(PlanetAPI ipapi : system.getPlanets()) { if(((PlanetAPI)ipapi).getName().equals("Hope"))p_Hope = (PlanetAPI)ipapi; } SectorEntityToken Hope_Relay = system.addCustomEntity("Hope Relay", "Hope Relay", "comm_relay", "player"); Hope_Relay.setCircularOrbitPointingDown(p_Hope, 300, 800, 60);