Class default<DescriptionType, TypeType, EntityReferenceType, TagType>Abstract

Type Parameters

Hierarchy

Implements

Constructors

  • Type Parameters

    Parameters

    Returns default<DescriptionType, TypeType, EntityReferenceType, TagType>

Properties

_description?: DescriptionType
entityType: EntityType
event: IEventEmitter<default<DescriptionType, TypeType, EntityReferenceType, TagType>, IEntityEvents>
historicalActions?: PartialRecord<ActionType, number>
id: number
islandId: `${number},${number}`
persistentMarker: undefined | {
    guid: string;
    type: Tamed;
}

Notifier marker assigned to this entity

preventRendering?: boolean
referenceId?: number

Do not use this property directly, instead use `game.references.getReference()

renamed?: string | ISerializedTranslation
tileUpdateType: TileUpdateType
type: TypeType
x: number
y: number
z: WorldZ

Accessors

  • get asCorpse(): undefined | default
  • Returns undefined | default

  • get asCreature(): undefined | default
  • Returns undefined | default

  • get asDoodad(): undefined | default
  • Returns undefined | default

  • get asEntity(): default<DescriptionType, TypeType, EntityReferenceType, TagType>
  • Returns default<DescriptionType, TypeType, EntityReferenceType, TagType>

  • get asEntityMovable(): undefined | default<DescriptionType, TypeType, EntityReferenceType, TagType>
  • Returns undefined | default<DescriptionType, TypeType, EntityReferenceType, TagType>

  • get asEntityWithStats(): undefined | default<DescriptionType, TypeType, EntityReferenceType, TagType>
  • Returns undefined | default<DescriptionType, TypeType, EntityReferenceType, TagType>

  • get asHuman(): undefined | default<unknown, number, NPC | Player>
  • Returns undefined | default<unknown, number, NPC | Player>

  • get asItem(): undefined | default
  • Returns undefined | default

  • get asLoaded(): undefined | this
  • undefined if this entity's island is not loaded, this if it is

    Returns undefined | this

  • get asLocalPlayer(): undefined | default
  • Returns undefined | default

  • get asNPC(): undefined | default
  • Returns undefined | default

  • get asNotLocalPlayer(): undefined | this
  • Returns undefined | this

  • get asPlayer(): undefined | default
  • Returns undefined | default

  • get asTile(): undefined | default
  • Returns undefined | default

  • get asTileEvent(): undefined | default
  • Returns undefined | default

  • get description(): undefined | Readonly<DescriptionType>
  • Get the entities description

    Returns undefined | Readonly<DescriptionType>

  • get humansVisible(): default<unknown, number, NPC | Player>[]
  • Returns humans within this entities fov & that they can see

    Returns default<unknown, number, NPC | Player>[]

  • get isLoaded(): boolean
  • Whether this entity's island is loaded

    Returns boolean

  • get isLocalPlayer(): boolean
  • Returns boolean

  • get isOnFire(): FireType
  • Returns FireType

  • get isValid(): boolean
  • Returns boolean

  • get isWithinHumanBounds(): boolean
  • Checks if the entity is within the viewport bounds of one or more humans

    Returns boolean

  • get island(): default
  • Returns default

  • get point(): undefined | IVector3
  • Location of the entity on the world. Parent classes will probably mark this as always defined

    Returns undefined | IVector3

  • get reference(): undefined | Reference<EntityReferenceType>
  • Returns undefined | Reference<EntityReferenceType>

  • get tile(): undefined | default
  • Tile the entity is on in the world. Parent classes will probably mark this as always defined

    Returns undefined | default

  • get tilesAround(): undefined | default[]
  • Returns undefined | default[]

Methods

  • Parameters

    Returns void

  • Adds a referenceId to the entity if it doesn't already have one

    Returns void

  • Parameters

    • tag: TagType

    Returns void

  • Parameters

    Returns undefined | default<DescriptionType, TypeType, EntityReferenceType, TagType>

  • Parameters

    • type: TypeType

    Returns undefined | default<DescriptionType, TypeType, EntityReferenceType, TagType>

  • Parameters

    Returns boolean

  • Returns void

  • Gets a data

    Returns

    Data value or undefined if it wasn't found

    Type Parameters

    • T

    Parameters

    • key: string

      Data key

    Returns undefined | T

  • Called when filling out the entities description for the first time

    Returns undefined | DescriptionType

  • Returns default

  • Gets the temperature produced by this object. Positive values are "heat", negative values are "cold". Refer to the values of the Temperature enum to see the possible range. If this method is not implemented, or it returns undefined, Temperature.Neutral is used.

    Returns undefined | number

  • Check if a data was set

    Returns

    True if the data exists, false if it doesn't

    Parameters

    • key: string

      Data key

    Returns boolean

  • Parameters

    • tag: TagType

    Returns boolean

  • Parameters

    • type: SfxType
    • Optional delay: number
    • Optional speed: number

    Returns void

  • Removes a data

    Returns

    True when the data is removed. False if the key wasn't set

    Parameters

    • key: string

      Data key

    Returns boolean

  • Returns void

  • Parameters

    • tag: TagType

    Returns void

  • Parameters

    Returns void

  • Sets a data

    Rturns

    The value

    Type Parameters

    • T

    Parameters

    • key: string

      Data key

    • value: T

      Data value

    Returns T

  • Parameters

    Returns void

  • Returns string

  • Updates the world renderer & flow field state for the tile

    Parameters

    • tileUpdateType: TileUpdateType = ...
    • Optional updateNeighbors: boolean
    • Optional skipFlowFieldUpdate: boolean

    Returns void

Generated using TypeDoc