public enum TAMEOperation extends java.lang.Enum<TAMEOperation> implements OperationType, TAMEConstants
Enum Constant and Description |
---|
ADDCUE
Adds a cue to the response.
|
ADDOBJECTNAME
Adds an object name to an object.
|
ADDOBJECTTAG
Adds an object tag to an object.
|
ADDOBJECTTAGTOALLIN
Adds an object tag to every object in a container-type.
|
ARITHMETICFUNC
[INTERNAL] Arithmetic function.
|
ASBOOLEAN
Casts a value to boolean.
|
ASFLOAT
Casts a value to float.
|
ASINT
Casts a value to integer.
|
ASLIST
Casts a value to a list with one element.
|
ASSTRING
Casts a value to string.
|
BREAK
[INTERNAL] Throws a BREAK interrupt.
|
BROWSE
Calls the appropriate "onBrowse" blocks on objects in an object container.
|
BROWSETAGGED
Calls the appropriate "onBrowse" blocks on objects in an object container that have the provided tag.
|
CALLELEMENTFUNCTION
[INTERNAL] Calls an element function.
|
CALLFUNCTION
[INTERNAL] Calls a function.
|
CEILING
Gets the arithmetic ceiling of a number.
|
CLAMP
Returns the clamping of a number in an inclusive interval.
|
CLEARELEMENTVALUE
[INTERNAL] Clears a variable from object member.
|
CLEARVALUE
[INTERNAL] Clears a variable from blocklocal or object member.
|
CONTINUE
[INTERNAL] Throws a CONTINUE interrupt.
|
COS
Returns cosine of a number.
|
CURRENTPLAYERIS
Checks if the current player is the one provided.
|
CURRENTROOMIS
Checks if the current room is the one provided.
|
E
Returns Euler's number in this implementation.
|
ELEMENTHASANCESTOR
Returns true if the first element has the second element in its lineage.
|
EMPTY
Gets if a a value is "empty."
POP is the value.
|
END
[INTERNAL] Throws an END interrupt.
|
FINISH
[INTERNAL] Throws a FINISH interrupt.
|
FIX
Fixed rounding: rounds a number to the nearest place after/before the decimal point.
|
FLOOR
Gets the arithmetic floor of a number.
|
FOR
[INTERNAL] FOR block.
|
FRANDOM
Returns a random number from 0.0 (inclusive) to 1.0 (exclusive).
|
FUNCTIONRETURN
[INTERNAL] Return from function.
|
GIVEOBJECT
Adds an object to an object container.
|
GRANDOM
Returns a Gaussian-distribution random number using a provided mean and standard deviation.
|
HASOBJECT
Checks if an object is owned by an object container.
|
HEADER
Pushes the value of a header value of the TAME module.
|
IDENTITY
Pushes the identity of an element onto the stack.
|
IF
[INTERNAL] If block.
|
IRANDOM
Returns a random number from 0 to input-1.
|
ISREGEX
Tests if a string is a valid RegEx.
|
LENGTH
Gets the length of a value.
|
LISTADD
Adds a value to the end of the list.
|
LISTADDAT
Adds a value to an index in the list, shifting contents.
|
LISTCONCAT
Concatenates two lists and creates a new list.
|
LISTCONTAINS
Searches for the existence of a value in the list, starting from the beginning.
|
LISTINDEX
Gets the index of a value in the list, starting from the beginning.
|
LISTNEW
Makes a new list with a specific length.
|
LISTREMOVE
Removes a value from the list, if the value is found in it, shifting contents.
|
LISTREMOVEAT
Removes a value from the list by index, shifting contents.
|
MAX
Returns the maximum of two numbers.
|
MIN
Returns the minimum of two numbers.
|
MOVEOBJECTSWITHTAG
Moves objects with a specific tag from a container and puts them in another.
|
NOCURRENTPLAYER
Checks if there is no current player.
|
NOCURRENTROOM
Checks if there is no current room.
|
NOOP
Does nothing.
|
OBJECTCOUNT
Counts the objects in a container.
|
OBJECTHASNAME
Checks if an object has a specific name.
|
OBJECTHASNOOWNER
Checks if an object has no owner.
|
OBJECTHASTAG
Checks if an object has a specific tag.
|
PAUSE
Adds a PAUSE cue to the response.
|
PI
Returns PI in this implementation.
|
PLAYERCANACCESSOBJECT
Checks if a player can access a particular item.
|
PLAYERHASROOMINSTACK
Checks if a player has a room in its room stack.
|
POP
[INTERNAL] Pops a value off the stack.
|
POPELEMENTVALUE
[INTERNAL] Sets a variable on a object.
|
POPLISTVALUE
[INTERNAL] Sets an index in a list-valued variable on a object.
|
POPLOCALVALUE
[INTERNAL] Pops a value into a local variable.
|
POPROOM
Pops a room off of the room stack (for the current player).
|
POPVALUE
[INTERNAL] Pops a value into a variable in the topmost context in the execution, or the locals if defined.
|
PUSHELEMENTVALUE
[INTERNAL] Resolves value of a variable on an object and pushes the value.
|
PUSHINITLIST
[INTERNAL] Pushes a new list, initialized with values.
|
PUSHLISTVALUE
[INTERNAL] Pushes a list-valued variable from the topmost context.
|
PUSHNEWLIST
[INTERNAL] Pushes a new empty list.
|
PUSHROOM
Pushes a room onto the room stack (for the current player).
|
PUSHTHIS
[INTERNAL] Pushes the element connected to the current context.
|
PUSHVALUE
[INTERNAL] Pushes a value or variable from the topmost context.
|
QUEUEACTION
[INTERNAL] Enqueues a general action to perform after the current one finishes.
|
QUEUEACTIONFOROBJECTSIN
[INTERNAL] Enqueues a transitive action to perform after the current one finishes for each object.
|
QUEUEACTIONFORTAGGEDOBJECTSIN
[INTERNAL] Enqueues a transitive action to perform after the current one finishes for each object.
|
QUEUEACTIONOBJECT
[INTERNAL] Enqueues a transitive action to perform after the current one finishes.
|
QUEUEACTIONOBJECT2
[INTERNAL] Enqueues a ditransitive action to perform after the current one finishes.
|
QUEUEACTIONSTRING
[INTERNAL] Enqueues an open/modal action to perform after the current one finishes.
|
QUIT
[INTERNAL] Adds a QUIT cue to the response and throws a QUIT interrupt.
|
REGEXCONTAINS
Tests if a string contains a pattern matched by a RegEx.
|
REGEXFIND
Tests if a string contains a pattern matched by a RegEx.
|
REGEXFINDLAST
Tests if a string contains the last pattern matched by a RegEx.
|
REGEXGET
Gets the first matching substring in a string that matches a RegEx.
|
REGEXGETALL
Gets all matching substrings in a string that matches a RegEx.
|
REGEXGETLAST
Gets the last matching substring in a string that matches a RegEx.
|
REGEXMATCHES
Gets if a whole string matches a RegEx.
|
REGEXREPLACE
Replaces each occurrence of a RegEx match with a string expression.
|
REGEXSPLIT
Splits a string into many via a RegEx.
|
REMOVEOBJECT
Removes an object from its owner, whatever it is.
|
REMOVEOBJECTNAME
Removes an object name from an object.
|
REMOVEOBJECTTAG
Removes an object tag from an object.
|
REMOVEOBJECTTAGFROMALLIN
Removes an object tag from every object in a container-type.
|
ROUND
Rounds a number to the nearest number.
|
SETPLAYER
Sets the current player.
|
SETROOM
Sets the current room and clears the stack (for the current player).
|
SIN
Returns sine of a number.
|
SQRT
Gets the square root of a number.
|
STRCHAR
Gets a single character from a string.
|
STRCONCAT
Concatenates two strings together.
|
STRCONTAINS
Returns if a character sequence exists in a given string.
|
STRENDSWITH
Gets if a string ends with a particular sequence of characters.
|
STRINDEX
Returns the index of where a character sequence starts in a string.
|
STRJOIN
Returns a string that is the result of joining a list of strings together with a string in between each element.
|
STRLASTINDEX
Returns the last possible index of where a character sequence starts in a string.
|
STRLOWER
Gets a string converted to lowercase.
|
STRPARAM
Replaces parts of a string with "{X}" with objects in a list.
|
STRREPLACE
Replaces the first occurrence of a string with another.
|
STRREPLACEALL
Replaces every occurrence of a string with another.
|
STRREPLACELAST
Replaces the last occurrence of a string with another.
|
STRSPLIT
Returns a string split into a list of strings using a string for matching the delimitation.
|
STRSTARTSWITH
Gets if a string starts with a particular sequence of characters.
|
STRTRIM
Gets a string trimmed of whitespace at both ends.
|
STRUPPER
Gets a string converted to uppercase.
|
SUBSTRING
Gets a substring from a larger one.
|
SWAPROOM
Pops a room off of the room stack and pushes a new one (for the current player).
|
TAN
Returns tangent of a number.
|
TEXT
Adds a TEXT cue to the response.
|
TEXTF
Adds a TEXTF cue to the response.
|
TEXTFLN
Adds a TEXTF cue to the response with a newline appended to it.
|
TEXTLN
Adds a TEXT cue to the response with a newline appended to it.
|
TIME
Returns the current UTC time in milliseconds since the epoch.
|
TIMEFORMAT
Formats a date/time as a string.
|
WAIT
Adds a WAIT cue to the response.
|
WHILE
[INTERNAL] WHILE block.
|
Modifier and Type | Field and Description |
---|---|
static TAMEOperation[] |
VALUES
Array to get around multiple allocations.
|
CUE_ERROR, CUE_FATAL, CUE_PAUSE, CUE_QUIT, CUE_TEXT, CUE_TEXTF, CUE_TRACE, CUE_WAIT, DEFAULT_FUNCTION_DEPTH, DEFAULT_RUNAWAY_THRESHOLD, HEADER_AUTHOR, HEADER_COUNTRY, HEADER_EMAIL, HEADER_LANGUAGE, HEADER_TAME_FUNCDEPTH_MAX, HEADER_TAME_RUNAWAY_MAX, HEADER_TITLE, HEADER_TWITTER, HEADER_VERSION, HEADER_WEBSITE, IDENTITY_ARCHETYPE_CONTAINER, IDENTITY_CURRENT_PLAYER, IDENTITY_CURRENT_ROOM, IDENTITY_CURRENT_WORLD, RETURN_VARIABLE
Modifier and Type | Method and Description |
---|---|
protected void |
doOperation(TAMERequest request,
TAMEResponse response,
ValueSet blockLocal,
Operation operation)
Performs the operation.
|
void |
execute(TAMERequest request,
TAMEResponse response,
ValueSet blockLocal,
Operation operation)
Increments the runaway operation counter and calls the operation.
|
ArgumentType[] |
getArgumentTypes()
Returns the argument types that this operation expects.
|
java.lang.String |
getGrouping()
Gets the grouping name for this operation (for documentation sorting).
|
ArgumentType |
getReturnType()
Returns the return types that this operation return.
|
boolean |
isInternal()
Is this an internal operation type?
Internal operations are not exposed to the parser.
|
static TAMEOperation |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static TAMEOperation[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final TAMEOperation ADDCUE
public static final TAMEOperation ADDOBJECTNAME
public static final TAMEOperation ADDOBJECTTAG
public static final TAMEOperation ADDOBJECTTAGTOALLIN
public static final TAMEOperation ARITHMETICFUNC
public static final TAMEOperation ASBOOLEAN
public static final TAMEOperation ASFLOAT
public static final TAMEOperation ASINT
public static final TAMEOperation ASLIST
public static final TAMEOperation ASSTRING
public static final TAMEOperation BREAK
public static final TAMEOperation BROWSE
public static final TAMEOperation BROWSETAGGED
public static final TAMEOperation CALLELEMENTFUNCTION
public static final TAMEOperation CALLFUNCTION
public static final TAMEOperation CEILING
public static final TAMEOperation CLAMP
public static final TAMEOperation CLEARELEMENTVALUE
public static final TAMEOperation CLEARVALUE
public static final TAMEOperation CONTINUE
public static final TAMEOperation COS
public static final TAMEOperation CURRENTPLAYERIS
public static final TAMEOperation CURRENTROOMIS
public static final TAMEOperation E
public static final TAMEOperation ELEMENTHASANCESTOR
public static final TAMEOperation EMPTY
public static final TAMEOperation END
public static final TAMEOperation FINISH
public static final TAMEOperation FIX
public static final TAMEOperation FLOOR
public static final TAMEOperation FOR
public static final TAMEOperation FRANDOM
public static final TAMEOperation FUNCTIONRETURN
public static final TAMEOperation GIVEOBJECT
public static final TAMEOperation GRANDOM
public static final TAMEOperation HASOBJECT
public static final TAMEOperation HEADER
public static final TAMEOperation IDENTITY
public static final TAMEOperation IF
public static final TAMEOperation IRANDOM
public static final TAMEOperation ISREGEX
public static final TAMEOperation LENGTH
public static final TAMEOperation LISTADD
public static final TAMEOperation LISTADDAT
public static final TAMEOperation LISTCONCAT
public static final TAMEOperation LISTCONTAINS
public static final TAMEOperation LISTINDEX
public static final TAMEOperation LISTNEW
public static final TAMEOperation LISTREMOVE
public static final TAMEOperation LISTREMOVEAT
public static final TAMEOperation MAX
public static final TAMEOperation MIN
public static final TAMEOperation MOVEOBJECTSWITHTAG
public static final TAMEOperation NOCURRENTPLAYER
public static final TAMEOperation NOCURRENTROOM
public static final TAMEOperation NOOP
public static final TAMEOperation OBJECTCOUNT
public static final TAMEOperation OBJECTHASNAME
public static final TAMEOperation OBJECTHASNOOWNER
public static final TAMEOperation OBJECTHASTAG
public static final TAMEOperation PAUSE
public static final TAMEOperation PI
public static final TAMEOperation PLAYERCANACCESSOBJECT
public static final TAMEOperation PLAYERHASROOMINSTACK
public static final TAMEOperation POP
public static final TAMEOperation POPELEMENTVALUE
public static final TAMEOperation POPLISTVALUE
public static final TAMEOperation POPLOCALVALUE
public static final TAMEOperation POPROOM
public static final TAMEOperation POPVALUE
public static final TAMEOperation PUSHELEMENTVALUE
public static final TAMEOperation PUSHINITLIST
public static final TAMEOperation PUSHLISTVALUE
public static final TAMEOperation PUSHNEWLIST
public static final TAMEOperation PUSHROOM
public static final TAMEOperation PUSHTHIS
public static final TAMEOperation PUSHVALUE
public static final TAMEOperation QUEUEACTION
public static final TAMEOperation QUEUEACTIONFOROBJECTSIN
public static final TAMEOperation QUEUEACTIONFORTAGGEDOBJECTSIN
public static final TAMEOperation QUEUEACTIONOBJECT
public static final TAMEOperation QUEUEACTIONOBJECT2
public static final TAMEOperation QUEUEACTIONSTRING
public static final TAMEOperation QUIT
public static final TAMEOperation REGEXCONTAINS
public static final TAMEOperation REGEXFIND
public static final TAMEOperation REGEXFINDLAST
public static final TAMEOperation REGEXGET
public static final TAMEOperation REGEXGETALL
public static final TAMEOperation REGEXGETLAST
public static final TAMEOperation REGEXMATCHES
public static final TAMEOperation REGEXREPLACE
public static final TAMEOperation REGEXSPLIT
public static final TAMEOperation REMOVEOBJECT
public static final TAMEOperation REMOVEOBJECTNAME
public static final TAMEOperation REMOVEOBJECTTAG
public static final TAMEOperation REMOVEOBJECTTAGFROMALLIN
public static final TAMEOperation ROUND
public static final TAMEOperation SETPLAYER
public static final TAMEOperation SETROOM
public static final TAMEOperation SIN
public static final TAMEOperation SQRT
public static final TAMEOperation STRCHAR
public static final TAMEOperation STRCONCAT
public static final TAMEOperation STRCONTAINS
public static final TAMEOperation STRENDSWITH
public static final TAMEOperation STRINDEX
public static final TAMEOperation STRJOIN
public static final TAMEOperation STRLASTINDEX
public static final TAMEOperation STRLOWER
public static final TAMEOperation STRPARAM
public static final TAMEOperation STRREPLACE
public static final TAMEOperation STRREPLACEALL
public static final TAMEOperation STRREPLACELAST
public static final TAMEOperation STRSPLIT
public static final TAMEOperation STRSTARTSWITH
public static final TAMEOperation STRTRIM
public static final TAMEOperation STRUPPER
public static final TAMEOperation SUBSTRING
public static final TAMEOperation SWAPROOM
public static final TAMEOperation TAN
public static final TAMEOperation TEXT
public static final TAMEOperation TEXTF
public static final TAMEOperation TEXTFLN
public static final TAMEOperation TEXTLN
public static final TAMEOperation TIME
public static final TAMEOperation TIMEFORMAT
public static final TAMEOperation WAIT
public static final TAMEOperation WHILE
public static final TAMEOperation[] VALUES
public static TAMEOperation[] values()
for (TAMEOperation c : TAMEOperation.values()) System.out.println(c);
public static TAMEOperation valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic boolean isInternal()
OperationType
isInternal
in interface OperationType
public ArgumentType getReturnType()
OperationType
getReturnType
in interface OperationType
public ArgumentType[] getArgumentTypes()
OperationType
getArgumentTypes
in interface OperationType
protected void doOperation(TAMERequest request, TAMEResponse response, ValueSet blockLocal, Operation operation) throws TAMEInterrupt
request
- the TAMERequest context.response
- the TAMEResponse object.blockLocal
- the local variables on the block call.operation
- the operation origin.TAMEInterrupt
- if an interrupt occurs.public java.lang.String getGrouping()
public final void execute(TAMERequest request, TAMEResponse response, ValueSet blockLocal, Operation operation) throws TAMEInterrupt
execute
in interface OperationType
request
- the request object.response
- the response object.blockLocal
- the local variables on the block call.operation
- the operation object.TAMEInterrupt
- if an interrupt occurs.