Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Iia dev #234

Merged
merged 21 commits into from
Nov 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
87c0294
fix translate localization
Kotl-EV Dec 4, 2021
37986c8
Localization transfer from Gregtech.Lang
Kotl-EV Dec 4, 2021
a79e3c7
Merge branch 'IdealIndustrial:IIA-dev' into IIA-dev
Kotl-EV Jul 2, 2022
5539094
Локализация кавера Контроллер механизмов
Kotl-EV Sep 11, 2022
0b4c7dc
русская локализация контроллера механизмов
Kotl-EV Sep 11, 2022
9a54ee5
Локализация сообщения запрограммированной электросхемы
Kotl-EV Sep 11, 2022
37f26f0
локализация гуи контроллера работы
Kotl-EV Sep 11, 2022
f1b5a8f
правка
Kotl-EV Sep 11, 2022
faf5bc6
правка
Kotl-EV Sep 11, 2022
3570747
откат
Kotl-EV Sep 11, 2022
60f5de8
create
Kotl-EV Sep 11, 2022
fc43e82
доработка локализации
Kotl-EV Sep 11, 2022
98b75e7
доработка локализации
Kotl-EV Sep 11, 2022
30279ea
локализация запрограммированной электросхемы
Kotl-EV Sep 11, 2022
fa6bac1
локал
Kotl-EV Sep 11, 2022
4ad22c5
фикс локализации сообщений
Kotl-EV Sep 14, 2022
a20ab92
Локализация Входной Шины
Kotl-EV Sep 14, 2022
9ab6067
Локализация Выходной шины
Kotl-EV Sep 14, 2022
922a6a6
Локализация Люк Обслуживания
Kotl-EV Sep 14, 2022
56d0302
Локализация сообщений проспектинг
Kotl-EV Sep 14, 2022
781a98a
Локализация смены режима сканера
Kotl-EV Sep 14, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import net.minecraft.entity.player.InventoryPlayer;

import static gregtech.api.enums.GT_Values.RES_PATH_GUI;
import static gregtech.api.util.GT_Utility.trans;

public class GT_GUIContainer_MaintenanceHatch extends GT_GUIContainerMetaTile_Machine {

Expand All @@ -13,8 +14,8 @@ public GT_GUIContainer_MaintenanceHatch(InventoryPlayer aInventoryPlayer, IGregT

@Override
protected void drawGuiContainerForegroundLayer(int par1, int par2) {
fontRendererObj.drawString("Maintenance Hatch", 8, 4, 4210752);
fontRendererObj.drawString("Click with Tool to repair.", 8, 12, 4210752);
fontRendererObj.drawString(trans("221","Maintenance Hatch"), 8, 4, 4210752);
fontRendererObj.drawString(trans("222","Click with Tool to repair."), 8, 12, 4210752);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import net.minecraft.nbt.NBTTagList;
import net.minecraft.network.Packet;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.ChatComponentTranslation;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.fluids.Fluid;
Expand Down Expand Up @@ -888,7 +889,7 @@ public boolean onRightclick(EntityPlayer aPlayer, byte aSide, float aX, float aY
if (GT_ModHandler.damageOrDechargeItem(tCurrentItem, 1, 1000, aPlayer)) {
if (mWorks) disableWorking();
else enableWorking();
GT_Utility.sendChatToPlayer(aPlayer, trans("090","Machine Processing: ") + (isAllowedToWork() ? trans("088","Enabled") : trans("087","Disabled")));
aPlayer.addChatComponentMessage(new ChatComponentTranslation("Interaction_DESCRIPTION_Index_090").appendSibling(new ChatComponentTranslation(isAllowedToWork() ? "Interaction_DESCRIPTION_Index_088" : "Interaction_DESCRIPTION_Index_087")));
GT_Utility.sendSoundToPlayers(worldObj, GregTech_API.sSoundList.get(101), 1.0F, -1, xCoord, yCoord, zCoord);
}
return true;
Expand All @@ -908,7 +909,7 @@ public boolean onRightclick(EntityPlayer aPlayer, byte aSide, float aX, float aY
GT_Utility.sendSoundToPlayers(worldObj, GregTech_API.sSoundList.get(103), 1.0F, -1, xCoord, yCoord, zCoord);
} else if (GT_ModHandler.useSolderingIron(tCurrentItem, aPlayer)) {
mStrongRedstone ^= (1 << tSide);
GT_Utility.sendChatToPlayer(aPlayer, trans("091","Redstone Output at Side ") + tSide + trans("092"," set to: ") + ((mStrongRedstone & (1 << tSide)) != 0 ? trans("093","Strong") : trans("094","Weak")));
aPlayer.addChatComponentMessage(new ChatComponentTranslation("Interaction_DESCRIPTION_Index_091", tSide).appendSibling(new ChatComponentTranslation("Interaction_DESCRIPTION_Index_092").appendSibling(new ChatComponentTranslation((mStrongRedstone & (1 << tSide)) != 0 ? "Interaction_DESCRIPTION_Index_093" : "Interaction_DESCRIPTION_Index_094"))));
GT_Utility.sendSoundToPlayers(worldObj, GregTech_API.sSoundList.get(103), 3.0F, -1, xCoord, yCoord, zCoord);
issueBlockUpdate();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import net.minecraft.network.Packet;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.ChatComponentTranslation;
import net.minecraft.world.EnumSkyBlock;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
Expand Down Expand Up @@ -1469,7 +1470,7 @@ public boolean onRightclick(EntityPlayer aPlayer, byte aSide, float aX, float aY
if (GT_ModHandler.damageOrDechargeItem(tCurrentItem, 1, 1000, aPlayer)) {
mInputDisabled = !mInputDisabled;
if (mInputDisabled) mOutputDisabled = !mOutputDisabled;
GT_Utility.sendChatToPlayer(aPlayer, trans("086","Auto-Input: ") + (mInputDisabled ? trans("087","Disabled") : trans("088","Enabled") + trans("089"," Auto-Output: ") + (mOutputDisabled ? trans("087","Disabled") : trans("088","Enabled"))));
aPlayer.addChatComponentMessage(new ChatComponentTranslation("Interaction_DESCRIPTION_Index_086").appendSibling(new ChatComponentTranslation(mInputDisabled ? "Interaction_DESCRIPTION_Index_087": "Interaction_DESCRIPTION_Index_088").appendSibling(new ChatComponentTranslation("Interaction_DESCRIPTION_Index_089").appendSibling(new ChatComponentTranslation(mOutputDisabled ? "Interaction_DESCRIPTION_Index_087" : "Interaction_DESCRIPTION_Index_088")))));
GT_Utility.sendSoundToPlayers(worldObj, GregTech_API.sSoundList.get(1), 1.0F, -1, xCoord, yCoord, zCoord);
}
return true;
Expand All @@ -1480,10 +1481,10 @@ public boolean onRightclick(EntityPlayer aPlayer, byte aSide, float aX, float aY
if (mWorks) disableWorking();
else enableWorking();
{
String tChat = trans("090", "Machine Processing: ") + (isAllowedToWork() ? trans("088", "Enabled") : trans("087", "Disabled"));
String tChat = isAllowedToWork() ? "Interaction_DESCRIPTION_Index_088" : "Interaction_DESCRIPTION_Index_087";
if (getMetaTileEntity() != null && getMetaTileEntity().hasAlternativeModeText())
tChat = getMetaTileEntity().getAlternativeModeText();
GT_Utility.sendChatToPlayer(aPlayer, tChat);
aPlayer.addChatComponentMessage(new ChatComponentTranslation("Interaction_DESCRIPTION_Index_090").appendSibling(new ChatComponentTranslation(tChat)));
}
GT_Utility.sendSoundToPlayers(worldObj, GregTech_API.sSoundList.get(101), 1.0F, -1, xCoord, yCoord, zCoord);
}
Expand All @@ -1497,7 +1498,7 @@ public boolean onRightclick(EntityPlayer aPlayer, byte aSide, float aX, float aY
GT_Utility.sendSoundToPlayers(worldObj, GregTech_API.sSoundList.get(103), 1.0F, -1, xCoord, yCoord, zCoord);
} else if (GT_ModHandler.useSolderingIron(tCurrentItem, aPlayer)) {
mStrongRedstone ^= (1 << tSide);
GT_Utility.sendChatToPlayer(aPlayer, trans("091","Redstone Output at Side ") + tSide + trans("092"," set to: ") + ((mStrongRedstone & (1 << tSide)) != 0 ? trans("093","Strong") : trans("094","Weak")));
aPlayer.addChatComponentMessage(new ChatComponentTranslation("Interaction_DESCRIPTION_Index_091", tSide).appendSibling(new ChatComponentTranslation("Interaction_DESCRIPTION_Index_092").appendSibling(new ChatComponentTranslation((mStrongRedstone & (1 << tSide)) != 0 ? "Interaction_DESCRIPTION_Index_093" : "Interaction_DESCRIPTION_Index_094"))));
GT_Utility.sendSoundToPlayers(worldObj, GregTech_API.sSoundList.get(103), 3.0F, -1, xCoord, yCoord, zCoord);
issueBlockUpdate();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.ChatComponentTranslation;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
Expand Down Expand Up @@ -352,10 +353,10 @@ public boolean onWireCutterRightClick(byte aSide, byte aWrenchingSide, EntityPla
if (GT_Mod.gregtechproxy.gt6Cable && GT_ModHandler.damageOrDechargeItem(aPlayer.inventory.getCurrentItem(), 1, 500, aPlayer)) {
if(isConnectedAtSide(aWrenchingSide)) {
disconnect(aWrenchingSide);
GT_Utility.sendChatToPlayer(aPlayer, trans("215", "Disconnected"));
aPlayer.addChatComponentMessage(new ChatComponentTranslation("Interaction_DESCRIPTION_Index_215"));
}else if(!GT_Mod.gregtechproxy.costlyCableConnection){
if (connect(aWrenchingSide) > 0)
GT_Utility.sendChatToPlayer(aPlayer, trans("214", "Connected"));
aPlayer.addChatComponentMessage(new ChatComponentTranslation("Interaction_DESCRIPTION_Index_214"));
}
return true;
}
Expand All @@ -366,10 +367,10 @@ public boolean onSolderingToolRightClick(byte aSide, byte aWrenchingSide, Entity
if (GT_Mod.gregtechproxy.gt6Cable && GT_ModHandler.damageOrDechargeItem(aPlayer.inventory.getCurrentItem(), 1, 500, aPlayer)) {
if (isConnectedAtSide(aWrenchingSide)) {
disconnect(aWrenchingSide);
GT_Utility.sendChatToPlayer(aPlayer, trans("215", "Disconnected"));
aPlayer.addChatComponentMessage(new ChatComponentTranslation("Interaction_DESCRIPTION_Index_215"));
} else if (!GT_Mod.gregtechproxy.costlyCableConnection || GT_ModHandler.consumeSolderingMaterial(aPlayer)) {
if (connect(aWrenchingSide) > 0)
GT_Utility.sendChatToPlayer(aPlayer, trans("214", "Connected"));
aPlayer.addChatComponentMessage(new ChatComponentTranslation("Interaction_DESCRIPTION_Index_214"));
}
return true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.ChatComponentTranslation;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
Expand Down Expand Up @@ -358,21 +359,21 @@ public boolean onWrenchRightClick(byte aSide, byte aWrenchingSide, EntityPlayer
if (aPlayer.isSneaking()) {
if (isInputDisabledAtSide(tSide)) {
mDisableInput &= ~tMask;
GT_Utility.sendChatToPlayer(aPlayer, trans("212", "Input enabled"));
aPlayer.addChatComponentMessage(new ChatComponentTranslation("Interaction_DESCRIPTION_Index_212"));
if (!isConnectedAtSide(tSide))
connect(tSide);
} else {
mDisableInput |= tMask;
GT_Utility.sendChatToPlayer(aPlayer, trans("213", "Input disabled"));
aPlayer.addChatComponentMessage(new ChatComponentTranslation("Interaction_DESCRIPTION_Index_213"));
}
} else {
if (!isConnectedAtSide(tSide)) {
if (connect(tSide) > 0)
GT_Utility.sendChatToPlayer(aPlayer, trans("214", "Connected"));
aPlayer.addChatComponentMessage(new ChatComponentTranslation("Interaction_DESCRIPTION_Index_214"));
}
else {
disconnect(tSide);
GT_Utility.sendChatToPlayer(aPlayer, trans("215", "Disconnected"));
aPlayer.addChatComponentMessage(new ChatComponentTranslation("Interaction_DESCRIPTION_Index_215"));
}
}
GregTech_API.causeMachineUpdate(getBaseMetaTileEntity().getWorld(), getBaseMetaTileEntity().getXCoord(), getBaseMetaTileEntity().getYCoord(), getBaseMetaTileEntity().getZCoord());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import net.minecraft.tileentity.TileEntityDispenser;
import net.minecraft.tileentity.TileEntityHopper;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.ChatComponentTranslation;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;

Expand Down Expand Up @@ -194,11 +195,11 @@ public boolean onWrenchRightClick(byte aSide, byte aWrenchingSide, EntityPlayer
byte tSide = GT_Utility.determineWrenchingSide(aSide, aX, aY, aZ);
if (!isConnectedAtSide(tSide)) {
if (connect(tSide) > 0)
GT_Utility.sendChatToPlayer(aPlayer, trans("214", "Connected"));
aPlayer.addChatComponentMessage(new ChatComponentTranslation("Interaction_DESCRIPTION_Index_214"));
}
else {
disconnect(tSide);
GT_Utility.sendChatToPlayer(aPlayer, trans("215", "Disconnected"));
aPlayer.addChatComponentMessage(new ChatComponentTranslation("Interaction_DESCRIPTION_Index_215"));
}
return true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ChatComponentTranslation;
import net.minecraftforge.common.DimensionManager;
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.fluids.FluidStack;
Expand Down Expand Up @@ -734,7 +735,7 @@ public boolean isGivingInformation() {
public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) {
if (aSide == getBaseMetaTileEntity().getFrontFacing() || aSide == mMainFacing) {
mAllowInputFromOutputSide = !mAllowInputFromOutputSide;
GT_Utility.sendChatToPlayer(aPlayer, mAllowInputFromOutputSide ? trans("095","Input from Output Side allowed") : trans("096","Input from Output Side forbidden"));
aPlayer.addChatComponentMessage(new ChatComponentTranslation(mAllowInputFromOutputSide ? "Interaction_DESCRIPTION_Index_095" : "Interaction_DESCRIPTION_Index_096"));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.ChatComponentTranslation;

import static gregtech.api.enums.GT_Values.V;

Expand Down Expand Up @@ -216,9 +217,9 @@ public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX,
mTargetStackSize = (byte) ((mTargetStackSize + (aPlayer.isSneaking()? -1 : 1)) % 65);
if(mTargetStackSize <0){mTargetStackSize = 64;}
if (mTargetStackSize == 0) {
GT_Utility.sendChatToPlayer(aPlayer, trans("098","Do not regulate Item Stack Size"));
aPlayer.addChatComponentMessage(new ChatComponentTranslation("Interaction_DESCRIPTION_Index_098"));
} else {
GT_Utility.sendChatToPlayer(aPlayer, trans("099","Regulate Item Stack Size to: ") + mTargetStackSize);
aPlayer.addChatComponentMessage(new ChatComponentTranslation("Interaction_DESCRIPTION_Index_099", mTargetStackSize));
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.ChatComponentTranslation;

public class GT_MetaTileEntity_Hatch_InputBus extends GT_MetaTileEntity_Hatch {
public GT_Recipe_Map mRecipeMap = null;
Expand Down Expand Up @@ -95,15 +96,15 @@ public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechT
public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
switch (mInventory.length) {
case 1:
return new GT_GUIContainer_1by1(aPlayerInventory, aBaseMetaTileEntity, "Input Bus");
return new GT_GUIContainer_1by1(aPlayerInventory, aBaseMetaTileEntity, trans("219","Input Bus"));
case 4:
return new GT_GUIContainer_2by2(aPlayerInventory, aBaseMetaTileEntity, "Input Bus");
return new GT_GUIContainer_2by2(aPlayerInventory, aBaseMetaTileEntity, trans("219","Input Bus"));
case 9:
return new GT_GUIContainer_3by3(aPlayerInventory, aBaseMetaTileEntity, "Input Bus");
return new GT_GUIContainer_3by3(aPlayerInventory, aBaseMetaTileEntity, trans("219","Input Bus"));
case 16:
return new GT_GUIContainer_4by4(aPlayerInventory, aBaseMetaTileEntity, "Input Bus");
return new GT_GUIContainer_4by4(aPlayerInventory, aBaseMetaTileEntity, trans("219","Input Bus"));
default:
return new GT_GUIContainer_NbyN(aPlayerInventory, aBaseMetaTileEntity, "Input Bus", mTier<=6?mTier+1:8);
return new GT_GUIContainer_NbyN(aPlayerInventory, aBaseMetaTileEntity, trans("219","Input Bus"), mTier<=6?mTier+1:8);
}
}

Expand Down Expand Up @@ -152,7 +153,7 @@ public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX,
return;
if (aPlayer.isSneaking()) {
disableSort = !disableSort;
GT_Utility.sendChatToPlayer(aPlayer, trans("200", "Sort mode: " + (disableSort ? "Disabled" : "Enabled")));
aPlayer.addChatComponentMessage(new ChatComponentTranslation("Interaction_DESCRIPTION_Index_200").appendSibling(new ChatComponentTranslation(disableSort ? "Interaction_DESCRIPTION_Index_087" : "Interaction_DESCRIPTION_Index_088")));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.ChatComponentTranslation;
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.IFluidHandler;
Expand Down Expand Up @@ -184,35 +185,35 @@ public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX,
String inBrackets;
switch (mMode) {
case 0:
GT_Utility.sendChatToPlayer(aPlayer, trans("108","Outputs misc. Fluids, Steam and Items"));
aPlayer.addChatComponentMessage(new ChatComponentTranslation("Interaction_DESCRIPTION_Index_108"));
this.setLockedFluidName(null);
break;
case 1:
GT_Utility.sendChatToPlayer(aPlayer, trans("109","Outputs Steam and Items"));
aPlayer.addChatComponentMessage(new ChatComponentTranslation("Interaction_DESCRIPTION_Index_109"));
this.setLockedFluidName(null);
break;
case 2:
GT_Utility.sendChatToPlayer(aPlayer, trans("110","Outputs Steam and misc. Fluids"));
aPlayer.addChatComponentMessage(new ChatComponentTranslation("Interaction_DESCRIPTION_Index_110"));
this.setLockedFluidName(null);
break;
case 3:
GT_Utility.sendChatToPlayer(aPlayer, trans("111","Outputs Steam"));
aPlayer.addChatComponentMessage(new ChatComponentTranslation("Interaction_DESCRIPTION_Index_111"));
this.setLockedFluidName(null);
break;
case 4:
GT_Utility.sendChatToPlayer(aPlayer, trans("112","Outputs misc. Fluids and Items"));
aPlayer.addChatComponentMessage(new ChatComponentTranslation("Interaction_DESCRIPTION_Index_112"));
this.setLockedFluidName(null);
break;
case 5:
GT_Utility.sendChatToPlayer(aPlayer, trans("113","Outputs only Items"));
aPlayer.addChatComponentMessage(new ChatComponentTranslation("Interaction_DESCRIPTION_Index_113"));
this.setLockedFluidName(null);
break;
case 6:
GT_Utility.sendChatToPlayer(aPlayer, trans("114","Outputs only misc. Fluids"));
aPlayer.addChatComponentMessage(new ChatComponentTranslation("Interaction_DESCRIPTION_Index_114"));
this.setLockedFluidName(null);
break;
case 7:
GT_Utility.sendChatToPlayer(aPlayer, trans("115","Outputs nothing"));
aPlayer.addChatComponentMessage(new ChatComponentTranslation("Interaction_DESCRIPTION_Index_115"));
this.setLockedFluidName(null);
break;
case 8:
Expand Down
Loading