public override WorkCanvasInfo GetCanvasData() { WorkCanvasInfo info = new WorkCanvasInfo(); info.title = name; string text = "Items in the import:\n\n"; int i = 1; foreach (var import in items) { text += "Import " + i + ":\n"; if (import.item == null) { text += "Empty import.\n\n"; } else { text += import.item.name; if (!import.infinite) { text += " " + import.itemCount + "/" + import.maxItems + "\n\n"; } } i++; } info.text = text; return(info); }
public override WorkCanvasInfo GetCanvasData() { WorkCanvasInfo info = new WorkCanvasInfo(); info.title = name; string text = "Items in the processor:\n\n"; var pipe = pipeline; text += "Pipe:\n"; text += "Item: "; if (pipe.input != null) { text += pipe.input.data.name + " " + pipe.inputAmount.ToString("#.##") + "/" + pipe.maxInputAmount.ToString("#.##"); if (pipe.input.data.rottable) { text += " - time to rot " + (pipe.spoilageTimer - Time.time).ToString("#"); } } else { text += "None - place for " + pipe.maxInputAmount.ToString("#.##"); } text += "\n\n"; info.text = text; return(info); }
public override WorkCanvasInfo GetCanvasData() { WorkCanvasInfo info = new WorkCanvasInfo(); info.title = name; string text = "Items in the " + name + ":\n\n"; int i = 1; foreach (var shelf in items) { text += "Shelf " + i + ":\n"; if (shelf.item == null) { text += "Empty shelf. Fits up to " + shelf.maxItems + " items.\n\n"; } else { text += shelf.item.name; if (!shelf.infinite) { text += " " + shelf.itemCount + "/" + shelf.maxItems + "\n\n"; } } i++; } info.text = text; return(info); }
public override WorkCanvasInfo GetCanvasData() { WorkCanvasInfo info = new WorkCanvasInfo(); info.title = name; string text = ""; switch (orderStatus) { case OrderStatus.Arrived: text += "Waiting for food menu.\n\n"; text += "Patience: " + (patience - Time.time).ToString("##"); break; case OrderStatus.Deciding: text += "Still deciding.\n\n"; text += "Progress: " + (Mathf.InverseLerp(timeStarted, timeRemaining, Time.time) * 100).ToString("###") + "%"; break; case OrderStatus.Eating: text += "Eating.\n\n"; text += "Progress: " + (Mathf.InverseLerp(timeStarted, timeRemaining, Time.time) * 100).ToString("###") + "%"; break; case OrderStatus.Decided: text += "Ready to provide order.\n\n"; text += "Patience: " + (patience - Time.time).ToString("##"); break; case OrderStatus.Taken: text += "Customers:\n\n"; foreach (var customer in customers) { if (customer != null && !customer.orderSatisfied) { text += "Wants " + customer.order.items[0].name + ".\n"; } } text += "\nPatience: " + (patience - Time.time).ToString("##"); break; case OrderStatus.Paying: text += "Ready to pay.\n\n"; text += "Patience: " + (patience - Time.time).ToString("##"); break; } info.text = text; return(info); }
public override WorkCanvasInfo GetCanvasData() { WorkCanvasInfo info = new WorkCanvasInfo(); info.title = name; string text = "Items in the processor:\n\n"; if (pipeline.craftingCoroutine != null) { text += "Crafting " + pipeline.recipe.recipe.output[0].item.name + ":\n\n"; text += "Progress: " + (pipeline.GetCraftingPercentageDone() * 100).ToString("#") + "%\n\n"; } else { text += "Input Items:\n"; foreach (var item in pipeline.input) { text += item.data.name; if (item.data.rottable) { text += " - time to rot " + (((Item)item).spoilageTime - Time.time).ToString("#"); } text += "\n"; } text += "\nOutput Items:\n"; foreach (var item in pipeline.output) { text += item.data.name; if (item.data.rottable) { text += " - time to rot " + (((Item)item).spoilageTime - Time.time).ToString("#"); } text += "\n"; } } info.text = text; return(info); }
public override WorkCanvasInfo GetCanvasData() { WorkCanvasInfo info = new WorkCanvasInfo(); info.title = name; string text = "Items in the processor:\n\n"; for (int i = 0; i < pipeline.Length; i++) { var pipe = pipeline[i]; var temp = i; text += "Pipe " + (temp + 1) + ":\n"; if (pipe.craftingCoroutine != null) { text += pipe.input.data.name + " --> " + pipe.recipe.recipe.output[0].item.name + " " + (pipe.GetCraftingPercentageDone() * 100).ToString("#") + "%\n\n"; } else { text += "Item: "; if (pipe.input != null) { text += pipe.input.data.name; if (pipe.input is Item item && item.data.rottable) { text += " - time to rot " + (item.spoilageTime - Time.time).ToString("#"); } } else { text += "None"; } text += "\n\n"; } } info.text = text; return info; }
public override WorkCanvasInfo GetCanvasData() { WorkCanvasInfo info = new WorkCanvasInfo(); info.title = name; string text = ""; if (infinite) { text = "Can accept any number of trash."; } else { text = "Garbage can fullness: " + currentFullness + "/" + maxFullness + "\n\n"; text += "Items in garbage:\n\n"; if (thrownItems.Count == 0) { text += "Nothing."; } else if (thrownItems.Count == 1) { text += thrownItems[0] + "."; } else { for (int i = 0; i < thrownItems.Count - 1; i++) { text += thrownItems[i] + ", "; } text += thrownItems[thrownItems.Count - 1] + "."; } } info.text = text; return(info); }
public override WorkCanvasInfo GetCanvasData() { WorkCanvasInfo info = new WorkCanvasInfo(); info.title = name; string text = "Items on the pult:\n\n"; int i = 1; foreach (var item in items) { text += "Location " + i + ":\n"; if (item == null) { text += "Empty Location.\n\n"; } else { text += item.data.name; if (palette) { text += " - " + ((Package)item).itemsCount + " items in package."; } if (item.data.rottable) { text += " - time to rot " + (((Item)item).spoilageTime - Time.time).ToString("#"); } text += "\n\n"; } i++; } info.text = text; return(info); }