@wayward/types 2.15.0-beta.dev.20251010.1 → 2.15.0-beta.dev.20251012.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.
Files changed (25) hide show
  1. package/definitions/game/audio/IAudio.d.ts +68 -62
  2. package/definitions/game/game/curse/Curse.d.ts +5 -0
  3. package/definitions/game/game/curse/CurseEvent.d.ts +36 -0
  4. package/definitions/game/game/curse/event/CurseEventShadows.d.ts +6 -0
  5. package/definitions/game/game/doodad/Doodad.d.ts +1 -5
  6. package/definitions/game/game/doodad/DoodadUtilities.d.ts +3 -1
  7. package/definitions/game/game/doodad/IDoodad.d.ts +8 -0
  8. package/definitions/game/game/entity/IEntity.d.ts +11 -0
  9. package/definitions/game/game/entity/action/Action.d.ts +2 -20
  10. package/definitions/game/game/entity/action/actions/SetTitle.d.ts +1 -1
  11. package/definitions/game/game/inspection/infoProviders/item/use/ItemBuildInfo.d.ts +1 -1
  12. package/definitions/game/game/inspection/inspections/utility/EffectRadiusRegistry.d.ts +24 -0
  13. package/definitions/game/game/item/Item.d.ts +1 -6
  14. package/definitions/game/game/item/ItemManager.d.ts +1 -1
  15. package/definitions/game/game/magic/IMagicalProperty.d.ts +6 -1
  16. package/definitions/game/game/magic/MagicalPropertyManager.d.ts +4 -2
  17. package/definitions/game/game/tile/ITerrain.d.ts +3 -22
  18. package/definitions/game/game/tile/Tile.d.ts +3 -2
  19. package/definitions/game/language/LanguageManager.d.ts +0 -2
  20. package/definitions/game/renderer/overlay/EffectRadiusOverlay.d.ts +36 -0
  21. package/definitions/game/save/upgrade/UpgradeVersion.d.ts +2 -0
  22. package/definitions/game/save/upgrade/versions/beta2.15.0/beta2.15.0-dev20251012.d.ts +12 -0
  23. package/definitions/game/ui/old/OldUi.d.ts +2 -0
  24. package/definitions/game/utilities/math/Vector2.d.ts +25 -5
  25. package/package.json +1 -1
@@ -11,68 +11,74 @@
11
11
  export declare enum SfxType {
12
12
  Boat = 0,
13
13
  Bow = 1,
14
- Chat = 2,
15
- Craft = 3,
16
- CreatureHit = 4,
17
- CreatureNoise = 5,
18
- Damaged = 6,
19
- DangerousMove = 7,
20
- Death = 8,
21
- Eating = 9,
22
- Encumbered = 10,
23
- Exceptional = 11,
24
- Extinguish = 12,
25
- Fail = 13,
26
- FluteNoteA = 14,
27
- FluteNoteB = 15,
28
- FluteNoteC = 16,
29
- FluteNoteD = 17,
30
- FluteNoteE = 18,
31
- FluteNoteF = 19,
32
- FluteNoteG = 20,
33
- FluteNoteH = 21,
34
- FluteNoteI = 22,
35
- GraniteHit = 23,
36
- Hit = 24,
37
- Hurt = 25,
38
- InvokeChaos = 26,
39
- InvokeEvil = 27,
40
- InvokeGood = 28,
41
- Minecart = 29,
42
- Miss = 30,
43
- Overburdened = 31,
44
- PickUp = 32,
45
- Sacrifice = 33,
46
- SandstoneHit = 34,
47
- Slip = 35,
48
- Swim = 36,
49
- Throw = 37,
50
- Trample = 38,
51
- TreeHit = 39,
52
- UiActivate = 40,
53
- UiChoose = 41,
54
- UiClose = 42,
55
- UiDisable = 43,
56
- UiEnable = 44,
57
- UiEquip = 45,
58
- UiInput = 46,
59
- UiInputdelete = 47,
60
- UiInvalid = 48,
61
- UiOpen = 49,
62
- UiOpensmall = 50,
63
- UiProtect = 51,
64
- UiReorder = 52,
65
- UiSelect = 53,
66
- UiSort = 54,
67
- UiStack = 55,
68
- UiTrade = 56,
69
- UiUnequip = 57,
70
- UiUnprotect = 58,
71
- UiUnstack = 59,
72
- Walk = 60,
73
- Water = 61,
74
- Wheelbarrow = 62,
75
- CraftFail = 63
14
+ Break = 2,
15
+ Chat = 3,
16
+ Craft = 4,
17
+ CraftFail = 5,
18
+ CreatureHit = 6,
19
+ CreatureNoise = 7,
20
+ Damaged = 8,
21
+ DangerousMove = 9,
22
+ Death = 10,
23
+ Eating = 11,
24
+ Encumbered = 12,
25
+ Exceptional = 13,
26
+ Extinguish = 14,
27
+ Exude = 15,// Reversed GeneralMagicalAction sound
28
+ Fail = 16,
29
+ FluteNoteA = 17,
30
+ FluteNoteB = 18,
31
+ FluteNoteC = 19,
32
+ FluteNoteD = 20,
33
+ FluteNoteE = 21,
34
+ FluteNoteF = 22,
35
+ FluteNoteG = 23,
36
+ FluteNoteH = 24,
37
+ FluteNoteI = 25,
38
+ GeneralAction = 26,
39
+ GeneralMagicalAction = 27,
40
+ GraniteHit = 28,
41
+ Hit = 29,
42
+ Hurt = 30,
43
+ InvokeChaos = 31,
44
+ InvokeEvil = 32,
45
+ InvokeGood = 33,
46
+ Minecart = 34,
47
+ Miss = 35,
48
+ Overburdened = 36,
49
+ PickUp = 37,
50
+ Sacrifice = 38,
51
+ SandstoneHit = 39,
52
+ Slip = 40,
53
+ Swim = 41,
54
+ Throw = 42,
55
+ Trample = 43,
56
+ TreeHit = 44,
57
+ UiActivate = 45,
58
+ UiChoose = 46,
59
+ UiClose = 47,
60
+ UiDisable = 48,
61
+ UiEnable = 49,
62
+ UiEquip = 50,
63
+ UiInput = 51,
64
+ UiInputdelete = 52,
65
+ UiInvalid = 53,
66
+ UiOpen = 54,
67
+ UiOpensmall = 55,
68
+ UiProtect = 56,
69
+ UiReorder = 57,
70
+ UiSelect = 58,
71
+ UiSort = 59,
72
+ UiStack = 60,
73
+ UiTrade = 61,
74
+ UiUnequip = 62,
75
+ UiUnprotect = 63,
76
+ UiUnstack = 64,
77
+ Walk = 65,
78
+ Water = 66,
79
+ Wheelbarrow = 67,
80
+ Curse = 68,
81
+ CurseWarning = 69
76
82
  }
77
83
  export type SfxUi = Extract<keyof typeof SfxType, `Ui${string}`> extends `Ui${infer RESULT}` ? Lowercase<RESULT> : never;
78
84
  export declare enum Music {
@@ -79,6 +79,11 @@ export declare const CURSE_EVENTS_FIRST_NIGHT = 3;
79
79
  * If the entity is on a tile that can be seen by a player, it will not despawn.
80
80
  */
81
81
  export declare const CURSE_EVENTS_ENTITY_DESPAWN_CHANCE = 0.1;
82
+ /**
83
+ * Some curse events extinguish light sources via additional decay (both static & dynamic (based on % of decay remaining))
84
+ * This multiplier affects how quickly curse ward doodads & items are extinguished compared to the rest
85
+ */
86
+ export declare const CURSE_EVENTS_EXTINGUISH_WARD_MULTIPLIER = 0.2;
82
87
  declare namespace Curse {
83
88
  interface Helper {
84
89
  context: CurseEventContext;
@@ -19,6 +19,10 @@ import { IRange } from "@wayward/utilities/math/Range";
19
19
  import type Tile from "@wayward/game/game/tile/Tile";
20
20
  import type Creature from "@wayward/game/game/entity/creature/Creature";
21
21
  import type { CreatureType } from "@wayward/game/game/entity/creature/ICreature";
22
+ import type Doodad from "@wayward/game/game/doodad/Doodad";
23
+ import type Item from "@wayward/game/game/item/Item";
24
+ import type TileEvent from "@wayward/game/game/tile/TileEvent";
25
+ import type WorldZ from "@wayward/utilities/game/WorldZ";
22
26
  /** The API that curse events have access to */
23
27
  export interface CurseEventContext {
24
28
  readonly island: Island;
@@ -38,11 +42,29 @@ export interface CurseEventContext {
38
42
  getNearbyPlayers(): Human[];
39
43
  /** Get a random tile within the curse event's radius. This is based on `CurseEvent.position` and `CurseEvent.radius` */
40
44
  getRandomTile(radius?: number): Tile | undefined;
45
+ /** Get a random tile within the curse event's radius. This is based on `CurseEvent.position` and `CurseEvent.radius` */
46
+ getTilesInRange(radius?: number, z?: WorldZ): Tile[];
41
47
  /**
42
48
  * Spawn a creature at the given tile using the curse event spawning rules.
49
+ *
50
+ * Note that "curse event" creatures:
51
+ * - Do not display alerted notifiers
52
+ * - Do not randomly despawn
53
+ * - Are despawned at the event end
54
+ *
43
55
  * @param evenWhenAsleep Disable the default functionality of preventing spawns if the cursebearer is asleep
44
56
  */
45
57
  spawnCreature(type?: CreatureType, tile?: Tile, evenWhenAsleep?: true): Creature | undefined;
58
+ /**
59
+ * Note: This does not check whether or not the cursebearer is asleep.
60
+ * @param options The options for extinguishing lights
61
+ * @param lights The lights that should lose decay. If no lights are provided, all lights in the event radius will be affected
62
+ */
63
+ extinguish(options: CurseEventExtinguishOptions, ...lights: Array<Doodad | Item | TileEvent>): void;
64
+ /**
65
+ * Mark the given creatures as "curse event" creatures. See the `spawnCreature` function for more information
66
+ */
67
+ claim(...creatures: Creature[]): void;
46
68
  /**
47
69
  * Inject a custom curse event subscriber class into the game.
48
70
  * This class *must* be included in `CurseEvent.subscribers`.
@@ -54,6 +76,20 @@ export interface CurseEventContext {
54
76
  uninject<T extends CurseEventSubscriber>(subscriber: Class<T>): void;
55
77
  toString(): string;
56
78
  }
79
+ export interface CurseEventExtinguishOptions {
80
+ /**
81
+ * The number of flat ticks to reduce decays by
82
+ *
83
+ * Chooses the higher of `staticDecay` and `dynamicDecay`.
84
+ */
85
+ staticDecay?: number | IRange;
86
+ /**
87
+ * The percentage of the current decay to reduce by, represented as a number between 0 and 1.
88
+ *
89
+ * Chooses the higher of `staticDecay` and `dynamicDecay`.
90
+ */
91
+ dynamicDecay?: number | IRange;
92
+ }
57
93
  export interface CurseEvent {
58
94
  group: CurseGroup;
59
95
  category: CurseCategory;
@@ -9,5 +9,11 @@
9
9
  * https://github.com/WaywardGame/types/wiki
10
10
  */
11
11
  import { CurseEvent } from "@wayward/game/game/curse/CurseEvent";
12
+ import { IRange, IRangeRange } from "@wayward/utilities/math/Range";
13
+ export declare const CURSE_EVENT_SHADOWS_SPAWN_DELAY: IRangeRange;
14
+ export declare const CURSE_EVENT_SHADOWS_EXTINGUISH_DELAY: IRangeRange;
15
+ export declare const CURSE_EVENT_SHADOWS_EXTINGUISH_STATIC: IRangeRange;
16
+ export declare const CURSE_EVENT_SHADOWS_EXTINGUISH_DYNAMIC: IRangeRange;
17
+ export declare const CURSE_EVENT_SHADOWS_EXTINGUISH_TIME_MULTIPLIER: IRange;
12
18
  declare const _default: CurseEvent;
13
19
  export default _default;
@@ -375,11 +375,6 @@ export default class Doodad extends EntityMovable<IDoodadDescription, DoodadType
375
375
  * @returns number of score (or 0 if no civilization score is set).
376
376
  */
377
377
  getCivilizationScore(excludeMagic?: boolean): number;
378
- /**
379
- * Gets the scarecrow radius based on quality.
380
- * This also exists on items.
381
- */
382
- getScareRadius(): number;
383
378
  /**
384
379
  * Gets a set of skill types and values from doodads that have "containedItemGroupProvidesSkill" set for items that provide adjacent skill bonuses.
385
380
  * @returns Map of skill type and number (skill value).
@@ -403,6 +398,7 @@ export default class Doodad extends EntityMovable<IDoodadDescription, DoodadType
403
398
  * @returns True if the solar still can work in the current temperature, false if not.
404
399
  */
405
400
  willStillWorkInTemperature(): boolean;
401
+ forceDecayTick(): void;
406
402
  /**
407
403
  * Decay over time
408
404
  */
@@ -9,9 +9,10 @@
9
9
  * https://github.com/WaywardGame/types/wiki
10
10
  */
11
11
  import type Doodad from "@wayward/game/game/doodad/Doodad";
12
- import type { DoodadType } from "@wayward/game/game/doodad/IDoodad";
12
+ import type { DoodadType, IScareRadius } from "@wayward/game/game/doodad/IDoodad";
13
13
  import { GrowingStage } from "@wayward/game/game/doodad/IDoodad";
14
14
  import type Human from "@wayward/game/game/entity/Human";
15
+ import type Item from "@wayward/game/game/item/Item";
15
16
  declare namespace DoodadUtilities {
16
17
  type DoodadIn = Doodad | DoodadType;
17
18
  export function hasGrownEnoughIfCanGrow(doodad: Doodad, requiredGrowthStage: GrowingStage): boolean;
@@ -20,6 +21,7 @@ declare namespace DoodadUtilities {
20
21
  export function wouldWalkingOnDealNormalDamage(doodad: DoodadIn, human?: Human): boolean;
21
22
  export function isDangerous(doodad: DoodadIn, human?: Human): boolean;
22
23
  export function canCauseStatus(doodad: DoodadIn): boolean;
24
+ export function getScareRadius(doodad: Doodad | Item): IScareRadius;
23
25
  export {};
24
26
  }
25
27
  export default DoodadUtilities;
@@ -262,6 +262,14 @@ export interface IItemStackRegion {
262
262
  yMin: number;
263
263
  yMax: number;
264
264
  }
265
+ export interface IScareRadius {
266
+ total: number;
267
+ /** The "effective" scare radius, ie what's actually used internally. This is slightly increased so that it's a nicer circle */
268
+ totalEffective: number;
269
+ base: number;
270
+ quality: number;
271
+ magic: number;
272
+ }
265
273
  export interface ILockedChest {
266
274
  /**
267
275
  * Loot groups that gets generated inside a chest.
@@ -128,6 +128,17 @@ export declare enum EntityType {
128
128
  Corpse = 6,
129
129
  Item = 7
130
130
  }
131
+ export interface EntityTypeMap {
132
+ [EntityType.Corpse]: Corpse;
133
+ [EntityType.Creature]: Creature;
134
+ [EntityType.Doodad]: Doodad;
135
+ [EntityType.Human]: Human;
136
+ [EntityType.Item]: Item;
137
+ [EntityType.NPC]: NPC;
138
+ [EntityType.Player]: Player;
139
+ [EntityType.TileEvent]: TileEvent;
140
+ }
141
+ export type EntityTypeType<TYPE extends EntityType> = EntityTypeMap[TYPE] extends Entity<any, infer TYPETYPE, any, any> ? TYPETYPE : never;
131
142
  export declare enum MoveType {
132
143
  None = 0,
133
144
  Water = 1,
@@ -9,18 +9,10 @@
9
9
  * https://github.com/WaywardGame/types/wiki
10
10
  */
11
11
  import type { DeityReal } from "@wayward/game/game/deity/Deity";
12
- import type Doodad from "@wayward/game/game/doodad/Doodad";
13
12
  import type { ActionArguments, ActionArgumentTupleTypes, ActionFlag, ActionType, ActionUsability, IActionApi, IActionConfirmerApi, IActionDescription, IActionExample, IActionExampleApi, IActionHandlerApi, IActionNotUsable, IActionNotUsableHandlerApi, IActionTargetAdjacent, IActionTargetEntityRanged, IActionTargetTileRanged, IActionUsable } from "@wayward/game/game/entity/action/IAction";
14
- import type Corpse from "@wayward/game/game/entity/creature/corpse/Corpse";
15
- import type Creature from "@wayward/game/game/entity/creature/Creature";
16
13
  import type Entity from "@wayward/game/game/entity/Entity";
17
- import type Human from "@wayward/game/game/entity/Human";
18
- import type { EntityType } from "@wayward/game/game/entity/IEntity";
19
- import type NPC from "@wayward/game/game/entity/npc/NPC";
20
- import type Player from "@wayward/game/game/entity/player/Player";
21
- import type Item from "@wayward/game/game/item/Item";
14
+ import type { EntityType, EntityTypeMap } from "@wayward/game/game/entity/IEntity";
22
15
  import type Tile from "@wayward/game/game/tile/Tile";
23
- import type TileEvent from "@wayward/game/game/tile/TileEvent";
24
16
  import { Direction } from "@wayward/game/utilities/math/Direction";
25
17
  import type { IVector3 } from "@wayward/game/utilities/math/IVector";
26
18
  export declare class Action<A extends ActionArguments, T extends ActionType = ActionType, E extends Entity = Entity, R = void, CU extends IActionUsable = IActionUsable, AV extends any[] = ActionArgumentTupleTypes<A>> implements IActionDescription<A, E, R, CU, AV> {
@@ -126,15 +118,5 @@ export declare class Action<A extends ActionArguments, T extends ActionType = Ac
126
118
  */
127
119
  clone(): Action<A, T, E, R, CU, AV>;
128
120
  }
129
- type EntityTypeMap<E extends EntityType> = {
130
- [EntityType.Corpse]: Corpse;
131
- [EntityType.Creature]: Creature;
132
- [EntityType.Doodad]: Doodad;
133
- [EntityType.Human]: Human;
134
- [EntityType.Item]: Item;
135
- [EntityType.NPC]: NPC;
136
- [EntityType.Player]: Player;
137
- [EntityType.TileEvent]: TileEvent;
138
- }[E];
139
- type EntityTypeTupleType<E extends EntityType[]> = E extends [EntityType] ? EntityTypeMap<E[0]> : E extends [EntityType, EntityType] ? EntityTypeMap<E[0]> | EntityTypeMap<E[1]> : E extends [EntityType, EntityType, EntityType] ? EntityTypeMap<E[0]> | EntityTypeMap<E[1]> | EntityTypeMap<E[2]> : never;
121
+ type EntityTypeTupleType<E extends EntityType[]> = E extends [EntityType] ? EntityTypeMap[E[0]] : E extends [EntityType, EntityType] ? EntityTypeMap[E[0]] | EntityTypeMap[E[1]] : E extends [EntityType, EntityType, EntityType] ? EntityTypeMap[E[0]] | EntityTypeMap[E[1]] | EntityTypeMap[E[2]] : never;
140
122
  export {};
@@ -16,5 +16,5 @@ export declare enum TitleType {
16
16
  Milestone = 0,
17
17
  Skill = 1
18
18
  }
19
- declare const _default: Action<[[ActionArgument.Undefined, import("../argument/ActionArgumentEnum").default<TitleType, "Skill" | "Milestone">], [arg1: ActionArgument.Undefined, import("../argument/ActionArgumentEnum").default<Milestone, "Statistician" | "Runekeeper" | "Cursed" | "Navigator" | "Abnormalizer" | "Chef" | "Exterminator" | "Crafter" | "Gardener" | "Gatherer" | "Hunter" | "Locksmith" | "ReaperOfSouls" | "Survivor" | "Pitcher" | "Trapsetter" | "TreasureHunter" | "Collector" | "Explorer" | "Grandmaster" | "Prepared" | "Doctor" | "Artificer" | "Returned" | "DragonSlayer" | "Treasurer" | "Pulchritudinous" | "Friendly" | "Malevolent" | "Benevolent" | "Boundless" | "Talented" | "Weathered" | "Seasoned" | "Pacifier" | "Merchant" | "Notekeeper" | "Operator" | "Huntsman" | "Contender" | "Challenger" | "DestroyerOfMagi" | "Helmsman" | "Multitasker" | "Apocryphal" | "Diverse" | "InternalDiscoveredBoats" | "Traitor" | "MasterOfAll" | "Rouseabout" | "Murderer" | "Retailer" | "Masochist" | "Versatile" | "InternalStatDiscovery" | "Dedicated" | "Hounded" | "Serene" | "InternalRuneOrAltarDiscovery" | "Curator" | "Thaumaturgic" | "InternalDeityDiscovery" | "InternalMerchantsDiscovery" | "InternalCurseSystemDiscovery" | "Invoker" | "InternalDeityInvoked" | "InternalInsulationDiscovery" | "Turbulent" | "Afflicted" | "Exsanguinated" | "InternalItemDiscovered" | "Cursebreaker">, import("../argument/ActionArgumentEnum").default<SkillType, "None" | "Taming" | "Mining" | "Swimming" | "Chemistry" | "Anatomy" | "Marksmanship" | "Blacksmithing" | "Botany" | "Camping" | "Cartography" | "Claythrowing" | "Cooking" | "Fishing" | "Fletching" | "Glassblowing" | "Leatherworking" | "Lockpicking" | "Lumberjacking" | "Mycology" | "Parrying" | "Stonecrafting" | "Tactics" | "Tailoring" | "Throwing" | "Tinkering" | "Trapping" | "Woodworking" | "Horticulture" | "Bartering" | "Seafaring" | "Thaumaturgy" | "DualWielding" | "Theurgy">]], ActionType.SetTitle, import("../../player/Player").default, void, import("@wayward/game/game/entity/action/IAction").IActionUsable, [(TitleType | undefined)?, (Milestone | SkillType | undefined)?]>;
19
+ declare const _default: Action<[[ActionArgument.Undefined, import("../argument/ActionArgumentEnum").default<TitleType, "Skill" | "Milestone">], [arg1: ActionArgument.Undefined, import("../argument/ActionArgumentEnum").default<Milestone, "Statistician" | "Runekeeper" | "Cursed" | "Abnormalizer" | "Chef" | "Exterminator" | "Crafter" | "Gardener" | "Gatherer" | "Hunter" | "Locksmith" | "ReaperOfSouls" | "Survivor" | "Pitcher" | "Trapsetter" | "TreasureHunter" | "Collector" | "Explorer" | "Grandmaster" | "Prepared" | "Doctor" | "Artificer" | "Returned" | "Navigator" | "DragonSlayer" | "Treasurer" | "Pulchritudinous" | "Friendly" | "Malevolent" | "Benevolent" | "Boundless" | "Talented" | "Weathered" | "Seasoned" | "Pacifier" | "Merchant" | "Notekeeper" | "Operator" | "Huntsman" | "Contender" | "Challenger" | "DestroyerOfMagi" | "Helmsman" | "Multitasker" | "Apocryphal" | "Diverse" | "InternalDiscoveredBoats" | "Traitor" | "MasterOfAll" | "Rouseabout" | "Murderer" | "Retailer" | "Masochist" | "Versatile" | "InternalStatDiscovery" | "Dedicated" | "Hounded" | "Serene" | "InternalRuneOrAltarDiscovery" | "Curator" | "Thaumaturgic" | "InternalDeityDiscovery" | "InternalMerchantsDiscovery" | "InternalCurseSystemDiscovery" | "Invoker" | "InternalDeityInvoked" | "InternalInsulationDiscovery" | "Turbulent" | "Afflicted" | "Exsanguinated" | "InternalItemDiscovered" | "Cursebreaker">, import("../argument/ActionArgumentEnum").default<SkillType, "None" | "Taming" | "Mining" | "Swimming" | "Chemistry" | "Anatomy" | "Marksmanship" | "Blacksmithing" | "Botany" | "Camping" | "Cartography" | "Claythrowing" | "Cooking" | "Fishing" | "Fletching" | "Glassblowing" | "Leatherworking" | "Lockpicking" | "Lumberjacking" | "Mycology" | "Parrying" | "Stonecrafting" | "Tactics" | "Tailoring" | "Throwing" | "Tinkering" | "Trapping" | "Woodworking" | "Horticulture" | "Bartering" | "Seafaring" | "Thaumaturgy" | "DualWielding" | "Theurgy">]], ActionType.SetTitle, import("../../player/Player").default, void, import("@wayward/game/game/entity/action/IAction").IActionUsable, [(TitleType | undefined)?, (Milestone | SkillType | undefined)?]>;
20
20
  export default _default;
@@ -18,7 +18,7 @@ import { TempType } from "@wayward/game/game/temperature/ITemperature";
18
18
  declare const _default: UseInfo<{
19
19
  doodadContainer: import("../../../../doodad/IDoodad").IDoodadDescription | undefined;
20
20
  civilizationScore: number | undefined;
21
- scareRadius: number;
21
+ scareRadius: import("../../../../doodad/IDoodad").IScareRadius | undefined;
22
22
  entityType: import("../../../../entity/IEntity").EntityType.Item;
23
23
  value?: Item | undefined;
24
24
  type: import("../../../../item/IItem").ItemType;
@@ -0,0 +1,24 @@
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 Entity from "@wayward/game/game/entity/Entity";
12
+ import type { EntityType, EntityTypeMap } from "@wayward/game/game/entity/IEntity";
13
+ import type { IEffectRadiusOverlayColor } from "@wayward/game/renderer/overlay/EffectRadiusOverlay";
14
+ import type { DistanceType } from "@wayward/game/utilities/math/Vector2";
15
+ interface IEffectRadius {
16
+ type: DistanceType;
17
+ radius: number;
18
+ overlay?: IEffectRadiusOverlayColor;
19
+ }
20
+ declare namespace EffectRadiusRegistry {
21
+ function registerEntityType<TYPE extends EntityType>(entityType: TYPE, supplier: (entity: EntityTypeMap[TYPE]) => IEffectRadius | undefined): void;
22
+ function get(entity: Entity): IEffectRadius | undefined;
23
+ }
24
+ export default EffectRadiusRegistry;
@@ -381,7 +381,7 @@ export default class Item extends EntityMovable<IItemDescription, ItemType, Refe
381
381
  /**
382
382
  * Decreases the time until the item will decay (ticks until it decays at 1x decay speed).
383
383
  */
384
- reduceDecayTime(time?: number): number | undefined;
384
+ reduceDecayTime(time?: number, skipChance?: boolean): number | undefined;
385
385
  /**
386
386
  * Sets the item's decay time (ticks until it decays at 1x decay speed).
387
387
  * @param decayTime The new decay time to set, or `undefined` to remove the decay time.
@@ -466,11 +466,6 @@ export default class Item extends EntityMovable<IItemDescription, ItemType, Refe
466
466
  * @returns number of score (or 0 if no civilization score is set).
467
467
  */
468
468
  getCivilizationScore(actionType: ActionType.Build | ActionType.SetDown): number;
469
- /**
470
- * Gets the scarecrow radius based on doodad's definition and quality.
471
- * This also exists on doodads.
472
- */
473
- getScareRadius(): number;
474
469
  getVehicle(): IItemVehicle | undefined;
475
470
  addCreature(creature: Creature, remainTamed?: boolean): void;
476
471
  /**
@@ -297,7 +297,7 @@ export default class ItemManager extends EntityManager<Item, IItemRemoveOptions>
297
297
  */
298
298
  getEfficacyTranslation(human: Human, qualityBonus: number, maxQualityBonus: number, recipe: IRecipe, ui?: boolean): TranslationImpl | undefined;
299
299
  updateItems(ticks: number, playerIds: Set<number>, skipHumanItems?: boolean): boolean;
300
- updateItem(ticks: number, item: Item, isInInventory: boolean): boolean;
300
+ updateItem(ticks: number, item: Item, isInInventory?: boolean): boolean;
301
301
  getPlayerWithItemInInventory(containable: IContainable): Player | undefined;
302
302
  getAbsentPlayerWithItemInInventory(containable: IContainable): Player | undefined;
303
303
  getNPCWithItemInInventory(containable: IContainable): NPC | undefined;
@@ -16,28 +16,32 @@ export interface IHasMagic {
16
16
  }
17
17
  export interface IMagicalProperty {
18
18
  value: number;
19
+ curse?: true;
19
20
  }
20
21
  export declare const SYMBOL_MAGIC_SUB_PROPERTY_TYPES: unique symbol;
21
22
  export declare const SYMBOL_MAGIC_SUB_PROPERTY_ENTRIES: unique symbol;
22
23
  export interface IMagicalSubProperty<T extends number> {
23
24
  subPropertyCount: number;
24
- subProperties: Partial<Record<T, number>>;
25
+ subProperties: Partial<Record<T, IMagicalProperty>>;
25
26
  [SYMBOL_MAGIC_SUB_PROPERTY_TYPES]: readonly T[];
26
27
  [SYMBOL_MAGIC_SUB_PROPERTY_ENTRIES]: ReadonlyArray<{
27
28
  type: T;
28
29
  value: number;
30
+ curse?: true;
29
31
  }>;
30
32
  }
31
33
  export type MagicalProperty<T extends MagicalPropertyType> = MagicalPropertyTypeSubTypeMap extends Record<T, any> ? IMagicalSubProperty<MagicalPropertyTypeSubTypeMap[T]> : IMagicalProperty;
32
34
  export interface MagicalNormalPropertyEntry {
33
35
  type: MagicalNormalPropertyTypes;
34
36
  value: number;
37
+ curse?: true;
35
38
  }
36
39
  export type MagicalSubPropertyEntry = {
37
40
  [K in MagicalSubPropertyTypes]: {
38
41
  type: K;
39
42
  subType: MagicalPropertyTypeSubTypeMap[K];
40
43
  value: number;
44
+ curse?: true;
41
45
  };
42
46
  }[MagicalSubPropertyTypes];
43
47
  export type MagicalPropertyEntry = MagicalNormalPropertyEntry | MagicalSubPropertyEntry;
@@ -49,6 +53,7 @@ export interface MagicalPropertyEntryIntersection {
49
53
  type: MagicalPropertyType;
50
54
  subType?: MagicalSubPropertySubTypes;
51
55
  value: number;
56
+ curse?: true;
52
57
  }
53
58
  export type AnyMagicalProperty = Partial<IMagicalProperty> & PartialValues<{
54
59
  [K in MagicalSubPropertyTypes]: IMagicalSubProperty<MagicalPropertyTypeSubTypeMap[K]>;
@@ -100,14 +100,15 @@ export default class MagicalPropertyManager extends EventEmitter.Host<IMagicalPr
100
100
  */
101
101
  get<T extends MagicalSubPropertyTypes>(type: T, subType: MagicalPropertyTypeSubTypeMap[T]): number | undefined;
102
102
  get(...identity: MagicalPropertyIdentity): number | undefined;
103
+ isCurse(...identity: MagicalPropertyIdentity): boolean;
103
104
  /**
104
105
  * Sets a magical property on this object. Replaces any existing magical property of that type
105
106
  */
106
- set<T extends MagicalNormalPropertyTypes>(type: T, value: number): this;
107
+ set<T extends MagicalNormalPropertyTypes>(type: T, value: number, curse?: true): this;
107
108
  /**
108
109
  * Sets a magical sub-property on this object. Replaces any existing magical sub-property of that type
109
110
  */
110
- set<T extends MagicalSubPropertyTypes>(type: T, subType: MagicalPropertyTypeSubTypeMap[T], value: number): this;
111
+ set<T extends MagicalSubPropertyTypes>(type: T, subType: MagicalPropertyTypeSubTypeMap[T], value: number, curse?: true): this;
111
112
  /**
112
113
  * Removes a magical property on this object, if it exists
113
114
  * @returns whether the magical property was removed — ie, if it existed
@@ -154,6 +155,7 @@ export default class MagicalPropertyManager extends EventEmitter.Host<IMagicalPr
154
155
  subProperties<T extends MagicalSubPropertyTypes>(type: T): ReadonlyArray<{
155
156
  type: MagicalPropertyTypeSubTypeMap[T];
156
157
  value: number;
158
+ curse?: true;
157
159
  }>;
158
160
  /**
159
161
  * @returns a list of all the magical properties on this object
@@ -26,6 +26,7 @@ import type TileEvent from "@wayward/game/game/tile/TileEvent";
26
26
  import type { ISerializedTranslation } from "@wayward/game/language/ITranslation";
27
27
  import type { IModdable } from "@wayward/game/mod/ModRegistry";
28
28
  import type { IVector3 } from "@wayward/game/utilities/math/IVector";
29
+ import type { DistanceType } from "@wayward/game/utilities/math/Vector2";
29
30
  import type { IColorFul, IRGB, IRGBA } from "@wayward/utilities/Color";
30
31
  export interface ITerrainDescription extends IModdable {
31
32
  passable?: boolean;
@@ -364,33 +365,13 @@ export declare enum FindPathRangeType {
364
365
  InfiniteRange = 3
365
366
  }
366
367
  export type FindPathRange = FindPathRangeType | IFindPathRange;
367
- export declare enum FindPathDistanceAlgorithm {
368
- /**
369
- * The number of adjacent grid cell movements needed to get from A to B.
370
- *
371
- * This distance formula covers a diamond pattern on a grid.
372
- */
373
- Manhattan = 0,
374
- /**
375
- * The measure of a straight line between points A and B.
376
- *
377
- * This distance formula covers a circular pattern on a grid.
378
- */
379
- Euclidean = 1,
380
- /**
381
- * The greater of the distances from points A and B on each axis.
382
- *
383
- * This distance formula covers a square pattern on a grid.
384
- */
385
- Chebyshev = 2
386
- }
387
368
  export interface IFindPathRange {
388
369
  distance: number;
389
370
  noLoSRequirement?: true;
390
371
  /**
391
- * Defaults to {@link FindPathDistanceAlgorithm.Euclidean}.
372
+ * Defaults to {@link DistanceType.Euclidean}.
392
373
  *
393
374
  * (The measure of a straight line between points A and B, or what would cover a circular pattern on a grid.)
394
375
  */
395
- algorithm?: FindPathDistanceAlgorithm;
376
+ algorithm?: DistanceType;
396
377
  }
@@ -39,6 +39,7 @@ import type { IFieldOfViewOrigin } from "@wayward/game/renderer/fieldOfView/IFie
39
39
  import { CanASeeBType } from "@wayward/game/renderer/fieldOfView/IFieldOfView";
40
40
  import { Direction } from "@wayward/game/utilities/math/Direction";
41
41
  import type { IVector2, IVector3 } from "@wayward/game/utilities/math/IVector";
42
+ import { DistanceType } from "@wayward/game/utilities/math/Vector2";
42
43
  import type { IVector4 } from "@wayward/game/utilities/math/Vector4";
43
44
  import type { IRGB } from "@wayward/utilities/Color";
44
45
  import WorldZ from "@wayward/utilities/game/WorldZ";
@@ -466,8 +467,8 @@ export default class Tile implements IVector4, Partial<ITileContainer>, IFieldOf
466
467
  * - Prefers the facing tile if it has the same penalty as others
467
468
  */
468
469
  getPreferredAdjacentTile(human: Human, clientSide: boolean): Tile | undefined;
469
- tilesInRange(range: number, includeCurrentTile?: boolean): Tile[];
470
- openTileInRange(range: number, includeCurrentTile?: boolean, excludeWater?: boolean): Tile | undefined;
470
+ tilesInRange(type: DistanceType, range: number, includeCurrentTile?: boolean): Tile[];
471
+ openTileInRange(type: DistanceType, range: number, includeCurrentTile?: boolean, excludeWater?: boolean): Tile | undefined;
471
472
  /**
472
473
  * Array version of tilesAround
473
474
  */
@@ -76,7 +76,6 @@ export default class LanguageManager extends EventEmitter.Host<ILanguageEvents>
76
76
  */
77
77
  private loadAdditionalLanguages;
78
78
  shouldUseAlternateFontStyle(): boolean;
79
- refreshUiTranslations(): void;
80
79
  getTranslation(dictionary: Dictionary, entry: number | string, ignoreInvalid?: boolean): string[] | undefined;
81
80
  add(provider: TranslationsProvider): void;
82
81
  remove(provider: TranslationsProvider): void;
@@ -99,7 +98,6 @@ export default class LanguageManager extends EventEmitter.Host<ILanguageEvents>
99
98
  private setDebug;
100
99
  private debugFor;
101
100
  private debugLog;
102
- private refreshUiTranslation;
103
101
  }
104
102
  export interface ITranslationInjection {
105
103
  selector: string;
@@ -0,0 +1,36 @@
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 { IOverlayInfo } from "@wayward/game/game/tile/ITerrain";
12
+ import type Tile from "@wayward/game/game/tile/Tile";
13
+ import UniversalOverlay from "@wayward/game/renderer/overlay/UniversalOverlay";
14
+ import { DistanceType } from "@wayward/game/utilities/math/Vector2";
15
+ import type { IColorFul } from "@wayward/utilities/Color";
16
+ export interface IEffectRadiusOverlayColor extends Partial<IColorFul> {
17
+ alpha?: number;
18
+ }
19
+ export declare namespace IEffectRadiusOverlayColor {
20
+ function equals(a: IEffectRadiusOverlayColor | undefined, b: IEffectRadiusOverlayColor | undefined): boolean;
21
+ }
22
+ export default class EffectRadiusOverlay extends UniversalOverlay {
23
+ static readonly INSTANCE: EffectRadiusOverlay;
24
+ private readonly tilesInRange;
25
+ private readonly topLeft;
26
+ private readonly bottomRight;
27
+ type: DistanceType;
28
+ center: Tile | undefined;
29
+ range: number;
30
+ color?: IEffectRadiusOverlayColor;
31
+ constructor();
32
+ set(type: DistanceType, center: Tile, range: number, color?: IEffectRadiusOverlayColor): void;
33
+ unset(center: Tile): void;
34
+ protected generateOverlayInfo(tile: Tile, existingOverlay: IOverlayInfo | undefined): IOverlayInfo | undefined;
35
+ protected onGameReset(): void;
36
+ }
@@ -28,6 +28,7 @@ import type Tile from "@wayward/game/game/tile/Tile";
28
28
  import type { ITileData } from "@wayward/game/game/tile/ITerrain";
29
29
  import type Human from "@wayward/game/game/entity/Human";
30
30
  import type Entity from "@wayward/game/game/entity/Entity";
31
+ import type MagicalPropertyManager from "@wayward/game/game/magic/MagicalPropertyManager";
31
32
  export interface IUpgradeVersion {
32
33
  name?: string;
33
34
  buildId?: IBuildId;
@@ -49,6 +50,7 @@ export interface IUpgradeVersion {
49
50
  upgradeTileEvent?(version: Version.Info, upgrades: UpgradesArrayCompressedPusher, tileEvent: TileEvent): any;
50
51
  upgradeCorpse?(version: Version.Info, upgrades: UpgradesArrayCompressedPusher, corpse: Corpse): any;
51
52
  upgradeAi?(version: Version.Info, upgrades: UpgradesArrayCompressedPusher, ai: AiManager): any;
53
+ upgradeMagic?(version: Version.Info, upgrades: UpgradesArrayCompressedPusher, magic?: MagicalPropertyManager): any;
52
54
  upgradeCreatureZone?(version: Version.Info, upgrades: UpgradesArrayCompressedPusher, zone: CreatureZone): any;
53
55
  upgradeTile?(version: Version.Info, upgrades: UpgradesArrayCompressedPusher, tile: Tile): any;
54
56
  upgradeTileData?(version: Version.Info, upgrades: UpgradesArrayCompressedPusher, tile: Tile, tileData: ITileData[]): any;
@@ -0,0 +1,12 @@
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
+ declare const _default: import("@wayward/game/save/upgrade/UpgradeVersion").IUpgradeVersionDefinition<unknown>;
12
+ export default _default;
@@ -36,4 +36,6 @@ export default class OldUi {
36
36
  logErrorEvent(eventOrError: unknown, skipLog?: true): void;
37
37
  private loggingRejection;
38
38
  private logPromiseRejectionEvent;
39
+ refreshUiTranslations(): void;
40
+ private refreshUiTranslation;
39
41
  }
@@ -14,6 +14,26 @@ import { Direction } from "@wayward/game/utilities/math/Direction";
14
14
  import type { IVector2, IVector3 } from "@wayward/game/utilities/math/IVector";
15
15
  import Vector3 from "@wayward/game/utilities/math/Vector3";
16
16
  type ConsumerVectorRange = (vec: IVector2, value: number) => any;
17
+ export declare enum DistanceType {
18
+ /**
19
+ * The number of adjacent grid cell movements needed to get from A to B.
20
+ *
21
+ * This distance formula covers a diamond pattern on a grid.
22
+ */
23
+ Manhattan = 0,
24
+ /**
25
+ * The measure of a straight line between points A and B.
26
+ *
27
+ * This distance formula covers a circular pattern on a grid.
28
+ */
29
+ Euclidean = 1,
30
+ /**
31
+ * The greater of the distances from points A and B on each axis.
32
+ *
33
+ * This distance formula covers a square pattern on a grid.
34
+ */
35
+ Chebyshev = 2
36
+ }
17
37
  export default class Vector2 implements IVector2, ISerializable {
18
38
  static get ZERO(): Vector2;
19
39
  static get ONE(): Vector2;
@@ -45,12 +65,12 @@ export default class Vector2 implements IVector2, ISerializable {
45
65
  clientX?: number;
46
66
  clientY?: number;
47
67
  }): Vector2 | undefined;
48
- static inRange(center: IVector2, range: number, includeCenter?: boolean): Generator<IVector2>;
68
+ static inRange(type: DistanceType, center: IVector2, range: number, includeCenter?: boolean): Generator<IVector2>;
49
69
  static angle(directionInRadians: number, distance?: number): Vector2;
50
- static forRange(center: IVector2, range: number, consumer: ConsumerVectorRange): void;
51
- static forRange(center: IVector2, range: number, includeCenter: boolean, consumer: ConsumerVectorRange): void;
52
- static forRange(center: IVector2, range: number, min: IVector2, max: IVector2, consumer: ConsumerVectorRange): void;
53
- static forRange(center: IVector2, range: number, min: IVector2, max: IVector2, includeCenter: boolean, consumer: ConsumerVectorRange): void;
70
+ static forRange(type: DistanceType, center: IVector2, range: number, consumer: ConsumerVectorRange): void;
71
+ static forRange(type: DistanceType, center: IVector2, range: number, includeCenter: boolean, consumer: ConsumerVectorRange): void;
72
+ static forRange(type: DistanceType, center: IVector2, range: number, min: IVector2, max: IVector2, consumer: ConsumerVectorRange): void;
73
+ static forRange(type: DistanceType, center: IVector2, range: number, min: IVector2, max: IVector2, includeCenter: boolean, consumer: ConsumerVectorRange): void;
54
74
  static raycast(center: IVector2, range: number, angle: IVector2): IVector2[];
55
75
  static raycastArc(center: IVector2, radius: number, angleStart: IVector2 | number, angleEnd: IVector2 | number): IVector2[];
56
76
  static cross(vector: IVector2, vector2: IVector2): Vector3;
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.0-beta.dev.20251010.1",
4
+ "version": "2.15.0-beta.dev.20251012.1",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",