@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.
- package/definitions/game/game/entity/Human.d.ts +1 -2
- package/definitions/game/game/entity/action/ActionsRegistration.d.ts +1 -0
- package/definitions/game/game/entity/action/IAction.d.ts +2 -1
- package/definitions/game/game/entity/action/actions/DiscoverRecipe.d.ts +14 -0
- package/definitions/game/game/entity/player/Player.d.ts +4 -1
- package/definitions/game/multiplayer/IMultiplayer.d.ts +55 -54
- package/definitions/game/multiplayer/Multiplayer.d.ts +1 -1
- package/package.json +1 -1
- package/definitions/game/multiplayer/packets/shared/DiscoverRecipePacket.d.ts +0 -21
@@ -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
|
-
|
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
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
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
|
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,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
|
-
}
|