55 WeightedRandomPicker<StarSystemAPI> picker =
new WeightedRandomPicker<StarSystemAPI>(
random);
57 if (system.hasTag(Tags.THEME_CORE_POPULATED))
continue;
58 if (system.hasTag(Tags.THEME_REMNANT_MAIN))
continue;
59 if (system.hasTag(Tags.THEME_REMNANT_RESURGENT))
continue;
60 if (system.hasTag(Tags.THEME_HIDDEN))
continue;
66 float sinceVisit =
Global.
getSector().getClock().getElapsedDaysSince(system.getLastPlayerVisitTimestamp());
67 if (sinceVisit < 60)
continue;
74 StarSystemAPI system = picker.pick();
81 EntityLocation loc = BaseThemeGenerator.pickHiddenLocationNotNearStar(
random, system, 100f,
null);
88 AddedEntity added = BaseThemeGenerator.addEntity(
random, system, loc, Entities.TECHNOLOGY_CACHE, Factions.NEUTRAL);
90 if (added ==
null || added.entity ==
null) {
97 added.entity.setDiscoverable(
null);
98 added.entity.setDiscoveryXP(
null);
99 added.entity.setSensorProfile(
null);
101 added.entity.addTag(Tags.EXPIRES);