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

753 Commits

Author SHA1 Message Date
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
Daniel Ratcliffe
c6b8cb1fab Merge pull request #458 from SquidDev-CC/hotfix/block-shapes
Fix BlockFaceShape not being overridden for turtles and peripherals
2017-09-22 13:20:08 +01:00
Wilma456 (Jakob0815)
f20a7afa7f Better Code 2017-09-18 15:22:44 +02:00
SquidDev
01f5d006fc Fix BlockFaceShape not being overridden for turtles and peripherals
This meant one could perform various illogical actions to
non-full-blocks, such as connecting fences and placing paitings.

We also modify the behaviour of isOpaqueCube and isFullCube for
peripherals, only returning false for the case of modems and cables.
2017-09-18 08:33:40 +01:00
SquidDev
cd6b076efe Turn on ServerComputer instances if they have timed out 2017-09-16 20:09:51 +01: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
SquidDev
fbbfe33e21 Do not instantiate ServerComputer instances in the peripheral provider
Instead we create a ComputerProxy, which delegates methods to the
ServerComputer or TileComputerBase, depending on which one exists.
2017-09-15 18:58:13 +01:00
SquidDev
7a916ed8c2 Do not instantiate a ServerComputer for pocket computers's mount 2017-09-15 18:48:57 +01:00
SquidDev
60305cd106 Remove tile before calling destroy
This ensures that the tile will updating neighbouring blocks, and so
the destroyed tile will not be wrapped as a peripheral.
2017-09-15 17:40:53 +01: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
Daniel Ratcliffe
5219648128 Merge pull request #445 from SquidDev-CC/hotfix/container-backgrounds
Fix background and tooltips not rendering within containers
2017-09-13 00:43:10 +01:00
SquidDev
1ef7c8e8db Only send the packet to people within 64 blocks
This is equivalent to what vanilla Minecraft does
2017-09-12 22:44:49 +01:00
Wilma456
1415dd0dae Changes requested by dan200 2017-09-12 20:43:07 +02:00
Wilma456 (Jakob0815)
282aa804f8 Changes sugested by dan200 2017-09-12 19:42:08 +02:00
Daniel Ratcliffe
e959051239 Merge pull request #447 from BombBloke/patch-1
Correct minor typo in rednet.receive
2017-09-12 18:14:34 +01: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
SquidDev
afec3743f3 Use custom packet to play records, instead of using block events
Breaking a disk drive was not stopping the record being played as the
block event never reached the client. Instead, we send a custom packet
which starts/stops music at a given location.

We also remove all the plumbing for eventReceived/sendBlockEvent from
the generic block/tile classes, as they are no longer used.

Closes #443
2017-09-12 15:46:46 +01:00
Wilma456
5989d021c7 Add folder /rom/modules 2017-09-12 16:44:22 +02:00
SquidDev
baa8993999 Fix background and tooltips not rendering within containers
The methods to draw these now have to be explicitly called, hence not
showing up.
2017-09-12 15:05:32 +01: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
Daniel Ratcliffe
fa498e74fb 1.80pr1 2017-09-12 00:11:19 +01:00
Daniel Ratcliffe
bd90d7d3b0 Ignore .DS_Store files 2017-09-12 00:05:26 +01:00
SquidDev
4bd5b0d236 Remove HTTPTask, queueing the event when it has finished executing
This means we don't have to have lots of shared state between the run
and whenFinished method, and allows for easier chaining of futures later
on.
2017-09-11 22:13:00 +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
6c32d8a57e Merge pull request #394 from Wojbie/bugfix/Filesystem-dots-#35
Modify logic behind ... and more in file path.
2017-09-11 13:27:13 +01:00
SquidDev
5f323a85a7 Rethrow/retrigger interrupted status where appropriate 2017-09-10 22:08:08 +01:00
SquidDev
85c556d324 Rewrite the computer thread system
This makes a couple of significant changes to the original system, to
reduce the number of threads created and allow for multiple threads in
the future. There are several notable changes from the original
implementation:

 - A blocking queue is used for the main task queue queue. This removes
   the need for the "monitor" variable and allows for multiple threads
   polling this queue in the future.
 - The thread used to execute tasks is "cached" between tasks,
   significantly reducing the number of threads which need to be
   created. If a task needs to be stopped then the thread is then
   terminated and a new one constructed, though this rarely happens.
2017-09-10 22:08:08 +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
SquidDev
3b2de38227 Build against Oracle JDK 8 instead 2017-09-10 20:45:24 +01:00
Daniel Ratcliffe
bde9ac9747 Merge pull request #400 from SquidDev-CC/hotfix/redstone-propagation
Fix redstone not being propagated through solid blocks
2017-09-10 18:05:51 +01:00
Wojbie
6aa4a385a3 Requested changes to logic behind ... in file path. 2017-09-10 17:51:29 +02:00
SquidDev
a2da6d9601 Pass the original block in redstone propagation
notifyBlockOfStateChange and notifyNeighborsOfStateExcept expect the
block which caused the redstone update, rather than the neighbor block.

Fixes #393
2017-09-10 09:32:02 +01:00