1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2024-07-02 10:03:32 +00:00
Commit Graph

689 Commits

Author SHA1 Message Date
SquidDev
a8b08bd971 Remove apis.HTTPRequest
I evidently duplicated this during some rebase, more fool me.
2017-11-15 11:39:48 +00:00
SquidDev
c9181a121f Merge pull request #395 from SquidDev-CC/ComputerCraft/feature/websocket
Websocket support
2017-11-15 11:39:02 +00:00
SquidDev
30f4e0829f Add websocket support to HTTP API
This uses Netty's websocket functionality, meaning we do not have to
depend on another library.

As websockets do not fit neatly into the standard polling socket model,
the API is significantly more event based than CCTweaks's. One uses
http.websocket to connect, which will wait until a connection is
established and then returns the connection object (an async variant is
available).

Once you have a websocket object, you can use .send(msg) to transmit a
message. Incoming messages will fire a "websocket_message" event, with
the URL and content as arguments. A convenience method (.receive())
exists to aid waiting for valid messages.
2017-11-15 11:32:17 +00:00
SquidDev
2155fce036 Merge pull request #486 from Wilma456/ComputerCraft-1/extensionfix
Fix Bug in Paint and Edit
2017-11-14 23:55:14 +00:00
SquidDev
27602ec8fc Merge pull request #485 from Luca0208/ComputerCraft/patch-1
Removed the "the" that was too much(In /rom/help/cd.txt)
2017-11-14 23:54:54 +00:00
SquidDev
66f683d9c9 Merge pull request #475 from Wilma456/ComputerCraft-1/ioline
Fix io.lines()
2017-11-14 23:53:50 +00:00
SquidDev
ac08a52323 Merge pull request #480 from Wilma456/ComputerCraft-1/monitorscale
Add getTextScale() to Monitor
2017-11-14 23:53:04 +00:00
SquidDev
fe0f998c27 Merge pull request #448 from Wilma456/ComputerCraft-1/writecheck
Fix check of write()
2017-11-14 23:50:12 +00:00
Wilma456
bcf79165f9 Merge pull request #455 from Wilma456/ComputerCraft-1/fileread
Add read() to Filehandle
2017-11-14 23:48:38 +00:00
Steven Dirth
9b2a50cdfc Merge pull request #362 from KingofGamesYami/ComputerCraft/featurecommand-event
Command Event
2017-11-14 23:27:11 +00:00
Wilma456
c5d99db654 Merge pull request #411 from Wilma456/ComputerCraft-1/copyfixup
Fix Bug in copy.lua, mkdir.lua and rename.lua (updated)
2017-11-14 23:24:11 +00:00
SquidDev
5253ab3e58 Merge pull request #463 from josephcsible/ComputerCraft/notnull
Remove some unnecessary null checks
2017-11-14 22:58:36 +00:00
SquidDev
11d8253d9c Merge pull request #464 from josephcsible/ComputerCraft/unnecessary
Remove unnecessary code
2017-11-14 22:57:36 +00:00
SquidDev
bc2b481918 Merge pull request #289 from Wojbie/ComputerCraft/Speaker-pocket-computer-light
Add pocket computer light support to Speaker.
2017-11-14 22:46:01 +00:00
SquidDev
b26564ccb9 Update README to explain what this project is
Also add a .editorconfig file to ensure some level of consistent
formatting.
2017-11-14 22:42:07 +00:00
SquidDev
28e3ffe978 Update Gradle and build system
- Bundle Javadoc and APIs using gradle instead of deploy.sh
 - Bump Gradle to 4.3, significantly improving compile times.
2017-11-14 22:42:03 +00:00
SquidDev
540e2e25aa Merge pull request #163 from SquidDev-CC/ComputerCraft/feature/cobalt
Replace LuaJ with Cobalt
2017-11-14 21:48:47 +00:00
SquidDev
845118e9e2 Merge pull request #218 from SquidDev-CC/ComputerCraft/feature/new-computer-thread
Rewrite the computer thread system
2017-11-14 21:33:20 +00:00
SquidDev
b2b8753ee7 Merge pull request #227 from SquidDev-CC/ComputerCraft/feature/improved-cable
Improving cable/wired modem interactions
2017-11-14 21:32:53 +00:00
SquidDev
060fb21bdb Merge pull request #298 from SquidDev-CC/ComputerCraft/feature/luaj-bit32
Replace BitAPI with a LuaJ implementation of bit32
2017-11-14 21:32:19 +00:00
SquidDev
ef008709c7 Merge pull request #402 from SquidDev-CC/ComputerCraft/feature/shell-resolution
Tweak shell program resolution slightly
2017-11-14 21:31:10 +00:00
SquidDev
09da119f27 Merge pull request #451 from SquidDev-CC/ComputerCraft/hotfix/disk-drive-stop
Use custom packet to play records, instead of using block events
2017-11-14 21:30:52 +00:00
SquidDev
f8487d1e1c Merge pull request #453 from SquidDev-CC/ComputerCraft/hotfix/eager-remove-te
Remove tile before calling destroy
2017-11-14 21:15:47 +00:00
SquidDev
b6f773ffce Merge pull request #457 from SquidDev-CC/ComputerCraft/hotfix/computer-reload
Turn on ServerComputer instances if they have timed out
2017-11-14 21:14:49 +00:00
SquidDev
c8673473ef Merge pull request #476 from SquidDev-CC/ComputerCraft/hotfix/printer-clear
Fix the printer overwriting the current page
2017-11-14 21:14:10 +00:00
SquidDev
3829815756 Merge pull request #479 from SquidDev-CC/ComputerCraft/feature/network-optimisations
Only send terminal state to interacting players
2017-11-14 21:13:17 +00:00
SquidDev
7eac8faf0d Merge pull request #482 from SquidDev-CC/ComputerCraft/feature/jei-integration
Add simple JEI integration
2017-11-14 21:06:02 +00:00
SquidDev
0bd0f4d313 Prefix all loaded strings with "="
Whilst this is not consistent with normal Lua, this is required in order
to remain compatible with LuaJ.
2017-11-14 18:41:01 +00:00
SquidDev
73873eb8cb Change timeout system to occur on instructions instead of API calls
This means loops which do not touch CC specific methods will still
produce an error, rather than terminating the computer.
2017-11-14 18:41:00 +00:00
SquidDev
0420b6c831 Remove string metatable protection
The string metatable and environment are no longer shared, so this
sandboxing is no longer required.
2017-11-14 18:41:00 +00:00
SquidDev
bb741975b7 Migrate LuaJLuaMachine to use Cobalt 2017-11-14 18:41:00 +00:00
SquidDev
8bffec6964 Add dependency on Cobalt 2017-11-14 18:40:57 +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
SquidDev
d9d025e33b Add simple JEI integration
- Ensure pocket computers and turtles are distinguished by upgrades and
   computer family.
 - Ensure disks are distinguished by colour.
 - Hide treasure disks from the list
2017-10-25 13:40:35 +01:00
Wilma456 (Jakob0815)
1fe29ab098 Add getTextScale() to Monitor 2017-10-13 12:37:55 +02:00
SquidDev
53f16782ab Only send terminal state to interacting players
This splits the computer state (blinking, label, etc...) and terminal
state into two separate packets. When a computer changes, the computer
state is sent to all players and the terminal state is sent to players
who are curerntly using the computer.

This reduces network usage by a substantial amount.
2017-10-12 10:45:38 +01:00
SquidDev
bfb4f88304 Fix the printer clearing the previous page
When printing on top of an already printed page, the previous contents
should be preserved. However, this did not occur as the stack had been
shrunk and so the item was no longer considered a printout.

Closes SquidDev-CC/ComputerCraft#2
2017-10-06 12:04:49 +01:00
SquidDev
fb6d65ec23 Invalidate the network when the peripheral is removed
Fixes #83
2017-10-04 21:49:41 +01:00
SquidDev
6b364052c7 Only render breaking animation on the part being hit 2017-10-04 21:49:40 +01:00
SquidDev
7169abcd7b Ensure the modem's peripheral is incorrectly invalidated when changed 2017-10-04 21:49:40 +01:00
SquidDev
75ccfbdb3d Migrate cable core block state to an enum
This allows us to render the cable "core", as was done pre-1.8.
2017-10-04 21:49:40 +01:00
SquidDev
728644c104 Initial attempt at improving cable/wired modem interactions
- Cable and modem can be broken individually
 - Ray tracing will go through "holes" in the cable.
 - Pick block will determine which part you are looking at.
 - Selection box will only highlight the region you are looking at:
   modem or cable.
2017-10-04 21:49:37 +01:00
Wilma456 (Jakob0815)
999351e667 Fix io.lines() 2017-10-04 18:51:48 +02:00
Wilma456
11e879db41 Removce Bow Upgrade Recipe 2017-09-29 18:56:52 +02:00
Wilma456
a4a774fcdf Add more Recipes to Recipebook 2017-09-27 20:08:48 +02:00
Wilma456
4fb0240a36 Changes suggested by SquidDev and update help file 2017-09-24 17:36:20 +02:00
Joseph C. Sible
80ec54eaf6 Remove unnecessary code
- Remove unnecessary casts
- Use the diamond operator where possible
- Remove "throws" declarations that aren't actually thrown
- Remove unused local variables
- Remove unused imports
- Remove redundant superinterfaces
2017-09-24 01:23:29 -04:00
Joseph C. Sible
9e4ae3a494 Remove some unnecessary null checks
We know turtle can't be null in any of these places, since in preceding code,
we called methods on it, so we would have gotten a NullPointerException then
and never gotten here if it were null.
2017-09-24 01:00:55 -04:00
Daniel Ratcliffe
19e4c03d3a Merge pull request #456 from Wilma456/ioerror
Set errorlevel for "Unsupported format" to 2
2017-09-22 13:20:34 +01:00