@wayward/types 2.15.0-beta.dev.20251005.1 → 2.15.0-beta.dev.20251007.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 (31) hide show
  1. package/definitions/game/game/ILoot.d.ts +3 -1
  2. package/definitions/game/game/curse/Curse.d.ts +13 -8
  3. package/definitions/game/game/curse/CurseEvent.d.ts +38 -5
  4. package/definitions/game/game/curse/ICurse.d.ts +8 -0
  5. package/definitions/game/game/curse/event/CurseEventCraftingInspiration.d.ts +13 -0
  6. package/definitions/game/game/curse/event/CurseEventLucky.d.ts +13 -0
  7. package/definitions/game/game/curse/event/CurseEventShadows.d.ts +13 -0
  8. package/definitions/game/game/curse/event/CurseEventUnlucky.d.ts +13 -0
  9. package/definitions/game/game/doodad/IDoodad.d.ts +5 -0
  10. package/definitions/game/game/entity/Human.d.ts +1 -0
  11. package/definitions/game/game/entity/action/actions/Invoke.d.ts +4 -0
  12. package/definitions/game/game/entity/action/actions/SetTitle.d.ts +1 -1
  13. package/definitions/game/game/entity/status/IStatus.d.ts +13 -2
  14. package/definitions/game/game/entity/status/IStatusContext.d.ts +1 -1
  15. package/definitions/game/game/entity/status/Status.d.ts +1 -1
  16. package/definitions/game/game/item/Items.d.ts +9 -1
  17. package/definitions/game/game/milestones/IMilestone.d.ts +3 -1
  18. package/definitions/game/game/milestones/MilestoneDefinition.d.ts +4 -3
  19. package/definitions/game/game/options/IGameOptions.d.ts +10 -0
  20. package/definitions/game/game/options/modifiers/milestone/IMilestoneModifier.d.ts +2 -1
  21. package/definitions/game/game/options/modifiers/milestone/MilestoneModifiersManager.d.ts +4 -0
  22. package/definitions/game/game/options/modifiers/milestone/modifiers/Cursebreaker.d.ts +17 -0
  23. package/definitions/game/game/options/modifiers/milestone/modifiers/Cursed.d.ts +17 -0
  24. package/definitions/game/language/dictionary/Message.d.ts +796 -795
  25. package/definitions/game/language/dictionary/UiTranslation.d.ts +692 -691
  26. package/definitions/game/renderer/RenderersNotifiers.d.ts +1 -1
  27. package/definitions/game/renderer/notifier/INotifier.d.ts +2 -2
  28. package/definitions/game/renderer/notifier/Notifier.d.ts +1 -1
  29. package/definitions/utilities/math/Range.d.ts +8 -0
  30. package/definitions/utilities/random/Random.d.ts +8 -1
  31. package/package.json +1 -1
@@ -23,7 +23,7 @@ export declare class RenderersNotifiers {
23
23
  addNotifierIcon(location: INotificationLocation, type: NotifierIconType): void;
24
24
  addStat(location: INotificationLocation, type: StatNotificationType, value: number): void;
25
25
  addStatus(location: INotificationLocation, status: Status, reason: StatusChangeReason): void;
26
- addItem(location: INotificationLocation, itemNotifierType: ItemNotifierType, type: DisplayableItemType): void;
26
+ addItem(location: INotificationLocation, itemNotifierType: ItemNotifierType, type: DisplayableItemType, baseType?: DisplayableItemType): void;
27
27
  addCreature(location: INotificationLocation, creatureNotifierType: CreatureNotifierType, type: CreatureType, aberrant?: boolean): void;
28
28
  addMarker(location: INotificationLocation, marker: MarkerDescription): void;
29
29
  removeMarker(location: INotificationLocation, guid: string): void;
@@ -51,8 +51,8 @@ export declare enum NotifierIconType {
51
51
  Untame = 1,
52
52
  Water = 2,
53
53
  ItemWarning = 3,
54
- Warning = 4,
55
- Decay = 5,
54
+ DoodadWarning = 4,
55
+ ItemDecay = 5,
56
56
  Talk = 6,
57
57
  DualWieldEnabled = 7,
58
58
  DualWieldDisabled = 8
@@ -32,7 +32,7 @@ export declare class Notifier {
32
32
  setResources(resourceContainer: IResourceContainer): void;
33
33
  clear(): void;
34
34
  delete(): void;
35
- addItem(location: INotificationLocation, itemNotifierType: ItemNotifierType, type: DisplayableItemType): void;
35
+ addItem(location: INotificationLocation, itemNotifierType: ItemNotifierType, type: DisplayableItemType, baseType?: DisplayableItemType): void;
36
36
  addCreature(location: INotificationLocation, creatureNotifierType: CreatureNotifierType, type: CreatureType, aberrant?: boolean): void;
37
37
  addStat(location: INotificationLocation, type: StatNotificationType, value: number): void;
38
38
  addStatus(location: INotificationLocation, status: Status, reason: StatusChangeReason): void;
@@ -42,3 +42,11 @@ export declare namespace IRange {
42
42
  function mult(a: number | IRange, b: number | IRange): number | IRange;
43
43
  }
44
44
  }
45
+ export interface IRangeRange {
46
+ minimum: IRange;
47
+ maximum: IRange;
48
+ }
49
+ export declare namespace IRangeRange {
50
+ function lerp(t: number, range: IRangeRange): IRange;
51
+ }
52
+ export declare function rangeRange(minimum: IRange, maximum: IRange): IRangeRange;
@@ -76,7 +76,7 @@ export declare class Random<G extends IRandomGenerator = IRandomGenerator> {
76
76
  * @param arr The array to return items from
77
77
  * @param count The number of items to return in the array
78
78
  *
79
- * Note: Be careful. This method can be very slow if used on a big array with a high count.
79
+ * Using a count >= arr.length will return a shuffled array of all choices.
80
80
  */
81
81
  sampling<T = any>(arr: T[], count: number): T[];
82
82
  /**
@@ -92,6 +92,13 @@ export declare class Random<G extends IRandomGenerator = IRandomGenerator> {
92
92
  * Returns a random T from the given choices, where each choice is weighted by a number. Higher numbers = higher chance.
93
93
  */
94
94
  weightedChoice<T>(choices: Array<WeightedOption<T>>): T;
95
+ /**
96
+ * Returns a sampling of random T's from the given choices, where each choice is weighted by a number. Higher numbers = higher chance.
97
+ *
98
+ * Using a count >= choices.length will return a shuffled array of all choices.
99
+ */
100
+ weightedSampling<T>(choices: Array<WeightedOption<T>>, count: number): T[];
101
+ private getWeightedChoiceTuple;
95
102
  withGenerator<T>(generator: G, execute: () => T): T;
96
103
  clone<T>(requiresSynchronization?: RandomSychronizationCheck<T>, initialState?: T): Random<G>;
97
104
  /**
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.20251005.1",
4
+ "version": "2.15.0-beta.dev.20251007.1",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",