@wayward/types 2.15.3-beta.dev.20260317.1 → 2.15.3-beta.dev.20260318.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/event/EventBuses.d.ts +10 -6
- package/definitions/game/event/EventManager.d.ts +4 -3
- package/definitions/game/game/curse/ICurse.d.ts +2 -1
- package/definitions/game/game/entity/Human.d.ts +1 -0
- package/definitions/game/game/magic/MagicalPropertyManager.d.ts +1 -0
- package/definitions/game/game/magic/MagicalPropertyType.d.ts +5 -1
- package/definitions/game/game/options/modifiers/custom/CustomModifierDefinitions.d.ts +43 -41
- package/definitions/game/game/options/modifiers/custom/ICustomModifier.d.ts +43 -42
- package/definitions/game/game/options/modifiers/custom/modifiers/CustomModifierStatCurse.d.ts +13 -0
- package/definitions/game/ui/screen/screens/game/util/movement/ActionMenuHandler.d.ts +0 -2
- package/definitions/game/ui/screen/screens/game/util/movement/InteractionHandler.d.ts +3 -0
- package/definitions/game/ui/screen/screens/game/util/movement/InteractionManager.d.ts +2 -0
- package/definitions/game/ui/screen/screens/game/util/movement/PathQueryCache.d.ts +25 -0
- package/package.json +1 -1
|
@@ -52,6 +52,7 @@ import type HoveredTileTracker from "@wayward/game/ui/screen/screens/game/util/H
|
|
|
52
52
|
import type ActionMenuHandler from "@wayward/game/ui/screen/screens/game/util/movement/ActionMenuHandler";
|
|
53
53
|
import type InteractionManager from "@wayward/game/ui/screen/screens/game/util/movement/InteractionManager";
|
|
54
54
|
import type MovementHandler from "@wayward/game/ui/screen/screens/game/util/movement/MovementHandler";
|
|
55
|
+
import type PathQueryCache from "@wayward/game/ui/screen/screens/game/util/movement/PathQueryCache";
|
|
55
56
|
import type PathingHandler from "@wayward/game/ui/screen/screens/game/util/movement/PathingHandler";
|
|
56
57
|
import { EventBusManager } from "@wayward/utilities/event/EventBusManager";
|
|
57
58
|
export declare enum EventBus {
|
|
@@ -100,9 +101,10 @@ export declare enum EventBus {
|
|
|
100
101
|
UiInteractionManager = 42,
|
|
101
102
|
UiItemComponentStatic = 43,
|
|
102
103
|
UiMovementHandler = 44,
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
104
|
+
UiPathQueryCache = 45,
|
|
105
|
+
UiPathingHandler = 46,
|
|
106
|
+
UsableActions = 47,
|
|
107
|
+
WorldRenderer = 48
|
|
106
108
|
}
|
|
107
109
|
declare const eventBuses: {
|
|
108
110
|
[EventBus.Actions](): ActionExecutor<any, any, any, any, any>;
|
|
@@ -150,6 +152,7 @@ declare const eventBuses: {
|
|
|
150
152
|
[EventBus.UiInteractionManager](): InteractionManager;
|
|
151
153
|
[EventBus.UiItemComponentStatic](): ItemComponentEventBus;
|
|
152
154
|
[EventBus.UiMovementHandler](): MovementHandler;
|
|
155
|
+
[EventBus.UiPathQueryCache](): PathQueryCache;
|
|
153
156
|
[EventBus.UiPathingHandler](): PathingHandler;
|
|
154
157
|
[EventBus.UsableActions](): UsableAction;
|
|
155
158
|
[EventBus.WorldRenderer](): WorldRenderer;
|
|
@@ -201,9 +204,10 @@ export declare const eventBusManager: EventBusManager<EventBus, {
|
|
|
201
204
|
42(): InteractionManager;
|
|
202
205
|
43(): ItemComponentEventBus;
|
|
203
206
|
44(): MovementHandler;
|
|
204
|
-
45():
|
|
205
|
-
46():
|
|
206
|
-
47():
|
|
207
|
+
45(): PathQueryCache;
|
|
208
|
+
46(): PathingHandler;
|
|
209
|
+
47(): UsableAction;
|
|
210
|
+
48(): WorldRenderer;
|
|
207
211
|
}>;
|
|
208
212
|
/**
|
|
209
213
|
* For backwards compat / ease of use
|
|
@@ -61,9 +61,10 @@ export declare const eventManager: EventManager<EventBus, {
|
|
|
61
61
|
42(): import("../ui/screen/screens/game/util/movement/InteractionManager").default;
|
|
62
62
|
43(): import("../ui/screen/screens/game/component/item/ItemComponentEventBus").default;
|
|
63
63
|
44(): import("../ui/screen/screens/game/util/movement/MovementHandler").default;
|
|
64
|
-
45(): import("../ui/screen/screens/game/util/movement/
|
|
65
|
-
46(): import("../game/
|
|
66
|
-
47(): import("../
|
|
64
|
+
45(): import("../ui/screen/screens/game/util/movement/PathQueryCache").default;
|
|
65
|
+
46(): import("../ui/screen/screens/game/util/movement/PathingHandler").default;
|
|
66
|
+
47(): import("../game/entity/action/usable/UsableAction").default;
|
|
67
|
+
48(): import("../renderer/world/WorldRenderer").WorldRenderer;
|
|
67
68
|
}>;
|
|
68
69
|
/**
|
|
69
70
|
* EventHandler that is typed with the games event buses
|
|
@@ -195,6 +195,7 @@ export default abstract class Human<DescriptionType = unknown, TypeType extends
|
|
|
195
195
|
* Luck is a multiplier applied to some random chance calculations.
|
|
196
196
|
*/
|
|
197
197
|
get luck(): number;
|
|
198
|
+
private getEquipmentLuckModifier;
|
|
198
199
|
get debug(): Debug.JIT<[]>;
|
|
199
200
|
updateDirection(tile: Tile | Direction.Cardinal, updateVehicleDirection?: boolean): Direction.Cardinal;
|
|
200
201
|
/**
|
|
@@ -89,6 +89,7 @@ export default class MagicalPropertyManager extends EventEmitter.Host<IMagicalPr
|
|
|
89
89
|
* @returns if this object has any of the given cursed magical property types
|
|
90
90
|
*/
|
|
91
91
|
hasCursed(...types: MagicalPropertyIdentityFlat[]): boolean;
|
|
92
|
+
private checkSupertypeCurseState;
|
|
92
93
|
/**
|
|
93
94
|
* @returns whether the given type of magical property is present on this object
|
|
94
95
|
*/
|
|
@@ -83,7 +83,11 @@ declare enum MagicalPropertyType {
|
|
|
83
83
|
/** Adds bonus durability to an item */
|
|
84
84
|
Persistence_MaxDurability = 30,
|
|
85
85
|
/** Adds a chance in which an item does reduce in decay when passing a turn */
|
|
86
|
-
Perpetuity_DecayLossChance = 31
|
|
86
|
+
Perpetuity_DecayLossChance = 31,
|
|
87
|
+
/** Increases the human luck multiplier while equipped */
|
|
88
|
+
Fortune_Luck = 32,
|
|
89
|
+
/** Reduces curse rate while equipped */
|
|
90
|
+
Warding_CurseReduction = 33
|
|
87
91
|
}
|
|
88
92
|
export default MagicalPropertyType;
|
|
89
93
|
export declare enum MagicalPropertyStat {
|
|
@@ -16,38 +16,38 @@ declare const map: {
|
|
|
16
16
|
1: GameOptionsIcon.Crafting;
|
|
17
17
|
2: GameOptionsIcon.Crafting;
|
|
18
18
|
3: GameOptionsIcon.Curse;
|
|
19
|
-
4: GameOptionsIcon.
|
|
20
|
-
5: GameOptionsIcon.
|
|
19
|
+
4: GameOptionsIcon.Curse;
|
|
20
|
+
5: GameOptionsIcon.Peaceful;
|
|
21
21
|
6: GameOptionsIcon.Creatures;
|
|
22
22
|
7: GameOptionsIcon.Creatures;
|
|
23
23
|
8: GameOptionsIcon.Creatures;
|
|
24
24
|
9: GameOptionsIcon.Creatures;
|
|
25
|
-
10: GameOptionsIcon.
|
|
25
|
+
10: GameOptionsIcon.Creatures;
|
|
26
26
|
11: GameOptionsIcon.Travel;
|
|
27
|
-
12: GameOptionsIcon.
|
|
28
|
-
13: GameOptionsIcon.
|
|
29
|
-
14: GameOptionsIcon.
|
|
30
|
-
15: GameOptionsIcon.
|
|
31
|
-
16: GameOptionsIcon.
|
|
32
|
-
17: GameOptionsIcon.
|
|
33
|
-
18: GameOptionsIcon.
|
|
34
|
-
19: GameOptionsIcon.
|
|
35
|
-
20: GameOptionsIcon.
|
|
27
|
+
12: GameOptionsIcon.Travel;
|
|
28
|
+
13: GameOptionsIcon.Luck;
|
|
29
|
+
14: GameOptionsIcon.Weight;
|
|
30
|
+
15: GameOptionsIcon.Health;
|
|
31
|
+
16: GameOptionsIcon.Stamina;
|
|
32
|
+
17: GameOptionsIcon.Hunger;
|
|
33
|
+
18: GameOptionsIcon.Thirst;
|
|
34
|
+
19: GameOptionsIcon.Items;
|
|
35
|
+
20: GameOptionsIcon.NoItems;
|
|
36
36
|
21: GameOptionsIcon.Items;
|
|
37
|
-
22: GameOptionsIcon.
|
|
37
|
+
22: GameOptionsIcon.Items;
|
|
38
38
|
23: GameOptionsIcon.Skills;
|
|
39
39
|
24: GameOptionsIcon.Skills;
|
|
40
40
|
25: GameOptionsIcon.Skills;
|
|
41
|
-
26: GameOptionsIcon.
|
|
42
|
-
27: GameOptionsIcon.
|
|
43
|
-
28: GameOptionsIcon.
|
|
41
|
+
26: GameOptionsIcon.Skills;
|
|
42
|
+
27: GameOptionsIcon.EternalDay;
|
|
43
|
+
28: GameOptionsIcon.EternalNight;
|
|
44
44
|
29: GameOptionsIcon.Time;
|
|
45
45
|
30: GameOptionsIcon.Time;
|
|
46
46
|
31: GameOptionsIcon.Time;
|
|
47
|
-
32: GameOptionsIcon.
|
|
48
|
-
33: GameOptionsIcon.
|
|
49
|
-
34: GameOptionsIcon.
|
|
50
|
-
35:
|
|
47
|
+
32: GameOptionsIcon.Time;
|
|
48
|
+
33: GameOptionsIcon.Bleeding;
|
|
49
|
+
34: GameOptionsIcon.Poisoned;
|
|
50
|
+
35: GameOptionsIcon.Burned;
|
|
51
51
|
36: null;
|
|
52
52
|
37: null;
|
|
53
53
|
38: null;
|
|
@@ -58,6 +58,7 @@ declare const map: {
|
|
|
58
58
|
43: null;
|
|
59
59
|
44: null;
|
|
60
60
|
45: null;
|
|
61
|
+
46: null;
|
|
61
62
|
};
|
|
62
63
|
export declare const customModifierToGameOptionsIconMap: Record<CustomModifierType, GameOptionsIcon | null>;
|
|
63
64
|
export type CustomModifierTypeReal = keyof {
|
|
@@ -68,37 +69,38 @@ export declare const customModifierDescriptions: {
|
|
|
68
69
|
1: CustomModifierDefinition<[]>;
|
|
69
70
|
2: CustomModifierDefinition<[]>;
|
|
70
71
|
3: CustomModifierDefinition<[]>;
|
|
71
|
-
4: CustomModifierDefinition<[]>;
|
|
72
|
+
4: CustomModifierDefinition<[initialCurse: number]>;
|
|
72
73
|
5: CustomModifierDefinition<[]>;
|
|
73
|
-
|
|
74
|
-
9: CustomModifierDefinition<[
|
|
75
|
-
|
|
76
|
-
7: CustomModifierDefinition<[
|
|
77
|
-
|
|
78
|
-
11: CustomModifierDefinition<[]>;
|
|
79
|
-
12: CustomModifierDefinition<[
|
|
80
|
-
13: CustomModifierDefinition<[
|
|
81
|
-
14: CustomModifierDefinition<[
|
|
74
|
+
6: CustomModifierDefinition<[]>;
|
|
75
|
+
9: CustomModifierDefinition<[creature: Map<import("../../../entity/creature/ICreature").CreatureType, import("@wayward/game/game/options/IGameOptions").IGameOptionsCreature>]>;
|
|
76
|
+
10: CustomModifierDefinition<[aberrants: boolean]>;
|
|
77
|
+
7: CustomModifierDefinition<[spawnLimit: number]>;
|
|
78
|
+
8: CustomModifierDefinition<[rateMultiplier: number]>;
|
|
79
|
+
11: CustomModifierDefinition<[biome: import("../../../biome/IBiome").BiomeType]>;
|
|
80
|
+
12: CustomModifierDefinition<[]>;
|
|
81
|
+
13: CustomModifierDefinition<[luckMultiplier: number]>;
|
|
82
|
+
14: CustomModifierDefinition<[bonus: number]>;
|
|
82
83
|
15: CustomModifierDefinition<[options: Partial<import("@wayward/game/game/options/IGameOptions").IGameOptionsStat>]>;
|
|
83
84
|
16: CustomModifierDefinition<[options: Partial<import("@wayward/game/game/options/IGameOptions").IGameOptionsStat>]>;
|
|
84
85
|
17: CustomModifierDefinition<[options: Partial<import("@wayward/game/game/options/IGameOptions").IGameOptionsStat>]>;
|
|
85
|
-
18: CustomModifierDefinition<[]>;
|
|
86
|
+
18: CustomModifierDefinition<[options: Partial<import("@wayward/game/game/options/IGameOptions").IGameOptionsStat>]>;
|
|
86
87
|
19: CustomModifierDefinition<[]>;
|
|
87
|
-
20: CustomModifierDefinition<[
|
|
88
|
+
20: CustomModifierDefinition<[]>;
|
|
88
89
|
21: CustomModifierDefinition<[multiplier: number]>;
|
|
89
|
-
22: CustomModifierDefinition<[
|
|
90
|
-
23: CustomModifierDefinition<[
|
|
91
|
-
24: CustomModifierDefinition<[
|
|
92
|
-
25: CustomModifierDefinition<[
|
|
93
|
-
26: CustomModifierDefinition<[]>;
|
|
90
|
+
22: CustomModifierDefinition<[multiplier: number]>;
|
|
91
|
+
23: CustomModifierDefinition<[count: number]>;
|
|
92
|
+
24: CustomModifierDefinition<[initial: number]>;
|
|
93
|
+
25: CustomModifierDefinition<[multiplier: number]>;
|
|
94
|
+
26: CustomModifierDefinition<[skill: Map<import("../../../entity/skill/ISkills").SkillType, import("@wayward/game/game/options/IGameOptions").IGameOptionsSkill>]>;
|
|
94
95
|
27: CustomModifierDefinition<[]>;
|
|
95
96
|
28: CustomModifierDefinition<[]>;
|
|
96
|
-
29: CustomModifierDefinition<[
|
|
97
|
-
30: CustomModifierDefinition<[
|
|
98
|
-
31: CustomModifierDefinition<[
|
|
99
|
-
32: CustomModifierDefinition<[
|
|
97
|
+
29: CustomModifierDefinition<[]>;
|
|
98
|
+
30: CustomModifierDefinition<[initial: number]>;
|
|
99
|
+
31: CustomModifierDefinition<[length: number]>;
|
|
100
|
+
32: CustomModifierDefinition<[percent: number]>;
|
|
100
101
|
33: CustomModifierDefinition<[options: Partial<import("@wayward/game/game/options/IGameOptions").IGameOptionsStatus>]>;
|
|
101
102
|
34: CustomModifierDefinition<[options: Partial<import("@wayward/game/game/options/IGameOptions").IGameOptionsStatus>]>;
|
|
103
|
+
35: CustomModifierDefinition<[options: Partial<import("@wayward/game/game/options/IGameOptions").IGameOptionsStatus>]>;
|
|
102
104
|
};
|
|
103
105
|
export type CustomModifierArgs = {
|
|
104
106
|
[TYPE in CustomModifierTypeReal]: ((typeof customModifierDescriptions)[TYPE] extends CustomModifierDefinition<infer ARGS> ? ARGS : never);
|
|
@@ -18,48 +18,49 @@ export declare enum CustomModifierType {
|
|
|
18
18
|
RecipesNone = 1,
|
|
19
19
|
RecipesAll = 2,
|
|
20
20
|
NoCurseEvents = 3,
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
21
|
+
InitialCurse = 4,
|
|
22
|
+
Peaceful = 5,
|
|
23
|
+
FearlessCreatures = 6,
|
|
24
|
+
SpawnLimit = 7,
|
|
25
|
+
SpawnRate = 8,
|
|
26
|
+
Creatures = 9,
|
|
27
|
+
OtherCreatures = 10,
|
|
28
|
+
StartingBiome = 11,
|
|
29
|
+
NoTravelEffects = 12,
|
|
30
|
+
Luck = 13,
|
|
31
|
+
Strength = 14,
|
|
32
|
+
Health = 15,
|
|
33
|
+
Stamina = 16,
|
|
34
|
+
Hunger = 17,
|
|
35
|
+
Thirst = 18,
|
|
36
|
+
TileContainers = 19,
|
|
37
|
+
NoStartingItems = 20,
|
|
38
|
+
ItemDurability = 21,
|
|
39
|
+
ItemDecay = 22,
|
|
40
|
+
StartingSkills = 23,
|
|
41
|
+
GlobalInitialSkillsValue = 24,
|
|
42
|
+
GlobalSkillGainMultiplier = 25,
|
|
43
|
+
Skills = 26,
|
|
44
|
+
EternalDay = 27,
|
|
45
|
+
EternalNight = 28,
|
|
46
|
+
FrozenTime = 29,
|
|
47
|
+
InitialTime = 30,
|
|
48
|
+
DayLength = 31,
|
|
49
|
+
DayPercent = 32,
|
|
50
|
+
Bleeding = 33,
|
|
51
|
+
Poisoned = 34,
|
|
52
|
+
Burned = 35,
|
|
53
|
+
SpecificCreatureAlwaysSpawns = 36,
|
|
54
|
+
SpecificCreatureSpawningDisabled = 37,
|
|
55
|
+
SpecificCreatureSpawns = 38,
|
|
56
|
+
StatInitial = 39,
|
|
57
|
+
StatMax = 40,
|
|
58
|
+
StatMultiplier = 41,
|
|
59
|
+
SpecificSkillInitial = 42,
|
|
60
|
+
SpecificSkillGainMultiplier = 43,
|
|
61
|
+
StatusInitial = 44,
|
|
62
|
+
StatusUntreatable = 45,
|
|
63
|
+
StatusPassChanceMultiplier = 46
|
|
63
64
|
}
|
|
64
65
|
export interface CustomModifierTranslationGroup {
|
|
65
66
|
label: Translation;
|
|
@@ -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 { CustomModifierDefinition } from "@wayward/game/game/options/modifiers/custom/ICustomModifier";
|
|
12
|
+
declare const _default: CustomModifierDefinition<[initialCurse: number]>;
|
|
13
|
+
export default _default;
|
|
@@ -24,7 +24,6 @@ export default class ActionMenuHandler extends InteractionHandler {
|
|
|
24
24
|
private overlay?;
|
|
25
25
|
private path?;
|
|
26
26
|
private contextMenu?;
|
|
27
|
-
private previewDistance;
|
|
28
27
|
protected onActionsInFront(api: IBindHandlerApi): boolean;
|
|
29
28
|
protected onActions(api: IBindHandlerApi): boolean;
|
|
30
29
|
private reset;
|
|
@@ -32,5 +31,4 @@ export default class ActionMenuHandler extends InteractionHandler {
|
|
|
32
31
|
private onHide;
|
|
33
32
|
private onContextMenuOptionHovered;
|
|
34
33
|
private updatePath;
|
|
35
|
-
private getInitialPath;
|
|
36
34
|
}
|
|
@@ -13,6 +13,7 @@ import type { IBindHandlerApi } from "@wayward/game/ui/input/Bind";
|
|
|
13
13
|
import type HoveredTileTracker from "@wayward/game/ui/screen/screens/game/util/HoveredTileTracker";
|
|
14
14
|
import type ActionMenuHandler from "@wayward/game/ui/screen/screens/game/util/movement/ActionMenuHandler";
|
|
15
15
|
import type MovementHandler from "@wayward/game/ui/screen/screens/game/util/movement/MovementHandler";
|
|
16
|
+
import type PathQueryCache from "@wayward/game/ui/screen/screens/game/util/movement/PathQueryCache";
|
|
16
17
|
import type PathingHandler from "@wayward/game/ui/screen/screens/game/util/movement/PathingHandler";
|
|
17
18
|
import EventEmitter from "@wayward/utilities/event/EventEmitter";
|
|
18
19
|
export interface IInteractionHandlerEvents {
|
|
@@ -23,6 +24,7 @@ export interface IInteractionHandlerHost {
|
|
|
23
24
|
surface?: Component;
|
|
24
25
|
hoveredTile: HoveredTileTracker;
|
|
25
26
|
movement: MovementHandler;
|
|
27
|
+
pathQuery: PathQueryCache;
|
|
26
28
|
pathing: PathingHandler;
|
|
27
29
|
actionMenu: ActionMenuHandler;
|
|
28
30
|
}
|
|
@@ -32,6 +34,7 @@ export default class InteractionHandler extends EventEmitter.Host<IInteractionHa
|
|
|
32
34
|
protected get host(): IInteractionHandlerHost | undefined;
|
|
33
35
|
protected get hoveredTile(): HoveredTileTracker | undefined;
|
|
34
36
|
protected get movement(): MovementHandler | undefined;
|
|
37
|
+
protected get pathQuery(): PathQueryCache | undefined;
|
|
35
38
|
protected get pathing(): PathingHandler | undefined;
|
|
36
39
|
protected get actionMenu(): ActionMenuHandler | undefined;
|
|
37
40
|
constructor(host: IInteractionHandlerHost);
|
|
@@ -13,12 +13,14 @@ import HoveredTileTracker from "@wayward/game/ui/screen/screens/game/util/Hovere
|
|
|
13
13
|
import ActionMenuHandler from "@wayward/game/ui/screen/screens/game/util/movement/ActionMenuHandler";
|
|
14
14
|
import type { IInteractionHandlerHost } from "@wayward/game/ui/screen/screens/game/util/movement/InteractionHandler";
|
|
15
15
|
import MovementHandler from "@wayward/game/ui/screen/screens/game/util/movement/MovementHandler";
|
|
16
|
+
import PathQueryCache from "@wayward/game/ui/screen/screens/game/util/movement/PathQueryCache";
|
|
16
17
|
import PathingHandler from "@wayward/game/ui/screen/screens/game/util/movement/PathingHandler";
|
|
17
18
|
import EventEmitter from "@wayward/utilities/event/EventEmitter";
|
|
18
19
|
export interface IInteractionManagerEvents {
|
|
19
20
|
}
|
|
20
21
|
export default class InteractionManager extends EventEmitter.Host<IInteractionManagerEvents> implements IInteractionHandlerHost {
|
|
21
22
|
readonly hoveredTile: HoveredTileTracker;
|
|
23
|
+
readonly pathQuery: PathQueryCache;
|
|
22
24
|
readonly pathing: PathingHandler;
|
|
23
25
|
readonly movement: MovementHandler;
|
|
24
26
|
readonly actionMenu: ActionMenuHandler;
|
|
@@ -0,0 +1,25 @@
|
|
|
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 { type InteractionDistance as InteractionDistanceTypeOrRange } from "@wayward/game/game/entity/action/usable/IUsableAction";
|
|
12
|
+
import { MoveFlag } from "@wayward/game/game/entity/IEntity";
|
|
13
|
+
import type Tile from "@wayward/game/game/tile/Tile";
|
|
14
|
+
import InteractionHandler from "@wayward/game/ui/screen/screens/game/util/movement/InteractionHandler";
|
|
15
|
+
export default class PathQueryCache extends InteractionHandler {
|
|
16
|
+
private target?;
|
|
17
|
+
private readonly paths;
|
|
18
|
+
deregister(): this;
|
|
19
|
+
getPath(targetTile: Tile, distance?: InteractionDistanceTypeOrRange): Tile[] | undefined;
|
|
20
|
+
reset(targetTile?: Tile): void;
|
|
21
|
+
protected onPlayerStateChange(): void;
|
|
22
|
+
protected onPlayerPostMove(_player: typeof localPlayer, _lastTile: Tile, _tile: Tile, moveFlag: MoveFlag): void;
|
|
23
|
+
protected onTickEnd(): void;
|
|
24
|
+
private getKey;
|
|
25
|
+
}
|
package/package.json
CHANGED