|
|
| Line 1: |
Line 1: |
| =MoLang Types=
| |
| Cobblemon uses [https://github.com/bedrockk/MoLang Bedrockk MoLang] to parse and execute MoLang. This is a table of types used in Cobblemon as documented, and the class it extends from.
| |
|
| |
|
| =MoLang Functions=
| |
| {| class="wikitable fixed-header sortable"
| |
| !Name!!Type!!Description
| |
| |-
| |
| |<code>MoValue</code>
| |
| |Class
| |
| |This is the parent class of all values. Does nothing on it's own, can be treated like <code>Any</code> in Kotlin.
| |
| |-
| |
| |<code>DoubleValue</code>
| |
| |Subclass of MoValue
| |
| |Doubles are also used as Integers and Booleans.
| |
| |-
| |
| |<code>StringValue</code>
| |
| |Subclass of MoValue
| |
| |Represents a String.
| |
| |-
| |
| |<code>MoStruct</code>
| |
| |Subclass of MoValue
| |
| |Used like a map, can get or set using a string key.
| |
| |-
| |
| |<code>VariableStruct</code>
| |
| |Subclass of MoStruct
| |
| |A struct that can get and set values.
| |
| |-
| |
| |<code>ArrayStruct</code>
| |
| |Subclass of VariableStruct
| |
| |A struct that uses integers as keys. NOTE: For the purpose of documentation, ArrayStruct is notated as <code>ArrayStruct<Type></code> when only one type is expected. All <code>ArrayStruct</code>s have no required types and can be mixed.
| |
| |-
| |
| |<code>QueryStruct</code>
| |
| |Subclass of MoStruct
| |
| |A struct that contains functions that can be executed using get. Does not support setting values.
| |
| |-
| |
| |<code>ObjectValue</code>
| |
| |Subclass of QueryStruct
| |
| |Cobblemon class used to implement many types. Can get the value of the type, get a double value using <code>asDouble()</code>, and get a string value using <code>asString()</code>. This is used for Players, Pokémon, Battles, and the rest of our implemented Minecraft and Cobblemon types. These may have special functions which are listed below.
| |
| |}
| |