@wayward/types 2.13.0-beta.dev.20230409.2 → 2.13.0-beta.dev.20230411.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/CageCreature.d.ts +2 -0
- package/definitions/game/game/entity/creature/Creature.d.ts +2 -1
- package/definitions/game/game/entity/creature/CreatureManager.d.ts +2 -1
- package/definitions/game/game/item/IItem.d.ts +10 -0
- package/definitions/game/game/item/Item.d.ts +2 -2
- package/definitions/game/game/tile/Tile.d.ts +4 -0
- package/package.json +1 -1
|
@@ -12,8 +12,10 @@ 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
14
|
import type Creature from "game/entity/creature/Creature";
|
|
15
|
+
import type { ItemType } from "game/item/IItem";
|
|
15
16
|
export interface ICageCreature extends IActionUsable {
|
|
16
17
|
creature: Creature;
|
|
18
|
+
changeInto: ItemType;
|
|
17
19
|
}
|
|
18
20
|
declare const _default: Action<[ActionArgument.ItemInventory], import("../../Human").default<number>, void, ICageCreature, [import("../../../item/Item").default]>;
|
|
19
21
|
export default _default;
|
|
@@ -104,6 +104,7 @@ export default class Creature extends EntityWithStats<ICreatureDescription, Crea
|
|
|
104
104
|
*/
|
|
105
105
|
getEnemy(): Human | Creature | undefined;
|
|
106
106
|
setEnemy(enemy: Human | Creature | undefined): void;
|
|
107
|
+
private incrementEnemyAttempts;
|
|
107
108
|
skipNextUpdate(): void;
|
|
108
109
|
getMoveType(): MoveType;
|
|
109
110
|
queueSoundEffect(type: SfxType, delay?: number, speed?: number): void;
|
|
@@ -139,7 +140,7 @@ export default class Creature extends EntityWithStats<ICreatureDescription, Crea
|
|
|
139
140
|
protected updateDoodadOverHiddenStateForCurrentTile(hidden?: boolean): void;
|
|
140
141
|
protected updateTile(fromTile: Tile, toTile: Tile): boolean;
|
|
141
142
|
protected onStatChange(stat: IStat, oldValue: number, info: IStatChangeInfo): void;
|
|
142
|
-
findPath(target: Tile, maxNodesChecked?: number, ignoreHuman?: Human): Tile[] | undefined;
|
|
143
|
+
findPath(target: Tile, moveType: MoveType, maxNodesChecked?: number, ignoreHuman?: Human): Tile[] | undefined;
|
|
143
144
|
getHitchingPostsAround(): IHitch;
|
|
144
145
|
/**
|
|
145
146
|
* Check creature move with a multiplayer sync check
|
|
@@ -15,7 +15,7 @@ import { CreatureType, SpawnGroup, TileGroup } from "game/entity/creature/ICreat
|
|
|
15
15
|
import EntityManager from "game/entity/EntityManager";
|
|
16
16
|
import type Human from "game/entity/Human";
|
|
17
17
|
import { MoveType } from "game/entity/IEntity";
|
|
18
|
-
import
|
|
18
|
+
import Tile from "game/tile/Tile";
|
|
19
19
|
import type { IVector3 } from "utilities/math/IVector";
|
|
20
20
|
export interface ICreatureManagerEvents extends Events<EntityManager<Creature>> {
|
|
21
21
|
/**
|
|
@@ -55,6 +55,7 @@ export default class CreatureManager extends EntityManager<Creature> {
|
|
|
55
55
|
*/
|
|
56
56
|
spawn(type: CreatureType, tile: Tile, bypass?: boolean, forceAberrant?: boolean, spawnTiles?: TileGroup, bypassCreatureLimit?: boolean): Creature | undefined;
|
|
57
57
|
spawnFromGroup(creatureGroup: SpawnGroup, tile: Tile, bypass?: boolean, bypassCreatureLimit?: boolean): Creature | undefined;
|
|
58
|
+
createFake(type: CreatureType, aberrant: boolean, tile?: Tile, id?: number): Creature;
|
|
58
59
|
exists(creature: Creature): boolean;
|
|
59
60
|
maybeSpawnClawWorm(target: Human | Creature): void;
|
|
60
61
|
/**
|
|
@@ -282,6 +282,8 @@ export interface IItemDescription extends IObjectDescription, IModdable, ITemper
|
|
|
282
282
|
onUnequip?(item: Item): void;
|
|
283
283
|
onContainerItemAdd?(container: Item & IContainer, item: Item): void;
|
|
284
284
|
onContainerItemRemove?(container: Item & IContainer, item: Item): void;
|
|
285
|
+
onCreate?(item: Item): void;
|
|
286
|
+
onChangeInto?(item: Item, fromItemType: ItemType): void;
|
|
285
287
|
}
|
|
286
288
|
export type ConsumeItemStatsTuple = [health: number, stamina: number, hunger: number, thirst: number];
|
|
287
289
|
export interface IItemOnUse {
|
|
@@ -478,6 +480,14 @@ export interface ICreateOnBreak {
|
|
|
478
480
|
tileEventType?: TileEventType;
|
|
479
481
|
}
|
|
480
482
|
export type IDismantleComponent = Record<number, number>;
|
|
483
|
+
export interface IItemChangeIntoOptions {
|
|
484
|
+
disableNotify: boolean;
|
|
485
|
+
disableEmitTransformation: boolean;
|
|
486
|
+
addCreature: {
|
|
487
|
+
creature: Creature;
|
|
488
|
+
remainTamed: boolean;
|
|
489
|
+
};
|
|
490
|
+
}
|
|
481
491
|
export interface IRanged {
|
|
482
492
|
range: number;
|
|
483
493
|
attack: number;
|
|
@@ -25,7 +25,7 @@ import { TileUpdateType } from "game/IGame";
|
|
|
25
25
|
import type { IObject, IObjectOptions } from "game/IObject";
|
|
26
26
|
import { Quality } from "game/IObject";
|
|
27
27
|
import type { IslandId } from "game/island/IIsland";
|
|
28
|
-
import type { ContainerReference, DisplayableItemType, IConstructedInfo, IContainable, IContainer, IItemDescription, IItemDisassembleResult, IItemUsed, IMagicalPropertyInfo, IMoveToTileOptions, ItemCounter, ItemTag, ItemTypeExtra } from "game/item/IItem";
|
|
28
|
+
import type { ContainerReference, DisplayableItemType, IConstructedInfo, IContainable, IContainer, IItemChangeIntoOptions, IItemDescription, IItemDisassembleResult, IItemUsed, IMagicalPropertyInfo, IMoveToTileOptions, ItemCounter, ItemTag, ItemTypeExtra } from "game/item/IItem";
|
|
29
29
|
import { BookType, ItemDamageResult, ItemType, ItemTypeGroup, ItemWeightChange, SYMBOL_CONTAINER_CACHED_REFERENCE } from "game/item/IItem";
|
|
30
30
|
import type { IPlaceOnTileOptions } from "game/item/IItemManager";
|
|
31
31
|
import ItemMapManager from "game/item/ItemMapManager";
|
|
@@ -206,7 +206,7 @@ export default class Item extends EntityMovable<IItemDescription, ItemType, Item
|
|
|
206
206
|
getEquippedHuman(): Human | undefined;
|
|
207
207
|
isEquipped(includeDisabled?: true): boolean;
|
|
208
208
|
getEquipSlot(includeDisabled?: true): EquipType | undefined;
|
|
209
|
-
changeInto(type: ItemType,
|
|
209
|
+
changeInto(type: ItemType, options?: Partial<IItemChangeIntoOptions>): void;
|
|
210
210
|
/**
|
|
211
211
|
* Verifies an item has a proper weight combined with its magical item weight (featherweight) property and changes it if not.
|
|
212
212
|
* @returns A type of change via ItemWeightChange for showing a new magical property was added or a new magical weight was added. If no change happened, it will return undefined.
|
|
@@ -77,6 +77,10 @@ export default class Tile implements IVector4, Partial<ITileContainer>, IFieldOf
|
|
|
77
77
|
*/
|
|
78
78
|
containedItems?: Item[];
|
|
79
79
|
private _description;
|
|
80
|
+
/**
|
|
81
|
+
* Creates a fake tile
|
|
82
|
+
*/
|
|
83
|
+
static createFake(island: Island): Tile;
|
|
80
84
|
/**
|
|
81
85
|
* Constructed during map gen
|
|
82
86
|
*/
|
package/package.json
CHANGED