extend level maintainer feedback (#316)

Co-authored-by: Nikolay S. <[email protected]>
Co-authored-by: Maya <[email protected]>
This commit is contained in:
authored and GitHub committed 2025-07-05 15:53:35 +00:00
1 parent 22b73f9fbf
commit 8267150fa6
6 files changed
+34 -8

No files matched your search

@@ -5,5 +5,7 @@ public enum LevelState {
Idle,
Craft,
Export,
Error
Error,
NotFound,
CantCraft
}
@@ -474,6 +474,18 @@ public class GuiLevelMaintainer extends AEBaseGui implements INEIGuiHandler {
NameConst.i18n(NameConst.TT_LEVEL_MAINTAINER_CURRENT) + " "
+ NameConst.i18n(NameConst.TT_LEVEL_MAINTAINER_ERROR));
}
case NotFound -> {
this.line.setColor(FCGuiColors.StateError.getColor());
message.add(
NameConst.i18n(NameConst.TT_LEVEL_MAINTAINER_CURRENT) + " "
+ NameConst.i18n(NameConst.TT_LEVEL_MAINTAINER_NOT_FOUND));
}
case CantCraft -> {
this.line.setColor(FCGuiColors.StateError.getColor());
message.add(
NameConst.i18n(NameConst.TT_LEVEL_MAINTAINER_CURRENT) + " "
+ NameConst.i18n(NameConst.TT_LEVEL_MAINTAINER_CANT_CRAFT));
}
default -> {
this.line.setColor(FCGuiColors.StateNone.getColor());
message.add(
@@ -490,7 +502,11 @@ public class GuiLevelMaintainer extends AEBaseGui implements INEIGuiHandler {
message.add(NameConst.i18n(NameConst.TT_LEVEL_MAINTAINER_EXPORT));
message.add(NameConst.i18n(NameConst.TT_LEVEL_MAINTAINER_EXPORT_DESC) + "\n");
message.add(NameConst.i18n(NameConst.TT_LEVEL_MAINTAINER_ERROR));
message.add(NameConst.i18n(NameConst.TT_LEVEL_MAINTAINER_ERROR_DESC));
message.add(NameConst.i18n(NameConst.TT_LEVEL_MAINTAINER_ERROR_DESC) + "\n");
message.add(NameConst.i18n(NameConst.TT_LEVEL_MAINTAINER_NOT_FOUND));
message.add(NameConst.i18n(NameConst.TT_LEVEL_MAINTAINER_NOT_FOUND_DESC) + "\n");
message.add(NameConst.i18n(NameConst.TT_LEVEL_MAINTAINER_CANT_CRAFT));
message.add(NameConst.i18n(NameConst.TT_LEVEL_MAINTAINER_CANT_CRAFT_DESC));
} else {
message.add(NameConst.i18n(NameConst.TT_SHIFT_FOR_MORE));
}
@@ -577,7 +577,7 @@ public class GuiLevelTerminal extends FCBaseMEGui implements IDropToFillTextFiel
case Idle -> FCGuiColors.StateIdle.getColor();
case Craft -> FCGuiColors.StateCraft.getColor();
case Export -> FCGuiColors.StateExport.getColor();
case Error -> FCGuiColors.StateError.getColor();
case Error, NotFound, CantCraft -> FCGuiColors.StateError.getColor();
case None -> FCGuiColors.StateNone.getColor();
};
int offset = 0;
@@ -104,7 +104,7 @@ public class TileLevelMaintainer extends AENetworkTile
if (idx == -1) {
AELog.warn("Invalid crafting link: " + link);
return items;
} ;
}
try {
if (getProxy().isActive()) {
final IEnergyGrid energy = getProxy().getEnergy();
@@ -227,7 +227,7 @@ public class TileLevelMaintainer extends AENetworkTile
this.updateLink(i, null);
}
if (!isCraftable) {
updateState(i, LevelState.Error);
updateState(i, LevelState.NotFound);
}
}
@@ -278,7 +278,7 @@ public class TileLevelMaintainer extends AENetworkTile
this.updateState(jobToSubmitIdx, LevelState.Craft);
this.updateLink(jobToSubmitIdx, link);
} else {
this.updateState(jobToSubmitIdx, LevelState.Error);
this.updateState(jobToSubmitIdx, LevelState.CantCraft);
}
} else if (itemToBegin != null) {
// No jobs to submit, start calculating some item.
@@ -93,6 +93,10 @@ public class NameConst {
public static final String TT_LEVEL_MAINTAINER_EXPORT_DESC = TT_LEVEL_MAINTAINER + "export_desc";
public static final String TT_LEVEL_MAINTAINER_ERROR = TT_LEVEL_MAINTAINER + "error";
public static final String TT_LEVEL_MAINTAINER_ERROR_DESC = TT_LEVEL_MAINTAINER + "error_desc";
public static final String TT_LEVEL_MAINTAINER_NOT_FOUND = TT_LEVEL_MAINTAINER + "not_found";
public static final String TT_LEVEL_MAINTAINER_NOT_FOUND_DESC = TT_LEVEL_MAINTAINER + "not_found_desc";
public static final String TT_LEVEL_MAINTAINER_CANT_CRAFT = TT_LEVEL_MAINTAINER + "cant_craft";
public static final String TT_LEVEL_MAINTAINER_CANT_CRAFT_DESC = TT_LEVEL_MAINTAINER + "cant_craft_desc";
public static final String TT_CELL_CONTENTS = TT_KEY + "cell_contents";
public static final String TT_CELL_EMPTY = TT_KEY + "cell_empty";
public static final String TT_CELL_PORTABLE = TT_KEY + "cell_portable";