hopefully i didn't fuck up

CCGT changes, automode now lowers throttle when fuel low, displays fuel consumption instead of a generic power setting in the GUI, small change in GUI description, the texture now includes what should be an air filter at the tubine intake. i am NOT good at texturing.
This commit is contained in:
Pvndols 2025-07-13 22:43:02 +02:00
parent 119b8a037b
commit fa6497146a
4 changed files with 22 additions and 20 deletions

View File

@ -109,21 +109,24 @@ public class GUIMachineTurbineGas extends GuiInfoContainer {
}
@Override
public void drawScreen(int mouseX, int mouseY, float f) {
public void drawScreen(int mouseX, int mouseY, float f) {
super.drawScreen(mouseX, mouseY, f);
this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 26, guiTop + 108, 142, 16, turbinegas.power, turbinegas.getMaxPower());
if(turbinegas.powerSliderPos == 0)
this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 36, guiTop + 36, 16, 66, mouseX, mouseY, new String[] {"Turbine idle"});
else
this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 36, guiTop + 36, 16, 66, mouseX, mouseY, new String[] {(turbinegas.powerSliderPos) * 100 / 60 + "% power"});
if(turbinegas.state == 1) {
double consumption = turbinegas.fuelMaxCons.containsKey(turbinegas.tanks[0].getTankType()) ? turbinegas.fuelMaxCons.get(turbinegas.tanks[0].getTankType()) : 5D;
this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 36, guiTop + 36, 16, 66, mouseX, mouseY, new String[] {"Fuel consumption: " + 20 * (consumption * 0.05D + consumption * turbinegas.throttle / 100) + " mb/s"});
}
else {
this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 36, guiTop + 36, 16, 66, mouseX, mouseY, new String[] {"Generator offline"});
}
if(turbinegas.temp >= 20)
this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 133, guiTop + 23, 8, 72, mouseX, mouseY, new String[] {"Temperature: " + (turbinegas.temp) + "°C"});
this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 133, guiTop + 23, 8, 72, mouseX, mouseY, new String[] {"Temperature: " + (turbinegas.temp) + "°C"});
else
this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 133, guiTop + 23, 8, 72, mouseX, mouseY, new String[] {"Temperature: 20°C"});
this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 133, guiTop + 23, 8, 72, mouseX, mouseY, new String[] {"Temperature: 20°C"});
turbinegas.tanks[0].renderTankInfo(this, mouseX, mouseY, guiLeft + 8, guiTop + 16, 16, 48);
turbinegas.tanks[1].renderTankInfo(this, mouseX, mouseY, guiLeft + 8, guiTop + 70, 16, 32);
@ -146,6 +149,7 @@ public class GUIMachineTurbineGas extends GuiInfoContainer {
if(turbinegas.tanks[0].getFill() < 5000 || turbinegas.tanks[1].getFill() < 1000)
this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 16, guiTop + 34 + 32, 16, 16, guiLeft - 8, guiTop + 44 + 16, warning);
}
@Override
protected void drawGuiContainerBackgroundLayer(float iinterpolation, int x, int y) {

View File

@ -105,21 +105,19 @@ public class TileEntityMachineTurbineGas extends TileEntityMachineBase implement
tanks[0].setTankType(fluid);
}
}
<<<<<<< HEAD
if(autoMode) { //power production depending on power requirement
if(autoMode) { //power production depending on power requirement and fuel level
//scales the slider proportionally to the power gauge
int powerSliderTarget = 60 - (int) (60 * power / maxPower);
int powerSliderTarget;
//when low on fuel, decrease consumption linearly
if(tanks[0].getFill() * 10 > tanks[0].getMaxFill()) {
powerSliderTarget = 60 - (int) (60 * power / maxPower); //scales the slider proportionally to the power gauge
}
else {
powerSliderTarget = (int) ( tanks[0].getFill() * 0.0001 * (60 - (int) (60 * power / maxPower)) );
}
=======
if(autoMode) { //power production depending on power requirement
//scales the slider proportionally to the power gauge
int powerSliderTarget = 60 - (int) (60 * power / maxPower);
>>>>>>> origin/master
if(powerSliderTarget > powerSliderPos) { //makes the auto slider slide instead of snapping into position
powerSliderPos++;
}

View File

@ -1033,7 +1033,7 @@ desc.gui.rtg.pellets=Accepted Pellets:
desc.gui.rtg.pelletHeat=%s (%s heat)
desc.gui.rtg.pelletPower=%s (%s HE/tick)
desc.gui.template=§9Templates§r$Templates can be made by$using the Machine Template Folder.
desc.gui.turbinegas.automode=§2Automatic Turbine Throttling Mode§r$By clicking the "AUTO" button, the turbine$will automatically adjust the power production$based on the power required from the network
desc.gui.turbinegas.automode=§2Automatic turbine throttling mode§r$By clicking the "AUTO" button, the turbine$will automatically adjust the throttle position$based on the power required from the network$and the fuel level in the internal tank
desc.gui.turbinegas.fuels=§6Accepted fuels:§r
desc.gui.turbinegas.warning=§cFuel or lubricant level low!§r
desc.gui.zirnox.coolant=§3Coolant§r$CO2 transfers heat from the core to the water.$This will boil it into super dense steam.$The efficiency of cooling and steam production$is based on pressure.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 35 KiB