@wayward/types 2.14.3-beta.dev.20241223.1 → 2.14.3-beta.dev.20241225.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 +18 -10
- package/definitions/game/event/EventManager.d.ts +7 -5
- package/definitions/game/game/entity/Entity.d.ts +8 -7
- package/definitions/game/game/entity/IEntity.d.ts +2 -1
- 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/usable/IUsableAction.d.ts +1 -1
- package/definitions/game/game/entity/action/usable/UsableAction.d.ts +8 -2
- package/definitions/game/game/entity/npc/NPC.d.ts +0 -1
- package/definitions/game/game/inspection/InfoProvider.d.ts +2 -1
- package/definitions/game/game/inspection/InspectionsHandler.d.ts +2 -1
- 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/mod/IMod.d.ts +2 -1
- package/definitions/game/renderer/RenderersNotifiers.d.ts +1 -1
- package/definitions/game/renderer/notifier/Notifier.d.ts +4 -1
- package/definitions/game/renderer/world/WorldRenderer.d.ts +4 -0
- package/definitions/game/ui/component/Component.d.ts +2 -0
- package/definitions/game/ui/component/ContextMenu.d.ts +1 -1
- package/definitions/game/ui/component/IComponent.d.ts +2 -1
- package/definitions/game/ui/old/OldUi.d.ts +1 -1
- package/definitions/game/ui/screen/screens/game/component/ItemComponent.d.ts +3 -99
- package/definitions/game/ui/screen/screens/game/component/container/ContainerBucketItemList.d.ts +0 -2
- 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 +39 -0
- package/definitions/game/ui/screen/screens/game/component/item/ItemComponentHandler.d.ts +46 -0
- package/definitions/game/ui/screen/screens/game/component/item/ItemComponentTradeManager.d.ts +32 -0
- package/definitions/game/ui/screen/screens/game/dialog/EquipmentDialog.d.ts +2 -2
- package/definitions/game/ui/screen/screens/game/static/actions/ActionSlot.d.ts +3 -2
- package/definitions/game/ui/screen/screens/game/static/actions/ActionSlotConfigurationColumn.d.ts +2 -1
- package/definitions/game/utilities/string/Interpolator.d.ts +37 -6
- package/definitions/utilities/collection/map/IterableWeakMap.d.ts +35 -0
- package/definitions/utilities/event/EventEmitter.d.ts +27 -3
- package/definitions/utilities/event/EventManager.d.ts +11 -1
- package/package.json +1 -1
@@ -42,8 +42,10 @@ import type { Renderer } from "@wayward/game/renderer/Renderer";
|
|
42
42
|
import type { WorldRenderer } from "@wayward/game/renderer/world/WorldRenderer";
|
43
43
|
import type SaveManager from "@wayward/game/save/SaveManager";
|
44
44
|
import type Steamworks from "@wayward/game/steamworks/Steamworks";
|
45
|
+
import type { GlobalMouseInfo } from "@wayward/game/ui/input/InputManager";
|
45
46
|
import type ScreenManager from "@wayward/game/ui/screen/ScreenManager";
|
46
47
|
import type GameScreen from "@wayward/game/ui/screen/screens/GameScreen";
|
48
|
+
import type ItemComponentEventBus from "@wayward/game/ui/screen/screens/game/component/item/ItemComponentEventBus";
|
47
49
|
import type ActionBar from "@wayward/game/ui/screen/screens/game/static/ActionBar";
|
48
50
|
import type HoveredTileTracker from "@wayward/game/ui/screen/screens/game/util/HoveredTileTracker";
|
49
51
|
import type ActionMenuHandler from "@wayward/game/ui/screen/screens/game/util/movement/ActionMenuHandler";
|
@@ -92,11 +94,13 @@ export declare enum EventBus {
|
|
92
94
|
UiActionMenuHandler = 37,
|
93
95
|
UiGameScreen = 38,
|
94
96
|
UiHoveredTileTracker = 39,
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
97
|
+
UiInputManagerMouse = 40,
|
98
|
+
UiInteractionManager = 41,
|
99
|
+
UiItemComponentStatic = 42,
|
100
|
+
UiMovementHandler = 43,
|
101
|
+
UiPathingHandler = 44,
|
102
|
+
UsableActions = 45,
|
103
|
+
WorldRenderer = 46
|
100
104
|
}
|
101
105
|
declare const eventBuses: {
|
102
106
|
[EventBus.Actions](): ActionExecutor<any, any, any, any, any>;
|
@@ -139,7 +143,9 @@ declare const eventBuses: {
|
|
139
143
|
[EventBus.UiActionMenuHandler](): ActionMenuHandler;
|
140
144
|
[EventBus.UiGameScreen](): GameScreen;
|
141
145
|
[EventBus.UiHoveredTileTracker](): HoveredTileTracker;
|
146
|
+
[EventBus.UiInputManagerMouse](): GlobalMouseInfo;
|
142
147
|
[EventBus.UiInteractionManager](): InteractionManager;
|
148
|
+
[EventBus.UiItemComponentStatic](): ItemComponentEventBus;
|
143
149
|
[EventBus.UiMovementHandler](): MovementHandler;
|
144
150
|
[EventBus.UiPathingHandler](): PathingHandler;
|
145
151
|
[EventBus.UsableActions](): UsableAction;
|
@@ -187,11 +193,13 @@ export declare const eventBusManager: EventBusManager<EventBus, {
|
|
187
193
|
37(): ActionMenuHandler;
|
188
194
|
38(): GameScreen;
|
189
195
|
39(): HoveredTileTracker;
|
190
|
-
40():
|
191
|
-
41():
|
192
|
-
42():
|
193
|
-
43():
|
194
|
-
44():
|
196
|
+
40(): GlobalMouseInfo;
|
197
|
+
41(): InteractionManager;
|
198
|
+
42(): ItemComponentEventBus;
|
199
|
+
43(): MovementHandler;
|
200
|
+
44(): PathingHandler;
|
201
|
+
45(): UsableAction;
|
202
|
+
46(): WorldRenderer;
|
195
203
|
}>;
|
196
204
|
/**
|
197
205
|
* For backwards compat / ease of use
|
@@ -56,11 +56,13 @@ export declare const eventManager: EventManager<EventBus, {
|
|
56
56
|
37(): import("../ui/screen/screens/game/util/movement/ActionMenuHandler").default;
|
57
57
|
38(): import("../ui/screen/screens/GameScreen").default;
|
58
58
|
39(): import("../ui/screen/screens/game/util/HoveredTileTracker").default;
|
59
|
-
40(): import("../ui/
|
60
|
-
41(): import("../ui/screen/screens/game/util/movement/
|
61
|
-
42(): import("../ui/screen/screens/game/
|
62
|
-
43(): import("../game/
|
63
|
-
44(): import("../
|
59
|
+
40(): import("../ui/input/InputManager").GlobalMouseInfo;
|
60
|
+
41(): import("../ui/screen/screens/game/util/movement/InteractionManager").default;
|
61
|
+
42(): import("../ui/screen/screens/game/component/item/ItemComponentEventBus").default;
|
62
|
+
43(): import("../ui/screen/screens/game/util/movement/MovementHandler").default;
|
63
|
+
44(): import("../ui/screen/screens/game/util/movement/PathingHandler").default;
|
64
|
+
45(): import("../game/entity/action/usable/UsableAction").default;
|
65
|
+
46(): import("../renderer/world/WorldRenderer").WorldRenderer;
|
64
66
|
}>;
|
65
67
|
/**
|
66
68
|
* EventHandler that is typed with the games event buses
|
@@ -34,6 +34,7 @@ import type TileEvent from "@wayward/game/game/tile/TileEvent";
|
|
34
34
|
import { type ISerializedTranslation } from "@wayward/game/language/ITranslation";
|
35
35
|
import type Translation from "@wayward/game/language/Translation";
|
36
36
|
import type { RenderSource, UpdateRenderFlag } from "@wayward/game/renderer/IRenderer";
|
37
|
+
import type { Renderer } from "@wayward/game/renderer/Renderer";
|
37
38
|
import type { INotificationLocation, ItemNotifierType, MarkerIconType, StatNotificationType } from "@wayward/game/renderer/notifier/INotifier";
|
38
39
|
import type { IVector3 } from "@wayward/game/utilities/math/IVector";
|
39
40
|
import type { IVector4 } from "@wayward/game/utilities/math/Vector4";
|
@@ -44,21 +45,18 @@ export default abstract class Entity<DescriptionType = unknown, TypeType extends
|
|
44
45
|
abstract readonly tileUpdateType: TileUpdateType;
|
45
46
|
id: number;
|
46
47
|
type: TypeType;
|
48
|
+
historicalActions?: PartialRecord<ActionType, number>;
|
47
49
|
referenceId?: number;
|
48
50
|
renamed?: string | ISerializedTranslation;
|
49
51
|
x: number;
|
50
52
|
y: number;
|
51
53
|
z: WorldZ;
|
52
54
|
private _data?;
|
55
|
+
private _persistentMarker?;
|
56
|
+
private _persistentMarkerHidden?;
|
53
57
|
private _tags?;
|
54
|
-
historicalActions?: PartialRecord<ActionType, number>;
|
55
58
|
islandId: IslandId;
|
56
59
|
preventRendering?: boolean;
|
57
|
-
/**
|
58
|
-
* Notifier marker assigned to this entity
|
59
|
-
*/
|
60
|
-
private persistentMarker;
|
61
|
-
private persistentMarkerHidden;
|
62
60
|
private _humansWithinBound?;
|
63
61
|
/**
|
64
62
|
* Cached tile the entity is on.
|
@@ -119,7 +117,10 @@ export default abstract class Entity<DescriptionType = unknown, TypeType extends
|
|
119
117
|
updateView(source: RenderSource, updateFov?: boolean | UpdateRenderFlag.FieldOfView | UpdateRenderFlag.FieldOfViewSkipTransition): void;
|
120
118
|
notifyItem(itemNotifierType: ItemNotifierType, item: Item): void;
|
121
119
|
notifyStat(type: StatNotificationType, value: number): void;
|
122
|
-
|
120
|
+
/**
|
121
|
+
* This is called clientside the first time the renderer seens the entity
|
122
|
+
*/
|
123
|
+
onFirstRender(renderer: Renderer): void;
|
123
124
|
getCurrentMarkerIconType(): MarkerIconType | undefined;
|
124
125
|
setMarkerIconHidden(hidden: boolean): void;
|
125
126
|
addMarkerIcon(type: MarkerIconType): void;
|
@@ -25,7 +25,8 @@ import type Item from "@wayward/game/game/item/Item";
|
|
25
25
|
import type Tile from "@wayward/game/game/tile/Tile";
|
26
26
|
import type TileEvent from "@wayward/game/game/tile/TileEvent";
|
27
27
|
import type { Direction } from "@wayward/game/utilities/math/Direction";
|
28
|
-
|
28
|
+
import type { IEventSubscriberEvents } from "@wayward/utilities/event/EventEmitter";
|
29
|
+
export interface IEntityEvents extends IEventSubscriberEvents {
|
29
30
|
/**
|
30
31
|
* Called when an entity is killed by another entity.
|
31
32
|
*/
|
@@ -152,7 +152,7 @@ export declare const actionDescriptionsSlow: {
|
|
152
152
|
}, [import("../../item/Item").default]>;
|
153
153
|
134: import("./Action").Action<[import("@wayward/game/game/entity/action/IAction").ActionArgument.Container, import("./argument/ActionArgumentEnum").default<import("../../item/IItem").ItemType, "Bow" | "None" | "String" | "HideGlue" | "AnimalSkull" | "GraniteArrow" | "GraniteArrowhead" | "PileOfAsh" | "BarkLeggings" | "BarkShield" | "BarkTunic" | "Bone" | "Branch" | "CactusSpines" | "Charcoal" | "GraniteFlooring" | "CookedMeat" | "Earthworm" | "Feather" | "Fertilizer" | "WaterskinOfSeawater" | "FirePlough" | "BeggartickSeeds" | "Fossil" | "GoldCoins" | "GoldenChalice" | "GoldenRing" | "GoldShortSword" | "GrassSeeds" | "IronOre" | "WoodenDowels" | "Granite" | "LeafBedroll" | "Hide" | "Leaves" | "Limestone" | "Log" | "GraniteMortarAndPestle" | "ButtonMushrooms" | "Nopal" | "Peat" | "Sandstone" | "PileOfGravel" | "PileOfBeachSand" | "WoodenArrow" | "GraniteAxe" | "Bandage" | "WovenFabric" | "CactusNeedle" | "GraniteShovel" | "WoodenSpear" | "Suture" | "Raft" | "RawMeat" | "Raspberries" | "FlyAmanita" | "Rope" | "MapleSeeds" | "Badderlocks" | "SharpGlass" | "SharpGranite" | "Skullcap" | "SmoothGranite" | "Soil" | "GraniteSpear" | "Stones" | "GraniteWall" | "StrippedBark" | "Leather" | "Tannin" | "MilkThistleSeeds" | "TreeBark" | "HoneyFungus" | "ClematisVine" | "Twigs" | "Waterskin" | "WoodenPole" | "PeatBandage" | "BowDrill" | "FishingNet" | "RawCod" | "CookedCod" | "GraniteCampfire" | "VineWhip" | "PileOfSnow" | "BarkTorch" | "LitBarkTorch" | "HandDrill" | "SmallBag" | "Shale" | "SharpenedBone" | "Grindstone" | "RawFishSteak" | "CookedFishSteak" | "WaterskinOfDesalinatedWater" | "BoatPaddle" | "BullBoat" | "RefinedSand" | "Spyglass" | "Retort" | "RawClay" | "RawClayBlowpipe" | "ClayBlowpipe" | "LeatherBelt" | "LeatherTunic" | "LeatherBoots" | "LeatherCap" | "LeatherGorget" | "LeatherPants" | "LeatherGloves" | "GraniteFurnace" | "SandstoneKiln" | "IronTongs" | "Talc" | "TalcumPowder" | "WoodenSandCastFlask" | "Lens" | "PlantRoots" | "Lockpick" | "BoneNeedle" | "Pineapple" | "TatteredMap" | "Coal" | "SmeltedWroughtIron" | "LimestonePowder" | "SmeltedIron" | "Backpack" | "RottenMeat" | "GraniteHammer" | "RawChicken" | "CookedChicken" | "GraniteAnvil" | "WoodenChest" | "IronShortSword" | "IronBreastplate" | "IronBoots" | "IronHelmet" | "IronGorget" | "IronCuisses" | "IronGauntlets" | "IronHeater" | "SandstoneWall" | "SandstoneFlooring" | "SpiderSilk" | "AnimalFat" | "TallowTorch" | "ClayFlakes" | "GreenSand" | "OldInstructionalScroll" | "SlimeGelatin" | "SlimeGlue" | "CookedSpiderMeat" | "SpiderMeat" | "IronLockpick" | "RottingVegetation" | "Chives" | "IronHammer" | "IronSpear" | "IronShovel" | "IronDoubleAxe" | "IronPickaxe" | "Inkstick" | "Coconut" | "PalmLeaf" | "Offal" | "BoneFragments" | "LitPoleTorch" | "CottonBoll" | "CottonSeeds" | "CottonFabric" | "BonePole" | "Tourniquet" | "WroughtIronPickaxe" | "WroughtIronDoubleAxe" | "WroughtIronShovel" | "WroughtIronSpear" | "WroughtIronHammer" | "WroughtIronLockpick" | "WroughtIronShield" | "WroughtIronGauntlets" | "WroughtIronCuisses" | "WroughtIronGorget" | "WroughtIronHelmet" | "WroughtIronBoots" | "WroughtIronBreastplate" | "WroughtIronShortSword" | "WoodenWall" | "WoodenFlooring" | "WoodenDoor" | "FishingRod" | "MessageInABottle" | "CarbonPowder" | "PileOfCompost" | "FishGlue" | "WoodenShavings" | "GraniteDeadfall" | "Snare" | "WaterskinOfMedicinalWater" | "CharcoalBandage" | "WoodenTongs" | "WroughtIronTongs" | "SheetOfGlass" | "SolarStill" | "TinWaterStill" | "GraniteSundial" | "LitTallowTorch" | "Sinew" | "ShortBow" | "LongBow" | "CompositeBow" | "WaterskinOfPurifiedFreshWater" | "WaterskinOfUnpurifiedFreshWater" | "GlassBottle" | "Cork" | "GlassBottleOfSeawater" | "GlassBottleOfDesalinatedWater" | "GlassBottleOfMedicinalWater" | "GlassBottleOfPurifiedFreshWater" | "GlassBottleOfUnpurifiedFreshWater" | "WroughtIronArrow" | "IronArrow" | "GraniteBullet" | "WroughtIronBullet" | "IronBullet" | "LeatherQuiver" | "Ectoplasm" | "MagicalEssence" | "WoodenFence" | "CreatureIdol" | "CordedSling" | "LeatherSling" | "WroughtIronArrowhead" | "IronArrowhead" | "Hammock" | "CottonBedroll" | "FeatherBedroll" | "RawTaintedMeat" | "CookedTaintedMeat" | "GraniteKnife" | "RawBlindfish" | "CookedBlindfish" | "Pemmican" | "CookedPemmican" | "Sail" | "Sailboat" | "ChickenEgg" | "BoiledChickenEgg" | "SheafOfHay" | "Niter" | "Saltpeter" | "BlackPowder" | "FlintlockPistol" | "Giblets" | "ExplosiveTrap" | "SkeletalMageWand" | "RawClayJug" | "ClayJug" | "ClayJugOfSeawater" | "ClayJugOfDesalinatedWater" | "ClayJugOfMedicinalWater" | "ClayJugOfPurifiedFreshWater" | "ClayJugOfUnpurifiedFreshWater" | "RawClayBrick" | "ClayBrick" | "ClayWall" | "ClayFlooring" | "PineappleSeeds" | "RaspberrySeeds" | "PricklyPearSeeds" | "ClematisSeeds" | "PaperSheet" | "PaperMold" | "Beggarticks" | "MilkThistleFlowers" | "DrawnMap" | "TatteredClothShirt" | "TatteredClothTrousers" | "WoodenGate" | "PoisonIvyLeaves" | "PoisonIvySeeds" | "WroughtIronChest" | "IronChest" | "SwitchgrassSeeds" | "Apple" | "SpiderEggs" | "TailFeathers" | "AppleSeeds" | "VenomGland" | "OrnateWoodenChest" | "RollOfRedCarpet" | "OrnateCape" | "FireBladder" | "GoldenKey" | "WoodenShortSword" | "ClayKiln" | "ClayCampfire" | "ClayFurnace" | "CopperWaterStill" | "SandstoneCampfire" | "SandstoneFurnace" | "WroughtIronWaterStill" | "GraniteKiln" | "WroughtIronAnvil" | "IronAnvil" | "MageRobe" | "CrackedOrb" | "AnimalClaw" | "AnimalPelt" | "AnimalFur" | "Scales" | "SharkFin" | "RawReptileMeat" | "CookedReptileMeat" | "Tentacles" | "CookedTentacles" | "WormMeat" | "CookedWormMeat" | "GranitePickaxe" | "WroughtIronAxe" | "IronAxe" | "FertileSoil" | "GraniteHoe" | "WroughtIronHoe" | "IronHoe" | "LavaBeetleHelmet" | "SpruceCone" | "SpruceSeeds" | "SpruceNeedles" | "CypressCone" | "CypressSeeds" | "CypressLeaves" | "Lettuce" | "LettuceSeeds" | "ChiveSeeds" | "Potato" | "PotatoSeeds" | "Carrot" | "CarrotSeeds" | "CornEar" | "CornSeeds" | "Cucumber" | "CucumberSeeds" | "Tomato" | "TomatoSeeds" | "Pumpkin" | "PumpkinSeeds" | "PricklyPearFruit" | "SugarCaneStalks" | "SugarCaneSeeds" | "BushelOfWheat" | "Wheat" | "CookedPotato" | "CookedCornCob" | "BundleOfSwitchgrass" | "Cloak" | "WoodenMortarAndPestle" | "SandstoneMortarAndPestle" | "WroughtIronMortarAndPestle" | "IronMortarAndPestle" | "RawClayMortarAndPestle" | "ClayMortarAndPestle" | "CopperOre" | "SmeltedCopper" | "CopperPickaxe" | "CopperDoubleAxe" | "CopperShovel" | "CopperSpear" | "CopperHammer" | "CopperLockpick" | "CopperBuckler" | "CopperGauntlets" | "CopperGreaves" | "CopperGorget" | "CopperHelmet" | "CopperBoots" | "CopperCuirass" | "CopperShortSword" | "CopperTongs" | "CopperArrow" | "CopperBullet" | "CopperArrowhead" | "CopperChest" | "CopperAnvil" | "CopperAxe" | "CopperHoe" | "CopperMortarAndPestle" | "WaterskinOfGoatMilk" | "ClayJugOfGoatMilk" | "GlassBottleOfGoatMilk" | "Obsidian" | "OrnateBlueBook" | "Journal" | "MossCoveredBook" | "GildedRedBook" | "ArrowShaft" | "SlitherSucker" | "AberrantSlitherSucker" | "StrawHat" | "BlackplateSabatons" | "BlackplateBreastplate" | "BlackplateGauntlets" | "BlackplateGorget" | "BlackplateGreaves" | "BlackplateHelmet" | "DeathKnightAxe" | "Macuahuitl" | "ObsidianArrow" | "ObsidianArrowhead" | "ObsidianAxe" | "ObsidianKnife" | "ObsidianShovel" | "ObsidianSpear" | "TumbleweedSeeds" | "CoconutHusk" | "PeeledCoconut" | "CoconutMeat" | "CoconutContainerOfCoconutWater" | "CoconutContainer" | "CoconutContainerOfSeawater" | "CoconutContainerOfDesalinatedWater" | "CoconutContainerOfMedicinalWater" | "CoconutContainerOfPurifiedFreshWater" | "CoconutContainerOfUnpurifiedFreshWater" | "CoconutContainerOfGoatMilk" | "OldEducationalScroll" | "StrippedHide" | "ClaySandCastFlask" | "SandstoneSandCastFlask" | "GraniteSandCastFlask" | "BoneGlue" | "CutHide" | "BoneMeal" | "PileOfDesertSand" | "JoshuaTreeLeaves" | "JoshuaTreeFruit" | "JoshuaTreeSeeds" | "CookedJoshuaTreeFruit" | "JoshuaTreeFlowers" | "SaguaroCactusFruit" | "SaguaroCactusSeeds" | "SaguaroCactusChunk" | "GraniteWell" | "SandstoneWell" | "ClayWell" | "AloeVeraLeaves" | "AloeVeraSeeds" | "DeadScorpion" | "DeadAberrantScorpion" | "CookedScorpion" | "CookedAberrantScorpion" | "ScorpionStinger" | "CopperBakingTray" | "WroughtIronBakingTray" | "IronBakingTray" | "Flour" | "Dough" | "Hardtack" | "HitchingPost" | "ShreddedPaper" | "RawMudskipper" | "RawAberrantMudskipper" | "CookedMudskipper" | "CookedAberrantMudskipper" | "RawRedSnapper" | "CookedRedSnapper" | "RawWalleye" | "CookedWalleye" | "WoodenShield" | "CopperRefinementTools" | "WroughtIronRefinementTools" | "IronRefinementTools" | "ScaleBelt" | "ScaleVest" | "ScaleBoots" | "ScaleCap" | "ScaleBevor" | "ScaleLeggings" | "ScaleGloves" | "CookedJoshuaTreeFlowers" | "SaguaroCactusRibs" | "BladesOfGrass" | "AnimalDroppings" | "AnimalDung" | "Guano" | "Tallow" | "TallowCandle" | "LitTallowCandle" | "WispDust" | "MagicalAspect" | "GoldenSextant" | "RawChoppedFish" | "CookedChoppedFish" | "CookedFishKebab" | "AshCement" | "AshCementBrick" | "AshCementFlooring" | "AshCementWall" | "IceShard" | "PenguinEgg" | "BoiledPenguinEgg" | "RawPenguinMeat" | "CookedPenguinMeat" | "Crowberries" | "CookedCrowberries" | "CrowberrySeeds" | "Winterberries" | "WinterberrySeeds" | "ArcticPoppies" | "ArcticPoppySeeds" | "PirateHat" | "AloeVeraBandage" | "SharkTooth" | "CopperKnife" | "WroughtIronKnife" | "IronKnife" | "TinOre" | "SmeltedTin" | "TinPickaxe" | "TinDoubleAxe" | "TinShovel" | "TinSpear" | "TinHammer" | "TinLockpick" | "TinShield" | "TinGloves" | "TinChausses" | "TinBevor" | "TinHelmet" | "TinFootgear" | "TinCuirass" | "TinShortSword" | "TinTongs" | "TinArrow" | "TinBullet" | "TinArrowhead" | "TinChest" | "TinAnvil" | "TinAxe" | "TinHoe" | "TinMortarAndPestle" | "TinBakingTray" | "TinRefinementTools" | "TinKnife" | "SmeltedBronze" | "BronzePickaxe" | "BronzeDoubleAxe" | "BronzeShovel" | "BronzeSpear" | "BronzeHammer" | "BronzeLockpick" | "BronzeKiteShield" | "BronzeGauntlets" | "BronzeGreaves" | "BronzeBevor" | "BronzeHelmet" | "BronzeBoots" | "BronzeChestArmor" | "BronzeShortSword" | "BronzeTongs" | "BronzeArrow" | "BronzeBullet" | "BronzeArrowhead" | "BronzeChest" | "BronzeAnvil" | "BronzeAxe" | "BronzeHoe" | "BronzeMortarAndPestle" | "BronzeBakingTray" | "BronzeRefinementTools" | "BronzeKnife" | "IceBrick" | "SnowBrick" | "IceWall" | "IceFlooring" | "SnowWall" | "SnowFlooring" | "CaliginousScrap" | "MagicalExtract" | "ShimmeringFibers" | "MagicalTwine" | "SandstoneHammer" | "SandstoneBullet" | "SandstoneAnvil" | "SnowScarecrow" | "FrozenFlesh" | "AnimalTusk" | "WhitePineCone" | "WhitePineSeeds" | "WhitePineNeedles" | "FurCoat" | "FurMittens" | "FurBoots" | "BirdDroppings" | "HardenedCoil" | "MagicalBinding" | "ArmoredScales" | "RawPangolinMeat" | "CookedPangolinMeat" | "ArmoredScaleBelt" | "ArmoredScaleVest" | "ArmoredScaleBoots" | "ArmoredScaleCrown" | "ArmoredScaleBevor" | "ArmoredScaleCuisses" | "ArmoredScaleGloves" | "TinNeedle" | "CopperNeedle" | "WroughtIronNeedle" | "IronNeedle" | "BronzeNeedle" | "TuftsOfTanglehead" | "TangleheadSeeds" | "WispInAGlassBottle" | "AberrantWispInAGlassBottle" | "WispInAClayJug" | "AberrantWispInAClayJug" | "WispInACoconutContainer" | "AberrantWispInACoconutContainer" | "WispInAWaterskin" | "AberrantWispInAWaterskin" | "StrawScarecrow" | "CactusScarecrow" | "ClothShirt" | "ClothTrousers" | "UnripePapaya" | "Papaya" | "PapayaSeeds" | "PalapalaiFrond" | "PalapalaiSpores" | "ButtonMushroomSpores" | "FlyAmanitaSpores" | "BrambleCrown" | "DarkBrambleCrown" | "Cotton" | "WaterskinOfSwampWater" | "GlassBottleOfSwampWater" | "ClayJugOfSwampWater" | "CoconutContainerOfSwampWater" | "WaterskinOfFilteredWater" | "GlassBottleOfFilteredWater" | "ClayJugOfFilteredWater" | "CoconutContainerOfFilteredWater" | "ClayFilter" | "SandstoneAxe" | "SandstoneShovel" | "SharpSandstone" | "SmoothSandstone" | "SandstoneSpear" | "SandstoneKnife" | "SandstonePickaxe" | "SandstoneHoe" | "SandstoneDeadfall" | "SandstoneSundial" | "WoodenPlank" | "WoodenWheel" | "WoodenAxle" | "WoodenMinecart" | "WoodenRail" | "WoodenTrack" | "TinWheel" | "TinAxle" | "TinMinecart" | "TinRail" | "TinTrack" | "CopperWheel" | "CopperAxle" | "CopperMinecart" | "CopperRail" | "CopperTrack" | "WroughtIronWheel" | "WroughtIronAxle" | "WroughtIronMinecart" | "WroughtIronRail" | "WroughtIronTrack" | "IronWheel" | "IronAxle" | "IronMinecart" | "IronRail" | "IronTrack" | "BronzeWheel" | "BronzeAxle" | "BronzeMinecart" | "BronzeRail" | "BronzeTrack" | "BasaltArrow" | "BasaltArrowhead" | "Basalt" | "BasaltMortarAndPestle" | "BasaltAxe" | "BasaltShovel" | "SharpBasalt" | "SmoothBasalt" | "BasaltSpear" | "BasaltFlooring" | "BasaltWall" | "BasaltCampfire" | "BasaltFurnace" | "BasaltHammer" | "BasaltAnvil" | "BasaltDeadfall" | "IronWaterStill" | "BasaltSundial" | "BasaltBullet" | "BasaltKnife" | "BasaltKiln" | "BasaltPickaxe" | "BasaltHoe" | "BasaltSandCastFlask" | "BasaltWell" | "WoodenTrackGate" | "MoldyScroll" | "MysteriousParchment" | "MagicalInscription" | "CattailLeaves" | "CattailShoots" | "CattailFlowers" | "CattailSeeds" | "CobblestoneFlooring" | "WaterLilies" | "Mud" | "SpikerushSheaths" | "SpikerushSeeds" | "WoodenBookcase" | "GraniteLighthouse" | "SandstoneLighthouse" | "ClayLighthouse" | "BasaltLighthouse" | "WoodenCage" | "FullWoodenCage" | "TinCage" | "FullTinCage" | "CopperCage" | "FullCopperCage" | "WroughtIronCage" | "FullWroughtIronCage" | "IronCage" | "FullIronCage" | "BronzeCage" | "FullBronzeCage" | "Amber" | "Tourmaline" | "Topaz" | "Opal" | "Sapphire" | "WoodGolemFigure" | "ClayGolemFigure" | "GraniteGolemFigure" | "SandstoneGolemFigure" | "BasaltGolemFigure" | "AberrantWoodGolemFigure" | "AberrantClayGolemFigure" | "AberrantGraniteGolemFigure" | "AberrantSandstoneGolemFigure" | "AberrantBasaltGolemFigure" | "GraniteDripstone" | "SandstoneDripstone" | "BasaltDripstone" | "ClayDripstone" | "BronzeWaterStill" | "ArmorStand" | "RuneOfEvil" | "RuneOfChaos" | "RuneOfGood" | "GraniteAltar" | "WoodenWheelbarrow" | "TinWheelbarrow" | "CopperWheelbarrow" | "WroughtIronWheelbarrow" | "IronWheelbarrow" | "BronzeWheelbarrow" | "GraniteCrucible" | "SandstoneCrucible" | "BasaltCrucible" | "RawClayCrucible" | "ClayCrucible" | "SandstoneAltar" | "BasaltAltar" | "ClayAltar" | "PineResin" | "SpruceResin" | "CypressResin" | "Pitch" | "PitchGlue" | "MagicalOrb" | "RawAberrantCod" | "CookedAberrantCod" | "RawAberrantBlindfish" | "CookedAberrantBlindfish" | "RawAberrantRedSnapper" | "CookedAberrantRedSnapper" | "RawAberrantWalleye" | "CookedAberrantWalleye" | "FishBones" | "AnimalCartilage" | "GelatinPowder" | "Gelatin" | "Aspic" | "FruitCocktail" | "VegetableTerrine" | "TatteredClothBandana" | "ClothBandana" | "RustedScimitar" | "TricorneHat" | "SandstoneArrowhead" | "SandstoneArrow" | "ReedFlute" | "WoodenFlute" | "RawClayFlute" | "ClayFlute" | "BoneFlute" | "TinFlute" | "CopperFlute" | "WroughtIronFlute" | "IronFlute" | "BronzeFlute" | "StrippedLeather" | "ChickenEggshells" | "PenguinEggshells" | "Last">, [arg1: import("@wayward/game/game/entity/action/IAction").ActionArgument.Undefined, import("@wayward/game/game/entity/action/IAction").ActionArgument.Integer32]], import("../player/Player").default, void, import("@wayward/game/game/entity/action/IAction").IActionUsable, [import("../../item/IItem").IContainer, import("../../item/IItem").ItemType, (number | undefined)?]>;
|
154
154
|
4: import("./Action").Action<[import("@wayward/game/game/entity/action/IAction").ActionArgument.ItemInventory, [arg1: import("@wayward/game/game/entity/action/IAction").ActionArgument.Undefined, import("@wayward/game/game/entity/action/IAction").ActionArgument.ItemInventory], [arg1: import("@wayward/game/game/entity/action/IAction").ActionArgument.Undefined, import("@wayward/game/game/entity/action/IAction").ActionArgument.ItemNearby], [arg1: import("@wayward/game/game/entity/action/IAction").ActionArgument.Undefined, import("@wayward/game/game/entity/action/IAction").ActionArgument.ItemNearby], [arg1: import("@wayward/game/game/entity/action/IAction").ActionArgument.Undefined, import("@wayward/game/game/entity/action/IAction").ActionArgument.ItemNearby]], import("../Human").default<unknown, number, import("../../reference/IReferenceManager").ReferenceType.NPC | import("../../reference/IReferenceManager").ReferenceType.Player>, void, import("@wayward/game/game/entity/action/actions/StartFire").IStartFireCanUse, [import("../../item/Item").default, (import("../../item/Item").default | undefined)?, (import("../../item/Item").default | undefined)?, (import("../../item/Item").default | undefined)?, (import("../../item/Item").default | undefined)?]>;
|
155
|
-
23: import("./Action").Action<[import("@wayward/game/game/entity/action/IAction").ActionArgument.
|
155
|
+
23: import("./Action").Action<[import("@wayward/game/game/entity/action/IAction").ActionArgument.ItemNearby], import("../Human").default<unknown, number, import("../../reference/IReferenceManager").ReferenceType.NPC | import("../../reference/IReferenceManager").ReferenceType.Player>, void, import("@wayward/game/game/entity/action/actions/StokeFire").IStokeFireCanUse, [import("../../item/Item").default]>;
|
156
156
|
121: import("./Action").Action<[import("@wayward/game/game/entity/action/IAction").ActionArgument.ItemInventory], import("../Human").default<unknown, number, import("../../reference/IReferenceManager").ReferenceType.NPC | import("../../reference/IReferenceManager").ReferenceType.Player>, void, import("@wayward/game/game/entity/action/actions/Summon").ISummonAction, [import("../../item/Item").default]>;
|
157
157
|
128: import("./Action").Action<[[arg1: import("@wayward/game/game/entity/action/IAction").ActionArgument.Undefined, import("@wayward/game/game/entity/action/IAction").ActionArgument.Doodad]], import("../Human").default<unknown, number, import("../../reference/IReferenceManager").ReferenceType.NPC | import("../../reference/IReferenceManager").ReferenceType.Player>, boolean, import("@wayward/game/game/entity/action/actions/SwapWithArmorStand").ISwapEquipment, [(import("../../doodad/Doodad").default | undefined)?]>;
|
158
158
|
131: import("./Action").Action<[[arg1: import("@wayward/game/game/entity/action/IAction").ActionArgument.Undefined, import("@wayward/game/game/entity/action/IAction").ActionArgument.Doodad]], import("../Human").default<unknown, number, import("../../reference/IReferenceManager").ReferenceType.NPC | import("../../reference/IReferenceManager").ReferenceType.Player>, boolean, import("@wayward/game/game/entity/action/actions/SwapWithArmorStand").ISwapEquipment, [(import("../../doodad/Doodad").default | undefined)?]>;
|
@@ -21,5 +21,5 @@ export interface IStokeFireCanUse extends IActionUsable {
|
|
21
21
|
doodad?: Doodad;
|
22
22
|
tileEvent?: TileEvent;
|
23
23
|
}
|
24
|
-
declare const _default: Action<[ActionArgument.
|
24
|
+
declare const _default: Action<[ActionArgument.ItemNearby], import("../../Human").default<unknown, number, import("../../../reference/IReferenceManager").ReferenceType.NPC | import("../../../reference/IReferenceManager").ReferenceType.Player>, void, IStokeFireCanUse, [Item]>;
|
25
25
|
export default _default;
|
@@ -35,7 +35,7 @@ import type Message from "@wayward/game/language/dictionary/Message";
|
|
35
35
|
import { TranslationArg } from "@wayward/game/language/ITranslation";
|
36
36
|
import type Translation from "@wayward/game/language/Translation";
|
37
37
|
import type Bindable from "@wayward/game/ui/input/Bindable";
|
38
|
-
import type { ItemDetailIconLocation } from "@wayward/game/ui/screen/screens/game/component/
|
38
|
+
import type { ItemDetailIconLocation } from "@wayward/game/ui/screen/screens/game/component/item/IItemComponent";
|
39
39
|
import type Tooltip from "@wayward/game/ui/tooltip/Tooltip";
|
40
40
|
import type { HighlightSelector } from "@wayward/game/ui/util/IHighlight";
|
41
41
|
import type HashSet from "@wayward/utilities/collection/set/HashSet";
|
@@ -27,6 +27,12 @@ import Message from "@wayward/game/language/dictionary/Message";
|
|
27
27
|
import type { HighlightSelector } from "@wayward/game/ui/util/IHighlight";
|
28
28
|
import Observer from "@wayward/game/utilities/Observer";
|
29
29
|
import EventEmitter from "@wayward/utilities/event/EventEmitter";
|
30
|
+
export interface IUsableActionResolveUsingOptions {
|
31
|
+
/** Whether to skip filling in the `fromTile` and `targetTile` properties. Defaults to `true` */
|
32
|
+
skipTiles?: boolean;
|
33
|
+
/** Whether to skip filling in the `item`. Defaults to `false` */
|
34
|
+
skipItem?: boolean;
|
35
|
+
}
|
30
36
|
export interface IUsableActionEvents {
|
31
37
|
preExecute(player: Player, using: IUsableActionPossibleUsing, context: IUsableActionExecutionContext): any;
|
32
38
|
postExecute(player: Player, using: IUsableActionPossibleUsing, context: IUsableActionExecutionContext): any;
|
@@ -70,8 +76,8 @@ declare class UsableAction<REQUIREMENTS extends IUsableActionRequirements = IUsa
|
|
70
76
|
} | {
|
71
77
|
used: false;
|
72
78
|
};
|
73
|
-
resolveUsing(player: Player, using: IUsableActionUsing<REQUIREMENTS>,
|
74
|
-
resolveUsingOrUndefined(player: Player, using: IUsableActionUsing<REQUIREMENTS>,
|
79
|
+
resolveUsing(player: Player, using: IUsableActionUsing<REQUIREMENTS>, options?: IUsableActionResolveUsingOptions): Message | IUsableActionUsing<REQUIREMENTS>;
|
80
|
+
resolveUsingOrUndefined(player: Player, using: IUsableActionUsing<REQUIREMENTS>, options?: IUsableActionResolveUsingOptions): IUsableActionUsing<REQUIREMENTS> | undefined;
|
75
81
|
isUsable(player: Player, provided: IUsableActionUsing<REQUIREMENTS>, context: UsableActionExecutionContext | IUsableActionExecutionContext): UsableActionUsability<REQUIREMENTS>;
|
76
82
|
isApplicable(player: Player, provided?: IUsableActionPossibleUsing, fullUsabilityCheck?: boolean, requireItem?: boolean): provided is IUsableActionUsing<REQUIREMENTS>;
|
77
83
|
private isItemApplicable;
|
@@ -76,7 +76,6 @@ export default abstract class NPC extends Human<INPCDescription, NPCType, Refere
|
|
76
76
|
addMilestone(): void;
|
77
77
|
protected getStatusApplicability(): StatusApplicability | undefined;
|
78
78
|
get isValid(): boolean;
|
79
|
-
load(): void;
|
80
79
|
/**
|
81
80
|
* Creates inventory, equips items, and scales stats
|
82
81
|
*/
|
@@ -21,8 +21,9 @@ import type { ISerializedImagePath } from "@wayward/game/ui/util/ImagePath";
|
|
21
21
|
import ImagePath from "@wayward/game/ui/util/ImagePath";
|
22
22
|
import BaseObserver from "@wayward/game/utilities/Observer";
|
23
23
|
import type { IStringSection } from "@wayward/game/utilities/string/Interpolator";
|
24
|
+
import type { IEventSubscriberEvents } from "@wayward/utilities/event/EventEmitter";
|
24
25
|
import EventEmitter from "@wayward/utilities/event/EventEmitter";
|
25
|
-
export interface IInfoProviderEvents {
|
26
|
+
export interface IInfoProviderEvents extends IEventSubscriberEvents {
|
26
27
|
/**
|
27
28
|
* Should be emitted when the info provider is starting to initialize its component.
|
28
29
|
*/
|
@@ -13,8 +13,9 @@ import type { InfoProviderContext } from "@wayward/game/game/inspection/InfoProv
|
|
13
13
|
import type Inspection from "@wayward/game/game/inspection/Inspection";
|
14
14
|
import type { ResolvedInspection } from "@wayward/game/game/inspection/InspectionTypeMap";
|
15
15
|
import HashSet from "@wayward/utilities/collection/set/HashSet";
|
16
|
+
import type { IEventSubscriberEvents } from "@wayward/utilities/event/EventEmitter";
|
16
17
|
import EventEmitter from "@wayward/utilities/event/EventEmitter";
|
17
|
-
export interface IInspectionsHandlerEvents {
|
18
|
+
export interface IInspectionsHandlerEvents extends IEventSubscriberEvents {
|
18
19
|
updatedInspections(type: InspectType, newInspections: HashSet<Inspection<any>>, oldInspections?: HashSet<Inspection<any>>): any;
|
19
20
|
}
|
20
21
|
export default abstract class InspectionsHandler extends EventEmitter.Host<IInspectionsHandlerEvents> {
|
@@ -9,7 +9,7 @@
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
10
10
|
*/
|
11
11
|
import type Bindable from "@wayward/game/ui/input/Bindable";
|
12
|
-
import type {
|
12
|
+
import type { IRegexSegment, IStringSection } from "@wayward/game/utilities/string/Interpolator";
|
13
13
|
export interface IBindingsSection extends IStringSection {
|
14
14
|
bindable: Bindable | null;
|
15
15
|
bindableNoBindingsFallback?: IStringSection[];
|
@@ -19,5 +19,5 @@ export interface IBindingsSection extends IStringSection {
|
|
19
19
|
export declare namespace IBindingsSection {
|
20
20
|
function create(bindable: Bindable | null, fallback?: IStringSection[], simplify?: boolean, contextless?: boolean): IBindingsSection;
|
21
21
|
}
|
22
|
-
declare const bindSegment:
|
22
|
+
declare const bindSegment: IRegexSegment;
|
23
23
|
export default bindSegment;
|
@@ -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 interpolateArgumentSegment:
|
11
|
+
import type { IRegexSegment } from "@wayward/game/utilities/string/Interpolator";
|
12
|
+
declare const interpolateArgumentSegment: IRegexSegment;
|
13
13
|
export default interpolateArgumentSegment;
|
@@ -10,18 +10,18 @@
|
|
10
10
|
*/
|
11
11
|
import type Translation from "@wayward/game/language/Translation";
|
12
12
|
import TranslationImpl from "@wayward/game/language/impl/TranslationImpl";
|
13
|
-
import type { ISegment } from "@wayward/game/utilities/string/Interpolator";
|
13
|
+
import type { IRegexSegment, ISegment } from "@wayward/game/utilities/string/Interpolator";
|
14
14
|
declare namespace NumberTranslation {
|
15
15
|
function translate(number: number, failWith?: string | Translation): Translation;
|
16
16
|
const numberAsWordsSegment: ISegment;
|
17
17
|
function romanNumeral(number: number): TranslationImpl;
|
18
18
|
const numberAsRomanNumeralSegment: ISegment;
|
19
|
-
const numberToPlacesSegment:
|
20
|
-
const numberToPercentSegment:
|
19
|
+
const numberToPlacesSegment: IRegexSegment;
|
20
|
+
const numberToPercentSegment: IRegexSegment;
|
21
21
|
const numberDifferenceSegment: ISegment;
|
22
22
|
/**
|
23
23
|
* @deprecated Prefer `numberToPlacesSegment`, `numberAsWordsSegment`
|
24
24
|
*/
|
25
|
-
const compatNumberSegment:
|
25
|
+
const compatNumberSegment: IRegexSegment;
|
26
26
|
}
|
27
27
|
export default NumberTranslation;
|
@@ -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
|
}
|
@@ -9,6 +9,7 @@
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
10
10
|
*/
|
11
11
|
import type Version from "@wayward/game/utilities/Version";
|
12
|
+
import type { IEventSubscriberEvents } from "@wayward/utilities/event/EventEmitter";
|
12
13
|
export declare enum MultiplayerCompatibility {
|
13
14
|
Clientside = "clientside",
|
14
15
|
Serverside = "serverside",
|
@@ -35,7 +36,7 @@ export interface IModConfig {
|
|
35
36
|
readonly github?: string;
|
36
37
|
readonly saveGameData?: boolean;
|
37
38
|
}
|
38
|
-
export interface IModEvents {
|
39
|
+
export interface IModEvents extends IEventSubscriberEvents {
|
39
40
|
unload(): any;
|
40
41
|
initialize(): any;
|
41
42
|
uninitialize(): any;
|
@@ -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;
|
@@ -144,6 +144,10 @@ export declare class WorldRenderer extends EventEmitter.Host<IWorldRendererEvent
|
|
144
144
|
private overlayBatch;
|
145
145
|
private vehicleBatch;
|
146
146
|
private readonly entitiesInViewport;
|
147
|
+
/**
|
148
|
+
* A set of entities seen before (rendered on screen at least once)
|
149
|
+
*/
|
150
|
+
private entititiesRenderedBefore;
|
147
151
|
private viewportSpritesDirty;
|
148
152
|
private cachedBounds;
|
149
153
|
private cachedBoundsTimestamp;
|
@@ -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.
|
@@ -14,7 +14,7 @@ import Component from "@wayward/game/ui/component/Component";
|
|
14
14
|
import type { TranslationGenerator } from "@wayward/game/ui/component/IComponent";
|
15
15
|
import Text, { Heading } from "@wayward/game/ui/component/Text";
|
16
16
|
import Bindable from "@wayward/game/ui/input/Bindable";
|
17
|
-
import type { ItemComponentHandler } from "@wayward/game/ui/screen/screens/game/component/
|
17
|
+
import type { ItemComponentHandler } from "@wayward/game/ui/screen/screens/game/component/item/ItemComponentHandler";
|
18
18
|
import type Tooltip from "@wayward/game/ui/tooltip/Tooltip";
|
19
19
|
import type { IDraggableComponent, IDraggableEvents } from "@wayward/game/ui/util/Draggable";
|
20
20
|
import Draggable from "@wayward/game/ui/util/Draggable";
|
@@ -14,7 +14,8 @@ import type { ISerializedTranslation } from "@wayward/game/language/ITranslation
|
|
14
14
|
import type Translation from "@wayward/game/language/Translation";
|
15
15
|
import type Component from "@wayward/game/ui/component/Component";
|
16
16
|
import type { IStringSection } from "@wayward/game/utilities/string/Interpolator";
|
17
|
-
|
17
|
+
import type { IEventSubscriberEvents } from "@wayward/utilities/event/EventEmitter";
|
18
|
+
export interface IComponentEvents extends IEventSubscriberEvents {
|
18
19
|
show(): any;
|
19
20
|
hide(): any;
|
20
21
|
toggleVisible(visible: boolean): any;
|
@@ -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(event: ErrorEvent | (Partial<ErrorEvent> & Error)): void;
|
37
|
+
logErrorEvent(event: ErrorEvent | (Partial<ErrorEvent> & Error), skipLog?: true): void;
|
38
38
|
private loggingRejection;
|
39
39
|
private logPromiseRejectionEvent;
|
40
40
|
}
|
@@ -8,29 +8,23 @@
|
|
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 { Quality } from "@wayward/game/game/IObject";
|
12
11
|
import { EquipType } from "@wayward/game/game/entity/IHuman";
|
13
12
|
import type { ActionId } from "@wayward/game/game/entity/action/usable/IUsableAction";
|
14
|
-
import type UsableAction from "@wayward/game/game/entity/action/usable/UsableAction";
|
15
|
-
import type MerchantNPC from "@wayward/game/game/entity/npc/npcs/Merchant";
|
16
|
-
import type { IContainer, ItemTypeExtra } from "@wayward/game/game/item/IItem";
|
17
13
|
import { ItemType } from "@wayward/game/game/item/IItem";
|
18
14
|
import type Item from "@wayward/game/game/item/Item";
|
19
15
|
import type MagicalPropertyManager from "@wayward/game/game/magic/MagicalPropertyManager";
|
20
16
|
import Component from "@wayward/game/ui/component/Component";
|
21
17
|
import type ContextMenu from "@wayward/game/ui/component/ContextMenu";
|
22
18
|
import Bindable from "@wayward/game/ui/input/Bindable";
|
19
|
+
import { ItemComponentHandler } from "@wayward/game/ui/screen/screens/game/component/item/ItemComponentHandler";
|
23
20
|
import type ActionBar from "@wayward/game/ui/screen/screens/game/static/ActionBar";
|
24
21
|
import type { ActionSlot } from "@wayward/game/ui/screen/screens/game/static/actions/ActionSlot";
|
25
22
|
import type { IDraggableEvents } from "@wayward/game/ui/util/Draggable";
|
26
23
|
import Draggable from "@wayward/game/ui/util/Draggable";
|
27
|
-
import type Sortable from "@wayward/game/ui/util/Sortable";
|
28
24
|
import type { ISortableDraggableEvents } from "@wayward/game/ui/util/Sortable";
|
29
25
|
import PerfCache from "@wayward/game/utilities/PerfCache";
|
30
26
|
import Vector2 from "@wayward/game/utilities/math/Vector2";
|
31
|
-
import WeakishSet from "@wayward/utilities/collection/set/WeakishSet";
|
32
27
|
import type { Events, IEventEmitter } from "@wayward/utilities/event/EventEmitter";
|
33
|
-
import EventEmitter from "@wayward/utilities/event/EventEmitter";
|
34
28
|
type ItemSlotExtend = Omit<Component, "event"> & {
|
35
29
|
event: IEventEmitter<Component, IItemSlotEvents>;
|
36
30
|
};
|
@@ -49,88 +43,6 @@ export interface IItemDropApi {
|
|
49
43
|
bindable?: Bindable;
|
50
44
|
handler?: ItemComponentHandler;
|
51
45
|
}
|
52
|
-
export declare enum ItemDetailIconLocation {
|
53
|
-
TopLeft = 0,
|
54
|
-
BottomRight = 1
|
55
|
-
}
|
56
|
-
export declare enum ItemClasses {
|
57
|
-
Main = "item-component",
|
58
|
-
_InHeading = "item-component--in-heading",
|
59
|
-
Active = "active",// currently used for crafting & trading
|
60
|
-
Icon = "item-component-icon",
|
61
|
-
ItemIconIsReal = "item-component-icon-item-is-real",
|
62
|
-
ActionIcon = "item-component-icon-action",
|
63
|
-
ActionIconAnyItem = "item-component-icon-action-any-item",
|
64
|
-
ActionIconMissingItem = "item-component-icon-action-missing-item",
|
65
|
-
ActionIconHasItem = "item-component-icon-action-has-item",
|
66
|
-
ActionIconNone = "item-component-icon-action-none",
|
67
|
-
TargetIcon = "item-component-icon-target",
|
68
|
-
TargetIcon_Creature = "item-component-icon-target--creature",
|
69
|
-
TargetIcon_Doodad = "item-component-icon-target--doodad",
|
70
|
-
TargetIcon_Vehicle = "item-component-icon-target--vehicle",
|
71
|
-
TargetIcon_Plant = "item-component-icon-target--plant",
|
72
|
-
TargetIcon_NPC = "item-component-icon-target--npc",
|
73
|
-
TargetIcon_TileEvent = "item-component-icon-target--tile-event",
|
74
|
-
SlottedIcon = "item-component-icon-slotted",
|
75
|
-
Equipped = "item-component-equipped",
|
76
|
-
EquipIcon = "item-component-icon-equip",
|
77
|
-
EquipIconHasItem = "item-component-icon-equip-has-item",
|
78
|
-
MagicalIcon = "item-component-icon-magical",
|
79
|
-
ProtectedIcon = "item-component-icon-protected",
|
80
|
-
Trading = "item-component-trading",
|
81
|
-
TradingIcon = "item-component-icon-trading",
|
82
|
-
TradingIconFromMerchant = "item-component-icon-trading-from-merchant",
|
83
|
-
TradingIconToMerchant = "item-component-icon-trading-to-merchant",
|
84
|
-
Slot = "item-component-slot",
|
85
|
-
Dragging = "item-component-dragging",
|
86
|
-
DragPreview = "item-component-drag-preview",
|
87
|
-
DragPreview_Small = "item-component-drag-preview--small",
|
88
|
-
StatBar = "item-component-stat-bar",
|
89
|
-
StatBars = "item-component-stat-bars-wrapper",
|
90
|
-
DecayBar = "item-component-stat-bar-decay",
|
91
|
-
CooldownBar = "item-component-stat-bar-cooldown",
|
92
|
-
DurabilityBar = "item-component-stat-bar-durability",
|
93
|
-
NearlyDestroyed = "item-component-nearly-destroyed",
|
94
|
-
NearlyDecayed = "item-component-nearly-decayed",
|
95
|
-
Transient = "item-component-transient",
|
96
|
-
Highlight = "item-component-highlight",
|
97
|
-
Stack = "item-component-stack",
|
98
|
-
StackQuantity = "item-component-stack-quantity",
|
99
|
-
StackQuantityX = "item-component-stack-quantity-x",
|
100
|
-
StackQuantityDigit = "item-component-stack-quantity-digit",
|
101
|
-
Stacked = "item-component-stacked",
|
102
|
-
StackedVisible = "item-component-stacked-visible"
|
103
|
-
}
|
104
|
-
export declare namespace ItemClasses {
|
105
|
-
const IconLocation: (enumValue: ItemDetailIconLocation) => "item-component-icon-location-topleft" | "item-component-icon-location-bottomright";
|
106
|
-
}
|
107
|
-
export interface IItemComponentHandlerDescription {
|
108
|
-
noDrag?: true;
|
109
|
-
equipSlot?: EquipType;
|
110
|
-
hasHighlight?: SupplierOr<boolean>;
|
111
|
-
getItem?(): Item | undefined;
|
112
|
-
getItemType?(): ItemType | ItemTypeExtra | undefined;
|
113
|
-
getItemQuality?(): ArrayOr<Quality> | undefined;
|
114
|
-
getAction?(): UsableAction | undefined;
|
115
|
-
getActionSlot?(): ActionSlot | undefined;
|
116
|
-
getBindables?(bindables: Bindable[]): Bindable[];
|
117
|
-
getSortable?(): Sortable;
|
118
|
-
getStackQuantity?(): number;
|
119
|
-
getContainer?(): IContainer | undefined;
|
120
|
-
getStackItems?(): readonly Item[];
|
121
|
-
getStackDisplayItem?(): Item | undefined;
|
122
|
-
getDisplayItem?(): Item | undefined;
|
123
|
-
getDurability?(): number;
|
124
|
-
getCooldown?(): number;
|
125
|
-
isDamaged?(): boolean;
|
126
|
-
isDecayed?(): boolean;
|
127
|
-
}
|
128
|
-
export interface ItemComponentHandler extends IItemComponentHandlerDescription {
|
129
|
-
}
|
130
|
-
export declare class ItemComponentHandler {
|
131
|
-
readonly isItemComponentHandler = true;
|
132
|
-
constructor(description?: IItemComponentHandlerDescription);
|
133
|
-
}
|
134
46
|
export declare enum ItemTradeType {
|
135
47
|
None = "",
|
136
48
|
ToMerchant = "To",
|
@@ -164,19 +76,10 @@ export interface IItemComponentStaticEvents {
|
|
164
76
|
}
|
165
77
|
export default class ItemComponent extends Component implements ItemSlot {
|
166
78
|
readonly handler: ItemComponentHandler;
|
167
|
-
static readonly eventGlobal: EventEmitter<null, IItemComponentStaticEvents>;
|
168
79
|
static create<C extends ItemComponent = ItemComponent>(handler: ItemComponentHandler, ...params: any[]): C | undefined;
|
169
80
|
static registerSlot(slot: ItemSlot): void;
|
170
81
|
static getHovered(): ItemComponent | undefined;
|
171
82
|
static QUALITY_CLASS_NAMES: PerfCache<string[]>;
|
172
|
-
private static readonly tradingByItem;
|
173
|
-
private static readonly tradingToMerchant;
|
174
|
-
private static readonly tradingFromMerchant;
|
175
|
-
static getTrading(merchant: MerchantNPC, type: ItemTradeType): WeakishSet<Item> | undefined;
|
176
|
-
static isTrading(item: Item, merchant: MerchantNPC): boolean;
|
177
|
-
static toggleTrading(items: Item[], merchant: MerchantNPC, trading: ItemTradeType): ItemTradeType;
|
178
|
-
private static sendMerchantChatMessage;
|
179
|
-
static clearTrading(merchant?: MerchantNPC): void;
|
180
83
|
event: IEventEmitter<this, IItemComponentEvents>;
|
181
84
|
readonly magicalIcon: Component<HTMLElement> | undefined;
|
182
85
|
readonly protectedIcon: Component<HTMLElement> | undefined;
|
@@ -198,6 +101,7 @@ export default class ItemComponent extends Component implements ItemSlot {
|
|
198
101
|
readonly draggable?: Draggable;
|
199
102
|
private transient;
|
200
103
|
protected constructor(handler: ItemComponentHandler, ...params: any[]);
|
104
|
+
protected get debug(): any;
|
201
105
|
private tickEndHandlerReasons?;
|
202
106
|
private registerTickEndHandler;
|
203
107
|
private deregisterTickEndHandler;
|
@@ -228,6 +132,7 @@ export default class ItemComponent extends Component implements ItemSlot {
|
|
228
132
|
protected onUpdateDecay(): void;
|
229
133
|
protected onUpdateQuality(): void;
|
230
134
|
protected onTickEnd(): void;
|
135
|
+
protected onRooted(): void;
|
231
136
|
protected onRootedAndAppend(): void;
|
232
137
|
protected onLoadedOnIsland(): void;
|
233
138
|
protected onActionBarItemSlottedMapUpdate(): void;
|
@@ -270,6 +175,5 @@ export default class ItemComponent extends Component implements ItemSlot {
|
|
270
175
|
private lastActionIcon?;
|
271
176
|
private refreshActionIcon;
|
272
177
|
protected onHoldingNotMoving(time: number): void;
|
273
|
-
protected onMouseEnterOrLeave(): void;
|
274
178
|
}
|
275
179
|
export {};
|
package/definitions/game/ui/screen/screens/game/component/container/ContainerBucketItemList.d.ts
CHANGED
@@ -82,8 +82,6 @@ export default class ContainerBucketItemList extends Component implements ISorta
|
|
82
82
|
get container(): IContainer | undefined;
|
83
83
|
isStacked(type?: ItemType): boolean;
|
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
|
+
}
|
@@ -0,0 +1,39 @@
|
|
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
|
+
import type { GlobalMouseInfo } from "@wayward/game/ui/input/InputManager";
|
12
|
+
import { type ItemRefreshType } from "@wayward/game/ui/screen/screens/game/component/ItemComponent";
|
13
|
+
import type ItemComponent from "@wayward/game/ui/screen/screens/game/component/ItemComponent";
|
14
|
+
import type ActionBar from "@wayward/game/ui/screen/screens/game/static/ActionBar";
|
15
|
+
import type { ActionSlot } from "@wayward/game/ui/screen/screens/game/static/actions/ActionSlot";
|
16
|
+
import EventEmitter from "@wayward/utilities/event/EventEmitter";
|
17
|
+
interface IItemComponentEventBusEvents {
|
18
|
+
update(type: ItemRefreshType): any;
|
19
|
+
changeHovered(): any;
|
20
|
+
}
|
21
|
+
declare namespace _ {
|
22
|
+
class ItemComponentEventBus extends EventEmitter.Host<IItemComponentEventBusEvents> {
|
23
|
+
private readonly items;
|
24
|
+
private readonly itemsForTickEndEvents;
|
25
|
+
registerItem(component: ItemComponent): void;
|
26
|
+
registerForTickEndEvents(component: ItemComponent): void;
|
27
|
+
deregisterForTickEndEvents(component: ItemComponent): void;
|
28
|
+
protected onUpdate(type: ItemRefreshType): void;
|
29
|
+
protected onSlotUpdate(actionBar: ActionBar, slot: ActionSlot): void;
|
30
|
+
protected onTickEnd(): void;
|
31
|
+
protected onLoadedOnIsland(): void;
|
32
|
+
protected onActionBarItemSlottedMapUpdate(): void;
|
33
|
+
private hovered;
|
34
|
+
protected onUpdateTarget(mouse: GlobalMouseInfo): void;
|
35
|
+
}
|
36
|
+
}
|
37
|
+
type ItemComponentEventBus = _.ItemComponentEventBus;
|
38
|
+
declare function ItemComponentEventBus(): ItemComponentEventBus;
|
39
|
+
export default ItemComponentEventBus;
|
@@ -0,0 +1,46 @@
|
|
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
|
+
import type UsableAction from "@wayward/game/game/entity/action/usable/UsableAction";
|
12
|
+
import type { EquipType } from "@wayward/game/game/entity/IHuman";
|
13
|
+
import type { Quality } from "@wayward/game/game/IObject";
|
14
|
+
import type { ItemTypeExtra, IContainer } from "@wayward/game/game/item/IItem";
|
15
|
+
import { ItemType } from "@wayward/game/game/item/IItem";
|
16
|
+
import type Item from "@wayward/game/game/item/Item";
|
17
|
+
import type Bindable from "@wayward/game/ui/input/Bindable";
|
18
|
+
import type { ActionSlot } from "@wayward/game/ui/screen/screens/game/static/actions/ActionSlot";
|
19
|
+
import type Sortable from "@wayward/game/ui/util/Sortable";
|
20
|
+
export interface IItemComponentHandlerDescription {
|
21
|
+
noDrag?: true;
|
22
|
+
equipSlot?: EquipType;
|
23
|
+
hasHighlight?: SupplierOr<boolean>;
|
24
|
+
getItem?(): Item | undefined;
|
25
|
+
getItemType?(): ItemType | ItemTypeExtra | undefined;
|
26
|
+
getItemQuality?(): ArrayOr<Quality> | undefined;
|
27
|
+
getAction?(): UsableAction | undefined;
|
28
|
+
getActionSlot?(): ActionSlot | undefined;
|
29
|
+
getBindables?(bindables: Bindable[]): Bindable[];
|
30
|
+
getSortable?(): Sortable;
|
31
|
+
getStackQuantity?(): number;
|
32
|
+
getContainer?(): IContainer | undefined;
|
33
|
+
getStackItems?(): readonly Item[];
|
34
|
+
getStackDisplayItem?(): Item | undefined;
|
35
|
+
getDisplayItem?(): Item | undefined;
|
36
|
+
getDurability?(): number;
|
37
|
+
getCooldown?(): number;
|
38
|
+
isDamaged?(): boolean;
|
39
|
+
isDecayed?(): boolean;
|
40
|
+
}
|
41
|
+
export interface ItemComponentHandler extends IItemComponentHandlerDescription {
|
42
|
+
}
|
43
|
+
export declare class ItemComponentHandler {
|
44
|
+
readonly isItemComponentHandler = true;
|
45
|
+
constructor(description?: IItemComponentHandlerDescription);
|
46
|
+
}
|
@@ -0,0 +1,32 @@
|
|
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
|
+
import type Human from "@wayward/game/game/entity/Human";
|
12
|
+
import type MerchantNPC from "@wayward/game/game/entity/npc/npcs/Merchant";
|
13
|
+
import type Item from "@wayward/game/game/item/Item";
|
14
|
+
import { ItemTradeType } from "@wayward/game/ui/screen/screens/game/component/ItemComponent";
|
15
|
+
import WeakishSet from "@wayward/utilities/collection/set/WeakishSet";
|
16
|
+
declare namespace _ {
|
17
|
+
class ItemComponentTradeManager {
|
18
|
+
private readonly tradingByItem;
|
19
|
+
private readonly tradingToMerchant;
|
20
|
+
private readonly tradingFromMerchant;
|
21
|
+
getTrading(merchant: MerchantNPC, type: ItemTradeType): WeakishSet<Item> | undefined;
|
22
|
+
getTradeType(item: Item): ItemTradeType | undefined;
|
23
|
+
isTrading(item: Item, merchant: MerchantNPC): boolean;
|
24
|
+
toggleTrading(items: Item[], merchant: MerchantNPC, trading: ItemTradeType): ItemTradeType;
|
25
|
+
private sendMerchantChatMessage;
|
26
|
+
clearTrading(merchant?: MerchantNPC): void;
|
27
|
+
onTrade(merchant: MerchantNPC, human: Human): void;
|
28
|
+
}
|
29
|
+
}
|
30
|
+
type ItemComponentTradeManager = _.ItemComponentTradeManager;
|
31
|
+
declare function ItemComponentTradeManager(): ItemComponentTradeManager;
|
32
|
+
export default ItemComponentTradeManager;
|
@@ -14,8 +14,8 @@ import Component from "@wayward/game/ui/component/Component";
|
|
14
14
|
import type { IBindHandlerApi } from "@wayward/game/ui/input/Bind";
|
15
15
|
import Bindable from "@wayward/game/ui/input/Bindable";
|
16
16
|
import Dialog from "@wayward/game/ui/screen/screens/game/component/Dialog";
|
17
|
-
import type
|
18
|
-
import ItemComponent
|
17
|
+
import { ItemRefreshType, type IItemDropApi, type IItemPickUpApi, type ItemSlot } from "@wayward/game/ui/screen/screens/game/component/ItemComponent";
|
18
|
+
import ItemComponent from "@wayward/game/ui/screen/screens/game/component/ItemComponent";
|
19
19
|
import EquipmentSlotTooltipHandler from "@wayward/game/ui/screen/screens/game/dialog/equipment/EquipmentSlotTooltip";
|
20
20
|
import { MenuBarButtonType } from "@wayward/game/ui/screen/screens/game/static/menubar/IMenuBarButton";
|
21
21
|
export declare enum EquipmentClasses {
|
@@ -25,8 +25,9 @@ import Component from "@wayward/game/ui/component/Component";
|
|
25
25
|
import type { IRefreshable } from "@wayward/game/ui/component/Refreshable";
|
26
26
|
import Text from "@wayward/game/ui/component/Text";
|
27
27
|
import type { IBindHandlerApi } from "@wayward/game/ui/input/Bind";
|
28
|
-
import type
|
29
|
-
import ItemComponent
|
28
|
+
import { type IItemSlotEvents, type ItemSlot } from "@wayward/game/ui/screen/screens/game/component/ItemComponent";
|
29
|
+
import ItemComponent from "@wayward/game/ui/screen/screens/game/component/ItemComponent";
|
30
|
+
import { ItemComponentHandler } from "@wayward/game/ui/screen/screens/game/component/item/ItemComponentHandler";
|
30
31
|
import type ActionBar from "@wayward/game/ui/screen/screens/game/static/ActionBar";
|
31
32
|
import { ActionSlotUpdateReason, IActionBarSlotData } from "@wayward/game/ui/screen/screens/game/static/actions/IActionBar";
|
32
33
|
import type TooltipLocationHandler from "@wayward/game/ui/tooltip/TooltipLocationHandler";
|
package/definitions/game/ui/screen/screens/game/static/actions/ActionSlotConfigurationColumn.d.ts
CHANGED
@@ -22,8 +22,9 @@ import HorizontalLine from "@wayward/game/ui/component/HorizontalLine";
|
|
22
22
|
import RangeChoiceList from "@wayward/game/ui/component/RangeChoiceList";
|
23
23
|
import Text, { Heading, Paragraph } from "@wayward/game/ui/component/Text";
|
24
24
|
import ItemDropdown from "@wayward/game/ui/component/dropdown/ItemDropdown";
|
25
|
-
import type {
|
25
|
+
import type { IItemDropApi, ItemSlot, IItemSlotEvents } from "@wayward/game/ui/screen/screens/game/component/ItemComponent";
|
26
26
|
import ItemComponent from "@wayward/game/ui/screen/screens/game/component/ItemComponent";
|
27
|
+
import type { IItemComponentHandlerDescription } from "@wayward/game/ui/screen/screens/game/component/item/ItemComponentHandler";
|
27
28
|
import type { Events, IEventEmitter } from "@wayward/utilities/event/EventEmitter";
|
28
29
|
export declare enum ActionSlotConfigurationColumnClasses {
|
29
30
|
Main = "game-action-configuration-drawer-configuration-column",
|
@@ -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[];
|
@@ -0,0 +1,35 @@
|
|
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
|
+
* Strong keys are stored in a Map.
|
13
|
+
* Weak keys are stored in a WeakMap.
|
14
|
+
* Based on https://github.com/tc39/proposal-weakrefs?tab=readme-ov-file#iterable-weakmaps
|
15
|
+
*/
|
16
|
+
export declare class IterableWeakMap<K, V> implements Iterable<[K, V]> {
|
17
|
+
#private;
|
18
|
+
constructor(iterable?: Iterable<[K, V]>);
|
19
|
+
/**
|
20
|
+
* This is more of an estimate since we might be waiting for some garbage collection to happen
|
21
|
+
*/
|
22
|
+
get size(): number;
|
23
|
+
/**
|
24
|
+
* This will cause keys that are cleaned up via garbage collection to be logged
|
25
|
+
*/
|
26
|
+
enableLogging(): IterableWeakMap<K, V>;
|
27
|
+
get(key: K): V | undefined;
|
28
|
+
set(key: K, value: V): this;
|
29
|
+
delete(key: K): boolean;
|
30
|
+
[Symbol.iterator](): Generator<[K, V]>;
|
31
|
+
entries(): IterableIterator<[K, V]>;
|
32
|
+
keys(): IterableIterator<K>;
|
33
|
+
values(): IterableIterator<V>;
|
34
|
+
private isWeakKey;
|
35
|
+
}
|
@@ -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 { IterableWeakMap } from "@wayward/utilities/collection/map/IterableWeakMap";
|
11
12
|
import { PriorityMap } from "@wayward/utilities/collection/map/PriorityMap";
|
12
13
|
export declare enum Priority {
|
13
14
|
Lowest = -2000,
|
@@ -24,12 +25,16 @@ type Abstract<T> = Function & {
|
|
24
25
|
};
|
25
26
|
type Constructor<T> = new (...args: any[]) => T;
|
26
27
|
type ClassOrAbstractClass<T> = Abstract<T> | Constructor<T>;
|
28
|
+
export interface IEventSubscriberEvents {
|
29
|
+
releaseEventSubscriptions(): any;
|
30
|
+
}
|
27
31
|
export interface IEventEmitterHost<E> {
|
28
32
|
event: IEventEmitter<this | null, E>;
|
29
33
|
}
|
30
34
|
export type IEventEmitterHostClass<E> = ClassOrAbstractClass<IEventEmitterHost<E>>;
|
31
35
|
export type Events<T> = T extends IEventEmitterHost<infer E> ? E : T extends IEventEmitterHostClass<infer E> ? E : never;
|
32
|
-
export type
|
36
|
+
export type EventPriorityMapKV = string | Handler<any, any>;
|
37
|
+
export type EventPriorityMap = PriorityMap<Map<EventPriorityMapKV, EventPriorityMapKV> | IterableWeakMap<EventPriorityMapKV, EventPriorityMapKV>>;
|
33
38
|
export interface ITrueEventEmitterHostClass<E> extends Class<any> {
|
34
39
|
[SYMBOL_SUPERCLASSES]: Array<ITrueEventEmitterHostClass<E>>;
|
35
40
|
[SYMBOL_SUBSCRIPTIONS]: Map<any, Map<keyof E, EventPriorityMap>>;
|
@@ -59,8 +64,14 @@ export interface IEventEmitter<H = any, E = any> {
|
|
59
64
|
emitAsyncParallel<K extends keyof E>(event: K, ...args: ArgsOf<E[K]>): Promise<Array<(Extract<ReturnOf<E[K]>, Promise<any>> extends Promise<infer R> ? R : never) | Exclude<ReturnOf<E[K]>, Promise<any>>>> & {
|
60
65
|
isResolved?: true;
|
61
66
|
};
|
67
|
+
subscribe<K extends ArrayOr<keyof E>>(host: IEventEmitterHost<IEventSubscriberEvents>, event: K, handler: Handler<H, K extends any[] ? E[K[number]] : E[Extract<K, keyof E>]>, priority?: number, once?: boolean): H;
|
68
|
+
/** @deprecated */
|
62
69
|
subscribe<K extends ArrayOr<keyof E>>(event: K, handler: Handler<H, K extends any[] ? E[K[number]] : E[Extract<K, keyof E>]>, priority?: number, once?: boolean): H;
|
70
|
+
subscribeUnsafe<K extends ArrayOr<keyof E>>(event: K, handler: Handler<H, K extends any[] ? E[K[number]] : E[Extract<K, keyof E>]>, priority?: number, once?: boolean): H;
|
71
|
+
subscribeNext<K extends ArrayOr<keyof E>>(host: IEventEmitterHost<IEventSubscriberEvents>, event: K, handler: Handler<H, K extends any[] ? E[K[number]] : E[Extract<K, keyof E>]>, priority?: number): H;
|
72
|
+
/** @deprecated */
|
63
73
|
subscribeNext<K extends ArrayOr<keyof E>>(event: K, handler: Handler<H, K extends any[] ? E[K[number]] : E[Extract<K, keyof E>]>, priority?: number): H;
|
74
|
+
subscribeNextUnsafe<K extends ArrayOr<keyof E>>(event: K, handler: Handler<H, K extends any[] ? E[K[number]] : E[Extract<K, keyof E>]>, priority?: number): H;
|
64
75
|
unsubscribe<K extends ArrayOr<keyof E>>(event: K, handler: Handler<H, K extends any[] ? E[K[number]] : E[Extract<K, keyof E>]>, priority?: number): boolean;
|
65
76
|
waitFor<K extends ArrayOr<keyof E>>(events: K, priority?: number): Promise<ArgsOf<K extends any[] ? E[K[number]] : E[Extract<K, keyof E>]>>;
|
66
77
|
race<K extends ArrayOr<keyof E>>(raceWith: Promise<any>, events: K, priority?: number): Promise<ArgsOf<K extends any[] ? E[K[number]] : E[Extract<K, keyof E>]>>;
|
@@ -72,8 +83,14 @@ export interface IEventEmitter<H = any, E = any> {
|
|
72
83
|
export interface IUntilSubscriber<H, E> {
|
73
84
|
until(promise: Promise<any>): this;
|
74
85
|
until<E2>(emitter: IEventEmitterHost<E2>, ...events: Array<keyof E2>): this;
|
86
|
+
subscribe<K extends ArrayOr<keyof E>>(host: IEventEmitterHost<IEventSubscriberEvents>, event: K, handler: Handler<H, K extends any[] ? E[K[number]] : E[Extract<K, keyof E>]>, priority?: number): H;
|
87
|
+
/** @deprecated */
|
75
88
|
subscribe<K extends ArrayOr<keyof E>>(event: K, handler: Handler<H, K extends any[] ? E[K[number]] : E[Extract<K, keyof E>]>, priority?: number): H;
|
89
|
+
subscribeUnsafe<K extends ArrayOr<keyof E>>(event: K, handler: Handler<H, K extends any[] ? E[K[number]] : E[Extract<K, keyof E>]>, priority?: number): H;
|
90
|
+
subscribeNext<K extends ArrayOr<keyof E>>(host: IEventEmitterHost<IEventSubscriberEvents>, event: K, handler: Handler<H, K extends any[] ? E[K[number]] : E[Extract<K, keyof E>]>, priority?: number): H;
|
91
|
+
/** @deprecated */
|
76
92
|
subscribeNext<K extends ArrayOr<keyof E>>(event: K, handler: Handler<H, K extends any[] ? E[K[number]] : E[Extract<K, keyof E>]>, priority?: number): H;
|
93
|
+
subscribeNextUnsafe<K extends ArrayOr<keyof E>>(event: K, handler: Handler<H, K extends any[] ? E[K[number]] : E[Extract<K, keyof E>]>, priority?: number): H;
|
77
94
|
}
|
78
95
|
declare class EventEmitter<H, E> {
|
79
96
|
private readonly host;
|
@@ -92,8 +109,15 @@ declare class EventEmitter<H, E> {
|
|
92
109
|
emitReduce<K extends keyof E, A extends ReturnOf<E[K]> & Head<ArgsOf<E[K]>>>(event: K, arg: A, ...args: Tail<ArgsOf<E[K]>>): Extract<ReturnOf<E[K]> & Head<ArgsOf<E[K]>>, undefined> extends undefined ? (undefined extends A ? ReturnOf<E[K]> : A) : ReturnOf<E[K]>;
|
93
110
|
emitAsync<K extends keyof E>(event: K, ...args: ArgsOf<E[K]>): Promise<any[]>;
|
94
111
|
emitAsyncParallel<K extends keyof E>(event: K, ...args: ArgsOf<E[K]>): Promise<any[]>;
|
95
|
-
|
96
|
-
|
112
|
+
subscribeUnsafe<K extends ArrayOr<keyof E>>(events: K, handler: Handler<H, K extends any[] ? E[K[number]] : E[Extract<K, keyof E>]>, priority?: number, once?: boolean): H;
|
113
|
+
subscribe<K extends ArrayOr<keyof E>>(host: IEventEmitterHost<IEventSubscriberEvents>, events: K, handler: Handler<H, K extends any[] ? E[K[number]] : E[Extract<K, keyof E>]>, priority?: number, once?: boolean): H;
|
114
|
+
/** @deprecated */
|
115
|
+
subscribe<K extends ArrayOr<keyof E>>(events: K, handler: Handler<H, K extends any[] ? E[K[number]] : E[Extract<K, keyof E>]>, priority?: number, once?: boolean): H;
|
116
|
+
private subscribeInternal;
|
117
|
+
subscribeNextUnsafe<K extends ArrayOr<keyof E>>(events: K, handler: Handler<H, K extends any[] ? E[K[number]] : E[Extract<K, keyof E>]>, priority?: number): H;
|
118
|
+
subscribeNext<K extends ArrayOr<keyof E>>(host: IEventEmitterHost<IEventSubscriberEvents>, events: K, handler: Handler<H, K extends any[] ? E[K[number]] : E[Extract<K, keyof E>]>, priority?: number): H;
|
119
|
+
/** @deprecated */
|
120
|
+
subscribeNext<K extends ArrayOr<keyof E>>(events: K, handler: Handler<H, K extends any[] ? E[K[number]] : E[Extract<K, keyof E>]>, priority?: number): H;
|
97
121
|
unsubscribe<K extends ArrayOr<keyof E>>(events: K, handler: keyof H | Handler<H, K extends any[] ? E[K[number]] : E[Extract<K, keyof E>]>, priority?: number): boolean;
|
98
122
|
waitFor<K extends ArrayOr<keyof E>>(events: K, priority?: number): Promise<ArgsOf<K extends any[] ? E[K[number]] : E[Extract<K, keyof E>]>>;
|
99
123
|
race<K extends ArrayOr<keyof E>>(raceWith: number | Promise<any>, events: K, priority?: number): Promise<ArgsOf<K extends any[] ? E[K[number]] : E[Extract<K, keyof E>]>>;
|
@@ -10,7 +10,7 @@
|
|
10
10
|
*/
|
11
11
|
import type { EventBusManager } from "@wayward/utilities/event/EventBusManager";
|
12
12
|
import type EventEmitter from "@wayward/utilities/event/EventEmitter";
|
13
|
-
import type { Events, IEventEmitterHost, IEventEmitterHostClass } from "@wayward/utilities/event/EventEmitter";
|
13
|
+
import type { Events, IEventEmitterHost, IEventEmitterHostClass, IEventSubscriberEvents } from "@wayward/utilities/event/EventEmitter";
|
14
14
|
type HostOrHostClass = IEventEmitterHost<any> | IEventEmitterHostClass<any>;
|
15
15
|
type HostFromHostOrHostClass<H> = H extends {
|
16
16
|
event: EventEmitter<null, any>;
|
@@ -55,7 +55,17 @@ export declare class EventManager<EventBus extends number, EventBuses extends Re
|
|
55
55
|
waitFor<E extends EmitterOrBus<EventBus>, K extends Event<EventBus, EventBuses, E>>(emitter: E, event: K, priority?: number): Promise<Parameters<Handler<EventBus, EventBuses, E, K>>>;
|
56
56
|
until<E2>(emitter: IEventEmitterHost<E2>, ...events: Array<keyof E2>): IEventManagerUntil<EventBus, EventBuses>;
|
57
57
|
until(promise: Promise<any>): IEventManagerUntil<EventBus, EventBuses>;
|
58
|
+
registerEventBusSubscriber(subscriber: IEventEmitterHost<IEventSubscriberEvents>): void;
|
59
|
+
/**
|
60
|
+
* @deprecated This subscriber object will not be automatically cleaned up!
|
61
|
+
*
|
62
|
+
* If this is intentional, switch to {@link registerEventBusSubscriberUnsafe}.
|
63
|
+
*
|
64
|
+
* Otherwise, this subscriber object needs to be an {@link IEventEmitterHost}<{@link IEventSubscriberEvents}> —
|
65
|
+
* the `"releaseEventSubscriptions"` call will automatically clean up this subscriber.
|
66
|
+
*/
|
58
67
|
registerEventBusSubscriber(subscriber: object): void;
|
68
|
+
registerEventBusSubscriberUnsafe(subscriber: object): void;
|
59
69
|
deregisterEventBusSubscriber(subscriber: object): boolean;
|
60
70
|
}
|
61
71
|
declare const SYMBOL_EVENT_HANDLERS: unique symbol;
|
package/package.json
CHANGED