@wayward/types 2.14.3-beta.dev.20241224.1 → 2.14.3-beta.dev.20241226.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/event/EventBuses.d.ts +16 -12
- package/definitions/game/event/EventManager.d.ts +7 -6
- package/definitions/game/game/entity/action/ActionsRegistration.d.ts +1 -1
- package/definitions/game/game/entity/action/actions/StokeFire.d.ts +1 -1
- package/definitions/game/game/entity/action/actions/moveItem/MoveItemFilterArgument.d.ts +3 -0
- package/definitions/game/game/entity/action/usable/IUsableAction.d.ts +1 -1
- package/definitions/game/game/entity/action/usable/UsableAction.d.ts +8 -2
- package/definitions/game/game/entity/creature/CreatureManager.d.ts +1 -1
- package/definitions/game/game/inspection/IInspection.d.ts +1 -4
- package/definitions/game/game/inspection/inspections/ActionInspection.d.ts +1 -0
- package/definitions/game/game/inspection/inspections/action/IActionInspection.d.ts +26 -0
- package/definitions/game/game/options/IGameOptions.d.ts +6 -1
- package/definitions/game/language/Dictionary.d.ts +128 -127
- package/definitions/game/language/DictionaryMap.d.ts +252 -249
- package/definitions/game/language/Translation.d.ts +2 -2
- package/definitions/game/language/english/ui/ActionSlotItemMethods.d.ts +1 -1
- package/definitions/game/language/english/ui/ActionSlotTypes.d.ts +13 -0
- package/definitions/game/language/segment/BindSegment.d.ts +2 -2
- package/definitions/game/language/segment/InterpolateArgumentSegment.d.ts +2 -2
- package/definitions/game/language/segment/NumberSegment.d.ts +4 -4
- package/definitions/game/language/segment/ReferenceSegment.d.ts +2 -2
- package/definitions/game/language/segment/ReformatSegment.d.ts +2 -2
- package/definitions/game/language/segment/Segments.d.ts +1 -1
- package/definitions/game/language/segment/TranslationSegment.d.ts +4 -4
- package/definitions/game/renderer/RenderersNotifiers.d.ts +1 -1
- package/definitions/game/renderer/notifier/Notifier.d.ts +4 -1
- package/definitions/game/resource/IResourceLoader.d.ts +36 -33
- package/definitions/game/ui/component/Component.d.ts +2 -0
- package/definitions/game/ui/old/OldUi.d.ts +1 -1
- package/definitions/game/ui/screen/screens/game/component/ItemComponent.d.ts +1 -56
- package/definitions/game/ui/screen/screens/game/component/container/ContainerBucketItemList.d.ts +5 -7
- package/definitions/game/ui/screen/screens/game/component/item/IItemComponent.d.ts +65 -0
- package/definitions/game/ui/screen/screens/game/component/item/ItemComponentEventBus.d.ts +4 -1
- package/definitions/game/ui/screen/screens/game/static/actions/ActionSlot.d.ts +5 -8
- package/definitions/game/ui/screen/screens/game/static/actions/IActionsDrawer.d.ts +3 -3
- package/definitions/game/utilities/object/Merge.d.ts +2 -0
- package/definitions/game/utilities/string/Interpolator.d.ts +37 -6
- package/package.json +1 -1
@@ -10,10 +10,10 @@
|
|
10
10
|
*/
|
11
11
|
import type { InfoProviderContext } from "@wayward/game/game/inspection/InfoProviderContext";
|
12
12
|
import type { Reference } from "@wayward/game/game/reference/IReferenceManager";
|
13
|
-
import type {
|
13
|
+
import type { IRegexSegment, IStringSection } from "@wayward/game/utilities/string/Interpolator";
|
14
14
|
export interface IReferenceSection extends IStringSection {
|
15
15
|
reference: Reference;
|
16
16
|
context?: InfoProviderContext;
|
17
17
|
}
|
18
|
-
declare const referenceSegment:
|
18
|
+
declare const referenceSegment: IRegexSegment;
|
19
19
|
export default referenceSegment;
|
@@ -8,6 +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 {
|
12
|
-
declare const reformatSegment:
|
11
|
+
import type { IRegexSegment } from "@wayward/game/utilities/string/Interpolator";
|
12
|
+
declare const reformatSegment: IRegexSegment;
|
13
13
|
export default reformatSegment;
|
@@ -9,14 +9,14 @@
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
10
10
|
*/
|
11
11
|
import type Dictionary from "@wayward/game/language/Dictionary";
|
12
|
-
import type {
|
12
|
+
import type { IRegexSegment, ISegmentApi, IStringSection } from "@wayward/game/utilities/string/Interpolator";
|
13
13
|
import type { Random } from "@wayward/utilities/random/Random";
|
14
14
|
declare namespace TranslationSegment {
|
15
|
-
const include:
|
16
|
-
const thisEntry:
|
15
|
+
const include: IRegexSegment;
|
16
|
+
const thisEntry: IRegexSegment & {
|
17
17
|
translationChain: Array<[Dictionary, number | string, number, Random]>;
|
18
18
|
};
|
19
|
-
const conditional:
|
19
|
+
const conditional: IRegexSegment;
|
20
20
|
function resolveTranslation(random: Random, api: ISegmentApi, dictionaryName: string, entryName: string, index: string | undefined, subTranslationArgsString: string, args: any[]): IStringSection[] | undefined;
|
21
21
|
function getSubTranslationArgs(api: ISegmentApi, str: string, ...args: any[]): IStringSection[][];
|
22
22
|
}
|
@@ -26,5 +26,5 @@ export declare class RenderersNotifiers {
|
|
26
26
|
addItem(location: INotificationLocation, itemNotifierType: ItemNotifierType, type: DisplayableItemType): void;
|
27
27
|
addCreature(location: INotificationLocation, creatureNotifierType: CreatureNotifierType, type: CreatureType, aberrant?: boolean): void;
|
28
28
|
addMarker(location: INotificationLocation, markerType: MarkerIconType, markerGuid: string): void;
|
29
|
-
|
29
|
+
removeMarker(location: INotificationLocation, guid: string): void;
|
30
30
|
}
|
@@ -23,6 +23,9 @@ export declare class Notifier {
|
|
23
23
|
private mostRecentLife;
|
24
24
|
private nextUpdate;
|
25
25
|
private readonly notifications;
|
26
|
+
/**
|
27
|
+
* Marker guid -> notification
|
28
|
+
*/
|
26
29
|
private readonly markers;
|
27
30
|
private suspended;
|
28
31
|
constructor(context: IRendererContext, capacity: number);
|
@@ -35,7 +38,7 @@ export declare class Notifier {
|
|
35
38
|
addStatus(location: INotificationLocation, status: Status, reason: StatusChangeReason): void;
|
36
39
|
addNotifierIcon(location: INotificationLocation, type: NotifierIconType): void;
|
37
40
|
addMarker(location: INotificationLocation, type: MarkerIconType, markerGuid: string): void;
|
38
|
-
|
41
|
+
removeMarker(guid: string): void;
|
39
42
|
suspend(): void;
|
40
43
|
resume(): void;
|
41
44
|
private update;
|
@@ -25,37 +25,40 @@ export declare enum PathType {
|
|
25
25
|
Hairstyle = 13,
|
26
26
|
HelpArticleIcon = 14,
|
27
27
|
InfoIcon = 15,
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
28
|
+
ActionInfoIcon = 16,
|
29
|
+
ActionSlotItemMethod = 17,
|
30
|
+
ActionSlotType = 18,
|
31
|
+
InputIcon = 19,
|
32
|
+
Island = 20,
|
33
|
+
IslandModifier = 21,
|
34
|
+
Item = 22,
|
35
|
+
Map = 23,
|
36
|
+
MapTile = 24,
|
37
|
+
MarkerIcon = 25,
|
38
|
+
MenuBarButtonIcon = 26,
|
39
|
+
MilestoneIcon = 27,
|
40
|
+
Music = 28,
|
41
|
+
Notifier = 29,
|
42
|
+
Overlay = 30,
|
43
|
+
Pin = 31,
|
44
|
+
Quality = 32,
|
45
|
+
RecipeLevel = 33,
|
46
|
+
SkillIcon = 34,
|
47
|
+
Sleep = 35,
|
48
|
+
SoundEffect = 36,
|
49
|
+
StatIcon = 37,
|
50
|
+
StatusEffectGroup = 38,
|
51
|
+
StatusIcon = 39,
|
52
|
+
StatusIconFrame = 40,
|
53
|
+
StatusIconNotifier = 41,
|
54
|
+
StatusOverlay = 42,
|
55
|
+
StatusThreatLevel = 43,
|
56
|
+
Terrain = 44,
|
57
|
+
TerrainDecoration = 45,
|
58
|
+
TerrainDug = 46,
|
59
|
+
TerrainMound = 47,
|
60
|
+
TerrainTilled = 48,
|
61
|
+
TileEvent = 49,
|
62
|
+
Vehicle = 50,
|
63
|
+
Website = 51
|
61
64
|
}
|
@@ -101,7 +101,9 @@ export default class Component<E extends HTMLElement = HTMLElement> extends Even
|
|
101
101
|
addEventListener(type: string, listener: (this: HTMLElement, ev: Event) => any, options?: boolean | AddEventListenerOptions): this;
|
102
102
|
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any): this;
|
103
103
|
getAs<C extends Component>(cls: AnyClass<C>): C | undefined;
|
104
|
+
cast<C extends Component>(): C;
|
104
105
|
matches(selector: string): boolean;
|
106
|
+
matches<C extends Component>(selector: string): this is C;
|
105
107
|
exists(): boolean;
|
106
108
|
/**
|
107
109
|
* A cached alias for `element.getBoundingClientRect()`. Boxes are updated or regenerated as ancestors shift.
|
@@ -34,7 +34,7 @@ export default class OldUi {
|
|
34
34
|
getSerializationProperties(_: string): string[];
|
35
35
|
setVersionExtra(msg: string): void;
|
36
36
|
openDialogs(): void;
|
37
|
-
logErrorEvent(
|
37
|
+
logErrorEvent(eventOrError: unknown, skipLog?: true): void;
|
38
38
|
private loggingRejection;
|
39
39
|
private logPromiseRejectionEvent;
|
40
40
|
}
|
@@ -43,61 +43,6 @@ export interface IItemDropApi {
|
|
43
43
|
bindable?: Bindable;
|
44
44
|
handler?: ItemComponentHandler;
|
45
45
|
}
|
46
|
-
export declare enum ItemDetailIconLocation {
|
47
|
-
TopLeft = 0,
|
48
|
-
BottomRight = 1
|
49
|
-
}
|
50
|
-
export declare enum ItemClasses {
|
51
|
-
Main = "item-component",
|
52
|
-
_InHeading = "item-component--in-heading",
|
53
|
-
Active = "active",// currently used for crafting & trading
|
54
|
-
Icon = "item-component-icon",
|
55
|
-
ItemIconIsReal = "item-component-icon-item-is-real",
|
56
|
-
ActionIcon = "item-component-icon-action",
|
57
|
-
ActionIconAnyItem = "item-component-icon-action-any-item",
|
58
|
-
ActionIconMissingItem = "item-component-icon-action-missing-item",
|
59
|
-
ActionIconHasItem = "item-component-icon-action-has-item",
|
60
|
-
ActionIconNone = "item-component-icon-action-none",
|
61
|
-
TargetIcon = "item-component-icon-target",
|
62
|
-
TargetIcon_Creature = "item-component-icon-target--creature",
|
63
|
-
TargetIcon_Doodad = "item-component-icon-target--doodad",
|
64
|
-
TargetIcon_Vehicle = "item-component-icon-target--vehicle",
|
65
|
-
TargetIcon_Plant = "item-component-icon-target--plant",
|
66
|
-
TargetIcon_NPC = "item-component-icon-target--npc",
|
67
|
-
TargetIcon_TileEvent = "item-component-icon-target--tile-event",
|
68
|
-
SlottedIcon = "item-component-icon-slotted",
|
69
|
-
Equipped = "item-component-equipped",
|
70
|
-
EquipIcon = "item-component-icon-equip",
|
71
|
-
EquipIconHasItem = "item-component-icon-equip-has-item",
|
72
|
-
MagicalIcon = "item-component-icon-magical",
|
73
|
-
ProtectedIcon = "item-component-icon-protected",
|
74
|
-
Trading = "item-component-trading",
|
75
|
-
TradingIcon = "item-component-icon-trading",
|
76
|
-
TradingIconFromMerchant = "item-component-icon-trading-from-merchant",
|
77
|
-
TradingIconToMerchant = "item-component-icon-trading-to-merchant",
|
78
|
-
Slot = "item-component-slot",
|
79
|
-
Dragging = "item-component-dragging",
|
80
|
-
DragPreview = "item-component-drag-preview",
|
81
|
-
DragPreview_Small = "item-component-drag-preview--small",
|
82
|
-
StatBar = "item-component-stat-bar",
|
83
|
-
StatBars = "item-component-stat-bars-wrapper",
|
84
|
-
DecayBar = "item-component-stat-bar-decay",
|
85
|
-
CooldownBar = "item-component-stat-bar-cooldown",
|
86
|
-
DurabilityBar = "item-component-stat-bar-durability",
|
87
|
-
NearlyDestroyed = "item-component-nearly-destroyed",
|
88
|
-
NearlyDecayed = "item-component-nearly-decayed",
|
89
|
-
Transient = "item-component-transient",
|
90
|
-
Highlight = "item-component-highlight",
|
91
|
-
Stack = "item-component-stack",
|
92
|
-
StackQuantity = "item-component-stack-quantity",
|
93
|
-
StackQuantityX = "item-component-stack-quantity-x",
|
94
|
-
StackQuantityDigit = "item-component-stack-quantity-digit",
|
95
|
-
Stacked = "item-component-stacked",
|
96
|
-
StackedVisible = "item-component-stacked-visible"
|
97
|
-
}
|
98
|
-
export declare namespace ItemClasses {
|
99
|
-
const IconLocation: (enumValue: ItemDetailIconLocation) => "item-component-icon-location-topleft" | "item-component-icon-location-bottomright";
|
100
|
-
}
|
101
46
|
export declare enum ItemTradeType {
|
102
47
|
None = "",
|
103
48
|
ToMerchant = "To",
|
@@ -156,6 +101,7 @@ export default class ItemComponent extends Component implements ItemSlot {
|
|
156
101
|
readonly draggable?: Draggable;
|
157
102
|
private transient;
|
158
103
|
protected constructor(handler: ItemComponentHandler, ...params: any[]);
|
104
|
+
protected get debug(): any;
|
159
105
|
private tickEndHandlerReasons?;
|
160
106
|
private registerTickEndHandler;
|
161
107
|
private deregisterTickEndHandler;
|
@@ -229,6 +175,5 @@ export default class ItemComponent extends Component implements ItemSlot {
|
|
229
175
|
private lastActionIcon?;
|
230
176
|
private refreshActionIcon;
|
231
177
|
protected onHoldingNotMoving(time: number): void;
|
232
|
-
protected onMouseEnterOrLeave(): void;
|
233
178
|
}
|
234
179
|
export {};
|
package/definitions/game/ui/screen/screens/game/component/container/ContainerBucketItemList.d.ts
CHANGED
@@ -22,6 +22,7 @@ import ItemComponent from "@wayward/game/ui/screen/screens/game/component/ItemCo
|
|
22
22
|
import type { IDraggableComponentSubscriber, ISortableComponent, WithSortableEvents } from "@wayward/game/ui/util/Sortable";
|
23
23
|
import Sortable from "@wayward/game/ui/util/Sortable";
|
24
24
|
import { type IEventEmitter } from "@wayward/utilities/event/EventEmitter";
|
25
|
+
import type { IMoveItemFilterArgument } from "@wayward/game/game/entity/action/actions/moveItem/MoveItemFilterArgument";
|
25
26
|
export declare enum ContainerBucketItemListClasses {
|
26
27
|
Main = "container-bucket-item-list",
|
27
28
|
Anchored = "container-bucket-item-list-anchored",
|
@@ -29,7 +30,7 @@ export declare enum ContainerBucketItemListClasses {
|
|
29
30
|
ActualTransferDestination = "container-bucket-item-list-actual-transfer-destination",
|
30
31
|
HasStackExpanded = "container-bucket-item-list-has-stack-expanded"
|
31
32
|
}
|
32
|
-
export interface IContainerBucketItemListTransferDetails {
|
33
|
+
export interface IContainerBucketItemListTransferDetails extends Omit<IMoveItemFilterArgument, "type"> {
|
33
34
|
fromList?: ContainerBucketItemList;
|
34
35
|
toList?: ContainerBucketItemList;
|
35
36
|
fromContainer?: IContainer;
|
@@ -37,15 +38,11 @@ export interface IContainerBucketItemListTransferDetails {
|
|
37
38
|
item?: Item;
|
38
39
|
itemType: ItemType;
|
39
40
|
moveAll: boolean;
|
40
|
-
moveLimit?: number;
|
41
41
|
stackList?: ContainerBucketItemList;
|
42
42
|
quality?: Quality;
|
43
|
-
text?: string;
|
44
|
-
excludeProtected?: true;
|
45
43
|
index?: number;
|
46
44
|
silent?: true;
|
47
45
|
hidden?: true;
|
48
|
-
excludeEquipped?: boolean;
|
49
46
|
}
|
50
47
|
export interface IContainerBucketItemListEvents extends WithSortableEvents<Component> {
|
51
48
|
addItem(item: Item): any;
|
@@ -81,9 +78,10 @@ export default class ContainerBucketItemList extends Component implements ISorta
|
|
81
78
|
private containerRef?;
|
82
79
|
get container(): IContainer | undefined;
|
83
80
|
isStacked(type?: ItemType): boolean;
|
81
|
+
/**
|
82
|
+
* Returns whether this item's type is stacked in this container, *and* this item is not protected.
|
83
|
+
*/
|
84
84
|
isStacked(item?: Item): boolean;
|
85
|
-
isFirstVisiblyStacked(item?: Item, excluding?: Item): boolean;
|
86
|
-
getStackedItemsThatAreVisible(type?: ItemType, excluding?: Item): Item[];
|
87
85
|
getStackedItems(type?: ItemType, excluding?: Item): Item[];
|
88
86
|
getStackIndex(type?: ItemType): number | undefined;
|
89
87
|
constructor(container?: IContainer);
|
@@ -0,0 +1,65 @@
|
|
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 declare enum ItemDetailIconLocation {
|
12
|
+
TopLeft = 0,
|
13
|
+
BottomRight = 1
|
14
|
+
}
|
15
|
+
export declare enum ItemClasses {
|
16
|
+
Main = "item-component",
|
17
|
+
_InHeading = "item-component--in-heading",
|
18
|
+
Active = "active",// currently used for crafting & trading
|
19
|
+
Icon = "item-component-icon",
|
20
|
+
ItemIconIsReal = "item-component-icon-item-is-real",
|
21
|
+
ActionIcon = "item-component-icon-action",
|
22
|
+
ActionIconAnyItem = "item-component-icon-action-any-item",
|
23
|
+
ActionIconMissingItem = "item-component-icon-action-missing-item",
|
24
|
+
ActionIconHasItem = "item-component-icon-action-has-item",
|
25
|
+
ActionIconNone = "item-component-icon-action-none",
|
26
|
+
TargetIcon = "item-component-icon-target",
|
27
|
+
TargetIcon_Creature = "item-component-icon-target--creature",
|
28
|
+
TargetIcon_Doodad = "item-component-icon-target--doodad",
|
29
|
+
TargetIcon_Vehicle = "item-component-icon-target--vehicle",
|
30
|
+
TargetIcon_Plant = "item-component-icon-target--plant",
|
31
|
+
TargetIcon_NPC = "item-component-icon-target--npc",
|
32
|
+
TargetIcon_TileEvent = "item-component-icon-target--tile-event",
|
33
|
+
SlottedIcon = "item-component-icon-slotted",
|
34
|
+
Equipped = "item-component-equipped",
|
35
|
+
EquipIcon = "item-component-icon-equip",
|
36
|
+
EquipIconHasItem = "item-component-icon-equip-has-item",
|
37
|
+
MagicalIcon = "item-component-icon-magical",
|
38
|
+
ProtectedIcon = "item-component-icon-protected",
|
39
|
+
Trading = "item-component-trading",
|
40
|
+
TradingIcon = "item-component-icon-trading",
|
41
|
+
TradingIconFromMerchant = "item-component-icon-trading-from-merchant",
|
42
|
+
TradingIconToMerchant = "item-component-icon-trading-to-merchant",
|
43
|
+
Slot = "item-component-slot",
|
44
|
+
Dragging = "item-component-dragging",
|
45
|
+
DragPreview = "item-component-drag-preview",
|
46
|
+
DragPreview_Small = "item-component-drag-preview--small",
|
47
|
+
StatBar = "item-component-stat-bar",
|
48
|
+
StatBars = "item-component-stat-bars-wrapper",
|
49
|
+
DecayBar = "item-component-stat-bar-decay",
|
50
|
+
CooldownBar = "item-component-stat-bar-cooldown",
|
51
|
+
DurabilityBar = "item-component-stat-bar-durability",
|
52
|
+
NearlyDestroyed = "item-component-nearly-destroyed",
|
53
|
+
NearlyDecayed = "item-component-nearly-decayed",
|
54
|
+
Transient = "item-component-transient",
|
55
|
+
Highlight = "item-component-highlight",
|
56
|
+
Stack = "item-component-stack",
|
57
|
+
StackQuantity = "item-component-stack-quantity",
|
58
|
+
StackQuantityX = "item-component-stack-quantity-x",
|
59
|
+
StackQuantityDigit = "item-component-stack-quantity-digit",
|
60
|
+
Stacked = "item-component-stacked",
|
61
|
+
StackedVisible = "item-component-stacked-visible"
|
62
|
+
}
|
63
|
+
export declare namespace ItemClasses {
|
64
|
+
const IconLocation: (enumValue: ItemDetailIconLocation) => "item-component-icon-location-topleft" | "item-component-icon-location-bottomright";
|
65
|
+
}
|
@@ -8,7 +8,8 @@
|
|
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 {
|
11
|
+
import type { GlobalMouseInfo } from "@wayward/game/ui/input/InputManager";
|
12
|
+
import { type ItemRefreshType } from "@wayward/game/ui/screen/screens/game/component/ItemComponent";
|
12
13
|
import type ItemComponent from "@wayward/game/ui/screen/screens/game/component/ItemComponent";
|
13
14
|
import type ActionBar from "@wayward/game/ui/screen/screens/game/static/ActionBar";
|
14
15
|
import type { ActionSlot } from "@wayward/game/ui/screen/screens/game/static/actions/ActionSlot";
|
@@ -29,6 +30,8 @@ declare namespace _ {
|
|
29
30
|
protected onTickEnd(): void;
|
30
31
|
protected onLoadedOnIsland(): void;
|
31
32
|
protected onActionBarItemSlottedMapUpdate(): void;
|
33
|
+
private hovered;
|
34
|
+
protected onUpdateTarget(mouse: GlobalMouseInfo): void;
|
32
35
|
}
|
33
36
|
}
|
34
37
|
type ItemComponentEventBus = _.ItemComponentEventBus;
|
@@ -30,6 +30,7 @@ import ItemComponent from "@wayward/game/ui/screen/screens/game/component/ItemCo
|
|
30
30
|
import { ItemComponentHandler } from "@wayward/game/ui/screen/screens/game/component/item/ItemComponentHandler";
|
31
31
|
import type ActionBar from "@wayward/game/ui/screen/screens/game/static/ActionBar";
|
32
32
|
import { ActionSlotUpdateReason, IActionBarSlotData } from "@wayward/game/ui/screen/screens/game/static/actions/IActionBar";
|
33
|
+
import { ActionSlotInternalType } from "@wayward/game/ui/screen/screens/game/static/actions/IActionsDrawer";
|
33
34
|
import type TooltipLocationHandler from "@wayward/game/ui/tooltip/TooltipLocationHandler";
|
34
35
|
import type { Events, IEventEmitter } from "@wayward/utilities/event/EventEmitter";
|
35
36
|
export declare enum ActionSlotClasses {
|
@@ -50,10 +51,6 @@ export declare enum ActionSlotClasses {
|
|
50
51
|
History_Cleared = "game-action-slot-history--cleared",
|
51
52
|
ItemComponent = "game-action-slot-item-component"
|
52
53
|
}
|
53
|
-
export declare enum ActionSlotType {
|
54
|
-
Normal = 0,
|
55
|
-
History = 1
|
56
|
-
}
|
57
54
|
export interface IActionSlotEvents extends Events<Button>, IItemSlotEvents {
|
58
55
|
update(data: IActionBarSlotData | undefined, oldData: IActionBarSlotData | undefined, reason: ActionSlotUpdateReason): any;
|
59
56
|
unequipItem(): any;
|
@@ -62,9 +59,9 @@ export interface IActionSlotEvents extends Events<Button>, IItemSlotEvents {
|
|
62
59
|
export declare class ActionSlot extends Button implements IRefreshable, ItemSlot {
|
63
60
|
readonly number: number;
|
64
61
|
slotData: IActionBarSlotData;
|
65
|
-
readonly type:
|
62
|
+
readonly type: ActionSlotInternalType;
|
66
63
|
static getHovered(): ActionSlot | undefined;
|
67
|
-
static tryCreate(number: number, slotData: IActionBarSlotData, type?:
|
64
|
+
static tryCreate(number: number, slotData: IActionBarSlotData, type?: ActionSlotInternalType): ActionSlot;
|
68
65
|
event: IEventEmitter<this, IActionSlotEvents>;
|
69
66
|
private get actionBar();
|
70
67
|
readonly label: Text;
|
@@ -76,7 +73,7 @@ export declare class ActionSlot extends Button implements IRefreshable, ItemSlot
|
|
76
73
|
private lastItem?;
|
77
74
|
private lastQuality?;
|
78
75
|
usability: ReturnableUsableActionUsability;
|
79
|
-
protected constructor(number: number, slotData: IActionBarSlotData, type?:
|
76
|
+
protected constructor(number: number, slotData: IActionBarSlotData, type?: ActionSlotInternalType);
|
80
77
|
isTransientSlot(): boolean;
|
81
78
|
getItemComponent(): ItemComponent | undefined;
|
82
79
|
private skipNextClick;
|
@@ -120,7 +117,7 @@ export declare class ActionSlot extends Button implements IRefreshable, ItemSlot
|
|
120
117
|
getActionId(): ActionId | undefined;
|
121
118
|
getInternalActionType(): ActionType | undefined;
|
122
119
|
private usingCache?;
|
123
|
-
getUsing(fresh?: true): IUsableActionPossibleUsing | undefined;
|
120
|
+
getUsing(fresh?: true, forceWithHoveredTile?: true): IUsableActionPossibleUsing | undefined;
|
124
121
|
private getBindingText;
|
125
122
|
}
|
126
123
|
declare class ActionSlotSlottedContainer extends ItemComponent {
|
@@ -34,6 +34,8 @@ declare namespace Merge {
|
|
34
34
|
*/
|
35
35
|
function MULTIPLY_NON_ZERO(amt: number): Mergeable<number> & number;
|
36
36
|
function DIVIDE(amt: number): Mergeable<number> & number;
|
37
|
+
function MIN(amt: number): Mergeable<number> & number;
|
38
|
+
function MAX(amt: number): Mergeable<number> & number;
|
37
39
|
function CONCAT(str: string): Mergeable<string> & string;
|
38
40
|
/**
|
39
41
|
* Note: "PUSH" is used by default for merging array values.
|
@@ -23,12 +23,13 @@ export interface IInterpolationOptions {
|
|
23
23
|
formatDates?: boolean;
|
24
24
|
}
|
25
25
|
export type Ends = [start: string, end?: string, endAtStringEnd?: true];
|
26
|
-
export interface ISegment {
|
26
|
+
export interface ISegment<T = unknown> {
|
27
27
|
ends?: Ends[];
|
28
28
|
trimTrailingWhitespace?: true;
|
29
|
-
match?: RegExp;
|
30
|
-
handle(match:
|
29
|
+
match?: RegExp | ((segment: string) => T | undefined);
|
30
|
+
handle(match: T, segment: string, api: ISegmentApi, ...args: any[]): string | IStringSection | Iterable<IStringSection>;
|
31
31
|
}
|
32
|
+
export type IRegexSegment = ISegment<RegExpExecArray>;
|
32
33
|
export interface IStringSection {
|
33
34
|
content: string | IStringSection[];
|
34
35
|
classes?: Set<string>;
|
@@ -92,12 +93,42 @@ export default Interpolator;
|
|
92
93
|
* - `"{test}" => args[0]["test"]`
|
93
94
|
* - `"{3.test.4.wow}" => args[3]["test"][4]["wow"]`
|
94
95
|
*/
|
95
|
-
export declare const argumentSegment:
|
96
|
+
export declare const argumentSegment: IRegexSegment;
|
96
97
|
export type InterpolationConditionalSegmentOperator = InterpolationConditionalSegmentOperatorEquivalence | InterpolationConditionalSegmentOperatorNumeric;
|
97
98
|
export type InterpolationConditionalSegmentOperatorEquivalence = "=" | "!=";
|
98
99
|
export type InterpolationConditionalSegmentOperatorNumeric = "<" | ">" | "<=" | ">=";
|
99
|
-
export
|
100
|
-
|
100
|
+
export type ConditionalSegmentCheck = string | {
|
101
|
+
variable: string;
|
102
|
+
operator: InterpolationConditionalSegmentOperator;
|
103
|
+
value: string;
|
104
|
+
variable2?: never;
|
105
|
+
} | {
|
106
|
+
variable: string;
|
107
|
+
operator: InterpolationConditionalSegmentOperator;
|
108
|
+
variable2: string;
|
109
|
+
value?: never;
|
110
|
+
};
|
111
|
+
export interface IConditionalSegmentExpression {
|
112
|
+
checks: ConditionalSegmentCheck[];
|
113
|
+
operator: "&" | "|";
|
114
|
+
length: number;
|
115
|
+
}
|
116
|
+
/**
|
117
|
+
* Uses an argument to determine whether to show one of two segments. If the argument is truthy, returns
|
118
|
+
* any content in the segment after the `?` and before the `:`. If the argument is falsey, returns any
|
119
|
+
* content in the segment after the `:`. The colon is optional; if not provided, falsey = empty string.
|
120
|
+
*
|
121
|
+
* - `"{0?hi}"`
|
122
|
+
* - When given `[true]`, `=> "hi"`
|
123
|
+
* - When given `[false]`, `=> ""`
|
124
|
+
* - When given `[]`, `=> ""`
|
125
|
+
* - `"{test?hi:bye}"
|
126
|
+
* - When given `[{test: true}]`, `=> "hi"`
|
127
|
+
* - When given `[{test: false}]`, `=> "bye"`
|
128
|
+
* - When given `[]`, `=> "bye"`
|
129
|
+
*/
|
130
|
+
export declare const conditionalSegment: ISegment<IConditionalSegmentExpression>;
|
131
|
+
export declare const falsyCoalescingSegment: IRegexSegment;
|
101
132
|
export declare const classSegment: ISegment;
|
102
133
|
export declare const basicInterpolator: Interpolator;
|
103
134
|
export declare function interpolateSectioned(str: string, ...args: any[]): IStringSection[];
|
package/package.json
CHANGED