@wayward/types 2.15.5-beta.dev.20260529.1 → 2.15.5-beta.dev.20260531.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.
@@ -33,6 +33,7 @@ import type Island from "@wayward/game/game/island/Island";
33
33
  import type { Automation } from "@wayward/game/game/island/automation/Automation";
34
34
  import type { IContainer } from "@wayward/game/game/item/IItem";
35
35
  import type Item from "@wayward/game/game/item/Item";
36
+ import type { Quality } from "@wayward/game/game/IObject";
36
37
  import type { IPromptDescriptionBase, PromptDescriptionArgs } from "@wayward/game/game/meta/prompt/IPrompt";
37
38
  import type { Milestone } from "@wayward/game/game/milestones/IMilestone";
38
39
  import type { IFindPathRange } from "@wayward/game/game/tile/ITerrain";
@@ -230,6 +231,13 @@ export interface IActionUsable {
230
231
  */
231
232
  usableOnMove?: boolean;
232
233
  displayLevel?: ActionDisplayLevel;
234
+ actionTierBreakdown?: IActionTierBreakdown;
235
+ }
236
+ export interface IActionTierBreakdown {
237
+ baseTier: number;
238
+ effectiveTier: number;
239
+ quality?: Quality;
240
+ qualityBonus?: number;
233
241
  }
234
242
  export declare namespace IActionUsable {
235
243
  function usableOrPrintable(usability: IActionUsable | IActionNotUsable): boolean;
@@ -8,12 +8,13 @@
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 { QualityNatural } from "@wayward/game/game/IObject";
11
12
  import { Quality } from "@wayward/game/game/IObject";
12
13
  import { DeityReal } from "@wayward/game/game/deity/Deity";
13
14
  import type Doodad from "@wayward/game/game/doodad/Doodad";
14
15
  import type Human from "@wayward/game/game/entity/Human";
15
16
  import { Action } from "@wayward/game/game/entity/action/Action";
16
- import { ActionArgument, ActionType, type IActionUsable } from "@wayward/game/game/entity/action/IAction";
17
+ import { ActionArgument, ActionType, type IActionTierBreakdown, type IActionUsable } from "@wayward/game/game/entity/action/IAction";
17
18
  import type { IContainer } from "@wayward/game/game/item/IItem";
18
19
  import { ItemType } from "@wayward/game/game/item/IItem";
19
20
  import type Item from "@wayward/game/game/item/Item";
@@ -36,8 +37,13 @@ declare const _default: Action<[ActionArgument.DoodadNearby], ActionType.Consecr
36
37
  groupRunes(runes: Item[]): ConsecrateRuneGroup[];
37
38
  getReturnDeity(runeGroups: ConsecrateRuneGroup[]): DeityReal | undefined;
38
39
  groupRunesFriendAndFoe(runeGroups: ConsecrateRuneGroup[], deity: DeityReal): ConsecrateRuneGroupFriendAndFoe;
40
+ getSacrificedRunes(runes: Item[]): Item[];
41
+ getQualityTier(quality: Quality | undefined): QualityNatural;
42
+ getActionTierBreakdown(altar: Doodad, runes: Item[]): IActionTierBreakdown | undefined;
39
43
  getDeityRuneTypes(human: Human, deity: DeityReal): ItemType[];
40
44
  calculateValue(human: Human, runes: Item[], deity: DeityReal, calculationType: "min" | "max" | "random"): number;
45
+ calculateValueWithFanaticism(human: Human, runes: Item[], calculationType: "min" | "max" | "random", fanaticism: number): number;
46
+ calculateFanaticismValueModifier(human: Human, runes: Item[], deity: DeityReal): number | undefined;
41
47
  resolveRunesForValue(human: Human, value: number, maxValue?: number): ConsecrateOutcomeRuneQualityCounts;
42
48
  };
43
49
  export default _default;
@@ -0,0 +1,21 @@
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
+ import type Doodad from "@wayward/game/game/doodad/Doodad";
12
+ import { InfoProvider } from "@wayward/game/game/inspection/InfoProvider";
13
+ import LabelledValue from "@wayward/game/game/inspection/infoProviders/LabelledValue";
14
+ export default class DoodadFanaticismInfoProvider extends InfoProvider {
15
+ private readonly doodad;
16
+ static get(doodad: Doodad): DoodadFanaticismInfoProvider | undefined;
17
+ constructor(doodad: Doodad);
18
+ getClass(): string[];
19
+ hasContent(): boolean;
20
+ get(): LabelledValue[];
21
+ }
@@ -14,6 +14,7 @@ import { InfoProvider } from "@wayward/game/game/inspection/InfoProvider";
14
14
  import type { InfoProviderContext } from "@wayward/game/game/inspection/InfoProviderContext";
15
15
  import type UseInfo from "@wayward/game/game/inspection/infoProviders/UseInfo";
16
16
  import type { DescribedDescription, IDescribed } from "@wayward/game/game/inspection/infoProviders/UseInfo";
17
+ import { Quality } from "@wayward/game/game/IObject";
17
18
  import UiTranslation from "@wayward/game/language/dictionary/UiTranslation";
18
19
  import type TranslationImpl from "@wayward/game/language/impl/TranslationImpl";
19
20
  import Translation from "@wayward/game/language/Translation";
@@ -44,6 +45,9 @@ export default abstract class Uses<T extends IDescribed> extends InfoProvider {
44
45
  protected getUseDisplayLevel(action: ActionType, context: InfoProviderContext): InfoDisplayLevel;
45
46
  private getDetailsHandlerResolver;
46
47
  protected getUse(description: DescribedDescription<T>, action: ActionType): TranslationImpl;
48
+ protected getUseTooltipContext(description: DescribedDescription<T>, action: ActionType): InfoProviderContext | undefined;
49
+ protected getUseBonus(description: DescribedDescription<T>, action: ActionType): number;
50
+ protected getUseBonusQuality(): Quality | undefined;
47
51
  protected getActionTier(description: DescribedDescription<T>, action: ActionType): number | undefined;
48
52
  private getUseName;
49
53
  }
@@ -12,12 +12,21 @@ import Doodad from "@wayward/game/game/doodad/Doodad";
12
12
  import { type DoodadType, type IDoodadDescription } from "@wayward/game/game/doodad/IDoodad";
13
13
  import type { ActionType } from "@wayward/game/game/entity/action/IAction";
14
14
  import { EntityType } from "@wayward/game/game/entity/IEntity";
15
+ import { Quality } from "@wayward/game/game/IObject";
16
+ import type { InfoProviderContext } from "@wayward/game/game/inspection/InfoProviderContext";
15
17
  import type UseInfo from "@wayward/game/game/inspection/infoProviders/UseInfo";
16
18
  import Uses from "@wayward/game/game/inspection/infoProviders/Uses";
17
19
  export default class DoodadUses extends Uses<Doodad> {
20
+ private actionTierQuality?;
18
21
  protected getEntityType(): EntityType.Doodad;
22
+ setActionTierQuality(quality: Quality | undefined): this;
19
23
  protected getDescription(type: DoodadType): IDoodadDescription | undefined;
20
24
  protected getUses(description: IDoodadDescription): ActionType[];
21
25
  protected getUseInfoHandlers(): Array<UseInfo<any, any, any, Doodad>>;
26
+ protected getUseBonus(description: IDoodadDescription, action: ActionType): number;
27
+ protected getUseTooltipContext(description: IDoodadDescription, action: ActionType): InfoProviderContext | undefined;
28
+ protected getUseBonusQuality(): Quality | undefined;
29
+ private getActionTierBreakdown;
30
+ protected getActionTier(description: IDoodadDescription, action: ActionType): number | undefined;
22
31
  private getDescriptionActions;
23
32
  }
@@ -9,8 +9,8 @@
9
9
  * https://github.com/WaywardGame/types/wiki
10
10
  */
11
11
  import { MoveFlag } from "@wayward/game/game/entity/IEntity";
12
- import type { IActionApi } from "@wayward/game/game/entity/action/IAction";
13
- import type { ActionId, IUsableActionDefinition, IUsableActionPossibleUsing, IUsableActionRequirements } from "@wayward/game/game/entity/action/usable/IUsableAction";
12
+ import type { IActionApi, IActionNotUsable, IActionUsable } from "@wayward/game/game/entity/action/IAction";
13
+ import type { ActionId, IUsableActionDefinition, IUsableActionPossibleUsing, IUsableActionRequirements, UsableActionUsability } from "@wayward/game/game/entity/action/usable/IUsableAction";
14
14
  import { UsableActionDisplayContext } from "@wayward/game/game/entity/action/usable/IUsableAction";
15
15
  import type UsableAction from "@wayward/game/game/entity/action/usable/UsableAction";
16
16
  import type Player from "@wayward/game/game/entity/player/Player";
@@ -28,16 +28,18 @@ import { ReferenceType } from "@wayward/game/game/reference/IReferenceManager";
28
28
  import type Tile from "@wayward/game/game/tile/Tile";
29
29
  import Translation from "@wayward/game/language/Translation";
30
30
  import type TranslationImpl from "@wayward/game/language/impl/TranslationImpl";
31
+ type ActionInspectionUsability = IActionUsable | IActionNotUsable | UsableActionUsability;
31
32
  export default class ActionInspection extends Inspection<ActionId | undefined> {
32
33
  static handles: (type: InspectType, value: unknown, context?: InfoProviderContext) => boolean;
33
34
  static getAction(id: ActionId): UsableAction<IUsableActionRequirements, IUsableActionDefinition> | undefined;
34
- static getActionNameWithTier(id: ActionId | UsableAction, context: UsableActionDisplayContext, provided: IUsableActionPossibleUsing | undefined, resolveUsing: boolean): TranslationImpl | undefined;
35
+ static getActionNameWithTier(id: ActionId | UsableAction, context: UsableActionDisplayContext, provided: IUsableActionPossibleUsing | undefined, resolveUsing: boolean, usability?: ActionInspectionUsability): TranslationImpl | undefined;
35
36
  private static getTranslation;
36
37
  static getRuneInfo(id: ActionId, itemType?: ItemType, item?: Item): SimpleInfoProvider | undefined;
37
38
  constructor(value?: ActionId | EnumReferenceResolved<ReferenceType.Action>, context?: InfoProviderContext);
38
39
  private get using();
39
40
  private getAction;
40
41
  private get item();
42
+ private cachedUsability?;
41
43
  getId(): string;
42
44
  private getActionId;
43
45
  protected getTitle(context: InfoProviderContext): Translation;
@@ -47,8 +49,10 @@ export default class ActionInspection extends Inspection<ActionId | undefined> {
47
49
  private getActionSlotItemMode;
48
50
  private getTranslation;
49
51
  private getActionDiscovered;
50
- private static getActionTier;
52
+ private static getItemActionTier;
53
+ private static getResolvedActionTier;
51
54
  private getActionTierInfo;
55
+ private getUsability;
52
56
  private getActionUsability;
53
57
  private getActionExample;
54
58
  protected onPlayerUpdate(): void;
@@ -56,3 +60,4 @@ export default class ActionInspection extends Inspection<ActionId | undefined> {
56
60
  protected onTickEnd(island: Island, options: IIslandTickOptions): void;
57
61
  postExecuteAction(action: IActionApi): void;
58
62
  }
63
+ export {};
@@ -192,6 +192,7 @@ export default class Item extends EntityMovable<IItemDescription, ItemType, Refe
192
192
  get builtDescription(): IDoodadDescription | undefined;
193
193
  get builtAndLitDescription(): IDoodadDescription | undefined;
194
194
  get placeDownDescription(): IDoodadDescription | undefined;
195
+ preventsUsingAsContainerInInventory(): boolean;
195
196
  countTradesWith(human?: Human): number;
196
197
  /**
197
198
  * Gets the owner of this item.
@@ -212,6 +212,8 @@ export default class Multiplayer extends EventEmitter.Host<IMultiplayerEvents> {
212
212
  private synchronizationCheck;
213
213
  private logSyncCheckErrors;
214
214
  private sendDesyncPacket;
215
+ private getDiagnosticModList;
216
+ private formatDiagnosticModList;
215
217
  processDesyncPacket(connection: IConnection, desyncPacket: DesyncPacket): void;
216
218
  private sendPacketInternal;
217
219
  private onStateChange;
@@ -20,6 +20,8 @@ export default class DesyncPacket extends ServerPacket {
20
20
  checkBefore: boolean;
21
21
  shouldDisconnect: boolean;
22
22
  logs: string;
23
+ clientLoadedMods: string[];
24
+ clientAllMods: string[];
23
25
  getDebugInfo(): string;
24
26
  isSyncCheckEnabled(): boolean;
25
27
  isAllowedWhenPaused(): boolean;
@@ -13,6 +13,7 @@ import type Item from "@wayward/game/game/item/Item";
13
13
  import type ItemManager from "@wayward/game/game/item/ItemManager";
14
14
  import Button from "@wayward/game/ui/component/Button";
15
15
  import Component from "@wayward/game/ui/component/Component";
16
+ import Text from "@wayward/game/ui/component/Text";
16
17
  import ContainerDialog from "@wayward/game/ui/screen/screens/game/dialog/ContainerDialog";
17
18
  import { DialogId } from "@wayward/game/ui/screen/screens/game/Dialogs";
18
19
  export declare enum AltarDialogClasses {
@@ -21,12 +22,14 @@ export declare enum AltarDialogClasses {
21
22
  ConsecrateButton = "altar-dialog-consecrate-button",
22
23
  ConsecrateButtonDisabled = "altar-dialog-consecrate-button--disabled",
23
24
  ResultArrow = "altar-dialog-result-arrow",
25
+ ResultArrowFanaticism = "altar-dialog-result-arrow-fanaticism",
24
26
  Projection = "altar-dialog-projection",
25
27
  ProjectionItem = "altar-dialog-projection-item"
26
28
  }
27
29
  export default class AltarDialog extends ContainerDialog {
28
30
  readonly consecrateButton: Button;
29
31
  readonly resultArrow: Component<HTMLElement>;
32
+ readonly resultArrowFanaticism: Text;
30
33
  readonly projection: Component<HTMLElement>;
31
34
  constructor(id?: DialogId, subId?: string);
32
35
  setContainer(container: IContainer): this;
@@ -9,7 +9,7 @@
9
9
  * https://github.com/WaywardGame/types/wiki
10
10
  */
11
11
  import type { ActionType } from "@wayward/game/game/entity/action/IAction";
12
- import type { ActionId, IUsableActionDefinition, IUsableActionPossibleUsing, IUsableActionRequirements } from "@wayward/game/game/entity/action/usable/IUsableAction";
12
+ import type { ActionId, IUsableActionDefinition, IUsableActionPossibleUsing, IUsableActionRequirements, UsableActionUsability } from "@wayward/game/game/entity/action/usable/IUsableAction";
13
13
  import { UsableActionDisplayContext } from "@wayward/game/game/entity/action/usable/IUsableAction";
14
14
  import type UsableAction from "@wayward/game/game/entity/action/usable/UsableAction";
15
15
  import { InfoDisplayLevel } from "@wayward/game/game/inspection/IInfoProvider";
@@ -55,9 +55,10 @@ export interface IActionUseContextUsing extends Omit<IUsableActionPossibleUsing,
55
55
  }
56
56
  export declare class ActionUseContext extends InfoProviderContext {
57
57
  readonly context: UsableActionDisplayContext;
58
+ readonly usability?: UsableActionUsability | undefined;
58
59
  private readonly stored?;
59
60
  get provided(): IActionUseContextUsing | undefined;
60
- constructor(provided: IActionUseContextUsing, context?: UsableActionDisplayContext);
61
+ constructor(provided: IActionUseContextUsing, context?: UsableActionDisplayContext, usability?: UsableActionUsability | undefined);
61
62
  }
62
63
  export declare class ActionSlotContext extends InfoProviderContext {
63
64
  private readonly slotRef?;
@@ -11,3 +11,11 @@
11
11
  import Middleware from "@wayward/server/core/Middleware";
12
12
  declare const _default: Middleware<[message?: string]>;
13
13
  export default _default;
14
+ interface IParsedReportRequest {
15
+ body?: unknown;
16
+ error?: string;
17
+ }
18
+ export declare function parseReportRequest(req: NodeJS.ReadableStream & {
19
+ headers: Record<string, string | string[] | undefined>;
20
+ }): Promise<IParsedReportRequest>;
21
+ export declare function parseReportBody(contentType: string, rawBody: Uint8Array): Promise<IParsedReportRequest>;
@@ -8,6 +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 ErrorReportAttachments from "@wayward/utilities/log/ErrorReportAttachments";
11
12
  export interface IDiscordMessage {
12
13
  color?: number;
13
14
  author?: string;
@@ -15,5 +16,6 @@ export interface IDiscordMessage {
15
16
  url?: string;
16
17
  description?: string;
17
18
  footer?: string;
19
+ attachments?: ErrorReportAttachments.IAttachment[];
18
20
  }
19
21
  export default function (message: IDiscordMessage): Promise<void>;
@@ -0,0 +1,13 @@
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
+ import type { TestConfig } from "@wayward/test";
12
+ import type { IPaths } from "@wayward/test/interfaces";
13
+ export default function (paths: IPaths, config: TestConfig): void;
@@ -0,0 +1,30 @@
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 namespace ErrorReportAttachments {
12
+ const MAX_ATTACHMENTS = 4;
13
+ const MAX_ATTACHMENT_BYTES: number;
14
+ const MAX_TOTAL_ATTACHMENT_BYTES: number;
15
+ interface IAttachment {
16
+ filename: string;
17
+ contentType: string;
18
+ contents: string;
19
+ }
20
+ interface IValidationResult {
21
+ attachments: IAttachment[];
22
+ error?: string;
23
+ totalBytes: number;
24
+ }
25
+ function validate(attachments: readonly IAttachment[] | undefined): IValidationResult;
26
+ function isAcceptedContentType(contentType: string): boolean;
27
+ function isSafeFilename(filename: string): boolean;
28
+ function byteLength(contents: string): number;
29
+ }
30
+ export default ErrorReportAttachments;
@@ -10,6 +10,7 @@
10
10
  */
11
11
  import type { CallsiteMatcher } from "@wayward/utilities/Errors";
12
12
  import Log, { type ILog } from "@wayward/utilities/Log";
13
+ import ErrorReportAttachments from "@wayward/utilities/log/ErrorReportAttachments";
13
14
  import Version from "@wayward/utilities/Version";
14
15
  declare namespace ErrorReporting {
15
16
  export interface ICallerOptions {
@@ -28,6 +29,7 @@ declare namespace ErrorReporting {
28
29
  stack?: string;
29
30
  shouldNotifyPlayer?: boolean;
30
31
  shouldSendRemote?: boolean;
32
+ attachments?: ErrorReportAttachments.IAttachment[];
31
33
  }
32
34
  export interface IEvents {
33
35
  logError(report: IReport): any;
@@ -41,6 +43,7 @@ declare namespace ErrorReporting {
41
43
  error?: Error;
42
44
  stack?: string;
43
45
  source: string[];
46
+ attachments?: ErrorReportAttachments.IAttachment[];
44
47
  private hash?;
45
48
  private oncePerSessionAllowed?;
46
49
  constructor(options: ICaptureOptions);
@@ -57,6 +60,7 @@ declare namespace ErrorReporting {
57
60
  logWarning(source: string | string[]): this;
58
61
  logWarning(log: ILog): this;
59
62
  notifyPlayer(): this;
63
+ attachText(filename: string, contents: string, contentType?: string): this;
60
64
  sendToServer(remoteId?: string): this;
61
65
  private shouldExecute;
62
66
  private snapshot;
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.5-beta.dev.20260529.1",
4
+ "version": "2.15.5-beta.dev.20260531.1",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",