Was playing around with the beyond the sector mod, seems the generated sectors are still in the game after you leave.
Would it be possible to remove an entire system, both everything inside it and all traces of it on the hyperspace map, as well as it in the system list?
I had a look at how the Legacy of Arkgneisis removes its system ship and system if its destroyed, but I haven't been able to get anything to work in game.
Not sure how I would be able to convert this into a workable runcode command
Spoiler
code taken from loa_AnargaiaDeathManager.java in the Legacy of Arkgneisis
@author Nicke535
//The system we are keeping track of
private StarSystemAPI system;
SectorAPI sector = Global.getSector();
//Now, we kill the system completely. We also register that we're done with our job
sector.removeScript(this);
isDone = true;
List<SectorEntityToken> jumpPointsToRemove = new ArrayList<>(system.getJumpPoints());
for (SectorEntityToken point : Global.getSector().getHyperspace().getJumpPoints()) {
if (point instanceof JumpPointAPI) {
JumpPointAPI jump = ((JumpPointAPI)point);
for (JumpPointAPI.JumpDestination dest : jump.getDestinations()) {
if (dest.getDestination() != null &&
system.equals(dest.getDestination().getStarSystem())) {
jumpPointsToRemove.add(point);
break;
}
}
}
}
for (SectorEntityToken point : jumpPointsToRemove) {
point.getContainingLocation().addHitParticle(point.getLocation(), Misc.ZERO, 200f,
1f, 2f, Color.white);
((JumpPointAPI)point).clearDestinations();
Global.getSector().getHyperspace().removeEntity(point);
}
sector.removeStarSystem(system);
Any help with this would be appreciated, as I have like 30+ extra useless systems in my intel log and still floating around my game.
EditL
I've gotten around to getting this much maybe written
runcode Global.getSector().removeStarSystem(StarSystemAPI.getBaseName("ang"));
It spits out an error:
no applicable constructor/method found for actual perameters "java.land.String"; candidates are public abstract java.lang.String.com.fs.starfarer.api.campaign.StarSystemAPI.getBaseName()"
not sure where I go from hereto provide the systemID, or how to provide it.
Also looking at the api, for removeStarsystem, I don't really understand what it means by the (StarSystemAPI system) part on the api documentation, or how I would use it properly
removeStarSystem(StarSystemAPI system)