@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.
@@ -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
- UiPathingHandler = 45,
104
- UsableActions = 46,
105
- WorldRenderer = 47
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(): PathingHandler;
205
- 46(): UsableAction;
206
- 47(): WorldRenderer;
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/PathingHandler").default;
65
- 46(): import("../game/entity/action/usable/UsableAction").default;
66
- 47(): import("../renderer/world/WorldRenderer").WorldRenderer;
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
@@ -67,7 +67,8 @@ export declare enum CurseComponent {
67
67
  CumulativeEvilCrafting = 2,
68
68
  Modifier = 3,
69
69
  CumulativeKilling = 4,
70
- Sleeplessness = 5
70
+ Sleeplessness = 5,
71
+ Warding = 6
71
72
  }
72
73
  export declare enum CurseSystemDiscovery {
73
74
  CurseFactors = 0,
@@ -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.Peaceful;
20
- 5: GameOptionsIcon.Creatures;
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.Travel;
25
+ 10: GameOptionsIcon.Creatures;
26
26
  11: GameOptionsIcon.Travel;
27
- 12: GameOptionsIcon.Luck;
28
- 13: GameOptionsIcon.Weight;
29
- 14: GameOptionsIcon.Health;
30
- 15: GameOptionsIcon.Stamina;
31
- 16: GameOptionsIcon.Hunger;
32
- 17: GameOptionsIcon.Thirst;
33
- 18: GameOptionsIcon.Items;
34
- 19: GameOptionsIcon.NoItems;
35
- 20: GameOptionsIcon.Items;
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.Skills;
37
+ 22: GameOptionsIcon.Items;
38
38
  23: GameOptionsIcon.Skills;
39
39
  24: GameOptionsIcon.Skills;
40
40
  25: GameOptionsIcon.Skills;
41
- 26: GameOptionsIcon.EternalDay;
42
- 27: GameOptionsIcon.EternalNight;
43
- 28: GameOptionsIcon.Time;
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.Bleeding;
48
- 33: GameOptionsIcon.Poisoned;
49
- 34: GameOptionsIcon.Burned;
50
- 35: null;
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
- 8: CustomModifierDefinition<[creature: Map<import("../../../entity/creature/ICreature").CreatureType, import("@wayward/game/game/options/IGameOptions").IGameOptionsCreature>]>;
74
- 9: CustomModifierDefinition<[aberrants: boolean]>;
75
- 6: CustomModifierDefinition<[spawnLimit: number]>;
76
- 7: CustomModifierDefinition<[rateMultiplier: number]>;
77
- 10: CustomModifierDefinition<[biome: import("../../../biome/IBiome").BiomeType]>;
78
- 11: CustomModifierDefinition<[]>;
79
- 12: CustomModifierDefinition<[luckMultiplier: number]>;
80
- 13: CustomModifierDefinition<[bonus: number]>;
81
- 14: CustomModifierDefinition<[options: Partial<import("@wayward/game/game/options/IGameOptions").IGameOptionsStat>]>;
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<[multiplier: number]>;
88
+ 20: CustomModifierDefinition<[]>;
88
89
  21: CustomModifierDefinition<[multiplier: number]>;
89
- 22: CustomModifierDefinition<[count: number]>;
90
- 23: CustomModifierDefinition<[initial: number]>;
91
- 24: CustomModifierDefinition<[multiplier: number]>;
92
- 25: CustomModifierDefinition<[skill: Map<import("../../../entity/skill/ISkills").SkillType, import("@wayward/game/game/options/IGameOptions").IGameOptionsSkill>]>;
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<[initial: number]>;
97
- 30: CustomModifierDefinition<[length: number]>;
98
- 31: CustomModifierDefinition<[percent: number]>;
99
- 32: CustomModifierDefinition<[options: Partial<import("@wayward/game/game/options/IGameOptions").IGameOptionsStatus>]>;
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
- Peaceful = 4,
22
- FearlessCreatures = 5,
23
- SpawnLimit = 6,
24
- SpawnRate = 7,
25
- Creatures = 8,
26
- OtherCreatures = 9,
27
- StartingBiome = 10,
28
- NoTravelEffects = 11,
29
- Luck = 12,
30
- Strength = 13,
31
- Health = 14,
32
- Stamina = 15,
33
- Hunger = 16,
34
- Thirst = 17,
35
- TileContainers = 18,
36
- NoStartingItems = 19,
37
- ItemDurability = 20,
38
- ItemDecay = 21,
39
- StartingSkills = 22,
40
- GlobalInitialSkillsValue = 23,
41
- GlobalSkillGainMultiplier = 24,
42
- Skills = 25,
43
- EternalDay = 26,
44
- EternalNight = 27,
45
- FrozenTime = 28,
46
- InitialTime = 29,
47
- DayLength = 30,
48
- DayPercent = 31,
49
- Bleeding = 32,
50
- Poisoned = 33,
51
- Burned = 34,
52
- SpecificCreatureAlwaysSpawns = 35,
53
- SpecificCreatureSpawningDisabled = 36,
54
- SpecificCreatureSpawns = 37,
55
- StatInitial = 38,
56
- StatMax = 39,
57
- StatMultiplier = 40,
58
- SpecificSkillInitial = 41,
59
- SpecificSkillGainMultiplier = 42,
60
- StatusInitial = 43,
61
- StatusUntreatable = 44,
62
- StatusPassChanceMultiplier = 45
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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@wayward/types",
3
3
  "description": "TypeScript declarations for Wayward, used for modding.",
4
- "version": "2.15.3-beta.dev.20260317.1",
4
+ "version": "2.15.3-beta.dev.20260318.1",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",