Fixed OpenComputers integration not giving back a crafting task instance in the schedule task API. Fixes #2071

This commit is contained in:
raoulvdberge
2018-11-01 22:40:27 +01:00
parent 7570c128a3
commit 67197c8d8c
2 changed files with 3 additions and 2 deletions

View File

@@ -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 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 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 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 ### 1.6.9
- Fixed OpenComputers "unknown error" when using extract item API (raoulvdberge) - Fixed OpenComputers "unknown error" when using extract item API (raoulvdberge)

View File

@@ -117,7 +117,7 @@ public class EnvironmentNetwork extends AbstractManagedEnvironment {
return new Object[]{task.getMissing().getStacks()}; 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) { public Object[] scheduleTask(final Context context, final Arguments args) {
if (node.getNetwork() == null) { if (node.getNetwork() == null) {
return new Object[]{"not connected"}; return new Object[]{"not connected"};
@@ -137,7 +137,7 @@ public class EnvironmentNetwork extends AbstractManagedEnvironment {
node.getNetwork().getCraftingManager().add(task); 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.") @Callback(doc = "function(stack:table):number -- Cancels a task and returns the amount of tasks cancelled.")