Transcribed all ingame text to a bundle

This commit is contained in:
Anuken 2017-12-26 22:13:33 -05:00
parent 13b1cead4d
commit bbda002a5b
30 changed files with 188 additions and 71 deletions

View file

@ -10,6 +10,7 @@ _(These are not planned in the near future at all, and have been suggested befor
- Liquid teleporter
- More teleporter colors/any system that gives it more frequencies (numbers)
- More ore generation (if you're playing on maze, *play any different map, maze has the least resources, and for good reason!*)
- Power wires or conduits
### Already Suggested
_(not necessarily planned!)_

View file

@ -36,6 +36,33 @@ text.waiting=Waiting...
text.countdown=Wave in {0}
text.enemies={0} Enemies left
text.enemies.single={0} Enemy left
text.loadimage=Load Image
text.saveimage=Save Image
text.editor.badsize=[orange]Invalid image dimensions![]\nValid map dimensions: {0}
text.editor.errorimageload=Error loading image file:\n[orange]{0}
text.editor.errorimagesave=Error saving image file:\n[orange]{0}
text.editor.generate=Generate
text.editor.resize=Resize
text.editor.loadmap=Load Map
text.editor.savemap=Save Map
text.editor.loadimage=Load Image
text.editor.saveimage=Save Image
text.editor.unsaved=[scarlet]You have unsaved changes![]\nAre you sure you want to exit?
text.editor.brushsize=Brush size: {0}
text.editor.noplayerspawn=This map has no player spawnpoint!
text.editor.manyplayerspawns=Maps cannot have more than one\nplayer spawnpoint!
text.editor.manyenemyspawns=Cannot have more than\n{0} enemy spawnpoints!
text.editor.resizemap=Resize Map
text.editor.resizebig=[scarlet]Warning!\n[]Maps larger than 256 units may be laggy and unstable.
text.editor.mapname=Map Name:
text.editor.overwrite=[accent]Warning!\nThis overwrites an existing map.
text.editor.failoverwrite=[crimson]Cannot overwrite default map!
text.editor.selectmap=Select a map to load:
text.width=Width:
text.height=Height:
text.randomize=Randomize
text.apply=Apply
text.update=Update
text.menu=Menu
text.play=Play
text.load=Load
@ -43,7 +70,9 @@ text.save=Save
text.settings=Settings
text.tutorial=Tutorial
text.editor=Editor
text.mapeditor=Map Editor
text.donate=Donate
text.settings.reset=Reset to Defaults
text.settings.controls=Controls
text.settings.game=Game
text.settings.sound=Sound
@ -58,6 +87,42 @@ text.error.crashmessage=[SCARLET]An unexpected error has occured, which would ha
text.error.crashtitle=An error has occured
text.blocks.extrainfo=[accent]extra block info:
text.blocks.blockinfo=Block Info
text.blocks.powercapacity=Power Capacity
text.blocks.powershot=Power/shot
text.blocks.powersecond=Power/second
text.blocks.powerdraindamage=Power Drain/damage
text.blocks.shieldradius=Shield Radius
text.blocks.itemspeedsecond=Item Speed/second
text.blocks.range=Range
text.blocks.size=Size
text.blocks.powerliquid=Power/Liquid
text.blocks.maxliquidsecond=Max liquid/second
text.blocks.liquidcapacity=Liquid capacity
text.blocks.liquidsecond=Liquid/second
text.blocks.damageshot=Damage/shot
text.blocks.ammocapacity=Ammo Capacity
text.blocks.ammo=Ammo
text.blocks.ammoitem=Ammo/item
text.blocks.maxitemssecond=Max items/second
text.blocks.powerrange=Power range
text.blocks.lasertilerange=Laser tile range
text.blocks.capacity=Capacity
text.blocks.itemcapacity=Item Capacity
text.blocks.powergenerationsecond=Power Generation/second
text.blocks.generationsecondsitem=Generation Seconds/item
text.blocks.input=Input
text.blocks.inputliquid=Input Liquid
text.blocks.inputitem=Input Item
text.blocks.output=Output
text.blocks.secondsitem=Seconds/item
text.blocks.maxpowertransfersecond=Max power transfer/second
text.blocks.explosive=Highly explosive!
text.blocks.repairssecond=Repairs/second
text.blocks.health=Health
text.blocks.Damage/shot=Damage/shot
text.blocks.inaccuracy=Health
text.blocks.shots=Shots
text.blocks.shotssecond=Shots/second
text.placemode=Place Mode
text.breakmode=Break Mode
text.health=health

View file

@ -373,7 +373,7 @@ public class UI extends SceneModule{
new Dialog("$text.error.title", "dialog"){{
content().margin(15);
content().add(text);
getButtonTable().addButton("OK", this::hide).size(90, 50).pad(4);
getButtonTable().addButton("$text.ok", this::hide).size(90, 50).pad(4);
}}.show();
}
@ -381,7 +381,7 @@ public class UI extends SceneModule{
new Dialog("$text.error.title", "dialog"){{
content().margin(15);
content().add(text);
getButtonTable().addButton("Exit", Gdx.app::exit).size(90, 50).pad(4);
getButtonTable().addButton("$text.quit", Gdx.app::exit).size(90, 50).pad(4);
}}.show();
}

View file

@ -2,6 +2,7 @@ package io.anuke.mindustry.io;
import com.badlogic.gdx.Game;
import com.badlogic.gdx.files.FileHandle;
import com.badlogic.gdx.utils.Array;
import io.anuke.mindustry.Vars;
import io.anuke.mindustry.core.Tutorial;
import io.anuke.mindustry.core.Tutorial.Stage;
@ -15,6 +16,7 @@ import io.anuke.ucore.core.Inputs.DeviceType;
import io.anuke.ucore.core.KeyBinds;
import io.anuke.ucore.core.KeyBinds.Keybind;
import io.anuke.ucore.scene.ui.SettingsDialog.SettingsTable.Setting;
import io.anuke.ucore.util.Bundles;
import io.anuke.ucore.util.Mathf;
import java.io.File;
@ -61,6 +63,17 @@ public class BundleUtil {
write("block." + block.name + ".name=" + block.formalName);
if(block.fullDescription != null) write("block." + block.name + ".fulldescription=" + block.fullDescription);
if(block.description != null) write("block." + block.name + ".description=" + block.description);
Array<String> a = new Array<>();
block.getStats(a);
for(String s : a){
if(s.contains(":")) {
String color = s.substring(0, s.indexOf("]")+1);
String first = s.substring(color.length(), s.indexOf(":")).replace("/", "").replace(" ", "").toLowerCase();
String last = s.substring(s.indexOf(":"), s.length());
s = color + Bundles.getNotNull("text.blocks." + first) + last;
}
}
}
}

View file

@ -22,6 +22,7 @@ import io.anuke.ucore.graphics.Pixmaps;
import io.anuke.ucore.scene.builders.*;
import io.anuke.ucore.scene.ui.*;
import io.anuke.ucore.scene.ui.layout.Table;
import io.anuke.ucore.util.Bundles;
import io.anuke.ucore.util.Strings;
public class MapEditorDialog extends Dialog{
@ -37,12 +38,12 @@ public class MapEditorDialog extends Dialog{
private ButtonGroup<ImageButton> blockgroup;
public MapEditorDialog(MapEditor editor){
super("Map Editor", "dialog");
super("$text.mapeditor", "dialog");
this.editor = editor;
dialog = new MapGenerateDialog(editor);
view = new MapView(editor);
openFile = new FileChooser("Load Image", FileChooser.pngFilter, true, file -> {
openFile = new FileChooser("$text.loadimage", FileChooser.pngFilter, true, file -> {
Vars.ui.showLoading();
Timers.run(3f, () -> {
try{
@ -51,17 +52,17 @@ public class MapEditorDialog extends Dialog{
editor.setPixmap(pixmap);
view.clearStack();
}else{
Vars.ui.showError("[orange]Invalid image dimensions![]\nValid map dimensions: " + Arrays.toString(MapEditor.validMapSizes));
Vars.ui.showError(Bundles.format("text.editor.badsize", Arrays.toString(MapEditor.validMapSizes)));
}
}catch (Exception e){
Vars.ui.showError("Error loading image file:\n[orange]" + Strings.parseException(e, false));
Vars.ui.showError(Bundles.format("text.editor.errorimageload", Strings.parseException(e, false)));
e.printStackTrace();
}
Vars.ui.hideLoading();
});
});
saveFile = new FileChooser("Save Image", false, file -> {
saveFile = new FileChooser("$saveimage", false, file -> {
if(!file.extension().toLowerCase().equals(".png")){
file = file.parent().child(file.nameWithoutExtension() + ".png");
}
@ -71,7 +72,7 @@ public class MapEditorDialog extends Dialog{
try{
Pixmaps.write(editor.pixmap(), result);
}catch (Exception e){
Vars.ui.showError("Error saving image file:\n[orange]" + Strings.parseException(e, false));
Vars.ui.showError(Bundles.format("text.editor.errorimagesave", Strings.parseException(e, false)));
if(!Vars.android) e.printStackTrace();
}
Vars.ui.hideLoading();
@ -171,48 +172,48 @@ public class MapEditorDialog extends Dialog{
new imagebutton("icon-terrain", isize, () ->
dialog.show()
).text("generate");
).text("$text.editor.generate");
row();
new imagebutton("icon-resize", isize, () ->
resizeDialog.show()
).text("resize").padTop(4f);
).text("$text.editor.resize").padTop(4f);
row();
new imagebutton("icon-load-map", isize, () ->
loadDialog.show()
).text("load map");
).text("$text.editor.loadmap");
row();
new imagebutton("icon-save-map", isize, ()->
saveDialog.show()
).text("save map");
).text("$text.editor.savemap");
row();
new imagebutton("icon-load-image", isize, () ->
openFile.show()
).text("load image");
).text("$text.editor.loadimage");
row();
new imagebutton("icon-save-image", isize, () ->
saveFile.show()
).text("save image");
).text("$text.editor.saveimage");
row();
new imagebutton("icon-back", isize, () -> {
if(!saved){
Vars.ui.showConfirm("Confirm Exit", "[scarlet]You have unsaved changes![]\nAre you sure you want to exit?",
Vars.ui.showConfirm("$text.confirm", "$text.editor.unsaved",
MapEditorDialog.this::hide);
}else{
hide();
}
}).padBottom(0).text("back");
}).padBottom(0).text("$text.back");
}}.left().growY().end();
@ -260,7 +261,7 @@ public class MapEditorDialog extends Dialog{
margin(10f);
Slider slider = new Slider(0, MapEditor.brushSizes.length-1, 1, false);
slider.moved(f -> editor.setBrushSize(MapEditor.brushSizes[(int)(float)f]));
new label(() -> "Brush size: " + MapEditor.brushSizes[(int)slider.getValue()]).left();
new label(() -> Bundles.format("text.editor.brushsize", MapEditor.brushSizes[(int)slider.getValue()])).left();
row();
add(slider).growX().padTop(4f);
}}.growX().end();
@ -304,15 +305,15 @@ public class MapEditorDialog extends Dialog{
}
if(playerSpawns == 0){
Vars.ui.showError("This map has no player spawnpoint!");
Vars.ui.showError("$text.editor.noplayerspawn");
return false;
}else if(playerSpawns > 1){
Vars.ui.showError("Maps cannot have more than one\nplayer spawnpoint!");
Vars.ui.showError("$text.editor.manyplayerspawns");
return false;
}
if(enemySpawns > MapEditor.maxSpawnpoints){
Vars.ui.showError("Cannot have more than\n" + MapEditor.maxSpawnpoints + " enemy spawnpoints!");
Vars.ui.showError(Bundles.format("text.editor.manyenemyspawns", MapEditor.maxSpawnpoints));
return false;
}
@ -347,7 +348,7 @@ public class MapEditorDialog extends Dialog{
group.getButtons().get(2).setChecked(true);
Table extra = new Table("button");
extra.labelWrap(() -> editor.getDrawBlock().name).width(180f).center();
extra.labelWrap(() -> editor.getDrawBlock().formalName).width(180f).center();
table.add(extra).growX();
table.row();
table.add(pane).growY().fillX();

View file

@ -24,7 +24,7 @@ public class MapGenerateDialog extends FloatingDialog{
private boolean loading;
public MapGenerateDialog(MapEditor editor) {
super("generate");
super("$text.generate");
this.editor = editor;
Stack stack = new Stack();
@ -64,13 +64,13 @@ public class MapGenerateDialog extends FloatingDialog{
content().add(pane).fillY();
buttons().defaults().size(170f, 50f).pad(4f);
buttons().addButton("Back", this::hide);
buttons().addButton("Randomize", () ->{
buttons().addButton("$text.back", this::hide);
buttons().addButton("$text.randomize", () ->{
editor.getFilter().randomize();
apply();
});
buttons().addButton("Update", this::apply);
buttons().addButton("Apply", () ->{
buttons().addButton("$text.update", this::apply);
buttons().addButton("$text.apply", () ->{
Vars.ui.showLoading();
Timers.run(3f, () ->{

View file

@ -14,11 +14,11 @@ public class MapLoadDialog extends FloatingDialog{
private Map selected = Vars.world.maps().getMap(0);
public MapLoadDialog(Consumer<Map> loader) {
super("load map");
super("$text.editor.loadmap");
rebuild();
TextButton button = new TextButton("Load");
TextButton button = new TextButton("$text.load");
button.setDisabled(() -> selected == null);
button.clicked(() -> {
if (selected != null) {
@ -28,7 +28,7 @@ public class MapLoadDialog extends FloatingDialog{
});
buttons().defaults().size(200f, 50f);
buttons().addButton("Cancel", this::hide);
buttons().addButton("$text.cancel", this::hide);
buttons().add(button);
}
@ -53,7 +53,7 @@ public class MapLoadDialog extends FloatingDialog{
for (Map map : Vars.world.maps().list()) {
if (!map.visible) continue;
TextButton button = new TextButton(map.name, "toggle");
TextButton button = new TextButton(map.localized(), "toggle");
button.add(new BorderImage(map.texture, 2f)).size(16 * 4f);
button.getCells().reverse();
button.clicked(() -> selected = map);
@ -63,7 +63,7 @@ public class MapLoadDialog extends FloatingDialog{
if (++i % maxcol == 0) table.row();
}
content().add("Select a map to load:");
content().add("$text.editor.loadmap");
content().row();
content().add(pane);
}

View file

@ -13,7 +13,7 @@ public class MapResizeDialog extends FloatingDialog{
int width, height;
public MapResizeDialog(MapEditor editor, BiConsumer<Integer, Integer> cons){
super("resize map");
super("$text.editor.resizemap");
shown(() -> {
content().clear();
Pixmap pix = editor.pixmap();
@ -29,7 +29,7 @@ public class MapResizeDialog extends FloatingDialog{
for(int i = 0; i < MapEditor.validMapSizes.length; i ++)
if(MapEditor.validMapSizes[i] == curr) idx = i;
table.add(d == 0 ? "Width: ": "Height: ");
table.add(d == 0 ? "$text.width": "$text.height").padRight(8f);
ButtonGroup<TextButton> group = new ButtonGroup<>();
for(int i = 0; i < MapEditor.validMapSizes.length; i ++){
int size = MapEditor.validMapSizes[i];
@ -49,7 +49,7 @@ public class MapResizeDialog extends FloatingDialog{
}
content().label(() ->
width + height > 512 ? "[scarlet]Warning!\n[]Maps larger than 256 units may be laggy and unstable." : ""
width + height > 512 ? "$text.editor.resizebig" : ""
).get().setAlignment(Align.center, Align.center);
content().row();
content().add(table);
@ -57,8 +57,8 @@ public class MapResizeDialog extends FloatingDialog{
});
buttons().defaults().size(200f, 50f);
buttons().addButton("Cancel", this::hide);
buttons().addButton("Resize", () -> {
buttons().addButton("$text.cancel", this::hide);
buttons().addButton("$text.editor.resize", () -> {
cons.accept(width, height);
hide();
});

View file

@ -12,7 +12,7 @@ public class MapSaveDialog extends FloatingDialog{
private TextField field;
public MapSaveDialog(Consumer<String> cons){
super("Save Map");
super("$text.editor.savemap");
field = new TextField();
Mindustry.platforms.addDialog(field);
@ -23,22 +23,22 @@ public class MapSaveDialog extends FloatingDialog{
Map map = Vars.world.maps().getMap(field.getText());
if(map != null){
if(map.custom){
return "[accent]Warning!\nThis overwrites an existing map.";
return "$text.editor.overwrite";
}else{
return "[crimson]Cannot overwrite default map!";
return "$text.editor.failoverwrite";
}
}
return "";
}).colspan(2);
content().row();
content().add("Map Name: ");
content().add("$text.editor.mapname").padRight(14f);
content().add(field).size(220f, 48f);
});
buttons().defaults().size(200f, 50f).pad(2f);
buttons().addButton("Cancel", this::hide);
buttons().addButton("$text.cancel", this::hide);
TextButton button = new TextButton("Save");
TextButton button = new TextButton("$text.save");
button.clicked(() -> {
if(!invalid()){
cons.accept(field.getText());

View file

@ -1,5 +1,16 @@
package io.anuke.mindustry.resource;
import io.anuke.ucore.util.Bundles;
public enum Item{
stone, iron, coal, steel, titanium, dirium, uranium;
public String localized(){
return Bundles.get("item."+name() + ".name");
}
@Override
public String toString() {
return localized();
}
}

View file

@ -1,6 +1,7 @@
package io.anuke.mindustry.resource;
import com.badlogic.gdx.graphics.Color;
import io.anuke.ucore.util.Bundles;
public enum Liquid{
water(Color.ROYAL),
@ -13,4 +14,13 @@ public enum Liquid{
private Liquid(Color color){
this.color = new Color(color);
}
public String localized(){
return Bundles.get("liquid."+name() + ".name");
}
@Override
public String toString(){
return localized();
}
}

View file

@ -104,6 +104,10 @@ public enum Weapon{
public final String description;
Vector2 vector = new Vector2();
public String localized(){
return Bundles.get("weapon."+name() + ".name");
}
private Weapon(float reload, BulletType type, ItemStack... requirements){
this.reload = reload;

View file

@ -20,7 +20,7 @@ public class FloatingDialog extends Dialog{
@Override
public void addCloseButton(){
buttons().addImageTextButton("Back", "icon-arrow-left", 30f, this::hide).size(230f, 64f);
buttons().addImageTextButton("$text.back", "icon-arrow-left", 30f, this::hide).size(230f, 64f);
keyDown(key->{
if(key == Keys.ESCAPE || key == Keys.BACK)

View file

@ -54,7 +54,7 @@ public class LoadDialog extends FloatingDialog{
button.row();
Label info = new Label("[gray]" + (!SaveIO.isSaveValid(i) ? Bundles.get("text.empty") : SaveIO.getMode(i) + ", "
+ SaveIO.getMap(i).name + ", " + Bundles.format("text.save.wave", SaveIO.getWave(i)) + "\n"
+ Bundles.get("map."+SaveIO.getMap(i).name+".name", SaveIO.getMap(i).name) + ", " + Bundles.format("text.save.wave", SaveIO.getWave(i)) + "\n"
+ Bundles.format("text.save.date", SaveIO.getTimeString(i))));
info.setAlignment(Align.center, Align.center);

View file

@ -36,7 +36,7 @@ public class SaveDialog extends LoadDialog{
}
void save(int slot){
Vars.ui.showLoading("text.saveload");
Vars.ui.showLoading("$text.saveload");
Timers.runTask(5f, () -> {
hide();

View file

@ -42,7 +42,7 @@ public class UpgradeDialog extends FloatingDialog{
int i = 0;
for(Weapon weapon : Weapon.values()){
TextButton button = new TextButton(weapon.name());
TextButton button = new TextButton("$weapon."+weapon.name()+".name");
Image img = new Image(Draw.region(weapon.name()));
button.add(img).size(8*5);
@ -81,7 +81,7 @@ public class UpgradeDialog extends FloatingDialog{
String description = weapon.description;
tiptable.background("pane");
tiptable.add("[orange]" + weapon.name(), 0.5f).left().padBottom(4f);
tiptable.add("[orange]" + weapon.localized(), 0.5f).left().padBottom(4f);
Table reqtable = new Table();

View file

@ -233,6 +233,12 @@ public class BlocksFragment implements Fragment{
}
for(String s : statlist){
if(s.contains(":")) {
String color = s.substring(0, s.indexOf("]")+1);
String first = s.substring(color.length(), s.indexOf(":")).replace("/", "").replace(" ", "").toLowerCase();
String last = s.substring(s.indexOf(":"), s.length());
s = color + Bundles.get("text.blocks." + first) + last;
}
table.add(s).left();
table.row();
}

View file

@ -152,7 +152,7 @@ public class HudFragment implements Fragment{
private String getEnemiesRemaining() {
if(control.getEnemiesRemaining() == 1) {
return Bundles.format("text.single", control.getEnemiesRemaining());
return Bundles.format("text.enemies.single", control.getEnemiesRemaining());
} else return Bundles.format("text.enemies", control.getEnemiesRemaining());
}
@ -215,7 +215,7 @@ public class HudFragment implements Fragment{
if(amount > 99999999){
formatted = "inf";
}
Image image = new Image(Draw.region("icon-" + items[i]));
Image image = new Image(Draw.region("icon-" + items[i].name()));
Label label = new Label(formatted);
label.setFontScale(fontscale*1.5f);
itemtable.add(image).size(8*3);

View file

@ -87,12 +87,10 @@ public class PlacementFragment implements Fragment{
defaults().size(54, 58).pad(0);
int d = 0;
for(PlaceMode mode : PlaceMode.values()){
if(!mode.shown || !mode.delete) continue;
defaults().padBottom(d < 2 ? -5.5f : 0);
defaults().padBottom(-5.5f);
new imagebutton("icon-" + mode.name(), "toggle", 10*3, ()->{
control.getInput().resetCursor();

View file

@ -85,8 +85,8 @@ public class Block{
this.name = name;
this.formalName = Bundles.get("block." + name + ".name", name);
this.description = Bundles.get("block." + name + ".description");
this.fullDescription = Bundles.get("block." + name + ".fulldescription");
this.description = Bundles.getOrNull("block." + name + ".description");
this.fullDescription = Bundles.getOrNull("block." + name + ".fulldescription");
this.solid = false;
this.id = lastid++;
}

View file

@ -1,5 +1,7 @@
package io.anuke.mindustry.world;
import io.anuke.ucore.util.Bundles;
public enum GameMode{
waves,
sandbox{
@ -15,4 +17,10 @@ public enum GameMode{
};
public boolean infiniteResources;
public boolean toggleWaves;
@Override
public String toString(){
return Bundles.get("mode."+name()+".name");
}
}

View file

@ -3,6 +3,7 @@ package io.anuke.mindustry.world;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.Pixmap;
import com.badlogic.gdx.graphics.Texture;
import io.anuke.ucore.util.Bundles;
public class Map{
public int id = -1;
@ -16,6 +17,10 @@ public class Map{
public transient Texture texture;
public Map(){}
public String localized(){
return Bundles.get("map."+name+".name", name);
}
public int getWidth(){
return pixmap.getWidth();

View file

@ -14,6 +14,7 @@ import io.anuke.mindustry.resource.Item;
import io.anuke.mindustry.world.Tile;
import io.anuke.mindustry.world.blocks.types.PowerAcceptor;
import io.anuke.ucore.core.Draw;
import io.anuke.ucore.util.Bundles;
import io.anuke.ucore.util.Mathf;
import io.anuke.ucore.util.Strings;

View file

@ -31,9 +31,9 @@ public class ShieldBlock extends PowerBlock{
@Override
public void getStats(Array<String> list){
super.getStats(list);
list.add("[powerinfo]Power used: " + Strings.toFixed(powerDrain*60, 2) + "power/s");
list.add("[powerinfo]Power Drain: " + Strings.toFixed(powerPerDamage, 2) + "power/damage");
list.add("[powerinfo]Shield Radius: " + (int)shieldRadius + " units");
list.add("[powerinfo]Power/second: " + Strings.toFixed(powerDrain*60, 2));
list.add("[powerinfo]Power Drain/damage: " + Strings.toFixed(powerPerDamage, 2));
list.add("[powerinfo]Shield Radius: " + (int)shieldRadius);
}
@Override

View file

@ -40,7 +40,7 @@ public class Conveyor extends Block{
@Override
public void getStats(Array<String> list){
super.getStats(list);
list.add("[iteminfo]Move Speed: " + Strings.toFixed(speed * 60, 1) + " units/s");
list.add("[iteminfo]Item Speed/second: " + Strings.toFixed(speed * 60, 1));
}
@Override

View file

@ -19,12 +19,6 @@ public class PowerLaser extends Generator{
health = 50;
}
@Override
public void getStats(Array<String> list){
super.getStats(list);
list.add("[powerinfo]Laser Range: " + laserRange + " tiles");
}
@Override
public void update(Tile tile){
distributeLaserPower(tile);

View file

@ -42,12 +42,12 @@ public class Generator extends PowerBlock{
super.getStats(list);
if(hasLasers){
list.add("[powerinfo]Laser range: " + laserRange + " blocks");
list.add("[powerinfo]Laser tile range: " + laserRange);
list.add("[powerinfo]Max power transfer/second: " + Strings.toFixed(powerSpeed * 2, 2));
}
if(explosive){
list.add("[orange]Highly explosive!");
list.add("[orange]" + Bundles.get("text.blocks.explosive"));
}
}

View file

@ -32,8 +32,8 @@ public class ItemPowerGenerator extends Generator{
public void getStats(Array<String> list){
super.getStats(list);
list.add("[powerinfo]Item Capacity: " + itemCapacity);
list.add("[powerinfo]Generation: " + Strings.toFixed(powerOutput*60f, 2) + " power/s");
list.add("[powerinfo]Generation Time: " + Strings.toFixed(itemDuration/60f, 2) + " s/item");
list.add("[powerinfo]Power Generation/second: " + Strings.toFixed(powerOutput*60f, 2));
list.add("[powerinfo]Generation Seconds/item: " + Strings.toFixed(itemDuration/60f, 2));
list.add("[powerinfo]Input: " + generateItem);
}

View file

@ -37,8 +37,8 @@ public class LiquidPowerGenerator extends Generator implements LiquidAcceptor{
public void getStats(Array<String> list){
super.getStats(list);
list.add("[liquidinfo]Liquid Capacity: " + (int)liquidCapacity);
list.add("[liquidinfo]Generation: " + Strings.toFixed(powerPerLiquid, 2) + " power/liquid");
list.add("[liquidinfo]Max liquid: " + Strings.toFixed(maxLiquidGenerate*60f, 2) + " liquid/s");
list.add("[liquidinfo]Power/Liquid: " + Strings.toFixed(powerPerLiquid, 2) + " power/liquid");
list.add("[liquidinfo]Max liquid/second: " + Strings.toFixed(maxLiquidGenerate*60f, 2) + " liquid/s");
list.add("[liquidinfo]Input: " + generateLiquid);
}

View file

@ -28,7 +28,7 @@ public class Pump extends LiquidBlock{
@Override
public void getStats(Array<String> list){
super.getStats(list);
list.add("[liquidinfo]Pump Speed: " + Strings.toFixed(60f*pumpAmount, 1) + "/s");
list.add("[liquidinfo]Liquid/second: " + Strings.toFixed(60f*pumpAmount, 1));
}
@Override