@wayward/types 2.14.2-beta.dev.20241219.1 → 2.14.2-beta.dev.20241220.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.
@@ -93,6 +93,7 @@ export declare abstract class InfoProvider extends EventEmitter.Host<IInfoProvid
93
93
  protected component?: Component;
94
94
  protected context?: InfoProviderContext;
95
95
  private componentClass?;
96
+ private listeningForRequestRemove?;
96
97
  abstract get(context: InfoProviderContext): ArrayOr<TranslationGenerator | InfoProvider>;
97
98
  abstract getClass(context: InfoProviderContext): string[];
98
99
  getDefaultDisplayLevel(_context: InfoProviderContext): InfoDisplayLevel | Set<InfoDisplayLevel>;
@@ -32,7 +32,7 @@ export default abstract class InspectionsHandler extends EventEmitter.Host<IInsp
32
32
  all(): IteratorObject<[InspectType, HashSet<Inspection<any>>]>;
33
33
  getInspectTypes(): InspectType[];
34
34
  register(): void;
35
- deregister(): void;
35
+ deregister(isBeingRemoved?: boolean): void;
36
36
  protected getInspections?(inspectType: InspectType): HashSet<Inspection<any>>;
37
37
  protected createInspectionSet(...values: Array<IterableOr<Inspection<any> | undefined>>): HashSet<Inspection<any>>;
38
38
  protected updateInspections(...inspectTypes: InspectType[]): void;
@@ -153,6 +153,8 @@ export default class GameScreen extends Screen {
153
153
  protected onRespawn(): void;
154
154
  protected onEntityMoved(object: EntityMovable, lastTile: Tile, tile: Tile): void;
155
155
  protected onAscendDescend(api: IBindHandlerApi): boolean;
156
+ protected onPickUpItem(api: IBindHandlerApi): boolean;
157
+ protected onPickUpAllItems(api: IBindHandlerApi): boolean;
156
158
  protected onZoom(api: IBindHandlerApi): boolean;
157
159
  protected onInspect(api: IBindHandlerApi): boolean;
158
160
  protected onScreenshotMode(): boolean;
@@ -18,7 +18,7 @@ import Component from "@wayward/game/ui/component/Component";
18
18
  import type { TranslationGenerator } from "@wayward/game/ui/component/IComponent";
19
19
  import type HashSet from "@wayward/utilities/collection/set/HashSet";
20
20
  import type { Events, IEventEmitter } from "@wayward/utilities/event/EventEmitter";
21
- import ResolvablePromise from "@wayward/utilities/promise/ResolvablePromise";
21
+ import { PromiseSequence } from "@wayward/utilities/promise/PromiseSequence";
22
22
  export interface ITileInspectionsEvents extends Events<Component> {
23
23
  refreshed(isValid?: boolean): any;
24
24
  updateInspectTypeFilter(): any;
@@ -30,8 +30,9 @@ 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?;
33
34
  protected inspectionsHandler?: InspectionsHandler;
34
- protected refreshInspectionsOfTypeRunning?: ResolvablePromise;
35
+ protected refreshPromiseSequence: PromiseSequence;
35
36
  protected inspectionsHandlerUpdatedInspectionsCallback?: (_: any, inspectType: InspectType, inspections: HashSet<Inspection<any>>, oldInspections: HashSet<Inspection<any>> | undefined) => void;
36
37
  private displayLevel;
37
38
  private readonly inspectTypeWrappers;
@@ -50,5 +51,6 @@ export default abstract class InspectionsList<INSPECTIONS_HANDLER extends Inspec
50
51
  protected getInvalidTranslation?(): TranslationGenerator | undefined;
51
52
  private deregisterInspectionsHandler;
52
53
  private refreshInspectionsOfType;
54
+ private _refreshInspectionsOfType;
53
55
  private initializeTooltipSection;
54
56
  }
@@ -0,0 +1,20 @@
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
+ /**
12
+ * Allows queuing up a promise and resolving it once it runs.
13
+ * Promises will run sequentially in FIFO
14
+ */
15
+ export declare class PromiseSequence {
16
+ private readonly _promises;
17
+ get length(): number;
18
+ wait(): Promise<void>;
19
+ run<T>(executor: () => Promise<T>): Promise<T>;
20
+ }
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.2-beta.dev.20241219.1",
4
+ "version": "2.14.2-beta.dev.20241220.1",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",