@wayward/types 2.12.0-beta.dev.20220829.1 → 2.12.0-beta.dev.20220901.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/usable/actions/UsableActionsDynamic.d.ts +4 -3
- package/definitions/game/game/entity/creature/Creature.d.ts +1 -1
- package/definitions/game/game/entity/creature/ICreature.d.ts +0 -1
- package/definitions/game/game/entity/creature/corpse/Corpse.d.ts +23 -0
- package/definitions/game/game/entity/creature/corpse/CorpseManager.d.ts +1 -1
- package/definitions/game/game/entity/creature/corpse/ICorpse.d.ts +2 -0
- package/definitions/game/game/entity/npc/npcs/Merchant.d.ts +6 -0
- package/definitions/game/game/item/IItem.d.ts +1 -1
- package/definitions/game/game/item/Item.d.ts +1 -1
- package/definitions/game/game/item/ItemManager.d.ts +6 -1
- package/definitions/game/game/tile/ITerrain.d.ts +2 -1
- package/definitions/game/renderer/world/WorldRenderer.d.ts +1 -0
- package/definitions/game/ui/input/IIInput.d.ts +6 -3
- package/definitions/game/ui/input/IInput.d.ts +1 -1
- package/definitions/game/ui/old/screens/InGameScreen.d.ts +2 -2
- package/definitions/game/ui/screen/screens/game/Dialogs.d.ts +7 -2
- package/definitions/game/ui/screen/screens/game/static/ActionBar.d.ts +2 -2
- package/definitions/game/ui/screen/screens/game/static/actions/ActionBarBindableManager.d.ts +1 -1
- package/definitions/game/ui/screen/screens/menu/menus/LoadGameMenu.d.ts +1 -1
- package/package.json +1 -1
|
@@ -18,15 +18,16 @@ export interface IUsableActionDynamicDefinition {
|
|
|
18
18
|
icon?: UsableActionIconReference;
|
|
19
19
|
bindable: Bindable;
|
|
20
20
|
displayLevel?: ActionDisplayLevel;
|
|
21
|
+
order?: number;
|
|
21
22
|
}
|
|
22
23
|
export interface IUsableActionsDynamicConfig<DEFINITION extends IUsableActionDynamicDefinition, REQUIREMENTS extends IUsableActionRequirements> {
|
|
23
24
|
id: string;
|
|
24
25
|
record: PartialRecord<ActionType, DEFINITION | false>;
|
|
25
26
|
getDynamic(actions: Set<ActionType>): any;
|
|
26
27
|
requirements?(action: ActionType, definition?: DEFINITION): REQUIREMENTS;
|
|
27
|
-
isUsable(action: ActionType, player: Player, using: IUsableActionUsing<REQUIREMENTS
|
|
28
|
-
execute(action: ActionType, player: Player, using: IUsableActionUsing<REQUIREMENTS
|
|
29
|
-
order?(action: ActionType, using: IUsableActionPossibleUsing): number | undefined;
|
|
28
|
+
isUsable(action: ActionType, player: Player, using: IUsableActionUsing<REQUIREMENTS>, definition?: DEFINITION): ReturnableUsableActionUsability;
|
|
29
|
+
execute(action: ActionType, player: Player, using: IUsableActionUsing<REQUIREMENTS>, definition?: DEFINITION): any;
|
|
30
|
+
order?(action: ActionType, using: IUsableActionPossibleUsing, definition?: DEFINITION): number | undefined;
|
|
30
31
|
}
|
|
31
32
|
export default class UsableActionsDynamic<DEFINITION extends IUsableActionDynamicDefinition, REQUIREMENTS extends IUsableActionRequirements> extends UsableActionGenerator {
|
|
32
33
|
constructor(config: IUsableActionsDynamicConfig<DEFINITION, REQUIREMENTS>);
|
|
@@ -40,7 +40,7 @@ export default class Creature extends Entity implements IUnserializedCallback, I
|
|
|
40
40
|
attacks: number;
|
|
41
41
|
attempts: number;
|
|
42
42
|
};
|
|
43
|
-
respawned?:
|
|
43
|
+
respawned?: number;
|
|
44
44
|
shouldSkipNextUpdate: boolean;
|
|
45
45
|
type: CreatureType;
|
|
46
46
|
originalMoveType: MoveType | undefined;
|
|
@@ -150,7 +150,6 @@ export interface ICreatureDescription extends IModdable, ITemperatureDescription
|
|
|
150
150
|
lootGroup?: LootGroupType;
|
|
151
151
|
jumpOver?: boolean;
|
|
152
152
|
noCorpse?: boolean;
|
|
153
|
-
respawn?: boolean;
|
|
154
153
|
reputation: number;
|
|
155
154
|
waterAnimations?: boolean;
|
|
156
155
|
tamingDifficulty?: number;
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
|
10
10
|
*/
|
|
11
11
|
import EventEmitter from "event/EventEmitter";
|
|
12
|
+
import type { ICorpseDescription } from "game/entity/creature/corpse/ICorpse";
|
|
12
13
|
import { CreatureType } from "game/entity/creature/ICreature";
|
|
13
14
|
import type { CreationId } from "game/IGame";
|
|
14
15
|
import type { IObject } from "game/IObject";
|
|
@@ -20,7 +21,19 @@ import type { ISerializedTranslation } from "language/ITranslation";
|
|
|
20
21
|
import type Translation from "language/Translation";
|
|
21
22
|
import type { IVector3 } from "utilities/math/IVector";
|
|
22
23
|
export interface ICorpseEvents {
|
|
24
|
+
/**
|
|
25
|
+
* Called when the entity is created in the game
|
|
26
|
+
* Also called for players that "rejoin" the game
|
|
27
|
+
*/
|
|
28
|
+
created(): void;
|
|
29
|
+
/**
|
|
30
|
+
* Called when the entity is removed from the game
|
|
31
|
+
*/
|
|
32
|
+
removed(): void;
|
|
23
33
|
}
|
|
34
|
+
/**
|
|
35
|
+
* TODO: extends Entity?
|
|
36
|
+
*/
|
|
24
37
|
export default class Corpse extends EventEmitter.Host<ICorpseEvents> implements IObject<CreatureType>, IVector3, IReferenceable {
|
|
25
38
|
static is(value: any): value is Corpse;
|
|
26
39
|
readonly objectType: CreationId.Corpse;
|
|
@@ -32,11 +45,13 @@ export default class Corpse extends EventEmitter.Host<ICorpseEvents> implements
|
|
|
32
45
|
referenceId?: number;
|
|
33
46
|
renamed?: string | ISerializedTranslation | undefined;
|
|
34
47
|
step?: number | undefined;
|
|
48
|
+
respawned?: number;
|
|
35
49
|
type: CreatureType;
|
|
36
50
|
x: number;
|
|
37
51
|
y: number;
|
|
38
52
|
z: number;
|
|
39
53
|
islandId: IslandId;
|
|
54
|
+
private _description;
|
|
40
55
|
constructor(type?: CreatureType, islandId?: `${number},${number}`, x?: number, y?: number, z?: number, decay?: number);
|
|
41
56
|
get island(): import("../../../island/Island").default;
|
|
42
57
|
toString(): string;
|
|
@@ -50,9 +65,17 @@ export default class Corpse extends EventEmitter.Host<ICorpseEvents> implements
|
|
|
50
65
|
* - `corpse.getName(undefined, 3)` // "acid spitter demons"
|
|
51
66
|
*/
|
|
52
67
|
getName(article?: false | "definite" | "indefinite", count?: number): Translation;
|
|
68
|
+
description(): ICorpseDescription | undefined;
|
|
53
69
|
getTile(): ITile;
|
|
54
70
|
isValid(): boolean;
|
|
55
71
|
getDecayAtStart(): number;
|
|
56
72
|
update(): void;
|
|
57
73
|
getResources(clientSide?: boolean): ItemType[];
|
|
74
|
+
protected onCreated(): void;
|
|
75
|
+
protected onRemoved(): void;
|
|
76
|
+
/**
|
|
77
|
+
* Updates the DoodadOverHidden tile flag if the creature is large.
|
|
78
|
+
* Large creatures should render over the doodad over layer, which means we should hide the doodad over layer for doodads on the creatures tile.
|
|
79
|
+
*/
|
|
80
|
+
updateDoodadOverHiddenState(shouldBeHidden: boolean): void;
|
|
58
81
|
}
|
|
@@ -21,7 +21,7 @@ export interface ICorpseManagerEvents {
|
|
|
21
21
|
export default class CorpseManager extends ObjectManager<Corpse, ICorpseManagerEvents> {
|
|
22
22
|
protected readonly creationId: CreationId;
|
|
23
23
|
load(): void;
|
|
24
|
-
create(type: CreatureType, x: number, y: number, z: number, decay?: number, aberrant?: boolean, name?: string, qualityBonus?: number): Corpse | undefined;
|
|
24
|
+
create(type: CreatureType, x: number, y: number, z: number, decay?: number, aberrant?: boolean, name?: string, qualityBonus?: number, respawned?: number): Corpse | undefined;
|
|
25
25
|
updateAll(): void;
|
|
26
26
|
remove(corpse: Corpse): void;
|
|
27
27
|
getName(typeOrCorpse: CreatureType | Corpse, article?: false | "definite" | "indefinite", count?: number, showCount?: boolean): import("../../../../language/impl/TranslationImpl").default;
|
|
@@ -38,6 +38,10 @@ export default class MerchantNPC extends NPC {
|
|
|
38
38
|
* Stop stat timers when they would kill
|
|
39
39
|
*/
|
|
40
40
|
private capStatTimers;
|
|
41
|
+
/**
|
|
42
|
+
* Equip better things when available
|
|
43
|
+
*/
|
|
44
|
+
private processEquipment;
|
|
41
45
|
/**
|
|
42
46
|
* Try to do something when health is below 20%
|
|
43
47
|
*/
|
|
@@ -51,4 +55,6 @@ export default class MerchantNPC extends NPC {
|
|
|
51
55
|
*/
|
|
52
56
|
private processThirst;
|
|
53
57
|
get asMerchant(): MerchantNPC;
|
|
58
|
+
private calculateWeaponEquipItemScore;
|
|
59
|
+
private calculateDefenseEquipItemScore;
|
|
54
60
|
}
|
|
@@ -68,6 +68,7 @@ export declare const SYMBOL_CONTAINER_ITEMS_TEMPERATURE: unique symbol;
|
|
|
68
68
|
export declare const SYMBOL_CONTAINER_TILE_TEMPERATURE: unique symbol;
|
|
69
69
|
export interface IContainable {
|
|
70
70
|
containedWithin?: IContainer;
|
|
71
|
+
containerType?: ContainerType;
|
|
71
72
|
[SYMBOL_CONTAINER_CACHED_REFERENCE]?: ContainerReference;
|
|
72
73
|
}
|
|
73
74
|
export interface IContainer extends IContainable {
|
|
@@ -77,7 +78,6 @@ export interface IContainer extends IContainable {
|
|
|
77
78
|
containedItems: Item[];
|
|
78
79
|
transientItems?: Item[];
|
|
79
80
|
itemOrders?: number[];
|
|
80
|
-
containerType?: ContainerType;
|
|
81
81
|
}
|
|
82
82
|
export interface IItemDisassembleResult {
|
|
83
83
|
items: IItemDisassembly[];
|
|
@@ -183,8 +183,8 @@ export default class Item extends EventEmitter.Host<IItemEvents> implements IRef
|
|
|
183
183
|
getDamageModifier(): number;
|
|
184
184
|
isDamaged(): boolean;
|
|
185
185
|
isInTradeContainer(): boolean;
|
|
186
|
+
getEquippedHuman(): Human | undefined;
|
|
186
187
|
isEquipped(includeDisabled?: true): boolean;
|
|
187
|
-
getEquippedPlayer(): Human | undefined;
|
|
188
188
|
getEquipSlot(includeDisabled?: true): EquipType | undefined;
|
|
189
189
|
isDecayed(): boolean;
|
|
190
190
|
changeInto(type: ItemType, disableNotify?: boolean, emitTransformation?: boolean): void;
|
|
@@ -234,6 +234,11 @@ export default class ItemManager extends ObjectManager<Item, IItemManagerEvents>
|
|
|
234
234
|
* @returns whether the given containable is, or is contained within, the given container
|
|
235
235
|
*/
|
|
236
236
|
isContainableInContainer(containable: IContainable, container: IContainer): boolean;
|
|
237
|
+
/**
|
|
238
|
+
* @returns whether the given containable is, or is contained within, a trade container
|
|
239
|
+
*/
|
|
240
|
+
isContainableInTradeContainer(containable: IContainable): boolean;
|
|
241
|
+
getTradeContainerForContainer(containable: IContainer | undefined): IContainer | undefined;
|
|
237
242
|
getAdjacentContainers(humanOrPosition: Human | IVector3, includeNpcs?: boolean, ignoreOptions?: boolean): IContainer[];
|
|
238
243
|
isContainableInAdjacentContainer(human: Human, containable: IContainable, includeNpcs?: boolean, ignoreOptions?: boolean): boolean;
|
|
239
244
|
isInInventory(containable: IContainable): boolean;
|
|
@@ -298,7 +303,7 @@ export default class ItemManager extends ObjectManager<Item, IItemManagerEvents>
|
|
|
298
303
|
*/
|
|
299
304
|
loadReference(container: IContainer, loadChildReferences?: boolean): boolean;
|
|
300
305
|
private removeFromContainerInternal;
|
|
301
|
-
private
|
|
306
|
+
private onItemMoveOrRemove;
|
|
302
307
|
private getCraftTierBonus;
|
|
303
308
|
computeCraftQualityBonus(itemType: ItemType, itemsToRequire: Item[], itemsToConsume: Item[], doodadsUsed: IDoodadsUsed[] | undefined): number;
|
|
304
309
|
getCraftChance(human: Human, recipe: IRecipe, qualityBonus: number, returnQuality?: boolean, alwaysReturn?: boolean): number;
|
|
@@ -221,6 +221,7 @@ export default class WorldRenderer extends EventEmitter.Host<IWorldRendererEvent
|
|
|
221
221
|
*/
|
|
222
222
|
private renderStatusEffect;
|
|
223
223
|
private spriteBatchForLayer;
|
|
224
|
+
addTileToViewport(visibleTiles: Set<ITile>, x: number, y: number, itemBatch: ISpriteBatch | undefined): void;
|
|
224
225
|
computeSpritesInViewportImmediately(): void;
|
|
225
226
|
private batchItems;
|
|
226
227
|
private batchItem;
|
|
@@ -8,7 +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 type { InputCatalyst } from "ui/input/IInput";
|
|
11
|
+
import type { InputCatalyst, Modifier } from "ui/input/IInput";
|
|
12
12
|
export declare enum InputCatalystType {
|
|
13
13
|
Key = 0,
|
|
14
14
|
MouseButton = 1,
|
|
@@ -21,8 +21,11 @@ export declare enum InputIcon {
|
|
|
21
21
|
ClickRight = 2,
|
|
22
22
|
ScrollUp = 3,
|
|
23
23
|
ScrollDown = 4,
|
|
24
|
-
HoverItem = 5
|
|
24
|
+
HoverItem = 5,
|
|
25
|
+
Shift = 6,
|
|
26
|
+
Ctrl = 7,
|
|
27
|
+
Alt = 8
|
|
25
28
|
}
|
|
26
29
|
export declare namespace InputIcon {
|
|
27
|
-
function get(catalyst: InputCatalyst): InputIcon | undefined;
|
|
30
|
+
function get(catalyst: InputCatalyst | Modifier): InputIcon | undefined;
|
|
28
31
|
}
|
|
@@ -49,7 +49,7 @@ declare enum ModifierType {
|
|
|
49
49
|
export declare type Modifier = keyof typeof ModifierType;
|
|
50
50
|
export declare module Modifier {
|
|
51
51
|
function is(value: unknown): value is Modifier;
|
|
52
|
-
function translate(modifier: Modifier): TranslationImpl;
|
|
52
|
+
function translate(modifier: Modifier, simplify?: boolean): TranslationImpl;
|
|
53
53
|
function getTranslationId(modifier: Modifier): string;
|
|
54
54
|
function setsEqual(modifiersA: Set<Modifier>, modifiersB: Set<Modifier>): boolean;
|
|
55
55
|
function all(): readonly Modifier[];
|
|
@@ -127,7 +127,7 @@ export default class InGameScreen extends BaseScreen {
|
|
|
127
127
|
onAddItemsToContainer(containerElement: JQuery, containerDialogElement: JQuery | undefined, isInventoryContainer: boolean, updateTables?: boolean): void;
|
|
128
128
|
afterAddingMultipleItemsToContainer(container: IContainer): void;
|
|
129
129
|
removeItemFromContainer(item: Item, container: IContainer): void;
|
|
130
|
-
refreshContainerName(container: IContainer): void;
|
|
130
|
+
refreshContainerName(container: IContainer, nestedUpdate?: boolean): void;
|
|
131
131
|
getInventoryItemsInOrder(): any[];
|
|
132
132
|
saveItemOrder(containerElement: JQuery, activeSort?: boolean): void;
|
|
133
133
|
craftItem(itemType: ItemType): void;
|
|
@@ -169,7 +169,7 @@ export default class InGameScreen extends BaseScreen {
|
|
|
169
169
|
closeStaticContainers(): void;
|
|
170
170
|
hasOpenContainer(): boolean;
|
|
171
171
|
closeAllContainers(closeType?: "close" | "destroy"): boolean;
|
|
172
|
-
updateContainerName(containerDialogElement: JQuery): void;
|
|
172
|
+
updateContainerName(containerDialogElement: JQuery, nestedUpdate?: boolean): void;
|
|
173
173
|
updateActiveContainer(): void;
|
|
174
174
|
getActiveContainer(): IUiContainer | undefined;
|
|
175
175
|
getOpenContainers(): IUiContainer[];
|
|
@@ -42,9 +42,14 @@ export declare type IEdges = [
|
|
|
42
42
|
]
|
|
43
43
|
];
|
|
44
44
|
export interface IDialogDescription<SQUARE = boolean> extends IModdable {
|
|
45
|
-
|
|
45
|
+
/**
|
|
46
|
+
* The minimum resolution of this dialog, in pixels.
|
|
47
|
+
*/
|
|
48
|
+
minResolution: SQUARE extends true ? number : IVector2;
|
|
49
|
+
/**
|
|
50
|
+
* The default size of this dialog, in percentages. For square dialogs, this is the Y axis.
|
|
51
|
+
*/
|
|
46
52
|
size: SQUARE extends true ? number : IVector2;
|
|
47
|
-
maxSize: SQUARE extends true ? number : IVector2;
|
|
48
53
|
edges: IEdges | "center";
|
|
49
54
|
/**
|
|
50
55
|
* Whether to save if the dialog is open. If this is false, the dialog will always be closed when a game loads. Defaults to true.
|
|
@@ -26,7 +26,7 @@ import QuadrantComponent from "ui/screen/screens/game/component/QuadrantComponen
|
|
|
26
26
|
import ActionsConfigurationDrawer from "ui/screen/screens/game/static/actions/ActionsDrawer";
|
|
27
27
|
import ActionSlotTooltipHandler from "ui/screen/screens/game/static/actions/ActionSlotTooltip";
|
|
28
28
|
import { IActionBarSlotData } from "ui/screen/screens/game/static/actions/IActionBar";
|
|
29
|
-
export declare const MAX_SLOTS =
|
|
29
|
+
export declare const MAX_SLOTS = 48;
|
|
30
30
|
export declare enum ActionBarClasses {
|
|
31
31
|
Main = "game-action-bar",
|
|
32
32
|
Configuring = "game-action-bar-configuring",
|
|
@@ -107,7 +107,7 @@ export declare class ActionSlot extends Button implements IRefreshable {
|
|
|
107
107
|
clear(): void;
|
|
108
108
|
equipItem(item: Item, configure?: boolean): void;
|
|
109
109
|
protected onConfigureBind(api: IBindHandlerApi): boolean;
|
|
110
|
-
configure(): void;
|
|
110
|
+
configure(emitToActionBar?: boolean): void;
|
|
111
111
|
protected onAppend(): void;
|
|
112
112
|
protected onItemMaybeInaccessible(): void;
|
|
113
113
|
postExecuteAction(action: IActionApi): void;
|
package/definitions/game/ui/screen/screens/game/static/actions/ActionBarBindableManager.d.ts
CHANGED
|
@@ -19,5 +19,5 @@ export default class ActionBarBindableManager extends BindableManager {
|
|
|
19
19
|
getSlotToggleBindable(slot: number): Bindable | undefined;
|
|
20
20
|
requireSlots(slotCount: number): void;
|
|
21
21
|
private generateBindings;
|
|
22
|
-
private
|
|
22
|
+
private generateBinding;
|
|
23
23
|
}
|
|
@@ -19,7 +19,7 @@ export default class LoadGameMenu extends Menu {
|
|
|
19
19
|
private sort;
|
|
20
20
|
private sortDirection;
|
|
21
21
|
private newGameButton;
|
|
22
|
-
private
|
|
22
|
+
private milestonesNotUnlockableWarning;
|
|
23
23
|
private readonly selectedRow;
|
|
24
24
|
constructor();
|
|
25
25
|
protected onSelect(api: IBindHandlerApi): boolean;
|
package/package.json
CHANGED