TreeScript

abstract class TreeScript : AbstractScript

Functions

addPaint
Link copied to clipboard
fun addPaint(paint: Paint)
canBreak
Link copied to clipboard
open fun canBreak(): Boolean
clearPaints
Link copied to clipboard
fun clearPaints()
getNullValue
Link copied to clipboard
fun getNullValue(option: OptionType): Any?
getOption
Link copied to clipboard
fun <T> getOption(key: String): T?
initOptions
Link copied to clipboard
fun initOptions()

This is clumsy but since we are not distributing Jackson and already have GSON included, building options now throw NoClassDef

onPause
Link copied to clipboard
open fun onPause()
onResume
Link copied to clipboard
open fun onResume()
onStart
Link copied to clipboard
open fun onStart()
onStop
Link copied to clipboard
open fun onStop()
paints
Link copied to clipboard
fun paints(): List<Paint>
poll
Link copied to clipboard
open override fun poll()
removePaint
Link copied to clipboard
fun removePaint(paint: Paint)
showOptionsDialog
Link copied to clipboard
open fun showOptionsDialog(onCompletion: () -> Unit)
startScript
Link copied to clipboard
fun startScript()

Call this method in a Script's psvm main(args: String[]) make instance of script you want to run in emulator call startScript from that instance and script jar will be created, dexified and uploaded to android device

fun startScript(useDefaultConfigs: Boolean)
fun startScript(deviceHost: String, useDefaultConfigs: Boolean)
fun startScript(deviceHost: String, accountName: String, useDefaultConfigs: Boolean)
startScriptWithAutodiscovery
Link copied to clipboard
fun startScriptWithAutodiscovery(accountName: String = "", useDefaultConfigs: Boolean)
updateAllowedOptions
Link copied to clipboard
fun updateAllowedOptions(key: String, update: Array<String>)
updateEnabled
Link copied to clipboard
fun updateEnabled(key: String, enabled: Boolean)
updateOption
Link copied to clipboard
fun <T> updateOption(key: String, value: T?, type: OptionType)
updateVisibility
Link copied to clipboard
fun updateVisibility(key: String, visibility: Boolean)

Properties

controller
Link copied to clipboard
lateinit var controller: ScriptController

An instance of the ScriptController that controls this script

lastLeaf
Link copied to clipboard
var lastLeaf: Leaf<*>
log
Link copied to clipboard
val log: Logger

The {@link java.util.logging.Logger} which should be used to print debugging messages.

manifest
Link copied to clipboard
val manifest: ScriptManifest

An instance of the manifest of this script

options
Link copied to clipboard
lateinit var options: List<ScriptConfigurationOption<*>>
rootComponent
Link copied to clipboard
abstract val rootComponent: TreeComponent<*>

Root component of the script, this is the start of the Tree's logic flow