- Remove stub for table.pack/table.unpack.
- Remove Lua 5.3 bitlib stub. We're not on 5.3, there's no
point emulating it.
- Change peripheral.call to correctly adjust the error level. This is a
terrible hack, but I believe the only good option.
It'd be good to remove load as well, but it's a little more complex due
to our injecting of _ENV.
Closes#363
It hasn't been http_enable for yonks - slightly worried I didn't notice
this earlier.
Also don't refer to ComputerCraft.cfg - the name has changed several
times across versions, so let's leave it ambiguous.
Hopefully provides a /little/ more information about the build process.
Hey, also means I only need to add a CoC to complete GH's community tab!
In all seriousness, there's probably a lot more I need to flesh out
here, such as some kind of vision and guides for issues/PRs. But this at
least documents the local development process. Somewhat.
- Return EPOCH if a zip entry's creation/modification/access time is
missing.
- If a BasicFileAttributes.*Time method returns null, use 0 as our
time. This shouldn't happen, but is a good sanity check.
Fixes#371
This adds documentation comments to many of CC's Lua APIs, and
a couple of the Java ones, through the use of stubs. We then
export these to HTML using illuaminate [1] and upload them to our
documentation site [2].
Uploads currently occur on pushes to master and any release/tag. The
site is entirely static - there is no way to switch between versions,
etc... but hopefully we can improve this in the future.
[1]: github.com/SquidDev/illuaminate/
[2]: https://tweaked.cc/
This means we are already provided with file attributes, which halfs[^1]
the time taken to scan folders.
[^1]: This dropped the fastest scan time from ~1.3s to ~0.6. It's by no
means a perfect benchmark, but this is still an obvious improvement.
- fs.getCapacity just returns the capacity of the current drive, if
available. This will be nil on rom mounts.
- fs.attributes returns an lfs like table of various file attributes.
Currently, this contains:
- access, modification, created: When this file was last accessed,
modified and created. Time is measured in milliseconds since the
epoch, same as os.epoch("utc") and what is accepted by os.date.
- size: Same as fs.getSize
- isDir: same as fs.isDir
Closes#262
- Move timer handling to IAPIEnvironment, rather than OSAPI. This means
the environment is reset on startup/shutdown, much like normal APIs.
- Websocket.receive now accepts an optional timetout (much like
rednet.receive). This starts a timer, and waits for it to complete.
Closes#201
- contains now performs a case-insensitive comparison. While this is a
little dubious, it's required for systems like Windows, where foo and
Foo are the same folder.
- Impose a depth limit on copyRecursive. If there are any other cases
where we may try to copy a folder into itself, this should prevent
the computer entirely crashing.
See #354
- Remove Lua script to generate recipes/advancements for coloured
disks, turtle upgrades and pocket upgrades. Replacing them with Lua
ones.
- Generate most block drops via the data generator system. Aside from
cables, they all follow one of two templates.
- Remove *Stream methods on IMount/IWritableMount, and make the channel
ones the primary.
- Fix location of AbstractTurtleUpgrade
- Make IComputerAccess.getAvailablePeripheral and .getMainThreadMonitor
mandatory.
- IComputerAccess throws a specialised NotAttachedException
Most of the port is pretty simple. The main problems are regarding
changes to Minecraft's rendering system.
- Remove several rendering tweaks until Forge's compatibility it
brought up-to-date
- Map rendering for pocket computers and printouts
- Item frame rendering for printouts
- Custom block outlines for monitors and cables/wired modems
- Custom breaking progress for cables/wired modems
- Turtle "Dinnerbone" rendering is currently broken, as normals are not
correctly transformed.
- Rewrite FixedWidthFontRenderer to to the buffer in a single sweep.
In order to do this, the term_font now also bundles a "background"
section, which is just a blank region of the screen.
- Render monitors using a VBO instead of a call list. I haven't
compared performance yet, but it manages to render a 6x5 array of
_static_ monitors at almost 60fps, which seems pretty reasonable.
- Add a cc.pretty module, which provides a Wadler style pretty printer [1].
- The cc.pretty.pretty function converts an arbitrary object into a
pretty-printed document. This can then be printed to the screen with
cc.pretty.{write, print} or converted to a string with cc.pretty.render.
- Convert the Lua REPL to use the pretty printer rather than
textutils.serialise.
[1]: http://homepages.inf.ed.ac.uk/wadler/papers/prettier/prettier.pdf
GPS requests are now sent and received on CHANNEL_GPS by default
instead. This means it should not be possible to distinguish
computers (and thus locate them) via their GPS requests.