Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Doodad

Hierarchy

Implements

Index

Constructors

constructor

  • Parameters

    • Optional type: DoodadType
    • Default value x: number = 0
    • Default value y: number = 0
    • Default value z: number = 0
    • Default value options: IDoodadOptions = {}

    Returns Doodad

Properties

Optional aberrant

aberrant: undefined | false | true

containedItems

containedItems: Item[]

Optional decay

decay: undefined | number

Optional disassembly

disassembly: Item[]

Readonly event

event: IEventEmitter<this, IDoodadEvents> = new EventEmitter<this, E>(this)

Optional gatherReady

gatherReady: undefined | number

Optional gfx

gfx: undefined | number

Optional hitchedCreature

hitchedCreature: undefined | number

id

id: number

Optional itemOrders

itemOrders: number[]

magic

magic: MagicalPropertyManager = new MagicalPropertyManager()

maxDur

maxDur: number

Optional meltDecay

meltDecay: undefined | number

minDur

minDur: number

Readonly objectType

objectType: Doodad = CreationId.Doodad

Optional orientation

orientation: DoorOrientation

Optional ownerIdentifier

ownerIdentifier: undefined | string

Optional quality

quality: Quality

Optional referenceId

referenceId: undefined | number

Optional renamed

renamed: string | ISerializedTranslation

Optional spread

spread: undefined | number

Optional startingDecay

startingDecay: undefined | number

step

step: number | undefined

Optional stillContainer

stillContainer: Item

Optional tradedFrom

tradedFrom: string[]

type

type: DoodadType

Optional weight

weight: undefined | number

Readonly x

x: number

Readonly y

y: number

Readonly z

z: number

Static Protected registrarId

registrarId: number

Accessors

constructorFunction

  • get constructorFunction(): Doodad
  • Returns Doodad

Methods

addTreasureChestLoot

  • addTreasureChestLoot(): void
  • Returns void

attachStillContainer

  • attachStillContainer(item: Item): void
  • Parameters

    Returns void

blocksMove

  • blocksMove(): boolean
  • Returns boolean

canCauseStatus

  • canCauseStatus(): boolean
  • Returns boolean

canGather

  • canGather(): boolean
  • Can the doodad be gathered from in its current form?

    Returns boolean

canGrow

  • canGrow(): boolean
  • Returns boolean

canHarvest

  • canHarvest(): boolean
  • Returns boolean

canPickup

  • canPickup(human: Human): boolean
  • Parameters

    Returns boolean

canTrample

  • canTrample(): undefined | false | true
  • Returns whether the doodad can be trampled

    Returns undefined | false | true

changeType

  • changeType(doodadType: DoodadType): void
  • Parameters

    • doodadType: DoodadType

    Returns void

checkForTrampling

  • Parameters

    Returns boolean

damage

  • damage(forceBreak?: boolean, skipDropAsItem?: boolean, skipSound?: boolean, skipResources?: boolean): void
  • Parameters

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

    Returns void

description

detachStillContainer

  • detachStillContainer(human?: Human): Item | undefined
  • Parameters

    Returns Item | undefined

getActions

  • Returns ActionType[] | undefined

getDamage

  • Parameters

    Returns number

getDefaultDurability

  • getDefaultDurability(): number
  • Returns number

Protected getDescriptionTranslation

  • deprecated

    Returns Translation

getGrowingStage

  • getGrowingStage(): GrowingStage | undefined
  • Returns GrowingStage | undefined

getGrowthParticles

  • getGrowthParticles(): IRGB | undefined
  • Returns IRGB | undefined

getInsulation

  • getInsulation(type: TempType): undefined | number

getItemUseBonus

  • 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).

    Parameters

    • action: ActionType

      The ActionType you are trying to get the level for.

    Returns number

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

getMeltRate

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

    Parameters

    Returns number

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

getName

  • getName(article?: undefined | false | true, count?: undefined | number): Translation
  • Parameters

    • Optional article: undefined | false | true

      Whether to include an article for the name of the doodad. Uses the article rules on the language. Defaults to true.

    • Optional count: undefined | number

      The number of this doodad that you're getting the name of. Defaults to 1.

      Examples:

      • doodad.getName() // "a stone furnace"
      • doodad.getName(false) // "stone furnace"
      • doodad.getName(undefined, 3) // "stone furnaces"

    Returns Translation

Protected getNameTranslation

  • getNameTranslation(article?: undefined | false | true, count?: undefined | number): Translation
  • deprecated

    Parameters

    • Optional article: undefined | false | true
    • Optional count: undefined | number

    Returns Translation

getOwner

  • getOwner(): Player | undefined
  • Gets the owner of this doodad, or undefined if the doodad is ownerless.

    Returns Player | undefined

getOwnerOrLocalPlayer

  • getOwnerOrLocalPlayer(): Player | undefined
  • Gets the owner of this doodad. If this doodad has no owner, and this is not a multiplayer server, returns the local player.

    Returns Player | undefined

getPickupTypes

  • getPickupTypes(): ItemType[] | undefined
  • Returns ItemType[] | undefined

getPoint

  • Returns IVector3

getProducedTemperature

  • getProducedTemperature(): number | undefined
  • Returns number | undefined

getRegistrarId

  • getRegistrarId(): number
  • Returns number

getTile

  • Returns ITile

getTileId

  • getTileId(): number
  • Returns number

getTrapDamageBonus

  • getTrapDamageBonus(baseDamage: number, human?: Human): number
  • Return extra trap damage based on player multiplier and magical status

    Parameters

    • baseDamage: number
    • Optional human: Human

    Returns number

healOrHarmPlant

  • healOrHarmPlant(liquid: LiquidType, growthBonus?: undefined | number): void
  • 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: undefined | number

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

    Returns void

increaseFertility

  • increaseFertility(bypassChange?: undefined | false | true): boolean
  • Increased the fertility (spread) of a plant/growing doodad.

    Parameters

    • Optional bypassChange: undefined | false | true

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

    Returns boolean

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

isDangerous

  • isDangerous(human: Human): boolean
  • Parameters

    Returns boolean

isEmbers

  • isEmbers(): boolean
  • Returns boolean

isGatherable

  • isGatherable(): boolean
  • Can the doodad be gathered from at all?

    Returns boolean

isInGroup

  • Parameters

    Returns boolean

isValid

  • isValid(): boolean
  • Returns boolean

onUnserialized

  • onUnserialized(): void

refillSolarStill

  • refillSolarStill(): void
  • Refills solar stills when they are on shallow water automatically.

    Returns void

revert

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

    Returns boolean

setGrowingStage

  • setGrowingStage(stage: GrowingStage, updateTile?: undefined | false | true): void
  • Parameters

    • stage: GrowingStage
    • Optional updateTile: undefined | false | true

    Returns void

setMeltingDecay

  • setMeltingDecay(): void
  • Initialized the doodad's melting decay number

    Returns void

setOffTrap

  • setOffTrap(human?: Human, withMessage?: undefined | false | true): void
  • Parameters

    • Optional human: Human
    • Optional withMessage: undefined | false | true

    Returns void

setWellStatus

  • setWellStatus(): void
  • Keep our wells up-to-date with what is happening underground

    Returns void

switchWellStatus

  • switchWellStatus(): void
  • Switch unlimited/limited water status based on underground water changes

    Returns void

toString

  • toString(): string
  • Returns string

unhitch

  • unhitch(): void
  • Returns void

update

  • update(ticks: number, realPlayers: Player[], updatesPerTick?: number): void
  • Parameters

    • ticks: number
    • realPlayers: Player[]
    • Default value updatesPerTick: number = 1

    Returns void

updateGroupCache

  • Parameters

    Returns boolean

updateTile

  • Parameters

    Returns void

Static getGrowingStageTranslation

Static getRegistrarId

  • getRegistrarId(): number
  • Returns number

Static is

  • is(value: any): value is Doodad
  • Parameters

    • value: any

    Returns value is Doodad

Static setRegistrarId

  • setRegistrarId(id: number): void
  • Parameters

    • id: number

    Returns void

Generated using TypeDoc