@wayward/types 2.12.2-beta.dev.20221111.1 → 2.12.2-beta.dev.20221113.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -11,6 +11,6 @@
11
11
  import type { IActionApi } from "game/entity/action/IAction";
12
12
  import { ActionType } from "game/entity/action/IAction";
13
13
  import type Human from "game/entity/Human";
14
- import type { ItemType } from "game/item/IItem";
14
+ import { ItemType } from "game/item/IItem";
15
15
  import Item from "game/item/Item";
16
16
  export default function consumeItemType(action: IActionApi<Human>, item: Item | ItemType, actionType?: ActionType): boolean;
@@ -255,7 +255,7 @@ export interface IItemDescription extends IObjectDescription, IModdable, ITemper
255
255
  /**
256
256
  * The item type to display instead of the describe item type
257
257
  */
258
- displayItem?: SupplierOr<ItemType | undefined, [Item]>;
258
+ displayItem?: SupplierOr<DisplayableItemType | undefined, [Item]>;
259
259
  onEquip?(item: Item): void;
260
260
  onUnequip?(item: Item): void;
261
261
  }
@@ -1326,9 +1326,14 @@ export declare enum ItemType {
1326
1326
  WaterLilies = 718,
1327
1327
  Mud = 719,
1328
1328
  SpikerushSheaths = 720,
1329
- SpikerushSeeds = 721,
1330
- TatteredMap_RolledUp = 722
1329
+ SpikerushSeeds = 721
1331
1330
  }
1331
+ export declare enum ItemTypeExtra {
1332
+ None = 999,
1333
+ TatteredMap_RolledUp = 1000,
1334
+ TatteredMap_Completed = 1001
1335
+ }
1336
+ export declare type DisplayableItemType = ItemType | ItemTypeExtra;
1332
1337
  export declare enum ItemTag {
1333
1338
  None = 0
1334
1339
  }
@@ -23,7 +23,7 @@ import { CreationId } from "game/IGame";
23
23
  import type { IObject, IObjectOptions } from "game/IObject";
24
24
  import { Quality } from "game/IObject";
25
25
  import type { IslandId } from "game/island/IIsland";
26
- import type { ContainerReference, IConstructedInfo, IContainable, IContainer, IItemDescription, IItemDisassembleResult, IItemUsed, IMagicalPropertyInfo, IMoveToTileOptions, ItemTag } from "game/item/IItem";
26
+ import type { ContainerReference, DisplayableItemType, IConstructedInfo, IContainable, IContainer, IItemDescription, IItemDisassembleResult, IItemUsed, IMagicalPropertyInfo, IMoveToTileOptions, ItemTag } from "game/item/IItem";
27
27
  import { BookType, ItemType, ItemTypeGroup, ItemWeightChange, SYMBOL_CONTAINER_CACHED_REFERENCE } from "game/item/IItem";
28
28
  import type { IPlaceOnTileOptions } from "game/item/IItemManager";
29
29
  import ItemMapManager from "game/item/ItemMapManager";
@@ -119,7 +119,7 @@ export default class Item extends EventEmitter.Host<IItemEvents> implements IRef
119
119
  set durability(value: number);
120
120
  get durabilityMax(): number;
121
121
  set durabilityMax(value: number);
122
- getDisplayItem(): ItemType;
122
+ getDisplayItem(): DisplayableItemType;
123
123
  isContainer(): this is Item & IContainer;
124
124
  /**
125
125
  * Gets the owner of this item.
@@ -17,7 +17,7 @@ import type Player from "game/entity/player/Player";
17
17
  import { CreationId } from "game/IGame";
18
18
  import { Quality } from "game/IObject";
19
19
  import type { ContainerReference, IContainable, IContainer, IItemDescription, IItemWeightComponent, IMoveToTileOptions, IRecipe } from "game/item/IItem";
20
- import { CraftResult, ItemType, ItemTypeGroup } from "game/item/IItem";
20
+ import { CraftResult, ItemType, ItemTypeGroup, ItemTypeExtra } from "game/item/IItem";
21
21
  import type { IAddToContainerOptions, IDoodadsUsed, IGetBestItemsOptions, IGetItemOptions, IGetItemsOptions, IRequirementInfo } from "game/item/IItemManager";
22
22
  import { ContainerReferenceSource, CraftStatus, ICraftResultChances, WeightType } from "game/item/IItemManager";
23
23
  import Item from "game/item/Item";
@@ -133,6 +133,7 @@ export default class ItemManager extends ObjectManager<Item, IItemManagerEvents>
133
133
  updateContainedWithin(containable: IContainable, containedWithin: IContainer | undefined): void;
134
134
  addToContainerInternal(item: Item, container: IContainer, options?: IAddToContainerOptions): boolean;
135
135
  removeContainerItems(container: IContainer, removeContainedItems?: boolean): void;
136
+ isItemExtra(type: number): type is ItemTypeExtra;
136
137
  exists(item: Item): boolean;
137
138
  remove(item: Item, removeContainedItems?: boolean): void;
138
139
  getDisassemblyComponents(description: IItemDescription, quality: Quality | undefined): Item[];
@@ -11,13 +11,16 @@
11
11
  import type { IslandId } from "game/island/IIsland";
12
12
  import type Island from "game/island/Island";
13
13
  import type { IContainer } from "game/item/IItem";
14
+ import type Item from "game/item/Item";
14
15
  import DrawnMap from "game/mapping/DrawnMap";
15
16
  import type { IVector3 } from "utilities/math/IVector";
16
17
  export declare const DEFAULT_ITEM_MAP_CHANCE_COMPLETED = 0.1;
17
18
  export declare const DEFAULT_ITEM_MAP_CHANCE_OTHER_ISLAND = 0.5;
18
19
  export default class ItemMapManager {
19
- static getMapsInContainer(island: Island, container: IContainer): import("./Item").default[];
20
+ static getMapsInContainer(island: Island, container: IContainer): Item[];
20
21
  private map?;
22
+ private readonly host;
23
+ constructor(host: Item);
21
24
  has(): boolean;
22
25
  /**
23
26
  * Sets the map associated with this item.
@@ -50,6 +53,10 @@ export default class ItemMapManager {
50
53
  * @returns the island associated with this map, if it exists
51
54
  */
52
55
  getIsland(): Island | undefined;
56
+ /**
57
+ * @returns whether this map is completed
58
+ */
59
+ isCompleted(): boolean;
53
60
  /**
54
61
  * @returns the obfuscation of the linked map, a multiplier that will be applied overtop whatever durability obfuscation there is
55
62
  */
@@ -55,58 +55,59 @@ declare enum Dictionary {
55
55
  IslandNameModifierDescriptor = 43,
56
56
  IslandNameOverrunWithCreatureDescriptor = 44,
57
57
  Item = 45,
58
- ItemGroup = 46,
59
- JoinServerRetryReason = 47,
60
- Level = 48,
61
- Loading = 49,
62
- Macro = 50,
63
- MagicalPropertyType = 51,
64
- MapQuality = 52,
65
- MenuBarButton = 53,
66
- Message = 54,
67
- MessagesDefaultFilter = 55,
68
- MessagesTimestampMode = 56,
69
- Milestone = 57,
70
- MilestoneModifierGroup = 58,
71
- Misc = 59,
72
- ModLoadError = 60,
73
- ModLoadFailureReason = 61,
74
- ModProvide = 62,
75
- ModSort = 63,
76
- ModType = 64,
77
- MultiplayerCompatibility = 65,
78
- MultiplayerDisconnectReason = 66,
79
- MusicPlaylist = 67,
80
- Note = 68,
81
- Npc = 69,
82
- Number = 70,
83
- PartOfDay = 71,
84
- Prompt = 72,
85
- QuadrantComponent = 73,
86
- QuadrantComponentContextMenuAction = 74,
87
- Quality = 75,
88
- Quest = 76,
89
- QuestRequirement = 77,
90
- RecipeLevel = 78,
91
- Riddle = 79,
92
- SaveImportErrorReason = 80,
93
- SaveSlotSort = 81,
94
- Skill = 82,
95
- Source = 83,
96
- Stat = 84,
97
- StatusEffect = 85,
98
- TeamMemberResponsibility = 86,
99
- TemperatureType = 87,
100
- Terrain = 88,
101
- TileEvent = 89,
102
- TooltipVisibilityOption = 90,
103
- Ui = 91,
104
- UiQuadrant = 92,
105
- UnableToJoinReason = 93,
106
- UnlockedRecipesStrategy = 94,
107
- UsableActionType = 95,
108
- Website = 96,
109
- WeightStatus = 97,
110
- WorldLayer = 98
58
+ ItemExtra = 46,
59
+ ItemGroup = 47,
60
+ JoinServerRetryReason = 48,
61
+ Level = 49,
62
+ Loading = 50,
63
+ Macro = 51,
64
+ MagicalPropertyType = 52,
65
+ MapQuality = 53,
66
+ MenuBarButton = 54,
67
+ Message = 55,
68
+ MessagesDefaultFilter = 56,
69
+ MessagesTimestampMode = 57,
70
+ Milestone = 58,
71
+ MilestoneModifierGroup = 59,
72
+ Misc = 60,
73
+ ModLoadError = 61,
74
+ ModLoadFailureReason = 62,
75
+ ModProvide = 63,
76
+ ModSort = 64,
77
+ ModType = 65,
78
+ MultiplayerCompatibility = 66,
79
+ MultiplayerDisconnectReason = 67,
80
+ MusicPlaylist = 68,
81
+ Note = 69,
82
+ Npc = 70,
83
+ Number = 71,
84
+ PartOfDay = 72,
85
+ Prompt = 73,
86
+ QuadrantComponent = 74,
87
+ QuadrantComponentContextMenuAction = 75,
88
+ Quality = 76,
89
+ Quest = 77,
90
+ QuestRequirement = 78,
91
+ RecipeLevel = 79,
92
+ Riddle = 80,
93
+ SaveImportErrorReason = 81,
94
+ SaveSlotSort = 82,
95
+ Skill = 83,
96
+ Source = 84,
97
+ Stat = 85,
98
+ StatusEffect = 86,
99
+ TeamMemberResponsibility = 87,
100
+ TemperatureType = 88,
101
+ Terrain = 89,
102
+ TileEvent = 90,
103
+ TooltipVisibilityOption = 91,
104
+ Ui = 92,
105
+ UiQuadrant = 93,
106
+ UnableToJoinReason = 94,
107
+ UnlockedRecipesStrategy = 95,
108
+ UsableActionType = 96,
109
+ Website = 97,
110
+ WeightStatus = 98,
111
+ WorldLayer = 99
111
112
  }
112
113
  export default Dictionary;
@@ -31,7 +31,7 @@ import { InspectType } from "game/inspection/IInspection";
31
31
  import { DurabilityLevel } from "game/inspection/infoProviders/doodad/IDurability";
32
32
  import { Level } from "game/inspection/infoProviders/ILevel";
33
33
  import { Quality } from "game/IObject";
34
- import { BookType, EquipEffect, ItemType, ItemTypeGroup, RecipeLevel } from "game/item/IItem";
34
+ import { BookType, EquipEffect, ItemType, ItemTypeExtra, ItemTypeGroup, RecipeLevel } from "game/item/IItem";
35
35
  import { CraftEfficacy } from "game/item/recipe/Crafter";
36
36
  import { MagicalPropertyType } from "game/magic/MagicalPropertyType";
37
37
  import { DrawnMapTheme } from "game/mapping/IMapRender";
@@ -130,59 +130,60 @@ declare const dictionaryMap: {
130
130
  43: typeof IslandModifierType;
131
131
  44: typeof CreatureType;
132
132
  45: typeof ItemType;
133
- 46: typeof ItemTypeGroup;
134
- 47: typeof JoinServerRetryReason;
135
- 48: typeof Level;
136
- 49: typeof Load;
137
- 50: symbol;
138
- 51: typeof MagicalPropertyType;
139
- 52: typeof MapQuality;
140
- 53: typeof MenuBarButtonType;
141
- 54: typeof Message;
142
- 55: typeof MessageFilterDefault;
143
- 56: typeof MessageTimestamp;
144
- 57: typeof Milestone;
145
- 58: typeof MilestoneModifierGroup;
146
- 59: typeof MiscTranslation;
147
- 60: typeof CanLoadState;
148
- 61: typeof ModLoadFailureReason;
149
- 62: typeof ModProvide;
150
- 63: typeof ModSort;
151
- 64: typeof ModType;
152
- 65: typeof MultiplayerCompatibility;
153
- 66: typeof DisconnectReason;
154
- 67: typeof MusicPlaylist;
155
- 68: typeof Note;
156
- 69: typeof NPCType;
157
- 70: symbol;
158
- 71: typeof PartOfDay;
159
- 72: typeof Prompt;
160
- 73: typeof QuadrantComponentId;
161
- 74: typeof QuadrantComponentContextMenuAction;
162
- 75: typeof Quality;
163
- 76: typeof QuestType;
164
- 77: typeof QuestRequirementType;
165
- 78: typeof RecipeLevel;
166
- 79: typeof Riddle;
167
- 80: typeof SaveImportErrorReason;
168
- 81: typeof SaveSort;
169
- 82: typeof SkillType;
170
- 83: typeof Source;
171
- 84: typeof Stat;
172
- 85: typeof StatusType;
173
- 86: typeof Responsibility;
174
- 87: typeof TempType;
175
- 88: typeof TerrainType;
176
- 89: typeof TileEventType;
177
- 90: typeof TooltipVisibilityOption;
178
- 91: typeof UiTranslation;
179
- 92: typeof Quadrant;
180
- 93: typeof UnableToJoinReason;
181
- 94: typeof UnlockedRecipesStrategy;
182
- 95: typeof UsableActionType;
183
- 96: typeof Website;
184
- 97: typeof WeightStatus;
185
- 98: typeof WorldZ;
133
+ 46: typeof ItemTypeExtra;
134
+ 47: typeof ItemTypeGroup;
135
+ 48: typeof JoinServerRetryReason;
136
+ 49: typeof Level;
137
+ 50: typeof Load;
138
+ 51: symbol;
139
+ 52: typeof MagicalPropertyType;
140
+ 53: typeof MapQuality;
141
+ 54: typeof MenuBarButtonType;
142
+ 55: typeof Message;
143
+ 56: typeof MessageFilterDefault;
144
+ 57: typeof MessageTimestamp;
145
+ 58: typeof Milestone;
146
+ 59: typeof MilestoneModifierGroup;
147
+ 60: typeof MiscTranslation;
148
+ 61: typeof CanLoadState;
149
+ 62: typeof ModLoadFailureReason;
150
+ 63: typeof ModProvide;
151
+ 64: typeof ModSort;
152
+ 65: typeof ModType;
153
+ 66: typeof MultiplayerCompatibility;
154
+ 67: typeof DisconnectReason;
155
+ 68: typeof MusicPlaylist;
156
+ 69: typeof Note;
157
+ 70: typeof NPCType;
158
+ 71: symbol;
159
+ 72: typeof PartOfDay;
160
+ 73: typeof Prompt;
161
+ 74: typeof QuadrantComponentId;
162
+ 75: typeof QuadrantComponentContextMenuAction;
163
+ 76: typeof Quality;
164
+ 77: typeof QuestType;
165
+ 78: typeof QuestRequirementType;
166
+ 79: typeof RecipeLevel;
167
+ 80: typeof Riddle;
168
+ 81: typeof SaveImportErrorReason;
169
+ 82: typeof SaveSort;
170
+ 83: typeof SkillType;
171
+ 84: typeof Source;
172
+ 85: typeof Stat;
173
+ 86: typeof StatusType;
174
+ 87: typeof Responsibility;
175
+ 88: typeof TempType;
176
+ 89: typeof TerrainType;
177
+ 90: typeof TileEventType;
178
+ 91: typeof TooltipVisibilityOption;
179
+ 92: typeof UiTranslation;
180
+ 93: typeof Quadrant;
181
+ 94: typeof UnableToJoinReason;
182
+ 95: typeof UnlockedRecipesStrategy;
183
+ 96: typeof UsableActionType;
184
+ 97: typeof Website;
185
+ 98: typeof WeightStatus;
186
+ 99: typeof WorldZ;
186
187
  };
187
188
  export declare const strictDictionaries: {
188
189
  0: typeof ActionType;
@@ -231,59 +232,60 @@ export declare const strictDictionaries: {
231
232
  43: typeof IslandModifierType;
232
233
  44: typeof CreatureType;
233
234
  45: typeof ItemType;
234
- 46: typeof ItemTypeGroup;
235
- 47: typeof JoinServerRetryReason;
236
- 48: typeof Level;
237
- 49: typeof Load;
238
- 50: symbol;
239
- 51: typeof MagicalPropertyType;
240
- 52: typeof MapQuality;
241
- 53: typeof MenuBarButtonType;
242
- 54: typeof Message;
243
- 55: typeof MessageFilterDefault;
244
- 56: typeof MessageTimestamp;
245
- 57: typeof Milestone;
246
- 58: typeof MilestoneModifierGroup;
247
- 59: typeof MiscTranslation;
248
- 60: typeof CanLoadState;
249
- 61: typeof ModLoadFailureReason;
250
- 62: typeof ModProvide;
251
- 63: typeof ModSort;
252
- 64: typeof ModType;
253
- 65: typeof MultiplayerCompatibility;
254
- 66: typeof DisconnectReason;
255
- 67: typeof MusicPlaylist;
256
- 68: typeof Note;
257
- 69: typeof NPCType;
258
- 70: symbol;
259
- 71: typeof PartOfDay;
260
- 72: typeof Prompt;
261
- 73: typeof QuadrantComponentId;
262
- 74: typeof QuadrantComponentContextMenuAction;
263
- 75: typeof Quality;
264
- 76: typeof QuestType;
265
- 77: typeof QuestRequirementType;
266
- 78: typeof RecipeLevel;
267
- 79: typeof Riddle;
268
- 80: typeof SaveImportErrorReason;
269
- 81: typeof SaveSort;
270
- 82: typeof SkillType;
271
- 83: typeof Source;
272
- 84: typeof Stat;
273
- 85: typeof StatusType;
274
- 86: typeof Responsibility;
275
- 87: typeof TempType;
276
- 88: typeof TerrainType;
277
- 89: typeof TileEventType;
278
- 90: typeof TooltipVisibilityOption;
279
- 91: typeof UiTranslation;
280
- 92: typeof Quadrant;
281
- 93: typeof UnableToJoinReason;
282
- 94: typeof UnlockedRecipesStrategy;
283
- 95: typeof UsableActionType;
284
- 96: typeof Website;
285
- 97: typeof WeightStatus;
286
- 98: typeof WorldZ;
235
+ 46: typeof ItemTypeExtra;
236
+ 47: typeof ItemTypeGroup;
237
+ 48: typeof JoinServerRetryReason;
238
+ 49: typeof Level;
239
+ 50: typeof Load;
240
+ 51: symbol;
241
+ 52: typeof MagicalPropertyType;
242
+ 53: typeof MapQuality;
243
+ 54: typeof MenuBarButtonType;
244
+ 55: typeof Message;
245
+ 56: typeof MessageFilterDefault;
246
+ 57: typeof MessageTimestamp;
247
+ 58: typeof Milestone;
248
+ 59: typeof MilestoneModifierGroup;
249
+ 60: typeof MiscTranslation;
250
+ 61: typeof CanLoadState;
251
+ 62: typeof ModLoadFailureReason;
252
+ 63: typeof ModProvide;
253
+ 64: typeof ModSort;
254
+ 65: typeof ModType;
255
+ 66: typeof MultiplayerCompatibility;
256
+ 67: typeof DisconnectReason;
257
+ 68: typeof MusicPlaylist;
258
+ 69: typeof Note;
259
+ 70: typeof NPCType;
260
+ 71: symbol;
261
+ 72: typeof PartOfDay;
262
+ 73: typeof Prompt;
263
+ 74: typeof QuadrantComponentId;
264
+ 75: typeof QuadrantComponentContextMenuAction;
265
+ 76: typeof Quality;
266
+ 77: typeof QuestType;
267
+ 78: typeof QuestRequirementType;
268
+ 79: typeof RecipeLevel;
269
+ 80: typeof Riddle;
270
+ 81: typeof SaveImportErrorReason;
271
+ 82: typeof SaveSort;
272
+ 83: typeof SkillType;
273
+ 84: typeof Source;
274
+ 85: typeof Stat;
275
+ 86: typeof StatusType;
276
+ 87: typeof Responsibility;
277
+ 88: typeof TempType;
278
+ 89: typeof TerrainType;
279
+ 90: typeof TileEventType;
280
+ 91: typeof TooltipVisibilityOption;
281
+ 92: typeof UiTranslation;
282
+ 93: typeof Quadrant;
283
+ 94: typeof UnableToJoinReason;
284
+ 95: typeof UnlockedRecipesStrategy;
285
+ 96: typeof UsableActionType;
286
+ 97: typeof Website;
287
+ 98: typeof WeightStatus;
288
+ 99: typeof WorldZ;
287
289
  };
288
290
  export declare type DictionaryEnum = (typeof dictionaryMap)[Dictionary];
289
291
  export declare type DictionaryEntryEnums = {
@@ -390,6 +392,7 @@ declare const dictionaries: {
390
392
  96: typeof SYMBOL_ANY_DICTIONARY | Enum;
391
393
  97: typeof SYMBOL_ANY_DICTIONARY | Enum;
392
394
  98: typeof SYMBOL_ANY_DICTIONARY | Enum;
395
+ 99: typeof SYMBOL_ANY_DICTIONARY | Enum;
393
396
  } & Record<number, typeof SYMBOL_ANY_DICTIONARY | Enum | undefined> & {
394
397
  getByEnum: typeof getByEnum;
395
398
  };