More null annotations

This commit is contained in:
mezz committed 2017-02-07 00:05:24 -08:00
1 parent da8a833485
commit a5daa93bf1
163 files changed
+952 -849

No files matched your search

@@ -54,7 +54,7 @@ public class ControlDatabaseIndividualDisplay extends ControlItemDisplay impleme
@Override
public void onEvent(final EventMouse.Down event) {
if (event.getButton() == 0 && ControlDatabaseIndividualDisplay.this.species != null && EnumDiscoveryState.Show == ControlDatabaseIndividualDisplay.this.discovered) {
((WindowAbstractDatabase) ControlDatabaseIndividualDisplay.this.getSuperParent()).gotoSpeciesDelayed(ControlDatabaseIndividualDisplay.this.species);
((WindowAbstractDatabase) ControlDatabaseIndividualDisplay.this.getTopParent()).gotoSpeciesDelayed(ControlDatabaseIndividualDisplay.this.species);
}
}
});
@@ -30,7 +30,7 @@ class ControlMutationBox extends ControlListBox<IMutation> {
this.species = species;
this.index = 0;
this.movePercentage(-100.0f);
final BreedingSystem system = ((WindowAbstractDatabase) this.getSuperParent()).getBreedingSystem();
final BreedingSystem 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) {
@@ -21,8 +21,8 @@ class ControlMutationItem extends ControlOption<IMutation> {
this.itemWidget3 = new ControlDatabaseIndividualDisplay(this, 104, 4);
this.addSymbol = new ControlMutationSymbol(this, 24, 4, 0);
this.arrowSymbol = new ControlMutationSymbol(this, 64, 4, 1);
final boolean isNEI = ((WindowAbstractDatabase) this.getSuperParent()).isNEI();
final BreedingSystem system = ((WindowAbstractDatabase) this.getSuperParent()).getBreedingSystem();
final boolean isNEI = ((WindowAbstractDatabase) this.getTopParent()).isNEI();
final BreedingSystem system = ((WindowAbstractDatabase) this.getTopParent()).getBreedingSystem();
if (this.getValue() != null) {
final boolean isMutationDiscovered = system.isMutationDiscovered(this.getValue(), Window.get(this).getWorld(), Window.get(this).getUsername());
IAlleleSpecies allele = null;
@@ -41,8 +41,8 @@ class ControlMutationSymbol extends Control implements ITooltip {
public void setValue(final IMutation value) {
this.value = value;
final boolean isNEI = ((WindowAbstractDatabase) this.getSuperParent()).isNEI();
final BreedingSystem system = ((WindowAbstractDatabase) this.getSuperParent()).getBreedingSystem();
final boolean isNEI = ((WindowAbstractDatabase) this.getTopParent()).isNEI();
final BreedingSystem system = ((WindowAbstractDatabase) this.getTopParent()).getBreedingSystem();
this.discovered = (isNEI || system.isMutationDiscovered(value, Window.get(this).getWorld(), Window.get(this).getUsername()));
if (this.discovered) {
this.setColour(16777215);
@@ -56,7 +56,7 @@ class ControlMutationSymbol extends Control implements ITooltip {
if (this.type == 1 && this.discovered) {
final IAllele species1 = this.value.getAllele0();
final IAllele species2 = this.value.getAllele1();
final BreedingSystem system = ((WindowAbstractDatabase) this.getSuperParent()).getBreedingSystem();
final BreedingSystem system = ((WindowAbstractDatabase) this.getTopParent()).getBreedingSystem();
final float chance = system.getChance(this.value, Window.get(this).getPlayer(), species1, species2);
tooltip.add("Current Chance - " + chance + "%");
if (this.value.getSpecialConditions() != null) {
@@ -24,7 +24,7 @@ public class PageBranchSpecies extends PageBranch {
@Override
public void onEvent(final EventValueChanged event) {
if (event.isOrigin(PageBranchSpecies.this.pageBranchSpecies_speciesList)) {
((WindowAbstractDatabase) PageBranchSpecies.this.getSuperParent()).gotoSpecies((IAlleleSpecies) event.getValue());
((WindowAbstractDatabase) PageBranchSpecies.this.getTopParent()).gotoSpecies((IAlleleSpecies) event.getValue());
}
}
});
@@ -15,6 +15,6 @@ public class PageBreederStats extends Control {
super(parent, 0, 0, w, h);
this.player = player;
final ControlText pageBranchOverview_branchName = new ControlTextCentered(this, 8, TextFormatting.UNDERLINE + Binnie.LANGUAGE.localise("binniecore.gui.database.breeder.stats"));
final BreedingSystem system = ((WindowAbstractDatabase) this.getSuperParent()).getBreedingSystem();
final BreedingSystem system = ((WindowAbstractDatabase) this.getTopParent()).getBreedingSystem();
}
}
@@ -202,7 +202,7 @@ public abstract class WindowAbstractDatabase extends Window {
public void onUpdateClient() {
super.onUpdateClient();
if (this.gotoSpecies != null) {
((WindowAbstractDatabase) this.getSuperParent()).gotoSpecies(this.gotoSpecies);
((WindowAbstractDatabase) this.getTopParent()).gotoSpecies(this.gotoSpecies);
this.gotoSpecies = null;
}
}