@wayward/types 2.14.0-beta.dev.20240314.1 → 2.14.0-beta.dev.20240316.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/moveItem/MoveItemFilterArgument.d.ts +1 -0
- package/definitions/game/game/entity/action/usable/IUsableAction.d.ts +2 -1
- package/definitions/game/game/entity/action/usable/UsableAction.d.ts +7 -2
- package/definitions/game/game/entity/action/usable/UsableActionTranslator.d.ts +3 -1
- package/definitions/game/game/entity/npc/INPC.d.ts +1 -1
- package/definitions/game/language/dictionary/Message.d.ts +834 -831
- package/definitions/game/language/dictionary/UiTranslation.d.ts +601 -600
- package/definitions/game/ui/screen/screens/game/component/ItemComponent.d.ts +2 -0
- package/definitions/game/ui/screen/screens/game/component/container/ContainerBucketItemList.d.ts +1 -0
- package/definitions/game/ui/screen/screens/game/static/actions/ActionSlot.d.ts +3 -1
- package/definitions/game/ui/screen/screens/game/static/actions/ActionSlotConfigurationColumn.d.ts +5 -2
- package/definitions/game/ui/screen/screens/game/static/actions/IActionBar.d.ts +3 -1
- package/package.json +1 -1
|
@@ -20,6 +20,7 @@ export interface IMoveItemFilterArgument {
|
|
|
20
20
|
quality?: ArrayOr<Quality>;
|
|
21
21
|
text?: string;
|
|
22
22
|
excludeProtected?: boolean;
|
|
23
|
+
excludeEquipped?: boolean;
|
|
23
24
|
}
|
|
24
25
|
export declare class MoveItemFilterArgument<FILTER extends IMoveItemFilterArgument> extends ActionArgumentCustom<FILTER> {
|
|
25
26
|
static canUse(filter: IMoveItemFilterArgument, item: Item, actionName?: Translation): IActionUsable | IActionNotUsable;
|
|
@@ -167,7 +167,8 @@ export type UsableActionUsability<REQUIREMENTS extends IUsableActionRequirements
|
|
|
167
167
|
export declare enum UsableActionExecutionContext {
|
|
168
168
|
Generic = 0,
|
|
169
169
|
ContextMenu = 1,
|
|
170
|
-
ActionBar = 2
|
|
170
|
+
ActionBar = 2,
|
|
171
|
+
ActionBarAutoUse = 3
|
|
171
172
|
}
|
|
172
173
|
export interface IUsableActionExecutionContext {
|
|
173
174
|
context: UsableActionExecutionContext;
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
import type { Deity } from "@wayward/game/game/deity/Deity";
|
|
12
12
|
import type Doodad from "@wayward/game/game/doodad/Doodad";
|
|
13
13
|
import { ActionType } from "@wayward/game/game/entity/action/IAction";
|
|
14
|
-
import type { ActionId, IUsableActionDefinition, IUsableActionDefinitionExecutable, IUsableActionExecutionContext, IUsableActionPossibleUsing, IUsableActionRequirements, IUsableActionUsing, UsableActionUsability } from "@wayward/game/game/entity/action/usable/IUsableAction";
|
|
14
|
+
import type { ActionId, IUsableActionDefinition, IUsableActionDefinitionExecutable, IUsableActionExecutionContext, IUsableActionItemRequirement, IUsableActionPossibleUsing, IUsableActionRequirements, IUsableActionUsing, UsableActionUsability } from "@wayward/game/game/entity/action/usable/IUsableAction";
|
|
15
15
|
import { IUsableActionNotUsable, UsableActionDisplayContext, UsableActionExecutionContext } from "@wayward/game/game/entity/action/usable/IUsableAction";
|
|
16
16
|
import UsableActionRegistrar from "@wayward/game/game/entity/action/usable/UsableActionRegistrar";
|
|
17
17
|
import type { ActionWhichTranslation } from "@wayward/game/game/entity/action/usable/UsableActionTranslator";
|
|
@@ -60,7 +60,7 @@ declare class UsableAction<REQUIREMENTS extends IUsableActionRequirements = IUsa
|
|
|
60
60
|
resolveUsing(player: Player, using: IUsableActionUsing<REQUIREMENTS>): Message.UiActionCannotUseRequiresCreature | Message.UiActionCannotUseRequiresDoodad | Message.UiActionCannotUseRequiresItem | Message.UiActionCannotUseRequiresNPC | Message.UiActionCannotUseRequiresVehicle | IUsableActionUsing<REQUIREMENTS>;
|
|
61
61
|
resolveUsingOrUndefined(player: Player, using: IUsableActionUsing<REQUIREMENTS>): IUsableActionUsing<REQUIREMENTS> | undefined;
|
|
62
62
|
isUsable(player: Player, provided: IUsableActionUsing<REQUIREMENTS>, context: UsableActionExecutionContext | IUsableActionExecutionContext): UsableActionUsability<REQUIREMENTS>;
|
|
63
|
-
isApplicable(player: Player, provided?: IUsableActionPossibleUsing, fullUsabilityCheck?: boolean): provided is IUsableActionUsing<REQUIREMENTS>;
|
|
63
|
+
isApplicable(player: Player, provided?: IUsableActionPossibleUsing, fullUsabilityCheck?: boolean, requireItem?: boolean): provided is IUsableActionUsing<REQUIREMENTS>;
|
|
64
64
|
private isItemApplicable;
|
|
65
65
|
private isDoodadApplicable;
|
|
66
66
|
private isCreatureApplicable;
|
|
@@ -82,6 +82,11 @@ declare class UsableAction<REQUIREMENTS extends IUsableActionRequirements = IUsa
|
|
|
82
82
|
getHighlightSelectors(using?: IUsableActionPossibleUsing): Array<HighlightSelector | undefined>;
|
|
83
83
|
private translator?;
|
|
84
84
|
getTranslation(using?: IUsableActionPossibleUsing, which?: ActionWhichTranslation, context?: UsableActionDisplayContext): Translation | undefined;
|
|
85
|
+
/**
|
|
86
|
+
* Determines whether this action is an item action, using `requirements.item`
|
|
87
|
+
*/
|
|
88
|
+
isItemAction(predicate?: (requirements: IUsableActionItemRequirement) => any): boolean;
|
|
89
|
+
get itemRequirementObject(): IUsableActionItemRequirement | undefined;
|
|
85
90
|
getOrder(using?: IUsableActionPossibleUsing): number;
|
|
86
91
|
getContextualLevel(using?: IUsableActionPossibleUsing): number;
|
|
87
92
|
canUseOnMoveWhenDiscovered(): boolean;
|
|
@@ -18,7 +18,7 @@ import type { TranslationArg } from "@wayward/game/language/ITranslation";
|
|
|
18
18
|
import Translation from "@wayward/game/language/Translation";
|
|
19
19
|
import type { IActionUseContextUsing } from "@wayward/game/ui/screen/screens/game/static/actions/IActionBar";
|
|
20
20
|
export type UsableActionTranslationArguments = [using: IActionUseContextUsing, action: UsableAction, context: UsableActionDisplayContext, inspectionContext?: InfoProviderContext];
|
|
21
|
-
export type ActionWhichTranslation = ActionTranslation | "useExact" | "useBest" | "useNone";
|
|
21
|
+
export type ActionWhichTranslation = ActionTranslation | "useExact" | "useBest" | "useNone" | "useHovered";
|
|
22
22
|
export declare class UsableActionTranslator {
|
|
23
23
|
readonly id: ActionId;
|
|
24
24
|
static translateId(id: ActionId, which?: ActionTranslation): TranslationImpl | undefined;
|
|
@@ -27,6 +27,7 @@ export declare class UsableActionTranslator {
|
|
|
27
27
|
private useExactSupplier?;
|
|
28
28
|
private useBestSupplier?;
|
|
29
29
|
private useNoneSupplier?;
|
|
30
|
+
private useHoveredSupplier?;
|
|
30
31
|
private readonly args;
|
|
31
32
|
private internalAction?;
|
|
32
33
|
constructor(id: ActionId);
|
|
@@ -39,5 +40,6 @@ export declare class UsableActionTranslator {
|
|
|
39
40
|
useExact(supplier: SupplierOr<Translation, UsableActionTranslationArguments>): this;
|
|
40
41
|
useBest(supplier: SupplierOr<Translation, UsableActionTranslationArguments>): this;
|
|
41
42
|
useNone(supplier: SupplierOr<Translation, UsableActionTranslationArguments>): this;
|
|
43
|
+
useHovered(supplier: SupplierOr<Translation, UsableActionTranslationArguments>): this;
|
|
42
44
|
get(action: UsableAction, using?: IUsableActionPossibleUsing, which?: ActionWhichTranslation, context?: UsableActionDisplayContext, inspectionContext?: InfoProviderContext): Translation | undefined;
|
|
43
45
|
}
|
|
@@ -21,7 +21,7 @@ export declare enum ShipperNPCInteractType {
|
|
|
21
21
|
export declare const MERCHANT_MAX_TRADES = 6;
|
|
22
22
|
export declare const MERCHANT_SELL_PRICE_MULTIPLIER = 1.5;
|
|
23
23
|
export declare const MERCHANT_ALREADY_TRADED_MULTIPLIER = 1.1;
|
|
24
|
-
export declare const NPC_SPAWN_CHANCE_MERCHANT_CIV_SCORE_MULTIPLIER = 0.
|
|
24
|
+
export declare const NPC_SPAWN_CHANCE_MERCHANT_CIV_SCORE_MULTIPLIER = 0.001;
|
|
25
25
|
export declare const NPC_SPAWN_CHANCE_SHIPPER_CIV_SCORE_MULTIPLIER = 0.00005;
|
|
26
26
|
export declare const NPC_SPAWN_CHANCE_MERCHANT_DISTANCE_PENALTY_MULTIPLIER = 0.1;
|
|
27
27
|
export declare const NPC_SPAWN_CHANCE_SHIPPER_DISTANCE_BONUS_MULTIPLIER = 0.05;
|