-
Notifications
You must be signed in to change notification settings - Fork 5
actions
Actions are what all codeblocks use to know what is being done.
Not all actions are used but are left in df for legacy support. They are called legacy actions and have an icon of STONE and no name or description. Ranks stay.
Tag names ending with ? are optional, and don't always appear.
All actions follow the data pattern:
{
name: string,
codeblockName: string, // This isn't the internal reference, and is instead the top line name, ex `PLAYER ACTION`
tags: Tag[], // See #tags
aliases: string[], // Alternate ways of refering to the action, likely used in helpbot.
icon: Icon, // See https://github.com/GeorgeRNG/dfonline/wiki/icon
subActionBlocks?: ["if_player","if_game","if_var"] | ["if_entity","if_game","if_var"] | ["if_player","if_entity","if_game","if_var"]
}
5 codeblocks have subActionBlocks, and to summarise the massive type, it goes a bit like [if_player],[if_entity],if_game,if_var
It is to represent what types of codeblocks can be used for a condition on a subAction block.
You can always do an if_game or if_var
For filtering on an entity, you can't do an if_player
For filtering on a player, you can't do an in_entity
For doing a While, you can do both
Tags are used for block tags, stored in an array, A tag follows the pattern:
{
name: string, // The name of the action, displayed at the top.
option: Option[], // An array of the options. See below.
defaultOption: string // The name of the default option.
}
{
name: string,
icon: Icon,
aliases: string[] // Alternate ways to refer to a tag, usage unknown.
}
The arguments appear not be stored in the main object, and in the icon. See arguments