@wayward/types 2.11.4-beta.dev.20220128.1 → 2.11.4-beta.dev.20220129.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 +2 -1
- package/definitions/game/game/entity/IHuman.d.ts +11 -0
- package/definitions/game/game/entity/action/Actions.d.ts +3 -3
- package/definitions/game/game/entity/action/actions/Butcher.d.ts +1 -1
- package/definitions/game/game/entity/action/actions/Equip.d.ts +1 -1
- package/definitions/game/game/entity/action/actions/Idle.d.ts +1 -1
- package/definitions/game/game/entity/player/IPlayer.d.ts +0 -10
- package/definitions/game/game/entity/player/Player.d.ts +1 -2
- package/definitions/game/game/reference/ReferenceManager.d.ts +1 -1
- package/package.json +1 -1
|
@@ -17,7 +17,7 @@ import type { ICheckUnderOptions, ICrafted, ICustomizations, IHumanEvents, IRest
|
|
|
17
17
|
import { EquipType, SkillType } from "game/entity/IHuman";
|
|
18
18
|
import { Stat } from "game/entity/IStats";
|
|
19
19
|
import type { IAttackHand, IMobCheck } from "game/entity/player/IPlayer";
|
|
20
|
-
import { PlayerState } from "game/entity/player/IPlayer";
|
|
20
|
+
import { WeightStatus, PlayerState } from "game/entity/player/IPlayer";
|
|
21
21
|
import PlayerDefense from "game/entity/player/PlayerDefense";
|
|
22
22
|
import SkillManager from "game/entity/skill/SkillManager";
|
|
23
23
|
import { StatChangeCurrentTimerStrategy } from "game/entity/StatFactory";
|
|
@@ -89,6 +89,7 @@ export default abstract class Human extends Entity implements IHasInsulation {
|
|
|
89
89
|
updateReputation(reputation: number): void;
|
|
90
90
|
capReputation(): void;
|
|
91
91
|
setPaddling(item: Item | undefined, extinguishTorches?: boolean): void;
|
|
92
|
+
getWeightStatus(): WeightStatus;
|
|
92
93
|
/**
|
|
93
94
|
* Extinguishes all torches the player is holding.
|
|
94
95
|
*/
|
|
@@ -14,6 +14,7 @@ import type { ActionType } from "game/entity/action/IAction";
|
|
|
14
14
|
import type Entity from "game/entity/Entity";
|
|
15
15
|
import type Human from "game/entity/Human";
|
|
16
16
|
import type { AttackType } from "game/entity/IEntity";
|
|
17
|
+
import type { WeightStatus } from "game/entity/player/IPlayer";
|
|
17
18
|
import type { ISkillEvents } from "game/entity/skill/SkillManager";
|
|
18
19
|
import type { IHasImagePath, Quality } from "game/IObject";
|
|
19
20
|
import type { ItemType } from "game/item/IItem";
|
|
@@ -55,6 +56,11 @@ export interface IHumanEvents extends Events<Entity>, ISkillEvents {
|
|
|
55
56
|
*/
|
|
56
57
|
canAttack(weapon: Item | undefined, attackType: AttackType): boolean | undefined;
|
|
57
58
|
calculateEquipmentStats(): any;
|
|
59
|
+
/**
|
|
60
|
+
* Called when getting the players weight status
|
|
61
|
+
* @returns The weight status of the player or undefined to use the default logic
|
|
62
|
+
*/
|
|
63
|
+
getWeightStatus(): WeightStatus | undefined;
|
|
58
64
|
/**
|
|
59
65
|
* Called when checking if a human is swimming
|
|
60
66
|
* @param isSwimming True if the human is swimming
|
|
@@ -229,3 +235,8 @@ export interface IHumanOld extends Partial<Human> {
|
|
|
229
235
|
core: number;
|
|
230
236
|
}>;
|
|
231
237
|
}
|
|
238
|
+
/**
|
|
239
|
+
* At this weight or more, you are encumbered.
|
|
240
|
+
* Defaults to 90% (0.9)
|
|
241
|
+
*/
|
|
242
|
+
export declare const WEIGHT_ENCUMBERED = 0.9;
|
|
@@ -16,7 +16,7 @@ declare const actionDescriptions: {
|
|
|
16
16
|
78: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.ItemNearby], import("../player/Player").default | import("../npc/NPC").default, void, [import("../../item/Item").default]>;
|
|
17
17
|
3: import("./Action").Action<[[import("game/entity/action/IAction").ActionArgument.ItemInventory, import("game/entity/action/IAction").ActionArgument.Undefined], [import("game/entity/action/IAction").ActionArgument.AttackType, import("game/entity/action/IAction").ActionArgument.Undefined]], import("../player/Player").default | import("../npc/NPC").default, void, [(import("../../item/Item").default | undefined)?, (import("../IEntity").AttackType | undefined)?]>;
|
|
18
18
|
27: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.ItemNearby], import("../player/Player").default | import("../npc/NPC").default, void, [import("../../item/Item").default]>;
|
|
19
|
-
5: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.ItemInventory], import("../player/Player").default, void, [import("../../item/Item").default]>;
|
|
19
|
+
5: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.ItemInventory], import("../player/Player").default | import("../npc/NPC").default, void, [import("../../item/Item").default]>;
|
|
20
20
|
15: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.ItemInventory], import("../player/Player").default | import("../npc/NPC").default, void, [import("../../item/Item").default]>;
|
|
21
21
|
99: import("./Action").Action<[[import("game/entity/action/IAction").ActionArgument.ItemInventory, import("game/entity/action/IAction").ActionArgument.Undefined], [import("game/entity/action/IAction").ActionArgument.Boolean, import("game/entity/action/IAction").ActionArgument.Undefined]], import("../player/Player").default | import("../npc/NPC").default, void, [(import("../../item/Item").default | undefined)?, (boolean | undefined)?]>;
|
|
22
22
|
71: import("./Action").Action<[[import("game/entity/action/IAction").ActionArgument.Container, import("game/entity/action/IAction").ActionArgument.Undefined], [import("game/entity/action/IAction").ActionArgument.Boolean, import("game/entity/action/IAction").ActionArgument.Undefined]], import("../player/Player").default | import("../npc/NPC").default, void, [(import("../../item/IItem").IContainer | undefined)?, (boolean | undefined)?]>;
|
|
@@ -35,7 +35,7 @@ declare const actionDescriptions: {
|
|
|
35
35
|
7: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.ItemNearby], import("../player/Player").default | import("../npc/NPC").default, void, [import("../../item/Item").default]>;
|
|
36
36
|
83: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.ItemNearby, [import("game/entity/action/IAction").ActionArgument.ItemNearby, import("game/entity/action/IAction").ActionArgument.Undefined]], import("../player/Player").default | import("../npc/NPC").default, void, [import("../../item/Item").default, (import("../../item/Item").default | undefined)?]>;
|
|
37
37
|
93: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.ItemInventory, [import("game/entity/action/IAction").ActionArgument.ItemInventory, import("game/entity/action/IAction").ActionArgument.Undefined]], import("../player/Player").default | import("../npc/NPC").default, void, [import("../../item/Item").default, (import("../../item/Item").default | undefined)?]>;
|
|
38
|
-
63: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.ItemNearby, import("game/entity/action/IAction").ActionArgument.EquipType, [import("game/entity/action/IAction").ActionArgument.Boolean, import("game/entity/action/IAction").ActionArgument.Undefined], [import("game/entity/action/IAction").ActionArgument.Boolean, import("game/entity/action/IAction").ActionArgument.Undefined]], import("../player/Player").default, void, [import("../../item/Item").default, import("../IHuman").EquipType, (boolean | undefined)?, (boolean | undefined)?]>;
|
|
38
|
+
63: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.ItemNearby, import("game/entity/action/IAction").ActionArgument.EquipType, [import("game/entity/action/IAction").ActionArgument.Boolean, import("game/entity/action/IAction").ActionArgument.Undefined], [import("game/entity/action/IAction").ActionArgument.Boolean, import("game/entity/action/IAction").ActionArgument.Undefined]], import("../player/Player").default | import("../npc/NPC").default, void, [import("../../item/Item").default, import("../IHuman").EquipType, (boolean | undefined)?, (boolean | undefined)?]>;
|
|
39
39
|
37: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.ItemInventory], import("../player/Player").default | import("../npc/NPC").default, void, [import("../../item/Item").default]>;
|
|
40
40
|
35: import("./Action").Action<[[import("game/entity/action/IAction").ActionArgument.ItemInventory, import("game/entity/action/IAction").ActionArgument.Undefined], [import("game/entity/action/IAction").ActionArgument.AttackType, import("game/entity/action/IAction").ActionArgument.Undefined]], import("../player/Player").default | import("../npc/NPC").default, void, [(import("../../item/Item").default | undefined)?, (import("../IEntity").AttackType | undefined)?]>;
|
|
41
41
|
21: import("./Action").Action<[[import("game/entity/action/IAction").ActionArgument.ItemInventory, import("game/entity/action/IAction").ActionArgument.Undefined], [import("game/entity/action/IAction").ActionArgument.Boolean, import("game/entity/action/IAction").ActionArgument.Undefined]], import("../player/Player").default | import("../npc/NPC").default, void, [(import("../../item/Item").default | undefined)?, (boolean | undefined)?]>;
|
|
@@ -46,7 +46,7 @@ declare const actionDescriptions: {
|
|
|
46
46
|
11: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.ItemNearby], import("../player/Player").default | import("../npc/NPC").default, void, [import("../../item/Item").default]>;
|
|
47
47
|
45: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.ItemInventory], import("../player/Player").default | import("../npc/NPC").default, void, [import("../../item/Item").default]>;
|
|
48
48
|
76: import("./Action").Action<[], import("../player/Player").default | import("../npc/NPC").default, void, []>;
|
|
49
|
-
60: import("./Action").Action<[], import("../player/Player").default, void, []>;
|
|
49
|
+
60: import("./Action").Action<[], import("../player/Player").default | import("../npc/NPC").default, void, []>;
|
|
50
50
|
26: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.ItemInventory], import("../player/Player").default | import("../npc/NPC").default, void, [import("../../item/Item").default]>;
|
|
51
51
|
91: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.Integer32, [import("game/entity/action/IAction").ActionArgument.Boolean, import("game/entity/action/IAction").ActionArgument.Integer32], [import("game/entity/action/IAction").ActionArgument.Object, import("game/entity/action/IAction").ActionArgument.Undefined]], import("../player/Player").default, void, [number, number | boolean, any?]>;
|
|
52
52
|
56: import("./Action").Action<[], import("../player/Player").default | import("../npc/NPC").default, void, []>;
|
|
@@ -10,5 +10,5 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import { Action } from "game/entity/action/Action";
|
|
12
12
|
import { ActionArgument } from "game/entity/action/IAction";
|
|
13
|
-
declare const _default: Action<[ActionArgument.ItemInventory], import("../../player/Player").default, void, [import("../../../item/Item").default]>;
|
|
13
|
+
declare const _default: Action<[ActionArgument.ItemInventory], import("../../player/Player").default | import("../../npc/NPC").default, void, [import("../../../item/Item").default]>;
|
|
14
14
|
export default _default;
|
|
@@ -10,5 +10,5 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import { Action } from "game/entity/action/Action";
|
|
12
12
|
import { ActionArgument } from "game/entity/action/IAction";
|
|
13
|
-
declare const _default: Action<[ActionArgument.ItemNearby, ActionArgument.EquipType, [ActionArgument.Boolean, ActionArgument.Undefined], [ActionArgument.Boolean, ActionArgument.Undefined]], import("../../player/Player").default, void, [import("../../../item/Item").default, import("game/entity/IHuman").EquipType, (boolean | undefined)?, (boolean | undefined)?]>;
|
|
13
|
+
declare const _default: Action<[ActionArgument.ItemNearby, ActionArgument.EquipType, [ActionArgument.Boolean, ActionArgument.Undefined], [ActionArgument.Boolean, ActionArgument.Undefined]], import("../../player/Player").default | import("../../npc/NPC").default, void, [import("../../../item/Item").default, import("game/entity/IHuman").EquipType, (boolean | undefined)?, (boolean | undefined)?]>;
|
|
14
14
|
export default _default;
|
|
@@ -9,5 +9,5 @@
|
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
|
10
10
|
*/
|
|
11
11
|
import { Action } from "game/entity/action/Action";
|
|
12
|
-
declare const _default: Action<[], import("../../player/Player").default, void, []>;
|
|
12
|
+
declare const _default: Action<[], import("../../player/Player").default | import("../../npc/NPC").default, void, []>;
|
|
13
13
|
export default _default;
|
|
@@ -183,11 +183,6 @@ export interface IPlayerEvents extends Events<Human> {
|
|
|
183
183
|
* @returns A number to set the player weight to or undefined to use the default logic
|
|
184
184
|
*/
|
|
185
185
|
updateWeight(newWeight: number): number | undefined;
|
|
186
|
-
/**
|
|
187
|
-
* Called when getting the players weight status
|
|
188
|
-
* @returns The weight status of the player or undefined to use the default logic
|
|
189
|
-
*/
|
|
190
|
-
getWeightStatus(): WeightStatus | undefined;
|
|
191
186
|
/**
|
|
192
187
|
* Called when getting the players weight or stamina movement penalty
|
|
193
188
|
* @returns The weight/stamina movement penalty for the player or undefined to use the default logic
|
|
@@ -376,11 +371,6 @@ export declare enum WeightStatus {
|
|
|
376
371
|
* The amount of extra weight the player can hold (added to max health)
|
|
377
372
|
*/
|
|
378
373
|
export declare const STRENGTH_BONUS = 25;
|
|
379
|
-
/**
|
|
380
|
-
* At this weight or more, you are encumbered.
|
|
381
|
-
* Defaults to 90% (0.9)
|
|
382
|
-
*/
|
|
383
|
-
export declare const WEIGHT_ENCUMBERED = 0.9;
|
|
384
374
|
export interface IWalkPath {
|
|
385
375
|
path: IVector2[];
|
|
386
376
|
force?: boolean;
|
|
@@ -20,7 +20,7 @@ import { EquipType, RestCancelReason, SkillType } from "game/entity/IHuman";
|
|
|
20
20
|
import type { IStat } from "game/entity/IStats";
|
|
21
21
|
import { Stat } from "game/entity/IStats";
|
|
22
22
|
import type { ILoadOnIslandOptions, IMovementIntent, IPlayerEvents, IWalkPath } from "game/entity/player/IPlayer";
|
|
23
|
-
import { TurnType
|
|
23
|
+
import { TurnType } from "game/entity/player/IPlayer";
|
|
24
24
|
import MessageManager from "game/entity/player/MessageManager";
|
|
25
25
|
import NoteManager from "game/entity/player/note/NoteManager";
|
|
26
26
|
import QuestManager from "game/entity/player/quest/QuestManager";
|
|
@@ -144,7 +144,6 @@ export default class Player extends Human implements IUnserializedCallback {
|
|
|
144
144
|
load(): void;
|
|
145
145
|
setup(spawnPoint: IVector3): void;
|
|
146
146
|
updateReputation(reputation: number): void;
|
|
147
|
-
getWeightStatus(): WeightStatus;
|
|
148
147
|
getWeightOrStaminaMovementPenalty(): number;
|
|
149
148
|
/**
|
|
150
149
|
* Check if there is a still in front of the player.
|
|
@@ -44,7 +44,7 @@ interface IReferenceTypeMap {
|
|
|
44
44
|
export declare type Referenceable = IReferenceTypeMap[ReferenceableReferenceTypes];
|
|
45
45
|
export default class ReferenceManager {
|
|
46
46
|
static isEnumReference(type: ReferenceType): type is EnumReferenceTypes;
|
|
47
|
-
static getList(type: ReferenceType, gameIsland?: Island): import("../entity/creature/corpse/CorpseManager").default | import("../entity/creature/CreatureManager").default | import("../doodad/DoodadManager").default | import("../item/ItemManager").default | import("../entity/npc/NPCManager").default | import("../tile/TileEventManager").default | Player[] | readonly Milestone[] | readonly
|
|
47
|
+
static getList(type: ReferenceType, gameIsland?: Island): import("../entity/creature/corpse/CorpseManager").default | import("../entity/creature/CreatureManager").default | import("../doodad/DoodadManager").default | import("../item/ItemManager").default | import("../entity/npc/NPCManager").default | import("../tile/TileEventManager").default | Player[] | readonly Milestone[] | readonly ItemType[] | readonly SkillType[] | IterableIterator<Island> | readonly Stat[];
|
|
48
48
|
private referenceCursor;
|
|
49
49
|
create(): number;
|
|
50
50
|
get(thing: Referenceable): Reference | undefined;
|
package/package.json
CHANGED