@wayward/types 2.14.4-beta.dev.20250102.1 → 2.14.4-beta.dev.20250103.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.
@@ -11,8 +11,10 @@
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/utilities/Version";
14
+ import type { IBuildId } from "@wayward/hosts/shared/globalTypes";
14
15
  export declare const BUILD_TIME_INTRODUCED_TIME: Date;
15
16
  declare namespace UpgradeVersionRegistry {
17
+ function getMostRecentBuildId(): IBuildId | undefined;
16
18
  function getAll(): readonly IUpgradeVersion[];
17
19
  function run<TYPE extends UpgradeType>(version: Version.Info, messages: UpgradesArray, which: TYPE, ...params: UpgradeParameters<TYPE>): void;
18
20
  }
@@ -12,7 +12,7 @@ import type { HeapStatistics } from "electron";
12
12
  import type { Game } from "@wayward/game/game/Game";
13
13
  import type Entity from "@wayward/game/game/entity/Entity";
14
14
  import IActionContext from "@wayward/game/game/entity/action/IActionContext";
15
- import { ModType } from "@wayward/game/mod/IModInformation";
15
+ import { ModState, ModType } from "@wayward/game/mod/IModInformation";
16
16
  import type { ModInformation } from "@wayward/game/mod/ModInformation";
17
17
  import type { IJoinServerOptions, ServerInfo } from "@wayward/game/multiplayer/IMultiplayer";
18
18
  import type { IDedicatedServerInfo, IModPath, ISteamworksEvents, RunningContext, SteamStatTypeValues } from "@wayward/game/steamworks/ISteamworks";
@@ -219,6 +219,10 @@ export default class Steamworks extends EventEmitter.Host<ISteamworksEvents> {
219
219
  private refreshSetupMods;
220
220
  private cleanupTemporaryLocalFiles;
221
221
  private cleanupTemporaryRemoteFiles;
222
+ /**
223
+ * Called when the overlay is closed or when the refresh mods button is clicked
224
+ */
225
+ refreshWorkshopMods(waitForRefresh?: boolean, initialModState?: ModState.Enabled | ModState.Disabled): Promise<void>;
222
226
  private refreshPublishedMods;
223
227
  private getIdFromWorkshopItem;
224
228
  private syncWorkshopItems;
@@ -94,6 +94,7 @@ export default class Component<E extends HTMLElement = HTMLElement> extends Even
94
94
  */
95
95
  get selectable(): SelectableLayer | false;
96
96
  constructor(elementType?: string, namespace?: Namespace);
97
+ toString(): string;
97
98
  /**
98
99
  * Alias of `.element.addEventListener`, except it returns `this` instead and prevents memory leaks
99
100
  */
@@ -30,7 +30,6 @@ export default abstract class InspectionsList<INSPECTIONS_HANDLER extends Inspec
30
30
  event: IEventEmitter<this, ITileInspectionsEvents>;
31
31
  private readonly paragraphInspectionsInvalid;
32
32
  private inspectTypeFilter;
33
- private _removed?;
34
33
  protected inspectionsHandler?: InspectionsHandler;
35
34
  protected refreshPromiseSequence: PromiseSequence;
36
35
  protected inspectionsHandlerUpdatedInspectionsCallback?: (_: any, inspectType: InspectType, inspections: HashSet<Inspection<any>>, oldInspections: HashSet<Inspection<any>> | undefined) => void;
@@ -27,6 +27,7 @@ export default class QuestDialog extends Dialog {
27
27
  private readonly childQuestsHeading;
28
28
  private readonly childQuests;
29
29
  private readonly completeQuestButton;
30
+ private readonly activateQuestButton;
30
31
  private current;
31
32
  constructor();
32
33
  getBindable(): Bindable;
@@ -57,7 +57,7 @@ declare namespace Observer {
57
57
  start(): void;
58
58
  end(): void;
59
59
  setDefaultPriority(priority?: number): this;
60
- inherit(registrar: IRegistrar<any>): void;
60
+ inherit(registrar: IRegistrar<any>): HOST;
61
61
  }
62
62
  export function createRegistrar<HOST>(host: HOST, handler: () => any): IRegistrar<HOST>;
63
63
  export {};
@@ -0,0 +1,19 @@
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
+ export interface IDiscordMessage {
12
+ color?: number;
13
+ author?: string;
14
+ title: string;
15
+ url?: string;
16
+ description?: string;
17
+ footer?: string;
18
+ }
19
+ export default function (message: IDiscordMessage): Promise<void>;
@@ -87,6 +87,7 @@ declare namespace Log {
87
87
  Memory = 2
88
88
  }
89
89
  function setMemoryLog(memoryLog: MemoryLog | undefined): void;
90
+ function setTimestampType(type: "full" | "build"): void;
90
91
  function disableFileLogger(): void;
91
92
  function disableFileLoggingForSource(source: string): void;
92
93
  function initializeGameState(): void;
@@ -9,6 +9,7 @@
9
9
  * https://github.com/WaywardGame/types/wiki
10
10
  */
11
11
  import type { IBuild, IBuildId } from "@wayward/hosts/shared/globalTypes";
12
+ import type { IFileSystem } from "@wayward/hosts/shared/ipc/fileSystem";
12
13
  export interface IVersionInfo {
13
14
  str: Version.String;
14
15
  strSemver: Version.StringSemVer;
@@ -30,7 +31,7 @@ export declare namespace IVersionInfo {
30
31
  }
31
32
  }
32
33
  declare namespace Version {
33
- export function readBuildFile(): Promise<IBuild | undefined>;
34
+ export function readBuildFile(path?: string, fs?: IFileSystem): Promise<IBuild | undefined>;
34
35
  export type Stage = "beta" | "release";
35
36
  export type String = `${Stage}${bigint}.${bigint}.${bigint}` | `${Stage}${bigint}.${bigint}` | `${Stage}${bigint}`;
36
37
  export type StringSemVer = `${bigint}.${bigint}.${bigint}-${Stage}` | `${bigint}.${bigint}.${bigint}`;
@@ -68,7 +69,7 @@ declare namespace Version {
68
69
  export function createRawVersionInfo(stage: Version.Stage, major: number, minor: number, patch?: number, date?: Date): IVersionInfo;
69
70
  export function convertStringToRawInfo(version: Version.String | Version.StringSemVer | Version.StringBuildId): IVersionInfo;
70
71
  export function create(stage: Version.Stage, major: number, minor: number, patch?: number, date?: Date): Info;
71
- export function getVersionInfo(version: IVersionInfo | Version.String | Version.StringSemVer | Version.StringBuildId): Info;
72
+ export function getVersionInfo(version?: IVersionInfo | Version.String | Version.StringSemVer | Version.StringBuildId): Info;
72
73
  export function isSameVersion(version: IVersionInfo, compareVersion: IVersionInfo): boolean;
73
74
  const timezones: {
74
75
  nz: string;
@@ -79,6 +79,10 @@ export interface IEventEmitter<H = any, E = any> {
79
79
  until<E2>(emitter: IEventEmitterHost<E2>, ...events: Array<keyof E2>): IUntilSubscriber<H, E>;
80
80
  until(promise: Promise<any>): IUntilSubscriber<H, E>;
81
81
  hasHandlersForEvent(...events: Array<keyof E>): boolean;
82
+ /**
83
+ * Closes an event emitter, which will prevent any further subscriptions from being made.
84
+ */
85
+ close(): void;
82
86
  }
83
87
  export interface IUntilSubscriber<H, E> {
84
88
  until(promise: Promise<any>): this;
@@ -101,7 +105,13 @@ declare class EventEmitter<H, E> {
101
105
  private subscriptions?;
102
106
  private cachedEmitSelfHandlers?;
103
107
  private cachedClassHandlers?;
108
+ private closed?;
104
109
  constructor(host: H);
110
+ /**
111
+ * Closes an event emitter, which will prevent any further subscriptions from being made.
112
+ */
113
+ close(): void;
114
+ private throwIfClosed;
105
115
  raw(): IEventEmitter<H, E>;
106
116
  emitSelf<K extends keyof E>(event: K, ...args: ArgsOf<E[K]>): H;
107
117
  emit<K extends keyof E>(event: K, ...args: ArgsOf<E[K]>): H;
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.4-beta.dev.20250102.1",
4
+ "version": "2.14.4-beta.dev.20250103.1",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",