@wayward/types 2.14.0-beta.dev.20240912.1 → 2.14.0-beta.dev.20240913.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/Human.d.ts +1 -1
- package/definitions/game/game/entity/action/usable/UsableAction.d.ts +7 -2
- package/definitions/game/game/item/IItem.d.ts +5 -2
- package/definitions/game/game/tile/Tile.d.ts +1 -1
- package/definitions/game/language/Translation.d.ts +8 -0
- package/definitions/game/language/dictionary/UiTranslation.d.ts +798 -797
- package/definitions/game/ui/screen/screens/GameScreen.d.ts +5 -1
- package/definitions/game/ui/screen/screens/game/IGameScreenApi.d.ts +2 -2
- package/definitions/utilities/random/Random.d.ts +2 -2
- package/package.json +1 -1
|
@@ -303,7 +303,7 @@ export default abstract class Human<DescriptionType = unknown, TypeType extends
|
|
|
303
303
|
* Extinguishes all torches the player is holding of they are swimming.
|
|
304
304
|
*/
|
|
305
305
|
extinguishTorchesIfSwimming(): void;
|
|
306
|
-
getRangedAccuracy(weapon: Item | undefined, ranged: IRangedInProgress | undefined, skillType: SkillType): number;
|
|
306
|
+
getRangedAccuracy(weapon: Item | undefined, ranged: IRangedInProgress | undefined, skillType: SkillType, which?: "base" | "skill" | "calc"): number;
|
|
307
307
|
rangeAction(weapon: Item | undefined, ranged: IRangedInProgress | undefined, bonusMagicalType: MagicalPropertyType, skillType: SkillType, useMaxRange?: boolean): IRangedResolvedDistance;
|
|
308
308
|
rangeAction(weapon: Item | undefined, ranged: IRangedInProgress | undefined, bonusMagicalType: MagicalPropertyType, skillType: SkillType, useMaxRange: boolean | undefined, clientSide: true): IRangedResolvedDistance[];
|
|
309
309
|
checkForTargetInRange(towardsTile: Tile | undefined, range: number, accuracy: number | undefined, includePlayers?: boolean): IMobCheck;
|
|
@@ -56,7 +56,12 @@ declare class UsableAction<REQUIREMENTS extends IUsableActionRequirements = IUsa
|
|
|
56
56
|
constructor(requirements: REQUIREMENTS, definition: DEFINITION);
|
|
57
57
|
is(id?: ActionId): boolean;
|
|
58
58
|
isExecutable(): this is UsableAction<REQUIREMENTS, IUsableActionDefinitionExecutable<REQUIREMENTS>>;
|
|
59
|
-
execute(player: Player, provided: IUsableActionUsing<REQUIREMENTS>, context: UsableActionExecutionContext | IUsableActionExecutionContext):
|
|
59
|
+
execute(player: Player, provided: IUsableActionUsing<REQUIREMENTS>, context: UsableActionExecutionContext | IUsableActionExecutionContext): {
|
|
60
|
+
used: true;
|
|
61
|
+
result: any;
|
|
62
|
+
} | {
|
|
63
|
+
used: false;
|
|
64
|
+
};
|
|
60
65
|
resolveUsing(player: Player, using: IUsableActionUsing<REQUIREMENTS>, fillTiles?: boolean): Message | IUsableActionUsing<REQUIREMENTS>;
|
|
61
66
|
resolveUsingOrUndefined(player: Player, using: IUsableActionUsing<REQUIREMENTS>, fillTiles?: boolean): IUsableActionUsing<REQUIREMENTS> | undefined;
|
|
62
67
|
isUsable(player: Player, provided: IUsableActionUsing<REQUIREMENTS>, context: UsableActionExecutionContext | IUsableActionExecutionContext): UsableActionUsability<REQUIREMENTS>;
|
|
@@ -102,6 +107,6 @@ export interface IUsableActionFactory<REQUIREMENTS extends IUsableActionRequirem
|
|
|
102
107
|
}
|
|
103
108
|
declare namespace UsableAction {
|
|
104
109
|
function requiring<REQUIREMENTS1 extends IUsableActionRequirements>(requirements: REQUIREMENTS1): IUsableActionFactory<REQUIREMENTS1>;
|
|
105
|
-
function create<DEFINITION extends IUsableActionDefinition<
|
|
110
|
+
function create<DEFINITION extends IUsableActionDefinition<Empty>>(action: DEFINITION): UsableAction<Empty, DEFINITION>;
|
|
106
111
|
}
|
|
107
112
|
export default UsableAction;
|
|
@@ -427,7 +427,10 @@ export interface IInvokeUse {
|
|
|
427
427
|
* Defaults to 1.0 — no cooldown multiplier from theurgy skill.
|
|
428
428
|
*/
|
|
429
429
|
cooldownTheurgyMultiplier?: number | IRange;
|
|
430
|
-
|
|
430
|
+
/**
|
|
431
|
+
* @returns The amount of success this action had, a decimal from 0-1
|
|
432
|
+
*/
|
|
433
|
+
use(human: Human, rune: Item): number | undefined;
|
|
431
434
|
}
|
|
432
435
|
export interface IItemBuild {
|
|
433
436
|
/**
|
|
@@ -633,7 +636,7 @@ export interface IRangedDescription {
|
|
|
633
636
|
accuracy?: number;
|
|
634
637
|
ammunitionType?: ItemType | ItemTypeGroup | ((action: IActionApi) => ItemType | ItemTypeGroup | undefined);
|
|
635
638
|
requiredToFire?: ItemType;
|
|
636
|
-
skillType
|
|
639
|
+
skillType: SkillType;
|
|
637
640
|
unlimitedAmmunition?: boolean;
|
|
638
641
|
attackMessage?: Message;
|
|
639
642
|
particles?: IRGB | ((action: IActionApi) => IRGB | undefined);
|
|
@@ -407,7 +407,7 @@ export default class Tile implements IVector4, Partial<ITileContainer>, IFieldOf
|
|
|
407
407
|
/**
|
|
408
408
|
* Gets the direction from this tile to the target tile
|
|
409
409
|
*/
|
|
410
|
-
getDirectionToTile(tile: Tile): Direction;
|
|
410
|
+
getDirectionToTile(tile: Tile): Direction.Cardinal;
|
|
411
411
|
/**
|
|
412
412
|
* Gets the adjacent tile in the direction
|
|
413
413
|
*/
|
|
@@ -214,8 +214,10 @@ declare namespace Translation {
|
|
|
214
214
|
*/
|
|
215
215
|
private get relevant();
|
|
216
216
|
private skipParenthesis?;
|
|
217
|
+
private isPercentage?;
|
|
217
218
|
constructor(base?: FVal, reformatter?: SupplierOr<Translation | undefined>);
|
|
218
219
|
noParenthesis(): this;
|
|
220
|
+
percentage(): this;
|
|
219
221
|
translate(simple?: boolean): Translation;
|
|
220
222
|
private parenthesize;
|
|
221
223
|
private translateAndFormatComponent;
|
|
@@ -230,8 +232,14 @@ declare namespace Translation {
|
|
|
230
232
|
mult(value: FVal, reformatter?: SupplierOr<Translation | undefined>, alreadyIncluded?: true): this;
|
|
231
233
|
outOf(value: FVal): TranslationImpl;
|
|
232
234
|
quality(quality?: IHasQuality | SupplierOr<Quality | undefined>, value?: FVal, reformatter?: SupplierOr<Translation | undefined>, alreadyIncluded?: true): this;
|
|
235
|
+
qualityMult(quality?: IHasQuality | SupplierOr<Quality | undefined>, value?: FVal, reformatter?: SupplierOr<Translation | undefined>, alreadyIncluded?: true): this;
|
|
236
|
+
private _quality;
|
|
233
237
|
skill(skill?: SkillType, value?: FVal, reformatter?: SupplierOr<Translation | undefined>, alreadyIncluded?: true): this;
|
|
238
|
+
skillMult(skill?: SkillType, value?: FVal, reformatter?: SupplierOr<Translation | undefined>, alreadyIncluded?: true): this;
|
|
239
|
+
private _skill;
|
|
234
240
|
magic(magic?: MagicalPropertyIdentity, magical?: IHasMagic, value?: FVal, reformatter?: SupplierOr<Translation | undefined>, alreadyIncluded?: true): this;
|
|
241
|
+
magicMult(magic?: MagicalPropertyIdentity, magical?: IHasMagic, value?: FVal, reformatter?: SupplierOr<Translation | undefined>, alreadyIncluded?: true): this;
|
|
242
|
+
private _magic;
|
|
235
243
|
private addComponent;
|
|
236
244
|
}
|
|
237
245
|
export type RefreshEvents = Map<GameEmitterOrBus, Map<string, Set<AnyFunction<boolean> | undefined>>>;
|