@wayward/types 2.14.2-beta.dev.20241218.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.
- package/definitions/game/game/entity/Entity.d.ts +2 -2
- package/definitions/game/game/entity/EntityMovable.d.ts +2 -1
- package/definitions/game/game/inspection/InfoProvider.d.ts +1 -0
- package/definitions/game/game/inspection/InspectionsHandler.d.ts +1 -1
- package/definitions/game/language/dictionary/UiTranslation.d.ts +553 -552
- package/definitions/game/ui/screen/screens/GameScreen.d.ts +2 -0
- package/definitions/game/ui/screen/screens/game/component/InspectionsList.d.ts +4 -2
- package/definitions/game/ui/screen/screens/game/component/ItemComponent.d.ts +1 -1
- package/definitions/game/ui/screen/screens/game/dialog/EquipmentDialog.d.ts +1 -1
- package/definitions/game/ui/util/HighlightManager.d.ts +1 -1
- package/definitions/game/ui/util/IHighlight.d.ts +1 -1
- package/definitions/utilities/promise/PromiseSequence.d.ts +20 -0
- package/package.json +1 -1
- /package/definitions/utilities/{Encoding.d.ts → RunLengthEncoding.d.ts} +0 -0
@@ -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
|
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
|
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
|
}
|
@@ -241,7 +241,7 @@ export default class ItemComponent extends Component implements ItemSlot {
|
|
241
241
|
get actionSlots(): ReadonlySet<number> | undefined;
|
242
242
|
private _equipSlot;
|
243
243
|
get equipSlot(): EquipType;
|
244
|
-
refresh(refreshType: ItemRefreshType): this;
|
244
|
+
refresh(refreshType: ItemRefreshType, skipPlayingCheck?: boolean): this;
|
245
245
|
clone(): this | undefined;
|
246
246
|
setItemMenu(initialiser?: (contextMenu: ContextMenu<ActionId>) => any): this;
|
247
247
|
private registeredItemHighlights;
|
@@ -45,7 +45,7 @@ export declare class EquipmentSlot extends ItemComponent {
|
|
45
45
|
private overriddenItem?;
|
46
46
|
equipItem(item: Item): Promise<void>;
|
47
47
|
clear(): void;
|
48
|
-
refresh(refreshType: ItemRefreshType): this;
|
48
|
+
refresh(refreshType: ItemRefreshType, skipPlayingCheck?: boolean): this;
|
49
49
|
protected onEquipEvent(): void;
|
50
50
|
protected onPickUp(api: IItemPickUpApi): void;
|
51
51
|
protected onDropInto(api: IItemDropApi, fromSlot?: ItemSlot): boolean;
|
@@ -18,7 +18,7 @@ export default class HighlightManager {
|
|
18
18
|
*
|
19
19
|
* Note: When not providing `until` events, the `remove` event will be subscribed to automatically.
|
20
20
|
*/
|
21
|
-
register<C extends Component>(component: C, selector: HighlightSelector, ...until: Array<keyof Events<C>>): void;
|
21
|
+
register<C extends Component>(component: C, selector: HighlightSelector | undefined, ...until: Array<keyof Events<C>>): void;
|
22
22
|
is(component: Component, selector: HighlightSelector): boolean;
|
23
23
|
private getHighlightSelectorId;
|
24
24
|
private getHighlightableComponents;
|
@@ -18,7 +18,7 @@ export interface IHighlight {
|
|
18
18
|
class?: string;
|
19
19
|
}
|
20
20
|
export declare namespace IHighlight {
|
21
|
-
function item(item: Item): HighlightSelector;
|
21
|
+
function item(item: Item): HighlightSelector | undefined;
|
22
22
|
function optionalItem(item?: Item): HighlightSelector | undefined;
|
23
23
|
function optionalEquipSlot(item?: Item): HighlightSelector | undefined;
|
24
24
|
function container(container: IContainer): HighlightSelector;
|
@@ -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
File without changes
|