@wayward/types 2.15.1-beta.dev.20251026.1 → 2.15.1-beta.dev.20251027.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.
@@ -18,6 +18,7 @@ import type { IVector2 } from "@wayward/game/utilities/math/IVector";
18
18
  import { IRange, IRangeRange } from "@wayward/utilities/math/Range";
19
19
  import type { WeightedOption } from "@wayward/utilities/random/IRandom";
20
20
  import DataComponent from "@wayward/game/game/entity/data/DataComponent";
21
+ import type Creature from "@wayward/game/game/entity/creature/Creature";
21
22
  import { ReferenceType } from "@wayward/game/game/reference/IReferenceManager";
22
23
  export declare const CURSE_CAP = 10000;
23
24
  export declare const CURSE_COMPONENT_ATTACK_CAP = 50;
@@ -102,6 +103,7 @@ export declare const CURSE_EVENTS_RUNE_CHANCE_MULTIPLIER_LUCKY: IRange<number>;
102
103
  */
103
104
  export declare const CURSE_EVENTS_RUNES_KILL_TAME: Array<WeightedOption<IRange>>;
104
105
  export declare const CURSE_EVENTS_RUNES_SURVIVED: IRange<number>;
106
+ export declare const CURSE_EVENTS_CREATURE_WANDER_CURSEBEARER_PRIORITY: IRange<number>;
105
107
  declare namespace Curse {
106
108
  interface Helper {
107
109
  context: CurseEventContext;
@@ -112,6 +114,7 @@ declare namespace Curse {
112
114
  function all(island: Island): CurseEventContext[];
113
115
  function isMysteryForClient(event: CurseEventInstance): boolean;
114
116
  function isMysteryForHuman(event: CurseEventInstance, human: Human): boolean;
117
+ function getOwnerEvent(island: Island, creature: Creature): CurseEventInstance | undefined;
115
118
  function willHaveEventsTonight(island: Island): boolean;
116
119
  function canWarnAboutIncomingEvents(island: Island): boolean;
117
120
  function getCooldownMultiplier(island: Island, humans?: Human<unknown, number, ReferenceType.NPC | ReferenceType.Player, unknown>[]): number;
@@ -126,6 +129,7 @@ declare namespace Curse {
126
129
  function unload(island: Island): void;
127
130
  function cleanup(island: Island, humans?: Human[], isMorning?: boolean): void;
128
131
  function cleanupEphemerals(island: Island): void;
132
+ function getCursebearer(island: Island, event: CurseEventInstance): Human | undefined;
129
133
  function createCurseEventContext(instance: CurseEventInstance, island: Island): CurseEventContext;
130
134
  }
131
135
  declare const SYMBOL_CURSE_EVENT_SUBSCRIBER_INSTANCES: unique symbol;
@@ -25,6 +25,7 @@ import type { Direction } from "@wayward/game/utilities/math/Direction";
25
25
  import type { IVector2, IVector3 } from "@wayward/game/utilities/math/IVector";
26
26
  import Vector2 from "@wayward/game/utilities/math/Vector2";
27
27
  import type { IEventEmitter } from "@wayward/utilities/event/EventEmitter";
28
+ import type { IRange } from "@wayward/utilities/math/Range";
28
29
  export interface IEntityMovableEvents extends IEntityEvents {
29
30
  /**
30
31
  * Called before moving.
@@ -183,4 +184,5 @@ export default abstract class EntityMovable<DescriptionType = unknown, TypeType
183
184
  getWanderNewDirectionChance?(defaultChance: number): number | undefined;
184
185
  getWanderHomePoint?(): IVector2 | undefined;
185
186
  getWanderHomeRadius?(): number | undefined;
187
+ getWanderHomePriority?(): IRange | undefined;
186
188
  }
@@ -42,6 +42,7 @@ import { Direction } from "@wayward/game/utilities/math/Direction";
42
42
  import type { IVector2, IVector3 } from "@wayward/game/utilities/math/IVector";
43
43
  import Vector2 from "@wayward/game/utilities/math/Vector2";
44
44
  import type { IEventEmitter } from "@wayward/utilities/event/EventEmitter";
45
+ import { IRange } from "@wayward/utilities/math/Range";
45
46
  export default class Creature extends EntityWithStats<ICreatureDescription, CreatureType, ReferenceType.Creature, CreatureTag> implements IUnserializedCallback, IObject<CreatureType> {
46
47
  static is(value: any): value is Creature;
47
48
  get entityType(): EntityType.Creature;
@@ -235,6 +236,7 @@ export default class Creature extends EntityWithStats<ICreatureDescription, Crea
235
236
  getWanderNewDirectionChance(defaultChance: number): number | undefined;
236
237
  getWanderHomePoint(): IVector2 | undefined;
237
238
  getWanderHomeRadius(): number | undefined;
239
+ getWanderHomePriority(): IRange | undefined;
238
240
  get asCorpse(): undefined;
239
241
  get asCreature(): Creature;
240
242
  get asDoodad(): undefined;
@@ -108,7 +108,8 @@ export declare enum CreatureTypeGroup {
108
108
  export declare enum CreatureTag {
109
109
  None = 0,
110
110
  NoAlertIndicator = 1,
111
- NoRandomDespawn = 2
111
+ NoRandomDespawn = 2,
112
+ MoveWhenOutsideHumanBounds = 3
112
113
  }
113
114
  export interface ICreatureOld extends Creature {
114
115
  hp: number;
@@ -11,7 +11,7 @@
11
11
  import type Deity from "@wayward/game/game/deity/Deity";
12
12
  import type { DamageType } from "@wayward/game/game/entity/IEntity";
13
13
  import type { SkillType } from "../entity/skill/ISkills";
14
- import type { Stat } from "@wayward/game/game/entity/IStats";
14
+ import { Stat } from "@wayward/game/game/entity/IStats";
15
15
  export declare const MAGICAL_PROPERTY_GLOWING_LIGHT_BONUS = 5;
16
16
  declare enum MagicalPropertyType {
17
17
  /** Increases attack value (for weapons and ammo) */
@@ -86,11 +86,24 @@ declare enum MagicalPropertyType {
86
86
  Perpetuity_DecayLossChance = 31
87
87
  }
88
88
  export default MagicalPropertyType;
89
+ export declare enum MagicalPropertyStat {
90
+ Health = -10,
91
+ Stamina = -9,
92
+ Metabolism = -8
93
+ }
94
+ export declare const magicalPropertyStatMap: {
95
+ [-8]: Stat.Metabolism;
96
+ [-10]: Stat.Health;
97
+ [-9]: Stat.Stamina;
98
+ 0: MagicalPropertyStat.Health;
99
+ 1: MagicalPropertyStat.Stamina;
100
+ 5: MagicalPropertyStat.Metabolism;
101
+ };
89
102
  export interface MagicalPropertyTypeSubTypeMap {
90
- [MagicalPropertyType.Stat]: Stat;
103
+ [MagicalPropertyType.Stat]: MagicalPropertyStat;
91
104
  [MagicalPropertyType.Skill]: SkillType;
92
105
  [MagicalPropertyType.Fanaticism_Deity]: Deity;
93
106
  [MagicalPropertyType.Encircling_DoodadSkill]: SkillType;
94
107
  [MagicalPropertyType.ElementalDamage]: DamageType;
95
- [MagicalPropertyType.StatPotency_EquipmentImproveConsumableStats]: Stat;
108
+ [MagicalPropertyType.StatPotency_EquipmentImproveConsumableStats]: MagicalPropertyStat;
96
109
  }
@@ -69,3 +69,4 @@ export interface IUpgradeVersionDefinitionWithData<T = any> extends IUpgradeVers
69
69
  }
70
70
  export default function <T>(definition: IUpgradeVersionDefinitionWithData<T>): IUpgradeVersionDefinitionWithData<T>;
71
71
  export default function <T>(definition: IUpgradeVersionDefinition<T>): IUpgradeVersionDefinition<T>;
72
+ export declare function UpgradeVersionMinorRegistry(registry: Record<string, IUpgradeVersionDefinition>): Record<string, IUpgradeVersion>;
@@ -8,7 +8,7 @@
8
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
9
  * https://github.com/WaywardGame/types/wiki
10
10
  */
11
- import type { IUpgradeVersion, UpgradeParameters, UpgradeType } from "@wayward/game/save/upgrade/UpgradeVersion";
11
+ import { type IUpgradeVersion, type UpgradeParameters, type UpgradeType } from "@wayward/game/save/upgrade/UpgradeVersion";
12
12
  import type UpgradesArray from "@wayward/game/save/upgrade/UpgradesArray";
13
13
  import type Version from "@wayward/utilities/Version";
14
14
  import type { IBuildId } from "@wayward/hosts/shared/globalTypes";
@@ -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: Record<string, import("@wayward/game/save/upgrade/UpgradeVersion").IUpgradeVersion>;
12
+ export default _default;
@@ -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: Record<string, import("@wayward/game/save/upgrade/UpgradeVersion").IUpgradeVersion>;
12
+ export default _default;
@@ -0,0 +1,38 @@
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
+ export declare enum StatNew {
12
+ Health = 0,
13
+ Stamina = 1,
14
+ Hunger = 2,
15
+ Thirst = 3,
16
+ Weight = 4,
17
+ Metabolism = 5,
18
+ Strength = 6,
19
+ Dexterity = 7,
20
+ Attack = 8,
21
+ Defense = 9,
22
+ InsulationHeat = 10,
23
+ InsulationCold = 11,
24
+ Luck = 12,
25
+ Curse = 13,
26
+ AttackDefenseRow = 14,
27
+ Generic = 15,
28
+ Temperature = 16,
29
+ Produce = 17,
30
+ Happiness = 18,
31
+ Tamed = 19,
32
+ Petting = 20,
33
+ Waste = 21,
34
+ Petted = 22,
35
+ DespawnProtection = 23
36
+ }
37
+ declare const _default: import("@wayward/game/save/upgrade/UpgradeVersion").IUpgradeVersionDefinition<unknown>;
38
+ export default _default;
@@ -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: Record<string, import("@wayward/game/save/upgrade/UpgradeVersion").IUpgradeVersion>;
12
+ export default _default;
@@ -28,6 +28,7 @@ declare namespace Errors {
28
28
  * Returns the filename of the caller of the current function.
29
29
  */
30
30
  function callerFileBasename(skip?: number): string;
31
+ function anonymisePaths(stack: string, to?: string): string;
31
32
  }
32
33
  export default Errors;
33
34
  export declare function ensureExhaustive(value: never): never;
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.1-beta.dev.20251026.1",
4
+ "version": "2.15.1-beta.dev.20251027.1",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",