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

1619 Commits

Author SHA1 Message Date
Weblate
6ce88a7dcf Translations for Norwegian Bokmål
Co-authored-by: Erlend <erlend.bergersen@sandnesskolen.no>
2022-07-26 13:17:57 +00:00
Weblate
5d65b3e654 Added translation for Norwegian Bokmål
Co-authored-by: Erlend <erlend.bergersen@sandnesskolen.no>
2022-07-24 15:45:46 +00:00
Erlend
abf857f864
Clearify GPS documentation note (#1139) 2022-07-22 20:27:27 +00:00
Jonathan Coates
b28c1ac8e0
Test various time locales exist
Not clear if we can really test their behaviour too much.

See 69b211b4fb.
2022-07-21 09:44:40 +01:00
Jonathan Coates
ba976f9a16
Fix monitor depth blocker being too small
This allowed you to see transparent blocks through the bottom/right
margins of the monitor when using the VBO renderer.
2022-07-16 22:07:15 +01:00
Luiz Krüger
969feb4a1c
ItemGroup info on getItemDetail (#1127) 2022-07-16 20:30:20 +00:00
JackMacWindows
bd5de11ad5
Add WAV support to speaker program (#1112) 2022-07-09 08:59:35 +01:00
Jonathan Coates
5366fcb9c8
Point people towards the http.rules config option
Rather than blanket disabling http with http.enabled. I think it's still
useful to keep the option around, but hopefully make it clearer what the
ramifications are.
2022-07-08 22:13:39 +01:00
heap-underflow
4cfd0a2d1c
Fix off-by-1 error in generic inventory's getItemLimit() (#1131) 2022-07-08 07:44:13 +00:00
Jonathan Coates
be3a960273
Check for duplicate ids when registering channels
Should prevent #1130 occurring again. Possibly worth submitting a PR to
Forge for this too.
2022-07-08 08:27:37 +01:00
Jonathan Coates
56f0e0674f
Fix term.blit failing on substrings
Hahah. Serves me right for trying to optimise too much. Fixes #1123.
2022-07-02 16:47:43 +01:00
Toad-Dev
51c3a9d8af
Fix z-fighting on bold printout borders.
- Changed page background to render as one quad, instead of two halves.
- Set page background to a z-offset that is between zeroth (potentially
  bold border) and subsequent background pages. Bold borders were at the
  same z-offset before.
2022-07-02 11:24:40 +01:00
Johnny Irvin
b7fa4102df
Fix spell err Turtle API Doc
* `throug` -> `through`
2022-07-01 09:19:11 -04:00
Jonathan Coates
d1e952770d
Bump version to 1.100.8 2022-06-23 20:44:14 +01:00
Jonathan Coates
6d5b13dbbc
Revert "Switch over to using SLF4J"
This reverts commit b7f698d6f7.

Apparently slf4j is on the classpath in dev but not in live. Will apply
this on 1.18 and later instead.
2022-06-20 19:52:23 +01:00
Jonathan Coates
b7f698d6f7
Switch over to using SLF4J
No bearing on MC, but allows us to drop the depenedency in other
projects (CCEmuX, eval.tweaked.cc, etc...)

I'd quite like to spin the core into a separate project which doesn't
depend on MC at all, but not worth doing right now.
2022-06-19 11:10:53 +01:00
Jonathan Coates
93f3cd4a53
Fix lock code being null for newly placed blocks
This causes an NPE when serialising or opening printers and disk drives.
Fixes #1109
2022-06-16 07:56:54 +01:00
Jonathan Coates
1e044aed68
Bump version to 1.100.6 2022-06-09 23:41:43 +01:00
Jonathan Coates
cbbb34cdd4
Normalise language files again
Weblate keeps making things uppercase >_>
2022-06-09 08:43:19 +01:00
Weblate
ca58e39707 Translations for Ukrainian
Co-authored-by: RobloMinerYT <svatoslatus2005@gmail.com>
2022-06-07 04:23:27 +00:00
Weblate
0aac966239 Added translation for Ukrainian
Co-authored-by: RobloMinerYT <svatoslatus2005@gmail.com>
2022-06-06 11:55:10 +00:00
Jonathan Coates
0e1e8dfa8c
Add recipes to more pages
Might be better if we had pages for each block, but this'll do for now.
2022-06-05 12:20:07 +01:00
Jonathan Coates
a1cbc1d803
Fix turtles not preserving their lock when moving 2022-06-04 15:30:42 +01:00
Jonathan Coates
b91809bfc7
Move some eldritch horrors to another directory
Also fix make-doc.sh uploading the wrong file.
2022-06-01 01:02:26 +01:00
Jonathan Coates
178126725e
Add more eldritch horrors to the build system
- Add a basic data exporter to the test mod, run via a /ccexport
   command. This dumps all of CC's recipes, and the item icons needed to
   display those recipes.

 - Post-process our illuaminate HTML, applying several transforms:
    - Apply syntax highlighting to code blocks. We previously did this
      at runtime, so this shaves some bytes off the bundle.

    - Convert a mc-recipe custom element into a recipe grid using
      react/react-dom.

 - Add a recipe to the speaker page. I'll probably clean this up in the
   future (though someone else is free to too!), but it's a nice
   start and proof-of-concept.

I tried so hard here to use next.js and MDX instead of rolling our own
solution again, but it's so hard to make it play well with "normal"
Markdown, which isn't explicitly written for MDX.
2022-06-01 00:48:36 +01:00
Jonathan Coates
cd76425877
Tiny bits and bobs
Oh my, what good commit discipline!

 - Remove unused method in NetworkHandler.
 - Correctly pass the transformation to ComputerBorderRenderer.
2022-05-30 17:42:33 +01:00
Jonathan Coates
4411756b06
Use a queue rather than a set in TickScheduler
We now track whether a tile is enqueued or not via an atomic boolean on
the block entity itself, rather than using a hash set. This is
significantly faster (>10x).

This is mostly intended for monitors, as they're the only peripheral
likely to call TickScheduler.schedule lots of times (rather than modems,
which just invoke it when opening/closing a channel[^1])[^2]. This
change is enough to allow me to update 120 monitors each tick without
any major tearing.

[^1]: GPS does do this on each gps.locate call, so it will help there,
but modems are typically limited by other computers sending messages,
not peripheral calls themselves.

[^2]: Note that montitors implement their own change tracking, so still
only call this once per tick. But it's enough to introduce some latency!
2022-05-30 14:25:51 +01:00
Jonathan Coates
1fd57a874f
Send terminal text and colours separately
This gives us slightly better compression, as backgrounds will often be
a single run of colours while the foreground won't be.

In practice, this is rarely an issue, as most terminals are small, but
worth doing anyway.
2022-05-30 13:44:11 +01:00
Jonathan Coates
3f0704624e
Fix location of DFPWM test 2022-05-30 13:36:36 +01:00
Jonathan Coates
3b6cd783cb
Don't allow modems to be used in adventure mode
This (along with computer locking) should be Good Enough for BlanketCon.
2022-05-28 09:23:23 +01:00
Jonathan Coates
ab22726883
Preserve on-state of pocket computers
This is far less robust than block-based computers, but I don't think it
needs to be. Fixes #1097 Or closes? Unclear - I'm counting this as a
bug.
2022-05-27 22:23:04 +01:00
Jonathan Coates
2efad38f53
Allow computers and inventories to be locked
Just like vanilla locking, this isn't accessible in survival.

> "im retired! im retired!!", i continue to insist as i slowly shrink
> and transform into a corn cob.
2022-05-27 22:22:54 +01:00
Drew Edwards
8b89d88d04
Allow other mods to provide extra item/block details (#1101) 2022-05-24 22:21:18 +01:00
Drew Edwards
bbc0afa111 Make ComputerScreenBase methods extendable 2022-05-23 17:13:17 +01:00
Drew Edwards
34dc915d57
Add validation to printer slots (#1099) 2022-05-23 16:02:12 +00:00
Jonathan Coates
24ed0ca723
Try to remove some flakiness in tests
- Make assertions a little more relaxed
 - Increase timeouts of computer tests (again :D:).
 - Log where we're up to in computer tests, to make tracking stalls a
   little easier
2022-05-23 10:26:18 +01:00
Jonathan Coates
431e4c9419
Some reformatting to config comments
- Rewrap everything at 80 columns. To make this tolerable I'm using
   IDEA's language fragment support - hence the absurd line lengths.

 - Add full stops to all comments.

 - Clarify that HTTP rules are applied in-order.
2022-05-22 14:34:31 +01:00
Jonathan Coates
2639b84eb2
Deprecate IArguments.releaseImmediate
This is only ever defined (and called) within the ILuaMachine-specific
code. Not sure why I ever made this public.
2022-05-22 14:05:04 +01:00
Fayne Aldan
f05a539443
Fix typo in documentation 2022-05-13 13:41:52 -06:00
Wojbie
a7536ea4fa Add important leading /
Fixes #1094
2022-05-10 22:30:10 +02:00
Chick Chicky
d9e75d7c47
Added parse_empty_array to textutils.unserialiseJSON (#1092)
Fixes #1089.
2022-05-08 09:53:02 +00:00
Jonathan Coates
78334c4cb1
Fix counts in /computercraft {turn-on,shutdown}
We were using the size of the selectors (which is normally 1) rather
than the number of computers.
2022-05-07 20:17:44 +01:00
JackMacWindows
f5f0c7990a
Add note about special JSON values in docs for textutils.unserializeJSON (#1058) 2022-05-07 10:10:25 +00:00
Jonathan Coates
87a1c1a525
Some minor documentation fixes
- Add a TOC to the Local IPs page.
 - Increase the echo delay in our speaker audio page to 1.5s. This
   sounds much better and is less clashy than 1s. Also add a
   sleep(0) (eww, I know) to fix timeouts on some browsers/computers.
 - Move Lua feature compat to a new "reference" section. Still haven't
   figured out how to structure these docs - open to any ideas really.
 - Mention FFmpeg as an option for converting to DFPWM (closes #1075).
 - Allow data-mount to override built-in files. See my comment in #1069.
2022-05-05 13:27:33 +01:00
Jonathan Coates
be45b718b3
Correctly mark reify as CLIENT 2022-05-05 00:23:38 +01:00
Jonathan Coates
ad2d1d6a05
Merge branch 'feature/optimise-timeouts' into mc-1.16.x 2022-05-04 18:29:08 +01:00
Jonathan Coates
65a7370db1
Rethink how computer timeouts are handled
Previously we would compute the current timeout flags every 128
instructions of the Lua machine. While computing these flags is
_relatively_ cheap (just get the current time), it still all adds up.

Instead we now set the timeout flags from the computer monitor/watchdog
thread. This does mean that the monitor thread needs to wake up more
often[^1] _if the queue is full_, otherwise we can sleep for 100ms as
before.

This does mean that pausing is a little less accurate (can technically
take up 2*period instead). This isn't great, but in practice it seems
fine - I've not noticed any playability issues.

This offers a small (but measurable!) boost to computer performance.

[^1]: We currently sleep for scaledPeriod, but we could choose to do less.
2022-05-04 12:33:14 +01:00
Jonathan Coates
03b0244084
Minor improvements to resetting code
- Reset state while the server is starting rather than once it has
   started. Hopefully fixes a weird issue where wireless modems wouldn't
   be "connected" on server startup.

 - Correctly reset the MainThread metrics on server start/stop.
2022-05-04 11:31:59 +01:00
Jonathan Coates
6322e72110
Add a test harness for ComputerThread
Geesh, this is nasty. Because ComputerThread is incredibly stateful, and
we want to run tests in isolation, we run each test inside its own
isolated ClassLoader (and thus ComputerThread instance).

Everything else is less nasty, though still a bit ... yuck. We also
define a custom ILuaMachine which just runs lambdas[^1], and some
utilities for starting those.

This is then tied together for four very basic tests. This is sufficient
for the changes I want to make, but might be nice to test some more
comprehensive stuff later on (e.g. timeouts after pausing).

[^1]: Which also means the ILuaMachine implementation can be changed by
other mods[^2], if someone wants to have another stab at LuaJIT :p.

[^2]: In theory. I doubt its possible in practice because so much is
package private.
2022-05-03 22:58:28 +01:00
Jonathan Coates
7ad6132494
Move VarargArguments factory to VarargArguments itself 2022-05-03 18:51:34 +01:00