Перейти к основному содержанию

externalStorage

This Web Storage API interface provides access to a particular domain's session or local storage. It allows, for example, the addition, modification, or deletion of stored data items.

MDN Reference

Hierarchy

Implemented by

Index

Properties

externalcontainer

container: any

externalisNativeContainer

isNativeContainer: boolean

externalreadonlylength

length: number

Returns the number of key/value pairs.

MDN Reference

externaloptionalliquidUnitRatio

liquidUnitRatio?: number

externaloptionalslots

slots?: {}

Type declaration

Methods

externaladdItem

  • addItem(item: ItemInstance, side?: number, maxCount?: number): number
  • Parameters

    • externalitem: ItemInstance
    • externaloptionalside: number
    • externaloptionalmaxCount: number

    Returns number

externaladdItemToSlot

  • addItemToSlot(name: string | number, item: ItemInstance, maxCount?: number): number
  • Parameters

    • externalname: string | number
    • externalitem: ItemInstance
    • externaloptionalmaxCount: number

    Returns number

externaloptionalcanReceiveLiquid

  • canReceiveLiquid(liquid: string, side: number): boolean
  • Parameters

    • externalliquid: string
    • externalside: number

    Returns boolean

externaloptionalcanTransportLiquid

  • canTransportLiquid(liquid: string, side: number): boolean
  • Parameters

    • externalliquid: string
    • externalside: number

    Returns boolean

externalclear

  • clear(): void
  • Removes all key/value pairs, if there are any.

    MDN Reference


    Returns void

externalclearContainer

  • clearContainer(): void
  • Returns void

externaloptionalextractLiquid

  • extractLiquid(liquidStorage: ILiquidStorage, liquid: string, amount: number): number
  • Parameters

    • externalliquidStorage: ILiquidStorage
    • externalliquid: string
    • externalamount: number

    Returns number

externalgetContainerSlots

  • getContainerSlots(): string[] | number[]
  • Returns string[] | number[]

externalgetInputSlots

  • getInputSlots(side?: number): string[] | number[]
  • Parameters

    • externaloptionalside: number

    Returns string[] | number[]

externaloptionalgetInputTank

  • Parameters

    • externalside: number

    Returns ILiquidStorage

externalgetItem

  • getItem(key: string): string
  • Returns the current value associated with the given key, or null if the given key does not exist.

    MDN Reference


    Parameters

    • externalkey: string

    Returns string

externalgetOutputSlots

  • getOutputSlots(side?: number): string[] | number[]
  • Parameters

    • externaloptionalside: number

    Returns string[] | number[]

externaloptionalgetOutputTank

  • Parameters

    • externalside: number

    Returns ILiquidStorage

externalgetReceivingItemCount

  • getReceivingItemCount(item: ItemInstance, side?: number): number
  • Parameters

    • externalitem: ItemInstance
    • externaloptionalside: number

    Returns number

externalgetSlot

  • getSlot(name: string | number): ItemInstance
  • Parameters

    • externalname: string | number

    Returns ItemInstance

externaloptionalisValidInput

  • isValidInput(item: ItemInstance, side: number, tileEntity: TileEntity): boolean
  • Parameters

    • externalitem: ItemInstance
    • externalside: number
    • externaltileEntity: TileEntity

    Returns boolean

externalkey

  • key(index: number): string
  • Returns the name of the nth key, or null if n is greater than or equal to the number of key/value pairs.

    MDN Reference


    Parameters

    • externalindex: number

    Returns string

externaloptionalreceiveLiquid

  • receiveLiquid(liquidStorage: ILiquidStorage, liquid: string, amount: number): number
  • Parameters

    • externalliquidStorage: ILiquidStorage
    • externalliquid: string
    • externalamount: number

    Returns number

externalremoveItem

  • removeItem(key: string): void
  • Removes the key/value pair with the given key, if a key/value pair with the given key exists.

    MDN Reference


    Parameters

    • externalkey: string

    Returns void

externalsetItem

  • setItem(key: string, value: string): void
  • Sets the value of the pair identified by key to value, creating a new key/value pair if none existed for key previously.

    Throws a "QuotaExceededError" DOMException exception if the new value couldn't be set.

    MDN Reference


    Parameters

    • externalkey: string
    • externalvalue: string

    Returns void

externalsetSlot

  • setSlot(name: string | number, id: number, count: number, data: number, extra?: ItemExtraData): void
  • Parameters

    • externalname: string | number
    • externalid: number
    • externalcount: number
    • externaldata: number
    • externaloptionalextra: ItemExtraData

    Returns void