1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2024-06-28 08:03:21 +00:00
Commit Graph

135 Commits

Author SHA1 Message Date
Bomb Bloke
756d297c85 Update worm.lua
Fix #368
2017-07-11 10:24:36 +10:00
SquidDev
e664eb26a9 Fix several global definitions
There were a couple of programs which were defining global variables, or
referencing undefined ones. This fixes all problems in the main rom files.
2017-07-08 11:31:30 +00:00
SquidDev
1ab5094b7f Only delete indent when at the beginning of a line
edit currently deletes the previous 4 spaces when pressing backspace,
wherever you are on the line. This can be frustrating when you are
trying to align text in comments or strings.

This changes edit to only delete 4 spaces if all preceding characters
are whitespace, otherwise it only deletes a single character.
2017-07-08 12:07:30 +01:00
Wojbie
87406bc00d Tweak to Colon syntax lua autocompletition.
Changes autocompletition to only complete function names (Or table names treated as functions via __call metamethod) after the colon symbol.
2017-07-07 02:30:57 +02:00
Wojbie
224e752a8f Tweak to Go and Turn autocompletition.
Adds spaces to simplyfy making chains of commands.  Also fix up turn not autocompleting after first argument.
2017-07-07 02:18:24 +02:00
Daniel Ratcliffe
1d63598d43 Merge pull request #338 from Wilma456/textcheck
Add Checks to Textutils API
2017-06-29 19:04:37 +01:00
Wilma456
5e244273c2 Allow Number and Table 2017-06-29 17:58:53 +02:00
Wilma456
13f886be5a Add Checks to disk,gps,help and keys 2017-06-29 16:41:48 +02:00
Wilma456
845e1b633d Merge branch 'master' into textcheck 2017-06-29 16:24:30 +02:00
Wilma456
6a8c544914 Feedback from dan200 2017-06-29 16:18:13 +02:00
Daniel Ratcliffe
123a0158af Merge pull request #313 from SquidDev-CC/feature/http-blacklist
HTTP blacklist and IP address support
2017-06-28 22:36:14 +01:00
Daniel Ratcliffe
14e4d037ad Merge pull request #317 from Wojbie/Mixed-lua-side-improvements
Multiple fixes and feature fixes for lua side of CC.
2017-06-28 22:25:18 +01:00
Daniel Ratcliffe
025af6a0a0 Merge pull request #329 from Wilma456/pocketequip
Add equip and unequip for Pocket Computers
2017-06-28 22:06:35 +01:00
Wojbie
f247879d98 Re-add Colon syntax support to edit. 2017-06-28 23:06:06 +02:00
Wojbie
bf533dd00a Reverting requested changes. Take 1
Reverting rewrites to painutils, paint and edit - keept the paste logic change in edit.
Changed and removed misc parts as requested in PR.
2017-06-28 22:58:57 +02:00
Daniel Ratcliffe
22066a96dd Merge pull request #335 from Wilma456/shellcheck
Add Checks to Shell and Multishell
2017-06-28 21:20:04 +01:00
Wilma456
6bbd1f3718 Add Checks to Textutils API 2017-06-26 15:21:52 +02:00
Wojbie
6255314ba8 Fir error in http.request _post error cheacking code and add package.config to shell require code to support standard better. 2017-06-24 14:33:29 +02:00
Wojbie
fc93ee474f Merge branch 'master' into Mixed-lua-side-improvements 2017-06-24 14:29:19 +02:00
Wilma456
13ed933c6b Add Checks to Shell and Multishell 2017-06-23 18:33:11 +02:00
Wilma456
fb5ba01e5a Add Checks to Colors API 2017-06-23 17:38:40 +02:00
Wojbie
7090f6b6a7 Make settings API getNames() function sort names.
Makes it easier for eye and keeps settings from same program next to eachother.
2017-06-23 01:07:18 +02:00
Wilma456
01c024d8b0 Add equip and unequip for Pocket Computers 2017-06-22 14:05:42 +02:00
Bomb Bloke
d9190f95ec Update paintutils.lua
Couple of fixes, plus let's not use maxn when blitting images after all. Load method ensures it isn't needed.
2017-06-21 23:41:40 +10:00
Daniel Ratcliffe
174b63d59a Merge pull request #309 from Wilma456/execcom
Add autocompletion to exec
2017-06-19 20:44:21 +01:00
Bomb Bloke
a7db108762 Update paintutils.lua 2017-06-19 13:46:13 +10:00
Bomb Bloke
be861a1c0d Fix Bug with peripheral.find()
Since #315 peripheral.find() doesn't work. This PR fix this.
2017-06-19 13:09:06 +10:00
Wojbie
1489da1f5f Adds support for colon operator in complete() function.
Includes changes to lua and edit programs to correctly support that too.
2017-06-19 01:15:26 +02:00
Wojbie
7e08662b95 Assorted fixes to rednet, textutils, gps, chat.
As reported by @SquidDev.
2017-06-18 17:12:08 +02:00
Wilma456
4580f10567 Fix Bug with peripheral.find() 2017-06-18 15:58:06 +02:00
Wojbie
06b2f3511f Update paintutils.lua
Make error messages consistent with new system.
Fix some type errors and fix problem noticed by @BombBloke.
2017-06-18 12:03:14 +02:00
Wojbie
3acbdb2f90 Merge branch 'master' into Mixed-lua-side-improvements 2017-06-17 22:21:25 +02:00
Wojbie
01a0ce3dd0 Implements suggested changes. 2017-06-17 22:14:04 +02:00
Wojbie
efb351e1b0 Modification of edit.lua to use blit in writeHighlighted
Reduces amount of string operations and write calls inside writeHighlighted function by switching it to blit and using the 3rd argument in string.match.
2017-06-16 23:13:53 +02:00
Bomb Bloke
221143e767 Update paintutils.lua
Resolve a few potential bugs.
2017-06-15 00:23:40 +10:00
Bomb Bloke
34ac28066e Create paint.lua
General re-write for speed; much less likely to fail yield protection when attempting to draw the canvas.
2017-06-15 00:16:16 +10:00
Wojbie
9472d30dfc Update startup.lua
Removed code better implemented by @Wilma456
2017-06-14 03:11:47 +02:00
SquidDev
eb628e9b62 Make error messages more consistent 2017-06-13 19:33:42 +01:00
Bomb Bloke
8e958d7a13 Update paintutils.lua
Remove drawPixelInternal / drawLineHorizontal. At runtime they're both just excess calls.
Localise high-use term functions.
Arg-related function errors reflect that "colour" parameter is optional.
Add saveImage(tImage, sPath).
Use term.blit for images.
2017-06-13 23:44:07 +10:00
Wojbie
76a3562d58 Multiple fixes and feature fixes for lua side of CC
In no particular order:
bios.lua - added missing test for ensure turtle folder exists.
paintutils.lua - added drawLineHorizontal() to reduce most (not all) cases of running multiple writes on same horizontal line that can be solved with one write.
textutils.lua - Added exception to complete function - will not complete if provided with LuaKeyword - solves do->dofile problem and removes other LuaKeyword related ones in advance.
edit.lua - Changed logic in handling the paste event - if paste event is received when menu is open it automatically closed said menu and lets it paste - resolves ctrl+ctrl+v annoyance. Added Jump to Menu functions - allows for fast jump to needed line - must for bigger files and a nice feature to have.
set.lua - Switched set to use pagedPrint - this will ensure that even if there are more settings than lines on screen the set command will show you all of them.
startup.lua - Added autocompletition for turtle programs go, turn, equip, unequip and command program exec.
lua.lua - Changed return function to print returned stuff correctly -
will print all returned variables even if there are any nils in there.
2017-06-13 11:00:07 +02:00
SquidDev
585c769c2a Restructure the HTTP API
- Adds support for blacklisting domains
 - Adds support for blacklisting & whitelisting IP addresses and
   IP ranges.
 - Reuse threads for HTTP requests

AddressPredicate will parse a series of patterns and convert them into
regexes or CIDR ranges. When checking whether an address is accessible,
we first ensure the domain is whitelisted and isn't blacklisted.

If everything is OK, then we start create a new thread for the HTTP
request and resolve the IP, ensuring that is whitelisted & not
blacklisted. Then the normal HTTP request is continued.

However, http.checkURL also needs to resolve the IP address. In order to
avoid blocking the Lua thread, this method will return instantly and
create a new thread which will queue an event.

As both http.request and http.checkURL are now creating threads and
queuing events, some logic is abstracted into a separate HTTPTask class
- this allows us to share the thread creation, finishing and cancelling
logic.
2017-06-12 19:22:02 +01:00
SquidDev
fac625173a Use Lua style error messages in the rom files
This makes it mostly consistent with the Java APIs, and makes debugging
significantly easier.
2017-06-12 10:54:44 +01:00
Wilma456
9e9df37c40 Add autocompletion to exec 2017-06-07 16:51:23 +02:00
Daniel Ratcliffe
0f982e6199 Merge pull request #303 from Wojbie/Window-api-fix
Fix to setPaletteColour in rgb8 mode.
2017-06-04 13:58:40 +01:00
Daniel Ratcliffe
4f3be7963e Merge pull request #304 from Wilma456/windowcheck
Add checks to window API
2017-06-04 13:57:51 +01:00
Wojbie
60e9ce1b68 Fix to redirection game.
Was not testing for correct file type. Game ended after first lvl cause it was looking from wrong name of file.
2017-06-04 14:51:49 +02:00
Wilma456
c9bf463419 Add checks to window API 2017-06-04 12:34:40 +02:00
Wojbie
a90e2a8bfd Fix to setPaletteColour in rgb8 mode.
Was not saving color if called using rgb8 mode.
2017-06-04 11:59:30 +02:00
Daniel Ratcliffe
3828750ade Merge pull request #302 from Wojbie/Wget-binary-mode
Switch wget to use binary mode.
2017-06-03 21:32:45 +01:00
Wilma456
fd842be37f Remove second fix 2017-06-03 16:30:35 +02:00