1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-09-06 12:27:56 +00:00

Flesh out MemoryMount into a writable mount

This moves MemoryMount to the main core module, and converts it to be a
"proper" WritableMount. It's still naively implemented - definitely
would be good to flesh out our tests in the future - but enough for what
we need it for.

We also do the following:
 - Remove the FileEntry.path variable, and instead pass the path around
   as a variable.
 - Clean up BinaryReadableHandle to use ByteBuffers in a more idiomatic
   way.
 - Add a couple more tests to our FS tests. These are in a bit of an odd
   place, where we want both Lua tests (for emulator compliance) and
   Java tests (for testing different implementations) - something to
   think about in the future.
This commit is contained in:
Jonathan Coates
2023-09-29 22:14:54 +01:00
parent e7a1065bfc
commit 96b6947ef2
20 changed files with 616 additions and 228 deletions

View File

@@ -23,7 +23,7 @@ internal object LoaderOverrides {
private const val FABRIC_ANNOTATION: String = "dan200.computercraft.annotations.FabricOverride"
fun hasOverrideAnnotation(symbol: Symbol.MethodSymbol, state: VisitorState) =
ASTHelpers.hasAnnotation(symbol, Override::class.java, state)
ASTHelpers.hasAnnotation(symbol, "java.lang.Override", state)
fun getAnnotation(flags: ErrorProneFlags) = when (flags.get("ModLoader").orElse(null)) {
"forge" -> FORGE_ANNOTATION