@wayward/types 2.12.0-beta.dev.20220904.1 → 2.12.0-beta.dev.20220905.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/Entity.d.ts +20 -6
- package/definitions/game/game/entity/Human.d.ts +1 -3
- package/definitions/game/game/entity/IHuman.d.ts +6 -0
- package/definitions/game/game/entity/action/usable/UsableAction.d.ts +5 -3
- package/definitions/game/language/dictionary/UiTranslation.d.ts +553 -551
- package/definitions/game/multiplayer/packets/client/EmitPlayerEventPacket.d.ts +2 -2
- package/definitions/game/renderer/context/RendererOrigin.d.ts +3 -2
- package/definitions/game/renderer/tile/TileLayer.d.ts +1 -1
- package/definitions/game/steamworks/ISteamworks.d.ts +5 -0
- package/definitions/game/steamworks/Steamworks.d.ts +4 -2
- package/definitions/game/ui/component/Button.d.ts +1 -1
- package/definitions/game/ui/input/IInput.d.ts +7 -0
- package/definitions/game/ui/input/InputManager.d.ts +0 -6
- package/definitions/game/ui/input/Macros.d.ts +2 -0
- package/definitions/game/ui/screen/screens/game/static/ActionBar.d.ts +3 -0
- package/definitions/game/ui/screen/screens/game/static/actions/ActionBarBindableManager.d.ts +2 -0
- package/definitions/game/ui/screen/screens/game/static/actions/IActionBar.d.ts +2 -0
- package/definitions/game/ui/screen/screens/game/util/movement/MovementHandler.d.ts +1 -1
- package/definitions/game/ui/screen/screens/game/util/movement/WalkToTileHandler.d.ts +1 -1
- package/definitions/game/ui/screen/screens/menu/menus/PauseMenu.d.ts +1 -0
- package/definitions/hosts/shared/globalTypes.d.ts +8 -6
- package/definitions/hosts/shared/globals.d.ts +1 -1
- package/package.json +1 -1
|
@@ -15,7 +15,7 @@ import type { IDamageInfo } from "game/entity/creature/ICreature";
|
|
|
15
15
|
import type Human from "game/entity/Human";
|
|
16
16
|
import type { IEntityEvents, IProperties, IStatus, Property, StatusEffectChangeReason } from "game/entity/IEntity";
|
|
17
17
|
import { DamageType, EntityType, MoveType, StatusType } from "game/entity/IEntity";
|
|
18
|
-
import { Delay } from "game/entity/IHuman";
|
|
18
|
+
import { Delay, MovingClientSide } from "game/entity/IHuman";
|
|
19
19
|
import type { IStats } from "game/entity/IStats";
|
|
20
20
|
import type NPC from "game/entity/npc/NPC";
|
|
21
21
|
import type Player from "game/entity/player/Player";
|
|
@@ -30,14 +30,15 @@ import type { ITemperatureSource } from "game/temperature/ITemperature";
|
|
|
30
30
|
import type { ITile } from "game/tile/ITerrain";
|
|
31
31
|
import type { ISerializedTranslation } from "language/ITranslation";
|
|
32
32
|
import type Translation from "language/Translation";
|
|
33
|
+
import type { IRendererOrigin } from "renderer/context/RendererOrigin";
|
|
33
34
|
import FieldOfView from "renderer/fieldOfView/FieldOfView";
|
|
34
35
|
import type { CanASeeBType } from "renderer/fieldOfView/IFieldOfView";
|
|
35
|
-
import type { ItemNotifierType, StatNotificationType } from "renderer/notifier/INotifier";
|
|
36
|
+
import type { INotificationLocation, ItemNotifierType, StatNotificationType } from "renderer/notifier/INotifier";
|
|
36
37
|
import { Direction } from "utilities/math/Direction";
|
|
37
38
|
import type { IVector2, IVector3 } from "utilities/math/IVector";
|
|
38
39
|
import Vector2 from "utilities/math/Vector2";
|
|
39
40
|
import type { IVector4 } from "utilities/math/Vector4";
|
|
40
|
-
export default abstract class Entity extends EventEmitter.Host<IEntityEvents> implements IReferenceable, IInspector, ITemperatureSource, IVector3 {
|
|
41
|
+
export default abstract class Entity extends EventEmitter.Host<IEntityEvents> implements IReferenceable, IInspector, ITemperatureSource, INotificationLocation, IRendererOrigin, IVector3 {
|
|
41
42
|
readonly stat: Stats<this>;
|
|
42
43
|
entityType: EntityType;
|
|
43
44
|
id: number;
|
|
@@ -47,13 +48,21 @@ export default abstract class Entity extends EventEmitter.Host<IEntityEvents> im
|
|
|
47
48
|
x: number;
|
|
48
49
|
y: number;
|
|
49
50
|
/**
|
|
50
|
-
* Not guaranteed to be synced between the server and client for
|
|
51
|
+
* Not guaranteed to be synced between the server and client for Human entities
|
|
51
52
|
*/
|
|
52
53
|
fromX: number;
|
|
53
54
|
/**
|
|
54
|
-
* Not guaranteed to be synced between the server and client for
|
|
55
|
+
* Not guaranteed to be synced between the server and client for Human entities
|
|
55
56
|
*/
|
|
56
57
|
fromY: number;
|
|
58
|
+
/**
|
|
59
|
+
* Not guaranteed to be synced between the server and client for Human entities
|
|
60
|
+
*/
|
|
61
|
+
isMoving: boolean;
|
|
62
|
+
/**
|
|
63
|
+
* Only used for Human entities
|
|
64
|
+
*/
|
|
65
|
+
movementCompleteZ: number | undefined;
|
|
57
66
|
moveType: MoveType | undefined;
|
|
58
67
|
anim: number;
|
|
59
68
|
stopNextMovement: boolean;
|
|
@@ -65,7 +74,10 @@ export default abstract class Entity extends EventEmitter.Host<IEntityEvents> im
|
|
|
65
74
|
islandId: IslandId;
|
|
66
75
|
attackAnimationType: DamageType | undefined;
|
|
67
76
|
attackAnimationTime: IMovementTime | undefined;
|
|
68
|
-
|
|
77
|
+
/**
|
|
78
|
+
* The state of what the client thinks is happening to this entity (regarding movement)
|
|
79
|
+
*/
|
|
80
|
+
movingClientside: MovingClientSide;
|
|
69
81
|
allowSmartMovementClientside: boolean;
|
|
70
82
|
protected _movementTime: {
|
|
71
83
|
start: number;
|
|
@@ -118,9 +130,11 @@ export default abstract class Entity extends EventEmitter.Host<IEntityEvents> im
|
|
|
118
130
|
* Faces the target and animates a bump into effect
|
|
119
131
|
*/
|
|
120
132
|
animateBumpTowards(x: number, y: number): void;
|
|
133
|
+
protected setMoving(delay: Delay, fromX: number, fromY: number, toZ?: number): void;
|
|
121
134
|
animateAttack(damageType: DamageType[] | undefined): void;
|
|
122
135
|
getMovementPoint(timeStamp: number): IVector2;
|
|
123
136
|
getMovementProgress(timeStamp: number): number;
|
|
137
|
+
protected onMovementCompleted(): void;
|
|
124
138
|
getMoveType(): MoveType;
|
|
125
139
|
setMoveType(moveType: MoveType): void;
|
|
126
140
|
isInFov(): boolean;
|
|
@@ -65,7 +65,6 @@ export default abstract class Human extends Entity implements IHasInsulation {
|
|
|
65
65
|
handEquippedToLast: EquipType.OffHand | EquipType.MainHand;
|
|
66
66
|
inventory: IContainer;
|
|
67
67
|
isConnecting: boolean;
|
|
68
|
-
movementCompleteZ: number | undefined;
|
|
69
68
|
options: Readonly<IOptions>;
|
|
70
69
|
islandId: IslandId;
|
|
71
70
|
readonly equipEffects: Map<EquipEffect, EquipEffects>;
|
|
@@ -82,7 +81,6 @@ export default abstract class Human extends Entity implements IHasInsulation {
|
|
|
82
81
|
walkSoundCounter: number;
|
|
83
82
|
containerSortInfo: Record<string, IContainerSortInfo>;
|
|
84
83
|
dialogContainerInfo: Record<number, IDialogInfo>;
|
|
85
|
-
isMoving: boolean;
|
|
86
84
|
readonly movementIntent: IMovementIntent;
|
|
87
85
|
walkPath: IWalkPath | undefined;
|
|
88
86
|
identifier: string;
|
|
@@ -91,7 +89,6 @@ export default abstract class Human extends Entity implements IHasInsulation {
|
|
|
91
89
|
messages: IMessageManager;
|
|
92
90
|
notes: INoteManager;
|
|
93
91
|
private readonly privateStore;
|
|
94
|
-
finishedMovingClientside: boolean;
|
|
95
92
|
nextMoveTime: number;
|
|
96
93
|
nextMoveDirection: Direction.Cardinal | Direction.None | undefined;
|
|
97
94
|
private lastVehicleMoveDirection;
|
|
@@ -129,6 +126,7 @@ export default abstract class Human extends Entity implements IHasInsulation {
|
|
|
129
126
|
*/
|
|
130
127
|
isServer(): boolean;
|
|
131
128
|
isMultiplayerHost(): boolean;
|
|
129
|
+
protected onMovementCompleted(): void;
|
|
132
130
|
moveTowardsIsland(direction: Direction.Cardinal | Direction.None, options?: Partial<IMoveToIslandOptions>): Promise<void>;
|
|
133
131
|
moveToIslandPosition(position: IVector2, options?: Partial<IMoveToIslandOptions>): Promise<void>;
|
|
134
132
|
/**
|
|
@@ -419,6 +419,12 @@ export interface IVoyageInfo {
|
|
|
419
419
|
usedItems?: Item[];
|
|
420
420
|
wantedItems?: ItemType[];
|
|
421
421
|
}
|
|
422
|
+
export declare enum MovingClientSide {
|
|
423
|
+
NoInput = 0,
|
|
424
|
+
Moving = 1,
|
|
425
|
+
Moved = 2,
|
|
426
|
+
PreNoInput = 3
|
|
427
|
+
}
|
|
422
428
|
/**
|
|
423
429
|
* The swimming skill required to travel to another island
|
|
424
430
|
*
|
|
@@ -64,15 +64,17 @@ export interface IUsableActionUsing<REQUIREMENTS extends IUsableActionRequiremen
|
|
|
64
64
|
validate(player: Player, value: Item): boolean;
|
|
65
65
|
} ? Item : never) | (REQUIREMENTS["item"] extends {
|
|
66
66
|
find(player: Player): Item;
|
|
67
|
-
} ? Item : never)
|
|
67
|
+
} ? Item : never) | (REQUIREMENTS["item"] extends {
|
|
68
|
+
allowOnlyItemType(player: Player, type: ItemType): boolean;
|
|
69
|
+
} ? undefined : never));
|
|
68
70
|
itemType: ((REQUIREMENTS["item"] extends true ? ItemType : never) | (undefined extends REQUIREMENTS["item"] ? undefined : never) | (REQUIREMENTS["item"] extends {
|
|
69
71
|
allowNone: true;
|
|
70
72
|
} ? undefined : never) | (REQUIREMENTS["item"] extends {
|
|
71
73
|
validate(player: Player, value: Item): boolean;
|
|
72
|
-
} ? ItemType : never) | (REQUIREMENTS["item"] extends {
|
|
74
|
+
} ? ItemType | undefined : never) | (REQUIREMENTS["item"] extends {
|
|
73
75
|
find(player: Player): Item;
|
|
74
76
|
} ? ItemType : never) | (REQUIREMENTS["item"] extends {
|
|
75
|
-
allowOnlyItemType(player: Player): boolean;
|
|
77
|
+
allowOnlyItemType(player: Player, type: ItemType): boolean;
|
|
76
78
|
} ? ItemType : never));
|
|
77
79
|
doodad: ((REQUIREMENTS["doodad"] extends true ? Doodad : never) | (undefined extends REQUIREMENTS["doodad"] ? undefined : never) | (REQUIREMENTS["doodad"] extends {
|
|
78
80
|
allowNone: true;
|