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

19 Commits

Author SHA1 Message Date
Jonathan Coates
af5d816798
Use spotless for enforcing licenses
It's more verbose as the default license plugin doesn't support multiple
license headers. However, it also gives us some other goodies (namely
formatting Kotlin and removing unused imports), so worth doing.
2022-10-22 18:19:51 +01:00
Jonathan Coates
5d833ac634
Expose getters for the detail registry too (#1188) 2022-10-22 00:42:07 +01:00
Jonathan Coates
c0d20b72c9
Remove ClientTerminal/ServerTerminal
They bring very little to the table now that computers do their own
thing! This also helps simplify the code in ServerMonitor a bit - turns
out we had two "dirty" flags in the implementation!
2022-10-21 19:00:29 +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
Drew Edwards
8b89d88d04
Allow other mods to provide extra item/block details (#1101) 2022-05-24 22:21:18 +01: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
9d50d6414c
Happy new year
Should be the last time I'll have to do this!
2022-01-01 00:09:34 +00:00
Jonathan Coates
c2dc8bf675
Rewrite monitor resizing
- Some improvements to validation of monitors. This rejects monitors
   with invalid dimensions, specifically those with a width or height
   of 0. Should fix #922.

 - Simplify monitor collapsing a little. This now just attempts to
   resize the four "corner" monitors (where present) and then expands
   them if needed. Fixes #913.

 - Rewrite monitor expansion so that it's no longer recursive. Instead
   we track the "origin" monitor and replace it whenever we resize to
   the left or upwards.

   Also add a upper bound on the loop count, which should prevent things
   like #922 happening again. Though as mentioned above, validation
   should prevent this anyway.

 - Some small bits of cleanup to general monitor code.

I have absolutely no confidence that this code is any better behaved
than the previous version. Let's find out I guess!
2021-11-24 13:35:57 +00:00
Jonathan Coates
ab6b861cd6
Move repo to cc-tweaked org
Let's see how this goes.
 - Update references to the new repo
 - Use rrsync on the server, meaning make-doc.sh uploads relative to the
   website root.
 - Bump Gradle wrapper to 7.2. Not related to this change, but possibly
   fixes running under Java 16. Possibly.
2021-10-17 18:14:32 +01:00
Jonathan Coates
d700f1f500
Bump the image comparison threshold again
Not sure what the right long-term solution is here. An alternative image
comparison? Take multiple screenshots?
2021-10-03 11:21:37 +01:00
Jonathan Coates
cf2bc667c1
Add more tests for monitor and printout rendering 2021-09-26 11:10:41 +01:00
Jonathan Coates
662bead8be
Several fixes and improvements for client tests
- Fix broken /cctest marker
 - Correctly wait for the screenshot to be taken before continuing.
 - Filter out client tests in a different place, meaning we can remove
   the /cctest runall command
 - Bump kotlin version
2021-09-26 09:48:58 +01:00
Jonathan Coates
d3a5d1e314
Add tests for transmitting via wired modems
It crashes on 1.17 right now, so worth checking!
2021-08-20 18:35:00 +01:00
Jonathan Coates
56010382fb
Rethink how computers run tests in game
Instead of using ids for each computer each computer is spawned with id
0 but has a label which matches up to its test name. This has several
advantages:

 - No more confusing IDs: the test code now just does thenComputerOk()
   and that's it - the computer to track is inferred from the test name.
 - All files are stored on one computer, which means we can write code
   which is shared between tests.
2021-08-20 17:05:27 +01:00
Jonathan Coates
0ff6b0ca70
Client-side tests
This spins up a Minecraft instance (much like we do for the server) and
instructs the client to take screenshots at particular times. We then
compare those screenshots and assert they match (modulo some small
delta).
2021-08-20 17:05:13 +01:00
Jonathan Coates
4b33306940
Refactor the test code to be closer to 1.17
Basically mimic the actual API that Minecraft would expose if the
methods hadn't been stripped. Lots of ATs and unsafe hacks to get this
working, but thankfully the API we can expose to the user is pretty
nice. Yay for Kotlin?

Anyway, will cause some immediate pain (yay merge conflicts) but should
make keeping the two in sync much easier.
2021-08-20 17:05:13 +01:00
Jonathan Coates
4dea3dff36
Move some Forge hooks into a separate class 2021-08-20 17:05:13 +01:00
Jonathan Coates
62baa72457
Add some tests for wired modems 2021-08-18 12:55:58 +01:00
Jonathan Coates
5eb711da87
Relocate test mod to testMod source set
This'll be fun to rebase 1.17 on to :).
2021-08-18 12:55:58 +01:00