3
« on: April 09, 2021, 12:05:27 PM »
Hello! I'd like to report a bug, well I think it is one. I spawned a planet using the mod and the first time it worked fine. I colonized it and the colony worked like any other colony but if I use the command again, the spawned planet will bug out: If I colonize it, nothing starts building on it. The spaceport is stuck building with no time limit whatsoever and there is no growth. Fastbuild command doesn't work, it just says no industry is being built on this planet. The problem only starts when spawning in a planet for a second time using the command, I tested it in another save and that was the result. First planet is colonized fine, second doesn't. Ps. "industry construction started" notification also doesn't fire off after colonizing.
Here is the command I used:
runcode import com.fs.starfarer.api.util.Misc; String planetName = "YourPlanetName"; float planetSize = 200; float planetOrbitDays = 180; Vector2f playerCoords = $playerFleet.getLocation(); float angleCCW = Misc.getAngleInDegreesStrict(playerCoords); StarSystemAPI sys = (StarSystemAPI)$playerFleet.getContainingLocation(); PlanetAPI star = sys.getStar(); float orbitRadius = Misc.getDistance(star.getLocation(), playerCoords); PlanetAPI planet = sys.addPlanet(planetName, star, planetName, "terran", angleCCW, planetSize, orbitRadius, planetOrbitDays ); MarketAPI market = sys.getEntityById(planetName).getMarket(); market.addCondition("farmland_bountiful"); market.addCondition("habitable"); market.addCondition("mild_climate");