Skip to content

Commit

Permalink
Add OpenComputers functions for maintenance problems (GregTechCEu#2356)
Browse files Browse the repository at this point in the history
  • Loading branch information
serenibyss authored Jan 30, 2024
1 parent f670d7e commit 2b1a619
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -152,5 +152,10 @@ public Object[] getInputTank(final Context context, final Arguments args) {
public Object[] getOutputTank(final Context context, final Arguments args) {
return getTank(tileEntity.getOutputFluidInventory());
}

@Callback(doc = "function():number -- Gets the number of maintenance problems.")
public Object[] getMaintenanceProblems(final Context context, final Arguments args) {
return new Object[] { tileEntity.getNumMaintenanceProblems() };
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -72,5 +72,10 @@ public Object[] getAverageInLastSec(final Context context, final Arguments args)
public Object[] getAverageOutLastSec(final Context context, final Arguments args) {
return new Object[] { tileEntity.getAverageOutLastSec() };
}

@Callback(doc = "function():number -- Gets the number of maintenance problems.")
public Object[] getMaintenanceProblems(final Context context, final Arguments args) {
return new Object[] { tileEntity.getNumMaintenanceProblems() };
}
}
}

0 comments on commit 2b1a619

Please sign in to comment.