Massive Localization Update.
This commit is contained in:
@@ -45,7 +45,7 @@ public class GuiLevelEmitter extends GuiUpgradeable
|
|||||||
@Override
|
@Override
|
||||||
protected void addButtons()
|
protected void addButtons()
|
||||||
{
|
{
|
||||||
redstoneMode = new GuiImgButton( this.guiLeft - 18, guiTop + 8, Settings.REDSTONE_EMITTER, RedstoneMode.IGNORE );
|
redstoneMode = new GuiImgButton( this.guiLeft - 18, guiTop + 8, Settings.REDSTONE_EMITTER, RedstoneMode.LOW_SIGNAL );
|
||||||
fuzzyMode = new GuiImgButton( this.guiLeft - 18, guiTop + 28, Settings.FUZZY_MODE, FuzzyMode.IGNORE_ALL );
|
fuzzyMode = new GuiImgButton( this.guiLeft - 18, guiTop + 28, Settings.FUZZY_MODE, FuzzyMode.IGNORE_ALL );
|
||||||
|
|
||||||
buttonList.add( plus1 = new GuiButton( 0, this.guiLeft + 20, this.guiTop + 17, 22, 20, "+1" ) );
|
buttonList.add( plus1 = new GuiButton( 0, this.guiLeft + 20, this.guiTop + 17, 22, 20, "+1" ) );
|
||||||
|
|||||||
@@ -14,8 +14,6 @@ import appeng.api.config.ActionItems;
|
|||||||
import appeng.api.config.CondenserOuput;
|
import appeng.api.config.CondenserOuput;
|
||||||
import appeng.api.config.FullnessMode;
|
import appeng.api.config.FullnessMode;
|
||||||
import appeng.api.config.FuzzyMode;
|
import appeng.api.config.FuzzyMode;
|
||||||
import appeng.api.config.IncludeExclude;
|
|
||||||
import appeng.api.config.MatchingMode;
|
|
||||||
import appeng.api.config.OperationMode;
|
import appeng.api.config.OperationMode;
|
||||||
import appeng.api.config.PowerUnits;
|
import appeng.api.config.PowerUnits;
|
||||||
import appeng.api.config.RedstoneMode;
|
import appeng.api.config.RedstoneMode;
|
||||||
@@ -27,6 +25,7 @@ import appeng.api.config.SortOrder;
|
|||||||
import appeng.api.config.ViewItems;
|
import appeng.api.config.ViewItems;
|
||||||
import appeng.api.config.YesNo;
|
import appeng.api.config.YesNo;
|
||||||
import appeng.client.texture.ExtraTextures;
|
import appeng.client.texture.ExtraTextures;
|
||||||
|
import appeng.core.localization.ButtonToolTips;
|
||||||
|
|
||||||
public class GuiImgButton extends GuiButton implements ITooltip
|
public class GuiImgButton extends GuiButton implements ITooltip
|
||||||
{
|
{
|
||||||
@@ -73,11 +72,11 @@ public class GuiImgButton extends GuiButton implements ITooltip
|
|||||||
|
|
||||||
static private Map<EnumPair, BtnAppearance> Appearances;
|
static private Map<EnumPair, BtnAppearance> Appearances;
|
||||||
|
|
||||||
private void registerApp(int icon, Settings setting, Enum val, String dn, String dv)
|
private void registerApp(int icon, Settings setting, Enum val, ButtonToolTips title, Object hint)
|
||||||
{
|
{
|
||||||
BtnAppearance a = new BtnAppearance();
|
BtnAppearance a = new BtnAppearance();
|
||||||
a.DisplayName = dn;
|
a.DisplayName = title.getUnlocalized();
|
||||||
a.DisplayValue = dv;
|
a.DisplayValue = (String) (hint instanceof String ? hint : ((ButtonToolTips) hint).getUnlocalized());
|
||||||
a.index = icon;
|
a.index = icon;
|
||||||
Appearances.put( new EnumPair( setting, val ), a );
|
Appearances.put( new EnumPair( setting, val ), a );
|
||||||
}
|
}
|
||||||
@@ -100,88 +99,75 @@ public class GuiImgButton extends GuiButton implements ITooltip
|
|||||||
if ( Appearances == null )
|
if ( Appearances == null )
|
||||||
{
|
{
|
||||||
Appearances = new HashMap();
|
Appearances = new HashMap();
|
||||||
registerApp( 16 * 7 + 0, Settings.CONDENSER_OUTPUT, CondenserOuput.TRASH, "AppEng.GuiITooltip.CondenserOutput", "AppEng.GuiITooltip.Trash" );
|
registerApp( 16 * 7 + 0, Settings.CONDENSER_OUTPUT, CondenserOuput.TRASH, ButtonToolTips.CondenserOutput, ButtonToolTips.Trash );
|
||||||
registerApp( 16 * 7 + 1, Settings.CONDENSER_OUTPUT, CondenserOuput.MATTER_BALLS, "AppEng.GuiITooltip.CondenserOutput",
|
registerApp( 16 * 7 + 1, Settings.CONDENSER_OUTPUT, CondenserOuput.MATTER_BALLS, ButtonToolTips.CondenserOutput, ButtonToolTips.MatterBalls );
|
||||||
"AppEng.GuiITooltip.MatterBalls" );
|
registerApp( 16 * 7 + 2, Settings.CONDENSER_OUTPUT, CondenserOuput.SINGULARITY, ButtonToolTips.CondenserOutput, ButtonToolTips.Singularity );
|
||||||
registerApp( 16 * 7 + 2, Settings.CONDENSER_OUTPUT, CondenserOuput.SINGULARITY, "AppEng.GuiITooltip.CondenserOutput",
|
|
||||||
"AppEng.GuiITooltip.Singularity" );
|
|
||||||
|
|
||||||
registerApp( 16 * 9 + 1, Settings.ACCESS, AccessRestriction.READ, "AppEng.GuiITooltip.IOMode", "AppEng.GuiITooltip.Read" );
|
registerApp( 16 * 9 + 1, Settings.ACCESS, AccessRestriction.READ, ButtonToolTips.IOMode, ButtonToolTips.Read );
|
||||||
registerApp( 16 * 9 + 0, Settings.ACCESS, AccessRestriction.WRITE, "AppEng.GuiITooltip.IOMode", "AppEng.GuiITooltip.Write" );
|
registerApp( 16 * 9 + 0, Settings.ACCESS, AccessRestriction.WRITE, ButtonToolTips.IOMode, ButtonToolTips.Write );
|
||||||
registerApp( 16 * 9 + 2, Settings.ACCESS, AccessRestriction.READ_WRITE, "AppEng.GuiITooltip.IOMode", "AppEng.GuiITooltip.ReadWrite" );
|
registerApp( 16 * 9 + 2, Settings.ACCESS, AccessRestriction.READ_WRITE, ButtonToolTips.IOMode, ButtonToolTips.ReadWrite );
|
||||||
|
|
||||||
registerApp( 16 * 10 + 0, Settings.POWER_UNITS, PowerUnits.AE, "AppEng.GuiITooltip.PowerUnits", "AppEng.GuiITooltip.AEUnits" );
|
registerApp( 16 * 10 + 0, Settings.POWER_UNITS, PowerUnits.AE, ButtonToolTips.PowerUnits, PowerUnits.AE.unlocalizedName );
|
||||||
registerApp( 16 * 10 + 1, Settings.POWER_UNITS, PowerUnits.EU, "AppEng.GuiITooltip.PowerUnits", "AppEng.GuiITooltip.EUUnits" );
|
registerApp( 16 * 10 + 1, Settings.POWER_UNITS, PowerUnits.EU, ButtonToolTips.PowerUnits, PowerUnits.EU.unlocalizedName );
|
||||||
registerApp( 16 * 10 + 2, Settings.POWER_UNITS, PowerUnits.MJ, "AppEng.GuiITooltip.PowerUnits", "AppEng.GuiITooltip.MJUnits" );
|
registerApp( 16 * 10 + 2, Settings.POWER_UNITS, PowerUnits.MJ, ButtonToolTips.PowerUnits, PowerUnits.MJ.unlocalizedName );
|
||||||
registerApp( 16 * 10 + 3, Settings.POWER_UNITS, PowerUnits.KJ, "AppEng.GuiITooltip.PowerUnits", "AppEng.GuiITooltip.UEUnits" );
|
registerApp( 16 * 10 + 3, Settings.POWER_UNITS, PowerUnits.KJ, ButtonToolTips.PowerUnits, PowerUnits.KJ.unlocalizedName );
|
||||||
registerApp( 16 * 10 + 4, Settings.POWER_UNITS, PowerUnits.WA, "AppEng.GuiITooltip.PowerUnits", "AppEng.GuiITooltip.WUnits" );
|
registerApp( 16 * 10 + 4, Settings.POWER_UNITS, PowerUnits.WA, ButtonToolTips.PowerUnits, PowerUnits.WA.unlocalizedName );
|
||||||
|
|
||||||
registerApp( 3, Settings.REDSTONE_CONTROLLED, RedstoneMode.IGNORE, "AppEng.GuiITooltip.RedstoneMode", "AppEng.GuiITooltip.AlwaysActive" );
|
registerApp( 3, Settings.REDSTONE_CONTROLLED, RedstoneMode.IGNORE, ButtonToolTips.RedstoneMode, ButtonToolTips.AlwaysActive );
|
||||||
registerApp( 0, Settings.REDSTONE_CONTROLLED, RedstoneMode.LOW_SIGNAL, "AppEng.GuiITooltip.RedstoneMode", "AppEng.GuiITooltip.ActiveWithoutSignal" );
|
registerApp( 0, Settings.REDSTONE_CONTROLLED, RedstoneMode.LOW_SIGNAL, ButtonToolTips.RedstoneMode, ButtonToolTips.ActiveWithoutSignal );
|
||||||
registerApp( 1, Settings.REDSTONE_CONTROLLED, RedstoneMode.HIGH_SIGNAL, "AppEng.GuiITooltip.RedstoneMode", "AppEng.GuiITooltip.ActiveWithSignal" );
|
registerApp( 1, Settings.REDSTONE_CONTROLLED, RedstoneMode.HIGH_SIGNAL, ButtonToolTips.RedstoneMode, ButtonToolTips.ActiveWithSignal );
|
||||||
registerApp( 2, Settings.REDSTONE_CONTROLLED, RedstoneMode.SIGNAL_PULSE, "AppEng.GuiITooltip.RedstoneMode", "AppEng.GuiITooltip.ActiveOnPulse" );
|
registerApp( 2, Settings.REDSTONE_CONTROLLED, RedstoneMode.SIGNAL_PULSE, ButtonToolTips.RedstoneMode, ButtonToolTips.ActiveOnPulse );
|
||||||
|
|
||||||
registerApp( 3, Settings.REDSTONE_EMITTER, RedstoneMode.IGNORE, "AppEng.GuiITooltip.RedstoneMode", "AppEng.GuiITooltip.AlwaysActive" );
|
registerApp( 0, Settings.REDSTONE_EMITTER, RedstoneMode.LOW_SIGNAL, ButtonToolTips.RedstoneMode, ButtonToolTips.EmitLevelsBelow );
|
||||||
registerApp( 0, Settings.REDSTONE_EMITTER, RedstoneMode.LOW_SIGNAL, "AppEng.GuiITooltip.RedstoneMode", "AppEng.GuiITooltip.ActiveWithoutSignal" );
|
registerApp( 1, Settings.REDSTONE_EMITTER, RedstoneMode.HIGH_SIGNAL, ButtonToolTips.RedstoneMode, ButtonToolTips.EmitLevelAbove );
|
||||||
registerApp( 1, Settings.REDSTONE_EMITTER, RedstoneMode.HIGH_SIGNAL, "AppEng.GuiITooltip.RedstoneMode", "AppEng.GuiITooltip.ActiveWithSignal" );
|
|
||||||
|
|
||||||
registerApp( 0, Settings.REDSTONE_CONTROLLED, RedstoneMode.LOW_SIGNAL, "AppEng.GuiITooltip.RedstoneMode", "AppEng.GuiITooltip.EmitLevelsBelow" );
|
registerApp( 51, Settings.OPERATION_MODE, OperationMode.FILL, ButtonToolTips.TransferDirection, ButtonToolTips.TransferToStorageCell );
|
||||||
registerApp( 1, Settings.REDSTONE_CONTROLLED, RedstoneMode.HIGH_SIGNAL, "AppEng.GuiITooltip.RedstoneMode", "AppEng.GuiITooltip.EmitLevelAbove" );
|
registerApp( 50, Settings.OPERATION_MODE, OperationMode.EMPTY, ButtonToolTips.TransferDirection, ButtonToolTips.TransferToNetwork );
|
||||||
|
|
||||||
registerApp( 16 * 8 + 2, Settings.INCLUSION, IncludeExclude.WHITELIST, "AppEng.Gui.Whitelisted", "AppEng.Gui.WhitelistedDesc" );
|
registerApp( 51, Settings.IO_DIRECTION, RelativeDirection.LEFT, ButtonToolTips.TransferDirection, ButtonToolTips.TransferToStorageCell );
|
||||||
registerApp( 16 * 8 + 3, Settings.INCLUSION, IncludeExclude.BLACKLIST, "AppEng.Gui.Blacklisted", "AppEng.Gui.BlacklistedDesc" );
|
registerApp( 50, Settings.IO_DIRECTION, RelativeDirection.RIGHT, ButtonToolTips.TransferDirection, ButtonToolTips.TransferToNetwork );
|
||||||
|
|
||||||
registerApp( 34, Settings.COMPARISON, MatchingMode.FUZZY, "AppEng.GuiITooltip.MatchingMode", "AppEng.GuiITooltip.MatchingFuzzy" );
|
registerApp( 48, Settings.SORT_DIRECTION, SortDir.ASCENDING, ButtonToolTips.SortOrder, ButtonToolTips.ToggleSortDirection );
|
||||||
registerApp( 32, Settings.COMPARISON, MatchingMode.PRECISE, "AppEng.GuiITooltip.MatchingMode", "AppEng.GuiITooltip.MatchingExact" );
|
registerApp( 49, Settings.SORT_DIRECTION, SortDir.DESCENDING, ButtonToolTips.SortOrder, ButtonToolTips.ToggleSortDirection );
|
||||||
|
|
||||||
registerApp( 50, Settings.OPERATION_MODE, OperationMode.EMPTY, "AppEng.GuiITooltip.TransferDirection", "AppEng.GuiITooltip.TransferToNetwork" );
|
registerApp( 16 * 2 + 3, Settings.SEARCH_MODE, SearchBoxMode.AUTOSEARCH, ButtonToolTips.SearchMode, ButtonToolTips.SearchMode_Auto );
|
||||||
registerApp( 51, Settings.OPERATION_MODE, OperationMode.FILL, "AppEng.GuiITooltip.TransferDirection", "AppEng.GuiITooltip.TransferToStorageCell" );
|
registerApp( 16 * 2 + 4, Settings.SEARCH_MODE, SearchBoxMode.MANUAL_SEARCH, ButtonToolTips.SearchMode, ButtonToolTips.SearchMode_Standard );
|
||||||
|
registerApp( 16 * 2 + 5, Settings.SEARCH_MODE, SearchBoxMode.NEI_AUTOSEARCH, ButtonToolTips.SearchMode, ButtonToolTips.SearchMode_NEIAuto );
|
||||||
|
registerApp( 16 * 2 + 6, Settings.SEARCH_MODE, SearchBoxMode.NEI_MANUAL_SEARCH, ButtonToolTips.SearchMode, ButtonToolTips.SearchMode_NEIStandard );
|
||||||
|
|
||||||
registerApp( 51, Settings.IO_DIRECTION, RelativeDirection.LEFT, "AppEng.GuiITooltip.TransferDirection", "AppEng.GuiITooltip.TransferToStorageCell" );
|
registerApp( 64, Settings.SORT_BY, SortOrder.NAME, ButtonToolTips.SortBy, ButtonToolTips.ItemName );
|
||||||
registerApp( 50, Settings.IO_DIRECTION, RelativeDirection.RIGHT, "AppEng.GuiITooltip.TransferDirection", "AppEng.GuiITooltip.TransferToNetwork" );
|
registerApp( 65, Settings.SORT_BY, SortOrder.AMOUNT, ButtonToolTips.SortBy, ButtonToolTips.NumberOfItems );
|
||||||
|
// registerApp( 66, Settings.SORT_BY, SortOrder.PRIORITY,
|
||||||
registerApp( 48, Settings.SORT_DIRECTION, SortDir.ASCENDING, "AppEng.GuiITooltip.SortOrder", "AppEng.GuiITooltip.ToggleSortDirection" );
|
// "AppEng.GuiITooltip.SortBy",
|
||||||
registerApp( 49, Settings.SORT_DIRECTION, SortDir.DESCENDING, "AppEng.GuiITooltip.SortOrder", "AppEng.GuiITooltip.ToggleSortDirection" );
|
|
||||||
|
|
||||||
registerApp( 16 * 2 + 3, Settings.SEARCH_MODE, SearchBoxMode.AUTOSEARCH, "AppEng.GuiITooltip.SearchMode", "AppEng.GuiITooltip.SearchMode_Auto" );
|
|
||||||
registerApp( 16 * 2 + 4, Settings.SEARCH_MODE, SearchBoxMode.MANUAL_SEARCH, "AppEng.GuiITooltip.SearchMode",
|
|
||||||
"AppEng.GuiITooltip.SearchMode_Standard" );
|
|
||||||
registerApp( 16 * 2 + 5, Settings.SEARCH_MODE, SearchBoxMode.NEI_AUTOSEARCH, "AppEng.GuiITooltip.SearchMode",
|
|
||||||
"AppEng.GuiITooltip.SearchMode_NEIAuto" );
|
|
||||||
registerApp( 16 * 2 + 6, Settings.SEARCH_MODE, SearchBoxMode.NEI_MANUAL_SEARCH, "AppEng.GuiITooltip.SearchMode",
|
|
||||||
"AppEng.GuiITooltip.SearchMode_NEIStandard" );
|
|
||||||
|
|
||||||
registerApp( 64, Settings.SORT_BY, SortOrder.NAME, "AppEng.GuiITooltip.SortBy", "AppEng.GuiITooltip.ItemName" );
|
|
||||||
registerApp( 65, Settings.SORT_BY, SortOrder.AMOUNT, "AppEng.GuiITooltip.SortBy", "AppEng.GuiITooltip.NumberOfItems" );
|
|
||||||
// registerApp( 66, Settings.SORT_BY, SortOrder.PRIORITY, "AppEng.GuiITooltip.SortBy",
|
|
||||||
// "AppEng.GuiITooltip.PriorityCellOrder" );
|
// "AppEng.GuiITooltip.PriorityCellOrder" );
|
||||||
registerApp( 68, Settings.SORT_BY, SortOrder.MOD, "AppEng.GuiITooltip.SortBy", "AppEng.GuiITooltip.ItemID" );
|
// registerApp( 68, Settings.SORT_BY, SortOrder.MOD,
|
||||||
|
// ButtonToolTips.SortBy, ButtonToolTips.ItemID );
|
||||||
|
|
||||||
registerApp( 66, Settings.ACTIONS, ActionItems.WRENCH, "AppEng.GuiITooltip.PartitionStorage", "AppEng.GuiITooltip.PartitionStorageHint" );
|
registerApp( 66, Settings.ACTIONS, ActionItems.WRENCH, ButtonToolTips.PartitionStorage, ButtonToolTips.PartitionStorageHint );
|
||||||
registerApp( 6, Settings.ACTIONS, ActionItems.CLOSE, "AppEng.Gui.Clear", "AppEng.GuiITooltip.ClearCraftingGrid" );
|
registerApp( 6, Settings.ACTIONS, ActionItems.CLOSE, ButtonToolTips.Clear, ButtonToolTips.ClearSettings );
|
||||||
|
|
||||||
registerApp( 16, Settings.VIEW_MODE, ViewItems.STORED, "AppEng.GuiITooltip.View", "AppEng.GuiITooltip.StoredItems" );
|
registerApp( 16, Settings.VIEW_MODE, ViewItems.STORED, ButtonToolTips.View, ButtonToolTips.StoredItems );
|
||||||
registerApp( 18, Settings.VIEW_MODE, ViewItems.ALL, "AppEng.GuiITooltip.View", "AppEng.GuiITooltip.StoredCraftable" );
|
registerApp( 18, Settings.VIEW_MODE, ViewItems.ALL, ButtonToolTips.View, ButtonToolTips.StoredCraftable );
|
||||||
registerApp( 19, Settings.VIEW_MODE, ViewItems.CRAFTABLE, "AppEng.GuiITooltip.View", "AppEng.GuiITooltip.Craftable" );
|
registerApp( 19, Settings.VIEW_MODE, ViewItems.CRAFTABLE, ButtonToolTips.View, ButtonToolTips.Craftable );
|
||||||
|
|
||||||
registerApp( 16 * 6 + 0, Settings.FUZZY_MODE, FuzzyMode.PERCENT_25, "AppEng.GuiITooltip.FuzzyMode", "AppEng.GuiITooltip.FuzzyMode.Percent_25" );
|
registerApp( 16 * 6 + 0, Settings.FUZZY_MODE, FuzzyMode.PERCENT_25, ButtonToolTips.FuzzyMode, ButtonToolTips.FZPercent_25 );
|
||||||
registerApp( 16 * 6 + 1, Settings.FUZZY_MODE, FuzzyMode.PERCENT_50, "AppEng.GuiITooltip.FuzzyMode", "AppEng.GuiITooltip.FuzzyMode.Percent_50" );
|
registerApp( 16 * 6 + 1, Settings.FUZZY_MODE, FuzzyMode.PERCENT_50, ButtonToolTips.FuzzyMode, ButtonToolTips.FZPercent_50 );
|
||||||
registerApp( 16 * 6 + 2, Settings.FUZZY_MODE, FuzzyMode.PERCENT_75, "AppEng.GuiITooltip.FuzzyMode", "AppEng.GuiITooltip.FuzzyMode.Percent_75" );
|
registerApp( 16 * 6 + 2, Settings.FUZZY_MODE, FuzzyMode.PERCENT_75, ButtonToolTips.FuzzyMode, ButtonToolTips.FZPercent_75 );
|
||||||
registerApp( 16 * 6 + 3, Settings.FUZZY_MODE, FuzzyMode.PERCENT_99, "AppEng.GuiITooltip.FuzzyMode", "AppEng.GuiITooltip.FuzzyMode.Percent_99" );
|
registerApp( 16 * 6 + 3, Settings.FUZZY_MODE, FuzzyMode.PERCENT_99, ButtonToolTips.FuzzyMode, ButtonToolTips.FZPercent_99 );
|
||||||
registerApp( 16 * 6 + 4, Settings.FUZZY_MODE, FuzzyMode.IGNORE_ALL, "AppEng.GuiITooltip.FuzzyMode", "AppEng.GuiITooltip.FuzzyMode.IgnoreAll" );
|
registerApp( 16 * 6 + 4, Settings.FUZZY_MODE, FuzzyMode.IGNORE_ALL, ButtonToolTips.FuzzyMode, ButtonToolTips.FZIgnoreAll );
|
||||||
|
|
||||||
registerApp( 80, Settings.FULLNESS_MODE, FullnessMode.EMPTY, "AppEng.GuiITooltip.OperationMode", "AppEng.GuiITooltip.MoveWhenEmpty" );
|
registerApp( 80, Settings.FULLNESS_MODE, FullnessMode.EMPTY, ButtonToolTips.OperationMode, ButtonToolTips.MoveWhenEmpty );
|
||||||
registerApp( 81, Settings.FULLNESS_MODE, FullnessMode.HALF, "AppEng.GuiITooltip.OperationMode", "AppEng.GuiITooltip.MoveWhenWorkIsDone" );
|
registerApp( 81, Settings.FULLNESS_MODE, FullnessMode.HALF, ButtonToolTips.OperationMode, ButtonToolTips.MoveWhenWorkIsDone );
|
||||||
registerApp( 82, Settings.FULLNESS_MODE, FullnessMode.FULL, "AppEng.GuiITooltip.OperationMode", "AppEng.GuiITooltip.MoveWhenFull" );
|
registerApp( 82, Settings.FULLNESS_MODE, FullnessMode.FULL, ButtonToolTips.OperationMode, ButtonToolTips.MoveWhenFull );
|
||||||
|
|
||||||
registerApp( 16 * 8 + 0, Settings.TRASH_CATCH, YesNo.YES, "AppEng.GuiITooltip.TrashController", "AppEng.GuiITooltip.Disabled" );
|
registerApp( 16 * 8 + 0, Settings.TRASH_CATCH, YesNo.YES, ButtonToolTips.TrashController, ButtonToolTips.Disabled );
|
||||||
registerApp( 16 * 8 + 1, Settings.TRASH_CATCH, YesNo.NO, "AppEng.GuiITooltip.TrashController", "AppEng.GuiITooltip.Enable" );
|
registerApp( 16 * 8 + 1, Settings.TRASH_CATCH, YesNo.NO, ButtonToolTips.TrashController, ButtonToolTips.Enable );
|
||||||
|
|
||||||
registerApp( 16 * 1 + 5, Settings.BLOCK, YesNo.YES, "AppEng.GuiITooltip.InterfaceBlockingMode", "AppEng.GuiITooltip.Blocking" );
|
registerApp( 16 * 1 + 5, Settings.BLOCK, YesNo.YES, ButtonToolTips.InterfaceBlockingMode, ButtonToolTips.Blocking );
|
||||||
registerApp( 16 * 1 + 4, Settings.BLOCK, YesNo.NO, "AppEng.GuiITooltip.InterfaceBlockingMode", "AppEng.GuiITooltip.NonBlocking" );
|
registerApp( 16 * 1 + 4, Settings.BLOCK, YesNo.NO, ButtonToolTips.InterfaceBlockingMode, ButtonToolTips.NonBlocking );
|
||||||
|
|
||||||
registerApp( 19, Settings.CRAFT, YesNo.YES, "AppEng.GuiITooltip.InterfaceCraftingMode", "AppEng.GuiITooltip.Craft" );
|
registerApp( 19, Settings.CRAFT, YesNo.YES, ButtonToolTips.InterfaceCraftingMode, ButtonToolTips.Craft );
|
||||||
registerApp( 17, Settings.CRAFT, YesNo.NO, "AppEng.GuiITooltip.InterfaceCraftingMode", "AppEng.GuiITooltip.DontCraft" );
|
registerApp( 17, Settings.CRAFT, YesNo.NO, ButtonToolTips.InterfaceCraftingMode, ButtonToolTips.DontCraft );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -209,8 +195,7 @@ public class GuiImgButton extends GuiButton implements ITooltip
|
|||||||
|
|
||||||
GL11.glColor4f( 1.0f, 1.0f, 1.0f, 1.0f );
|
GL11.glColor4f( 1.0f, 1.0f, 1.0f, 1.0f );
|
||||||
par1Minecraft.renderEngine.bindTexture( ExtraTextures.GuiTexture( "guis/states.png" ) );
|
par1Minecraft.renderEngine.bindTexture( ExtraTextures.GuiTexture( "guis/states.png" ) );
|
||||||
this.field_82253_i = par2 >= this.xPosition && par3 >= this.yPosition && par2 < this.xPosition + this.width
|
this.field_82253_i = par2 >= this.xPosition && par3 >= this.yPosition && par2 < this.xPosition + this.width && par3 < this.yPosition + this.height;
|
||||||
&& par3 < this.yPosition + this.height;
|
|
||||||
|
|
||||||
int uv_y = (int) Math.floor( iconIndex / 16 );
|
int uv_y = (int) Math.floor( iconIndex / 16 );
|
||||||
int uv_x = iconIndex - uv_y * 16;
|
int uv_x = iconIndex - uv_y * 16;
|
||||||
@@ -225,8 +210,7 @@ public class GuiImgButton extends GuiButton implements ITooltip
|
|||||||
{
|
{
|
||||||
GL11.glColor4f( 1.0f, 1.0f, 1.0f, 1.0f );
|
GL11.glColor4f( 1.0f, 1.0f, 1.0f, 1.0f );
|
||||||
par1Minecraft.renderEngine.bindTexture( ExtraTextures.GuiTexture( "guis/states.png" ) );
|
par1Minecraft.renderEngine.bindTexture( ExtraTextures.GuiTexture( "guis/states.png" ) );
|
||||||
this.field_82253_i = par2 >= this.xPosition && par3 >= this.yPosition && par2 < this.xPosition + this.width
|
this.field_82253_i = par2 >= this.xPosition && par3 >= this.yPosition && par2 < this.xPosition + this.width && par3 < this.yPosition + this.height;
|
||||||
&& par3 < this.yPosition + this.height;
|
|
||||||
|
|
||||||
int uv_y = (int) Math.floor( iconIndex / 16 );
|
int uv_y = (int) Math.floor( iconIndex / 16 );
|
||||||
int uv_x = iconIndex - uv_y * 16;
|
int uv_x = iconIndex - uv_y * 16;
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ public enum GuiText
|
|||||||
|
|
||||||
NetworkTool, PowerUsageRate, PowerInputRate, Installed, EnergyDrain,
|
NetworkTool, PowerUsageRate, PowerInputRate, Installed, EnergyDrain,
|
||||||
|
|
||||||
StorageBus, Priority, Security, Encoded;
|
StorageBus, Priority, Security, Encoded, Blank, Unlinked, Linked;
|
||||||
|
|
||||||
String root;
|
String root;
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
package appeng.integration.abstraction;
|
package appeng.integration.abstraction;
|
||||||
|
|
||||||
import appeng.integration.modules.helpers.BaseBCperdition;
|
import appeng.integration.modules.helpers.BaseBCperdition;
|
||||||
import appeng.tile.powersink.BuildCraft;
|
import appeng.tile.powersink.BuildCraft;
|
||||||
|
|
||||||
public interface IMJ
|
public interface IMJ
|
||||||
{
|
{
|
||||||
|
|
||||||
BaseBCperdition createPerdition(BuildCraft buildCraft);
|
BaseBCperdition createPerdition(BuildCraft buildCraft);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+39
-39
@@ -1,39 +1,39 @@
|
|||||||
package appeng.integration.modules;
|
package appeng.integration.modules;
|
||||||
|
|
||||||
import appeng.integration.IIntegrationModule;
|
import appeng.integration.IIntegrationModule;
|
||||||
import appeng.integration.abstraction.IMJ;
|
import appeng.integration.abstraction.IMJ;
|
||||||
import appeng.integration.modules.helpers.BCPerdition;
|
import appeng.integration.modules.helpers.BCPerdition;
|
||||||
import appeng.integration.modules.helpers.BaseBCperdition;
|
import appeng.integration.modules.helpers.BaseBCperdition;
|
||||||
import appeng.tile.powersink.BuildCraft;
|
import appeng.tile.powersink.BuildCraft;
|
||||||
import buildcraft.api.power.IPowerReceptor;
|
import buildcraft.api.power.IPowerReceptor;
|
||||||
|
|
||||||
public class MJ implements IIntegrationModule, IMJ
|
public class MJ implements IIntegrationModule, IMJ
|
||||||
{
|
{
|
||||||
|
|
||||||
public static MJ instance;
|
public static MJ instance;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public BaseBCperdition createPerdition(BuildCraft buildCraft)
|
public BaseBCperdition createPerdition(BuildCraft buildCraft)
|
||||||
{
|
{
|
||||||
if ( buildCraft instanceof IPowerReceptor )
|
if ( buildCraft instanceof IPowerReceptor )
|
||||||
return new BCPerdition( buildCraft );
|
return new BCPerdition( buildCraft );
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void Init() throws Throwable
|
public void Init() throws Throwable
|
||||||
{
|
{
|
||||||
if ( ((Object) this) instanceof BCPerdition )
|
if ( ((Object) this) instanceof BCPerdition )
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void PostInit() throws Throwable
|
public void PostInit() throws Throwable
|
||||||
{
|
{
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,60 +1,60 @@
|
|||||||
package appeng.integration.modules.helpers;
|
package appeng.integration.modules.helpers;
|
||||||
|
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
import buildcraft.api.power.IPowerReceptor;
|
import buildcraft.api.power.IPowerReceptor;
|
||||||
import buildcraft.api.power.PowerHandler;
|
import buildcraft.api.power.PowerHandler;
|
||||||
import buildcraft.api.power.PowerHandler.PowerReceiver;
|
import buildcraft.api.power.PowerHandler.PowerReceiver;
|
||||||
import buildcraft.api.power.PowerHandler.Type;
|
import buildcraft.api.power.PowerHandler.Type;
|
||||||
|
|
||||||
public class BCPerdition extends BaseBCperdition
|
public class BCPerdition extends BaseBCperdition
|
||||||
{
|
{
|
||||||
|
|
||||||
final protected PowerHandler bcPowerHandler;
|
final protected PowerHandler bcPowerHandler;
|
||||||
|
|
||||||
public BCPerdition(IPowerReceptor te) {
|
public BCPerdition(IPowerReceptor te) {
|
||||||
bcPowerHandler = new PowerHandler( te, Type.MACHINE );
|
bcPowerHandler = new PowerHandler( te, Type.MACHINE );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void Tick()
|
public void Tick()
|
||||||
{
|
{
|
||||||
bcPowerHandler.update();
|
bcPowerHandler.update();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void writeToNBT(NBTTagCompound data)
|
public void writeToNBT(NBTTagCompound data)
|
||||||
{
|
{
|
||||||
bcPowerHandler.writeToNBT( data, "bcPowerHandler" );
|
bcPowerHandler.writeToNBT( data, "bcPowerHandler" );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void readFromNBT(NBTTagCompound data)
|
public void readFromNBT(NBTTagCompound data)
|
||||||
{
|
{
|
||||||
bcPowerHandler.readFromNBT( data, "bcPowerHandler" );
|
bcPowerHandler.readFromNBT( data, "bcPowerHandler" );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PowerReceiver getPowerReceiver()
|
public PowerReceiver getPowerReceiver()
|
||||||
{
|
{
|
||||||
return bcPowerHandler.getPowerReceiver();
|
return bcPowerHandler.getPowerReceiver();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public double useEnergy(float min, float max, boolean doUse)
|
public double useEnergy(float min, float max, boolean doUse)
|
||||||
{
|
{
|
||||||
return bcPowerHandler.useEnergy( min, max, doUse );
|
return bcPowerHandler.useEnergy( min, max, doUse );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void addEnergy(float failed)
|
public void addEnergy(float failed)
|
||||||
{
|
{
|
||||||
bcPowerHandler.addEnergy( failed );
|
bcPowerHandler.addEnergy( failed );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void configure(int i, int j, float f, int k)
|
public void configure(int i, int j, float f, int k)
|
||||||
{
|
{
|
||||||
bcPowerHandler.configure( i, j, f, k );
|
bcPowerHandler.configure( i, j, f, k );
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,24 +1,24 @@
|
|||||||
package appeng.integration.modules.helpers;
|
package appeng.integration.modules.helpers;
|
||||||
|
|
||||||
import appeng.tile.events.AETileEventHandler;
|
import appeng.tile.events.AETileEventHandler;
|
||||||
import appeng.tile.events.TileEventType;
|
import appeng.tile.events.TileEventType;
|
||||||
import buildcraft.api.power.PowerHandler.PowerReceiver;
|
import buildcraft.api.power.PowerHandler.PowerReceiver;
|
||||||
import cpw.mods.fml.common.Optional.Method;
|
import cpw.mods.fml.common.Optional.Method;
|
||||||
|
|
||||||
public abstract class BaseBCperdition extends AETileEventHandler
|
public abstract class BaseBCperdition extends AETileEventHandler
|
||||||
{
|
{
|
||||||
|
|
||||||
public BaseBCperdition() {
|
public BaseBCperdition() {
|
||||||
super( TileEventType.TICK, TileEventType.WORLD_NBT );
|
super( TileEventType.TICK, TileEventType.WORLD_NBT );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Method(modid = "BuildCraftAPI|power")
|
@Method(modid = "BuildCraftAPI|power")
|
||||||
public abstract PowerReceiver getPowerReceiver();
|
public abstract PowerReceiver getPowerReceiver();
|
||||||
|
|
||||||
public abstract double useEnergy(float f, float requred, boolean b);
|
public abstract double useEnergy(float f, float requred, boolean b);
|
||||||
|
|
||||||
public abstract void addEnergy(float failed);
|
public abstract void addEnergy(float failed);
|
||||||
|
|
||||||
public abstract void configure(int i, int j, float f, int k);
|
public abstract void configure(int i, int j, float f, int k);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ public class ToolBiometricCard extends AEBaseItem
|
|||||||
{
|
{
|
||||||
NBTTagCompound tag = Platform.openNbtData( is );
|
NBTTagCompound tag = Platform.openNbtData( is );
|
||||||
String username = tag.getString( "username" );
|
String username = tag.getString( "username" );
|
||||||
return username != null ? super.getItemDisplayName( is ) + " - " + GuiText.Encoded.getLocal() : super.getItemDisplayName( is );
|
return username.length() > 0 ? super.getItemDisplayName( is ) + " - " + GuiText.Encoded.getLocal() : super.getItemDisplayName( is );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import net.minecraft.util.StatCollector;
|
|||||||
import appeng.api.implementations.items.IMemoryCard;
|
import appeng.api.implementations.items.IMemoryCard;
|
||||||
import appeng.api.implementations.items.MemoryCardMessages;
|
import appeng.api.implementations.items.MemoryCardMessages;
|
||||||
import appeng.core.features.AEFeature;
|
import appeng.core.features.AEFeature;
|
||||||
|
import appeng.core.localization.GuiText;
|
||||||
import appeng.core.localization.PlayerMessages;
|
import appeng.core.localization.PlayerMessages;
|
||||||
import appeng.items.AEBaseItem;
|
import appeng.items.AEBaseItem;
|
||||||
import appeng.util.Platform;
|
import appeng.util.Platform;
|
||||||
@@ -48,7 +49,7 @@ public class ToolMemoryCard extends AEBaseItem implements IMemoryCard
|
|||||||
{
|
{
|
||||||
NBTTagCompound c = Platform.openNbtData( is );
|
NBTTagCompound c = Platform.openNbtData( is );
|
||||||
String name = c.getString( "Config" );
|
String name = c.getString( "Config" );
|
||||||
return name == null || name == "" ? "gui.appliedenergistics2.Blank" : name;
|
return name == null || name == "" ? GuiText.Blank.getUnlocalized() : name;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import net.minecraft.util.StatCollector;
|
|||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import appeng.api.AEApi;
|
import appeng.api.AEApi;
|
||||||
import appeng.core.features.AEFeature;
|
import appeng.core.features.AEFeature;
|
||||||
|
import appeng.core.localization.GuiText;
|
||||||
import appeng.items.tools.powered.powersink.AEBasePoweredItem;
|
import appeng.items.tools.powered.powersink.AEBasePoweredItem;
|
||||||
import appeng.util.Platform;
|
import appeng.util.Platform;
|
||||||
|
|
||||||
@@ -42,9 +43,9 @@ public class ToolWirelessTerminal extends AEBasePoweredItem
|
|||||||
String encKey = tag.getString( "encKey" );
|
String encKey = tag.getString( "encKey" );
|
||||||
|
|
||||||
if ( encKey == null || encKey == "" )
|
if ( encKey == null || encKey == "" )
|
||||||
l.add( StatCollector.translateToLocal( "AppEng.GuiITooltip.Unlinked" ) );
|
l.add( GuiText.Unlinked.getLocal() );
|
||||||
else
|
else
|
||||||
l.add( StatCollector.translateToLocal( "AppEng.GuiITooltip.Linked" ) );
|
l.add( GuiText.Linked.getLocal() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user