@wayward/types 2.13.3-beta.dev.20230620.1 → 2.13.3-beta.dev.20230622.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/definitions/game/game/entity/action/actions/Summon.d.ts +0 -2
- package/definitions/game/game/entity/action/usable/IUsableAction.d.ts +3 -1
- package/definitions/game/game/entity/action/usable/UsableAction.d.ts +3 -1
- package/definitions/game/game/entity/action/usable/UsableActionRegistrar.d.ts +4 -2
- package/definitions/game/game/entity/action/usable/actions/item/UsableActionsUseItem.d.ts +3 -1
- package/definitions/game/game/item/IItem.d.ts +2 -0
- package/definitions/game/language/dictionary/Message.d.ts +119 -118
- package/definitions/game/ui/screen/screens/game/component/ItemComponent.d.ts +1 -0
- package/definitions/game/ui/screen/screens/game/static/actions/ActionsDrawer.d.ts +3 -1
- package/package.json +1 -1
|
@@ -11,11 +11,9 @@
|
|
|
11
11
|
import { Action } from "game/entity/action/Action";
|
|
12
12
|
import type { IActionUsable } from "game/entity/action/IAction";
|
|
13
13
|
import { ActionArgument } from "game/entity/action/IAction";
|
|
14
|
-
import type { ISummon } from "game/item/IItem";
|
|
15
14
|
import type Tile from "game/tile/Tile";
|
|
16
15
|
export interface ISummonAction extends IActionUsable {
|
|
17
16
|
tile: Tile;
|
|
18
|
-
creatureSummon: ISummon;
|
|
19
17
|
}
|
|
20
18
|
/**
|
|
21
19
|
* Summon a creature (golem) from an item.
|
|
@@ -24,6 +24,7 @@ import type { Quality } from "game/IObject";
|
|
|
24
24
|
import type { ItemType } from "game/item/IItem";
|
|
25
25
|
import type Item from "game/item/Item";
|
|
26
26
|
import type ItemFinder from "game/item/ItemFinder";
|
|
27
|
+
import type { IItemFinderOptions } from "game/item/ItemFinder";
|
|
27
28
|
import type Message from "language/dictionary/Message";
|
|
28
29
|
import Translation from "language/Translation";
|
|
29
30
|
import type Bindable from "ui/input/Bindable";
|
|
@@ -39,8 +40,9 @@ export interface IUsableActionRequirement<TYPE> {
|
|
|
39
40
|
}
|
|
40
41
|
export interface IUsableActionItemRequirement extends Omit<IUsableActionRequirement<Item>, "find"> {
|
|
41
42
|
allowOnlyItemType?(player: Player, type: ItemType): boolean;
|
|
42
|
-
finder?(player: Player): ItemFinder | undefined;
|
|
43
|
+
finder?(player: Player, defaultOptions?: IItemFinderOptions, provided?: Omit<IUsableActionPossibleUsing, "item">): ItemFinder | undefined;
|
|
43
44
|
requiresQuality?: true;
|
|
45
|
+
requiresType?: true;
|
|
44
46
|
}
|
|
45
47
|
export declare namespace IUsableActionRequirement {
|
|
46
48
|
interface Maybe<TYPE> {
|
|
@@ -16,6 +16,7 @@ import type { ActionWhichTranslation } from "game/entity/action/usable/UsableAct
|
|
|
16
16
|
import type Player from "game/entity/player/Player";
|
|
17
17
|
import type { IIcon } from "game/inspection/InfoProvider";
|
|
18
18
|
import type Item from "game/item/Item";
|
|
19
|
+
import Message from "language/dictionary/Message";
|
|
19
20
|
import type Translation from "language/Translation";
|
|
20
21
|
import type { HighlightSelector } from "ui/util/IHighlight";
|
|
21
22
|
export declare const USABLE_ACTION_USE_ON_MOVE_UNLOCK_AT = 20;
|
|
@@ -44,7 +45,7 @@ declare class UsableAction<REQUIREMENTS extends IUsableActionRequirements = IUsa
|
|
|
44
45
|
constructor(requirements: REQUIREMENTS, definition: DEFINITION);
|
|
45
46
|
isExecutable(): this is UsableAction<REQUIREMENTS, IUsableActionDefinitionExecutable<REQUIREMENTS>>;
|
|
46
47
|
execute(player: Player, provided: IUsableActionUsing<REQUIREMENTS>, context: UsableActionExecutionContext | IUsableActionExecutionContext): boolean;
|
|
47
|
-
resolveUsing(player: Player, using: IUsableActionUsing<REQUIREMENTS>):
|
|
48
|
+
resolveUsing(player: Player, using: IUsableActionUsing<REQUIREMENTS>): Message.UiActionCannotUseRequiresCreature | Message.UiActionCannotUseRequiresDoodad | Message.UiActionCannotUseRequiresItem | Message.UiActionCannotUseRequiresNPC | IUsableActionUsing<REQUIREMENTS>;
|
|
48
49
|
isUsable(player: Player, provided: IUsableActionUsing<REQUIREMENTS>, context: UsableActionExecutionContext | IUsableActionExecutionContext): UsableActionUsability<REQUIREMENTS>;
|
|
49
50
|
isApplicable(player: Player, provided?: IUsableActionPossibleUsing, fullUsabilityCheck?: boolean): provided is IUsableActionUsing<REQUIREMENTS>;
|
|
50
51
|
private isItemApplicable;
|
|
@@ -56,6 +57,7 @@ declare class UsableAction<REQUIREMENTS extends IUsableActionRequirements = IUsa
|
|
|
56
57
|
getItem(player: Player, provided?: IUsableActionPossibleUsing, fullUsabilityCheck?: boolean): Item | false | undefined;
|
|
57
58
|
private requirementsItemFinders?;
|
|
58
59
|
private getItemFinder;
|
|
60
|
+
private createItemFinder;
|
|
59
61
|
private itemFinderFullCheck?;
|
|
60
62
|
private itemFinderSimpleCheck?;
|
|
61
63
|
private getItemByType;
|
|
@@ -15,9 +15,11 @@ import type { ActionId, IUsableActionPossibleUsing, IUsableActionRequirements }
|
|
|
15
15
|
import type UsableAction from "game/entity/action/usable/UsableAction";
|
|
16
16
|
import ContextMenu from "ui/component/ContextMenu";
|
|
17
17
|
export default class UsableActionRegistrar {
|
|
18
|
+
private readonly id;
|
|
18
19
|
readonly actions: Array<[string, UsableAction]>;
|
|
19
20
|
readonly actionIndices: Record<string, number>;
|
|
20
21
|
readonly actionIds: string[];
|
|
22
|
+
constructor(id: string);
|
|
21
23
|
byId(id?: ActionId): UsableAction | undefined;
|
|
22
24
|
filter(filter: (action: UsableAction, id: string) => any): UsableActionRegistrar;
|
|
23
25
|
private contextMenuInitializer?;
|
|
@@ -70,8 +72,8 @@ export declare class UsableActionGenerator<ARGS extends any[] = []> extends Even
|
|
|
70
72
|
* Forcibly regenerates and returns a new action registrar from this generator.
|
|
71
73
|
* If this generator is marked for persistence, the generated registrar will be cached and accessible thereafter by `get()`.
|
|
72
74
|
*/
|
|
73
|
-
generate
|
|
74
|
-
private
|
|
75
|
+
private generate;
|
|
76
|
+
private existingPersistenceId?;
|
|
75
77
|
/**
|
|
76
78
|
* Marks this generator for persistence when the "when" event occurs,
|
|
77
79
|
* and unmarks this generator for persistence when the "until" event occurs.
|
|
@@ -18,15 +18,17 @@ import type { IGetBestItemsOptions } from "game/item/IItemManager";
|
|
|
18
18
|
import type Item from "game/item/Item";
|
|
19
19
|
export interface IUseItemAction extends IUsableActionDynamicDefinition {
|
|
20
20
|
canDamageItem?: true;
|
|
21
|
-
allowProtectedItems?: true;
|
|
22
21
|
allowAnyItems?: true;
|
|
23
22
|
allowNoItem?: true;
|
|
24
23
|
hasNoBestItem?: true;
|
|
24
|
+
skipUseCheck?: true;
|
|
25
25
|
filterFind?(item: Item, player: Player): boolean;
|
|
26
26
|
validate?(item: Item, player: Player): boolean;
|
|
27
27
|
initialiseFinder?(finder: UsableActionItemFinder): any;
|
|
28
28
|
onFinderTrack?(finder: UsableActionItemFinder): any;
|
|
29
29
|
onFinderDispose?(finder: UsableActionItemFinder): any;
|
|
30
|
+
requiresQuality?: true;
|
|
31
|
+
requiresType?: true;
|
|
30
32
|
}
|
|
31
33
|
export declare namespace IUseItemAction {
|
|
32
34
|
function getGetItemOptions(actionType: ActionType, useItemAction?: Omit<IUseItemAction, keyof IUsableActionDynamicDefinition>): Partial<IGetBestItemsOptions>;
|
|
@@ -99,6 +99,8 @@ export interface IItemDisassembly {
|
|
|
99
99
|
magic: MagicalPropertyManager | undefined;
|
|
100
100
|
disassembly: Item[];
|
|
101
101
|
tradedFrom: string[] | undefined;
|
|
102
|
+
decay: number | undefined;
|
|
103
|
+
startingDecay: number | undefined;
|
|
102
104
|
}
|
|
103
105
|
export declare enum ItemDamageResult {
|
|
104
106
|
NoDamage = 0,
|
|
@@ -682,123 +682,124 @@ declare enum Message {
|
|
|
682
682
|
UiActionCannotUseRequiresCreature = 670,
|
|
683
683
|
UiActionCannotUseRequiresDoodad = 671,
|
|
684
684
|
UiActionCannotUseRequiresItem = 672,
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
685
|
+
UiActionCannotUseRequiresNPC = 673,
|
|
686
|
+
Unhitch = 674,
|
|
687
|
+
UnhitchCreature = 675,
|
|
688
|
+
Unknown = 676,
|
|
689
|
+
Unlimited = 677,
|
|
690
|
+
UnlockedChest = 678,
|
|
691
|
+
UnpurifiedFreshWater = 679,
|
|
692
|
+
UnpurifiedWaterInStill = 680,
|
|
693
|
+
Use = 681,
|
|
694
|
+
UsingBareHands = 682,
|
|
695
|
+
VehicleDefense = 683,
|
|
696
|
+
Vulnerable = 684,
|
|
697
|
+
Water = 685,
|
|
698
|
+
WaterGathering = 686,
|
|
699
|
+
WaterPutOutFire = 687,
|
|
700
|
+
WellIsDry = 688,
|
|
701
|
+
WellIsFull = 689,
|
|
702
|
+
WildGoatRefusedToBeMilked = 690,
|
|
703
|
+
WillNotTrade = 691,
|
|
704
|
+
WorkingYourselfIntoExhaustion = 692,
|
|
705
|
+
WorkingYourselfIntoExhaustionAndDrowning = 693,
|
|
706
|
+
You = 694,
|
|
707
|
+
YouAbsorb = 695,
|
|
708
|
+
YouApplied = 696,
|
|
709
|
+
YouAreAlready = 697,
|
|
710
|
+
YouAte = 698,
|
|
711
|
+
YouBeginResting = 699,
|
|
712
|
+
YouCannotDoThatYet = 700,
|
|
713
|
+
YouCanNowCombatTheTides = 701,
|
|
714
|
+
YouCrafted = 702,
|
|
715
|
+
YouDoNotFindTreasureYet = 703,
|
|
716
|
+
YouDrank = 704,
|
|
717
|
+
YouDropTheTorch = 705,
|
|
718
|
+
YouEnchant = 706,
|
|
719
|
+
YouEquip = 707,
|
|
720
|
+
YouExude = 708,
|
|
721
|
+
YouExudeSome = 709,
|
|
722
|
+
YouExudeSomeReasonConflicting = 710,
|
|
723
|
+
YouExudeSomeReasonMax = 711,
|
|
724
|
+
YouExudeSomeReasonProperties = 712,
|
|
725
|
+
YouFailedTo = 713,
|
|
726
|
+
YouFailedToExtinguishedFireFully = 714,
|
|
727
|
+
YouFailedToHeal = 715,
|
|
728
|
+
YouFailedToHealOther = 716,
|
|
729
|
+
YouFire = 717,
|
|
730
|
+
YouGathered = 718,
|
|
731
|
+
YouGatheredAndDropped = 719,
|
|
732
|
+
YouHarvested = 720,
|
|
733
|
+
YouHarvestedAndDropped = 721,
|
|
734
|
+
YouHave = 722,
|
|
735
|
+
YouHaveAlreadyLearned = 723,
|
|
736
|
+
YouHaveBeenCut = 724,
|
|
737
|
+
YouHaveCaged = 725,
|
|
738
|
+
YouHaveCommanded = 726,
|
|
739
|
+
YouHaveDied = 727,
|
|
740
|
+
YouHaveHealedOther = 728,
|
|
741
|
+
YouHaveKilled = 729,
|
|
742
|
+
YouHaveReleased = 730,
|
|
743
|
+
YouHaveSummoned = 731,
|
|
744
|
+
YouHaveTamed = 732,
|
|
745
|
+
YouHaveUncaged = 733,
|
|
746
|
+
YouNeedMoreCredit = 734,
|
|
747
|
+
YouNoticeBarren = 735,
|
|
748
|
+
YouNoticeBecomeEnraged = 736,
|
|
749
|
+
YouNoticeDying = 737,
|
|
750
|
+
YouNoticeFertilityDecreasing = 738,
|
|
751
|
+
YouNoticeFertilityIncreasing = 739,
|
|
752
|
+
YouNoticeGrowing = 740,
|
|
753
|
+
YouNoticeLavaCooling = 741,
|
|
754
|
+
YouNoticeLavaHardening = 742,
|
|
755
|
+
YouNoticePerish = 743,
|
|
756
|
+
YouNoticePlantDamage = 744,
|
|
757
|
+
YouNoticePlantRegenerated = 745,
|
|
758
|
+
YouNoticeRegrowing = 746,
|
|
759
|
+
YouNoticeStumbleInjureItself = 747,
|
|
760
|
+
YouNoticeTakeFromGround = 748,
|
|
761
|
+
YouNoticeWoundsClosing = 749,
|
|
762
|
+
YouNoticeZombieHorde = 750,
|
|
763
|
+
YouOfferedToCreature = 751,
|
|
764
|
+
YouOfferedToCreatureRejects = 752,
|
|
765
|
+
YouOpen = 753,
|
|
766
|
+
YouPacked = 754,
|
|
767
|
+
YouPickedUp = 755,
|
|
768
|
+
YouRefine = 756,
|
|
769
|
+
YouReinforce = 757,
|
|
770
|
+
YouRepair = 758,
|
|
771
|
+
YouReturnFromCivilizationWith = 759,
|
|
772
|
+
YourFist = 760,
|
|
773
|
+
YourHands = 761,
|
|
774
|
+
YourInventory = 762,
|
|
775
|
+
YourIsland = 763,
|
|
776
|
+
YourRubbingNoEffect = 764,
|
|
777
|
+
YouRub = 765,
|
|
778
|
+
YouSee = 766,
|
|
779
|
+
YouSeeALivingMushroomSpore = 767,
|
|
780
|
+
YouSeeASkeletonCollapse = 768,
|
|
781
|
+
YouSeeASlimeCombine = 769,
|
|
782
|
+
YouSeeAZombieBleeding = 770,
|
|
783
|
+
YouSeeCoolDown = 771,
|
|
784
|
+
YouSeeDrop = 772,
|
|
785
|
+
YouSeeEngulfFire = 773,
|
|
786
|
+
YouSeeFireSpread = 774,
|
|
787
|
+
YouSeeHelpingPlant = 775,
|
|
788
|
+
YouSeeLay = 776,
|
|
789
|
+
YouSeeLayingTrap = 777,
|
|
790
|
+
YouSeeSpewLava = 778,
|
|
791
|
+
YouSeeSpitAcid = 779,
|
|
792
|
+
YouSeeSpringForth = 780,
|
|
793
|
+
YouSeeSummon = 781,
|
|
794
|
+
YouSeeSwampFlood = 782,
|
|
795
|
+
YouSeeTrampling = 783,
|
|
796
|
+
YouSetTheTrapOff = 784,
|
|
797
|
+
YouStokeTheCreature = 785,
|
|
798
|
+
YouSwapMainHandAndOffHand = 786,
|
|
799
|
+
YouThrew = 787,
|
|
800
|
+
YouTilled = 788,
|
|
801
|
+
YouUnequip = 789,
|
|
802
|
+
YouUsed = 790,
|
|
803
|
+
YouWhileTraveling = 791
|
|
803
804
|
}
|
|
804
805
|
export default Message;
|
|
@@ -44,6 +44,7 @@ export declare enum ItemClasses {
|
|
|
44
44
|
Icon = "item-component-icon",
|
|
45
45
|
ItemIconIsReal = "item-component-icon-item-is-real",
|
|
46
46
|
ActionIcon = "item-component-icon-action",
|
|
47
|
+
ActionIconAnyItem = "item-component-icon-action-any-item",
|
|
47
48
|
ActionIconHasItem = "item-component-icon-action-has-item",
|
|
48
49
|
ActionIconNone = "item-component-icon-action-none",
|
|
49
50
|
SlottedIcon = "item-component-icon-slotted",
|
|
@@ -126,7 +126,9 @@ export default class ActionsConfigurationDrawer extends Component implements IRe
|
|
|
126
126
|
protected onNext(): boolean;
|
|
127
127
|
protected onPrevious(): boolean;
|
|
128
128
|
protected onLeft(): boolean;
|
|
129
|
-
protected onEnterBind(api: IBindHandlerApi | Input): boolean;
|
|
129
|
+
protected onEnterBind(api: IBindHandlerApi | Input, event?: KeyboardEvent): boolean;
|
|
130
|
+
protected onSubmit(): boolean;
|
|
131
|
+
private chooseSelected;
|
|
130
132
|
protected onSelectionChange(handler: SelectionHandler, component?: Component): void;
|
|
131
133
|
private selectNext;
|
|
132
134
|
private selectPrevious;
|
package/package.json
CHANGED