1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-01-30 10:54:47 +00:00

More binary compatibility stubs for ILuaAPI

This commit is contained in:
SquidDev 2017-12-07 09:24:44 +00:00
parent 29a3a0c48f
commit abd06133fb
2 changed files with 11 additions and 1 deletions

View File

@ -667,6 +667,11 @@ public class Computer
m_apis.add( api ); m_apis.add( api );
} }
public void addAPI( dan200.computercraft.core.apis.ILuaAPI api )
{
addAPI( (ILuaAPI) api );
}
public void setPeripheral( int side, IPeripheral peripheral ) public void setPeripheral( int side, IPeripheral peripheral )
{ {
synchronized( m_peripherals ) synchronized( m_peripherals )

View File

@ -10,9 +10,9 @@ import dan200.computercraft.ComputerCraft;
import dan200.computercraft.api.ComputerCraftAPI; import dan200.computercraft.api.ComputerCraftAPI;
import dan200.computercraft.api.filesystem.IMount; import dan200.computercraft.api.filesystem.IMount;
import dan200.computercraft.api.filesystem.IWritableMount; import dan200.computercraft.api.filesystem.IWritableMount;
import dan200.computercraft.api.lua.ILuaAPI;
import dan200.computercraft.api.peripheral.IPeripheral; import dan200.computercraft.api.peripheral.IPeripheral;
import dan200.computercraft.core.apis.IAPIEnvironment; import dan200.computercraft.core.apis.IAPIEnvironment;
import dan200.computercraft.api.lua.ILuaAPI;
import dan200.computercraft.core.computer.Computer; import dan200.computercraft.core.computer.Computer;
import dan200.computercraft.core.computer.IComputerEnvironment; import dan200.computercraft.core.computer.IComputerEnvironment;
import dan200.computercraft.shared.common.ServerTerminal; import dan200.computercraft.shared.common.ServerTerminal;
@ -313,6 +313,11 @@ public class ServerComputer extends ServerTerminal
m_computer.addAPI( api ); m_computer.addAPI( api );
} }
public void addAPI( dan200.computercraft.core.apis.ILuaAPI api )
{
m_computer.addAPI( api );
}
public void setPeripheral( int side, IPeripheral peripheral ) public void setPeripheral( int side, IPeripheral peripheral )
{ {
m_computer.setPeripheral( side, peripheral ); m_computer.setPeripheral( side, peripheral );