Updated OpenComputers LUA to be direct calls, same as ComputerCraft

This commit is contained in:
Unknown 2019-09-16 10:34:10 +02:00 committed by unknown
parent 85fcb23b7d
commit 3ebd225c6a
25 changed files with 87 additions and 87 deletions

View file

@ -97,13 +97,13 @@ public abstract class TileEntityAbstractEnergyBase extends TileEntityAbstractMac
public abstract Object[] getEnergyStatus();
// OpenComputers callback methods
@Callback
@Callback(direct = true)
@Optional.Method(modid = "opencomputers")
public Object[] energyDisplayUnits(final Context context, final Arguments arguments) {
return energyDisplayUnits(OC_convertArgumentsAndLogCall(context, arguments));
}
@Callback
@Callback(direct = true)
@Optional.Method(modid = "opencomputers")
public Object[] getEnergyStatus(final Context context, final Arguments arguments) {
OC_convertArgumentsAndLogCall(context, arguments);

View file

@ -33,7 +33,7 @@ public abstract class TileEntityAbstractEnergyConsumer extends TileEntityAbstrac
public abstract Object[] getEnergyRequired();
// OpenComputers callback methods
@Callback
@Callback(direct = true)
@Optional.Method(modid = "opencomputers")
public Object[] getEnergyRequired(final Context context, final Arguments arguments) {
OC_convertArgumentsAndLogCall(context, arguments);

View file

@ -647,35 +647,35 @@ public abstract class TileEntityAbstractInterfaced extends TileEntityAbstractBas
}
// OpenComputers methods
@Callback
@Callback(direct = true)
@Optional.Method(modid = "opencomputers")
public Object[] isInterfaced(final Context context, final Arguments arguments) {
OC_convertArgumentsAndLogCall(context, arguments);
return isInterfaced();
}
@Callback
@Callback(direct = true)
@Optional.Method(modid = "opencomputers")
public Object[] getLocalPosition(final Context context, final Arguments arguments) {
OC_convertArgumentsAndLogCall(context, arguments);
return getLocalPosition();
}
@Callback
@Callback(direct = true)
@Optional.Method(modid = "opencomputers")
public Object[] getUpgrades(final Context context, final Arguments arguments) {
OC_convertArgumentsAndLogCall(context, arguments);
return getUpgrades();
}
@Callback
@Callback(direct = true)
@Optional.Method(modid = "opencomputers")
public Object[] getTier(final Context context, final Arguments arguments) {
OC_convertArgumentsAndLogCall(context, arguments);
return getTier();
}
@Callback
@Callback(direct = true)
@Optional.Method(modid = "opencomputers")
public Object[] getVersion(final Context context, final Arguments arguments) {
OC_convertArgumentsAndLogCall(context, arguments);

View file

@ -227,21 +227,21 @@ public abstract class TileEntityAbstractLaser extends TileEntityAbstractEnergyBa
}
// OpenComputers callback methods
@Callback
@Callback(direct = true)
@Optional.Method(modid = "opencomputers")
public Object[] getEnergyRequired(final Context context, final Arguments arguments) {
OC_convertArgumentsAndLogCall(context, arguments);
return getEnergyRequired();
}
@Callback
@Callback(direct = true)
@Optional.Method(modid = "opencomputers")
public Object[] laserMediumDirection(final Context context, final Arguments arguments) {
OC_convertArgumentsAndLogCall(context, arguments);
return laserMediumDirection();
}
@Callback
@Callback(direct = true)
@Optional.Method(modid = "opencomputers")
public Object[] laserMediumCount(final Context context, final Arguments arguments) {
OC_convertArgumentsAndLogCall(context, arguments);

View file

@ -264,19 +264,19 @@ public abstract class TileEntityAbstractMachine extends TileEntityAbstractInterf
}
// OpenComputers callback methods
@Callback
@Callback(direct = true)
@Optional.Method(modid = "opencomputers")
public Object[] name(final Context context, final Arguments arguments) {
return name(OC_convertArgumentsAndLogCall(context, arguments));
}
@Callback
@Callback(direct = true)
@Optional.Method(modid = "opencomputers")
public Object[] enable(final Context context, final Arguments arguments) {
return enable(OC_convertArgumentsAndLogCall(context, arguments));
}
@Callback
@Callback(direct = true)
@Optional.Method(modid = "opencomputers")
public Object[] getAssemblyStatus(final Context context, final Arguments arguments) {
OC_convertArgumentsAndLogCall(context, arguments);

View file

@ -201,13 +201,13 @@ public class TileEntityChunkLoader extends TileEntityAbstractChunkLoading {
}
// OpenComputers callback methods
@Callback
@Callback(direct = true)
@Optional.Method(modid = "opencomputers")
public Object[] bounds(final Context context, final Arguments arguments) {
return bounds(OC_convertArgumentsAndLogCall(context, arguments));
}
@Callback
@Callback(direct = true)
@Optional.Method(modid = "opencomputers")
public Object[] radius(final Context context, final Arguments arguments) {
return radius(OC_convertArgumentsAndLogCall(context, arguments));

View file

@ -749,19 +749,19 @@ public class TileEntityLaser extends TileEntityAbstractLaser implements IBeamFre
}
// OpenComputers callback methods
@Callback
@Callback(direct = true)
@Optional.Method(modid = "opencomputers")
public Object[] emitBeam(final Context context, final Arguments arguments) {
return emitBeam(OC_convertArgumentsAndLogCall(context, arguments));
}
@Callback
@Callback(direct = true)
@Optional.Method(modid = "opencomputers")
public Object[] beamFrequency(final Context context, final Arguments arguments) {
return beamFrequency(OC_convertArgumentsAndLogCall(context, arguments));
}
@Callback
@Callback(direct = true)
@Optional.Method(modid = "opencomputers")
public Object[] getScanResult(final Context context, final Arguments arguments) {
OC_convertArgumentsAndLogCall(context, arguments);

View file

@ -146,7 +146,7 @@ public class TileEntitySecurityStation extends TileEntityAbstractMachine impleme
}
// OpenComputers callback methods
@Callback
@Callback(direct = true)
@Optional.Method(modid = "opencomputers")
public Object[] getAttachedPlayers(final Context context, final Arguments arguments) {
OC_convertArgumentsAndLogCall(context, arguments);

View file

@ -154,13 +154,13 @@ public class TileEntityAcceleratorControlPoint extends TileEntityAbstractMachine
}
// OpenComputers callback methods
@Callback
@Callback(direct = true)
@Optional.Method(modid = "opencomputers")
public Object[] controlChannel(final Context context, final Arguments arguments) {
return controlChannel(OC_convertArgumentsAndLogCall(context, arguments));
}
@Callback
@Callback(direct = true)
@Optional.Method(modid = "opencomputers")
public Object[] state(final Context context, final Arguments arguments) {
OC_convertArgumentsAndLogCall(context, arguments);

View file

@ -872,53 +872,53 @@ public class TileEntityAcceleratorCore extends TileEntityAbstractEnergyCoreOrCon
}
// OpenComputer callback methods
@Callback
@Callback(direct = true)
@Optional.Method(modid = "OpenComputers")
public Object[] getControlPoints(final Context context, final Arguments arguments) {
OC_convertArgumentsAndLogCall(context, arguments);
return getControlPoints();
}
@Callback
@Callback(direct = true)
@Optional.Method(modid = "OpenComputers")
public Object[] getControlPointsCount(final Context context, final Arguments arguments) {
OC_convertArgumentsAndLogCall(context, arguments);
return getControlPointsCount();
}
@Callback
@Callback(direct = true)
@Optional.Method(modid = "OpenComputers")
public Object[] injectionPeriod(final Context context, final Arguments arguments) {
return injectionPeriod(OC_convertArgumentsAndLogCall(context, arguments));
}
@Callback
@Callback(direct = true)
@Optional.Method(modid = "OpenComputers")
public Object[] getParameters(final Context context, final Arguments arguments) {
OC_convertArgumentsAndLogCall(context, arguments);
return getParameters();
}
@Callback
@Callback(direct = true)
@Optional.Method(modid = "OpenComputers")
public Object[] getParametersControlChannels(final Context context, final Arguments arguments) {
OC_convertArgumentsAndLogCall(context, arguments);
return getParametersControlChannels();
}
@Callback
@Callback(direct = true)
@Optional.Method(modid = "OpenComputers")
public Object[] parameter(final Context context, final Arguments arguments) {
return parameter(OC_convertArgumentsAndLogCall(context, arguments));
}
@Callback
@Callback(direct = true)
@Optional.Method(modid = "OpenComputers")
public Object[] getControlPoint(final Context context, final Arguments arguments) {
return getControlPoint(OC_convertArgumentsAndLogCall(context, arguments));
}
@Callback
@Callback(direct = true)
@Optional.Method(modid = "OpenComputers")
public Object[] state(final Context context, final Arguments arguments) {
OC_convertArgumentsAndLogCall(context, arguments);

View file

@ -670,27 +670,27 @@ public class TileEntityShipScanner extends TileEntityAbstractMachine implements
}
// OpenComputers callback methods
@Callback
@Callback(direct = true)
@Optional.Method(modid = "opencomputers")
public Object[] scan(final Context context, final Arguments arguments) {
OC_convertArgumentsAndLogCall(context, arguments);
return scan();
}
@Callback
@Callback(direct = true)
@Optional.Method(modid = "opencomputers")
public Object[] filename(final Context context, final Arguments arguments) {
OC_convertArgumentsAndLogCall(context, arguments);
return filename();
}
@Callback
@Callback(direct = true)
@Optional.Method(modid = "opencomputers")
public Object[] deploy(final Context context, final Arguments arguments) {
return deploy(OC_convertArgumentsAndLogCall(context, arguments));
}
@Callback
@Callback(direct = true)
@Optional.Method(modid = "opencomputers")
public Object[] state(final Context context, final Arguments arguments) {
OC_convertArgumentsAndLogCall(context, arguments);

View file

@ -924,32 +924,32 @@ public class TileEntityLaserTreeFarm extends TileEntityAbstractMiner {
}
// OpenComputers callback methods
@Callback
@Callback(direct = true)
@Optional.Method(modid = "opencomputers")
public Object[] state(final Context context, final Arguments arguments) {
OC_convertArgumentsAndLogCall(context, arguments);
return state();
}
@Callback
@Callback(direct = true)
@Optional.Method(modid = "opencomputers")
public Object[] radius(final Context context, final Arguments arguments) {
return radius(OC_convertArgumentsAndLogCall(context, arguments));
}
@Callback
@Callback(direct = true)
@Optional.Method(modid = "opencomputers")
public Object[] breakLeaves(final Context context, final Arguments arguments) {
return breakLeaves(OC_convertArgumentsAndLogCall(context, arguments));
}
@Callback
@Callback(direct = true)
@Optional.Method(modid = "opencomputers")
public Object[] silktouch(final Context context, final Arguments arguments) {
return silktouch(OC_convertArgumentsAndLogCall(context, arguments));
}
@Callback
@Callback(direct = true)
@Optional.Method(modid = "opencomputers")
public Object[] tapTrees(final Context context, final Arguments arguments) {
return tapTrees(OC_convertArgumentsAndLogCall(context, arguments));

View file

@ -494,26 +494,26 @@ public class TileEntityMiningLaser extends TileEntityAbstractMiner {
}
// OpenComputers callback methods
@Callback
@Callback(direct = true)
@Optional.Method(modid = "opencomputers")
public Object[] state(final Context context, final Arguments arguments) {
OC_convertArgumentsAndLogCall(context, arguments);
return state();
}
@Callback
@Callback(direct = true)
@Optional.Method(modid = "opencomputers")
public Object[] offset(final Context context, final Arguments arguments) {
return offset(OC_convertArgumentsAndLogCall(context, arguments));
}
@Callback
@Callback(direct = true)
@Optional.Method(modid = "opencomputers")
public Object[] onlyOres(final Context context, final Arguments arguments) {
return onlyOres(OC_convertArgumentsAndLogCall(context, arguments));
}
@Callback
@Callback(direct = true)
@Optional.Method(modid = "opencomputers")
public Object[] silktouch(final Context context, final Arguments arguments) {
return silktouch(OC_convertArgumentsAndLogCall(context, arguments));

View file

@ -143,7 +143,7 @@ public class TileEntityCamera extends TileEntityAbstractMachine implements IVide
}
// OpenComputers callback methods
@Callback
@Callback(direct = true)
@Optional.Method(modid = "opencomputers")
public Object[] videoChannel(final Context context, final Arguments arguments) {
return videoChannel(OC_convertArgumentsAndLogCall(context, arguments));

View file

@ -104,7 +104,7 @@ public class TileEntityMonitor extends TileEntityAbstractMachine implements IVid
}
// OpenComputers callback methods
@Callback
@Callback(direct = true)
@Optional.Method(modid = "opencomputers")
public Object[] videoChannel(final Context context, final Arguments arguments) {
return videoChannel(OC_convertArgumentsAndLogCall(context, arguments));

View file

@ -256,48 +256,48 @@ public class TileEntityRadar extends TileEntityAbstractEnergyConsumer {
}
// OpenComputers callback methods
@Callback
@Callback(direct = true)
@Optional.Method(modid = "opencomputers")
public Object[] getGlobalPosition(final Context context, final Arguments arguments) {
OC_convertArgumentsAndLogCall(context, arguments);
return getGlobalPosition();
}
@Callback
@Callback(direct = true)
@Optional.Method(modid = "opencomputers")
public Object[] radius(final Context context, final Arguments arguments) {
return radius(OC_convertArgumentsAndLogCall(context, arguments));
}
@Callback
@Callback(direct = true)
@Optional.Method(modid = "opencomputers")
public Object[] getScanDuration(final Context context, final Arguments arguments) {
OC_convertArgumentsAndLogCall(context, arguments);
return getScanDuration();
}
@Callback
@Callback(direct = true)
@Optional.Method(modid = "opencomputers")
public Object[] start(final Context context, final Arguments arguments) {
OC_convertArgumentsAndLogCall(context, arguments);
return start();
}
@Callback
@Callback(direct = true)
@Optional.Method(modid = "opencomputers")
public Object[] getResults(final Context context, final Arguments arguments) {
OC_convertArgumentsAndLogCall(context, arguments);
return getResults();
}
@Callback
@Callback(direct = true)
@Optional.Method(modid = "opencomputers")
public Object[] getResultsCount(final Context context, final Arguments arguments) {
OC_convertArgumentsAndLogCall(context, arguments);
return getResultsCount();
}
@Callback
@Callback(direct = true)
@Optional.Method(modid = "opencomputers")
public Object[] getResult(final Context context, final Arguments arguments) {
return getResult(OC_convertArgumentsAndLogCall(context, arguments));

View file

@ -141,32 +141,32 @@ public class TileEntityEnanReactorController extends TileEntityAbstractEnergyCor
}
// OpenComputers callback methods
@Callback
@Callback(direct = true)
@Optional.Method(modid = "opencomputers")
public Object[] getInstabilities(final Context context, final Arguments arguments) {
OC_convertArgumentsAndLogCall(context, arguments);
return getInstabilities();
}
@Callback
@Callback(direct = true)
@Optional.Method(modid = "opencomputers")
public Object[] instabilityTarget(final Context context, final Arguments arguments) {
return instabilityTarget(OC_convertArgumentsAndLogCall(context, arguments));
}
@Callback
@Callback(direct = true)
@Optional.Method(modid = "opencomputers")
public Object[] outputMode(final Context context, final Arguments arguments) {
return outputMode(OC_convertArgumentsAndLogCall(context, arguments));
}
@Callback
@Callback(direct = true)
@Optional.Method(modid = "opencomputers")
public Object[] stabilizerEnergy(final Context context, final Arguments arguments) {
return stabilizerEnergy(OC_convertArgumentsAndLogCall(context, arguments));
}
@Callback
@Callback(direct = true)
@Optional.Method(modid = "opencomputers")
public Object[] state(final Context context, final Arguments arguments) {
OC_convertArgumentsAndLogCall(context, arguments);

View file

@ -309,13 +309,13 @@ public class TileEntityEnanReactorLaser extends TileEntityAbstractLaser implemen
}
// OpenComputers callback methods
@Callback
@Callback(direct = true)
@Optional.Method(modid = "opencomputers")
public Object[] stabilize(final Context context, final Arguments arguments) {
return stabilize(OC_convertArgumentsAndLogCall(context, arguments));
}
@Callback
@Callback(direct = true)
@Optional.Method(modid = "opencomputers")
public Object[] side(final Context context, final Arguments arguments) {
OC_convertArgumentsAndLogCall(context, arguments);

View file

@ -156,7 +156,7 @@ public abstract class TileEntityAbstractForceField extends TileEntityAbstractEne
}
// OpenComputers callback methods
@Callback
@Callback(direct = true)
@Optional.Method(modid = "opencomputers")
public Object[] beamFrequency(final Context context, final Arguments arguments) {
return beamFrequency(OC_convertArgumentsAndLogCall(context, arguments));

View file

@ -1215,32 +1215,32 @@ public class TileEntityForceFieldProjector extends TileEntityAbstractForceField
}
// OpenComputers callback methods
@Callback
@Callback(direct = true)
@Optional.Method(modid = "opencomputers")
public Object[] state(final Context context, final Arguments arguments) {
OC_convertArgumentsAndLogCall(context, arguments);
return state();
}
@Callback
@Callback(direct = true)
@Optional.Method(modid = "opencomputers")
public Object[] min(final Context context, final Arguments arguments) {
return min(OC_convertArgumentsAndLogCall(context, arguments));
}
@Callback
@Callback(direct = true)
@Optional.Method(modid = "opencomputers")
public Object[] max(final Context context, final Arguments arguments) {
return max(OC_convertArgumentsAndLogCall(context, arguments));
}
@Callback
@Callback(direct = true)
@Optional.Method(modid = "opencomputers")
public Object[] rotation(final Context context, final Arguments arguments) {
return rotation(OC_convertArgumentsAndLogCall(context, arguments));
}
@Callback
@Callback(direct = true)
@Optional.Method(modid = "opencomputers")
public Object[] translation(final Context context, final Arguments arguments) {
return translation(OC_convertArgumentsAndLogCall(context, arguments));

View file

@ -373,72 +373,72 @@ public abstract class TileEntityAbstractShipController extends TileEntityAbstrac
}
// OpenComputers callback methods
@Callback
@Callback(direct = true)
@Optional.Method(modid = "opencomputers")
public Object[] getOrientation(final Context context, final Arguments arguments) {
OC_convertArgumentsAndLogCall(context, arguments);
return getOrientation();
}
@Callback
@Callback(direct = true)
@Optional.Method(modid = "opencomputers")
public Object[] isInSpace(final Context context, final Arguments arguments) {
OC_convertArgumentsAndLogCall(context, arguments);
return isInSpace();
}
@Callback
@Callback(direct = true)
@Optional.Method(modid = "opencomputers")
public Object[] isInHyperspace(final Context context, final Arguments arguments) {
OC_convertArgumentsAndLogCall(context, arguments);
return isInHyperspace();
}
@Callback
@Callback(direct = true)
@Optional.Method(modid = "opencomputers")
public Object[] dim_positive(final Context context, final Arguments arguments) {
return dim_positive(OC_convertArgumentsAndLogCall(context, arguments));
}
@Callback
@Callback(direct = true)
@Optional.Method(modid = "opencomputers")
public Object[] dim_negative(final Context context, final Arguments arguments) {
return dim_negative(OC_convertArgumentsAndLogCall(context, arguments));
}
@Callback
@Callback(direct = true)
@Optional.Method(modid = "opencomputers")
public Object[] command(final Context context, final Arguments arguments) {
return command(OC_convertArgumentsAndLogCall(context, arguments));
}
@Callback
@Callback(direct = true)
@Optional.Method(modid = "opencomputers")
public Object[] getShipSize(final Context context, final Arguments arguments) {
OC_convertArgumentsAndLogCall(context, arguments);
return getShipSize();
}
@Callback
@Callback(direct = true)
@Optional.Method(modid = "opencomputers")
public Object[] getMaxJumpDistance(final Context context, final Arguments arguments) {
OC_convertArgumentsAndLogCall(context, arguments);
return getMaxJumpDistance();
}
@Callback
@Callback(direct = true)
@Optional.Method(modid = "opencomputers")
public Object[] movement(final Context context, final Arguments arguments) {
return movement(OC_convertArgumentsAndLogCall(context, arguments));
}
@Callback
@Callback(direct = true)
@Optional.Method(modid = "opencomputers")
public Object[] rotationSteps(final Context context, final Arguments arguments) {
return rotationSteps(OC_convertArgumentsAndLogCall(context, arguments));
}
@Callback
@Callback(direct = true)
@Optional.Method(modid = "opencomputers")
public Object[] targetName(final Context context, final Arguments arguments) {
return targetName(OC_convertArgumentsAndLogCall(context, arguments));

View file

@ -255,7 +255,7 @@ public class TileEntityLift extends TileEntityAbstractEnergyConsumer implements
}
// OpenComputers callback methods
@Callback
@Callback(direct = true)
@Optional.Method(modid = "opencomputers")
public Object[] mode(final Context context, final Arguments arguments) {
OC_convertArgumentsAndLogCall(context, arguments);
@ -266,7 +266,7 @@ public class TileEntityLift extends TileEntityAbstractEnergyConsumer implements
);
}
@Callback
@Callback(direct = true)
@Optional.Method(modid = "opencomputers")
public Object[] state(final Context context, final Arguments arguments) {
OC_convertArgumentsAndLogCall(context, arguments);

View file

@ -173,7 +173,7 @@ public class TileEntityTransporterBeacon extends TileEntityAbstractEnergyConsume
}
// OpenComputers callback methods
@Callback
@Callback(direct = true)
@Optional.Method(modid = "opencomputers")
public Object[] isActive(final Context context, final Arguments arguments) {
return isActive(OC_convertArgumentsAndLogCall(context, arguments));

View file

@ -1773,45 +1773,45 @@ public class TileEntityTransporterCore extends TileEntityAbstractEnergyCoreOrCon
}
// OpenComputers callback methods
@Callback
@Callback(direct = true)
@Optional.Method(modid = "opencomputers")
public Object[] beamFrequency(final Context context, final Arguments arguments) {
return beamFrequency(OC_convertArgumentsAndLogCall(context, arguments));
}
@Callback
@Callback(direct = true)
@Optional.Method(modid = "opencomputers")
public Object[] state(final Context context, final Arguments arguments) {
OC_convertArgumentsAndLogCall(context, arguments);
return state();
}
@Callback
@Callback(direct = true)
@Optional.Method(modid = "opencomputers")
public Object[] remoteLocation(final Context context, final Arguments arguments) {
return remoteLocation(OC_convertArgumentsAndLogCall(context, arguments));
}
@Callback
@Callback(direct = true)
@Optional.Method(modid = "opencomputers")
public Object[] lock(final Context context, final Arguments arguments) {
return lock(OC_convertArgumentsAndLogCall(context, arguments));
}
@Callback
@Callback(direct = true)
@Optional.Method(modid = "opencomputers")
public Object[] energyFactor(final Context context, final Arguments arguments) {
return energyFactor(OC_convertArgumentsAndLogCall(context, arguments));
}
@Callback
@Callback(direct = true)
@Optional.Method(modid = "opencomputers")
public Object[] getLockStrength(final Context context, final Arguments arguments) {
OC_convertArgumentsAndLogCall(context, arguments);
return getLockStrength();
}
@Callback
@Callback(direct = true)
@Optional.Method(modid = "opencomputers")
public Object[] energize(final Context context, final Arguments arguments) {
return energize(OC_convertArgumentsAndLogCall(context, arguments));

View file

@ -133,7 +133,7 @@ public class TileEntityLaserCamera extends TileEntityLaser implements IVideoChan
}
// OpenComputers callback methods
@Callback
@Callback(direct = true)
@Optional.Method(modid = "opencomputers")
public Object[] videoChannel(final Context context, final Arguments arguments) {
return videoChannel(OC_convertArgumentsAndLogCall(context, arguments));