Options
All
  • Public
  • Public/Protected
  • All
Menu

Class PlaceBuildingClientAction

Attempts to place a building. This will create a new blueprint, except if playing in sandbox or if the building is a playerbase.

Hierarchy

Index

Constructors

constructor

  • Parameters

    • root: any
    • faction: any

      The faction which should perform this action

    • __namedParameters: object
      • metaClass: any
      • tile: any
      • uid: any

    Returns PlaceBuildingClientAction

Methods

addPredictions

  • addPredictions(time: any): void
  • see

    BaseClientAction.addPredictions

    Parameters

    • time: any

    Returns void

checkDuplicateAdditional

  • checkDuplicateAdditional(other: any): boolean

checkExecution

checkIsDuplicate

  • checkIsDuplicate(other: any): boolean
  • Checks if this action is a duplicate of the other

    Parameters

    • other: any

    Returns boolean

deserialize

  • deserialize(root: any, serializedData: any): boolean
  • Deserializes the action, assumes validate() was true

    Parameters

    • root: any
    • serializedData: any

    Returns boolean

deserializeAdditional

  • deserializeAdditional(data: any): boolean
  • see

    BaseClientAction.deserializeAdditional

    Parameters

    • data: any

    Returns boolean

generateId

  • generateId(): any
  • Should generate an unique action id

    Returns any

getId

  • getId(): any

getLoggableData

  • getLoggableData(): object
  • Returns a loggable data object, since logging the whole action is a bad idea

    Returns object

    • data: object
      • additional: any
      • faction: any
    • id: any

getMeta

  • getMeta(): any

helperCheckBlueprintByUid

  • helperCheckBlueprintByUid(uid: any): any
  • Same as @see helperCheckIsStructureOfSameIdAndFaction but checks if its a blueprint as well

    Parameters

    • uid: any

    Returns any

helperCheckBuildingByUid

  • helperCheckBuildingByUid(uid: any): any
  • Same as @see helperCheckIsStructureOfSameIdAndFaction but checks if its a building as well

    Parameters

    • uid: any

    Returns any

helperCheckStructureByUid

  • helperCheckStructureByUid(uid: any): any
  • Checks if there is a structure (=blueprint or building) of the given id at the tile of our faction

    Parameters

    • uid: any

    Returns any

internalCheckRequiresBlueprint

  • internalCheckRequiresBlueprint(): boolean
  • Computes if a blueprint is required for this building

    Returns boolean

isFactionAffected

  • isFactionAffected(faction: any): boolean
  • Should return true if a given faction is affected from this action

    Parameters

    • faction: any

    Returns boolean

isLocalAction

  • isLocalAction(): boolean
  • Returns if this action belongs to the local client or was a remote action

    Returns boolean

performPreExecutionCheck

performSync

  • performSync(): void
  • see

    BaseClientAction.performSync

    Returns void

serialize

  • serialize(): object
  • Serializes the action

    Returns object

    • additional: any
    • faction: any

serializeAdditional

  • serializeAdditional(): object
  • @see BaseClientAction.serializeAdditional

    Returns object

    • building: any
    • tile: any
    • uid: any

tryPerform

validate

  • validate(serializedData: any): boolean
  • Validates the serialized data of the action

    Parameters

    • serializedData: any

    Returns boolean

    true if the action was successfully validated

validateAndDeserialize

  • validateAndDeserialize(root: any, serializedData: any): boolean
  • Validates the serialized data and deserializes it on success

    Parameters

    • root: any
    • serializedData: any

    Returns boolean

Static getId

  • getId(): any
  • see

    BaseClientAction.getId

    Returns any

Static getMeta