Commit Graph
1262 Commits
Author SHA1 Message Date
SquidDev 00b41d29c1 Update README to mention fg.deobf 2020-02-08 22:16:38 +00:00
Jonathan CoatesandGitHub 0ffd5fcf85 Add fs.getCapacity and fs.attributes (#365)
- 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
2020-02-08 21:04:58 +00:00
Jonathan Coates 95fee95006 Fix spelling of Ctrl 2020-02-08 20:26:16 +00:00
Jonathan Coates 239bd769df Cache the gradle dependency cache
This'll preserve the FG and general module cache. Note, this doesn't
include gradle wrappers, but that's normally pretty fast to download.
2020-02-08 11:19:34 +00:00
Jonathan Coates b4e0e9984f Try to get CI working again
- Mirror all dependencies, like we've done on master
 - Run gradle build twice. Apparently the first time the dependencies
   aren't always available.
2020-02-08 11:02:09 +00:00
SquidDev 79f42e35ce Add a timeout to websocket.receive
- 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
2020-02-07 14:50:51 +00:00
SquidDev be89fc25f9 Prevent copying folders inside themselves
- 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.
2020-02-07 14:17:09 +00:00
FatboychummyandGitHub 8eae02c037 Fire mouse_up events in monitor.lua (#358)
We schedule a mouse_up event 0.1 seconds after receiving a
monitor_touch event.
2020-02-04 17:00:49 +00:00
Jonathan Coates 930fd59298 Remove dvs1 as a maven repository
This thing consistently goes down and breaks the build. For now, let's
just rehost it on squiddev.cc/maven.
2020-02-04 16:53:22 +00:00
Jonathan Coates bf13bac152 Update illuaminate config 2020-02-04 16:41:29 +00:00
SquidDev 649acbae1c Add back item frame rendering for printouts
Also fix a recipe loading issue, due to capitalisation of enums
2020-01-30 10:07:47 +00:00
SquidDev 05eada427b Add back custom block highlights
Also bump Forge version to enable this
2020-01-30 09:00:37 +00:00
SquidDev 03caf9d805 Fix a checkstyle warning 2020-01-29 16:52:37 +00:00
SquidDev d6ea3aab1c Switch generation of resources over to data generators
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.
2020-01-29 16:41:26 +00:00
SquidDev f3a330e330 Normalise enums to use SHOUTY_CASE
PascalCase is more .NET than Java
2020-01-28 22:28:48 +00:00
SquidDev 044d2b2b06 Some API cleanup
- 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
2020-01-28 22:23:43 +00:00
SquidDev fb440b0d2e Update to 1.15
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.
v1.15.2-1.86.2
2020-01-24 09:12:29 +00:00
SquidDev 0de5969ec1 Lint whitespace during CI 2020-01-23 15:12:12 +00:00
magiczocker10andJonathan Coates 3f98b2785e Fix turtle texture layout (#350) 2020-01-23 15:08:11 +00:00
Jonathan CoatesandGitHub 798868427e Use a Wadler style pretty printer in the Lua REPL (#334)
- 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
2020-01-17 22:51:36 +00:00
Jonathan Coates c79f643ba7 Remove redundant illuaminate options 2020-01-17 10:18:46 +00:00
Jonathan Coates 1db3a14c54 Eta-reduce several calls to pcall 2020-01-15 09:29:11 +00:00
SquidDev bf6d017ad1 Merge branch 'master' into mc-1.14.x v1.14.4-1.86.2 2020-01-14 08:52:59 +00:00
SquidDev 8b1773dd60 Fix peripheral.getMethods returning {}
I don't even know how this snuck past.

Closes #346
v1.12.2-1.86.2
2020-01-14 08:45:08 +00:00
SquidDev a706300598 Update changelog/version v1.14.4-1.86.1 2020-01-13 15:10:32 +00:00
SquidDev 2541c3c5e6 Licenses, again 2020-01-13 15:08:09 +00:00
SquidDev 41a1b99f7d Merge branch 'master' into mc-1.14.x 2020-01-13 15:05:50 +00:00
SquidDev 1862a439e2 Correctly offset scroll cursor positions
Fixes #330
2020-01-13 14:59:56 +00:00
SquidDev 018ecfbaa0 ▲ version v1.12.2-1.86.1 2020-01-13 13:43:38 +00:00
SquidDev 4c8fd4fc35 Allow returning collections and arrays from Java
Closes #344
2020-01-13 13:20:15 +00:00
Oliver MarksandJonathan Coates 35c1b10224 Anonymized GPS (#341)
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.
2020-01-08 17:07:01 +00:00
SquidDev c1c01bef7c Fix argument index in expect call 2020-01-01 09:55:44 +00:00
SquidDev a48c3d0ba8 A couple of io fixes
- Use expect within io.write before calling the handle's write
   function. Closes #338
 - Coerce to string in write before doing any writing. Fixes #339
2020-01-01 09:01:00 +00:00
SquidDev 93a9ebc4f6 Happy new year 2020-01-01 00:09:18 +00:00
JakobDevandJonathan Coates 7cc2bd43c6 Make builded Jar downloadable (#332) 2020-01-01 00:08:31 +00:00
Oliver MarksandJonathan Coates 393e628721 More MOTDs (#333) 2019-12-30 16:26:57 +00:00
Jonathan Coates 0bcd28e58c Fix incorrect module names 2019-12-29 19:47:52 +00:00
SquidDev 42f5389fb8 Make Lua's "exit" function a little prettier
"exit" now has a custom __tostring method, which prints an explanation
message. This is very similar to how Python achives the same
functionality:

    lua> exit
    Call exit() to exit
    lua> exit()
    > Actually leaves the REPL
2019-12-29 18:51:39 +00:00
JacobandJonathan Coates 041cfe91b4 wilcards > wildcards (#331) 2019-12-29 06:12:55 +00:00
SquidDev 0f82a4589b Fix complaints v1.14.4-1.86.0 2019-12-24 19:31:14 +00:00
SquidDev 4320a4f851 Update CT integration
Sadly we have to disable -Werror, as the annotation class files are not
available on maven, so this produces a warning.
2019-12-24 19:16:06 +00:00
SquidDev 037cbabb32 Merge branch 'master' into mc-1.14.x
Unfortunately we can't apply the config changes due to backwards
compatibility. This'll be something we may need to PR into Forge.

CraftTweaker support still needs to be added.
2019-12-23 22:34:30 +00:00
SquidDev 0dde859582 Bump version v1.12.2-1.86.0 2019-12-23 22:10:32 +00:00
SquidDev e59c043fb6 Fix a couple of comments to use the new config names 2019-12-23 21:34:03 +00:00
SquidDev ae928c4397 Make http domain configuration a little clearer 2019-12-23 18:59:36 +00:00
SquidDev da41c65128 Update proguard configuration
- Remove redundant preservation of cobalt lib constructors. We use
   lambdas now, so this is no longer needed.
 - Fix Java crypto lib not being included.
2019-12-23 18:54:19 +00:00
SquidDev 4d18234714 Use a fake network handler too
It appears that WB opens containers manually, and thus all of our stubs
network stubs are entirely ignored. Thus the only solution here is to
stub out the whole network handler code.

Thankfully this is simple enough - we do the same for Plethora and 1.14.

Fixes #328
2019-12-23 17:17:32 +00:00
JakobDevandJonathan Coates d254c6464b Add more MOTD messages again (#241) 2019-12-23 14:43:48 +00:00
Jonathan CoatesandGitHub 3a5d50e572 Basic Minetweaker support (#327)
This provides the following methods:

 - dan200.computercraft.turtle.removeUpgrade(id: String)
 - dan200.computercraft.turtle.removeUpgrade(stack: IItemStack)
 - dan200.computercraft.turtle.addTool(id: String, craftItem: IItemStack[, toolItem: IItemStack][, kind: string])

While it's pretty minimal, it should allow for a reasonable amount of
functionality.

Closes #327 and #97.
2019-12-18 15:29:24 +00:00
Jonathan Coates 03b6d2f1ab Replace string.len with # 2019-12-10 18:55:11 +00:00