Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix pipe help tooltip to include sneak key #896

Merged
merged 1 commit into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1649,7 +1649,7 @@
"text.modern_industrialization.PipeConnectionTooltipExtractOnly": "Extract only",
"text.modern_industrialization.PipeConnectionTooltipInsertOnly": "Insert only",
"text.modern_industrialization.PipeConnectionTooltipInsertOrExtract": "Insert or Extract",
"text.modern_industrialization.PipeHelp1": "Can be instantly retrieved by pressing %s with any Wrench.",
"text.modern_industrialization.PipeHelp1": "Can be instantly retrieved by pressing %s + %s with any Wrench.",
"text.modern_industrialization.PipeHelp2": "Use %s + %s to connect directly the pipe to the target block.",
"text.modern_industrialization.PriorityExtract": "Extract priority: %d",
"text.modern_industrialization.PriorityInsert": "Insert priority: %d",
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/aztech/modern_industrialization/MIText.java
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ public enum MIText {
PipeConnectionTooltipExtractOnly("Extract only"),
PipeConnectionTooltipInsertOnly("Insert only"),
PipeConnectionTooltipInsertOrExtract("Insert or Extract"),
PipeHelp1("Can be instantly retrieved by pressing %s with any Wrench."),
PipeHelp1("Can be instantly retrieved by pressing %s + %s with any Wrench."),
PipeHelp2("Use %s + %s to connect directly the pipe to the target block."),
PriorityExtract("Extract priority: %d"),
PriorityInsert("Insert priority: %d"),
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/aztech/modern_industrialization/MITooltips.java
Original file line number Diff line number Diff line change
Expand Up @@ -413,10 +413,10 @@ public Component parse(Double ratio) {
: Optional.of(new Line(MIText.MachineCasingVoltage).arg(Component.translatable(tier.shortEnglishKey())).build());
});

public static final TooltipAttachment TRASH_CAN_HELP = TooltipAttachment.ofMultilines(
public static final TooltipAttachment PIPE_HELP = TooltipAttachment.ofMultilines(
(itemStack, item) -> {
return (item instanceof PipeItem pipe && (pipe.isItemPipe() || pipe.isFluidPipe())) ? Optional.of(List.of(
line(MIText.PipeHelp1).arg("use", KEYBIND_PARSER).build(),
line(MIText.PipeHelp1).arg("sneak", KEYBIND_PARSER).arg("use", KEYBIND_PARSER).build(),
line(MIText.PipeHelp2).arg("sneak", KEYBIND_PARSER).arg("use", KEYBIND_PARSER).build())) : Optional.empty();
});

Expand Down
Loading