Protected
Readonly
islandReadonly
listProtected
loadProtected
Readonly
nameName of this object manager
Protected
Readonly
objectsProtected
Readonly
reregisterIndicates if objects should be re-registered to the memory leak detector after loading
Readonly
worldTiles can be containers and they will always be contained within this container
Static
Readonly
cachedStatic
listThis is likely only used during save upgrades
Protected
canChecks if the target position is a good spot for a new entity
Optional
ignoreItem: defaultOptional
includeProtectedItemsThatWillNotBreak: trueOptional
ignoreItem: defaultOptional
includeProtectedItemsThatWillNotBreak: trueOptional
human: default<unknown, number, NPC | Player>Optional
context: defaultOptional
human: default<unknown, number, NPC | Player>Optional
container: IContainerOptional
container: IContainerGet the best item
Optional
options: Partial<IGetBestItemsOptions>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
Optional
options: Partial<IGetBestItemsOptions>Used in cases where we break items down from their base form like in dismantling or burning items.
number That is distributed from the quality/value.
Quality of the base item.
A number that we likely will be passing to getQualityBasedOnSkill and can be based on a skill or some arbitrary value.
Gets the name of a container
Name of the container or undefined if it's ending up on the ground
Optional
container: IContainerThis is for debug context (ie, include tile information, world container, etc)
Partitions the containables by their container
Get the translation (either message or UI based) for the efficacy of a given recipe.
A traslantion for the efficacy or undefined if not enough skill
The player/human to check for.
The current quality bonus (via computeCraftQualityBonus).
The maximum quality bonus (via getMaxQualityBonus).
The item recipe to check.
Optional
ui: booleanIf set to true, output the translation as a UiTranslation instead of Message.
Optional
options: Partial<IGetItemOptions>Optional
options: Partial<IGetItemsOptions>Optional
options: Partial<IGetItemOptions>Optional
options: Partial<IGetItemOptions>Optional
options: Partial<IGetItemOptions>Return number
to insert the item at a specific index. Return undefined
to push the item to the end.
Defaults to 0
or undefined
if sort is ContainerSort.Recent
, or polling the sorting algorithm otherwise
Optional
sorter: ISorter<undefined | default>Optional
article: ArticleOptional
count: numberOptional
ender: false | ListEnderOptional
count: numberOptional
article: ArticleGets the item's quality and action level (how good it is at doing the action).
A number (possibly 0 if no quality or action level).
The ActionType you are trying to get the level for.
Optional
options: Partial<IGetItemsOptions>Optional
options: Partial<IGetItemsOptions>Optional
options: Partial<IGetItemsOptions>Optional
filterText: stringGets the chance of crafting a mastercrafted item (provided a CraftResult.CritSuccess is reached and rolls on exceptional).
A number equal to the chance.
Must be atleast 50% to get a mastercraft.
Must be set to at least 1 to get a mastercraft.
Must be set to atleast 40% to get a mastercraft.
Returns ordered items for the containers
Note: It may (will always) return the real containedItems array!
Optional
options: Partial<IGetItemOptions>Gets the tile the item/container is on
Tile or undefined
Optional
itemOrContainer: default | IContainerItem or container
Uses the old system to get the weight of an item type.
Optional
container: IContainerOptional
actionNotUsableMessage: defaultOptional
isRepairOrDisassembly: booleanOptional
includeNpcs: booleanOptional
ignoreOptions: booleanwhether the given containable is, or is contained within, the given container
whether the given containable is, or is contained within, a trade container
Optional
human: default<unknown, number, NPC | Player>Optional
options: Partial<IGetItemOptions>Check if a container is a container that's on a tile
Note: don't print items to the console because the console will hold the item indefinitely
Optional
loadChildReferences: booleanOptional
parentContainer: IContainerMoves an item into a container
Result that tells you what moved
Human causing the item movement
Item to move
Container to move the item to
Optional
options: IMoveItemOptionsItem move options
Moves items from one container into another container
Result that tells you what moved
Human causing the item movement
Source container
Destination container
Optional
options: IMoveItemOptionsItem move options
Moves items to a container. Note: All the items must be contained within the same container.
Result that tells you what moved
Human causing the item movement
Destination container
Optional
options: IMoveItemOptionsItem move options
Protected
onDrop items in a 3x3 square around the location. This will ensure all items in the container are removed
Protected
registerOptional
options: IItemRemoveOptionsOptional
options: IItemRemoveOptionsProtected
removeOptional
container: IContainerOptional
atIndex: numberOptional
options: IMoveItemOptionsOptional
skipOptional
skipStatic
cacheStatic
cacheStatic
canStatic
clearStatic
generateStatic
getStatic
getStatic
getStatic
getStatic
getStatic
getStatic
getOptional
article: ArticleOptional
count: numberStatic
getStatic
getStatic
getStatic
getStatic
getUses the old system to get the weight of an item type.
Static
isStatic
isStatic
isStatic
isStatic
isStatic
isStatic
isStatic
isStatic
isStatic
weightGenerated using TypeDoc
No need to run special logic when loading items