Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- List <CampaignTerrainAPI> terrainList=system.getTerrainCopy();
- for (CampaignTerrainAPI terrain:terrainList)
- {
- log.info("Looking for nascent gravity wells to purge.");
- //note: isInCurrentLocation doesn't work because the well is in hyper, not realspace
- if(terrain.getLocationInHyperspace() == planet.getLocationInHyperspace()&&terrain instanceof NascentGravityWellAPI);
- {
- log.info("Purging nascent gravity well.");
- //note: what if we just teleport this somewhere else and hope it don't matter
- terrain.setLocation(-10000,-10000);
- //note: shrinking things small doesn't seem to work either
- final float tinyRadius =0.1f;
- terrain.setRadius(tinyRadius);
- LocationAPI location = terrain.getContainingLocation();
- log.info("nascent grav well's location is" + location.getLocation());
- //note: this doesn't work for whatever reason
- location.removeEntity(terrain);
- break;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement