Options
All
  • Public
  • Public/Protected
  • All
Menu

Class TemperatureManager

Hierarchy

Implements

Index

Constructors

constructor

Properties

Readonly event

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

Methods

get

  • get(x: number, y: number, z: WorldZ, serverSideSource: GetterOfOr<string> | undefined): number
  • Returns the current overall temperature for the given tile.

    Parameters

    • x: number
    • y: number
    • z: WorldZ
    • serverSideSource: GetterOfOr<string> | undefined

    Returns number

getBase

  • getBase(): number
  • Returns the base temperature.

    Returns number

getBiomeRange

  • Returns IRange

getCachedCalculated

  • getCachedCalculated(x: number, y: number, z: WorldZ, type: TempType): number
  • Returns the cached calculated temperature for a tile. If a tile has not been calculated yet, this will return TEMPERATURE_INVALID.

    Parameters

    Returns number

getCachedProduced

  • getCachedProduced(x: number, y: number, z: WorldZ, type: TempType): number
  • Returns the cached produced temperature on a tile. If the production of a tile has not been calculated yet, this will return TEMPERATURE_INVALID.

    Parameters

    Returns number

getContainer

  • Returns the current temperature for a container, calculated by combining the tile temperature and the combined temperature of the items inside

    Parameters

    Returns number

getContainerItemsTemperature

  • getContainerItemsTemperature(container: IContainer): number
  • Get the combined temperature of the items in the container.

    Parameters

    Returns number

getContainerProducedTemperature

  • getContainerProducedTemperature(container: IContainer, applyInsulation?: boolean): number
  • Returns the produced temperature for this container, calculated by combining the min and max temperatures of the items inside.

    Parameters

    • container: IContainer
    • Default value applyInsulation: boolean = true

      Whether to apply the container's insulation to the produced temperature value. For example, containers with no insulation return the exact temperature they produce, while containers with maximum insulation return Temperature.Neutral

    Returns number

getLayer

  • Returns the temperature modifier of the given layer, at the given time.

    Parameters

    Returns number

getLayerRange

  • Parameters

    Returns IRange

getRange

  • Parameters

    • x: number
    • y: number
    • z: WorldZ
    • serverSideSource: GetterOfOr<string> | undefined

    Returns IRange

getTime

  • Returns the temperature modifier at the given time.

    Parameters

    Returns number

invalidateAll

  • invalidateAll(): void
  • Returns void

Protected onCreateOrRemoveObject

  • Parameters

    Returns void

Protected onDoodadTransformed

  • onDoodadTransformed(object: Doodad, newType: DoodadType, oldType: DoodadType): void
  • Parameters

    • object: Doodad
    • newType: DoodadType
    • oldType: DoodadType

    Returns void

Protected onDpodadFireUpdate

  • Parameters

    Returns void

Protected onEntityMove

  • onEntityMove(entity: Entity, lastX: number, lastY: number, lastZ: number, lastTile: ITile, x: number, y: number, z: number, tile: ITile): void
  • Parameters

    • entity: Entity
    • lastX: number
    • lastY: number
    • lastZ: number
    • lastTile: ITile
    • x: number
    • y: number
    • z: number
    • tile: ITile

    Returns void

Protected onItemContainerAdd

  • onItemContainerAdd(_: any, item: Item, container?: IContainer): void
  • Parameters

    Returns void

Protected onItemContainerRemove

  • onItemContainerRemove(_: any, item: Item, container: IContainer | undefined, containerPosition: Vector3 | undefined): void
  • Parameters

    Returns void

Protected onItemFireUpdate

  • onItemFireUpdate(item: Item): void
  • Parameters

    Returns void

Protected onPlay

  • onPlay(): void
  • Returns void

Protected onTickEnd

  • onTickEnd(): void
  • Returns void

Protected onTickStart

  • onTickStart(): void
  • Returns void

Protected onTileEventFireUpdate

  • Parameters

    Returns void

Protected onUpdateTile

  • onUpdateTile(_: any, x: number, y: number, z: number, tile: ITile, oldType: TerrainType): void
  • Parameters

    • _: any
    • x: number
    • y: number
    • z: number
    • tile: ITile
    • oldType: TerrainType

    Returns void

Generated using TypeDoc