mirror of
https://github.com/GTNewHorizons/Binnie.git
synced 2026-11-12 16:37:29 +00:00
Allow gene database to add species with the same name
This commit is contained in:
1 parent
c91da9fee9
commit
c641da2f7f
2 files changed
+11
-3
No files matched your search
@@ -211,9 +211,9 @@ public class ManagerGenetics extends ManagerBase {
|
||||
if (o1 instanceof IAlleleInteger && o2 instanceof IAlleleInteger && !(o1 instanceof AlleleColor)) {
|
||||
return Integer.valueOf(((IAlleleInteger) o1).getValue()).compareTo(((IAlleleInteger) o2).getValue());
|
||||
}
|
||||
if (o1.getName() != null && o2.getName() != null) {
|
||||
return o1.getName().compareTo(o2.getName());
|
||||
}
|
||||
// if (o1.getName() != null && o2.getName() != null) {
|
||||
// return o1.getName().compareTo(o2.getName());
|
||||
// }
|
||||
return o1.getUID().compareTo(o2.getUID());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,11 +11,14 @@ import binnie.core.craftgui.controls.core.IControlValue;
|
||||
import binnie.core.craftgui.events.EventMouse;
|
||||
import binnie.core.craftgui.geometry.IPoint;
|
||||
import binnie.core.craftgui.minecraft.Window;
|
||||
import binnie.core.util.I18N;
|
||||
import binnie.genetics.api.IGene;
|
||||
import binnie.genetics.core.GeneticsTexture;
|
||||
import binnie.genetics.genetics.Engineering;
|
||||
import forestry.api.genetics.IAlleleSpecies;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
|
||||
public class ControlGene extends Control implements IControlValue<IGene>, ITooltip {
|
||||
protected IGene gene;
|
||||
@@ -30,6 +33,11 @@ public class ControlGene extends Control implements IControlValue<IGene>, IToolt
|
||||
public void getTooltip(Tooltip tooltip) {
|
||||
String cName = Binnie.Genetics.getSystem(gene.getSpeciesRoot()).getChromosomeName(gene.getChromosome());
|
||||
tooltip.add(cName + ": " + gene.getName());
|
||||
if (gene.getAllele() instanceof IAlleleSpecies) {
|
||||
tooltip.add(I18N.localise(
|
||||
"binniecore.gui.database.branch.discoveredBy",
|
||||
((IAlleleSpecies) gene.getAllele()).getAuthority() + EnumChatFormatting.RESET));
|
||||
}
|
||||
if (isMouseOver() && canFill(Window.get(this).getHeldItemStack())) {
|
||||
tooltip.add("Left click to assign gene");
|
||||
IGene existingGene = Engineering.getGene(
|
||||
|
||||
Reference in new issue
Block a user