143 WeightedRandomPicker<PirateBaseTier> picker =
new WeightedRandomPicker<PirateBaseTier>();
146 picker.add(PirateBaseTier.TIER_1_1MODULE, 10f);
147 picker.add(PirateBaseTier.TIER_2_1MODULE, 10f);
148 }
else if (days < 720f) {
149 picker.add(PirateBaseTier.TIER_2_1MODULE, 10f);
150 picker.add(PirateBaseTier.TIER_3_2MODULE, 10f);
151 }
else if (days < 1080f) {
152 picker.add(PirateBaseTier.TIER_3_2MODULE, 10f);
153 picker.add(PirateBaseTier.TIER_4_3MODULE, 10f);
155 picker.add(PirateBaseTier.TIER_3_2MODULE, 10f);
156 picker.add(PirateBaseTier.TIER_4_3MODULE, 10f);
157 picker.add(PirateBaseTier.TIER_5_3MODULE, 10f);
171 return picker.pick();
185 WeightedRandomPicker<StarSystemAPI> far =
new WeightedRandomPicker<StarSystemAPI>(
random);
186 WeightedRandomPicker<StarSystemAPI> picker =
new WeightedRandomPicker<StarSystemAPI>(
random);
189 if (system.hasPulsar())
continue;
190 if (system.hasTag(Tags.THEME_SPECIAL))
continue;
191 if (system.hasTag(Tags.THEME_HIDDEN))
continue;
193 float days =
Global.
getSector().getClock().getElapsedDaysSince(system.getLastPlayerVisitTimestamp());
194 if (days < 45f)
continue;
198 if (system.hasTag(Tags.THEME_MISC_SKIP)) {
200 }
else if (system.hasTag(Tags.THEME_MISC)) {
202 }
else if (system.hasTag(Tags.THEME_REMNANT_NO_FLEETS)) {
204 }
else if (system.hasTag(Tags.THEME_REMNANT_DESTROYED)) {
206 }
else if (system.hasTag(Tags.THEME_RUINS)) {
208 }
else if (system.hasTag(Tags.THEME_CORE_UNPOPULATED)) {
212 if (weight <= 0f)
continue;
214 float usefulStuff = system.getCustomEntitiesWithTag(Tags.OBJECTIVE).size() +
215 system.getCustomEntitiesWithTag(Tags.STABLE_LOCATION).size();
216 if (usefulStuff <= 0)
continue;
218 if (Misc.hasPulsar(system))
continue;
219 if (Misc.getMarketsInLocation(system).size() > 0)
continue;
221 float dist = system.getLocation().length();
232 far.add(system, weight * usefulStuff * distMult);
234 picker.add(system, weight * usefulStuff * distMult);
238 if (picker.isEmpty()) {
242 return picker.pick();