Daniel Ratcliffe
aa8455e0b1
Merge pull request #245 from Wilma456/settings
...
Update Settings Help
2017-05-16 19:39:34 +01:00
Daniel Ratcliffe
2e22ca4ccf
Merge pull request #217 from SquidDev-CC/feature/logging
...
Add a basic logging system
2017-05-16 19:38:03 +01:00
Wilma456
68f4611abc
Add Default Settings
2017-05-16 20:35:46 +02:00
SquidDev
0e1135ed97
Disable peripheral logging by default
2017-05-16 19:35:07 +01:00
Daniel Ratcliffe
ebbdd29bd6
Merge pull request #243 from SquidDev-CC/feature/access-transformer
...
Replace reflection with access transformers
2017-05-16 19:25:10 +01:00
Daniel Ratcliffe
8c4331d15a
Added checks to window.setTextColor and window.setBackgroundColor
2017-05-16 19:23:08 +01:00
Restioson
4df4b91d09
Converted (!x == y) to x != y
2017-05-16 20:02:59 +02:00
Restioson
b28c565665
(Hopefully) addressed @dan200's concerns
...
Push your fix to thread safety if this doesn't cut it
2017-05-16 19:48:38 +02:00
SquidDev
efb0065ebd
Add config option to disable certain error messages
2017-05-16 15:59:09 +01:00
SquidDev
a0b6cbb671
Remove ILogger facade
...
Just use global Log4j logger on the ComputerCraft class.
2017-05-16 15:49:55 +01:00
SquidDev
44ba4069c1
Print stack traces/add logging messages in several places
...
This will hopefully make it easier to track down various issues which
might otherwise go unnoticed or provide little information.
The main areas modified are those that external APIs may provide values
for or interact with: various providers and ILuaObject/IPeripheral
implementations. However, we do also log in a couple of other places
which indicate a problem with this, or another, mod.
2017-05-16 15:49:55 +01:00
SquidDev
bdc438fc62
Add a basic logging system
...
This adds a common ILogger interface and two built-in loggers - one
which prints to stdout, the other using a Log4J logger. These are split
up as not to cause dependency issues for emulators.
The stdout logger is enabled by default, but the ComputerCraft mod class
will swap over to using FML's mod specific logger, which provides a more
consistent look with the rest of Minecraft.
2017-05-16 15:49:55 +01:00
Restioson
b3c49db761
Made Speaker threadsafe & fix warnings
2017-05-15 17:42:29 +02:00
Restioson
7ff4631a9f
@gegy1000 strikes again
2017-05-15 17:42:29 +02:00
Restioson
aad81bead7
Fix style
...
@gegy1000 don't say *I* get distracted
2017-05-15 17:42:29 +02:00
Restioson
88b55934c7
Fix castException
2017-05-15 17:42:29 +02:00
Restioson
42962dcd48
Fix Noisy turtles not in creative - Thanks @SquidDev
2017-05-15 17:42:29 +02:00
Restioson
093d2ea89f
Added PocketSpeaker & corrected blockmodel for turtle speaker
2017-05-15 17:42:29 +02:00
Restioson
97a6679510
Dammit, I hope my git history works now!
2017-05-15 17:38:50 +02:00
Restioson
a3b0e4e993
Added speaker as turtle peripheral
2017-05-15 17:38:50 +02:00
Restioson
3bf15a3798
Added speaker model - potentially glitched
2017-05-15 17:38:50 +02:00
Restioson
dc96f2121a
Fix Speaker not playing sounds on break and replace for entire Lua session
2017-05-15 17:38:50 +02:00
Restioson
2899246dbc
Fix speaker peripheral API
2017-05-15 17:38:50 +02:00
gegy1000
2444245b80
Speaker rendering and name
2017-05-15 17:38:50 +02:00
Restioson
a748d0167b
Fixed Speaker being recognized as Disk Drive. Massive thanks to @SquidDev
2017-05-15 17:38:50 +02:00
Restioson
6cf1801f7e
Changed method names to camelCaser
2017-05-15 17:38:50 +02:00
Restioson
61c08afc7f
Implemented speaker. It's broken though - thinks it's a Disk Drive
...
~~Damn Tile Entities these days, always with their identity crises~~
2017-05-15 17:38:50 +02:00
Restioson
61dc61d356
Attempt to fix git history #2
2017-05-15 17:36:29 +02:00
Daniel Ratcliffe
7f365c5102
Merge pull request #232 from SquidDev-CC/feature/remove-duplicate-history
...
Do not insert empty or duplicate entries into shell history
2017-05-15 14:00:15 +01:00
SquidDev
63cdc7a72e
Replace reflection with access transformers
...
This makes the code slightly neater and allows us to catch places where
the variable/function has been renamed between versions.
2017-05-14 17:01:14 +01:00
SquidDev
cf7308dbc8
Fix holes appearing in coloured turtles
...
There was a very small gap between the turtle frame and the top of the
turtle body. This increases the height of the body by one pixel, adding
a little bit of overlap and ensuring the frame renders on top fixes
this issue.
2017-05-14 16:02:15 +01:00
SquidDev
b37dbbd0af
Allow dying pocket computers too
...
This splits up the pocket computer textures and models into the frame
(off, on, blinking), colour layer (normal, advanced, custom) and modem
light.
2017-05-14 15:02:56 +01:00
SquidDev
a6b870dfbb
Expand IPocketAccess.getLight/setLight to use RGB colours
...
This allows us to restore the modem light to its original colour.
2017-05-14 14:22:20 +01:00
SquidDev
6426255bd4
Remove getColour and setColour methods from ITurtleAccess
...
This allows us to remove the m_Colour field from TurtleBrain
2017-05-14 14:17:55 +01:00
SquidDev
8c36eccfef
Allow dying turtles arbitrary colours
...
- Makes ITurtleItem implement IColourableItem
- Only cache one turtle item model for all colours, rather than one for
each colour.
- Allow ITurtleAccess to set an arbitrary colour.
2017-05-14 14:17:55 +01:00
SquidDev
88de097c1c
Add more general item colouring system
...
This allows for other items, such as turtles, to be dyed in the future.
This also adds support for the ore dictionary, meaning you can use other
mod's dyes to colour items.
2017-05-14 14:17:54 +01:00
SquidDev
6ccffe9742
Refactor the filesystem and HTTP code
...
- Move the encoding/decoding from the Filesystem implementation to the
individual handles.
- Move each handle into an core.apis.handles package from the main fs
API.
- Move the HTTP response to inherit from these handles.
- Allow binary handles' read function to accept a number, specifying
how many characters to read - these will be returned as a Lua string.
- Add readAll to binary handles
- Allow binary handles' write function to accept a string which is
decoded into the individual bytes.
- Add "binary" argument to http.request and friends in order to return
a binary handle.
- Ensure file handles are open when reading from/writing to them.
- Return the error message when opening a file fails.
2017-05-13 22:47:28 +01:00
Daniel Ratcliffe
2fd01b2adf
Merge pull request #233 from SquidDev-CC/feature/file-handle-errors
...
Provide various error messages for file handles
2017-05-13 21:55:37 +01:00
Daniel Ratcliffe
ea0d688345
Merge pull request #234 from SquidDev-CC/feature/remap-ids
...
Remap all blocks and items to underscore_case
2017-05-13 21:44:10 +01:00
Daniel Ratcliffe
891666c8bf
Merge pull request #220 from SquidDev-CC/feature/item-handler
...
Replace most inventory handling code with IItemHandlers
2017-05-13 21:31:58 +01:00
SquidDev
a328308f67
Switch from using INetwork to IPacketNetwork
2017-05-13 20:43:12 +01:00
SquidDev
e6ef1cfadd
Add packet network API
...
This provides a publically accessible way of interacting with wireless
networks, hopefully extending to wired networks in the future.
Unlike the original INetwork/IReceiver system, networked devices listen
on all channels, filtering when they recieve the packet. This allows
other peripheral mods to be more flexible in their packet handling.
2017-05-13 20:43:10 +01:00
ObloxCC
7f754f33bb
Updated (C) from 2016 to 2017 ( #229 )
...
* Updated (C)
* Fixed Whitespace
bugs, bugs, and more bugs
* Fixed Whitespaces 1/2
* Fixed Whitespaces 2/2
* Fixed Whitespaces 3/2
2017-05-13 19:20:39 +01:00
Wilma456
516bd8cf03
Make shell.programs filter .lua extension
2017-05-13 13:37:18 +02:00
SquidDev
add046cbda
Remap all blocks and items to underscore_case
...
This makes block/model names a little mode consistent and should help
with porting to 1.11.2.
- Prefix all tile entities with "computercraft:".
- Change all "pascalCase" and "CC-*" items to use underscore_case
- Listen to the missing mappings event and gracefully convert
blocks/items.
2017-05-12 13:29:56 +01:00
SquidDev
9908f8c289
Do not insert empty or duplicate entries into shell history
...
If a string is empty or the same as the previous command then it will
not be inserted into history.
2017-05-11 21:01:23 +01:00
Lignum
259fe4b6b4
Remove unnecessary shell.resolveProgram call
2017-05-11 18:12:58 +02:00
SquidDev
b07f28c30c
Replace most inventory handling code with IItemHandlers
...
- Make InventoryUtil deal with item handlers instead. This
significantly simplifies the implementation, the interface now
does most of the hard work.
- Add InvWrapper item handlers to printers, disk drives and turtles
- Add IItemHandlerModifiable accessor to ITurtleAccess
- Migrate all other inventory code (mostly turtle commands) to use
item handlers instead.
2017-05-11 00:00:10 +01:00
Lignum
8acf43256c
Don't sort startup files
...
fs.list is already sorted, making this unnecessary.
2017-05-10 23:27:07 +02:00
Lignum
962e419098
Allow having a startup directory and a startup.lua file simultaneously
2017-05-10 23:21:04 +02:00
Lignum
2e7c9b163d
Enable the use of startup directories
2017-05-10 23:02:08 +02:00
SquidDev
2c63a5f9a3
Provide various error messages for file handles
...
- fs.open will return an error message if the handle cannot be read
- fs and http handles will error when reading from a closed file
2017-05-10 10:52:35 +01:00
Daniel Ratcliffe
25128dfb66
Merge pull request #224 from SquidDev-CC/feature/lowercase-models
...
Lower case most resource names
2017-05-09 20:31:24 +01:00
Daniel Ratcliffe
c049de6939
Merge pull request #221 from SquidDev-CC/feature/nullable-annotations
...
Fix several crashes caused by incorrect NonNull annotations.
2017-05-09 20:00:02 +01:00
SquidDev
82dbaece41
Lower case all resource names
...
- Lower case all model and texture names
- Move model registration code into preInit - this ensures we don't
get texture/model errors in the preInit stage.
2017-05-09 16:37:32 +01:00
SquidDev
93aea371a7
Shovel upgrade converts grass to path blocks
...
Using turtle.dig() with a shovel upgrade on a grass block will create a
path block.
Closes #127
2017-05-09 13:03:12 +01:00
SquidDev
dd63fac8af
Register TurtlePlayer in the entity registry
...
Fixes #143
2017-05-09 12:16:32 +01:00
SquidDev
8b411387f1
Fix several craches caused by incorrect NonNull annotations.
...
Awfully sorry about this. It appears that Minecraft's annotations are
occasionally wrong. IntelliJ will automatically add "not-null" checks on
these annotations, resulting in crashes when they are actually null.
2017-05-09 00:54:15 +01:00
ObloxCC
922818dfa5
Add setPaletteColor and rgb8 to help files ( #214 )
...
* Added rgb8 help
* Update colours
* Added rgb8 help
* Added setPaletteColor help
* Added setPaletteColor help
* Added setColorPalette and rgb8 to change log
* Fixed formatting
* Fixed formatting
* Fixed formatting
* Fixed formatting
* Added changes to change log
* Added changes to whatsnew
* Fixed changelog
* Fixed whatsnew
* Added setPalatteColor
* Fixed Palette spelling
* Added space after 'b'
* Added getPaletteColor
* Ddded getPaletteColor
* Added getPaletteColor()
* Added getPaletteColor
* Update changelog
* Added getPaletteColor
2017-05-07 22:24:32 +01:00
Daniel Ratcliffe
0308ec555a
Merge pull request #207 from SquidDev-CC/feature/cleanup
...
Fix a couple of warnings
2017-05-07 18:26:07 +01:00
Daniel Ratcliffe
008663c0e1
Lua fix
2017-05-07 17:42:39 +01:00
Daniel Ratcliffe
38e09920fa
Lua fix
2017-05-07 17:40:23 +01:00
Daniel Ratcliffe
6fba381a4e
Merge pull request #211 from Lignum/shell-run-lua
...
Make shell.resolveProgram pick up on *.lua files
2017-05-07 17:33:44 +01:00
Daniel Ratcliffe
e063f5a6b8
Merge pull request #197 from Lignum/colour-palettes
...
Modifiable terminal colour palette
2017-05-07 17:31:14 +01:00
Daniel Ratcliffe
0b8b39ced0
colours.rgb8(r,g,b) and colours.rgb8(c) are now the inverse of each other
2017-05-07 17:29:59 +01:00
Daniel Ratcliffe
5f22d8bac6
Enabled setTextColour/setBackgroundColour with all colours on greyscale monitors
...
It's fine, now that we have greyscale rendering
2017-05-07 17:24:45 +01:00
Daniel Ratcliffe
a5e1dad5fc
Enabled term.setText/BackgroundColour with non grey colours on greyscale monitors
...
As rendering is greyscale now, this is fine.
2017-05-07 17:22:49 +01:00
Daniel Ratcliffe
ebb7d7a8d9
Enabled window.setText/BackgroundColour with no grey colours. Some small optimisations
2017-05-07 17:19:21 +01:00
Lignum
c6abf0b890
Make shell.resolveProgram pick up on *.lua files
2017-05-07 16:21:15 +02:00
Lignum
c10e1ba78c
Get rid of setPaletteColour table overload
2017-05-07 15:04:09 +02:00
SquidDev
2e901a063d
Remove accessibility modifiers from all enums and interfaces
2017-05-07 13:35:18 +01:00
SquidDev
5a60818c99
Make many fields final
2017-05-07 13:35:18 +01:00
SquidDev
a3400ecf26
Fix all the deprecated warnings
2017-05-07 13:35:05 +01:00
SquidDev
a2fd0b1f7f
Use block comment instead of Javadoc for license
2017-05-07 13:30:10 +01:00
SquidDev
db9cd15fb3
Remove most raw types
...
This means we can remove even more casts and what not.
2017-05-07 13:30:05 +01:00
SquidDev
9af15d1e30
Remove some unnecessary constructs
...
- Replace for and while loops with for iterators
- Remove unused casts
2017-05-07 13:29:52 +01:00
SquidDev
dc5517303f
Add @Nullable and @NonNull annotations
2017-05-07 13:29:49 +01:00
Lignum
941d47908f
Oh bother
2017-05-07 13:09:51 +02:00
Lignum
0164032a4a
Allow greyscale palettes on basic computers
2017-05-07 13:04:54 +02:00
Lignum
70c2f50aa8
Un-break the non-table setPaletteColour overload
2017-05-07 12:55:16 +02:00
Lignum
54273fc6e5
Add Palette.DEFAULT
2017-05-07 12:51:06 +02:00
Lignum
4e55e03c8b
Don't sync the whole palette in window.setPaletteColour
2017-05-07 12:46:23 +02:00
Lignum
156e74b69c
setColour -> setPaletteColour
2017-05-07 12:40:31 +02:00
SquidDev
8ba5edb6e4
Minor cleanup of pocket computer upgrades
...
- General improvements of the docs.
- Move all ItemStack code to the ItemPocketComputer class
- Make PocketAPI execute on the server thread, rather than the computer
thread
2017-05-07 08:09:36 +01:00
SquidDev
5a4375f6ac
Allow changing the colour of the modem light
...
This now uses an integer between 0 and 15 to represent a colour, rather
than a simple on/off flag.
2017-05-07 08:09:36 +01:00
SquidDev
6020cd55b1
Added documentation and updated changelog/whatsnew
2017-05-07 08:09:36 +01:00
SquidDev
7f8100ae0f
Check the offhand inventory too when searching for upgrades
2017-05-07 08:08:09 +01:00
SquidDev
22631cfc63
Add .equip and .unequip methods to pocket API.
2017-05-07 08:08:09 +01:00
SquidDev
5faceac7ba
Add registry for pocket computer upgrades
2017-05-07 08:08:09 +01:00
Daniel Ratcliffe
ff16868dd8
Merge pull request #206 from Lignum/update-craftos-version
...
Set CraftOS version to 1.8
2017-05-07 00:41:58 +01:00
Lignum
287c6f172c
Allow passing RGB8 hex values to term.setColour
2017-05-07 01:16:48 +02:00
Daniel Ratcliffe
cad10fa2c7
Fixed incorrectness in os.day(). Added os.epoch()
2017-05-06 23:56:28 +01:00
Daniel Ratcliffe
58713caa73
Merge pull request #203 from SquidDev-CC/feature/turtle-models
...
Convert turtle rendering to use tinting
2017-05-06 23:56:13 +01:00
Daniel Ratcliffe
a6e3d4fd26
Merge pull request #195 from SquidDev-CC/hotfix/selection-boxes
...
Fix selection boxes not being shown
2017-05-06 23:55:45 +01:00
SquidDev
f34a319b79
Make cable collision boxes more accurate for cables
...
Each cable segment is added to the list, meaning you can get close and
snugly with the cables.
2017-05-06 23:45:15 +01:00
Lignum
1cc403191f
Add colours.rgb8(r, g, b)/colours.rgb8(hex)
2017-05-07 00:13:36 +02:00
Lignum
2c7ee1d7e7
Bump CraftOS version to 1.8
2017-05-06 23:26:45 +02:00
Daniel Ratcliffe
4b4e041f6f
Merge branch 'master' into master
2017-05-06 22:25:46 +01:00
Daniel Ratcliffe
423d5af87f
Merge pull request #191 from SquidDev-CC/feature/text-illumination
...
Make monitor text glow in the dark
2017-05-06 22:11:28 +01:00
Daniel Ratcliffe
5b6bbc3cbf
Merge pull request #200 from Lignum/fs-weak-set
...
Replace WeakHashMap for open files with a weak set
2017-05-06 21:44:28 +01:00