1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2024-06-28 16:13:22 +00:00
Commit Graph

620 Commits

Author SHA1 Message Date
JackMacWindows
e0a288bcb9
Add the ability to call cc.expect directly 2021-05-19 20:14:13 -04:00
Lupus590
28165bfcd6
Add cc.expect.range (#790) 2021-05-17 17:49:48 +01:00
Jonathan Coates
e10e30f82b Use a separate region for the bottom pocket computer border
This is definitely not a good solution, but it's probably the best we
can do right now given resizable computers are a thing.

Fixes #775, closes #776
2021-05-16 18:40:18 +01:00
Jonathan Coates
aeb1fa0e7e Optimise all textures
using "optipng -o7 -strip all". I ran this a few years ago and had some
issues, but aren't seeing any problems now. I don't know if this is a
graphics card change, or just optipng fixed some bugs.

These are fairly minimal changes, but hopefully save a few bytes!
2021-05-16 18:00:47 +01:00
Jonathan Coates
b0e30fdce1 Use lightGrey for folders on normal computers
This way we still get some differences between files and folders on
normal computers. I did try with just green, but I think the contrast is
too low.

Closes #656
2021-05-05 22:10:19 +01:00
Jonathan Coates
bc8e090873 Simplify our overrides of load/loadstring
- Remove auto-prefixing of load/loadstring
 - Use Cobalt's normal load implementation, with a simple hook to
   set _ENV on the environment.
2021-05-04 18:30:28 +01:00
Jonathan Coates
cf0f67265f Correctly handle sparse arrays in cc.pretty
This also swaps the order we display mixed array/maps in, so that the
array part comes first. I think this is more sensible.

Closes #777
2021-05-04 18:05:56 +01:00
Jonathan Coates
eb2d617ed8 Add a pre commit hook to lint code
This uses pre-commit [1] to check patches are well formed and run
several linters on them. We currently do some boring things (check files
are syntactically valid) as well as some project-specific ones:
 - Run illuaminate on the Lua files
 - Run checkstyle on Java

[1]: https://pre-commit.com/
2021-04-28 21:24:27 +01:00
Jonathan Coates
058d63e77f Add citation to cc.pretty
ust to look extra pretentious.
2021-04-11 18:43:24 +01:00
Jonathan Coates
17b5bca443 Make the peripheral API examples a little clearer 2021-04-07 18:34:55 +01:00
Jonathan Coates
51d3b091da "Finish" documentation for several modules
- Add remaining docs for the turtle API
 - Add documentation for the fluid storage peripheral.
 - Enforce undocumented warning for most modules (only io and window
   remaining).

"Finish" in quotes, because these are clearly a long way from perfect.
I'm bad at writing docs, OK!
2021-04-03 12:45:54 +01:00
lily
9708dd6786
Fixed sortCoords for draw functions (#749) 2021-04-02 15:30:28 +01:00
Jonathan Coates
e48427dbbc Add documentation for io.setvbuf
Fixes #746.

Love how "good first issue" guarantees that nobody will do it. Not
actually true, and thank you for those people who have contributed!
2021-03-28 19:38:25 +01:00
Wojbie
32d956bbe7 Fix missing term.setCursorBlink(true) in edit.lua 2021-03-19 16:07:20 +01:00
Jonathan Coates
66e42e0817 Bump version to 1.95.3 2021-03-12 09:19:16 +00:00
Wojbie
1f70ed6985
Make edit display errors/results of execution and handle require. (#723) 2021-02-23 20:50:19 +00:00
Weblate
8f3ea60c74 Translations for Portuguese (Brazil)
Co-authored-by: Matheus Medeiros Souza <mmedeiros.cbp@gmail.com>
2021-02-21 13:42:57 +00:00
Jonathan Coates
1316d6a3c9 Migrate all examples to use tweaked.cc
Might as well, I've got the server capacity to spare. Hopefully.
2021-01-23 14:58:08 +00:00
FensieRenaud
763bab80fa Serialise sparse arrays into JSON (#685) 2021-01-18 20:48:33 +00:00
Jonathan Coates
ee27d8f081 Bump version to 1.95.2 2021-01-16 11:18:59 +00:00
Wojbie
c83eeb16a8
id.lua now handles more disk types (#677)
Co-authored-by: Lupus590 <lupussolitarius590@gmail.com>
2021-01-15 19:30:21 +00:00
Jonathan Coates
fd262a7995 Clarify the cc.strings.wrap docs a little
Also make the example a bit more "useful". Hopefully this should clarify
that the function returns a table rather than a single string.

Closes #678.
2021-01-14 09:12:37 +00:00
Wojbie
1f84480a80
Make rightAlt only close menu, never open it. (#672)
Fixes #669
2021-01-11 21:59:29 +00:00
Wojbie
b2e5401486
Added Numpad Enter Support in rom lua programs. (#657) 2021-01-07 21:41:04 +00:00
Jonathan Coates
cc5e972cfc Bump version to 1.95.1
Will actually release tomorrow - it's getting quite late right now.
2021-01-06 22:39:26 +00:00
Jonathan Coates
72340defe4 Update illuaminate
- Fix doc library-path
 - Only style <pre> code blocks as executable. Skip <code> ones.
 - Document the default parameters in gps. Yes, we should do it
   everywhere, but one has to start somewhere!
2021-01-06 17:42:47 +00:00
Jonathan Coates
b8d5a89446 Add explicit @module annotation
This feels like a bug - it should be inferred automatically.
2020-12-25 17:42:53 +00:00
Jonathan Coates
7f9a707f75 Bump version to 1.95.0
As is tradition.
2020-12-25 16:40:50 +00:00
Jonathan Coates
ed3913c1f4
Manually wrap strings for help (#602)
This saves us writing to a buffer multiple times, and so makes things much,
much faster.
2020-12-23 16:33:58 +00:00
Lupus590
16d74dd2e8 Add functions to wrap text 2020-12-23 16:21:04 +00:00
TheWireLord
b97e950d86 Added Numpad Enter Support - bios.lua
Add the ability to use Numpad Enter and have it act just like normal Enter.
(Just like the web-based emulator on the Tweaked.cc wiki)
2020-12-12 16:45:02 -05:00
JackMacWindows
24d3777722
Added improved help viewer (#595)
- Pagination, with (page) up/down, q(uit) and scrolling support.
 - Render markdown style bullets ('-'/'*') using a '•' instead.
2020-12-02 19:22:12 +00:00
Jonathan Coates
511eea39a1
Remove <!-- -->s in usages
We fixed the bug in illuaminate, so this should be redundant now.
2020-11-28 17:53:07 +00:00
SquidDev
6734a0e112 Also generate computer models
I'm getting quite addicted to this. Maybe less savings than monitors,
but still worth doing due to the number of files created.

Also fix our angle calculations for monitors. Thankfully we hadn't
shipped this yet :).
2020-11-28 12:06:46 +00:00
SquidDev
04f9644ae7 Allow strings or numbers in textutils.*tabulate
A little dubious, but apparently CC used to support it. This means we're
consistent with methods like io.write or string.len which accept strings
or numbers.

Fixes #591
2020-11-27 21:29:11 +00:00
JackMacWindows
486f41f082
Fixed length check on function name in expect (#589) 2020-11-26 19:46:03 +00:00
Lupus590
fff8353451
Remove extra space (#586) 2020-11-21 12:25:19 +00:00
Lupus590
9a749642d2
Strict Globals (#583) 2020-11-21 12:11:40 +00:00
SquidDev
c35707725f More examples
Yay!
2020-11-20 21:59:17 +00:00
SquidDev
b0651082f4 Cleanup examples for the various modules 2020-11-20 19:36:28 +00:00
SquidDev
aab0cd34cd Use term.blit on original paint render
This makes it super speedy, meaning an initial refresh doesn't take ages
to load.
2020-11-20 15:06:47 +00:00
Luca
d2a1a00dc4
Clear gets an option to reset the palette (#582)
Fixes #555.
2020-11-17 12:53:20 +00:00
SquidDev
7f90f2f7ca Clean up some examples a little bit
Would be good if they didn't crash and burn on entry :).
2020-11-12 19:40:18 +00:00
SquidDev
c8aeddedd4 Auto-generate monitor models
I didn't think it was worth it, and then I found myself needing to
update a dozen of them. The code isn't especially pretty, but it works,
so that's fine.

Also fixes several issues with us using the wrong texture (closes #572).
I've put together a wiki page[1] which describes each texture in a
little more detail.

[1] https://github.com/SquidDev-CC/CC-Tweaked/wiki/Monitor-texture-reference
2020-11-11 21:14:53 +00:00
SquidDev
74ac5bb3d1 Bump to 1.94.0 2020-11-07 12:43:57 +00:00
Lupus590
d13bd2cce8
use arg[0] in all usage printouts (#571) 2020-11-04 14:03:08 +00:00
SquidDev
cc96e41d3e Remove stray copy-paste error from changelog 2020-11-03 14:37:24 +00:00
Drew Lemmy
741adfa7bb
Use blit to draw boxes, add colors.toBlit (#570) 2020-11-01 19:28:18 +00:00
SquidDev
666e83cf4f Fix JSON objects failing to pass
Maybe I should run the whole test suite, not just the things I think
matter? Nah....
2020-11-01 11:48:19 +00:00
SquidDev
c58441b29c Various SNBT parsing improvements
Correctly handle:
 - Typed arrays ([I; 1, 2, 3])
 - All suffixed numbers (1.2d)
 - Single-quoted strings

Fixes #559
2020-11-01 11:36:48 +00:00