Toggle
A custom version of Apoli's Toggle (Power Type)
Type ID: ra_additions:toggle
Fields
| Field | Type | Default | Description |
|---|---|---|---|
active_by_default |
Boolean | optional | Whether this power starts in the on or off state. |
retain_state |
Boolean | optional | Whether this power switches back to default if the condition is no longer met. |
toggle_on_action |
Entity Action | optional | The entity action to be executed when the power is toggled on. |
toggle_off_action |
Entity Action | optional | The entity action to be executed when the power is toggled off. |
key |
Backwards Compatible Key | optional | Which active key this power should respond to. |
Example
{
"type": "ra_additions:toggle",
"active_by_default": false,
"key": {
"key": "key.use"
}
}
This example will provide a switch that is not active by default, and can be toggled with the key.use keybind.