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

UpgradeAPI

Index

Classes

UpgradeSet

UpgradeSet:

constructor

  • new UpgradeSet(tileEntity: TileEntity): UpgradeSet
  • Parameters

    • tileEntity: TileEntity

    Returns UpgradeSet

energyDemandMultiplier

energyDemandMultiplier: number

extraEnergyStorage

extraEnergyStorage: number

extraTier

extraTier: number

invertRedstone

invertRedstone: boolean

processTimeMultiplier

processTimeMultiplier: number

speedModifier

speedModifier: number

protectedtileEntity

tileEntity: TileEntity

executeUprade

  • executeUprade(upgrade: IUpgrade, stack: ItemInstance): void
  • Parameters

    Returns void

getEnergyDemand

  • getEnergyDemand(defaultEnergy: number): number
  • Parameters

    • defaultEnergy: number

    Returns number

getEnergyStorage

  • getEnergyStorage(defaultEnergyStorage: number): number
  • Parameters

    • defaultEnergyStorage: number

    Returns number

getProcessTime

  • getProcessTime(defaultLength: number): number
  • Parameters

    • defaultLength: number

    Returns number

getRedstoneInput

  • getRedstoneInput(powered: boolean): boolean
  • Parameters

    • powered: boolean

    Returns boolean

getTier

  • getTier(defaultTier: number): number
  • Parameters

    • defaultTier: number

    Returns number

isValidUpgrade

  • isValidUpgrade(upgrade: IUpgrade): boolean
  • Parameters

    Returns boolean

resetRates

  • resetRates(): void
  • Returns void

useUpgrades

  • useUpgrades(): void
  • Returns void

Functions

executeUpgrades

  • @deprecated

    Parameters

    • machine: TileEntity

    Returns UpgradeSet

getUpgrade

isUpgrade

  • isUpgrade(id: number): boolean
  • Parameters

    • id: number

    Returns boolean

isValidUpgrade

  • isValidUpgrade(id: number, machine: TileEntity): boolean
  • Parameters

    • id: number
    • machine: TileEntity

    Returns boolean

registerUpgrade

  • registerUpgrade(id: number, upgrade: IUpgrade): void
  • Parameters

    Returns void

useUpgrades