@wayward/types 2.11.0-beta.dev.20211128.1 → 2.11.0-beta.dev.20211202.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.
@@ -74,6 +74,15 @@ export default abstract class NPC extends Human {
74
74
  */
75
75
  getActions(): ActionType[] | undefined;
76
76
  addAiType(ai: AiType): void;
77
+ /**
78
+ * Removes an AiType from an NPC.
79
+ * @param ai The AiType to remove from the NPC.
80
+ */
81
+ removeAiType(ai: AiType): void;
82
+ /**
83
+ * Closes the merchant trading window for everybody.
84
+ */
85
+ closeInventory(): void;
77
86
  updateDirection(x: number, y: number): void;
78
87
  /**
79
88
  * Sets the default weightCapacity of an NPC (based on their equipment and starting items).
@@ -140,6 +140,12 @@ export interface IPlayerEvents extends Events<Human> {
140
140
  * @param slot The slot
141
141
  */
142
142
  equip?(item: Item, slot: EquipType): any;
143
+ /**
144
+ * Called when the players quickslots are updated
145
+ * @param quickslot The quick slot
146
+ * @param itemType The item type
147
+ */
148
+ updatedQuickslotInfo?(quickslot: number, itemType?: ItemType): any;
143
149
  /**
144
150
  * Called when input is being processed
145
151
  * @param player The player object
@@ -1174,7 +1174,8 @@ export declare enum ItemTypeGroup {
1174
1174
  WispContainer = 889,
1175
1175
  Shirt = 890,
1176
1176
  Trousers = 891,
1177
- All = 892,
1178
- Last = 893
1177
+ Spine = 892,
1178
+ All = 893,
1179
+ Last = 894
1179
1180
  }
1180
1181
  export {};
@@ -46,6 +46,8 @@ export default abstract class BasePacket {
46
46
  protected writeUint16(value: number): void;
47
47
  protected readUint32(): number;
48
48
  protected writeUint32(value: number): void;
49
+ protected readInt16(): number;
50
+ protected writeInt16(value: number): void;
49
51
  protected readFloat32(): number;
50
52
  protected writeFloat32(value: number): void;
51
53
  protected readFloat64(): number;
@@ -19,4 +19,5 @@ export default class IslandDropdown<OTHER_OPTIONS extends string = never> extend
19
19
  protected shouldIncludeOtherOptionsInGroupFilter(): boolean;
20
20
  protected isInGroup(islandId: IslandId, biome: BiomeType): boolean;
21
21
  protected getGroups(): BiomeType[];
22
+ protected onRefresh(): void;
22
23
  }
@@ -12,5 +12,5 @@ import { NPCType } from "game/entity/npc/INPCs";
12
12
  import type { IDropdownOption } from "ui/component/Dropdown";
13
13
  import EnumDropdown from "ui/component/dropdown/EnumDropdown";
14
14
  export default class NPCDropdown<OTHER_OPTIONS extends string = never> extends EnumDropdown<typeof NPCType, OTHER_OPTIONS> {
15
- constructor(defaultOption: OTHER_OPTIONS | NPCType, options: Iterable<IDropdownOption<OTHER_OPTIONS>>);
15
+ constructor(defaultOption: OTHER_OPTIONS | NPCType, options?: Iterable<IDropdownOption<OTHER_OPTIONS>>);
16
16
  }
@@ -163,7 +163,7 @@ export default class InGameScreen extends BaseScreen {
163
163
  setQuickSlot(quickSlot: number, itemId?: number, internal?: boolean): boolean;
164
164
  setQuickSlotByItemType(quickSlot: number, itemType: ItemType, disabled: boolean, item?: Item | undefined): void;
165
165
  setQuickSlotByContextAction(quickSlot: number, action: IContextMenuAction): void;
166
- addItemToFreeQuickSlot(itemId: number): void;
166
+ addItemToFreeQuickSlot(itemId: number): boolean;
167
167
  clearQuickSlot(quickSlot: number, internal?: boolean): void;
168
168
  removeItemFromQuickSlot(itemId?: number, skipSync?: boolean): void;
169
169
  setItemQuickslot(item: Item, quickSlot: number | undefined): void;
@@ -37,6 +37,7 @@ export default class MapDialog extends PrerenderedCanvasDialog {
37
37
  getName(): import("../../../../../language/impl/TranslationImpl").default;
38
38
  read(map: DrawnMap, item: Item, resetView?: boolean): Promise<void>;
39
39
  protected onInventoryItemRemove(_: any, item: Item): void;
40
+ protected onToggleProtected(item: Item): void;
40
41
  protected onInventoryItemAdd(_: any, item: Item): void;
41
42
  protected onInventoryItemUpdate(_: any, item: Item): void;
42
43
  protected onPostMove(player: Player): void;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@wayward/types",
3
3
  "description": "TypeScript declarations for Wayward, used for modding.",
4
- "version": "2.11.0-beta.dev.20211128.1",
4
+ "version": "2.11.0-beta.dev.20211202.1",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",