@Override public final boolean isSecret(final IAlleleSpecies species) { return !species.isCounted(); }
public void setSpecies(@Nullable final IAlleleSpecies species) { if (species != this.species) { this.species = species; this.movePercentage(-100.0f); final IBreedingSystem system = ((WindowAbstractDatabase) this.getTopParent()).getBreedingSystem(); final List<IMutation> discovered = system.getDiscoveredMutations(Window.get(this).getWorld(), Window.get(this).getUsername()); if (species != null) { if (this.type == Type.Resultant) { this.setOptions(system.getResultantMutations(species)); } else { final List<IMutation> mutations = system.getFurtherMutations(species); int i = 0; while (i < mutations.size()) { final IMutation mutation = mutations.get(i); if (!discovered.contains(mutation) && !((IAlleleSpecies) mutation.getTemplate()[0]).isCounted()) { mutations.remove(i); } else { ++i; } } this.setOptions(mutations); } } } }
private static String generateSpeciesListEntry(IAlleleSpecies species, IBreedingTracker tracker) { String discovered = ""; if (tracker.isDiscovered(species)) { discovered = discoveredSymbol; } String blacklisted = ""; if (AlleleManager.alleleRegistry.isBlacklisted(species.getUID())) { blacklisted = blacklistedSymbol; } String notCounted = ""; if (!species.isCounted()) { notCounted = notCountedSymbol; } return speciesListEntry(discovered, blacklisted, notCounted, species.getUID(), species.getAlleleName(), species.getAuthority()); }