Skip to content
This repository has been archived by the owner on Dec 4, 2022. It is now read-only.

KTS Support

Pre-release
Pre-release
Compare
Choose a tag to compare
@Doomsdayrs Doomsdayrs released this 04 Jun 04:45
· 38 commits to development since this release
87dc4a7
KTS Scripting implemented (#17)

* ByteArray return implemented.

To lower overhead and provide greater abstraction on what can be returned from an extension

- IExtension.kt; getPassage return changed to ByteArray
- LuaExtension.kt; use checkstring to get the byte array of that string (which can be easily decoded to a string). Lua strings are just bytearrays. So this works fine.
- Test.kt; Implemented bytearray decoding

* KTS Scripting implemented

This implements KTS extension support. Included are additional libraries, some minor changes to the way libs are handled

- build.gradle.kts; Updated kotlin, Updated dokka, Implemented scripting support
- ExtensionType.kt; Defines the type of extension
- javax.script.ScriptEngineFactory; Definition to use the kts script engine
- KtsExtension.kt; Delegated class that redirects to the parsed kts script
- names.kt; Added json type parameter for extension type
- RepoData.kt; RepoExtension now has a type parameter
- ShosetsuKtsLib.kt; translation of ShosetsuLuaLib.kt for KTS
- ShosetsuSharedLib.kt; httpClient is now located here to be shared
- ShosetsuLuaLib.kt; now uses ShosetsuSharedLib.kt, old httpClient is deprecated
- Test.kt; Modified to use path values instead and patched for KTS support using ExtensionType.kt