Hierarchy

Constructors

Properties

Accessors

Methods

[iterator] breakContainerOnTile capWeightOfItems computeContainerWeight computeCraftQualityBonus copyProperties countItemsInContainer countItemsInContainerByGroup craft create createFake delete derefenceContainerReference exists findUnusedId get getAbsentPlayerWithItemInInventory getAdjacentContainers getBestItemForTier getBestSafeItem getBestSafeItems getBreakingQualityBonus getCivilizationContentsScore getContainedContainers getContainerName getContainerReference getContainerTypeForContainer getCraftChance getCraftQualityBonus getCraftResultChances getDefaultDurability getDisassemblyComponents getDisassemblyComponentsAsItemTypes getDisassemblyWeight getEfficacyTranslation getGroupDefault getGroupItems getGroups getHighestItemActionTierForAction getItemForHuman getItemInAdjacentContainersByGroup getItemInContainer getItemInContainerByGroup getItemInInventoryByGroup getItemListTranslation getItemTranslations getItemTypeGroupName getItemTypeListTranslation getItemTypeTranslation getItemTypes getItemUseBonus getItemsByWeight getItemsInContainer getItemsInContainerByGroup getItemsInContainerByType getItemsWeight getItemsWithRecipes getMagicalWeightCapacity getMaxQualityBonus getNPCFromInventoryContainer getNPCWithItemInInventory getObjects getOrderedContainerItems getPlayerFromInventoryContainer getPlayerWithItemInInventory getQualityBasedOnSkill getRandomQuality getTile getTradeContainerForContainer getWeight getWeightCapacity hasAdditionalRequirements hasRoomInContainer hashContainer hashContainerReference isContainableInAdjacentContainer isContainableInContainer isContainableInTradeContainer isContainer isCraftSuccessful isFiltered isGroup isInGroup isInInventory isItemAcceptedAsOffer isItemExtra isItemInContainer isItemUsedForGrowingPlants isItemUsedInRecipe isTileContainer load loadReference moveItemToContainer moveItemsFromContainer moveItemsToContainer onUnserialized placeItemsAroundTile registerForMemoryLeakDetection remove removeContainerItems removeNulls resolveContainer saveTileReferences set summonVoidDweller tryMoveItemsToContainer updateContainedWithin updateItem updateItemOrder updateItems clearCaches generateLookups getBestItemForTier getGroupDefault getGroupItems getGroups getHighestItemActionTierForAction getItemTypeGroupName getItemTypes getItemsWithRecipes getUseItemActions getWeight isContainer isGroup isInGroup isItemAcceptedAsOffer isItemExtra isItemUsedForGrowingPlants isItemUsedInRecipe weightTree

Constructors

Properties

island: default
objects: SaferArray<default>
worldContainer: IContainer = ...
cachedItemSpawns: Map<BiomeType, Map<WorldZ, Map<TerrainType, ItemType[]>>> = ...

Accessors

  • get game(): Game
  • Returns Game

  • get length(): number
  • Returns number

Methods

  • Will break a container item on a tile, and remove it after (whether or not if it's a container)

    Parameters

    Returns void

  • Parameters

    • createdItems: default[]
    • itemWeight: number

    Returns void

  • Parameters

    Returns number

  • Parameters

    Returns void

  • Called when this object manager is not used anymore (after it was saved!)

    Returns void

  • Parameters

    Returns boolean

  • Returns number

  • Parameters

    • id: number

    Returns undefined | default

  • Parameters

    Returns undefined | default

  • Parameters

    • human: default<number>
    • Optional includeNpcs: boolean
    • Optional ignoreOptions: boolean

    Returns IContainer[]

  • Get the best items sorted by how good they are Usability/custom (ie the sorting for melee/start fire) > Action tier (+quality if there's an action tier on both items) > quality > durability

    Parameters

    Returns default[]

  • Used in cases where we break items down from their base form like in dismantling or burning items.

    Returns

    number That is distributed from the quality/value.

    Parameters

    • itemQuality: undefined | Quality

      Quality of the base item.

    • bonusValue: number

      A number that we likely will be passing to getQualityBasedOnSkill and can be based on a skill or some arbitrary value.

    Returns number

  • Get the civilization score based on contained books/text

    Returns

    number that corresponds to how much civilization score is contained within.

    Parameters

    Returns number

  • Gets the name of a container

    Returns

    Name of the container or undefined if it's ending up on the ground

    Parameters

    Returns undefined | default

  • Parameters

    • human: default<number>
    • recipe: IRecipe
    • qualityBonus: number
    • Optional returnQuality: boolean

    Returns number

  • Parameters

    • item: default
    • Optional required: boolean

    Returns number

  • Parameters

    • human: undefined | default<number>
    • weight: number
    • itemType: ItemType
    • Optional getMax: boolean

    Returns number

  • Gets the item or doodad's weight based on disassembly.

    Returns

    number equal to the weight.

    Parameters

    • itemDoodad: default | default

      An Item or Doodad to get the weight for.

    • Optional itemType: ItemType

      Pass an ItemType when checking for Doodads since reducedWeight is only available on item descriptions.

    Returns number

  • Get the translation (either message or UI based) for the efficacy of a given recipe.

    Returns

    A traslantion for the efficacy or undefined if not enough skill

    Parameters

    • human: default<number>

      The player/human to check for.

    • qualityBonus: number

      The current quality bonus (via computeCraftQualityBonus).

    • maxQualityBonus: number

      The maximum quality bonus (via getMaxQualityBonus).

    • recipe: IRecipe

      The item recipe to check.

    • Optional ui: boolean

      If set to true, output the translation as a UiTranslation instead of Message.

    Returns undefined | default

  • Parameters

    Returns number

  • Formats a list translation out of an array of items.

    Parameters

    • items: default[]
    • Optional listEnder: false | ListEnder

      The way the list should end (ie and, or, etc)

    Returns default

  • Maps each item in the given array to its name translation.

    Parameters

    • items: default[]
    • article: Article = Article.None

      Whether the item name translation should include an article

    • Optional formatter: default

      A formatting translation that should be used for each item translation

    Returns default[]

  • Returns readonly ItemType[]

  • Gets the item's quality and action level (how good it is at doing the action).

    Returns

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

    Parameters

    Returns number

  • Parameters

    • a: number
    • b: number

    Returns number

  • Parameters

    Returns number

  • Returns readonly ItemType[]

  • Parameters

    Returns number

  • Gets the max quality bonus that can be applied to an item (using its recipe).

    Returns

    A number for its max quality value.

    Parameters

    • itemType: ItemType

      The item to check for.

    Returns number

  • Parameters

    Returns undefined | default

  • Returns ordered items for the containers Note: It may return the real containedItems array!

    Parameters

    Returns default[]

  • Parameters

    Returns undefined | default

  • Parameters

    Returns undefined | default

  • Parameters

    • itemQuality: undefined | Quality
    • skillValue: number
    • allowIncreasedQuality: boolean = false
    • bonusChance: number = 0

    Returns undefined | Quality

  • Parameters

    • bonusQuality: number = 0
    • Optional relicChance: boolean

    Returns Quality

  • Gets the tile the item/container is on

    Returns

    Tile or undefined

    Parameters

    Returns undefined | default

  • Parameters

    • container: IContainer
    • includeMagic: boolean = true

    Returns undefined | number

  • Parameters

    Returns boolean

  • Parameters

    Returns string

  • Parameters

    • human: default<number>
    • containable: IContainable
    • Optional includeNpcs: boolean
    • Optional ignoreOptions: boolean

    Returns boolean

  • Returns

    whether the given containable is, or is contained within, the given container

    Parameters

    Returns boolean

  • Returns

    whether the given containable is, or is contained within, a trade container

    Parameters

    Returns boolean

  • Parameters

    • obj: unknown

    Returns obj is IContainer

  • Checks if the item type or item is filtered from inventory/crafting/container dialogs.

    Parameters

    • item: default | ItemType

      The ItemType or Item to check.

    • filterText: string

      The string of text in which to filter for.

    • Optional craftingFilter: boolean

      True if we are filtering the crafting dialog.

    Returns boolean

  • Parameters

    Returns boolean

  • Parameters

    Returns boolean

  • Parameters

    • type: number

    Returns type is ItemTypeExtra

  • Parameters

    Returns boolean

  • Parameters

    Returns boolean

  • Parameters

    Returns boolean

  • Returns void

  • Note: don't print items to the console because the console will hold the item indefinitely

    Parameters

    • allowFixes: boolean
    • container: IContainer
    • Optional loadChildReferences: boolean
    • Optional parentContainer: IContainer

    Returns boolean

  • Drop items in a 3x3 square around the location. This will ensure all items in the container are removed

    Parameters

    Returns void

  • Parameters

    • item: default
    • removeContainedItems: boolean = false
    • extinguishTorches: boolean = true

    Returns void

  • Parameters

    • container: IContainer
    • removeContainedItems: boolean = false

    Returns void

  • Returns void

  • Returns void

  • Parameters

    • id: number
    • value: undefined | default

    Returns void

  • Summons a void dweller based on item worth and chance or provides a hint message.

    Returns

    True or false based on if we get a message or not.

    Parameters

    • item: default

      Item to get the worth of.

    • human: default<number>

      The human that is dropping the item.

    • tile: default

      The tile in which we are dropping the item.

    Returns boolean

  • Parameters

    Returns void

  • Parameters

    • item: default
    • isInInventory: boolean
    • skipUiUpdates: boolean = false

    Returns boolean

  • Parameters

    • container: IContainer
    • itemOrder: undefined | number[]

    Returns void

  • Parameters

    • pids: Set<number>
    • options: {
          skipPlayerItems?: boolean;
          skipUiUpdates?: boolean;
      }
      • Optional skipPlayerItems?: boolean
      • Optional skipUiUpdates?: boolean

    Returns boolean

  • Returns void

  • Returns void

  • Parameters

    Returns number

  • Returns readonly ItemType[]

  • Returns readonly ItemType[]

  • Returns ReadonlySet<ActionType>

  • Parameters

    • obj: unknown

    Returns obj is IContainer

  • Parameters

    Returns boolean

  • Parameters

    • type: number

    Returns type is ItemTypeExtra

  • Parameters

    Returns boolean

  • Parameters

    Returns boolean

Generated using TypeDoc