@wayward/types 2.14.5-beta.dev.20250609.1 → 2.14.5-beta.dev.20250614.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.
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Copyright 2011-2024 Unlok
2
+ * Copyright 2011-2025 Unlok
3
3
  * https://www.unlok.ca
4
4
  *
5
5
  * Credits & Thanks:
@@ -85,7 +85,7 @@ export default class DoodadManager extends EntityManager<Doodad> {
85
85
  */
86
86
  updateAllAsync(ticks: number, playingHumans: Human[], playerHumanTiles: Set<Tile>, onProgress: (progess: number) => Promise<void>): Promise<void>;
87
87
  verifyAndFixItemWeights(): void;
88
- getScarecrowInRange(tile: Tile, range: number): Doodad | undefined;
88
+ getScarecrowInRange(tile: Tile): Doodad | undefined;
89
89
  getScarecrowInLineOfSight(creature: Creature, isClientside: boolean): Doodad | undefined;
90
90
  private addScarecrow;
91
91
  private removeScarecrow;
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Copyright 2011-2024 Unlok
2
+ * Copyright 2011-2025 Unlok
3
3
  * https://www.unlok.ca
4
4
  *
5
5
  * Credits & Thanks:
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Copyright 2011-2024 Unlok
2
+ * Copyright 2011-2025 Unlok
3
3
  * https://www.unlok.ca
4
4
  *
5
5
  * Credits & Thanks:
@@ -130,6 +130,7 @@ export default abstract class Human<DescriptionType = unknown, TypeType extends
130
130
  highestAttack?: number;
131
131
  highestDefense?: number;
132
132
  cumulativeEvilCrafting: number;
133
+ itemDiscovered: ItemType[];
133
134
  /** @deprecated (use the entity itself) */
134
135
  readonly inventory: IContainer;
135
136
  /**
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Copyright 2011-2024 Unlok
2
+ * Copyright 2011-2025 Unlok
3
3
  * https://www.unlok.ca
4
4
  *
5
5
  * Credits & Thanks:
@@ -15,6 +15,7 @@
15
15
  export declare const actionDescriptionsSlow: {
16
16
  109: 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, import("@wayward/game/game/entity/action/actions/Absorb").IAbsorbCanUse, [import("../../item/Item").default, (import("../../item/Item").default | undefined)?]>;
17
17
  51: import("./Action").Action<[import("@wayward/game/game/entity/action/IAction").ActionArgument.ItemNearby, 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, import("@wayward/game/game/entity/action/actions/AddFuel").IAddFuelCanUse, [import("../../item/Item").default, import("../../item/Item").default]>;
18
+ 142: import("./Action").Action<[import("@wayward/game/game/entity/action/IAction").ActionArgument.Integer32], 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]>;
18
19
  95: 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, import("@wayward/game/game/entity/action/actions/Alter").IAlterCanUse, [import("../../item/Item").default, (import("../../item/Item").default | undefined)?]>;
19
20
  75: 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("./actions/ConsumeItem").IConsumeItemCanUse, [import("../../item/Item").default]>;
20
21
  139: import("./Action").Action<[], import("../Human").default<unknown, number, import("../../reference/IReferenceManager").ReferenceType.NPC | import("../../reference/IReferenceManager").ReferenceType.Player>, void, import("@wayward/game/game/entity/action/IAction").IActionUsable, []>;
@@ -133,6 +134,7 @@ export declare const actionDescriptionsSlow: {
133
134
  68: import("./Action").Action<[[import("@wayward/game/game/entity/action/IAction").ActionArgument.ItemNearby, import("@wayward/game/game/entity/action/IAction").ActionArgument.Doodad, import("@wayward/game/game/entity/action/IAction").ActionArgument.Creature, import("@wayward/game/game/entity/action/IAction").ActionArgument.NPC], import("@wayward/game/game/entity/action/IAction").ActionArgument.String], 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("../creature/Creature").default | import("../../doodad/Doodad").default | import("../../item/Item").default | import("../npc/NPC").default, string]>;
134
135
  98: import("./Action").Action<[import("@wayward/game/game/entity/action/IAction").ActionArgument.Island, import("@wayward/game/game/entity/action/IAction").ActionArgument.String], 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("../../island/Island").default, string]>;
135
136
  18: 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("@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/Repair").IRepairCanUse, [import("../../item/Item").default, (import("../../doodad/Doodad").default | import("../../item/Item").default | undefined)?]>;
137
+ 143: import("./Action").Action<[], import("../Human").default<unknown, number, import("../../reference/IReferenceManager").ReferenceType.NPC | import("../../reference/IReferenceManager").ReferenceType.Player>, void, import("@wayward/game/game/entity/action/IAction").IActionUsable, []>;
136
138
  133: 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, import("@wayward/game/game/entity/action/actions/Reshape").IReshapeCanUse, [import("../../item/Item").default, (import("../../item/Item").default | undefined)?]>;
137
139
  87: import("./Action").Action<[], import("../player/Player").default, void, import("@wayward/game/game/entity/action/actions/Respawn").IRespawnCanUse, []>;
138
140
  9: 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("@wayward/game/game/entity/action/IAction").ActionArgument.Undefined, import("./argument/ActionArgumentEnum").default<import("../IHuman").RestType, "Resting" | "Sleeping">]], import("../Human").default<unknown, number, import("../../reference/IReferenceManager").ReferenceType.NPC | import("../../reference/IReferenceManager").ReferenceType.Player>, void, import("@wayward/game/game/entity/action/actions/Rest").IRestCanUse, [(import("../../doodad/Doodad").default | import("../../item/Item").default | undefined)?, (import("../IHuman").RestType | undefined)?]>;
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Copyright 2011-2024 Unlok
2
+ * Copyright 2011-2025 Unlok
3
3
  * https://www.unlok.ca
4
4
  *
5
5
  * Credits & Thanks:
@@ -186,7 +186,9 @@ export declare enum ActionType {
186
186
  ViewItems = 138,
187
187
  AscendDescend = 139,
188
188
  DiscoverRecipe = 140,
189
- ExcavateCollapse = 141
189
+ ExcavateCollapse = 141,
190
+ AddItemDiscovered = 142,
191
+ ResetItemDiscovered = 143
190
192
  }
191
193
  export declare const ACTIONS_RECOMMENDED: ActionType[];
192
194
  export declare enum ActionUsability {
@@ -0,0 +1,14 @@
1
+ /*!
2
+ * Copyright 2011-2025 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], 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]>;
14
+ export default _default;
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Copyright 2011-2024 Unlok
2
+ * Copyright 2011-2025 Unlok
3
3
  * https://www.unlok.ca
4
4
  *
5
5
  * Credits & Thanks:
@@ -0,0 +1,13 @@
1
+ /*!
2
+ * Copyright 2011-2025 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
+ declare const _default: Action<[], import("../../Human").default<unknown, number, import("../../../reference/IReferenceManager").ReferenceType.NPC | import("../../../reference/IReferenceManager").ReferenceType.Player>, void, import("@wayward/game/game/entity/action/IAction").IActionUsable, []>;
13
+ export default _default;
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Copyright 2011-2024 Unlok
2
+ * Copyright 2011-2025 Unlok
3
3
  * https://www.unlok.ca
4
4
  *
5
5
  * Credits & Thanks:
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Copyright 2011-2024 Unlok
2
+ * Copyright 2011-2025 Unlok
3
3
  * https://www.unlok.ca
4
4
  *
5
5
  * Credits & Thanks:
@@ -112,6 +112,12 @@ export default class Player extends Human<undefined, number, ReferenceType.Playe
112
112
  }>): void;
113
113
  private updateTablesInternal;
114
114
  shouldDiscoverRecipe(recipe: IRecipe, checker: ItemRecipeRequirementChecker): boolean;
115
+ /**
116
+ * Checks if the item is discovered based on the game options and milestones.
117
+ * @param itemType The type of the item to check.
118
+ * @returns True if the item is discovered, false otherwise.
119
+ */
120
+ private isItemDiscovered;
115
121
  private isRecipeDiscovered;
116
122
  private updateCraftTable;
117
123
  updateDismantleTable(adjacentContainers?: IContainer[], force?: boolean): void;
@@ -138,6 +144,11 @@ export default class Player extends Human<undefined, number, ReferenceType.Playe
138
144
  * Only use this clientside
139
145
  */
140
146
  isExploredClientSide(x: number, y: number, z: number): boolean;
147
+ /**
148
+ * Add milestones and local item discovery for the given item type.
149
+ * @param itemType The type of the item to discover.
150
+ */
151
+ discoverItem(itemType: ItemType): void;
141
152
  protected onSkillGain(skill: SkillType, fromValue: number, toValue: number, mod: number): void;
142
153
  protected getStatusApplicability(): StatusApplicability | undefined;
143
154
  private canWriteInHours;
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Copyright 2011-2024 Unlok
2
+ * Copyright 2011-2025 Unlok
3
3
  * https://www.unlok.ca
4
4
  *
5
5
  * Credits & Thanks:
@@ -121,6 +121,7 @@ export interface IItemDisassembly {
121
121
  maxDur: number;
122
122
  weight: number;
123
123
  magic: MagicalPropertyManager | undefined;
124
+ aestheticRandom: number | undefined;
124
125
  disassembly: Item[];
125
126
  tradedFrom: string[] | undefined;
126
127
  decay: number | undefined;
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Copyright 2011-2024 Unlok
2
+ * Copyright 2011-2025 Unlok
3
3
  * https://www.unlok.ca
4
4
  *
5
5
  * Credits & Thanks:
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Copyright 2011-2024 Unlok
2
+ * Copyright 2011-2025 Unlok
3
3
  * https://www.unlok.ca
4
4
  *
5
5
  * Credits & Thanks:
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Copyright 2011-2025 Unlok
2
+ * Copyright 2011-2024 Unlok
3
3
  * https://www.unlok.ca
4
4
  *
5
5
  * Credits & Thanks:
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Copyright 2011-2024 Unlok
2
+ * Copyright 2011-2025 Unlok
3
3
  * https://www.unlok.ca
4
4
  *
5
5
  * Credits & Thanks:
@@ -175,6 +175,7 @@ export interface ITileData {
175
175
  meltDecay?: number;
176
176
  weight?: number;
177
177
  magic?: MagicalPropertyManager;
178
+ aestheticRandom?: number;
178
179
  disassembly?: Item[];
179
180
  ownerIdentifier?: string;
180
181
  renamed?: string | ISerializedTranslation | undefined;
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Copyright 2011-2024 Unlok
2
+ * Copyright 2011-2025 Unlok
3
3
  * https://www.unlok.ca
4
4
  *
5
5
  * Credits & Thanks:
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Copyright 2011-2024 Unlok
2
+ * Copyright 2011-2025 Unlok
3
3
  * https://www.unlok.ca
4
4
  *
5
5
  * Credits & Thanks:
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Copyright 2011-2024 Unlok
2
+ * Copyright 2011-2025 Unlok
3
3
  * https://www.unlok.ca
4
4
  *
5
5
  * Credits & Thanks:
@@ -42,80 +42,82 @@ export declare enum MultiplayerSyncCheck {
42
42
  Action = 2,
43
43
  ActionAttack = 3,
44
44
  ActionMove = 4,
45
- Alignment = 5,
46
- BaseEntityManager = 6,
47
- CanASeeB = 7,
48
- Container = 8,
49
- Creature = 9,
50
- CreatureAi = 10,
51
- CreatureAiAdd = 11,
52
- CreatureAiEmit = 12,
53
- CreatureAiMaskAdd = 13,
54
- CreatureAiMaskRemove = 14,
55
- CreatureAiRemove = 15,
56
- CreatureAiSet = 16,
57
- CreatureCheckMove = 17,
58
- CreatureMovement = 18,
59
- CreatureNearestPlayer = 19,
60
- CreatureOffer = 20,
61
- CreatureStatChange = 21,
62
- Damage = 22,
63
- DiscoverRecipe = 23,
64
- Dismantle = 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
45
+ AddItemDiscovered = 5,
46
+ Alignment = 6,
47
+ BaseEntityManager = 7,
48
+ CanASeeB = 8,
49
+ Container = 9,
50
+ Creature = 10,
51
+ CreatureAi = 11,
52
+ CreatureAiAdd = 12,
53
+ CreatureAiEmit = 13,
54
+ CreatureAiMaskAdd = 14,
55
+ CreatureAiMaskRemove = 15,
56
+ CreatureAiRemove = 16,
57
+ CreatureAiSet = 17,
58
+ CreatureCheckMove = 18,
59
+ CreatureMovement = 19,
60
+ CreatureNearestPlayer = 20,
61
+ CreatureOffer = 21,
62
+ CreatureStatChange = 22,
63
+ Damage = 23,
64
+ DiscoverRecipe = 24,
65
+ Dismantle = 25,
66
+ Doodad = 26,
67
+ DoodadManager = 27,
68
+ EncumberedStatus = 28,
69
+ Entity = 29,
70
+ EntityPosition = 30,
71
+ ExhaustedPreMove = 31,
72
+ FlowFieldHashCode = 32,
73
+ FlowFieldPenalty = 33,
74
+ FlowFieldUpdate = 34,
75
+ FlowFieldUpdateTile = 35,
76
+ FlowFieldValue = 36,
77
+ HandToUse = 37,
78
+ HealthChange = 38,
79
+ History = 39,
80
+ InventoryCount = 40,
81
+ Island = 41,
82
+ IslandCivilizationScore = 42,
83
+ Islands = 43,
84
+ IsTileEmpty = 44,
85
+ Item = 45,
86
+ ItemCraft = 46,
87
+ ItemDamage = 47,
88
+ ItemOrder = 48,
89
+ LastCreationIds = 49,
90
+ Merchant = 50,
91
+ MilestoneSeed = 51,
92
+ Modifier = 52,
93
+ MoveToTile = 53,
94
+ NPC = 54,
95
+ Option = 55,
96
+ PenaltyFieldHashCode = 56,
97
+ PlaceOnTile = 57,
98
+ PlayerManager = 58,
99
+ Players = 59,
100
+ PlayerSetup = 60,
101
+ Random = 61,
102
+ ResetItemDiscovered = 62,
103
+ Seed = 63,
104
+ SeededGenerator = 64,
105
+ SetPosition = 65,
106
+ SetZ = 66,
107
+ SkillGain = 67,
108
+ StaminaChanges = 68,
109
+ StatChange = 69,
110
+ Stats = 70,
111
+ Status = 71,
112
+ StatusChange = 72,
113
+ TemperatureManager = 73,
114
+ Temporary = 74,
115
+ Tick = 75,
116
+ TileEvent = 76,
117
+ Time = 77,
118
+ UpdateDirection = 78,
119
+ Weight = 79,
120
+ WorldUpdateTile = 80
119
121
  }
120
122
  export declare const maxPlayers = 32;
121
123
  export declare const packetTickRate = 16.6666;
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.5-beta.dev.20250609.1",
4
+ "version": "2.14.5-beta.dev.20250614.1",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",