Merge pull request #3104 from Ghostlyr/patch-1

Need full localization
This commit is contained in:
Adrian Siekierka 2015-10-28 06:12:24 +01:00
commit c7b3b25604
2 changed files with 9 additions and 4 deletions

View file

@ -482,6 +482,10 @@ tip.PipePowerWood=Power Input Pipe
tip.PipeStructureCobblestone=Support pipe
tip.deprecated=Deprecated
tip.gate.charged=Charged
tip.gate.fullcharge=Full Charge
tip.gate.nocharge=No Charge
tip.filler.excavate.on=Excavate
tip.filler.excavate.off=Do Not Excavate
@ -582,4 +586,4 @@ command.buildcraft.buildcraft.op.format=Format: /%s
command.buildcraft.buildcraft.deop.desc=- %s : Deop FakePlayer
command.buildcraft.buildcraft.deop.help=Gives OP rights to the BC FakePlayer (acts in the name of quarries, robots, etc.)
command.buildcraft.buildcraft.deop.format=Format: /%s
command.buildcraft.buildcraft.deop.format=Format: /%s

View file

@ -36,6 +36,7 @@ import buildcraft.api.robots.EntityRobotBase;
import buildcraft.core.BCCreativeTab;
import buildcraft.core.lib.items.ItemBuildCraft;
import buildcraft.core.lib.utils.NBTUtils;
import buildcraft.core.lib.utils.StringUtils;
import buildcraft.transport.BlockGenericPipe;
import buildcraft.transport.Pipe;
@ -98,11 +99,11 @@ public class ItemRobot extends ItemBuildCraft implements IEnergyContainerItem {
int energy = getEnergy(cpt);
int pct = energy * 100 / EntityRobotBase.MAX_ENERGY;
String enInfo = pct + "% Charged";
String enInfo = pct + "% " + StringUtils.localize("tip.gate.charged");
if (energy == EntityRobotBase.MAX_ENERGY) {
enInfo = "Full Charge";
enInfo = StringUtils.localize("tip.gate.fullcharge");
} else if (energy == 0) {
enInfo = "No Charge";
enInfo = StringUtils.localize("tip.gate.nocharge");
}
enInfo = (pct >= 80 ? EnumChatFormatting.GREEN : (pct >= 50 ? EnumChatFormatting.YELLOW : (pct >= 30 ? EnumChatFormatting.GOLD : (pct >= 20 ? EnumChatFormatting.RED : EnumChatFormatting.DARK_RED)))) + enInfo;
list.add(enInfo);