1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2024-11-16 14:54:54 +00:00

Treat a maximumFilesOpen values of 0 as unlimited

This commit is contained in:
Daniel Ratcliffe 2017-05-04 22:15:26 +01:00
parent 6271555c45
commit 2436d813e6
2 changed files with 3 additions and 2 deletions

View File

@ -263,7 +263,7 @@ public class ComputerCraft
Config.turtlesNeedFuel.setComment( "Set whether Turtles require fuel to move" ); Config.turtlesNeedFuel.setComment( "Set whether Turtles require fuel to move" );
Config.maximumFilesOpen = Config.config.get(Configuration.CATEGORY_GENERAL, "maximumFilesOpen", maximumFilesOpen); Config.maximumFilesOpen = Config.config.get(Configuration.CATEGORY_GENERAL, "maximumFilesOpen", maximumFilesOpen);
Config.maximumFilesOpen.setComment( "How many files a computer can have open at the same time" ); Config.maximumFilesOpen.setComment( "Set how many files a computer can have open at the same time. Set to 0 for unlimited." );
Config.turtleFuelLimit = Config.config.get( Configuration.CATEGORY_GENERAL, "turtleFuelLimit", turtleFuelLimit ); Config.turtleFuelLimit = Config.config.get( Configuration.CATEGORY_GENERAL, "turtleFuelLimit", turtleFuelLimit );
Config.turtleFuelLimit.setComment( "The fuel limit for Turtles" ); Config.turtleFuelLimit.setComment( "The fuel limit for Turtles" );

View File

@ -655,7 +655,8 @@ public class FileSystem
{ {
synchronized( m_openFiles ) synchronized( m_openFiles )
{ {
if( m_openFiles.size() >= ComputerCraft.maximumFilesOpen ) if( ComputerCraft.maximumFilesOpen > 0 &&
m_openFiles.size() >= ComputerCraft.maximumFilesOpen )
{ {
if( handle != null ) if( handle != null )
{ {