Skip to content

Commit

Permalink
item text cleanup, NEED TRANSLATORS!
Browse files Browse the repository at this point in the history
  • Loading branch information
EternalBlueFlame committed Dec 22, 2023
1 parent 25bd9e1 commit 9a51432
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/main/java/train/common/items/ItemRollingStock.java
Original file line number Diff line number Diff line change
Expand Up @@ -115,13 +115,9 @@ public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlaye
}
}

if(getEntity().transportFuelType()!=null && !getEntity().transportFuelType().equals("")) {
par3List.add(EnumChatFormatting.RED + t("menu.item.fueltype") + ": " +
t("menu.item."+getEntity().transportFuelType().toLowerCase()));
}

StringBuilder s = new StringBuilder();
par3List.add(EnumChatFormatting.RED + t("menu.item.types")+":");
s.append(t("menu.item.types"));
s.append(": ");
if (getEntity() instanceof Locomotive){
s.append(t("menu.item.locomotive")+", ");
if(entity instanceof IPassenger){
Expand Down Expand Up @@ -151,6 +147,11 @@ public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlaye

par3List.add(EnumChatFormatting.RED +s.toString());

if(getEntity().transportFuelType()!=null && !getEntity().transportFuelType().equals("")) {
par3List.add(EnumChatFormatting.RED + t("menu.item.fueltype") + ": " +
t("menu.item."+getEntity().transportFuelType().toLowerCase()));
}

par3List.add(EnumChatFormatting.GREEN + t("menu.item.weight") +": " + getEntity().weightKg() + "kg");
if (getEntity().transportTopSpeed()!=0){
par3List.add(EnumChatFormatting.GREEN + t("menu.item.speed") +": " + getEntity().transportTopSpeed() +" km/h");
Expand Down
18 changes: 18 additions & 0 deletions src/main/resources/assets/tc/lang/en_US.lang
Original file line number Diff line number Diff line change
Expand Up @@ -872,6 +872,24 @@ builder.up.name=Up
builder.down.name=Down
builder.currElev.name=Current elevation
builder.reqElev.name=Requested elevation
menu.item.slots=Slots
menu.item.passenger=Max Riders
menu.item.isizeof=Inventory
menu.item.freight=Freight
menu.item.passenger=Passenger
menu.item.tanker=Tanker
menu.item.tender=Tender
menu.item.workcart=Workbench Cart
menu.item.rollingstock=Rollingstock
menu.item.locomotive=Locomotive
menu.item.fueltype=Fuel
menu.item.steam=Steam
menu.item.diesel=Diesel
menu.item.electric=Electric
menu.item.types=Type
menu.item.mhp=MHP
menu.item.speed=Top Speed
menu.item.weight=Weight

train.owner.name=You are not the owner!
train.locked.name=Locked
Expand Down

0 comments on commit 9a51432

Please sign in to comment.