Package com.unciv.scripting.protocol

Types

Blackbox
Link copied to clipboard
interface Blackbox

Unified interface for anything that receives and responds to input without any access to or relevance for its internal states.

ScriptingPacket
Link copied to clipboard
data class ScriptingPacket(action: String?, identifier: String?, data: JsonElement?, flags: Collection<String>)

Implementation of IPC packet specified in Module.md.

ScriptingProtocol
Link copied to clipboard
class ScriptingProtocol(scope: Any, instanceSaver: MutableList<Any?>?)

Implementation of IPC communication protocol specified in Module.md.

ScriptingProtocolReplManager
Link copied to clipboard
class ScriptingProtocolReplManager(scope: Any, blackbox: Blackbox) : ScriptingReplManager

REPL manager that uses the IPC protocol defined in ScriptingProtocol.kt to communicate with a black box. Suitable for presenting arbitrary access to Kotlin/JVM state to scripting APIs. See Module.md for a detailed description of the REPL loop.

ScriptingRawReplManager
Link copied to clipboard
class ScriptingRawReplManager(scope: Any, blackbox: Blackbox) : ScriptingReplManager

REPL manager that sends and receives only raw code and prints raw strings with a black box. Allows interacting with an external script interpreter, but not suitable for exposing Kotlin-side API in external scripts.

ScriptingReplManager
Link copied to clipboard
abstract class ScriptingReplManager(scope: Any, blackbox: Blackbox) : ScriptingImplementation
SubprocessBlackbox
Link copied to clipboard
class SubprocessBlackbox(processCmd: Array<String>) : Blackbox

Blackbox that launches and wraps a child process, allowing interacting with it using a common interface.