Fixed some LESU things
EU/t and capacity are now config-driven. Note that while the "max-eu" updates when you remove LESU storage blocks, it's currently retaining the highest EU/t you get, so if you remove blocks, the GUI still says it has the same EU/t you had before you removed them. Also shortened EU display.
This commit is contained in:
parent
238901323c
commit
4fb6f4aca6
5 changed files with 48 additions and 13 deletions
|
@ -5,6 +5,7 @@ import cpw.mods.fml.relauncher.SideOnly;
|
|||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.ICrafting;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import techreborn.config.ConfigTechReborn;
|
||||
import techreborn.tiles.lesu.TileLesu;
|
||||
|
||||
public class ContainerLesu extends TechRebornContainer {
|
||||
|
@ -96,7 +97,7 @@ public class ContainerLesu extends TechRebornContainer {
|
|||
} else if(id == 4){
|
||||
this.euStorage = value;
|
||||
}
|
||||
this.euStorage = (connectedBlocks * 100000) + 1000000000;
|
||||
this.euStorage = ((connectedBlocks + 1) * ConfigTechReborn.lesuStoragePerBlock);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -47,10 +47,25 @@ public class GuiLesu extends GuiContainer {
|
|||
int p_146979_2_)
|
||||
{
|
||||
this.fontRendererObj.drawString(StatCollector.translateToLocal("tile.techreborn.lesu.name"), 40, 10, Color.WHITE.getRGB());
|
||||
this.fontRendererObj.drawString((int)containerLesu.euOut + " eu/tick", 10, 20, Color.WHITE.getRGB());
|
||||
this.fontRendererObj.drawString((int)containerLesu.storedEu + " eu", 10, 30, Color.WHITE.getRGB());
|
||||
this.fontRendererObj.drawString((int)containerLesu.euChange + " eu change", 10, 40, Color.WHITE.getRGB());
|
||||
this.fontRendererObj.drawString((int)containerLesu.connectedBlocks + " blocks", 10, 50, Color.WHITE.getRGB());
|
||||
// this.fontRendererObj.drawString((int)containerLesu.euStorage + " max eu", 10, 60, Color.WHITE.getRGB());
|
||||
this.fontRendererObj.drawString(GetEUString(containerLesu.euOut) + "/t", 10, 20, Color.WHITE.getRGB());
|
||||
this.fontRendererObj.drawString(GetEUString(containerLesu.storedEu), 10, 30, Color.WHITE.getRGB());
|
||||
this.fontRendererObj.drawString(GetEUString(containerLesu.euChange) + " change", 10, 40, Color.WHITE.getRGB());
|
||||
this.fontRendererObj.drawString(containerLesu.connectedBlocks + " blocks", 10, 50, Color.WHITE.getRGB());
|
||||
this.fontRendererObj.drawString(GetEUString(containerLesu.euStorage) + " max", 10, 60, Color.WHITE.getRGB());
|
||||
}
|
||||
|
||||
private String GetEUString(double euValue)
|
||||
{
|
||||
if (euValue >= 1000000) {
|
||||
double tenX = Math.round(euValue / 100000);
|
||||
return Double.toString(tenX / 10.0).concat(" m EU");
|
||||
}
|
||||
else if (euValue >= 1000) {
|
||||
double tenX = Math.round(euValue / 100);
|
||||
return Double.toString(tenX / 10.0).concat(" k EU");
|
||||
}
|
||||
else {
|
||||
return Double.toString(Math.floor(euValue)).concat(" EU");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -116,7 +116,11 @@ public class ChargeHud
|
|||
|
||||
private String GetEUString(double euValue)
|
||||
{
|
||||
if (euValue > 1000) {
|
||||
if (euValue > 1000000) {
|
||||
double tenX = Math.round(euValue / 100000);
|
||||
return Double.toString(tenX / 10.0).concat(" m EU");
|
||||
}
|
||||
else if (euValue > 1000) {
|
||||
double tenX = Math.round(euValue / 100);
|
||||
return Double.toString(tenX / 10.0).concat(" k EU");
|
||||
}
|
||||
|
|
|
@ -69,6 +69,9 @@ public class ConfigTechReborn {
|
|||
public static int DragoneggsiphonerOutput;
|
||||
public static int heatGeneratorOutput;
|
||||
public static int aveargeEuOutTickTime;
|
||||
public static int extraOutputPerLesuBlock;
|
||||
public static int baseLesuOutput;
|
||||
public static int lesuStoragePerBlock;
|
||||
// Charge
|
||||
public static int AdvancedDrillCharge;
|
||||
public static int LapotronPackCharge;
|
||||
|
@ -571,6 +574,22 @@ public class ConfigTechReborn {
|
|||
StatCollector
|
||||
.translateToLocal("config.techreborn.aveargeEuOutTickTime.tooltip"))
|
||||
.getInt();
|
||||
lesuStoragePerBlock = config.get(CATEGORY_POWER,
|
||||
StatCollector.translateToLocal("config.techreborn.lesuStoragePerBlock"),
|
||||
1000000,
|
||||
StatCollector.translateToLocal("config.techreborn.lesuStoragePerBlock.tooltip"))
|
||||
.getInt();
|
||||
baseLesuOutput = config.get(CATEGORY_POWER,
|
||||
StatCollector.translateToLocal("config.techreborn.baseLesuOutput"),
|
||||
16,
|
||||
StatCollector.translateToLocal("config.techreborn.baseLesuOutput.tooltip"))
|
||||
.getInt();
|
||||
extraOutputPerLesuBlock = config.get(CATEGORY_POWER,
|
||||
StatCollector.translateToLocal("config.techreborn.extraOutputPerLesuBlock"),
|
||||
8,
|
||||
StatCollector.translateToLocal("config.techreborn.extraOutputPerLesuBlock.tooltip"))
|
||||
.getInt();
|
||||
|
||||
|
||||
// Teir
|
||||
AdvancedDrillTier = config
|
||||
|
|
|
@ -11,9 +11,6 @@ import java.util.ArrayList;
|
|||
|
||||
public class TileLesu extends EUStorageTile implements IWrenchable {
|
||||
|
||||
public int baseEU = 0;
|
||||
public int storgeBlockSize = 1000000;
|
||||
|
||||
private ArrayList<LesuNetwork> countedNetworks = new ArrayList<LesuNetwork>();
|
||||
public int connectedBlocks = 0;
|
||||
public int currentBlocks = 0;
|
||||
|
@ -51,14 +48,13 @@ public class TileLesu extends EUStorageTile implements IWrenchable {
|
|||
}
|
||||
}
|
||||
if(currentBlocks != connectedBlocks){
|
||||
maxStorage = (connectedBlocks * storgeBlockSize) + baseEU;
|
||||
output = connectedBlocks;
|
||||
maxStorage = ((connectedBlocks + 1) * ConfigTechReborn.lesuStoragePerBlock);
|
||||
output = (connectedBlocks * ConfigTechReborn.extraOutputPerLesuBlock) + ConfigTechReborn.baseLesuOutput;
|
||||
}
|
||||
|
||||
if(ticks == ConfigTechReborn.aveargeEuOutTickTime){
|
||||
euChange = -1;
|
||||
ticks = 0;
|
||||
|
||||
} else {
|
||||
ticks ++;
|
||||
if(euChange == -1){
|
||||
|
|
Loading…
Reference in a new issue