@wayward/types 2.14.3-beta.dev.20241226.1 → 2.14.4-beta.dev.20241228.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 (26) hide show
  1. package/definitions/game/game/IGame.d.ts +2 -1
  2. package/definitions/game/game/entity/action/usable/IUsableAction.d.ts +17 -1
  3. package/definitions/game/game/item/Item.d.ts +0 -1
  4. package/definitions/game/game/magic/MagicalPropertyManager.d.ts +2 -2
  5. package/definitions/game/game/magic/MagicalPropertyType.d.ts +2 -2
  6. package/definitions/game/game/meta/SaveLoad.d.ts +1 -1
  7. package/definitions/game/language/Dictionary.d.ts +59 -58
  8. package/definitions/game/language/DictionaryMap.d.ts +116 -114
  9. package/definitions/game/language/ITranslation.d.ts +2 -0
  10. package/definitions/game/language/MagicAffix.d.ts +17 -0
  11. package/definitions/game/language/dictionary/Misc.d.ts +4 -0
  12. package/definitions/game/language/english/item/MagicalPropertyAffixes.d.ts +13 -0
  13. package/definitions/game/language/impl/TranslationImpl.d.ts +8 -2
  14. package/definitions/game/resource/IResourceLoader.d.ts +18 -18
  15. package/definitions/game/save/upgrade/UpgradeVersionRegistry.d.ts +1 -0
  16. package/definitions/game/steamworks/Steamworks.d.ts +2 -1
  17. package/definitions/game/ui/screen/screens/game/component/container/ContainerBucketItemList.d.ts +1 -0
  18. package/definitions/game/utilities/dev/Debug.d.ts +4 -0
  19. package/definitions/game/utilities/memory/MemoryLeakDetector.d.ts +1 -1
  20. package/definitions/hosts/shared/globals.d.ts +2 -2
  21. package/definitions/utilities/Functions.d.ts +1 -1
  22. package/definitions/utilities/Log.d.ts +4 -0
  23. package/definitions/utilities/dev/DebugShared.d.ts +23 -0
  24. package/definitions/utilities/prototype/Define.d.ts +2 -0
  25. package/definitions/utilities/random/SeededGenerator.d.ts +1 -1
  26. package/package.json +1 -1
@@ -217,7 +217,8 @@ export declare enum SaveType {
217
217
  Quit = 2,
218
218
  BackToMainMenu = 3,
219
219
  Multiplayer = 4,
220
- ReplayConvert = 5
220
+ ReplayConvert = 5,
221
+ AutoSave = 6
221
222
  }
222
223
  export declare enum TileUpdateType {
223
224
  Batch = 0,
@@ -57,6 +57,7 @@ export interface IUsableActionItemRequirement extends Omit<IUsableActionRequirem
57
57
  finder?: false | ((player: Player, defaultOptions?: IItemFinderOptions, provided?: Omit<IUsableActionPossibleUsing, "item">) => ItemFinder | undefined);
58
58
  requiresQuality?: true;
59
59
  requiresType?: true;
60
+ cannotDamageItem?: true;
60
61
  }
61
62
  export declare namespace IUsableActionItemRequirement {
62
63
  function hasFinder(requirements?: IUsableActionRequirements): boolean;
@@ -107,6 +108,8 @@ export interface IUsableActionUsing<REQUIREMENTS extends IUsableActionRequiremen
107
108
  targetTile: Tile;
108
109
  fromTile: Tile;
109
110
  item: ((REQUIREMENTS["item"] extends true ? Item : never) | (undefined extends REQUIREMENTS["item"] ? undefined : never) | (REQUIREMENTS["item"] extends {
111
+ cannotDamageItem: true;
112
+ } ? Item : never) | (REQUIREMENTS["item"] extends {
110
113
  allowNone: true;
111
114
  } ? Item | undefined : never) | (REQUIREMENTS["item"] extends {
112
115
  validate(player: Player, value: Item): boolean;
@@ -117,7 +120,9 @@ export interface IUsableActionUsing<REQUIREMENTS extends IUsableActionRequiremen
117
120
  } ? Item : never) | (REQUIREMENTS["item"] extends {
118
121
  allowOnlyItemType(player: Player, type: ItemType): boolean;
119
122
  } ? undefined : never));
120
- itemType: ((REQUIREMENTS["item"] extends true ? ItemType : never) | (undefined extends REQUIREMENTS["item"] ? undefined : never) | (REQUIREMENTS["item"] extends {
123
+ itemType: ((REQUIREMENTS["item"] extends true ? ItemType : never) | (REQUIREMENTS["item"] extends {
124
+ cannotDamageItem: true;
125
+ } ? ItemType : never) | (undefined extends REQUIREMENTS["item"] ? undefined : never) | (REQUIREMENTS["item"] extends {
121
126
  allowOnlyItemType(player: Player, type: ItemType): boolean;
122
127
  } ? ItemType : never) | (REQUIREMENTS["item"] extends {
123
128
  requiresType: true;
@@ -132,6 +137,17 @@ export interface IUsableActionUsing<REQUIREMENTS extends IUsableActionRequiremen
132
137
  } ? REQUIREMENTS["item"] extends {
133
138
  requiresType: true;
134
139
  } ? never : undefined : never));
140
+ container?: ((REQUIREMENTS["item"] extends true ? IContainer : never) | (REQUIREMENTS["item"] extends {
141
+ allowOnlyItemType(player: Player, type: ItemType): boolean;
142
+ } ? IContainer : never) | (REQUIREMENTS["item"] extends {
143
+ requiresType: true;
144
+ } ? IContainer : ((REQUIREMENTS["item"] extends {
145
+ validate(player: Player, value: Item): boolean;
146
+ } ? IContainer : never) | (REQUIREMENTS["item"] extends {
147
+ validateType(player: Player, value: ItemType, description?: IItemDescription): boolean;
148
+ } ? IContainer : never))) | (REQUIREMENTS["item"] extends {
149
+ finder: ItemFinder;
150
+ } ? IContainer : never));
135
151
  itemQuality: ((REQUIREMENTS["item"] extends true ? ArrayOr<Quality> : never) | (undefined extends REQUIREMENTS["item"] ? undefined : never) | (REQUIREMENTS["item"] extends {
136
152
  allowNone: true;
137
153
  } ? undefined : never) | (REQUIREMENTS["item"] extends {
@@ -200,7 +200,6 @@ export default class Item extends EntityMovable<IItemDescription, ItemType, Refe
200
200
  */
201
201
  getName(article?: Article, options?: Partial<IItemGetNameOptions>): TranslationImpl;
202
202
  protected get debug(): any;
203
- private getDebug;
204
203
  protected get typeEnum(): typeof ItemType;
205
204
  protected getDescription(): IItemDescription | undefined;
206
205
  get isTransient(): boolean;
@@ -225,11 +225,11 @@ export default class MagicalPropertyManager extends EventEmitter.Host<IMagicalPr
225
225
  /**
226
226
  * @returns a list of all the magical properties on this object
227
227
  */
228
- all(): MagicalPropertyEntry[];
228
+ all(): readonly MagicalPropertyEntry[];
229
229
  /**
230
230
  * @returns a list of all the magical properties on this object,
231
231
  */
232
- all(intersectionType: true): MagicalPropertyEntryIntersection[];
232
+ all(intersectionType: true): readonly MagicalPropertyEntryIntersection[];
233
233
  /**
234
234
  * Translates a list of the magical properties on this object, including sub-properties
235
235
  * @param ender The way to end this list translation, ie and/or
@@ -25,7 +25,7 @@ declare enum MagicalPropertyType {
25
25
  Illumination_LightItemLightBonus = 2,
26
26
  /** Increases the amount of weight/items that can be contained */
27
27
  Magnitude_WeightCapacity = 3,
28
- /** Decreases item weight to a minimum of 0.1 */
28
+ /** Decreases item weight (minimum weight is 0.1) */
29
29
  Featherweight = 4,
30
30
  /** Increases a stat when equipped */
31
31
  Stat = 5,
@@ -38,7 +38,7 @@ declare enum MagicalPropertyType {
38
38
  Range = 9,
39
39
  /** Increases the stats normally gained when consuming/using an item */
40
40
  Potency_ImproveConsumableStats = 10,
41
- /** Increases the merchant sell value on an item */
41
+ /** Increases the credit awarded by merchants when selling this item */
42
42
  Worth = 11,
43
43
  /** Increases a trap's damage */
44
44
  Ensnaring_TrapDamage = 12,
@@ -22,7 +22,7 @@ export declare class SaveLoad {
22
22
  * Saves the game (asynchronously)
23
23
  * Keep in sync with saveGameSynchronous
24
24
  */
25
- save(saveType: SaveType, load?: Load): Promise<ISaveInfo | undefined>;
25
+ save(saveType: SaveType, load?: Load, disableSave?: true): Promise<ISaveInfo | undefined>;
26
26
  /**
27
27
  * Saves the game (synchronously)
28
28
  * Keep in sync with saveGame
@@ -81,63 +81,64 @@ declare enum Dictionary {
81
81
  LighthouseName = 69,
82
82
  Loading = 70,
83
83
  Macro = 71,
84
- MagicalPropertyType = 72,
85
- MapQuality = 73,
86
- MenuBarButton = 74,
87
- Message = 75,
88
- MessagesDefaultFilter = 76,
89
- MessagesTimestampMode = 77,
90
- Milestone = 78,
91
- MilestoneModifierGroup = 79,
92
- MilestoneSort = 80,
93
- Misc = 81,
94
- ModLoadError = 82,
95
- ModLoadFailureReason = 83,
96
- ModProvide = 84,
97
- ModSort = 85,
98
- ModType = 86,
99
- MultiplayerCompatibility = 87,
100
- MultiplayerDisconnectReason = 88,
101
- MusicPlaylist = 89,
102
- Note = 90,
103
- Npc = 91,
104
- Number = 92,
105
- PartOfDay = 93,
106
- Prompt = 94,
107
- QuadrantComponent = 95,
108
- QuadrantComponentContextMenuAction = 96,
109
- Quality = 97,
110
- Quest = 98,
111
- QuestRequirement = 99,
112
- RecipeLevel = 100,
113
- Region = 101,
114
- Riddle = 102,
115
- RunekeeperDomain = 103,
116
- RunekeeperDomainEvent = 104,
117
- SaveImportErrorReason = 105,
118
- SaveSlotSort = 106,
119
- Skill = 107,
120
- SkillsSort = 108,
121
- Source = 109,
122
- Stat = 110,
123
- Status = 111,
124
- StatusEffect = 112,
125
- StatusThreatLevel = 113,
126
- SteamInputKeyboardPosition = 114,
127
- TeamMemberResponsibility = 115,
128
- TemperatureType = 116,
129
- Term = 117,
130
- Terrain = 118,
131
- ThirstLevel = 119,
132
- TileEvent = 120,
133
- TooltipVisibilityOption = 121,
134
- Ui = 122,
135
- UiQuadrant = 123,
136
- UnableToJoinReason = 124,
137
- UnlockedRecipesStrategy = 125,
138
- UsableActionType = 126,
139
- Website = 127,
140
- WeightStatus = 128,
141
- WorldLayer = 129
84
+ MagicalPropertyAffix = 72,
85
+ MagicalPropertyType = 73,
86
+ MapQuality = 74,
87
+ MenuBarButton = 75,
88
+ Message = 76,
89
+ MessagesDefaultFilter = 77,
90
+ MessagesTimestampMode = 78,
91
+ Milestone = 79,
92
+ MilestoneModifierGroup = 80,
93
+ MilestoneSort = 81,
94
+ Misc = 82,
95
+ ModLoadError = 83,
96
+ ModLoadFailureReason = 84,
97
+ ModProvide = 85,
98
+ ModSort = 86,
99
+ ModType = 87,
100
+ MultiplayerCompatibility = 88,
101
+ MultiplayerDisconnectReason = 89,
102
+ MusicPlaylist = 90,
103
+ Note = 91,
104
+ Npc = 92,
105
+ Number = 93,
106
+ PartOfDay = 94,
107
+ Prompt = 95,
108
+ QuadrantComponent = 96,
109
+ QuadrantComponentContextMenuAction = 97,
110
+ Quality = 98,
111
+ Quest = 99,
112
+ QuestRequirement = 100,
113
+ RecipeLevel = 101,
114
+ Region = 102,
115
+ Riddle = 103,
116
+ RunekeeperDomain = 104,
117
+ RunekeeperDomainEvent = 105,
118
+ SaveImportErrorReason = 106,
119
+ SaveSlotSort = 107,
120
+ Skill = 108,
121
+ SkillsSort = 109,
122
+ Source = 110,
123
+ Stat = 111,
124
+ Status = 112,
125
+ StatusEffect = 113,
126
+ StatusThreatLevel = 114,
127
+ SteamInputKeyboardPosition = 115,
128
+ TeamMemberResponsibility = 116,
129
+ TemperatureType = 117,
130
+ Term = 118,
131
+ Terrain = 119,
132
+ ThirstLevel = 120,
133
+ TileEvent = 121,
134
+ TooltipVisibilityOption = 122,
135
+ Ui = 123,
136
+ UiQuadrant = 124,
137
+ UnableToJoinReason = 125,
138
+ UnlockedRecipesStrategy = 126,
139
+ UsableActionType = 127,
140
+ Website = 128,
141
+ WeightStatus = 129,
142
+ WorldLayer = 130
142
143
  }
143
144
  export default Dictionary;
@@ -1830,63 +1830,64 @@ declare const dictionaryMap: {
1830
1830
  70: typeof Load;
1831
1831
  71: symbol;
1832
1832
  72: typeof MagicalPropertyType;
1833
- 73: typeof MapQuality;
1834
- 74: typeof MenuBarButtonType;
1835
- 75: typeof Message;
1836
- 76: typeof MessageFilterDefault;
1837
- 77: typeof MessageTimestamp;
1838
- 78: typeof Milestone;
1839
- 79: typeof MilestoneModifierGroup;
1840
- 80: typeof MilestoneSort;
1841
- 81: typeof MiscTranslation;
1842
- 82: typeof CanLoadState;
1843
- 83: typeof ModLoadFailureReason;
1844
- 84: typeof ModProvide;
1845
- 85: typeof ModSort;
1846
- 86: typeof ModType;
1847
- 87: typeof MultiplayerCompatibility;
1848
- 88: typeof DisconnectReason;
1849
- 89: typeof MusicPlaylist;
1850
- 90: typeof Note;
1851
- 91: typeof NPCType;
1852
- 92: symbol;
1853
- 93: typeof PartOfDay;
1854
- 94: typeof Prompt;
1855
- 95: typeof QuadrantComponentId;
1856
- 96: typeof QuadrantComponentContextMenuAction;
1857
- 97: typeof Quality;
1858
- 98: typeof QuestType;
1859
- 99: typeof QuestRequirementType;
1860
- 100: typeof RecipeLevel;
1861
- 101: typeof Direction;
1862
- 102: typeof Riddle;
1863
- 103: typeof Runekeeper.Domain;
1864
- 104: typeof Runekeeper.Event;
1865
- 105: typeof SaveImportErrorReason;
1866
- 106: typeof SaveSort;
1867
- 107: typeof SkillType;
1868
- 108: typeof SkillSort;
1869
- 109: typeof Source;
1870
- 110: typeof Stat;
1871
- 111: typeof StatusType;
1872
- 112: typeof StatusEffectType;
1873
- 113: typeof StatusThreatLevel;
1874
- 114: typeof SteamInputKeyboardPosition;
1875
- 115: typeof Responsibility;
1876
- 116: typeof TempType;
1877
- 117: typeof Term;
1878
- 118: typeof TerrainType;
1879
- 119: typeof ThirstLevel;
1880
- 120: typeof TileEventType;
1881
- 121: typeof TooltipVisibilityOption;
1882
- 122: typeof UiTranslation;
1883
- 123: typeof Quadrant;
1884
- 124: typeof UnableToJoinReason;
1885
- 125: typeof UnlockedRecipesStrategy;
1886
- 126: typeof UsableActionType;
1887
- 127: typeof Website;
1888
- 128: typeof WeightStatus;
1889
- 129: typeof WorldZ;
1833
+ 73: typeof MagicalPropertyType;
1834
+ 74: typeof MapQuality;
1835
+ 75: typeof MenuBarButtonType;
1836
+ 76: typeof Message;
1837
+ 77: typeof MessageFilterDefault;
1838
+ 78: typeof MessageTimestamp;
1839
+ 79: typeof Milestone;
1840
+ 80: typeof MilestoneModifierGroup;
1841
+ 81: typeof MilestoneSort;
1842
+ 82: typeof MiscTranslation;
1843
+ 83: typeof CanLoadState;
1844
+ 84: typeof ModLoadFailureReason;
1845
+ 85: typeof ModProvide;
1846
+ 86: typeof ModSort;
1847
+ 87: typeof ModType;
1848
+ 88: typeof MultiplayerCompatibility;
1849
+ 89: typeof DisconnectReason;
1850
+ 90: typeof MusicPlaylist;
1851
+ 91: typeof Note;
1852
+ 92: typeof NPCType;
1853
+ 93: symbol;
1854
+ 94: typeof PartOfDay;
1855
+ 95: typeof Prompt;
1856
+ 96: typeof QuadrantComponentId;
1857
+ 97: typeof QuadrantComponentContextMenuAction;
1858
+ 98: typeof Quality;
1859
+ 99: typeof QuestType;
1860
+ 100: typeof QuestRequirementType;
1861
+ 101: typeof RecipeLevel;
1862
+ 102: typeof Direction;
1863
+ 103: typeof Riddle;
1864
+ 104: typeof Runekeeper.Domain;
1865
+ 105: typeof Runekeeper.Event;
1866
+ 106: typeof SaveImportErrorReason;
1867
+ 107: typeof SaveSort;
1868
+ 108: typeof SkillType;
1869
+ 109: typeof SkillSort;
1870
+ 110: typeof Source;
1871
+ 111: typeof Stat;
1872
+ 112: typeof StatusType;
1873
+ 113: typeof StatusEffectType;
1874
+ 114: typeof StatusThreatLevel;
1875
+ 115: typeof SteamInputKeyboardPosition;
1876
+ 116: typeof Responsibility;
1877
+ 117: typeof TempType;
1878
+ 118: typeof Term;
1879
+ 119: typeof TerrainType;
1880
+ 120: typeof ThirstLevel;
1881
+ 121: typeof TileEventType;
1882
+ 122: typeof TooltipVisibilityOption;
1883
+ 123: typeof UiTranslation;
1884
+ 124: typeof Quadrant;
1885
+ 125: typeof UnableToJoinReason;
1886
+ 126: typeof UnlockedRecipesStrategy;
1887
+ 127: typeof UsableActionType;
1888
+ 128: typeof Website;
1889
+ 129: typeof WeightStatus;
1890
+ 130: typeof WorldZ;
1890
1891
  };
1891
1892
  export declare const strictDictionaries: {
1892
1893
  0: typeof ActionType;
@@ -3620,63 +3621,64 @@ export declare const strictDictionaries: {
3620
3621
  70: typeof Load;
3621
3622
  71: symbol;
3622
3623
  72: typeof MagicalPropertyType;
3623
- 73: typeof MapQuality;
3624
- 74: typeof MenuBarButtonType;
3625
- 75: typeof Message;
3626
- 76: typeof MessageFilterDefault;
3627
- 77: typeof MessageTimestamp;
3628
- 78: typeof Milestone;
3629
- 79: typeof MilestoneModifierGroup;
3630
- 80: typeof MilestoneSort;
3631
- 81: typeof MiscTranslation;
3632
- 82: typeof CanLoadState;
3633
- 83: typeof ModLoadFailureReason;
3634
- 84: typeof ModProvide;
3635
- 85: typeof ModSort;
3636
- 86: typeof ModType;
3637
- 87: typeof MultiplayerCompatibility;
3638
- 88: typeof DisconnectReason;
3639
- 89: typeof MusicPlaylist;
3640
- 90: typeof Note;
3641
- 91: typeof NPCType;
3642
- 92: symbol;
3643
- 93: typeof PartOfDay;
3644
- 94: typeof Prompt;
3645
- 95: typeof QuadrantComponentId;
3646
- 96: typeof QuadrantComponentContextMenuAction;
3647
- 97: typeof Quality;
3648
- 98: typeof QuestType;
3649
- 99: typeof QuestRequirementType;
3650
- 100: typeof RecipeLevel;
3651
- 101: typeof Direction;
3652
- 102: typeof Riddle;
3653
- 103: typeof Runekeeper.Domain;
3654
- 104: typeof Runekeeper.Event;
3655
- 105: typeof SaveImportErrorReason;
3656
- 106: typeof SaveSort;
3657
- 107: typeof SkillType;
3658
- 108: typeof SkillSort;
3659
- 109: typeof Source;
3660
- 110: typeof Stat;
3661
- 111: typeof StatusType;
3662
- 112: typeof StatusEffectType;
3663
- 113: typeof StatusThreatLevel;
3664
- 114: typeof SteamInputKeyboardPosition;
3665
- 115: typeof Responsibility;
3666
- 116: typeof TempType;
3667
- 117: typeof Term;
3668
- 118: typeof TerrainType;
3669
- 119: typeof ThirstLevel;
3670
- 120: typeof TileEventType;
3671
- 121: typeof TooltipVisibilityOption;
3672
- 122: typeof UiTranslation;
3673
- 123: typeof Quadrant;
3674
- 124: typeof UnableToJoinReason;
3675
- 125: typeof UnlockedRecipesStrategy;
3676
- 126: typeof UsableActionType;
3677
- 127: typeof Website;
3678
- 128: typeof WeightStatus;
3679
- 129: typeof WorldZ;
3624
+ 73: typeof MagicalPropertyType;
3625
+ 74: typeof MapQuality;
3626
+ 75: typeof MenuBarButtonType;
3627
+ 76: typeof Message;
3628
+ 77: typeof MessageFilterDefault;
3629
+ 78: typeof MessageTimestamp;
3630
+ 79: typeof Milestone;
3631
+ 80: typeof MilestoneModifierGroup;
3632
+ 81: typeof MilestoneSort;
3633
+ 82: typeof MiscTranslation;
3634
+ 83: typeof CanLoadState;
3635
+ 84: typeof ModLoadFailureReason;
3636
+ 85: typeof ModProvide;
3637
+ 86: typeof ModSort;
3638
+ 87: typeof ModType;
3639
+ 88: typeof MultiplayerCompatibility;
3640
+ 89: typeof DisconnectReason;
3641
+ 90: typeof MusicPlaylist;
3642
+ 91: typeof Note;
3643
+ 92: typeof NPCType;
3644
+ 93: symbol;
3645
+ 94: typeof PartOfDay;
3646
+ 95: typeof Prompt;
3647
+ 96: typeof QuadrantComponentId;
3648
+ 97: typeof QuadrantComponentContextMenuAction;
3649
+ 98: typeof Quality;
3650
+ 99: typeof QuestType;
3651
+ 100: typeof QuestRequirementType;
3652
+ 101: typeof RecipeLevel;
3653
+ 102: typeof Direction;
3654
+ 103: typeof Riddle;
3655
+ 104: typeof Runekeeper.Domain;
3656
+ 105: typeof Runekeeper.Event;
3657
+ 106: typeof SaveImportErrorReason;
3658
+ 107: typeof SaveSort;
3659
+ 108: typeof SkillType;
3660
+ 109: typeof SkillSort;
3661
+ 110: typeof Source;
3662
+ 111: typeof Stat;
3663
+ 112: typeof StatusType;
3664
+ 113: typeof StatusEffectType;
3665
+ 114: typeof StatusThreatLevel;
3666
+ 115: typeof SteamInputKeyboardPosition;
3667
+ 116: typeof Responsibility;
3668
+ 117: typeof TempType;
3669
+ 118: typeof Term;
3670
+ 119: typeof TerrainType;
3671
+ 120: typeof ThirstLevel;
3672
+ 121: typeof TileEventType;
3673
+ 122: typeof TooltipVisibilityOption;
3674
+ 123: typeof UiTranslation;
3675
+ 124: typeof Quadrant;
3676
+ 125: typeof UnableToJoinReason;
3677
+ 126: typeof UnlockedRecipesStrategy;
3678
+ 127: typeof UsableActionType;
3679
+ 128: typeof Website;
3680
+ 129: typeof WeightStatus;
3681
+ 130: typeof WorldZ;
3680
3682
  };
3681
3683
  export type DictionaryEnum = (typeof dictionaryMap)[Dictionary];
3682
3684
  type ExtractEnumString<E> = E extends Record<string, infer V> ? V : never;
@@ -12,6 +12,7 @@ import type { InfoProviderContext } from "@wayward/game/game/inspection/InfoProv
12
12
  import type { Reference } from "@wayward/game/game/reference/IReferenceManager";
13
13
  import type Translation from "@wayward/game/language/Translation";
14
14
  import type TranslationImplImport from "@wayward/game/language/impl/TranslationImpl";
15
+ import type { IRandomDefinition } from "@wayward/game/language/impl/TranslationImpl";
15
16
  import type { Segment } from "@wayward/game/language/segment/Segments";
16
17
  import type { IInterpolationOptions, IStringSection } from "@wayward/game/utilities/string/Interpolator";
17
18
  import type { Random } from "@wayward/utilities/random/Random";
@@ -43,6 +44,7 @@ export interface ISerializedTranslation {
43
44
  tooltipWide?: true;
44
45
  interpolator?: ISerializedInterpolator;
45
46
  classes?: string[];
47
+ randomDefinition?: IRandomDefinition;
46
48
  }
47
49
  export declare namespace ISerializedTranslation {
48
50
  function is(value: unknown): value is ISerializedTranslation;
@@ -0,0 +1,17 @@
1
+ /*!
2
+ * Copyright 2011-2024 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 { ItemType } from "@wayward/game/game/item/IItem";
12
+ import type MagicalPropertyManager from "@wayward/game/game/magic/MagicalPropertyManager";
13
+ import Translation from "@wayward/game/language/Translation";
14
+ declare namespace MagicAffix {
15
+ function get(id: number, itemType: ItemType, magic?: MagicalPropertyManager): Translation | undefined;
16
+ }
17
+ export default MagicAffix;
@@ -121,6 +121,10 @@ export declare enum DamageTypeTranslation {
121
121
  Name = 0,
122
122
  Description = 1
123
123
  }
124
+ export declare enum MagicalPropertyAffixTranslation {
125
+ Adjective = 0,
126
+ Name = 1
127
+ }
124
128
  export declare enum MiscTranslation {
125
129
  AAndB = 0,
126
130
  Aberrant = 1,
@@ -0,0 +1,13 @@
1
+ /*!
2
+ * Copyright 2011-2024 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 MagicalPropertyType from "@wayward/game/game/magic/MagicalPropertyType";
12
+ declare const magicalPropertyAffixes: Descriptions<MagicalPropertyType, [adjective: string, noun: string]>;
13
+ export default magicalPropertyAffixes;
@@ -20,7 +20,7 @@ import type { ISerializable } from "@wayward/game/save/serializer/ISerializer";
20
20
  import type { TranslationGenerator } from "@wayward/game/ui/component/IComponent";
21
21
  import type { ISegment, IStringSection } from "@wayward/game/utilities/string/Interpolator";
22
22
  import Interpolator from "@wayward/game/utilities/string/Interpolator";
23
- import type { Random } from "@wayward/utilities/random/Random";
23
+ import { Random } from "@wayward/utilities/random/Random";
24
24
  export interface ITranslationConfig {
25
25
  segments: Record<number, ISegment>;
26
26
  invertedSegmentMap: Map<ISegment, number>;
@@ -29,6 +29,11 @@ export interface ITranslationConfig {
29
29
  }
30
30
  export type TranslationReformatter = TranslationImpl | Falsy;
31
31
  type TranslationStringRenderer = (section: IStringSection) => string | undefined;
32
+ export interface IRandomDefinition {
33
+ seed: number;
34
+ /** number of times to advance the seed */
35
+ advance?: number;
36
+ }
32
37
  export default class TranslationImpl implements Omit<ISerializable, "deserializeObject"> {
33
38
  private static defaultInterpolatorSegmentIds?;
34
39
  private static _config?;
@@ -59,6 +64,7 @@ export default class TranslationImpl implements Omit<ISerializable, "deserialize
59
64
  private normalize;
60
65
  private failWith?;
61
66
  private random;
67
+ private randomDefinition?;
62
68
  private languageLoadId;
63
69
  private cachedSections?;
64
70
  private cachedString?;
@@ -115,7 +121,7 @@ export default class TranslationImpl implements Omit<ISerializable, "deserialize
115
121
  *
116
122
  * Note: If this translation is an argument to another translation, it will use the random of the parent translation.
117
123
  */
118
- setRandom(random?: Random): this;
124
+ setRandom(random?: Random | IRandomDefinition): this;
119
125
  hasTranslation(): boolean;
120
126
  orElse(translation: GetterOfOr<TranslationImpl>): TranslationImpl;
121
127
  orElse(translation?: GetterOfOr<TranslationImpl | undefined>): TranslationImpl | undefined;
@@ -10,24 +10,24 @@
10
10
  */
11
11
  export declare enum PathType {
12
12
  Action = 0,
13
- AttackAnimation = 1,
14
- ChallengeIcon = 2,
15
- ChangelogChangeType = 3,
16
- ContainerTabAction = 4,
17
- Corpse = 5,
18
- Creature = 6,
19
- Damage = 7,
20
- Deity = 8,
21
- Doodad = 9,
22
- Equip = 10,
23
- EquipSlot = 11,
24
- GameOptionsIcon = 12,
25
- Hairstyle = 13,
26
- HelpArticleIcon = 14,
27
- InfoIcon = 15,
28
- ActionInfoIcon = 16,
29
- ActionSlotItemMethod = 17,
30
- ActionSlotType = 18,
13
+ ActionInfoIcon = 1,
14
+ ActionSlotItemMethod = 2,
15
+ ActionSlotType = 3,
16
+ AttackAnimation = 4,
17
+ ChallengeIcon = 5,
18
+ ChangelogChangeType = 6,
19
+ ContainerTabAction = 7,
20
+ Corpse = 8,
21
+ Creature = 9,
22
+ Damage = 10,
23
+ Deity = 11,
24
+ Doodad = 12,
25
+ Equip = 13,
26
+ EquipSlot = 14,
27
+ GameOptionsIcon = 15,
28
+ Hairstyle = 16,
29
+ HelpArticleIcon = 17,
30
+ InfoIcon = 18,
31
31
  InputIcon = 19,
32
32
  Island = 20,
33
33
  IslandModifier = 21,
@@ -11,6 +11,7 @@
11
11
  import type { IUpgradeVersion, UpgradeParameters, 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/game/utilities/Version";
14
+ export declare const BUILD_TIME_INTRODUCED_TIME: Date;
14
15
  declare namespace UpgradeVersionRegistry {
15
16
  function getAll(): readonly IUpgradeVersion[];
16
17
  function run<TYPE extends UpgradeType>(version: Version.Info, messages: UpgradesArray, which: TYPE, ...params: UpgradeParameters<TYPE>): void;
@@ -89,7 +89,8 @@ export default class Steamworks extends EventEmitter.Host<ISteamworksEvents> {
89
89
  getMatchmakingServer(): IMatchmakingServer | undefined;
90
90
  getMatchmakingServerPort(): number;
91
91
  getSteamNetworking(): ISteamworksNetworking | undefined;
92
- setBuildId(id?: string): void;
92
+ /** @deprecated For console use */
93
+ protected setBuildId(id?: string): void;
93
94
  initialize(): Promise<IWaywardPreload | undefined>;
94
95
  enableSafePaths(): void;
95
96
  onUnload(): void;
@@ -146,6 +146,7 @@ export default class ContainerBucketItemList extends Component implements ISorta
146
146
  private getItemIdsInElements;
147
147
  private getItemElementId;
148
148
  private getItemComponentElements;
149
+ private getItemComponentById;
149
150
  private regenerate;
150
151
  private transfer;
151
152
  private getSorter;
@@ -8,8 +8,12 @@
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 DebugShared from "@wayward/utilities/dev/DebugShared";
11
12
  declare namespace Debug {
12
13
  function typeIfRelevant(type: string, name: string): string | undefined;
13
14
  function where(thing: unknown): string | undefined;
15
+ type JIT = DebugShared.JIT;
16
+ const JIT: typeof DebugShared.JIT;
17
+ const isJIT: typeof DebugShared.isJIT;
14
18
  }
15
19
  export default Debug;
@@ -26,7 +26,7 @@ declare class MemoryLeakDetector {
26
26
  onScreenShow(_: any, screen: Screen): Promise<any>;
27
27
  private onReset;
28
28
  private runCheck;
29
- garbageCollect(): Promise<void>;
29
+ garbageCollect(source: string): Promise<void>;
30
30
  private checkObjects;
31
31
  }
32
32
  export declare const memoryLeakDetector: MemoryLeakDetector;
@@ -9,8 +9,8 @@
9
9
  * https://github.com/WaywardGame/types/wiki
10
10
  */
11
11
  import type { IWaywardTitle } from "@wayward/hosts/shared/globalTypes";
12
- export declare const gameVersionStage = "beta", gameVersionMajor = 2, gameVersionMinor = 14, gameVersionPatch = 3, gameVersionName = "Runekeeper", gameVersionColor = 11015763;
13
- export declare const gameVersion = "beta2.14.3";
12
+ export declare const gameVersionStage = "beta", gameVersionMajor = 2, gameVersionMinor = 14, gameVersionPatch = 4, gameVersionName = "Runekeeper", gameVersionColor = 11015763;
13
+ export declare const gameVersion = "beta2.14.4";
14
14
  export declare const gameVersionTitleMajor = "Wayward: Runekeeper";
15
15
  export declare const gameVersionTitleMinor: string;
16
16
  export declare const gameVersionTitle: string;
@@ -9,7 +9,7 @@
9
9
  * https://github.com/WaywardGame/types/wiki
10
10
  */
11
11
  declare namespace Functions {
12
- const noOp: () => void;
12
+ const noOp: (...args: any[]) => void;
13
13
  const noOpString: () => string;
14
14
  const noOpZero: () => number;
15
15
  const noOpNull: () => null;
@@ -24,6 +24,7 @@ export interface ILog {
24
24
  trace(...args: any[]): void;
25
25
  warn(...args: any[]): void;
26
26
  setSources(...sources: string[]): void;
27
+ ifEnabled(logger: (log: this) => any): void;
27
28
  }
28
29
  export interface ILogLine {
29
30
  type: LogLineType;
@@ -35,6 +36,7 @@ declare abstract class BaseLog implements ILog {
35
36
  info: (...args: any[]) => void;
36
37
  trace: (...args: any[]) => void;
37
38
  warn: (...args: any[]) => void;
39
+ ifEnabled: (logger: (log: this) => any) => void;
38
40
  protected sources: string[];
39
41
  constructor(...sources: Array<BaseLog | string>);
40
42
  setSources(...sources: Array<BaseLog | string>): void;
@@ -118,6 +120,8 @@ declare namespace Log {
118
120
  * @param sources A list of sources to log to.
119
121
  */
120
122
  function debug(...sources: string[]): (...args: any[]) => void;
123
+ function ifEnabled(...sources: string[]): (logger: (log: ILog) => any) => void;
124
+ function ifEnabled<LOG extends ILog>(log: LOG, ...sources: string[]): (logger: (log: LOG) => any) => void;
121
125
  /**
122
126
  * Returns a method that can be used to `Log.trace` with the given sources.
123
127
  * @param sources A list of sources to log to.
@@ -0,0 +1,23 @@
1
+ /*!
2
+ * Copyright 2011-2024 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 namespace DebugShared {
12
+ const SYMBOL_JIT: unique symbol;
13
+ export interface JIT<A extends any[] = []> {
14
+ (): any;
15
+ (...args: A): any;
16
+ [SYMBOL_JIT]: true;
17
+ }
18
+ export function isJIT(value: unknown): value is JIT;
19
+ export function JIT<A extends any[]>(debug: JIT, fn: (debug: any, ...args: A) => any): JIT<A>;
20
+ export function JIT<A extends any[]>(fn: (...args: A) => any): JIT<A>;
21
+ export {};
22
+ }
23
+ export default DebugShared;
@@ -11,6 +11,8 @@
11
11
  type Implementation<P, K extends keyof P> = (this: P, ...args: P[K] extends (...args: infer A) => any ? A : []) => P[K] extends (...args: any[]) => infer R ? R : never;
12
12
  declare function Define<P, K extends string & keyof P>(proto: P, key: K, implementation: Implementation<P, K>): void;
13
13
  declare namespace Define {
14
+ export function set<P, K extends string & keyof P>(proto: P, key: K, value: P[K]): P[K];
15
+ export function set<V>(proto: any, key: PropertyKey, value: V): V;
14
16
  export function all<P, K extends string & keyof P>(protos: P[], key: K, implementation: Implementation<P, K>): void;
15
17
  interface IMagicImplementation<O, K extends string & keyof O> {
16
18
  get(this: O): O[K];
@@ -40,5 +40,5 @@ export declare abstract class SeededGenerator<T> implements IRandomGenerator {
40
40
  getHistory(): Array<IRandomHistory<T>> | undefined;
41
41
  takeHistory(): Array<IRandomHistory<T>> | undefined;
42
42
  stopHistory(): Array<IRandomHistory<T>>;
43
- advance(): this;
43
+ advance(times?: number): this;
44
44
  }
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.14.3-beta.dev.20241226.1",
4
+ "version": "2.14.4-beta.dev.20241228.1",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",