@wayward/types 2.13.0-beta.dev.20230407.1 → 2.13.0-beta.dev.20230408.2

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 (34) hide show
  1. package/definitions/game/audio/Audio.d.ts +21 -11
  2. package/definitions/game/audio/IAudio.d.ts +0 -15
  3. package/definitions/game/event/EventBuses.d.ts +2 -2
  4. package/definitions/game/event/EventEmitter.d.ts +5 -1
  5. package/definitions/game/event/EventManager.d.ts +1 -1
  6. package/definitions/game/game/entity/Entity.d.ts +1 -1
  7. package/definitions/game/game/entity/EntityMovable.d.ts +1 -1
  8. package/definitions/game/game/entity/Human.d.ts +4 -1
  9. package/definitions/game/game/entity/action/usable/actions/UsableActionsWorld.d.ts +1 -1
  10. package/definitions/game/game/entity/player/IMessageManager.d.ts +4 -4
  11. package/definitions/game/game/entity/player/MessageManager.d.ts +5 -4
  12. package/definitions/game/game/inspection/InfoProvider.d.ts +1 -1
  13. package/definitions/game/game/inspection/infoProviders/LabelledValue.d.ts +1 -1
  14. package/definitions/game/game/inspection/infoProviders/creature/CreatureTamedInfo.d.ts +1 -1
  15. package/definitions/game/game/inspection/infoProviders/item/ItemDetails.d.ts +1 -1
  16. package/definitions/game/game/inspection/infoProviders/stat/AttackInfo.d.ts +1 -1
  17. package/definitions/game/game/inspection/inspections/CorpseInspection.d.ts +1 -1
  18. package/definitions/game/game/reference/ReferenceManager.d.ts +1 -1
  19. package/definitions/game/game/tile/Tile.d.ts +1 -1
  20. package/definitions/game/language/ITranslation.d.ts +6 -1
  21. package/definitions/game/language/dictionary/Message.d.ts +908 -907
  22. package/definitions/game/language/dictionary/UiTranslation.d.ts +878 -876
  23. package/definitions/game/language/impl/TranslationImpl.d.ts +3 -4
  24. package/definitions/game/renderer/world/WorldRenderer.d.ts +1 -1
  25. package/definitions/game/ui/old/screens/InGameScreen.d.ts +3 -2
  26. package/definitions/game/ui/screen/screens/game/IMessages.d.ts +1 -1
  27. package/definitions/game/ui/screen/screens/game/dialog/BookDialog.d.ts +1 -1
  28. package/definitions/game/ui/screen/screens/game/dialog/EquipmentDialog.d.ts +2 -1
  29. package/definitions/game/ui/screen/screens/game/dialog/IslandsSailDialog.d.ts +0 -1
  30. package/definitions/game/ui/screen/screens/game/dialog/MessagesEditFiltersDialog.d.ts +7 -0
  31. package/definitions/game/ui/screen/screens/game/static/Messages.d.ts +3 -2
  32. package/definitions/game/utilities/math/Rectangle.d.ts +3 -1
  33. package/definitions/hosts/electron/main/launchOptions.d.ts +1 -0
  34. package/package.json +1 -1
@@ -8,11 +8,10 @@
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 IAudio from "audio/IAudio";
12
11
  import { Music, SfxType } from "audio/IAudio";
13
12
  import EventEmitter from "event/EventEmitter";
14
- import type Island from "game/island/Island";
15
13
  import type EnumCursor from "utilities/enum/EnumCursor";
14
+ import type { IVector4 } from "utilities/math/Vector4";
16
15
  export declare enum Fading {
17
16
  None = 0,
18
17
  In = 1,
@@ -21,16 +20,20 @@ export declare enum Fading {
21
20
  export interface IAudioEvents {
22
21
  init(): any;
23
22
  /**
24
- * Called when a sound effect is queued
23
+ * Called when a ui sound effect is played
25
24
  * @param type The sound effect type
26
- * @param x The x location in the world for the effect
27
- * @param y The y location in the world for the effect
28
- * @param z The z location in the world for the effect
29
25
  * @returns False to cancel the sound effect, a sound effect to play instead of the given one, or undefined to use the default logic
30
26
  */
31
- queueSoundEffect?(type: SfxType, x: number, y: number, z: number): SfxType | boolean | undefined;
27
+ playUiSoundEffect?(type: SfxType): SfxType | boolean | undefined;
28
+ /**
29
+ * Called when a game sound effect is queued
30
+ * @param type The sound effect type
31
+ * @param position The position of the sound effect
32
+ * @returns False to cancel the sound effect, a sound effect to play instead of the given one, or undefined to use the default logic
33
+ */
34
+ queueGameSoundEffect?(type: SfxType, position: IVector4): SfxType | boolean | undefined;
32
35
  }
33
- export default class WAudio extends EventEmitter.Host<IAudioEvents> implements IAudio {
36
+ export default class WAudio extends EventEmitter.Host<IAudioEvents> {
34
37
  private readonly _musicInfo;
35
38
  private readonly _sfxInfo;
36
39
  private readonly _soundQueue;
@@ -67,11 +70,18 @@ export default class WAudio extends EventEmitter.Host<IAudioEvents> implements I
67
70
  updateMusicSpeed(speed: number): Promise<void>;
68
71
  updateVolume(): void;
69
72
  updatePosition(): Promise<void>;
70
- queueEffect(type: SfxType, island: Island | undefined, x: number, y: number, z: number, delay?: number, speed?: number, noPosition?: boolean, force?: boolean): void;
71
- processEffects(): void;
73
+ /**
74
+ * Plays a ui sound effect (a sound effect with no position)
75
+ */
76
+ playUiSoundEffect(sfxType: SfxType, speed?: number): void;
77
+ /**
78
+ * Plays a sound effect (game / location based)
79
+ */
80
+ queueGameSoundEffect(type: SfxType, position: IVector4, delay?: number, speed?: number): void;
81
+ processGameSounds(): void;
72
82
  private _stopMusic;
73
83
  private _playMusic;
74
- private _playEffect;
84
+ private _playSound;
75
85
  private _isComparableSound;
76
86
  private _getAudioBuffer;
77
87
  private initializeAudio;
@@ -8,21 +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 type Island from "game/island/Island";
12
- import type EnumCursor from "utilities/enum/EnumCursor";
13
- export interface IAudio {
14
- resetMusicHandler(): void;
15
- getMusicHandler(): EnumCursor<Music>;
16
- setMusicHandler(handler: EnumCursor<Music>): void;
17
- playMusic(): void;
18
- stopMusic(): void;
19
- processEffects(): void;
20
- queueEffect(soundEffect: SfxType, island: Island | undefined, x: number, y: number, z: number, delay?: number, speed?: number, noPosition?: boolean): void;
21
- updateMusicSpeed(speed: number): void;
22
- updatePosition(): void;
23
- updateVolume(): void;
24
- }
25
- export default IAudio;
26
11
  export declare enum SfxType {
27
12
  Boat = 0,
28
13
  Bow = 1,
@@ -127,8 +127,8 @@ export interface IEventBusRegistration {
127
127
  export default eventBuses;
128
128
  export declare module EventBus {
129
129
  function register<E extends EventBus>(eventBus: E, classOrHost: ReturnType<(typeof eventBuses)[E]>): void;
130
- function register(eventBus: EventBus): (constructor: AbstractNullaryClass<any>) => void;
131
- function unregister(eventBus: EventBus): void;
130
+ function register(eventBus: EventBus): (constructor: AbstractNullaryClass<any>) => any;
131
+ function unregister(eventBus: EventBus): boolean;
132
132
  function onEventBusRegistration(eventBus: EventBus, registration: IEventBusRegistration): void;
133
133
  }
134
134
  export type EventBusHost<E extends EventBus> = ReturnType<(typeof eventBuses)[E]>;
@@ -18,6 +18,7 @@ export declare enum Priority {
18
18
  }
19
19
  export declare const SYMBOL_SUBSCRIPTIONS: unique symbol;
20
20
  export declare const SYMBOL_SUPERCLASSES: unique symbol;
21
+ export declare const SYMBOL_SUBSCRIPTION_STATE_IDS: unique symbol;
21
22
  type Abstract<T> = Function & {
22
23
  prototype: T;
23
24
  };
@@ -32,6 +33,7 @@ export type EventPriorityMap = PriorityMap<Set<ReadonlyArray<string | Handler<an
32
33
  export interface ITrueEventEmitterHostClass<E> extends Class<any> {
33
34
  [SYMBOL_SUPERCLASSES]: Array<ITrueEventEmitterHostClass<E>>;
34
35
  [SYMBOL_SUBSCRIPTIONS]: Map<any, Map<keyof E, EventPriorityMap>>;
36
+ [SYMBOL_SUBSCRIPTION_STATE_IDS]: Map<keyof E, number>;
35
37
  }
36
38
  export interface ISelfSubscribedEmitter<E> {
37
39
  [SYMBOL_SUBSCRIPTIONS]: Array<[ISelfSubscribedEmitter<any>, keyof E, string | number | symbol, number?]>;
@@ -39,6 +41,7 @@ export interface ISelfSubscribedEmitter<E> {
39
41
  type ArgsOf<F> = ArgumentsOf<Extract<F, AnyFunction>>;
40
42
  type ReturnOf<F> = ReturnType<Extract<F, AnyFunction>>;
41
43
  type Handler<H, F> = (host: H, ...args: ArgsOf<F>) => ReturnOf<F>;
44
+ type WeakHandler<H, F> = WeakRef<Handler<H, F>>;
42
45
  type UndefinedFromVoid<V> = V extends void ? undefined : V;
43
46
  export interface IEventEmitter<H = any, E = any> {
44
47
  event: IEventEmitter<this, IEventEmitterEvents<H, E>>;
@@ -95,7 +98,8 @@ declare class EventEmitter<H, E> implements IEventEmitter<H, E> {
95
98
  until(promise: Promise<any>): IUntilSubscriber<H, E>;
96
99
  hasHandlersForEvent(...events: Array<keyof E>): boolean;
97
100
  private copyFrom;
98
- protected handlersForEvent<K extends keyof E>(event: K, ignoreClassSubscriptions?: true): Array<keyof H | Handler<any, any>>;
101
+ private readonly cachedClassHandlers;
102
+ protected handlersForEvent<K extends keyof E>(event: K, ignoreClassSubscriptions?: true): Array<keyof H | WeakHandler<any, any>>;
99
103
  }
100
104
  declare module EventEmitter {
101
105
  class Host<E> implements IEventEmitterHost<E> {
@@ -10,8 +10,8 @@
10
10
  */
11
11
  import type { EventBusHost } from "event/EventBuses";
12
12
  import { EventBus } from "event/EventBuses";
13
- import type { Events, IEventEmitterHost, IEventEmitterHostClass } from "event/EventEmitter";
14
13
  import type EventEmitter from "event/EventEmitter";
14
+ import type { Events, IEventEmitterHost, IEventEmitterHostClass } from "event/EventEmitter";
15
15
  type HostOrHostClass = IEventEmitterHost<any> | IEventEmitterHostClass<any>;
16
16
  type HostFromHostOrHostClass<H> = H extends {
17
17
  event: EventEmitter<null, any>;
@@ -95,7 +95,7 @@ export default abstract class Entity<DescriptionType = unknown, TypeType extends
95
95
  isInFov(): boolean;
96
96
  setInFov(inFov: boolean): void;
97
97
  isOnFire(): FireType;
98
- queueSoundEffect(type: SfxType, delay?: number, speed?: number, noPosition?: boolean): void;
98
+ queueSoundEffect(type: SfxType, delay?: number, speed?: number): void;
99
99
  updateRender(source: RenderSource, flag: UpdateRenderFlag): void;
100
100
  updateView(source: RenderSource, updateFov?: boolean | UpdateRenderFlag.FieldOfView | UpdateRenderFlag.FieldOfViewSkipTransition): void;
101
101
  notifyItem(itemNotifierType: ItemNotifierType, item: Item): void;
@@ -95,7 +95,7 @@ export default abstract class EntityMovable<DescriptionType = unknown, TypeType
95
95
  }, fieldOfView?: FieldOfView, customRadius?: number): boolean;
96
96
  canSeeTile(type: CanASeeBType, tile: Tile, fieldOfView?: FieldOfView, customRadius?: number): boolean;
97
97
  canSeePosition(type: CanASeeBType, islandId: IslandId, x: number, y: number, z: number, fieldOfView?: FieldOfView | undefined, customRadius?: number): boolean;
98
- queueSoundEffectInFront(type: SfxType, delay?: number, speed?: number, noPosition?: boolean): void;
98
+ queueSoundEffectInFront(type: SfxType, delay?: number, speed?: number): void;
99
99
  getMovementDelay(): number;
100
100
  moveTo(tile: Tile, options?: IMoveToOptions): boolean;
101
101
  /**
@@ -173,7 +173,10 @@ export default abstract class Human<TypeType extends number = number> extends En
173
173
  loadUi(): void;
174
174
  startResting(restData: IRestData): void;
175
175
  cancelResting(reason: RestCancelReason): boolean;
176
- findPathToPort(portId: number, startReversed?: boolean, ensureVehicleIsAllowed?: boolean): Tile[] | undefined;
176
+ findPathToPort(portId: number, options?: Partial<{
177
+ startReversed: boolean;
178
+ requireBoat: boolean;
179
+ }>): Tile[] | undefined;
177
180
  addTamedCreature(creature: Creature): void;
178
181
  removeTamedCreature(creature: Creature): boolean;
179
182
  resetMovementIntent(): void;
@@ -17,7 +17,7 @@ export declare enum WorldContextMenuClasses {
17
17
  OptionText = "world-context-menu-option-text"
18
18
  }
19
19
  export declare namespace WorldContextMenuClasses {
20
- const OptionSpecific: (enumValue: UsableActionType) => "world-context-menu-option-none" | "world-context-menu-option-actions" | "world-context-menu-option-use" | "world-context-menu-option-move" | "world-context-menu-option-quickslotremove" | "world-context-menu-option-quickslotadd" | "world-context-menu-option-quickslotaddtofree" | "world-context-menu-option-quickslotaddtoslot" | "world-context-menu-option-movetoinventory" | "world-context-menu-option-dropmenu" | "world-context-menu-option-dropall" | "world-context-menu-option-dropallofsamequality" | "world-context-menu-option-repairwithitem" | "world-context-menu-option-reinforcewithitem" | "world-context-menu-option-enhancewithitem" | "world-context-menu-option-enchantwithitem" | "world-context-menu-option-transmogrifywithitem" | "world-context-menu-option-upgradewithitem" | "world-context-menu-option-alterwithitem" | "world-context-menu-option-refinewithitem" | "world-context-menu-option-preservewithitem" | "world-context-menu-option-addfuelwithitem" | "world-context-menu-option-ignitewithitem" | "world-context-menu-option-absorbwithitem" | "world-context-menu-option-exudewithitem" | "world-context-menu-option-movetoinventorymenu" | "world-context-menu-option-movetoactivecontainermenu" | "world-context-menu-option-movetofacingcontainermenu" | "world-context-menu-option-moveall" | "world-context-menu-option-moveallofsamequality" | "world-context-menu-option-tradetradersell" | "world-context-menu-option-tradetraderbuy" | "world-context-menu-option-itemactions" | "world-context-menu-option-gatherwithhands" | "world-context-menu-option-harvestwithhands" | "world-context-menu-option-digwithhands" | "world-context-menu-option-tillwithhands" | "world-context-menu-option-pickupexcrementwithhands" | "world-context-menu-option-equipheld" | "world-context-menu-option-equiplegs" | "world-context-menu-option-equipchest" | "world-context-menu-option-equiphead" | "world-context-menu-option-equipwaist" | "world-context-menu-option-equipfeet" | "world-context-menu-option-equipneck" | "world-context-menu-option-equiphands" | "world-context-menu-option-equipback" | "world-context-menu-option-equipmainhand" | "world-context-menu-option-equipoffhand" | "world-context-menu-option-restonground" | "world-context-menu-option-sleeponground" | "world-context-menu-option-commandmenu" | "world-context-menu-option-commandfollowclose" | "world-context-menu-option-commandfollowfar" | "world-context-menu-option-commandstay" | "world-context-menu-option-commanddefend" | "world-context-menu-option-commandattack";
20
+ const OptionSpecific: (enumValue: UsableActionType) => "world-context-menu-option-none" | "world-context-menu-option-actions" | "world-context-menu-option-use" | "world-context-menu-option-move" | "world-context-menu-option-commandattack" | "world-context-menu-option-commanddefend" | "world-context-menu-option-commandfollowclose" | "world-context-menu-option-commandfollowfar" | "world-context-menu-option-commandstay" | "world-context-menu-option-digwithhands" | "world-context-menu-option-dropall" | "world-context-menu-option-dropallofsamequality" | "world-context-menu-option-gatherwithhands" | "world-context-menu-option-harvestwithhands" | "world-context-menu-option-movetoinventory" | "world-context-menu-option-pickupexcrementwithhands" | "world-context-menu-option-restonground" | "world-context-menu-option-tillwithhands" | "world-context-menu-option-quickslotremove" | "world-context-menu-option-quickslotadd" | "world-context-menu-option-quickslotaddtofree" | "world-context-menu-option-quickslotaddtoslot" | "world-context-menu-option-dropmenu" | "world-context-menu-option-repairwithitem" | "world-context-menu-option-reinforcewithitem" | "world-context-menu-option-enhancewithitem" | "world-context-menu-option-enchantwithitem" | "world-context-menu-option-transmogrifywithitem" | "world-context-menu-option-upgradewithitem" | "world-context-menu-option-alterwithitem" | "world-context-menu-option-refinewithitem" | "world-context-menu-option-preservewithitem" | "world-context-menu-option-addfuelwithitem" | "world-context-menu-option-ignitewithitem" | "world-context-menu-option-absorbwithitem" | "world-context-menu-option-exudewithitem" | "world-context-menu-option-movetoinventorymenu" | "world-context-menu-option-movetoactivecontainermenu" | "world-context-menu-option-movetofacingcontainermenu" | "world-context-menu-option-moveall" | "world-context-menu-option-moveallofsamequality" | "world-context-menu-option-tradetradersell" | "world-context-menu-option-tradetraderbuy" | "world-context-menu-option-itemactions" | "world-context-menu-option-equipheld" | "world-context-menu-option-equiplegs" | "world-context-menu-option-equipchest" | "world-context-menu-option-equiphead" | "world-context-menu-option-equipwaist" | "world-context-menu-option-equipfeet" | "world-context-menu-option-equipneck" | "world-context-menu-option-equiphands" | "world-context-menu-option-equipback" | "world-context-menu-option-equipmainhand" | "world-context-menu-option-equipoffhand" | "world-context-menu-option-sleeponground" | "world-context-menu-option-commandmenu";
21
21
  }
22
22
  export declare const UsableActionsWorldActions: UsableActionGenerator<[]>;
23
23
  export declare const UsableActionsWorldItemActions: UsableActionGenerator<[]>;
@@ -11,9 +11,9 @@
11
11
  import type Stream from "@wayward/goodstream";
12
12
  import type Human from "game/entity/Human";
13
13
  import type Island from "game/island/Island";
14
- import type Message from "language/dictionary/Message";
15
- import type { ISerializedTranslation } from "language/ITranslation";
14
+ import type { ISerializedTranslation, TranslationArg } from "language/ITranslation";
16
15
  import type Translation from "language/Translation";
16
+ import type Message from "language/dictionary/Message";
17
17
  import type { IVector4 } from "utilities/math/Vector4";
18
18
  import type { IStringSection } from "utilities/string/Interpolator";
19
19
  export declare enum Source {
@@ -116,9 +116,9 @@ export interface IMessageManager {
116
116
  type(type?: MessageType): this;
117
117
  ifVisible(canSee?: IVector4): this;
118
118
  ifOnIsland(island: Island): this;
119
- send(message: Message | Translation, ...args: any[]): boolean;
119
+ send(message: Message | Translation, ...args: TranslationArg[]): boolean;
120
120
  sendPacked(pack: Partial<IPackedMessage>, ...extraSources: Source[]): boolean;
121
- pruneMessageHistory(): boolean;
121
+ pruneMessageHistory(isLocalPlayer: boolean): boolean;
122
122
  ifIs(human: Human): this;
123
123
  ifIsNot(human: Human): this;
124
124
  addToHistory(messageHistoryItem: IMessageHistoryItem): void;
@@ -15,6 +15,7 @@ import { MessageType, Source } from "game/entity/player/IMessageManager";
15
15
  import type Player from "game/entity/player/Player";
16
16
  import type Island from "game/island/Island";
17
17
  import Message from "language/dictionary/Message";
18
+ import type { TranslationArg } from "language/ITranslation";
18
19
  import Translation from "language/Translation";
19
20
  import type { IVector4 } from "utilities/math/Vector4";
20
21
  export declare class MessageManagerNoOp implements IMessageManager {
@@ -30,13 +31,13 @@ export declare class MessageManagerNoOp implements IMessageManager {
30
31
  send(): boolean;
31
32
  sendPacked(): boolean;
32
33
  sentToAll(sentToAll?: boolean): this;
33
- pruneMessageHistory(): boolean;
34
+ pruneMessageHistory(isLocalPlayer: boolean): boolean;
34
35
  addToHistory(messageHistoryItem: IMessageHistoryItem): void;
35
36
  }
36
37
  export interface IMessageManagerOptions {
37
38
  shouldDisplayMessage(message: IMessage, id: number): boolean | undefined;
38
39
  onDisplayMessage(message: IMessage): void;
39
- getMessageStorageMax(): number;
40
+ getMessageStorageMax(isLocalPlayer: boolean): number;
40
41
  }
41
42
  export default class MessageManager implements IMessageManager {
42
43
  private readonly options;
@@ -70,7 +71,7 @@ export default class MessageManager implements IMessageManager {
70
71
  /**
71
72
  * Cuts the message history down to the correct bounds (preferring the more recent messages)
72
73
  */
73
- pruneMessageHistory(): boolean;
74
+ pruneMessageHistory(isLocalPlayer: boolean): boolean;
74
75
  /**
75
76
  * Clears the entire message history.
76
77
  */
@@ -114,7 +115,7 @@ export default class MessageManager implements IMessageManager {
114
115
  *
115
116
  * Note: After sending a message, the message source, type, and human (if any) are reset.
116
117
  */
117
- send(message: Message | Translation, ...args: any[]): boolean;
118
+ send(message: Message | Translation, ...args: TranslationArg[]): boolean;
118
119
  sendPacked(pack: Partial<IPackedMessage>, ...extraSources: Source[]): boolean;
119
120
  addToHistory(messageHistoryItem: IMessageHistoryItem): void;
120
121
  /**
@@ -141,7 +141,7 @@ export declare class SimpleInfoProvider extends InfoProvider {
141
141
  private childComponentClass;
142
142
  private validWhen?;
143
143
  constructor(...translations: Array<TranslationGenerator | InfoProvider>);
144
- get(): (import("../../language/ITranslation").ISerializedTranslation | import("../../language/impl/TranslationImpl").default | import("../../language/dictionary/UiTranslation").default | (() => import("../../language/ITranslation").ISerializedTranslation | import("../../language/impl/TranslationImpl").default | import("../../language/dictionary/UiTranslation").default | Iterable<import("../../utilities/string/Interpolator").IStringSection> | undefined) | InfoProvider)[];
144
+ get(): (import("../../language/ITranslation").ISerializedTranslation | import("../../language/impl/TranslationImpl").default | import("../../language/dictionary/UiTranslation").default | (() => import("../../language/ITranslation").ISerializedTranslation | import("../../language/impl/TranslationImpl").default | Iterable<import("../../utilities/string/Interpolator").IStringSection> | import("../../language/dictionary/UiTranslation").default | undefined) | InfoProvider)[];
145
145
  add(...translations: Array<TranslationGenerator | InfoProvider | Falsy>): this;
146
146
  onlyIfHasContents(): this | undefined;
147
147
  addInfoGetter(provider: () => InfoProvider | undefined): this;
@@ -38,7 +38,7 @@ export default class LabelledValue extends InfoProvider {
38
38
  getClass(): string[];
39
39
  addClasses(...classes: string[]): this;
40
40
  private getLabel;
41
- get(): (import("../../../language/impl/TranslationImpl").default | UiTranslation | InfoProvider)[];
41
+ get(): Array<Translation | InfoProvider>;
42
42
  protected initChildTextComponent(text: TranslationGenerator): Text;
43
43
  setDisplayMode(mode: keyof typeof LabelledValueDisplayMode): this;
44
44
  setDisplayMode(mode: keyof typeof LabelledValueDisplayMode): this;
@@ -18,7 +18,7 @@ export default class CreatureTamedInfoProvider extends InfoProvider {
18
18
  constructor(creature: Creature);
19
19
  getClass(): string[];
20
20
  hasContent(): boolean;
21
- get(): (LabelledValue | import("game/inspection/InfoProvider").SimpleInfoProvider)[];
21
+ get(): (import("game/inspection/InfoProvider").SimpleInfoProvider | LabelledValue)[];
22
22
  onTickEnd(): void;
23
23
  private getHappinessMessage;
24
24
  }
@@ -19,7 +19,7 @@ export default class ItemDetailsInfoProvider extends InfoProvider {
19
19
  private readonly description;
20
20
  constructor(item: Item | ItemType);
21
21
  getClass(): string[];
22
- get(): (0 | LabelledValue | import("game/inspection/InfoProvider").SimpleInfoProvider | ItemWorthInfoProvider)[];
22
+ get(): (0 | import("game/inspection/InfoProvider").SimpleInfoProvider | LabelledValue | ItemWorthInfoProvider)[];
23
23
  private getInsulation;
24
24
  private getPreservation;
25
25
  private getGroupings;
@@ -15,7 +15,7 @@ export default class AttackInfo extends InfoProvider {
15
15
  private readonly human?;
16
16
  constructor(human?: Human<number> | undefined);
17
17
  getClass(): string[];
18
- get(): (LabelledValue | import("game/inspection/InfoProvider").SimpleInfoProvider)[];
18
+ get(): (import("game/inspection/InfoProvider").SimpleInfoProvider | LabelledValue)[];
19
19
  private getTactics;
20
20
  private getMainHand;
21
21
  private getOffHand;
@@ -19,7 +19,7 @@ export default class CorpseInspection extends Inspection<Corpse> {
19
19
  static getFromTile(tile: Tile): CorpseInspection[];
20
20
  static handles(type: InspectType, corpse: unknown): boolean;
21
21
  constructor(corpse: Corpse);
22
- get(context: InfoProviderContext): (0 | LabelledValue | import("game/inspection/InfoProvider").SimpleInfoProvider)[];
22
+ get(context: InfoProviderContext): (0 | import("game/inspection/InfoProvider").SimpleInfoProvider | LabelledValue)[];
23
23
  private getDecay;
24
24
  private decay;
25
25
  private shouldRefreshDecay;
@@ -33,7 +33,7 @@ export default class ReferenceManager {
33
33
  constructor(game: Game);
34
34
  create(): number;
35
35
  reset(): void;
36
- getList(type: ReferenceType, gameIsland?: Island): import("../entity/creature/corpse/CorpseManager").default | import("../entity/creature/CreatureManager").default | import("../doodad/DoodadManager").default | import("../item/ItemManager").default | import("../entity/npc/NPCManager").default | import("../tile/TileEventManager").default | Player[] | import("game/entity/IHuman").EquipType[] | readonly SkillType[] | readonly Milestone[] | readonly ItemType[] | IterableIterator<Island> | readonly Stat[] | (string | ActionType)[];
36
+ getList(type: ReferenceType, gameIsland?: Island): import("../entity/creature/corpse/CorpseManager").default | import("../entity/creature/CreatureManager").default | import("../doodad/DoodadManager").default | import("../item/ItemManager").default | import("../entity/npc/NPCManager").default | import("../tile/TileEventManager").default | Player[] | import("game/entity/IHuman").EquipType[] | readonly Milestone[] | readonly SkillType[] | IterableIterator<Island> | readonly Stat[] | readonly ItemType[] | (string | ActionType)[];
37
37
  get(thing: Item): Reference<ReferenceType.Item> | undefined;
38
38
  get(thing: Doodad): Reference<ReferenceType.Doodad> | undefined;
39
39
  get(thing: Creature): Reference<ReferenceType.Creature> | undefined;
@@ -206,7 +206,7 @@ export default class Tile implements IVector4, Partial<ITileContainer>, IFieldOf
206
206
  * @returns TerrainType that we should switch the tile into.
207
207
  */
208
208
  private canSwitchCave;
209
- queueSoundEffect(type: SfxType, delay?: number, speed?: number, noPosition?: boolean, force?: boolean): void;
209
+ queueSoundEffect(type: SfxType, delay?: number, speed?: number): void;
210
210
  createParticles(particle: IRGB | undefined, count?: number, intensity?: number): void;
211
211
  /**
212
212
  * Finds either lava or water ajacent to either lava or water, and cools the lava down based its findings.
@@ -9,6 +9,7 @@
9
9
  * https://github.com/WaywardGame/types/wiki
10
10
  */
11
11
  import type { Reference } from "game/reference/IReferenceManager";
12
+ import type Translation from "language/Translation";
12
13
  import type { Segment } from "language/segment/Segments";
13
14
  import type { IInterpolationOptions, IStringSection } from "utilities/string/Interpolator";
14
15
  export declare enum ListEnder {
@@ -28,7 +29,7 @@ export interface ISerializedTranslation {
28
29
  id: string;
29
30
  context?: TextContext;
30
31
  normalize?: true;
31
- args?: Array<string | number | boolean | any[] | object | ISerializedTranslation>;
32
+ args?: TranslationArg[];
32
33
  failWith?: string | ISerializedTranslation | IStringSection[];
33
34
  reformatters?: ISerializedTranslation[];
34
35
  reference?: Reference;
@@ -39,3 +40,7 @@ export interface ISerializedInterpolator {
39
40
  options?: IInterpolationOptions;
40
41
  segments?: Segment[];
41
42
  }
43
+ export type TranslationArg = string | number | boolean | Translation | ISerializedTranslation | IStringSection | Iterable<IStringSection> | TranslationArg[] | ITranslationArgRecord | (() => TranslationArg) | undefined | null;
44
+ export interface ITranslationArgRecord {
45
+ [key: string]: ITranslationArgRecord | TranslationArg;
46
+ }