Skip to content

Commit

Permalink
Change various Steam Bus elements (#2722)
Browse files Browse the repository at this point in the history
  • Loading branch information
krossgg authored Jan 12, 2025
1 parent ca36d7f commit 23aa243
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 21 deletions.
4 changes: 2 additions & 2 deletions src/generated/resources/assets/gtceu/lang/en_ud.json
Original file line number Diff line number Diff line change
Expand Up @@ -1085,12 +1085,12 @@
"block.gtceu.steam_casing_steel": "ןןnH ןǝǝʇS",
"block.gtceu.steam_casing_steel.tooltip": "sǝuıɥɔɐW ɯɐǝʇS pǝʌoɹdɯı ɹoℲㄥ§",
"block.gtceu.steam_grinder": "ɹǝpuıɹ⅁ ɯɐǝʇS",
"block.gtceu.steam_input_bus": ")ɯɐǝʇS( snᗺ ʇnduI",
"block.gtceu.steam_input_bus": "snᗺ ʇnduI ɯɐǝʇS",
"block.gtceu.steam_input_hatch": "ɥɔʇɐH ʇnduI ɯɐǝʇS",
"block.gtceu.steam_large_turbine": "ǝuıqɹn⟘ ɯɐǝʇS ǝbɹɐꞀ",
"block.gtceu.steam_liquid_boiler.bronze": "ɹǝןıoᗺ pınbıꞀ ɯɐǝʇS ןןɐɯS",
"block.gtceu.steam_machine_casing": "buısɐƆ ǝuıɥɔɐW ɯɐǝʇS",
"block.gtceu.steam_output_bus": ")ɯɐǝʇS( snᗺ ʇndʇnO",
"block.gtceu.steam_output_bus": "snᗺ ʇndʇnO ɯɐǝʇS",
"block.gtceu.steam_oven": "uǝʌO ɯɐǝʇS",
"block.gtceu.steam_solid_boiler.bronze": "ɹǝןıoᗺ pıןoS ɯɐǝʇS ןןɐɯS",
"block.gtceu.steel_brick_casing": "buısɐƆ uoɹI ʇɥbnoɹM pǝʞɔıɹᗺ",
Expand Down
4 changes: 2 additions & 2 deletions src/generated/resources/assets/gtceu/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -1085,12 +1085,12 @@
"block.gtceu.steam_casing_steel": "Steel Hull",
"block.gtceu.steam_casing_steel.tooltip": "§7For improved Steam Machines",
"block.gtceu.steam_grinder": "Steam Grinder",
"block.gtceu.steam_input_bus": "Input Bus (Steam)",
"block.gtceu.steam_input_bus": "Steam Input Bus",
"block.gtceu.steam_input_hatch": "Steam Input Hatch",
"block.gtceu.steam_large_turbine": "Large Steam Turbine",
"block.gtceu.steam_liquid_boiler.bronze": "Small Steam Liquid Boiler",
"block.gtceu.steam_machine_casing": "Steam Machine Casing",
"block.gtceu.steam_output_bus": "Output Bus (Steam)",
"block.gtceu.steam_output_bus": "Steam Output Bus",
"block.gtceu.steam_oven": "Steam Oven",
"block.gtceu.steam_solid_boiler.bronze": "Small Steam Solid Boiler",
"block.gtceu.steel_brick_casing": "Bricked Wrought Iron Casing",
Expand Down
18 changes: 10 additions & 8 deletions src/main/java/com/gregtechceu/gtceu/common/data/GTMachines.java
Original file line number Diff line number Diff line change
Expand Up @@ -649,9 +649,7 @@ public class GTMachines {
(tier, builder) -> builder
.langValue(VNF[tier] + " Input Bus")
.rotationState(RotationState.ALL)
.abilities(
tier == 0 ? new PartAbility[] { PartAbility.IMPORT_ITEMS, PartAbility.STEAM_IMPORT_ITEMS } :
new PartAbility[] { PartAbility.IMPORT_ITEMS })
.abilities(PartAbility.IMPORT_ITEMS)
.overlayTieredHullRenderer("item_bus.import")
.tooltips(Component.translatable("gtceu.machine.item_bus.import.tooltip"),
Component.translatable("gtceu.universal.tooltip.item_storage_capacity",
Expand All @@ -664,9 +662,7 @@ public class GTMachines {
(tier, builder) -> builder
.langValue(VNF[tier] + " Output Bus")
.rotationState(RotationState.ALL)
.abilities(
tier == 0 ? new PartAbility[] { PartAbility.EXPORT_ITEMS, PartAbility.STEAM_EXPORT_ITEMS } :
new PartAbility[] { PartAbility.EXPORT_ITEMS })
.abilities(PartAbility.EXPORT_ITEMS)
.overlayTieredHullRenderer("item_bus.export")
.tooltips(Component.translatable("gtceu.machine.item_bus.export.tooltip"),
Component.translatable("gtceu.universal.tooltip.item_storage_capacity",
Expand Down Expand Up @@ -868,15 +864,21 @@ public class GTMachines {
.rotationState(RotationState.ALL)
.abilities(PartAbility.STEAM_IMPORT_ITEMS)
.overlaySteamHullRenderer("item_bus.import")
.langValue("Input Bus (Steam)")
.langValue("Steam Input Bus")
.tooltips(Component.translatable("gtceu.machine.item_bus.import.tooltip"),
Component.translatable("gtceu.machine.steam_bus.tooltip"),
Component.translatable("gtceu.universal.tooltip.item_storage_capacity", 4))
.register();

public static final MachineDefinition STEAM_EXPORT_BUS = REGISTRATE
.machine("steam_output_bus", holder -> new SteamItemBusPartMachine(holder, OUT))
.rotationState(RotationState.ALL)
.abilities(PartAbility.STEAM_EXPORT_ITEMS)
.overlaySteamHullRenderer("item_bus.export")
.langValue("Output Bus (Steam)")
.langValue("Steam Output Bus")
.tooltips(Component.translatable("gtceu.machine.item_bus.export.tooltip"),
Component.translatable("gtceu.machine.steam_bus.tooltip"),
Component.translatable("gtceu.universal.tooltip.item_storage_capacity", 4))
.register();

public static final MachineDefinition STEAM_HATCH = REGISTRATE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,11 @@

public class SteamItemBusPartMachine extends ItemBusPartMachine {

private final String autoTooltipKey;

public SteamItemBusPartMachine(IMachineBlockEntity holder, IO io, Object... args) {
super(holder, 1, io, args);
autoTooltipKey = io == IO.IN ? "gtceu.gui.item_auto_input.tooltip" : "gtceu.gui.item_auto_output.tooltip";
}

@NotNull
Expand All @@ -27,24 +30,24 @@ public ModularUI createUI(@NotNull Player entityPlayer) {
int rowSize = (int) Math.sqrt(getInventorySize());
int xOffset = rowSize == 10 ? 9 : 0;
var modular = new ModularUI(176 + xOffset * 2,
18 + 18 * rowSize + 94, this, entityPlayer)
18 + 18 * rowSize + 105, this, entityPlayer)
.background(GuiTextures.BACKGROUND_STEAM.get(ConfigHolder.INSTANCE.machines.steelSteamMultiblocks))
.widget(new LabelWidget(10, 5, getBlockState().getBlock().getDescriptionId()))
.widget(new ToggleButtonWidget(2, 18 + 18 * rowSize + 12 - 20, 18, 18,
GuiTextures.BUTTON_ITEM_OUTPUT, this::isWorkingEnabled, this::setWorkingEnabled) // todo
// steamify?
.setShouldUseBaseBackground()
.setTooltipText("gtceu.gui.item_auto_input.tooltip"))
.widget(new ToggleButtonWidget(7 + xOffset, 18 + 18 * rowSize, 18, 18,
GuiTextures.BUTTON_ITEM_OUTPUT, this::isWorkingEnabled, this::setWorkingEnabled)
.setShouldUseBaseBackground() // TODO: Steamify background
.setTooltipText(autoTooltipKey))
.widget(UITemplate.bindPlayerInventory(entityPlayer.getInventory(),
GuiTextures.SLOT_STEAM.get(ConfigHolder.INSTANCE.machines.steelSteamMultiblocks),
7 + xOffset, 18 + 18 * rowSize + 12, true));
7 + xOffset, 18 + 18 * rowSize + 24, true));

for (int y = 0; y < rowSize; y++) {
for (int x = 0; x < rowSize; x++) {
int index = y * rowSize + x;
modular.widget(new SlotWidget(getInventory().storage, index,
(88 - rowSize * 9 + x * 18) + xOffset, 18 + y * 18, true, io.support(IO.IN))
.setBackgroundTexture(GuiTextures.SLOT));
(88 - rowSize * 9 + x * 18) + xOffset, 18 + y * 18 + 6, true, io.support(IO.IN))
.setBackgroundTexture(
GuiTextures.SLOT_STEAM.get(ConfigHolder.INSTANCE.machines.steelSteamMultiblocks)));
}
}

Expand Down

0 comments on commit 23aa243

Please sign in to comment.