@wayward/types 2.14.4-beta.dev.20250412.1 → 2.14.4-beta.dev.20250420.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.
@@ -374,8 +374,7 @@ export default abstract class Human<DescriptionType = unknown, TypeType extends
374
374
  calculateEquipmentStats(): void;
375
375
  private recalculateInsulation;
376
376
  private getEquipmentInsulation;
377
- discoverRecipes(recipes: Array<[recipeType: ItemType, crafted: ICrafted]>, discoveredClientSide?: boolean): void;
378
- discoverRecipe(recipeType: ItemType, crafted?: ICrafted, discoveredClientSide?: boolean, emit?: boolean): void;
377
+ discoverRecipe(itemType: ItemType, crafted?: ICrafted): void;
379
378
  incrementIslandTickCount(): void;
380
379
  protected onPostMove(lastTile: Tile, tile: Tile, flags?: MoveFlag, skipExtinguishTorches?: boolean): void;
381
380
  passTurn(turnType?: TurnTypeFlag): void;
@@ -44,6 +44,7 @@ export declare const actionDescriptionsSlow: {
44
44
  117: import("./Action").Action<[import("@wayward/game/game/entity/action/IAction").ActionArgument.ItemNearby], import("../Human").default<unknown, number, import("../../reference/IReferenceManager").ReferenceType.NPC | import("../../reference/IReferenceManager").ReferenceType.Player>, void, import("@wayward/game/game/entity/action/IAction").IActionUsable, [import("../../item/Item").default]>;
45
45
  79: import("./Action").Action<[[arg1: import("@wayward/game/game/entity/action/IAction").ActionArgument.Undefined, import("@wayward/game/game/entity/action/IAction").ActionArgument.DoodadNearby]], import("../Human").default<unknown, number, import("../../reference/IReferenceManager").ReferenceType.NPC | import("../../reference/IReferenceManager").ReferenceType.Player>, void, import("@wayward/game/game/entity/action/actions/DetachContainer").IDetachContainerCanUse, [(import("../../doodad/Doodad").default | undefined)?]>;
46
46
  13: import("./Action").Action<[[arg1: import("@wayward/game/game/entity/action/IAction").ActionArgument.Undefined, import("@wayward/game/game/entity/action/IAction").ActionArgument.ItemInventory]], import("../Human").default<unknown, number, import("../../reference/IReferenceManager").ReferenceType.NPC | import("../../reference/IReferenceManager").ReferenceType.Player>, void | Promise<void>, import("@wayward/game/game/entity/action/actions/Dig").IDigGenericCanUse | import("@wayward/game/game/entity/action/actions/Dig").IDigTileCanUse, [(import("../../item/Item").default | undefined)?]>;
47
+ 140: import("./Action").Action<[import("@wayward/game/game/entity/action/IAction").ActionArgument.Integer32, import("@wayward/game/game/entity/action/IAction").ActionArgument.Boolean, import("@wayward/game/game/entity/action/IAction").ActionArgument.Float64], import("../Human").default<unknown, number, import("../../reference/IReferenceManager").ReferenceType.NPC | import("../../reference/IReferenceManager").ReferenceType.Player>, void, import("@wayward/game/game/entity/action/IAction").IActionUsable, [number, boolean, number]>;
47
48
  0: import("./Action").Action<[import("@wayward/game/game/entity/action/IAction").ActionArgument.ItemNearby, [arg1: import("@wayward/game/game/entity/action/IAction").ActionArgument.Undefined, import("@wayward/game/game/entity/action/IAction").ActionArgument.OptionalItemArrayNearby]], import("../Human").default<unknown, number, import("../../reference/IReferenceManager").ReferenceType.NPC | import("../../reference/IReferenceManager").ReferenceType.Player>, void | Promise<void>, import("@wayward/game/game/entity/action/actions/Disassemble").IDisassembleCanUse, [import("../../item/Item").default, ((import("../../item/Item").default | undefined)[] | undefined)?]>;
48
49
  40: import("./Action").Action<[import("@wayward/game/game/entity/action/IAction").ActionArgument.ItemNearby, [arg1: import("@wayward/game/game/entity/action/IAction").ActionArgument.Undefined, import("@wayward/game/game/entity/action/IAction").ActionArgument.ItemNearby]], import("../Human").default<unknown, number, import("../../reference/IReferenceManager").ReferenceType.NPC | import("../../reference/IReferenceManager").ReferenceType.Player>, void | Promise<void>, import("@wayward/game/game/entity/action/actions/Dismantle").IDismantleCanUse, [import("../../item/Item").default, (import("../../item/Item").default | undefined)?]>;
49
50
  113: import("./Action").Action<[[arg1: import("@wayward/game/game/entity/action/IAction").ActionArgument.Undefined, import("@wayward/game/game/entity/action/IAction").ActionArgument.ItemNearby, import("@wayward/game/game/entity/action/IAction").ActionArgument.DoodadNearby]], import("../Human").default<unknown, number, import("../../reference/IReferenceManager").ReferenceType.NPC | import("../../reference/IReferenceManager").ReferenceType.Player>, void, import("@wayward/game/game/entity/action/actions/ToggleVehicle").ToggleVehicleCanUse, [(import("../../doodad/Doodad").default | import("../../item/Item").default | undefined)?]>;
@@ -184,7 +184,8 @@ export declare enum ActionType {
184
184
  SetCreatureAiAll = 136,
185
185
  CraftingIngredient = 137,
186
186
  ViewItems = 138,
187
- AscendDescend = 139
187
+ AscendDescend = 139,
188
+ DiscoverRecipe = 140
188
189
  }
189
190
  export declare const ACTIONS_RECOMMENDED: ActionType[];
190
191
  export declare enum ActionUsability {
@@ -0,0 +1,14 @@
1
+ /*!
2
+ * Copyright 2011-2024 Unlok
3
+ * https://www.unlok.ca
4
+ *
5
+ * Credits & Thanks:
6
+ * https://www.unlok.ca/credits-thanks/
7
+ *
8
+ * Wayward is a copyrighted and licensed work. Modification and/or distribution of any source files is prohibited. If you wish to modify the game in any way, please refer to the modding guide:
9
+ * https://github.com/WaywardGame/types/wiki
10
+ */
11
+ import { Action } from "@wayward/game/game/entity/action/Action";
12
+ import { ActionArgument } from "@wayward/game/game/entity/action/IAction";
13
+ declare const _default: Action<[ActionArgument.Integer32, ActionArgument.Boolean, ActionArgument.Float64], import("../../Human").default<unknown, number, import("../../../reference/IReferenceManager").ReferenceType.NPC | import("../../../reference/IReferenceManager").ReferenceType.Player>, void, import("@wayward/game/game/entity/action/IAction").IActionUsable, [number, boolean, number]>;
14
+ export default _default;
@@ -22,9 +22,10 @@ import NoteManager from "@wayward/game/game/entity/player/note/NoteManager";
22
22
  import QuestManager from "@wayward/game/game/entity/player/quest/QuestManager";
23
23
  import { StatusApplicability } from "@wayward/game/game/entity/status/IStatus";
24
24
  import type { IslandId } from "@wayward/game/game/island/IIsland";
25
- import type { IContainer } from "@wayward/game/game/item/IItem";
25
+ import type { IContainer, IRecipe } from "@wayward/game/game/item/IItem";
26
26
  import { ItemType } from "@wayward/game/game/item/IItem";
27
27
  import type Item from "@wayward/game/game/item/Item";
28
+ import ItemRecipeRequirementChecker from "@wayward/game/game/item/ItemRecipeRequirementChecker";
28
29
  import { Prompt } from "@wayward/game/game/meta/prompt/IPrompt";
29
30
  import { Milestone } from "@wayward/game/game/milestones/IMilestone";
30
31
  import type { ReferenceType } from "@wayward/game/game/reference/IReferenceManager";
@@ -110,6 +111,8 @@ export default class Player extends Human<undefined, number, ReferenceType.Playe
110
111
  skipDeferral: boolean;
111
112
  }>): void;
112
113
  private updateTablesInternal;
114
+ shouldDiscoverRecipe(recipe: IRecipe, checker: ItemRecipeRequirementChecker): boolean;
115
+ private isRecipeDiscovered;
113
116
  private updateCraftTable;
114
117
  updateDismantleTable(adjacentContainers?: IContainer[], force?: boolean): void;
115
118
  getName(includeTitle?: boolean): TranslationImpl;
@@ -61,60 +61,61 @@ export declare enum MultiplayerSyncCheck {
61
61
  CreatureStatChange = 21,
62
62
  Damage = 22,
63
63
  Dismantle = 23,
64
- Doodad = 24,
65
- DoodadManager = 25,
66
- EncumberedStatus = 26,
67
- Entity = 27,
68
- EntityPosition = 28,
69
- ExhaustedPreMove = 29,
70
- FlowFieldHashCode = 30,
71
- FlowFieldPenalty = 31,
72
- FlowFieldUpdate = 32,
73
- FlowFieldUpdateTile = 33,
74
- FlowFieldValue = 34,
75
- HandToUse = 35,
76
- HealthChange = 36,
77
- History = 37,
78
- InventoryCount = 38,
79
- Island = 39,
80
- IslandCivilizationScore = 40,
81
- Islands = 41,
82
- IsTileEmpty = 42,
83
- Item = 43,
84
- ItemCraft = 44,
85
- ItemDamage = 45,
86
- ItemOrder = 46,
87
- LastCreationIds = 47,
88
- Merchant = 48,
89
- MilestoneSeed = 49,
90
- Modifier = 50,
91
- MoveToTile = 51,
92
- NPC = 52,
93
- Option = 53,
94
- PenaltyFieldHashCode = 54,
95
- PlaceOnTile = 55,
96
- PlayerManager = 56,
97
- Players = 57,
98
- PlayerSetup = 58,
99
- Random = 59,
100
- Seed = 60,
101
- SeededGenerator = 61,
102
- SetPosition = 62,
103
- SetZ = 63,
104
- SkillGain = 64,
105
- StaminaChanges = 65,
106
- StatChange = 66,
107
- Stats = 67,
108
- Status = 68,
109
- StatusChange = 69,
110
- TemperatureManager = 70,
111
- Temporary = 71,
112
- Tick = 72,
113
- TileEvent = 73,
114
- Time = 74,
115
- UpdateDirection = 75,
116
- Weight = 76,
117
- WorldUpdateTile = 77
64
+ DiscoverRecipe = 24,
65
+ Doodad = 25,
66
+ DoodadManager = 26,
67
+ EncumberedStatus = 27,
68
+ Entity = 28,
69
+ EntityPosition = 29,
70
+ ExhaustedPreMove = 30,
71
+ FlowFieldHashCode = 31,
72
+ FlowFieldPenalty = 32,
73
+ FlowFieldUpdate = 33,
74
+ FlowFieldUpdateTile = 34,
75
+ FlowFieldValue = 35,
76
+ HandToUse = 36,
77
+ HealthChange = 37,
78
+ History = 38,
79
+ InventoryCount = 39,
80
+ Island = 40,
81
+ IslandCivilizationScore = 41,
82
+ Islands = 42,
83
+ IsTileEmpty = 43,
84
+ Item = 44,
85
+ ItemCraft = 45,
86
+ ItemDamage = 46,
87
+ ItemOrder = 47,
88
+ LastCreationIds = 48,
89
+ Merchant = 49,
90
+ MilestoneSeed = 50,
91
+ Modifier = 51,
92
+ MoveToTile = 52,
93
+ NPC = 53,
94
+ Option = 54,
95
+ PenaltyFieldHashCode = 55,
96
+ PlaceOnTile = 56,
97
+ PlayerManager = 57,
98
+ Players = 58,
99
+ PlayerSetup = 59,
100
+ Random = 60,
101
+ Seed = 61,
102
+ SeededGenerator = 62,
103
+ SetPosition = 63,
104
+ SetZ = 64,
105
+ SkillGain = 65,
106
+ StaminaChanges = 66,
107
+ StatChange = 67,
108
+ Stats = 68,
109
+ Status = 69,
110
+ StatusChange = 70,
111
+ TemperatureManager = 71,
112
+ Temporary = 72,
113
+ Tick = 73,
114
+ TileEvent = 74,
115
+ Time = 75,
116
+ UpdateDirection = 76,
117
+ Weight = 77,
118
+ WorldUpdateTile = 78
118
119
  }
119
120
  export declare const maxPlayers = 32;
120
121
  export declare const packetTickRate = 16.6666;
@@ -148,7 +148,7 @@ export default class Multiplayer extends EventEmitter.Host<IMultiplayerEvents> {
148
148
  * @param checkId When true, this packet will not be sent to the server/client if the same packet is already being processed. When false, this packet will not be sent if any packet is already being processed. Useful when dealing with methods that could end up sending multiple packets while a packet is already being processed.
149
149
  * @param wait When true, the client will keep track of what packets it sent to the server. If the client calls this method again before the server responds, it will not send a duplicate packet. It will wait for the server to send the packet back before allowing another one to be sent. When true, it will keep track of duplicate packets based on the packet type. When it's a number, it will keep track of duplicate packets based on the packet type + the number.
150
150
  */
151
- syncPacket<T = any>(packet: IPacket, clientSide?: NullaryFunction<T>, checkId?: boolean, wait?: number | true): PromiseOr<T | undefined>;
151
+ syncPacket<T = any>(packet: IPacket, clientSide: NullaryFunction<T>, checkId: boolean, wait: boolean | number): PromiseOr<T | undefined>;
152
152
  markCurrentProcessingPacket(packetId: number, processing: boolean): void;
153
153
  resolveSyncPacketWaiting(packet: IPacket, wait: number): void;
154
154
  resolveSyncPacketsWaiting(waitId?: string, value?: unknown): 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.14.4-beta.dev.20250412.1",
4
+ "version": "2.14.4-beta.dev.20250420.1",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",
@@ -1,21 +0,0 @@
1
- /*!
2
- * Copyright 2011-2024 Unlok
3
- * https://www.unlok.ca
4
- *
5
- * Credits & Thanks:
6
- * https://www.unlok.ca/credits-thanks/
7
- *
8
- * Wayward is a copyrighted and licensed work. Modification and/or distribution of any source files is prohibited. If you wish to modify the game in any way, please refer to the modding guide:
9
- * https://github.com/WaywardGame/types/wiki
10
- */
11
- import type { ItemType } from "@wayward/game/game/item/IItem";
12
- import PlayerTargetedSharedPacket from "@wayward/game/multiplayer/packets/PlayerTargetedSharedPacket";
13
- export default class DiscoverRecipePacket extends PlayerTargetedSharedPacket {
14
- recipeType: ItemType;
15
- newUnlock: boolean;
16
- unlockTime: number;
17
- getDebugInfo(): string;
18
- isSyncCheckEnabled(): boolean;
19
- isAllowedWhenPaused(): boolean;
20
- process(): void;
21
- }