@wayward/types 2.14.2-beta.dev.20241220.1 → 2.14.2-beta.dev.20241222.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/doodad/Doodad.d.ts +1 -0
- package/definitions/game/game/entity/Entity.d.ts +4 -1
- package/definitions/game/game/entity/creature/Creature.d.ts +1 -0
- package/definitions/game/game/entity/creature/corpse/Corpse.d.ts +1 -0
- package/definitions/game/game/entity/npc/NPC.d.ts +2 -1
- package/definitions/game/game/entity/player/Player.d.ts +1 -0
- package/definitions/game/game/item/Item.d.ts +5 -1
- package/definitions/game/game/item/ItemManager.d.ts +2 -0
- package/definitions/game/game/tile/Tile.d.ts +2 -0
- package/definitions/game/game/tile/TileEvent.d.ts +1 -0
- package/definitions/game/ui/input/Bind.d.ts +3 -1
- package/definitions/game/ui/screen/screens/game/component/container/ContainerBucketItemList.d.ts +5 -1
- package/definitions/game/utilities/dev/Debug.d.ts +15 -0
- package/definitions/utilities/console/ConsoleUtility.d.ts +20 -0
- package/package.json +1 -1
@@ -133,6 +133,7 @@ export default class Doodad extends EntityMovable<IDoodadDescription, DoodadType
|
|
133
133
|
private _isWell?;
|
134
134
|
private readonly _doodadGroupCache;
|
135
135
|
constructor(entityOptions?: IEntityConstructorOptions<DoodadType>, options?: IDoodadOptions);
|
136
|
+
protected get typeEnum(): typeof DoodadType;
|
136
137
|
get asCorpse(): undefined;
|
137
138
|
get asCreature(): undefined;
|
138
139
|
get asDoodad(): Doodad | undefined;
|
@@ -31,7 +31,7 @@ import type { EntityReferenceTypes, IReferenceable, Reference } from "@wayward/g
|
|
31
31
|
import type { ITemperatureSource } from "@wayward/game/game/temperature/ITemperature";
|
32
32
|
import type Tile from "@wayward/game/game/tile/Tile";
|
33
33
|
import type TileEvent from "@wayward/game/game/tile/TileEvent";
|
34
|
-
import type
|
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
37
|
import type { INotificationLocation, ItemNotifierType, MarkerIconType, StatNotificationType } from "@wayward/game/renderer/notifier/INotifier";
|
@@ -75,11 +75,14 @@ export default abstract class Entity<DescriptionType = unknown, TypeType extends
|
|
75
75
|
* Get the entities description
|
76
76
|
*/
|
77
77
|
get description(): Readonly<DescriptionType> | undefined;
|
78
|
+
protected abstract get typeEnum(): PartialRecord<string | TypeType, TypeType | string>;
|
78
79
|
/**
|
79
80
|
* Adds a referenceId to the entity if it doesn't already have one
|
80
81
|
*/
|
81
82
|
addReferenceId(): void;
|
82
83
|
abstract getName(): Translation;
|
84
|
+
/** @deprecated Console helper */
|
85
|
+
protected get debug(): any;
|
83
86
|
/**
|
84
87
|
* Called when filling out the entities description for the first time
|
85
88
|
*/
|
@@ -83,6 +83,7 @@ export default class Creature extends EntityWithStats<ICreatureDescription, Crea
|
|
83
83
|
* - `creature.getName(undefined, 3)` // "acid spitter demons"
|
84
84
|
*/
|
85
85
|
getName(article?: Article, count?: number): Translation;
|
86
|
+
protected get typeEnum(): typeof CreatureType;
|
86
87
|
protected getDescription(): ICreatureDescription | undefined;
|
87
88
|
get isHostile(): boolean;
|
88
89
|
get canAlert(): boolean;
|
@@ -90,6 +90,7 @@ export default class Corpse extends Entity<ICorpseDescription, CreatureType, Ref
|
|
90
90
|
* - `corpse.getName(undefined, 3)` // "acid spitter demons"
|
91
91
|
*/
|
92
92
|
getName(article?: Article, count?: number): Translation;
|
93
|
+
protected get typeEnum(): typeof CreatureType;
|
93
94
|
protected getDescription(): ICorpseDescription | undefined;
|
94
95
|
creatureDescription(): ICreatureDescription | undefined;
|
95
96
|
get isValid(): boolean;
|
@@ -21,7 +21,7 @@ import { AiType, ChangeAiType } from "@wayward/game/game/entity/ai/AI";
|
|
21
21
|
import type { IEntityAiEvents } from "@wayward/game/game/entity/ai/AiManager";
|
22
22
|
import AiManager from "@wayward/game/game/entity/ai/AiManager";
|
23
23
|
import type { INPCDescription } from "@wayward/game/game/entity/npc/INPC";
|
24
|
-
import
|
24
|
+
import { NPCType } from "@wayward/game/game/entity/npc/INPCs";
|
25
25
|
import type MerchantNPC from "@wayward/game/game/entity/npc/npcs/Merchant";
|
26
26
|
import type ShipperNPC from "@wayward/game/game/entity/npc/npcs/Shipper";
|
27
27
|
import { MessageManagerNoOp } from "@wayward/game/game/entity/player/MessageManager";
|
@@ -66,6 +66,7 @@ export default abstract class NPC extends Human<INPCDescription, NPCType, Refere
|
|
66
66
|
static getRegistrarId(): number;
|
67
67
|
static setRegistrarId(id: number): void;
|
68
68
|
constructor(entityOptions?: IEntityConstructorOptions<NPCType>);
|
69
|
+
protected get typeEnum(): typeof NPCType;
|
69
70
|
getDescription(): INPCDescription | undefined;
|
70
71
|
getWeightCapacity(): number;
|
71
72
|
getRegistrarId(): number;
|
@@ -63,6 +63,7 @@ export default class Player extends Human<undefined, number, ReferenceType.Playe
|
|
63
63
|
delete(): void;
|
64
64
|
get isValid(): boolean;
|
65
65
|
get clientStore(): IClientStore;
|
66
|
+
protected get typeEnum(): {};
|
66
67
|
getDescription(): undefined;
|
67
68
|
createNoteManager(): NoteManager;
|
68
69
|
createMessageManager(): MessageManager;
|
@@ -29,7 +29,8 @@ import type Corpse from "@wayward/game/game/entity/creature/corpse/Corpse";
|
|
29
29
|
import type NPC from "@wayward/game/game/entity/npc/NPC";
|
30
30
|
import type Player from "@wayward/game/game/entity/player/Player";
|
31
31
|
import type { IMobCheck, IslandId } from "@wayward/game/game/island/IIsland";
|
32
|
-
import type { ContainerReference, DisplayableItemType, IConstructedInfo, IContainable, IContainer, IItemChangeIntoOptions, IItemDescription, IItemDisassembleResult, IItemDisassembly, IItemGetNameOptions, IItemUsed, IItemVehicle, IMagicalPropertyInfo, IItemMovementResult as IMoveToTileMobCheckResult, IMoveToTileOptions, ItemTag
|
32
|
+
import type { ContainerReference, DisplayableItemType, IConstructedInfo, IContainable, IContainer, IItemChangeIntoOptions, IItemDescription, IItemDisassembleResult, IItemDisassembly, IItemGetNameOptions, IItemUsed, IItemVehicle, IMagicalPropertyInfo, IItemMovementResult as IMoveToTileMobCheckResult, IMoveToTileOptions, ItemTag } from "@wayward/game/game/item/IItem";
|
33
|
+
import { ItemTypeExtra } from "@wayward/game/game/item/IItem";
|
33
34
|
import { BookType, ContainerSort, ItemDamageResult, ItemType, ItemTypeGroup, ItemWeightChange, SYMBOL_CONTAINER_CACHED_REFERENCE } from "@wayward/game/game/item/IItem";
|
34
35
|
import type { IPlaceOnTileOptions } from "@wayward/game/game/item/IItemManager";
|
35
36
|
import ItemMapManager from "@wayward/game/game/item/ItemMapManager";
|
@@ -198,6 +199,9 @@ export default class Item extends EntityMovable<IItemDescription, ItemType, Refe
|
|
198
199
|
* - `item.getName(undefined, 3)` // "stone axes"
|
199
200
|
*/
|
200
201
|
getName(article?: Article, options?: Partial<IItemGetNameOptions>): TranslationImpl;
|
202
|
+
protected get debug(): any;
|
203
|
+
private getDebug;
|
204
|
+
protected get typeEnum(): typeof ItemType;
|
201
205
|
protected getDescription(): IItemDescription | undefined;
|
202
206
|
get isTransient(): boolean;
|
203
207
|
get isValid(): boolean;
|
@@ -69,6 +69,8 @@ export interface IItemManagerEvents extends Events<EntityManager<Item>> {
|
|
69
69
|
containerUpdateOrder(container: IContainer): any;
|
70
70
|
containerStack(container: IContainer, type: ItemType): any;
|
71
71
|
containerUnstack(container: IContainer, type: ItemType): any;
|
72
|
+
/** Called at the end of inserting new items into a container, specifically when sorting the container was not necessary. */
|
73
|
+
containerItemAddDidNotSort(container: IContainer): any;
|
72
74
|
/**
|
73
75
|
* Called when an item is crafted
|
74
76
|
* @param human The human object
|
@@ -113,6 +113,8 @@ export default class Tile implements IVector4, Partial<ITileContainer>, IFieldOf
|
|
113
113
|
constructor(island: Island, x: number, y: number, z: number, id: number, rendererData: number, quality: Quality, isFake?: true);
|
114
114
|
get point(): IVector3;
|
115
115
|
get description(): ITerrainDescription | undefined;
|
116
|
+
/** @deprecated Console helper */
|
117
|
+
protected get debug(): any;
|
116
118
|
toString(): string;
|
117
119
|
getName(layerIndex?: number, article?: Article, options?: ITileGetNameOptions): Translation;
|
118
120
|
get type(): TerrainType;
|
@@ -88,6 +88,7 @@ export default class TileEvent extends EntityMovable<ITileEventDescription, Tile
|
|
88
88
|
get point(): IVector3;
|
89
89
|
get tile(): Tile;
|
90
90
|
toString(): string;
|
91
|
+
protected get typeEnum(): typeof TileEventType;
|
91
92
|
protected getDescription(): ITileEventDescription | undefined;
|
92
93
|
getName(article?: Article, count?: number): TranslationImpl;
|
93
94
|
getProducedTemperature(): number | undefined;
|
@@ -10,7 +10,8 @@
|
|
10
10
|
*/
|
11
11
|
import Bindable from "@wayward/game/ui/input/Bindable";
|
12
12
|
import { IInput } from "@wayward/game/ui/input/IInput";
|
13
|
-
import type { GlobalInputInfo, GlobalMouseInfo
|
13
|
+
import type { GlobalInputInfo, GlobalMouseInfo } from "@wayward/game/ui/input/InputManager";
|
14
|
+
import { InputInfo } from "@wayward/game/ui/input/InputManager";
|
14
15
|
import type { Macro } from "@wayward/game/ui/input/Macros";
|
15
16
|
import type { TypedPropertyDescriptorFunctionAnyNOfParams } from "@wayward/utilities/event/EventManager";
|
16
17
|
export interface IBindHandlerApi {
|
@@ -156,6 +157,7 @@ declare namespace Bind {
|
|
156
157
|
function deregisterHandlers(host: any): void;
|
157
158
|
const shouldLogHoldingEvent = false;
|
158
159
|
function emitEvent(event: BindingEventName, input: IInput, info: InputInfo, mouse: GlobalMouseInfo, globalInput: GlobalInputInfo): Set<Bindable>;
|
160
|
+
function handleMaybeNothingPressed(input: GlobalInputInfo, mouse: GlobalMouseInfo): void;
|
159
161
|
namespace Modifiers {
|
160
162
|
/**
|
161
163
|
* Registers a handler for when the modifiers of the given `Bindable` are pressed. This event won't be fired again until the modifiers of the `Bindable` are then *released*.
|
package/definitions/game/ui/screen/screens/game/component/container/ContainerBucketItemList.d.ts
CHANGED
@@ -82,7 +82,9 @@ 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
|
-
|
85
|
+
isFirstVisiblyStacked(item?: Item, excluding?: Item): boolean;
|
86
|
+
getStackedItemsThatAreVisible(type?: ItemType, excluding?: Item): Item[];
|
87
|
+
getStackedItems(type?: ItemType, excluding?: Item): Item[];
|
86
88
|
getStackIndex(type?: ItemType): number | undefined;
|
87
89
|
constructor(container?: IContainer);
|
88
90
|
private readonly activeReasons;
|
@@ -132,8 +134,10 @@ export default class ContainerBucketItemList extends Component implements ISorta
|
|
132
134
|
protected onContainerOrderUpdate(manager: ItemManager, container: IContainer): void;
|
133
135
|
protected onItemToggleProtected(item: Item): void;
|
134
136
|
private getAppendStrategy;
|
137
|
+
private addItemAddedStacks?;
|
135
138
|
protected onAddItem(manager: ItemManager, items: Item[], container: IContainer, index: number, options?: IMoveItemOptions): Promise<void>;
|
136
139
|
protected onRemoveItem(manager: ItemManager, items: Item[], container?: IContainer, containerTile?: Tile): void;
|
140
|
+
protected onAddItemDidNotSort(manager: ItemManager, container: IContainer): void;
|
137
141
|
protected onTransformItem(item: Item, newType: ItemType, oldType: ItemType): void;
|
138
142
|
protected onStack(manager: ItemManager, container: IContainer, type: ItemType): void;
|
139
143
|
protected onUnstack(manager: ItemManager, container: IContainer, type: ItemType): void;
|
@@ -0,0 +1,15 @@
|
|
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
|
+
declare namespace Debug {
|
12
|
+
function typeIfRelevant(type: string, name: string): string | undefined;
|
13
|
+
function where(thing: unknown): string | undefined;
|
14
|
+
}
|
15
|
+
export default Debug;
|
@@ -0,0 +1,20 @@
|
|
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 type ConsoleCreateMagic = <HOST extends WeakKey>(value: HOST, getter?: (value?: HOST) => any) => void;
|
12
|
+
export interface ConsoleMagic extends Record<string, any> {
|
13
|
+
magic: Record<string, ConsoleCreateMagic>;
|
14
|
+
}
|
15
|
+
/**
|
16
|
+
* A proxy for `window` when it's available. Assigning to this does nothing when it's not.
|
17
|
+
* Used to add utilities availble in the console
|
18
|
+
*/
|
19
|
+
declare const _default: ConsoleMagic;
|
20
|
+
export default _default;
|
package/package.json
CHANGED