1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-08-30 09:07:55 +00:00
Commit Graph

2255 Commits

Author SHA1 Message Date
Jummit
2a290be248 Bump version to 1.95.0
As is tradition.
v1.95.0-beta
2021-05-16 01:26:56 +02:00
Jummit
c4a6c16330 Manually wrap strings for help (#602)
This saves us writing to a buffer multiple times, and so makes things much,
much faster.
2021-05-16 01:26:43 +02:00
Jummit
f8b3b544d1 Add functions to wrap text 2021-05-16 01:26:32 +02:00
Jonathan Coates
53ae689468 Fix licence issues
I knew I shouldn't do modding on things which aren't my main computer.

I actually did run checkstyleMain before committing, but entirely forgot
about this one. Go me.
2021-05-16 01:26:21 +02:00
Merith
73e460e533 Merge Commits from Jummit/cc-restitched PR20 2021-05-15 08:05:59 -07:00
Jummit
a4e68d637a Make upgrade recipe requirements a little more lax
- Move some common upgrade code to IUpgradeBase. 99% sure this this
   preserves binary compatibility (on the JVM at least).

 - Instead of requiring the share tag to match, allow upgrades to
   specify their own predicate. IMO this is a little ugly, but required
   to fix #614 as other mods chuck their own NBT on items.
2021-05-16 00:50:24 +02:00
Jonathan Coates
1f1b20c81e Fix overflow in os.epoch
Closes #611
2021-05-16 00:10:49 +02:00
Jonathan Coates
20a9ff7a3f Fix double URL decode
Closes #613
2021-05-16 00:10:40 +02:00
Jonathan Coates
58cd5e3df7 Fix copy-paste error in inventory docs
I'm a very silly squid.
2021-05-16 00:10:19 +02:00
Jonathan Coates
5922d7548c Merge pull request #606 from TheWireLord/numpadenter-support
Added Numpad Enter Support - bios.lua
2021-05-16 00:06:13 +02:00
Merith
386e01364e Merge Commits from Jummit/cc-restitched PR19 2021-05-15 06:53:14 -07:00
Jummit
70eff6aa63 Skip "Docs for energy and inventory methods" 2021-05-15 20:34:30 +02:00
SquidDev
45ac601946 Generate docs for generic peripherals
This was the easy bit. Now I've got to write them!
2021-05-15 20:21:15 +02:00
SquidDev
d6c5a5bd27 Some sanity checks for get{Direction,Orientation}
Silly bodge, but should fix #600.
2021-05-15 20:18:04 +02:00
SquidDev
02c7903cb7 Remove a couple of todos 2021-05-15 20:06:21 +02:00
Jummit
37e856efdc Skip 737b3cb5
Don't use capabilities for generic peripherals
2021-05-15 20:04:51 +02:00
Merith-TK
8a38097887 [Patchwork] fix github workflow 2021-05-15 06:46:23 -07:00
Jonathan Coates
de646b66b6 Allow turtles to use compostors 2021-05-14 18:32:52 +01:00
Jonathan Coates
4f0d311df7 Add example to turtle.inspect
A pretty common but non-trivial API, so worth having something. Even if
not perfect.
2021-05-14 18:06:51 +01:00
Merith
884b417ec2 Merge Commits from Jummit/cc-restitched
SquidDev-CC/CC-Tweaked@511eea3
SquidDev-CC/CC-Tweaked@826797c
SquidDev-CC/CC-Tweaked@24d3777
SquidDev-CC/CC-Tweaked@d83a68f
2021-05-14 06:16:56 -07:00
JackMacWindows
1d1d6227eb Added improved help viewer (#595)
- Pagination, with (page) up/down, q(uit) and scrolling support.
 - Render markdown style bullets ('-'/'*') using a '•' instead.
2021-05-14 21:36:08 +02:00
Jummit
d5eb82db60 Allow $private HTTP rule to block any private IP
This is a little magic compared with our previous approach of "list
every private IP range", but given then the sheer number we were
missing[1][2] this feels more reasonable.

Also refactor out some of the logic into separate classes, hopefully to
make things a little cleaner.
2021-05-14 21:31:03 +02:00
JackMacWindows
3575654d02 Added documentation for global functions (#592) 2021-05-14 19:37:54 +02:00
Jonathan Coates
79fcc7241b Remove <!-- -->s in usages
We fixed the bug in illuaminate, so this should be redundant now.
2021-05-14 18:51:10 +02:00
Jonathan Coates
d6e3c9a7fa Add inventory.getItemLimit
Closes #781
2021-05-13 18:12:49 +01:00
Jonathan Coates
a7a724f134 Bump Cobalt version 2021-05-13 18:09:08 +01:00
Merith-TK
b203d3aa0a Try to handle a turtle being broken while ticked
Hopefully fixes #585. Hopefully.
2021-05-07 15:05:00 -07:00
Merith-TK
f1176af9d1 Make fs.combine accept multiple arguments
Means we can now do fs.combine("a", "b", "c"). Of course, one may just
write "a/b/c" in this case, but it's definitely useful elsewhere.

This is /technically/ a breaking change as fs.combine(a, b:gsub(...))
will no longer function (as gsub returns multiple arguments). However,
I've done a quick search through GH and my Pastebin archives and can't
find any programs which would break. Fingers crossed.
2021-05-07 13:27:04 -07:00
Merith-TK
717686d855 Allow strings or numbers in textutils.*tabulate
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
2021-05-07 11:26:24 -07: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
4e15afa254 Add tests for placing monitors from turtles (#691) 2021-05-05 21:49:25 +01:00
Jonathan Coates
84bac06178 Merge remote-tracking branch 'baeuric/mc-1.15.x' into mc-1.15.x 2021-05-05 21:46:47 +01:00
Jonathan Coates
1fecb995c9 Don't close file handles from ResourceMounts
Unlike short handles, we don't read these immediately, and so we can't
close it right away. Otherwise the file is considered empty!

Fixes SquidDev-CC/treasure-programs#1
2021-05-05 21:26:17 +01:00
Euric
99b719299c Defer monitor tile update when placed by another TE 2021-05-04 14:24:58 -07:00
Jonathan Coates
fb9590467d Add some examples to inventory methods
Closes #761. It's not perfect, but it's a little better. Maybe??
2021-05-04 19:23:35 +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
53dd15a213 Clean up language scripts 2021-04-28 21:28:52 +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
74dae4ec17 That's it, I'm adding pre-commit hooks 2021-04-28 08:19:09 +01:00
Jonathan Coates
abbc46877b Remove mavenLocal() repository
Hopefully should bump to the latest Cobalt version too
2021-04-28 08:05:58 +01:00
Jonathan Coates
3cb25b3525 Various VM tests
These are largely copied across from Cobalt's test suite, with some
minor tweaks. It actually exposed one bug in Cobalt, which is pretty
nice.

One interesting thing from the coroutine tests, is that Lua 5.4 (and
one assumes 5.2/5.3) doesn't allow yielding from within the error
handler of xpcall - I rather thought it might.

This doesn't add any of the PUC Lua tests yet - I got a little
distracted.

Also:
 - Allow skipping "keyword" tests, in the style of busted. This is
   implemented on the Java side for now.
 - Fix a bug with os.date("%I", _) not being 2 characters wide.
2021-04-27 22:25:46 +01:00
Jummit
92811ca0bc fix mouse_up events not being emitted
fixes #11
2021-04-24 19:03:35 +02:00
Jonathan Coates
f387730b88 Merge branch 'mc-1.15.x' into mc-1.16.x 2021-04-24 11:50:23 +01:00
Jonathan Coates
92b45b1868 Switch to using maven-publish
The old maven package is removed in Gradle 7.0. Instead, we publish to
squiddev.cc using WebDAV (ewww).
2021-04-24 11:26:04 +01:00
Jonathan Coates
003c7ec2e8 Fix Forge maven location
1.16 is going to be sad for a while, as I need to work out FG 4 woes.
2021-04-23 22:40:20 +01:00
Merith-TK
f8a58dbcb1 Fixed length check on function name in expect (#589) 2021-04-22 11:54:56 -07:00
Merith-TK
98aabe2cfb Remove extra space (#586) 2021-04-22 11:43:58 -07:00
Merith-TK
f938ed9779 Strict Globals (#583) 2021-04-22 11:35:15 -07:00
Merith-TK
03c9274b27 More examples
Yay!
2021-04-22 11:23:31 -07:00