mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-06-06 08:34:12 +00:00
Expose Computer.getRootMount again
It's a little evil, but we need it for CCEmuX. There's other ways of achieving this, but not with supporting CC and CC:T.
This commit is contained in:
parent
4569af2130
commit
6be330ae8d
@ -7,6 +7,7 @@
|
|||||||
package dan200.computercraft.core.computer;
|
package dan200.computercraft.core.computer;
|
||||||
|
|
||||||
import com.google.common.base.Objects;
|
import com.google.common.base.Objects;
|
||||||
|
import dan200.computercraft.api.filesystem.IWritableMount;
|
||||||
import dan200.computercraft.api.lua.ILuaAPI;
|
import dan200.computercraft.api.lua.ILuaAPI;
|
||||||
import dan200.computercraft.api.peripheral.IPeripheral;
|
import dan200.computercraft.api.peripheral.IPeripheral;
|
||||||
import dan200.computercraft.api.peripheral.IWorkMonitor;
|
import dan200.computercraft.api.peripheral.IWorkMonitor;
|
||||||
@ -244,6 +245,12 @@ public class Computer
|
|||||||
tick();
|
tick();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
|
public IWritableMount getRootMount()
|
||||||
|
{
|
||||||
|
return executor.getRootMount();
|
||||||
|
}
|
||||||
|
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public static final String[] s_sideNames = IAPIEnvironment.SIDE_NAMES;
|
public static final String[] s_sideNames = IAPIEnvironment.SIDE_NAMES;
|
||||||
}
|
}
|
||||||
|
@ -338,7 +338,7 @@ final class ComputerExecutor
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private FileSystem createFileSystem()
|
IWritableMount getRootMount()
|
||||||
{
|
{
|
||||||
if( rootMount == null )
|
if( rootMount == null )
|
||||||
{
|
{
|
||||||
@ -347,11 +347,15 @@ final class ComputerExecutor
|
|||||||
computer.getComputerEnvironment().getComputerSpaceLimit()
|
computer.getComputerEnvironment().getComputerSpaceLimit()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
return rootMount;
|
||||||
|
}
|
||||||
|
|
||||||
|
private FileSystem createFileSystem()
|
||||||
|
{
|
||||||
FileSystem filesystem = null;
|
FileSystem filesystem = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
filesystem = new FileSystem( "hdd", rootMount );
|
filesystem = new FileSystem( "hdd", getRootMount() );
|
||||||
|
|
||||||
IMount romMount = getRomMount();
|
IMount romMount = getRomMount();
|
||||||
if( romMount == null )
|
if( romMount == null )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user