Class ConditionalBlock<T, Action, Target>Abstract

Type Parameters

Hierarchy

Constructors

  • Create a new conditional codeblock.

    Type Parameters

    • T extends "repeat" | "call_func" | "func" | "start_process" | "process" | "player_action" | "if_player" | "control" | "set_var" | "entity_event" | "event" | "if_entity" | "entity_action" | "if_var" | "select_obj" | "game_action" | "else" | "if_game"

    • Action extends string

    • Target extends DFTarget = DFTarget

    Parameters

    • type: T

      Type of the codeblock.

    • action: Action

      The action to check for.

    • args: DFValueType[]

      Arguments to pass.

    • isInverted: boolean = false

      If the condition is inverted.

    • target: Target = ...

      Target of the action.

    Returns ConditionalBlock<T, Action, Target>

Properties

_componentName: string = "serializable"

The component's name

_internalTemplate: Template = ...

Inside template.

action: Action

The action to check for.

args: DFValueType[]

Arguments to pass.

closingBracket: default<"norm", "close"> = ...

Reference property to the closing bracket of this conditional block.

isInverted: boolean = false

If the condition is inverted.

openingBracket: default<"norm", "open"> = ...

Reference property to the opening bracket of this conditional block.

tags: BLTagArray<T, Action> = ...

The tags of the action on this conditional block.

Remark

Will be an empty array if the action has no tags.

target: Target = ...

Target of the action.

type: T

Type of the codeblock.

Methods

  • Parameters

    • raw: RawDFConditionalBlock<"repeat" | "call_func" | "func" | "start_process" | "process" | "player_action" | "if_player" | "control" | "set_var" | "entity_event" | "event" | "if_entity" | "entity_action" | "if_var" | "select_obj" | "game_action" | "else" | "if_game">

    Returns readonly [RawDFConditionalBlock<"repeat" | "call_func" | "func" | "start_process" | "process" | "player_action" | "if_player" | "control" | "set_var" | "entity_event" | "event" | "if_entity" | "entity_action" | "if_var" | "select_obj" | "game_action" | "else" | "if_game">, RawDFBracketBlock<DFBracketBlockType, "open">, DFAnySerializedBlock, RawDFBracketBlock<DFBracketBlockType, "close">]

Generated using TypeDoc