Hierarchy

Implements

Constructors

Properties

Accessors

Methods

Constructors

Properties

_description?: IDoodadDescription
aberrant?: boolean
bonusAttack?: number
builderIdentifier?: string
containedItems?: default[]
crafterIdentifier?: string
decay?: number
disassembly?: default[]
gatherReady?: number
growth?: GrowingStage
hasWater?: IHasWater
hitchedCreature?: number
id: number
islandId: `${number},${number}`
itemOrders?: number[]
magic?: default
maxDur: number
meltDecay?: number
minDur: number
orientation?: East | North | West | South | DoorOrientation
preventRendering?: boolean
quality?: Quality
referenceId?: number

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

renamed?: string | ISerializedTranslation
spread?: number
startingDecay?: number
step?: number
stillContainer?: default
tradedFrom?: string[]
weight?: number
x: number
y: number
registrarId: number

Accessors

  • get asContainer(): undefined | this & IContainer
  • Returns undefined | this & IContainer

  • get asCorpse(): undefined
  • Returns undefined

  • get asCreature(): undefined
  • Returns undefined

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

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

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

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

  • get asHuman(): undefined
  • Returns undefined

  • get asItem(): undefined
  • Returns undefined

  • get asLocalPlayer(): undefined
  • Returns undefined

  • get asNPC(): undefined
  • Returns undefined

  • get asPlayer(): undefined
  • Returns undefined

  • get asTileEvent(): undefined
  • Returns undefined

  • get constructorFunction(): typeof default
  • Returns typeof default

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

    Returns undefined | DescriptionType

  • get durability(): number
  • Returns number

  • set durability(value: number): void
  • Parameters

    • value: number

    Returns void

  • get durabilityMax(): number
  • Returns number

  • set durabilityMax(value: number): void
  • Parameters

    • value: number

    Returns void

  • get entityType(): Doodad
  • Returns Doodad

  • get island(): default
  • Returns default

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

    Returns IVector3

  • get reference(): undefined | Reference
  • Returns undefined | Reference

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

    Returns default

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

Methods

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

    Returns void

  • Returns void

  • Potentially animates a skeleton (if it can spawn) and returns a message to all those who can see it.

    Returns void

  • Parameters

    Returns void

  • Returns boolean

  • Returns boolean

  • Can the doodad be gathered from in its current form?

    Returns boolean

  • Returns boolean

  • Returns boolean

  • Parameters

    Returns boolean

  • Parameters

    Returns boolean

  • Returns whether the doodad can be trampled

    Returns undefined | boolean

  • Gives civilization score based on how much is defined for this doodad.

    Parameters

    • add: boolean

    Returns void

  • Parameters

    Returns void

  • Trampling growing things.

    Parameters

    Returns boolean

  • Returns void

  • Parameters

    • forceBreak: boolean = false
    • skipDropAsItem: boolean = false
    • skipSound: boolean = false
    • skipResources: boolean = false

    Returns void

  • Parameters

    Returns undefined | default

  • Forces a boat to be drydocked (revert from doodad to an item if water was taken away for some reason).

    Parameters

    Returns void

  • Returns undefined | ActionType[]

  • Determines which graphic to show based on how full the bookcase is with books/text.

    Returns

    DoodadTypeExtra or DisplayableItemType equal to which graphic it should show.

    Parameters

    • Optional item: boolean

      set to true if DisplayableItemType is to be returned.

    Returns undefined | DoodadTypeExtra | DisplayableItemType

  • Gets the builder of this doodad, or undefined if the doodad is builderless.

    Returns undefined | default

  • Gets civilization score based on doodad's quality and type, but without the magical property values.

    Returns

    number of score (or 0 if no civilization score is set).

    Parameters

    • Optional excludeMagic: boolean

    Returns number

  • Gets the crafter of this doodad, or undefined if the doodad is crafterless.

    Returns undefined | default

  • Gets the crafter of this doodad. If this doodad has no crafter, and this is not a multiplayer server, returns the local player.

    Returns undefined | default

  • Parameters

    Returns number

  • Gets a data

    Returns

    Data value or undefined if it wasn't found

    Type Parameters

    • T

    Parameters

    • key: string

      Data key

    Returns undefined | T

  • Gets if the doodad is set to display any extra graphics/assets.

    Returns

    DisplayableDoodadType or DoodadType (if no extra is set)

    Returns DisplayableDoodadType

  • Returns undefined | IRGB

  • Returns string

  • Gets the insulation of this object.

    Insulation is a decimal number from 0 to 1.

    • An insulation of 0 means that the temperature inside this object is equivalent to the temperature outside.
    • An insulation of 1 means that no temperature inside this object is emitted to the outside tiles — it is a completely separate temperature "biome".
    • Values in between change how much of the temperatures are produced/used on either side.

    Parameters

    Returns undefined | number

  • Gets the doodad's quality and action level (how good it is at doing the action) based on the item it is based off of (using repairItem property).

    Returns

    A number (possibly 0 if no quality or action level).

    Parameters

    • action: ActionType

      The ActionType you are trying to get the level for.

    Returns number

  • Returns the type of liquid that can be gathered from this doodad

    Returns undefined | keyof ILiquidGather

  • Gets a set of skill types and values for magical adjacent skill bonuses from doodads.

    Returns

    Map of skill type and number (skill value).

    Returns Map<SkillType, number>

  • Gets the decay rate of a doodad based on the temperature (returns as a default of 0).

    Returns

    The number of melt reduction of the doodad given the temperature of the point.

    Parameters

    Returns number

  • Parameters

    • Optional article: Article

      Whether to include an article for the name of the doodad. Uses the article rules on the language.. @param count The number of this doodad that you're getting the name of. Defaults to 1`.

      Examples:

      • doodad.getName() // "a stone furnace"
      • doodad.getName(Article.None) // "stone furnace"
      • doodad.getName(Article.None, 3) // "stone furnaces"
    • Optional count: number

    Returns default

  • Returns undefined | ItemType[]

  • 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

  • Returns number

  • Gets the container to use for doodad executed actions

    Returns undefined | IContainer

  • Returns number

  • Return extra trap damage based on player multiplier and magical status

    Parameters

    • baseDamage: number
    • Optional human: default<number>

    Returns number

  • Gets a set of skill types and values from doodads that have "containedItemGroupProvidesSkill" set for items that provide adjacent skill bonuses.

    Returns

    Map of skill type and number (skill value).

    Returns Map<SkillType, 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

  • Increases or decreases plant fertility, growth and durability (health) based on the liquid applied.

    Parameters

    • liquid: LiquidType

      The LiquidType that is to be applied.

    • Optional growthBonus: number

      The bonus that is applied (on top of a default of 10) to the plants decay (so it grows faster).

    Returns void

  • Increased the fertility (spread) of a plant/growing doodad.

    Returns

    True or false depending on if it increased in fertility or not.

    Parameters

    • Optional bypassChange: boolean

      Set to true if you just want to check if fertility can be increased.

    Returns boolean

  • Parameters

    Returns boolean

  • Returns boolean

  • Can the doodad be gathered from at all?

    Returns boolean

  • Parameters

    Returns boolean

  • Returns boolean

  • Returns boolean

  • Checks if the doodad will be rendered as tall (2 tiles)

    Returns

    True if the doodad is tall

    Returns boolean

  • Returns boolean

  • Returns boolean

  • Checks if the entity is within the viewport bounds of one or more humans

    Returns boolean

  • Parameters

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

    Returns void

  • Refills solar stills when they are on shallow water automatically.

    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

  • Reverts lit doodads if they provide fire and have a revert doodad type set.

    Returns boolean

  • Sets a data

    Rturns

    The value

    Type Parameters

    • T

    Parameters

    • key: string

      Data key

    • value: T

      Data value

    Returns T

  • Parameters

    Returns void

  • Initialized the doodad's melting decay number

    Returns void

  • Parameters

    • Optional human: default<number>
    • Optional withMessage: boolean
    • Optional damage: boolean

    Returns void

  • Keep our wells up-to-date with what is happening underground

    Parameters

    Returns IWell

  • Switch unlimited/limited water status based on underground water changes

    Returns void

  • Returns string

  • Returns void

  • Parameters

    • ticks: number
    • playingHumans: default<number>[]
    • playerHumanTiles: Set<default>
    • updatesPerTick: number = 1

    Returns void

  • Updates a bookcase's graphics and civilization score (based on if books are added).

    Parameters

    • items: default[]
    • add: boolean

      True if adding score, false if you are substracting.

    Returns void

  • Parameters

    Returns boolean

  • Parameters

    Returns void

  • Returns number

  • Parameters

    • value: any

    Returns value is default

  • Parameters

    • id: number

    Returns void

Generated using TypeDoc