From 67197c8d8ccd386b0124cc77f1e9b3794983e01f Mon Sep 17 00:00:00 2001 From: raoulvdberge Date: Thu, 1 Nov 2018 22:40:27 +0100 Subject: [PATCH] Fixed OpenComputers integration not giving back a crafting task instance in the schedule task API. Fixes #2071 --- CHANGELOG.md | 1 + .../refinedstorage/integration/oc/EnvironmentNetwork.java | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cd4be144a..f72c81785 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ - Fixed fluid inputs/outputs in the Pattern Grid not being set when you re-insert a Pattern with fluid inputs/outputs (raoulvdberge) - Fixed bug where the Pattern Grid doesn't update it's output slot when manually configuring a crafting pattern (raoulvdberge) - Fixed network node scanning allowing multiple controllers in some cases (raoulvdberge) +- Fixed OpenComputers integration not giving back a crafting task instance in the schedule task API (raoulvdberge) ### 1.6.9 - Fixed OpenComputers "unknown error" when using extract item API (raoulvdberge) diff --git a/src/main/java/com/raoulvdberge/refinedstorage/integration/oc/EnvironmentNetwork.java b/src/main/java/com/raoulvdberge/refinedstorage/integration/oc/EnvironmentNetwork.java index efecba64f..bb211f7f6 100644 --- a/src/main/java/com/raoulvdberge/refinedstorage/integration/oc/EnvironmentNetwork.java +++ b/src/main/java/com/raoulvdberge/refinedstorage/integration/oc/EnvironmentNetwork.java @@ -117,7 +117,7 @@ public class EnvironmentNetwork extends AbstractManagedEnvironment { return new Object[]{task.getMissing().getStacks()}; } - @Callback(doc = "function(stack:table[, count: number]) -- Schedules a crafting task.") + @Callback(doc = "function(stack:table[, count: number]):table -- Schedules a crafting task.") public Object[] scheduleTask(final Context context, final Arguments args) { if (node.getNetwork() == null) { return new Object[]{"not connected"}; @@ -137,7 +137,7 @@ public class EnvironmentNetwork extends AbstractManagedEnvironment { node.getNetwork().getCraftingManager().add(task); } - return new Object[]{}; + return new Object[]{task}; } @Callback(doc = "function(stack:table):number -- Cancels a task and returns the amount of tasks cancelled.")