Skip to content

Commit

Permalink
Steam Machine Fixes & Improvements (GTNewHorizons#3143)
Browse files Browse the repository at this point in the history
Co-authored-by: Martin Robertz <dream-master@gmx.net>
  • Loading branch information
PlayfulPiano and Dream-Master authored Sep 11, 2024
1 parent d59d05e commit 7dff0c2
Show file tree
Hide file tree
Showing 13 changed files with 161 additions and 86 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1208,14 +1208,14 @@ public void getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDat
if (mEUt > 0) {
currenttip.add(
StatCollector.translateToLocalFormatted(
"GT5U.waila.energy.use",
GTUtility.formatNumbers(mEUt),
"GTPP.waila.steam.use",
GTUtility.formatNumbers(mEUt * 40),
GTUtility.getColoredTierNameFromVoltage(mEUt)));
} else if (mEUt < 0) {
currenttip.add(
StatCollector.translateToLocalFormatted(
"GT5U.waila.energy.produce",
GTUtility.formatNumbers(-mEUt),
"GTPP.waila.steam.use",
GTUtility.formatNumbers(-mEUt * 40),
GTUtility.getColoredTierNameFromVoltage(-mEUt)));
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
*/
public abstract class MTEBasicMachineSteel extends MTEBasicMachineBronze implements IGetTitleColor {

private static final String HPTOOLTIP = "Processing Speed & Steam Consumption is doubled under High Pressure";

public MTEBasicMachineSteel(int aID, String aName, String aNameRegional, String aDescription, int aInputSlotCount,
int aOutputSlotCount, boolean aHighPressure) {
super(aID, aName, aNameRegional, aDescription, aInputSlotCount, aOutputSlotCount, aHighPressure);
Expand Down
26 changes: 14 additions & 12 deletions src/main/java/gregtech/loaders/preload/LoaderMetaTileEntities.java
Original file line number Diff line number Diff line change
Expand Up @@ -2367,20 +2367,24 @@ private static void registerAlloySmelter() {

private static void registerHPSteamMachines() {
ItemList.Machine_HP_Extractor.set(
new MTESteamExtractorSteel(HP_STEAM_EXTRACTOR.ID, "hpmachine.extractor", "High Pressure Extractor")
new MTESteamExtractorSteel(HP_STEAM_EXTRACTOR.ID, "hpmachine.extractor", "High Pressure Steam Extractor")
.getStackForm(1L));
ItemList.Machine_HP_Furnace.set(
new MTESteamFurnaceSteel(HP_STEAM_FURNACE.ID, "hpmachine.furnace", "High Pressure Furnace")
new MTESteamFurnaceSteel(HP_STEAM_FURNACE.ID, "hpmachine.furnace", "High Pressure Steam Furnace")
.getStackForm(1L));
ItemList.Machine_HP_Macerator.set(
new MTESteamMaceratorSteel(HP_STEAM_MACERATOR.ID, "hpmachine.macerator", "High Pressure Macerator")
new MTESteamMaceratorSteel(HP_STEAM_MACERATOR.ID, "hpmachine.macerator", "High Pressure Steam Macerator")
.getStackForm(1L));
ItemList.Machine_HP_Hammer.set(
new MTESteamForgeHammerSteel(HP_STEAM_FORGE_HAMMER.ID, "hpmachine.hammer", "High Pressure Forge Hammer")
.getStackForm(1L));
new MTESteamForgeHammerSteel(
HP_STEAM_FORGE_HAMMER.ID,
"hpmachine.hammer",
"High Pressure Steam Forge Hammer").getStackForm(1L));
ItemList.Machine_HP_Compressor.set(
new MTESteamCompressorSteel(HP_STEAM_COMPRESSOR.ID, "hpmachine.compressor", "High Pressure Compressor")
.getStackForm(1L));
new MTESteamCompressorSteel(
HP_STEAM_COMPRESSOR.ID,
"hpmachine.compressor",
"High Pressure Steam Compressor").getStackForm(1L));
ItemList.Machine_HP_AlloySmelter.set(
new MTESteamAlloySmelterSteel(
HP_STEAM_ALLOY_SMELTER.ID,
Expand Down Expand Up @@ -10850,15 +10854,13 @@ private static void registerBoiler() {
ItemList.Machine_Bronze_Boiler
.set(new MTEBoilerBronze(SMALL_COAL_BOILER.ID, "boiler.bronze", "Small Coal Boiler").getStackForm(1L));
ItemList.Machine_Steel_Boiler.set(
new MTEBoilerSteel(HIGH_PRESSURE_COAL_BOILER.ID, "boiler.steel", "High Pressure Coal Boiler")
.getStackForm(1L));
new MTEBoilerSteel(HIGH_PRESSURE_COAL_BOILER.ID, "boiler.steel", "Large Coal Boiler").getStackForm(1L));
ItemList.Machine_Steel_Boiler_Lava.set(
new MTEBoilerLava(HIGH_PRESSURE_LAVA_BOILER.ID, "boiler.lava", "High Pressure Lava Boiler")
.getStackForm(1L));
new MTEBoilerLava(HIGH_PRESSURE_LAVA_BOILER.ID, "boiler.lava", "Reinforced Lava Boiler").getStackForm(1L));
ItemList.Machine_Bronze_Boiler_Solar
.set(new MTEBoilerSolar(SIMPLE_SOLAR_BOILER.ID, "boiler.solar", "Simple Solar Boiler").getStackForm(1L));
ItemList.Machine_HP_Solar.set(
new MTEBoilerSolarSteel(HIGH_PRESSURE_SOLAR_BOILER.ID, "boiler.steel.solar", "High Pressure Solar Boiler")
new MTEBoilerSolarSteel(HIGH_PRESSURE_SOLAR_BOILER.ID, "boiler.steel.solar", "Advanced Solar Boiler")
.getStackForm(1L));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,8 @@ public void getWailaBody(ItemStack itemStack, List<String> currentTip, IWailaDat
long actualEnergyUsage = tag.getLong("energyUsage");
if (actualEnergyUsage > 0) {
currentTip.add(
StatCollector.translateToLocalFormatted("GTPP.waila.steam.use", formatNumbers(actualEnergyUsage)));
StatCollector
.translateToLocalFormatted("GTPP.waila.steam.use", formatNumbers(actualEnergyUsage * 20)));
}
}
currentTip
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -312,8 +312,8 @@ protected CheckRecipeResult validateRecipe(@Nonnull GTRecipe recipe) {
@Nonnull
protected OverclockCalculator createOverclockCalculator(@NotNull GTRecipe recipe) {
return OverclockCalculator.ofNoOverclock(recipe)
.setEUtDiscount(1.33 * tierMachine)
.setSpeedBoost(1.5 / tierMachine);
.setEUtDiscount(1.25 * tierMachine)
.setSpeedBoost(1.6 / tierMachine);
}
}.setMaxParallelSupplier(this::getMaxParallelRecipes);
}
Expand All @@ -327,11 +327,11 @@ public int getTierRecipes() {
protected MultiblockTooltipBuilder createTooltip() {
MultiblockTooltipBuilder tt = new MultiblockTooltipBuilder();
tt.addMachineType(getMachineType())
.addInfo("Controller Block for the Steam Centrifuge")
.addInfo("33.3% faster than a single block steam machine would run")
.addInfo("Uses only 66.6% of the steam/s that a single block steam machine would use")
.addInfo("Processes 8x parallel")
.addInfo("Steel tier produces at twice the speed but with twice the steam consumption")
.addInfo("Controller Block for the Steam Separator")
.addInfo("25% faster than using single block steam machines of the same pressure")
.addInfo("Only consumes steam at 62.5% of the L/s normally required")
.addInfo("Processes up to 8 items at once")
.addInfo("Processing Speed & Steam Consumption is doubled under High Pressure")
.addSeparator()
.beginStructureBlock(5, 5, 5, false)
.addInputBus(EnumChatFormatting.GOLD + "1" + EnumChatFormatting.GRAY + " Any casing", 1)
Expand All @@ -344,13 +344,13 @@ protected MultiblockTooltipBuilder createTooltip() {
+ EnumChatFormatting.GRAY
+ " Any casing")
.addStructureInfo("")
.addStructureInfo(EnumChatFormatting.BLUE + "Tier " + EnumChatFormatting.DARK_PURPLE + 1)
.addStructureInfo(EnumChatFormatting.BLUE + "Basic " + EnumChatFormatting.DARK_PURPLE + "Tier")
.addStructureInfo(EnumChatFormatting.GOLD + "60-65x" + EnumChatFormatting.GRAY + " Bronze Plated Bricks")
.addStructureInfo(EnumChatFormatting.GOLD + "8x" + EnumChatFormatting.GRAY + " Bronze Gear Box Casing")
.addStructureInfo(EnumChatFormatting.GOLD + "3x" + EnumChatFormatting.GRAY + " Bronze Firebox Casing")
.addStructureInfo(EnumChatFormatting.GOLD + "4x" + EnumChatFormatting.GRAY + " Bronze Pipe Casing")
.addStructureInfo("")
.addStructureInfo(EnumChatFormatting.BLUE + "Tier " + EnumChatFormatting.DARK_PURPLE + 2)
.addStructureInfo(EnumChatFormatting.BLUE + "High Pressure " + EnumChatFormatting.DARK_PURPLE + "Tier")
.addStructureInfo(
EnumChatFormatting.GOLD + "60-65x" + EnumChatFormatting.GRAY + " Solid Steel Machine Casing")
.addStructureInfo(EnumChatFormatting.GOLD + "8x" + EnumChatFormatting.GRAY + " Steel Gear Box Casing")
Expand All @@ -375,10 +375,20 @@ public void getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDat
super.getWailaBody(itemStack, currenttip, accessor, config);
NBTTagCompound tag = accessor.getNBTData();

int tierMachine = tag.getInteger("tierMachine");
String tierMachineText;
if (tierMachine == 1) {
tierMachineText = "Basic";
} else if (tierMachine == 2) {
tierMachineText = "High Pressure";
} else {
tierMachineText = String.valueOf(tierMachine);
}

currenttip.add(
StatCollector.translateToLocal("GTPP.machines.tier") + ": "
+ EnumChatFormatting.YELLOW
+ tag.getInteger("tierMachine")
+ tierMachineText
+ EnumChatFormatting.RESET);
currenttip.add(
StatCollector.translateToLocal("GT5U.multiblock.curparallelism") + ": "
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -256,8 +256,8 @@ protected CheckRecipeResult validateRecipe(@Nonnull GTRecipe recipe) {
@Nonnull
protected OverclockCalculator createOverclockCalculator(@NotNull GTRecipe recipe) {
return OverclockCalculator.ofNoOverclock(recipe)
.setEUtDiscount(1.33 * tierMachine)
.setSpeedBoost(1.5 / tierMachine);
.setEUtDiscount(1.25 * tierMachine)
.setSpeedBoost(1.6 / tierMachine);
}
}.setMaxParallelSupplier(this::getMaxParallelRecipes);
}
Expand All @@ -271,11 +271,11 @@ public int getTierRecipes() {
protected MultiblockTooltipBuilder createTooltip() {
MultiblockTooltipBuilder tt = new MultiblockTooltipBuilder();
tt.addMachineType(getMachineType())
.addInfo("Controller Block for the Steam Compressor")
.addInfo("33.3% faster than the single block Steam Compressor")
.addInfo("Uses only 66.6% of the steam/s that the single block Steam Compressor uses")
.addInfo("Processes 8x parallel")
.addInfo("Steel tier produces at twice the speed but with twice the steam consumption")
.addInfo("Controller Block for the Steam Squasher")
.addInfo("25% faster than using single block steam machines of the same pressure")
.addInfo("Only consumes steam at 62.5% of the L/s normally required")
.addInfo("Processes up to 8 items at once")
.addInfo("Processing Speed & Steam Consumption is doubled under High Pressure")
.addSeparator()
.beginStructureBlock(3, 3, 4, false)
.addInputBus(EnumChatFormatting.GOLD + "1" + EnumChatFormatting.GRAY + " Any casing", 1)
Expand All @@ -287,10 +287,10 @@ protected MultiblockTooltipBuilder createTooltip() {
+ EnumChatFormatting.GRAY
+ " Any casing")
.addStructureInfo("")
.addStructureInfo(EnumChatFormatting.BLUE + "Tier " + EnumChatFormatting.DARK_PURPLE + 1)
.addStructureInfo(EnumChatFormatting.BLUE + "Basic " + EnumChatFormatting.DARK_PURPLE + "Tier")
.addStructureInfo(EnumChatFormatting.GOLD + "25-30x" + EnumChatFormatting.GRAY + " Bronze Plated Bricks")
.addStructureInfo("")
.addStructureInfo(EnumChatFormatting.BLUE + "Tier " + EnumChatFormatting.DARK_PURPLE + 2)
.addStructureInfo(EnumChatFormatting.BLUE + "High Pressure " + EnumChatFormatting.DARK_PURPLE + "Tier")
.addStructureInfo(
EnumChatFormatting.GOLD + "25-30x" + EnumChatFormatting.GRAY + " Solid Steel Machine Casing")
.addStructureInfo("")
Expand All @@ -312,10 +312,20 @@ public void getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDat
super.getWailaBody(itemStack, currenttip, accessor, config);
NBTTagCompound tag = accessor.getNBTData();

int tierMachine = tag.getInteger("tierMachine");
String tierMachineText;
if (tierMachine == 1) {
tierMachineText = "Basic";
} else if (tierMachine == 2) {
tierMachineText = "High Pressure";
} else {
tierMachineText = String.valueOf(tierMachine);
}

currenttip.add(
StatCollector.translateToLocal("GTPP.machines.tier") + ": "
+ EnumChatFormatting.YELLOW
+ tag.getInteger("tierMachine")
+ tierMachineText
+ EnumChatFormatting.RESET);
currenttip.add(
StatCollector.translateToLocal("GT5U.multiblock.curparallelism") + ": "
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,8 @@ protected CheckRecipeResult validateRecipe(@Nonnull GTRecipe recipe) {
@Nonnull
protected OverclockCalculator createOverclockCalculator(@NotNull GTRecipe recipe) {
return OverclockCalculator.ofNoOverclock(recipe)
.setEUtDiscount(1.33 * tierMachine)
.setSpeedBoost(1.5 / tierMachine);
.setEUtDiscount(1.25 * tierMachine)
.setSpeedBoost(1.6 / tierMachine);
}
}.setMaxParallelSupplier(this::getMaxParallelRecipes);
}
Expand All @@ -321,11 +321,11 @@ public int getTierRecipes() {
protected MultiblockTooltipBuilder createTooltip() {
MultiblockTooltipBuilder tt = new MultiblockTooltipBuilder();
tt.addMachineType(getMachineType())
.addInfo("Controller Block for the Steam Forge Hammer")
.addInfo("33.3% faster than the single block Steam Forge Hammer")
.addInfo("Uses only 66.6% of the steam/s that the single block Forge Hammer uses")
.addInfo("Processes 8x parallel")
.addInfo("Steel tier produces at twice the speed but with twice the steam consumption")
.addInfo("Controller Block for the Steam Presser")
.addInfo("25% faster than using single block steam machines of the same pressure")
.addInfo("Only consumes steam at 62.5% of the L/s normally required")
.addInfo("Processes up to 8 items at once")
.addInfo("Processing Speed & Steam Consumption is doubled under High Pressure")
.addSeparator()
.beginStructureBlock(6, 5, 5, false)
.addInputBus(EnumChatFormatting.GOLD + "1" + EnumChatFormatting.GRAY + " Any casing", 1)
Expand All @@ -337,12 +337,12 @@ protected MultiblockTooltipBuilder createTooltip() {
+ EnumChatFormatting.GRAY
+ " Any casing")
.addStructureInfo("")
.addStructureInfo(EnumChatFormatting.BLUE + "Tier " + EnumChatFormatting.DARK_PURPLE + 1)
.addStructureInfo(EnumChatFormatting.BLUE + "Basic " + EnumChatFormatting.DARK_PURPLE + "Tier")
.addStructureInfo(EnumChatFormatting.GOLD + "35-39x" + EnumChatFormatting.GRAY + " Bronze Plated Bricks")
.addStructureInfo(EnumChatFormatting.GOLD + "2x" + EnumChatFormatting.GRAY + " Bronze Pipe Casing")
.addStructureInfo(EnumChatFormatting.GOLD + "2x" + EnumChatFormatting.GRAY + " Iron Block")
.addStructureInfo("")
.addStructureInfo(EnumChatFormatting.BLUE + "Tier " + EnumChatFormatting.DARK_PURPLE + 2)
.addStructureInfo(EnumChatFormatting.BLUE + "High Pressure " + EnumChatFormatting.DARK_PURPLE + "Tier")
.addStructureInfo(
EnumChatFormatting.GOLD + "35-39x" + EnumChatFormatting.GRAY + " Solid Steel Machine Casing")
.addStructureInfo(EnumChatFormatting.GOLD + "2x" + EnumChatFormatting.GRAY + " Steel Pipe Casing")
Expand Down Expand Up @@ -371,10 +371,20 @@ public void getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDat
super.getWailaBody(itemStack, currenttip, accessor, config);
NBTTagCompound tag = accessor.getNBTData();

int tierMachine = tag.getInteger("tierMachine");
String tierMachineText;
if (tierMachine == 1) {
tierMachineText = "Basic";
} else if (tierMachine == 2) {
tierMachineText = "High Pressure";
} else {
tierMachineText = String.valueOf(tierMachine);
}

currenttip.add(
StatCollector.translateToLocal("GTPP.machines.tier") + ": "
+ EnumChatFormatting.YELLOW
+ tag.getInteger("tierMachine")
+ tierMachineText
+ EnumChatFormatting.RESET);
currenttip.add(
StatCollector.translateToLocal("GT5U.multiblock.curparallelism") + ": "
Expand Down
Loading

0 comments on commit 7dff0c2

Please sign in to comment.