SquidDev
518eefbe10
Rewrite file systems to use ByteChannels
...
This replaces the existing IMount openFor* method with openChannelFor*
ones, which return an appropriate byte channel instead.
As channels are not correctly closed when GCed, we introduce a
FileSystemWrapper. We store a weak reference to this, and when it is
GCed or the file closed, we will remove it from our "open file" set and
ensure any underlying buffers are closed.
While this change may seem a little odd, it does introduce some
benefits:
- We can replace JarMount with a more general FileSystemMount. This
does assume a read-only file system, but could technically be used
for other sources.
- Add support for seekable (binary) handles. We can now look for
instances of SeekableByteChannel and dynamically add it. This works
for all binary filesystem and HTTP streams.
- Rewrite the io library to more accurately emulate PUC Lua's
implementation. We do not correctly implement some elements (most
noticably "*n", but it's a definite improvement.
2018-09-26 10:00:17 +01:00
Wojbie
0d28c67534
Fix advanced monitor recipe.
...
Fix recipe to create 4 monitors.
2018-01-14 23:03:14 +01:00
Daniel Ratcliffe
3e265c27ff
Merge pull request #455 from Wilma456/fileread
...
Add read() to Filehandle
2018-01-13 00:58:19 +00:00
Daniel Ratcliffe
8d356f50c4
Merge pull request #440 from Wilma456/iomulti
...
Make io.write() accept multiple args
2018-01-13 00:48:07 +00:00
Daniel Ratcliffe
f30c4f16c0
Merge pull request #411 from Wilma456/copyfixup
...
Fix Bug in copy.lua, mkdir.lua and rename.lua (updated)
2018-01-13 00:32:55 +00:00
Daniel Ratcliffe
8bb8caa315
Merge pull request #448 from Wilma456/writecheck
...
Fix check of write()
2018-01-13 00:28:08 +00:00
Daniel Ratcliffe
7647369e2d
Merge pull request #446 from Wilma456/moduledir
...
Add folder /rom/modules
2018-01-12 14:10:50 +00:00
Daniel Ratcliffe
2a16a1df85
Merge pull request #486 from Wilma456/extensionfix
...
Fix Bug in Paint and Edit
2018-01-12 13:59:15 +00:00
Daniel Ratcliffe
c3db91f11f
Merge pull request #485 from Luca0208/patch-1
...
Removed the "the" that was too much(In /rom/help/cd.txt)
2018-01-12 13:56:48 +00:00
Wilma456
9e19dd7070
Fix Bug in Paint and Edit
2017-11-02 20:14:34 +01:00
Luca S
aba0e3d2d4
Removed the "the" that was too much
2017-10-29 19:06:34 +01:00
Wilma456 (Jakob0815)
999351e667
Fix io.lines()
2017-10-04 18:51:48 +02:00
Wilma456
4fb0240a36
Changes suggested by SquidDev and update help file
2017-09-24 17:36:20 +02:00
Wilma456 (Jakob0815)
f8193a4d23
Set errorlevel for "Unsupported format" to 2
2017-09-16 16:11:36 +02:00
Wilma456
5be2202b2e
Add read() to Filehandle
2017-09-16 16:06:27 +02:00
Wilma456 (Jakob0815)
b8630f739a
Add Check requested by dan200
2017-09-13 19:21:17 +02:00
Daniel Ratcliffe
1c8480a329
Merge pull request #441 from SquidDev-CC/hotfix/paintutils-read
...
Fix a non-existent method being used in paintutils
2017-09-13 17:10:07 +01:00
Wilma456
1415dd0dae
Changes requested by dan200
2017-09-12 20:43:07 +02:00
Wilma456 (Jakob0815)
373b7ba293
Fix check of write()
...
if you call write(nil), you will get the error "bios.lua:229: bad argument: string expected, got nil", so nil is not a valid argument for write() and should be removed.
2017-09-12 17:17:58 +02:00
Bomb Bloke
70c6f3498b
Correct minor typo in rednet.receive
...
Caused attempts to set a time-out value to throw "expected number, got number".
2017-09-13 01:06:59 +10:00
Wilma456
5989d021c7
Add folder /rom/modules
2017-09-12 16:44:22 +02:00
Wilma456 (Jakob0815)
92f5860de6
Use select()
2017-09-12 15:27:09 +02:00
SquidDev
12abd4292e
Fixes a non-existent method being used in paintutils
2017-09-12 09:52:21 +01:00
Wilma456 (Jakob0815)
0115bc8dca
Make io.write() accept multiple args
...
This is just to bring the io API from CC close the the io API from normal lua, which accept multiple args for io.write().
2017-09-11 15:47:30 +02:00
Daniel Ratcliffe
1fdfcdb5f2
Merge pull request #378 from MineRobber9000/patch-3
...
Add ability to load raw data from a string [paintutils]
2017-09-11 13:28:27 +01:00
Daniel Ratcliffe
61ff91f237
Merge pull request #316 from SquidDev-CC/feature/minecraft-1.12.2
...
Update to 1.12. Bam!
2017-09-10 20:52:26 +01:00
Daniel Ratcliffe
51644e32ed
Merge pull request #415 from Wilma456/palletecheck
...
Add valid check to term.setPaletteColor/getPaletteColor
2017-09-10 00:12:46 +01:00
Daniel Ratcliffe
c7e5386e80
Merge pull request #414 from Wilma456/listfix
...
Fix Bug in list.lua
2017-09-10 00:04:08 +01:00
Daniel Ratcliffe
707f0899da
Merge pull request #429 from Wilma456/iofix
...
Fix io API
2017-09-09 23:59:57 +01:00
Daniel Ratcliffe
3095a6bbad
Merge pull request #241 from SquidDev-CC/feature/minecraft-1.11.2
...
Update to 1.11.2
2017-09-09 23:54:42 +01:00
Wilma456 (Jakob0815)
a5bbed528d
Make mode from io.open() accept nil
2017-09-06 18:53:44 +02:00
Wilma456 (Jakob0815)
369be7c32c
Fix io API
...
While adding checks to the io API in #424 , I had forgot that the io API has his own type() function who overwrite the default one. This PR fix this. Sorry for that.
2017-08-27 17:08:40 +02:00
Daniel Ratcliffe
2f829a1413
Fixed load() not accepting function arguments
2017-08-27 13:34:33 +01:00
Daniel Ratcliffe
0de3a42808
Merge pull request #424 from Wilma456/newcheck
...
Add more Checks
2017-08-27 12:26:58 +01:00
Daniel Ratcliffe
2fb6a9dc62
Merge pull request #389 from Wilma456/ioerr
...
Make io.open() return Error
2017-08-27 12:22:54 +01:00
Wilma456
79697e37b0
Add Check to load()
2017-08-24 20:18:21 +02:00
Wilma456
4f9de6b02c
Update Checks
2017-08-24 20:17:31 +02:00
Wilma456
e9cea7d0f5
Add more Checks
2017-08-21 15:20:32 +02:00
Wilma456 (Jakob0815)
90626748e4
Remove sleep.txt
...
sleep was removed from CC, so It's time to remove the help file
2017-08-18 15:45:57 +02:00
Wilma456 (Jakob0815)
30b55d966b
Add valid check to term.setPaletteColor/getPaletteColor
2017-08-11 15:38:02 +02:00
Wilma456 (Jakob0815)
3371345fad
Fix Bug in list.lua
...
list.lua check now, if sDir is a Directory
2017-08-11 13:42:20 +02:00
Wilma456
90c4ebd208
Fix Bug in copy.lua, mkdir.lua and rename.lua
2017-08-09 19:32:29 +02:00
Wilma456 (Jakob0815)
83f34b430d
Make io.open() return Error
...
If fs.open() failed, it will return nil and a a error message like "No such file" or "Out of space". This PR make, that io.open() returned this error too.
2017-07-28 15:18:14 +02:00
Daniel Ratcliffe
579f7443a8
Merge pull request #360 from Wojbie/Mixed-lua-side-improvements.-Part-2
...
Mixed-Lua-side-improvements.-Part-2
2017-07-25 23:15:10 +01:00
Daniel Ratcliffe
df1c8e22b8
Merge pull request #376 from CrazedProgrammer/fix-argument-checks
...
Fix argument checks made in PR #304 and #338
2017-07-25 23:13:34 +01:00
CrazedProgrammer
96288164c5
Fix textutils.serializeJSON argument check
2017-07-25 22:36:54 +02:00
SquidDev
263bade338
Add some basic recipe advancements
...
This doesn't provide the ability to unlock the upgrade impostor recipes,
but I'm not sure that is currently feasible.
2017-07-25 21:10:49 +01:00
SquidDev
08099f08f2
Initial update to 1.12
...
- Convert most recipes to JSON
- Add JSON factories for impostor and turtle recipes.
- Several mappings changes
- Migrate to Forge's new registry system
2017-07-25 21:10:47 +01:00
SquidDev
35425f0f61
Update to 1.11.2
2017-07-25 21:08:51 +01:00
Daniel Ratcliffe
f480965e67
Merge pull request #372 from Wilma456/apispro
...
Update alias.lua
2017-07-25 20:32:30 +01:00