Add tooltip when crafting task is not started yet
This commit is contained in:
@@ -139,6 +139,7 @@ public class GuiCraftingMonitor extends GuiBase {
|
||||
.replace("{missing_items}", t("gui.refinedstorage:crafting_monitor.missing_items"))
|
||||
.replace("{items_crafting}", t("gui.refinedstorage:crafting_monitor.items_crafting"))
|
||||
.replace("{items_processing}", t("gui.refinedstorage:crafting_monitor.items_processing"))
|
||||
.replace("{not_started_yet}", t("gui.refinedstorage:crafting_monitor.not_started_yet"))
|
||||
.replace("{none}", t("misc.refinedstorage:none")));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@ public class BasicCraftingTask implements ICraftingTask {
|
||||
private boolean checked[];
|
||||
private boolean childTasks[];
|
||||
private List<ItemStack> itemsTook = new ArrayList<ItemStack>();
|
||||
private boolean updatedOnce;
|
||||
|
||||
public BasicCraftingTask(CraftingPattern pattern) {
|
||||
this.pattern = pattern;
|
||||
@@ -51,6 +52,8 @@ public class BasicCraftingTask implements ICraftingTask {
|
||||
}
|
||||
|
||||
public boolean update(TileController controller) {
|
||||
this.updatedOnce = true;
|
||||
|
||||
boolean done = true;
|
||||
|
||||
for (int i = 0; i < pattern.getInputs().length; ++i) {
|
||||
@@ -123,6 +126,10 @@ public class BasicCraftingTask implements ICraftingTask {
|
||||
|
||||
@Override
|
||||
public String getInfo() {
|
||||
if (!updatedOnce) {
|
||||
return "{not_started_yet}";
|
||||
}
|
||||
|
||||
StringBuilder builder = new StringBuilder();
|
||||
|
||||
builder.append(TextFormatting.YELLOW).append("{missing_items}").append(TextFormatting.RESET).append("\n");
|
||||
|
||||
@@ -21,6 +21,7 @@ public class ProcessingCraftingTask implements ICraftingTask {
|
||||
private boolean inserted[];
|
||||
private boolean childTasks[];
|
||||
private boolean satisfied[];
|
||||
private boolean updatedOnce;
|
||||
|
||||
public ProcessingCraftingTask(CraftingPattern pattern) {
|
||||
this.pattern = pattern;
|
||||
@@ -43,6 +44,8 @@ public class ProcessingCraftingTask implements ICraftingTask {
|
||||
|
||||
@Override
|
||||
public boolean update(TileController controller) {
|
||||
this.updatedOnce = true;
|
||||
|
||||
TileCrafter crafter = pattern.getCrafter(controller.getWorld());
|
||||
IItemHandler handler = RefinedStorageUtils.getItemHandler(crafter.getFacingTile(), crafter.getDirection().getOpposite());
|
||||
|
||||
@@ -123,6 +126,10 @@ public class ProcessingCraftingTask implements ICraftingTask {
|
||||
|
||||
@Override
|
||||
public String getInfo() {
|
||||
if (!updatedOnce) {
|
||||
return "{not_started_yet}";
|
||||
}
|
||||
|
||||
StringBuilder builder = new StringBuilder();
|
||||
|
||||
builder.append(TextFormatting.YELLOW).append("{missing_items}").append(TextFormatting.RESET).append("\n");
|
||||
|
||||
Reference in New Issue
Block a user