@wayward/types 2.15.0-beta.dev.20251018.2 → 2.15.0-beta.dev.20251020.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 (60) hide show
  1. package/definitions/game/game/IObject.d.ts +2 -1
  2. package/definitions/game/game/curse/Curse.d.ts +3 -2
  3. package/definitions/game/game/doodad/Doodad.d.ts +4 -4
  4. package/definitions/game/game/doodad/IDoodad.d.ts +1 -1
  5. package/definitions/game/game/entity/Human.d.ts +4 -3
  6. package/definitions/game/game/entity/IEntity.d.ts +2 -1
  7. package/definitions/game/game/entity/IHuman.d.ts +1 -52
  8. package/definitions/game/game/entity/StatDescriptions.d.ts +1 -1
  9. package/definitions/game/game/entity/action/ActionExecutor.d.ts +1 -1
  10. package/definitions/game/game/entity/action/IAction.d.ts +1 -1
  11. package/definitions/game/game/entity/action/actions/Attack.d.ts +1 -1
  12. package/definitions/game/game/entity/action/actions/Gather.d.ts +1 -1
  13. package/definitions/game/game/entity/action/actions/SetCreatureAi.d.ts +1 -1
  14. package/definitions/game/game/entity/action/actions/SetCreatureAiAll.d.ts +1 -1
  15. package/definitions/game/game/entity/action/actions/SetTitle.d.ts +2 -2
  16. package/definitions/game/game/entity/creature/corpse/ICorpse.d.ts +1 -1
  17. package/definitions/game/game/entity/player/IPlayer.d.ts +2 -1
  18. package/definitions/game/game/entity/player/Player.d.ts +1 -1
  19. package/definitions/game/game/entity/player/quest/Requirements.d.ts +1 -1
  20. package/definitions/game/game/entity/player/quest/requirement/LearnSkillRequirement.d.ts +1 -1
  21. package/definitions/game/game/entity/skill/ISkills.d.ts +36 -1
  22. package/definitions/game/game/entity/skill/SkillManager.d.ts +1 -1
  23. package/definitions/game/game/entity/status/StatusEffectList.d.ts +1 -1
  24. package/definitions/game/game/inspection/infoProviders/MagicalPropertyValue.d.ts +1 -1
  25. package/definitions/game/game/inspection/infoProviders/ObscuredValue.d.ts +1 -1
  26. package/definitions/game/game/inspection/infoProviders/item/SkillSourceTooltip.d.ts +1 -1
  27. package/definitions/game/game/inspection/infoProviders/item/use/ItemBuildInfo.d.ts +2 -1
  28. package/definitions/game/game/inspection/infoProviders/item/use/ItemConsumeInfo.d.ts +1 -1
  29. package/definitions/game/game/inspection/infoProviders/item/use/ItemEquipInfo.d.ts +3 -2
  30. package/definitions/game/game/inspection/infoProviders/skill/MagicalItemBonuses.d.ts +1 -1
  31. package/definitions/game/game/inspection/inspections/SkillInspection.d.ts +1 -1
  32. package/definitions/game/game/island/Island.d.ts +1 -1
  33. package/definitions/game/game/item/IItem.d.ts +1 -1
  34. package/definitions/game/game/item/Item.d.ts +4 -4
  35. package/definitions/game/game/item/recipe/Recipe.d.ts +1 -1
  36. package/definitions/game/game/magic/MagicalPropertyDescriptions.d.ts +63 -0
  37. package/definitions/game/game/magic/MagicalPropertyType.d.ts +4 -55
  38. package/definitions/game/game/milestones/milestone/Runekeeper.d.ts +1 -1
  39. package/definitions/game/game/options/GameOptions.d.ts +1 -1
  40. package/definitions/game/game/options/IGameOptions.d.ts +1 -1
  41. package/definitions/game/game/reference/IReferenceManager.d.ts +2 -1
  42. package/definitions/game/game/temperature/ITemperature.d.ts +17 -3
  43. package/definitions/game/game/tile/ITerrain.d.ts +1 -1
  44. package/definitions/game/game/tile/TileEvent.d.ts +1 -1
  45. package/definitions/game/language/DictionaryMap.d.ts +2 -1
  46. package/definitions/game/language/Translation.d.ts +2 -1
  47. package/definitions/game/language/dictionary/Message.d.ts +566 -565
  48. package/definitions/game/language/dictionary/UiTranslation.d.ts +859 -864
  49. package/definitions/game/language/english/player/Skills.d.ts +1 -1
  50. package/definitions/game/mod/ModRegistry.d.ts +3 -14
  51. package/definitions/game/ui/component/dropdown/SkillDropdown.d.ts +1 -1
  52. package/definitions/game/ui/screen/screens/game/dialog/SkillsDialog.d.ts +1 -1
  53. package/definitions/game/ui/screen/screens/game/static/menubar/descriptions/IslandsButtonDescription.d.ts +1 -1
  54. package/definitions/game/ui/screen/screens/game/static/stats/IStatDisplayDescription.d.ts +3 -1
  55. package/definitions/game/ui/screen/screens/game/static/stats/component/StatComponent.d.ts +13 -4
  56. package/definitions/hosts/shared/interfaces.d.ts +1 -1
  57. package/definitions/test/core/applicationDom.d.ts +1 -1
  58. package/definitions/test/core/applicationManager.d.ts +10 -0
  59. package/definitions/utilities/log/ErrorReporting.d.ts +2 -0
  60. package/package.json +1 -1
@@ -8,6 +8,6 @@
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 { SkillType } from "@wayward/game/game/entity/IHuman";
11
+ import { SkillType } from "@wayward/game/game/entity/skill/ISkills";
12
12
  declare const skills: Descriptions<SkillType, [string, string, string]>;
13
13
  export default skills;
@@ -13,7 +13,8 @@ import type { Command, CommandCallback } from "@wayward/game/command/ICommand";
13
13
  import type { BiomeType, IBiomeDescription } from "@wayward/game/game/biome/IBiome";
14
14
  import type { DoodadTag, DoodadType, DoodadTypeExtra, DoodadTypeGroup, IDoodadDescription, IDoodadGroupDescription } from "@wayward/game/game/doodad/IDoodad";
15
15
  import type { EntityTag } from "@wayward/game/game/entity/IEntity";
16
- import type { EquipType, InsulationWeight, SkillType } from "@wayward/game/game/entity/IHuman";
16
+ import type { EquipType } from "@wayward/game/game/entity/IHuman";
17
+ import type { SkillType } from "../game/entity/skill/ISkills";
17
18
  import type { Stat } from "@wayward/game/game/entity/IStats";
18
19
  import type { IStatDescription } from "@wayward/game/game/entity/StatDescriptions";
19
20
  import type { ActionType, IActionDescription } from "@wayward/game/game/entity/action/IAction";
@@ -37,12 +38,11 @@ import type { StatusClass } from "@wayward/game/game/entity/status/Status";
37
38
  import type { InspectType } from "@wayward/game/game/inspection/IInspection";
38
39
  import type { InspectionClass } from "@wayward/game/game/inspection/InspectionTypeMap";
39
40
  import type { IItemDescription, IItemGroupDescription, ItemTag, ItemType, ItemTypeExtra, ItemTypeGroup } from "@wayward/game/game/item/IItem";
40
- import type { IMagicalPropertyDescription } from "@wayward/game/game/magic/MagicalPropertyType";
41
+ import type { IMagicalPropertyDescription } from "@wayward/game/game/magic/MagicalPropertyDescriptions";
41
42
  import type MagicalPropertyType from "@wayward/game/game/magic/MagicalPropertyType";
42
43
  import type { ILoadingDescription } from "@wayward/game/game/meta/Loading";
43
44
  import type { IPromptDescriptionBase, Prompt } from "@wayward/game/game/meta/prompt/IPrompt";
44
45
  import type PromptDescriptionFactory from "@wayward/game/game/meta/prompt/PromptDescriptionFactory";
45
- import type { TempType } from "@wayward/game/game/temperature/ITemperature";
46
46
  import type { ITerrainDescription, OverlayType, TerrainType } from "@wayward/game/game/tile/ITerrain";
47
47
  import type { ITileEventDescription, TileEventType } from "@wayward/game/game/tile/ITileEvent";
48
48
  import type { ITerrainLootItem } from "@wayward/game/game/tile/TerrainResources";
@@ -417,17 +417,6 @@ export interface IEquipTypeDescription extends IModdable {
417
417
  * An item group to automatically assign to all items equippable in this equip slot.
418
418
  */
419
419
  itemGroup?: ItemTypeGroup;
420
- /**
421
- * For each temperature type (`TempType.Cold` and `TempType.Heat`), the "weight" that it has.
422
- * When calculating insulation, this weight is compared with all other weights.
423
- * Higher weight = higher % of the insulation score comes from this slot.
424
- *
425
- * To make the slot optional for insulation of a temp type,
426
- * make the value 0 (not considered at all) OR make it `[<weight>, "onlyWhenEquipped"]`.
427
- *
428
- * Optional slots do not reduce the human's insulation.
429
- */
430
- insulationWeights?: PartialRecord<TempType, InsulationWeight>;
431
420
  }
432
421
  export interface IEquipTypeRegistration extends IBaseModRegistration {
433
422
  type: ModRegistrationType.EquipType;
@@ -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 { SkillType } from "@wayward/game/game/entity/IHuman";
11
+ import { SkillType } from "@wayward/game/game/entity/skill/ISkills";
12
12
  import type { IDropdownOption } from "@wayward/game/ui/component/Dropdown";
13
13
  import EnumDropdown from "@wayward/game/ui/component/dropdown/EnumDropdown";
14
14
  export default class SkillDropdown<OTHER_OPTIONS extends string = never> extends EnumDropdown<typeof SkillType, OTHER_OPTIONS> {
@@ -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 { SkillType } from "@wayward/game/game/entity/IHuman";
11
+ import { SkillType } from "@wayward/game/game/entity/skill/ISkills";
12
12
  import { TitleType } from "@wayward/game/game/entity/action/actions/SetTitle";
13
13
  import { ReferenceType } from "@wayward/game/game/reference/IReferenceManager";
14
14
  import Translation from "@wayward/game/language/Translation";
@@ -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 { SkillType } from "@wayward/game/game/entity/IHuman";
11
+ import { SkillType } from "@wayward/game/game/entity/skill/ISkills";
12
12
  import { Milestone } from "@wayward/game/game/milestones/IMilestone";
13
13
  import Bindable from "@wayward/game/ui/input/Bindable";
14
14
  import type DialogManager from "@wayward/game/ui/screen/screens/game/DialogManager";
@@ -26,6 +26,7 @@ import type Translation from "@wayward/game/language/Translation";
26
26
  import type { IModdable } from "@wayward/game/mod/ModRegistry";
27
27
  import type Component from "@wayward/game/ui/component/Component";
28
28
  import type StatComponent from "@wayward/game/ui/screen/screens/game/static/stats/component/StatComponent";
29
+ import type { IStatComponentEvents } from "@wayward/game/ui/screen/screens/game/static/stats/component/StatComponent";
29
30
  import type Tooltip from "@wayward/game/ui/tooltip/Tooltip";
30
31
  import type { IUntilSubscriber } from "@wayward/utilities/event/EventEmitter";
31
32
  export interface IStatDisplayDescription extends IModdable, IHasImagePath<string | ((entity: EntityWithStats, stat: IStat) => string | undefined)> {
@@ -84,7 +85,7 @@ export interface IStatDisplayDescription extends IModdable, IHasImagePath<string
84
85
  * A function that will initialize a tooltip for this stat element, or a reference to show a tooltip for
85
86
  */
86
87
  tooltip?: Reference | ((tooltip: Tooltip, entity: EntityWithStats, stat: IStat) => any);
87
- subscriber?: (events: IStatDisplayDescriptionSubscriber, refresh: () => void) => any;
88
+ subscriber?: (events: IStatDisplayDescriptionSubscriber, statComponent: StatComponent) => any;
88
89
  getValue?(entity?: EntityWithStats): number | undefined;
89
90
  getMin?(entity?: EntityWithStats): number | undefined;
90
91
  getMax?(entity?: EntityWithStats): number | undefined;
@@ -97,6 +98,7 @@ export interface IStatDisplayDescriptionSubscriber {
97
98
  player?: IUntilSubscriber<Player, IPlayerEvents>;
98
99
  creature?: IUntilSubscriber<Creature, ICreatureEvents>;
99
100
  island?: IUntilSubscriber<Island, IIslandEvents>;
101
+ stat?: IUntilSubscriber<StatComponent, IStatComponentEvents>;
100
102
  }
101
103
  export declare const STAT_DEFAULT_DISPLAY_ORDER = 100;
102
104
  export interface IStatInfo extends Partial<IStatBase> {
@@ -17,6 +17,7 @@ import type TranslationImpl from "@wayward/game/language/impl/TranslationImpl";
17
17
  import { PathType } from "@wayward/game/resource/IResourceLoader";
18
18
  import Component from "@wayward/game/ui/component/Component";
19
19
  import Text from "@wayward/game/ui/component/Text";
20
+ import type { IStatDisplayDescription } from "@wayward/game/ui/screen/screens/game/static/stats/IStatDisplayDescription";
20
21
  import ImagePath from "@wayward/game/ui/util/ImagePath";
21
22
  import type { Events, IEventEmitter } from "@wayward/utilities/event/EventEmitter";
22
23
  export declare enum StatClasses {
@@ -39,18 +40,24 @@ export declare enum StatClasses {
39
40
  AttributeLabel = "stat-attribute-label"
40
41
  }
41
42
  export interface IStatComponentEvents extends Events<Component> {
43
+ refresh(): any;
42
44
  update(): any;
45
+ resubscribe(): any;
43
46
  }
44
47
  export default abstract class StatComponent extends Component {
45
48
  private readonly stat;
46
- protected readonly statDescription: import("../IStatDisplayDescription").IStatDisplayDescription | undefined;
49
+ protected readonly statDescription: IStatDisplayDescription | undefined;
47
50
  event: IEventEmitter<this, IStatComponentEvents>;
48
51
  readonly statIcon: ImagePath<PathType.StatIcon>;
49
52
  private readonly entityRef;
50
- protected get entity(): EntityWithStats | undefined;
53
+ get entity(): EntityWithStats | undefined;
51
54
  private hidingDueToMilestone;
52
55
  private updatingVisibility;
53
- constructor(entity: EntityWithStats, stat: Stat, noEvents?: true, statDescription?: import("../IStatDisplayDescription").IStatDisplayDescription | undefined);
56
+ constructor(entity: EntityWithStats, stat: Stat, noEvents?: true, statDescription?: IStatDisplayDescription | undefined);
57
+ get asBar(): Statbar | undefined;
58
+ get asAttribute(): StatAttribute | undefined;
59
+ private subscribe;
60
+ refresh(): void;
54
61
  private onUpdateMilestone;
55
62
  protected onRemove(): void;
56
63
  /**
@@ -106,6 +113,7 @@ export declare class Statbar extends StatComponent {
106
113
  getTextElement(): Text;
107
114
  getDisplayElement(): Component;
108
115
  getGenericStatValue(stat: IStatMax): TranslationImpl;
116
+ get asBar(): Statbar;
109
117
  /**
110
118
  * Overrides the superclass method of the same name. Calls the superclass method, then updates the CSS
111
119
  * property `--stat-percent`, to update the statbar's fill width.
@@ -115,7 +123,8 @@ export declare class Statbar extends StatComponent {
115
123
  export declare class StatAttribute extends StatComponent {
116
124
  readonly attribute?: Text;
117
125
  readonly label?: Text;
118
- constructor(entity: EntityWithStats, stat: Stat, noEvents?: true, statDescription?: import("../IStatDisplayDescription").IStatDisplayDescription | undefined);
126
+ get asAttribute(): StatAttribute;
127
+ constructor(entity: EntityWithStats, stat: Stat, noEvents?: true, statDescription?: IStatDisplayDescription | undefined);
119
128
  getTextElement(): Text | undefined;
120
129
  getDisplayElement(): Text | undefined;
121
130
  }
@@ -194,7 +194,7 @@ export interface IPath {
194
194
  isAbsolute(path: string): boolean;
195
195
  }
196
196
  export interface INapi {
197
- discord: INapiDiscord;
197
+ discord: INapiDiscord | undefined;
198
198
  }
199
199
  export interface INapiDiscord {
200
200
  initialize(apiKey: string, appId?: string): void;
@@ -15,7 +15,7 @@ export declare class ApplicationDom {
15
15
  private readonly browser;
16
16
  private readonly logger;
17
17
  constructor(browser: WebdriverIO.Browser, logger: ApplicationLogger);
18
- executeFunction<T2 extends any[], T>(executor: (...extraArgs: T2) => T | Promise<T>, ...extraArgs: T2): Promise<T>;
18
+ executeFunction<T2 extends unknown[], T>(executor: (...extraArgs: webdriverio.TransformElement<T2>) => T | Promise<T>, ...extraArgs: T2): Promise<T>;
19
19
  executeJavaScript<T>(javascript: string): Promise<T>;
20
20
  getElement(selector: string): Promise<WebdriverIO.Element>;
21
21
  getElements(selector: string, onlyVisible?: boolean): Promise<WebdriverIO.Element[]>;
@@ -81,6 +81,16 @@ export declare class ApplicationManager {
81
81
  waitForClientConsistency(): Promise<void>;
82
82
  createInteraction(application: Application): ApplicationInteraction;
83
83
  sailToCivilization(winnerApp: Application): Promise<void>;
84
+ /**
85
+ * Sets the time of day for a given application (the island that the player is on)
86
+ * @param time A number between `0` and `1`, where `0` is the start of the day and `1` is the end.
87
+ */
88
+ setTimeOfDay(app: Application, time: number): Promise<void>;
89
+ /**
90
+ * Creates all curses for the player on the given application
91
+ */
92
+ createAllCurses(app: Application): Promise<void>;
93
+ fastForwardUntil(app: Application, stopCondition: (player: Player) => boolean): Promise<void>;
84
94
  executeJavascript<T2 extends any[], T = void>(app: Application, executor: (player: Player, ...extraArgs: T2) => T, ...extraArgs: T2): Promise<T[]>;
85
95
  executeOnPlayingClients<T>(runnable: (app: Application) => Promise<T>): Promise<T[]>;
86
96
  executeOnApps<T>(apps: Application[], runnable: (app: Application) => Promise<T>, requiresDeterminism: boolean): Promise<T[]>;
@@ -18,11 +18,13 @@ declare namespace ErrorReporting {
18
18
  * If this is called from a function that is registered in `Errors.ts` as a skipped callsite, you might have to pass `-1`.
19
19
  * @param id The ID of this warning. Can be `Log.simplify` strings.
20
20
  */
21
+ function warnForCaller(id: ArrayOr<string | Log.SimplifyString>, ...message: any[]): void;
21
22
  function warnForCaller(skip: number, id: ArrayOr<string | Log.SimplifyString>, ...message: any[]): void;
22
23
  /**
23
24
  * Warn about something once per session based on unique warning ids.
24
25
  * This is like how node.js does warnings in console.
25
26
  */
26
27
  function warnOncePerSession(warningId: ArrayOr<string | Log.SimplifyString>, ...message: any[]): void;
28
+ function warnOncePerSession(skip: number, warningId: ArrayOr<string | Log.SimplifyString>, ...message: any[]): void;
27
29
  }
28
30
  export default ErrorReporting;
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.20251018.2",
4
+ "version": "2.15.0-beta.dev.20251020.1",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",