@wayward/types 2.11.4-beta.dev.20220130.1 → 2.11.4-beta.dev.20220204.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 +13 -3
- package/definitions/game/game/entity/IHuman.d.ts +25 -1
- package/definitions/game/game/entity/action/Actions.d.ts +1 -1
- package/definitions/game/game/entity/action/actions/Till.d.ts +1 -1
- package/definitions/game/game/entity/creature/Creature.d.ts +2 -2
- package/definitions/game/game/entity/creature/Pathing.d.ts +2 -2
- package/definitions/game/game/entity/npc/NPC.d.ts +1 -5
- package/definitions/game/game/entity/player/IPlayer.d.ts +0 -20
- package/definitions/game/game/entity/player/Player.d.ts +2 -10
- package/definitions/game/game/inspection/inspections/IslandInspection.d.ts +3 -3
- package/definitions/game/game/inspection/inspections/NPCInspection.d.ts +2 -1
- package/definitions/game/game/item/Item.d.ts +9 -10
- package/definitions/game/game/item/ItemManager.d.ts +3 -3
- package/definitions/game/game/reference/ReferenceManager.d.ts +1 -1
- package/package.json +1 -1
|
@@ -16,7 +16,7 @@ import type { ICausesDamage } from "game/entity/IEntity";
|
|
|
16
16
|
import type { ICheckUnderOptions, ICrafted, ICustomizations, IHumanEvents, IRestData, RestCancelReason } from "game/entity/IHuman";
|
|
17
17
|
import { EquipType, SkillType } from "game/entity/IHuman";
|
|
18
18
|
import { Stat } from "game/entity/IStats";
|
|
19
|
-
import type { IAttackHand, IMobCheck } from "game/entity/player/IPlayer";
|
|
19
|
+
import type { IAttackHand, IMobCheck, IMovementIntent, IWalkPath } from "game/entity/player/IPlayer";
|
|
20
20
|
import { WeightStatus, PlayerState } from "game/entity/player/IPlayer";
|
|
21
21
|
import PlayerDefense from "game/entity/player/PlayerDefense";
|
|
22
22
|
import SkillManager from "game/entity/skill/SkillManager";
|
|
@@ -36,7 +36,7 @@ import type TileEvent from "game/tile/TileEvent";
|
|
|
36
36
|
import Message from "language/dictionary/Message";
|
|
37
37
|
import Translation from "language/Translation";
|
|
38
38
|
import type { IOptions } from "save/data/ISaveDataGlobal";
|
|
39
|
-
import type { IVector3 } from "utilities/math/IVector";
|
|
39
|
+
import type { IVector2, IVector3 } from "utilities/math/IVector";
|
|
40
40
|
export declare const REPUTATION_MAX = 64000;
|
|
41
41
|
export default abstract class Human extends Entity implements IHasInsulation {
|
|
42
42
|
static getNameTranslation(): import("../../language/impl/TranslationImpl").default;
|
|
@@ -50,14 +50,16 @@ export default abstract class Human extends Entity implements IHasInsulation {
|
|
|
50
50
|
equippedReferences: Map<EquipType, ItemReference>;
|
|
51
51
|
handToUse: EquipType | undefined;
|
|
52
52
|
inventory: IContainer;
|
|
53
|
-
islandId: IslandId;
|
|
54
53
|
options: Readonly<IOptions>;
|
|
54
|
+
islandId: IslandId;
|
|
55
55
|
readonly equipEffects: Map<EquipEffect, EquipEffects>;
|
|
56
56
|
restData: IRestData | undefined;
|
|
57
57
|
score: number;
|
|
58
58
|
state: PlayerState;
|
|
59
59
|
swimming: boolean;
|
|
60
60
|
vehicleItemReference: ItemReference | undefined;
|
|
61
|
+
readonly movementIntent: IMovementIntent;
|
|
62
|
+
walkPath: IWalkPath | undefined;
|
|
61
63
|
identifier: string;
|
|
62
64
|
skill: SkillManager;
|
|
63
65
|
private readonly privateStore;
|
|
@@ -107,6 +109,10 @@ export default abstract class Human extends Entity implements IHasInsulation {
|
|
|
107
109
|
burn(fireType: FireType, skipMessage?: boolean, skipParry?: boolean, equipType?: EquipType, fromCombat?: boolean): number | undefined;
|
|
108
110
|
setPosition(point: IVector3): void;
|
|
109
111
|
setZ(z: number, updateFlowField?: boolean): void;
|
|
112
|
+
getMovementIntent(): IMovementIntent;
|
|
113
|
+
updateMovementIntent(movementIntent: IMovementIntent): boolean;
|
|
114
|
+
hasWalkPath(): boolean;
|
|
115
|
+
walkAlongPath(path: IVector2[] | undefined, force?: boolean): void;
|
|
110
116
|
checkUnder(inFacingDirection?: boolean, options?: ICheckUnderOptions): ICheckUnderOptions;
|
|
111
117
|
damageByInteractingWith(thing: Doodad | TileEvent, options: ICheckUnderOptions | undefined, damageLocation: EquipType): ICheckUnderOptions;
|
|
112
118
|
equip(item: Item, slot: EquipType): boolean;
|
|
@@ -137,6 +143,10 @@ export default abstract class Human extends Entity implements IHasInsulation {
|
|
|
137
143
|
isSwimming(): boolean;
|
|
138
144
|
updateSwimming(): void;
|
|
139
145
|
updatePaddling(): void;
|
|
146
|
+
/**
|
|
147
|
+
* Returns the bartering bonus for a given credit value
|
|
148
|
+
*/
|
|
149
|
+
getBarteringBonus(baseCredits: number): number;
|
|
140
150
|
getInsulation(type: TempType): number;
|
|
141
151
|
protected resetStatTimers(type?: StatChangeCurrentTimerStrategy): void;
|
|
142
152
|
protected getBaseStatBonuses(): OptionalDescriptions<Stat, number>;
|
|
@@ -17,7 +17,7 @@ import type { AttackType } from "game/entity/IEntity";
|
|
|
17
17
|
import type { WeightStatus } from "game/entity/player/IPlayer";
|
|
18
18
|
import type { ISkillEvents } from "game/entity/skill/SkillManager";
|
|
19
19
|
import type { IHasImagePath, Quality } from "game/IObject";
|
|
20
|
-
import type { ItemType } from "game/item/IItem";
|
|
20
|
+
import type { IContainer, ItemType } from "game/item/IItem";
|
|
21
21
|
import { RecipeLevel } from "game/item/IItem";
|
|
22
22
|
import type Item from "game/item/Item";
|
|
23
23
|
import { TempType } from "game/temperature/ITemperature";
|
|
@@ -25,8 +25,28 @@ import type { ITile } from "game/tile/ITerrain";
|
|
|
25
25
|
import type { IModdable } from "mod/ModRegistry";
|
|
26
26
|
import type { IRGB } from "utilities/Color";
|
|
27
27
|
import type { Direction } from "utilities/math/Direction";
|
|
28
|
+
import type { IVector2 } from "utilities/math/IVector";
|
|
28
29
|
import type { IRange } from "utilities/math/Range";
|
|
29
30
|
export interface IHumanEvents extends Events<Entity>, ISkillEvents {
|
|
31
|
+
/**
|
|
32
|
+
* Called when an item is added to the player's inventory
|
|
33
|
+
* @param item The item object
|
|
34
|
+
* @param container The container object the item was added to. This container might be inventory or a container within the inventory.
|
|
35
|
+
*/
|
|
36
|
+
inventoryItemAdd(item: Item, container: IContainer): any;
|
|
37
|
+
/**
|
|
38
|
+
* Called when an item is removed from the players inventory
|
|
39
|
+
* @param item The item object
|
|
40
|
+
* @param container The container object the item was moved to.
|
|
41
|
+
*/
|
|
42
|
+
inventoryItemRemove(item: Item, container: IContainer): any;
|
|
43
|
+
/**
|
|
44
|
+
* Called when an item is moved from one container to another, while still in the players inventory.
|
|
45
|
+
* @param item The item object
|
|
46
|
+
* @param container The container object the item was moved to. This container might be inventory or a container within the inventory.
|
|
47
|
+
* @param previousContainer The container object the item was moved from. This container might be inventory or a container within the inventory.
|
|
48
|
+
*/
|
|
49
|
+
inventoryItemUpdate(item: Item, container: IContainer, previousContainer?: IContainer): any;
|
|
30
50
|
/**
|
|
31
51
|
* Called when the human faces a different direction
|
|
32
52
|
* @param direction The direction the player is now facing
|
|
@@ -67,6 +87,10 @@ export interface IHumanEvents extends Events<Entity>, ISkillEvents {
|
|
|
67
87
|
* @returns True if the human should be swimming, false if they should not be swimming, or undefined to use the default logic
|
|
68
88
|
*/
|
|
69
89
|
isSwimming(isSwimming: boolean): boolean | undefined;
|
|
90
|
+
/**
|
|
91
|
+
* Called when the walk path of the player changes.
|
|
92
|
+
*/
|
|
93
|
+
walkPathChange(walkPath: IVector2[] | undefined): any;
|
|
70
94
|
/**
|
|
71
95
|
* Called when a book is opened by a player
|
|
72
96
|
* @param book The book that was opened
|
|
@@ -100,7 +100,7 @@ declare const actionDescriptions: {
|
|
|
100
100
|
32: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.ItemNearby], import("../player/Player").default | import("../npc/NPC").default, void, [import("../../item/Item").default]>;
|
|
101
101
|
82: import("./Action").Action<[[import("game/entity/action/IAction").ActionArgument.ItemInventory, import("game/entity/action/IAction").ActionArgument.Undefined]], import("../player/Player").default, void, [(import("../../item/Item").default | undefined)?]>;
|
|
102
102
|
2: import("./Action").Action<[[import("game/entity/action/IAction").ActionArgument.ItemInventory, import("game/entity/action/IAction").ActionArgument.Undefined], [import("game/entity/action/IAction").ActionArgument.AttackType, import("game/entity/action/IAction").ActionArgument.Undefined]], import("../player/Player").default | import("../npc/NPC").default, void, [(import("../../item/Item").default | undefined)?, (import("../IEntity").AttackType | undefined)?]>;
|
|
103
|
-
67: import("./Action").Action<[[import("game/entity/action/IAction").ActionArgument.ItemInventory]], import("../player/Player").default, void, [import("../../item/Item").default]>;
|
|
103
|
+
67: import("./Action").Action<[[import("game/entity/action/IAction").ActionArgument.ItemInventory]], import("../player/Player").default | import("../npc/NPC").default, void, [import("../../item/Item").default]>;
|
|
104
104
|
103: import("./Action").Action<[[import("game/entity/action/IAction").ActionArgument.Container, import("game/entity/action/IAction").ActionArgument.Undefined], [import("game/entity/action/IAction").ActionArgument.Boolean, import("game/entity/action/IAction").ActionArgument.Undefined]], import("../player/Player").default | import("../npc/NPC").default, void, [(import("../../item/IItem").IContainer | undefined)?, (boolean | undefined)?]>;
|
|
105
105
|
102: import("./Action").Action<[], import("../player/Player").default | import("../npc/NPC").default, boolean, []>;
|
|
106
106
|
101: import("./Action").Action<[], import("../player/Player").default | import("../npc/NPC").default, void, []>;
|
|
@@ -10,5 +10,5 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import { Action } from "game/entity/action/Action";
|
|
12
12
|
import { ActionArgument } from "game/entity/action/IAction";
|
|
13
|
-
declare const _default: Action<[[ActionArgument.ItemInventory]], import("../../player/Player").default, void, [import("../../../item/Item").default]>;
|
|
13
|
+
declare const _default: Action<[[ActionArgument.ItemInventory]], import("../../player/Player").default | import("../../npc/NPC").default, void, [import("../../../item/Item").default]>;
|
|
14
14
|
export default _default;
|
|
@@ -82,10 +82,10 @@ export default class Creature extends Entity implements IUnserializedCallback, I
|
|
|
82
82
|
checkUnder(x?: number, y?: number): boolean;
|
|
83
83
|
/**
|
|
84
84
|
* Check if this creature can swap with the player in the event that the player is moving into them
|
|
85
|
-
* @param
|
|
85
|
+
* @param human Human object
|
|
86
86
|
* @param source Source string. Set to undefined if this is being called from the clientside
|
|
87
87
|
*/
|
|
88
|
-
canSwapWith(
|
|
88
|
+
canSwapWith(human: Human, source: string | undefined): boolean;
|
|
89
89
|
getOwner(): Player | undefined;
|
|
90
90
|
damage(damageInfo: IDamageInfo): number | undefined;
|
|
91
91
|
damage(damageInfo: IDamageInfo, creatureX?: number, creatureY?: number, creatureZ?: number): number | undefined;
|
|
@@ -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
|
|
11
|
+
import type Human from "game/entity/Human";
|
|
12
12
|
import type Island from "game/island/Island";
|
|
13
13
|
import type { ITile } from "game/tile/ITerrain";
|
|
14
14
|
import type { IVector2 } from "utilities/math/IVector";
|
|
@@ -24,7 +24,7 @@ declare const _default: {
|
|
|
24
24
|
/**
|
|
25
25
|
* Returns whether the tile is blocked (completely impassible)
|
|
26
26
|
*/
|
|
27
|
-
isWalkToTileBlocked(
|
|
27
|
+
isWalkToTileBlocked(human: Human, tile: ITile, pos: IVector2, clientSide: boolean): boolean;
|
|
28
28
|
readonly event: import("event/EventEmitter").IEventEmitter<any, IPathingEvents>;
|
|
29
29
|
};
|
|
30
30
|
export default _default;
|
|
@@ -89,10 +89,6 @@ export default abstract class NPC extends Human {
|
|
|
89
89
|
* Sets the default weightCapacity of an NPC (based on their equipment and starting items).
|
|
90
90
|
*/
|
|
91
91
|
generateWeightCapacity(): void;
|
|
92
|
-
/**
|
|
93
|
-
* Returns the bartering bonus for a given credit value
|
|
94
|
-
*/
|
|
95
|
-
getBarteringBonus(baseCredits: number): number;
|
|
96
92
|
getName(): import("../../../language/impl/TranslationImpl").default;
|
|
97
93
|
protected getApplicableStatusEffects(): Set<StatusType>;
|
|
98
94
|
/**
|
|
@@ -129,7 +125,7 @@ export default abstract class NPC extends Human {
|
|
|
129
125
|
protected autoScaleStats(): void;
|
|
130
126
|
protected preMove(fromX: number, fromY: number, fromZ: number, fromTile: ITile, toX: number, toY: number, toZ: number, toTile: ITile): boolean | void | undefined;
|
|
131
127
|
protected postMove(): void;
|
|
132
|
-
|
|
128
|
+
protected checkMove(moveType: MoveType, tileX: number, tileY: number, tileZ: number): 0 | -1 | -2 | -3 | -4 | -5;
|
|
133
129
|
get asNPC(): NPC;
|
|
134
130
|
get asPlayer(): undefined;
|
|
135
131
|
get asLocalPlayer(): undefined;
|
|
@@ -21,7 +21,6 @@ import type { INote } from "game/entity/player/note/NoteManager";
|
|
|
21
21
|
import type Player from "game/entity/player/Player";
|
|
22
22
|
import type { IslandId } from "game/island/IIsland";
|
|
23
23
|
import type Island from "game/island/Island";
|
|
24
|
-
import type { IContainer } from "game/item/IItem";
|
|
25
24
|
import { ItemType } from "game/item/IItem";
|
|
26
25
|
import type Item from "game/item/Item";
|
|
27
26
|
import type { Prompt } from "game/meta/prompt/IPrompt";
|
|
@@ -115,25 +114,6 @@ export interface IPlayerEvents extends Events<Human> {
|
|
|
115
114
|
* Called when the player attempts to sail off the edge of the map
|
|
116
115
|
*/
|
|
117
116
|
sailOffMapEdge(direction: Direction): any;
|
|
118
|
-
/**
|
|
119
|
-
* Called when an item is added to the player's inventory
|
|
120
|
-
* @param item The item object
|
|
121
|
-
* @param container The container object the item was added to. This container might be inventory or a container within the inventory.
|
|
122
|
-
*/
|
|
123
|
-
inventoryItemAdd(item: Item, container: IContainer): any;
|
|
124
|
-
/**
|
|
125
|
-
* Called when an item is removed from the players inventory
|
|
126
|
-
* @param item The item object
|
|
127
|
-
* @param container The container object the item was moved to.
|
|
128
|
-
*/
|
|
129
|
-
inventoryItemRemove(item: Item, container: IContainer): any;
|
|
130
|
-
/**
|
|
131
|
-
* Called when an item is moved from one container to another, while still in the players inventory.
|
|
132
|
-
* @param item The item object
|
|
133
|
-
* @param container The container object the item was moved to. This container might be inventory or a container within the inventory.
|
|
134
|
-
* @param previousContainer The container object the item was moved from. This container might be inventory or a container within the inventory.
|
|
135
|
-
*/
|
|
136
|
-
inventoryItemUpdate(item: Item, container: IContainer, previousContainer?: IContainer): any;
|
|
137
117
|
/**
|
|
138
118
|
* Called when the player equips an item to a slot
|
|
139
119
|
* @param player The player object
|
|
@@ -19,7 +19,7 @@ import type { ICheckUnderOptions, IRestData } from "game/entity/IHuman";
|
|
|
19
19
|
import { EquipType, RestCancelReason, SkillType } from "game/entity/IHuman";
|
|
20
20
|
import type { IStat } from "game/entity/IStats";
|
|
21
21
|
import { Stat } from "game/entity/IStats";
|
|
22
|
-
import type { ILoadOnIslandOptions, IMovementIntent, IPlayerEvents
|
|
22
|
+
import type { ILoadOnIslandOptions, IMovementIntent, IPlayerEvents } from "game/entity/player/IPlayer";
|
|
23
23
|
import { TurnType } from "game/entity/player/IPlayer";
|
|
24
24
|
import MessageManager from "game/entity/player/MessageManager";
|
|
25
25
|
import NoteManager from "game/entity/player/note/NoteManager";
|
|
@@ -71,7 +71,6 @@ export default class Player extends Human implements IUnserializedCallback {
|
|
|
71
71
|
quests: QuestManager;
|
|
72
72
|
messages: MessageManager;
|
|
73
73
|
notes: NoteManager;
|
|
74
|
-
walkPath: IWalkPath | undefined;
|
|
75
74
|
exploredMap: ExploreMap[] | undefined;
|
|
76
75
|
finishedMovingClientside: boolean;
|
|
77
76
|
nextX: number;
|
|
@@ -81,7 +80,6 @@ export default class Player extends Human implements IUnserializedCallback {
|
|
|
81
80
|
nextMoveTime: number;
|
|
82
81
|
nextMoveDirection: Direction.Cardinal | Direction.None | undefined;
|
|
83
82
|
displayCreature?: CreatureType;
|
|
84
|
-
private readonly _movementIntent;
|
|
85
83
|
private readonly milestonesCollection;
|
|
86
84
|
private gameOptionsCached?;
|
|
87
85
|
private handEquippedToLast;
|
|
@@ -122,8 +120,7 @@ export default class Player extends Human implements IUnserializedCallback {
|
|
|
122
120
|
equip(item: Item, slot: EquipType, internal?: boolean, switchingHands?: boolean): boolean;
|
|
123
121
|
unequip(item: Item, internal?: boolean, skipMessage?: boolean, skipRevertItem?: boolean): void;
|
|
124
122
|
unequipAll(): void;
|
|
125
|
-
|
|
126
|
-
updateMovementIntent(movementIntent: IMovementIntent): void;
|
|
123
|
+
updateMovementIntent(movementIntent: IMovementIntent): boolean;
|
|
127
124
|
resetStatTimers(type?: StatChangeCurrentTimerStrategy): void;
|
|
128
125
|
/**
|
|
129
126
|
* Gets the max health of the player.
|
|
@@ -189,7 +186,6 @@ export default class Player extends Human implements IUnserializedCallback {
|
|
|
189
186
|
respawn(reset: boolean): Promise<void>;
|
|
190
187
|
getMovementProgress(): number;
|
|
191
188
|
checkUnder(inFacingDirection?: boolean, options?: ICheckUnderOptions): ICheckUnderOptions;
|
|
192
|
-
hasWalkPath(): boolean;
|
|
193
189
|
walkAlongPath(path: IVector2[] | undefined, force?: boolean): void;
|
|
194
190
|
/**
|
|
195
191
|
* This is only ran on the server
|
|
@@ -210,10 +206,6 @@ export default class Player extends Human implements IUnserializedCallback {
|
|
|
210
206
|
* 2. If a mod is using the `GetPlayerStrength` hook and the calculation needs to be refreshed.
|
|
211
207
|
*/
|
|
212
208
|
updateStrength(): void;
|
|
213
|
-
/**
|
|
214
|
-
* Returns the bartering bonus for a given credit value
|
|
215
|
-
*/
|
|
216
|
-
getBarteringBonus(baseCredits: number): number;
|
|
217
209
|
/**
|
|
218
210
|
* Check if a position is marked as explored
|
|
219
211
|
* Only use this clientside
|
|
@@ -13,13 +13,13 @@ import type { InfoProviderContext } from "game/inspection/InfoProviderContext";
|
|
|
13
13
|
import LabelledValue from "game/inspection/infoProviders/LabelledValue";
|
|
14
14
|
import Inspection from "game/inspection/Inspection";
|
|
15
15
|
import Island from "game/island/Island";
|
|
16
|
-
import
|
|
17
|
-
export default class IslandInspection extends Inspection<
|
|
16
|
+
import type { IVector2 } from "utilities/math/IVector";
|
|
17
|
+
export default class IslandInspection extends Inspection<IVector2> {
|
|
18
18
|
private readonly title;
|
|
19
19
|
static getIslandName(island?: Island, useGenerated?: boolean): import("../../../language/impl/TranslationImpl").default;
|
|
20
20
|
static handles(type: InspectType, island: unknown): boolean;
|
|
21
21
|
get island(): Island | undefined;
|
|
22
|
-
constructor(island: Island |
|
|
22
|
+
constructor(island: Island | IVector2, title?: boolean);
|
|
23
23
|
getId(): string;
|
|
24
24
|
get(context: InfoProviderContext): (import("game/inspection/InfoProvider").SimpleInfoProvider | LabelledValue)[];
|
|
25
25
|
private getTreasureMaps;
|
|
@@ -9,11 +9,12 @@
|
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
|
10
10
|
*/
|
|
11
11
|
import NPC from "game/entity/npc/NPC";
|
|
12
|
+
import { InspectType } from "game/inspection/IInspection";
|
|
12
13
|
import HumanInspection from "game/inspection/inspections/HumanInspection";
|
|
13
14
|
import type { IVector3 } from "utilities/math/IVector";
|
|
14
15
|
export default class NPCInspection extends HumanInspection<NPC> {
|
|
15
16
|
static getFromTile(position: IVector3): never[] | NPCInspection;
|
|
16
|
-
static handles(npc: unknown): boolean;
|
|
17
|
+
static handles(type: InspectType, npc: unknown): boolean;
|
|
17
18
|
constructor(npc: NPC);
|
|
18
19
|
getBorder(): string;
|
|
19
20
|
}
|
|
@@ -17,7 +17,6 @@ import type Entity from "game/entity/Entity";
|
|
|
17
17
|
import type Human from "game/entity/Human";
|
|
18
18
|
import { DamageType, EntityType } from "game/entity/IEntity";
|
|
19
19
|
import { EquipType, SkillType } from "game/entity/IHuman";
|
|
20
|
-
import type NPC from "game/entity/npc/NPC";
|
|
21
20
|
import type Player from "game/entity/player/Player";
|
|
22
21
|
import { CreationId } from "game/IGame";
|
|
23
22
|
import type { IObject, IObjectOptions } from "game/IObject";
|
|
@@ -202,22 +201,22 @@ export default class Item extends EventEmitter.Host<IItemEvents> implements IRef
|
|
|
202
201
|
rerollMagicalPropertyValues(): void;
|
|
203
202
|
addMagicalProperty(type: MagicalPropertyType, subType?: MagicalSubPropertySubTypes): boolean;
|
|
204
203
|
getMagicalPropertyInfo(type: MagicalPropertyType): IMagicalPropertyInfo | undefined;
|
|
205
|
-
acquireNotify(
|
|
204
|
+
acquireNotify(human: Human): void;
|
|
206
205
|
getStokeFireValue(): number | undefined;
|
|
207
206
|
getStokeFireBonusValue(): number;
|
|
208
207
|
getOnUseBonus(): number;
|
|
209
208
|
/**
|
|
210
209
|
* Gets the worth of an item used for merchant trading. Does not consider batering or modifiers bonuses; use Item.getTraderSellPrice for that.
|
|
211
|
-
* @param
|
|
210
|
+
* @param human The human that is trading the item for its worth (used for durability calculations).
|
|
212
211
|
* @param magicalWorth Include the value of `MagicalPropertyType.Worth`, defaults to true
|
|
213
212
|
*/
|
|
214
|
-
getWorth(
|
|
213
|
+
getWorth(human: Human | undefined, magicalWorth?: boolean): number;
|
|
215
214
|
/**
|
|
216
|
-
* The full price the item will go for when traded to a merchant NPC. Considers modifiers and a
|
|
217
|
-
* @param
|
|
215
|
+
* The full price the item will go for when traded to a merchant NPC. Considers modifiers and a human's bartering skill.
|
|
216
|
+
* @param human The human that is trading the item.
|
|
218
217
|
* @param magicalWorth Include the value of `MagicalPropertyType.Worth`, defaults to true
|
|
219
218
|
*/
|
|
220
|
-
getTraderSellPrice(
|
|
219
|
+
getTraderSellPrice(human: Human | undefined, magicalWorth?: boolean): number;
|
|
221
220
|
canBurnPlayer(): boolean;
|
|
222
221
|
getBaseDefense(): number;
|
|
223
222
|
getDurabilityCharge(): number;
|
|
@@ -259,12 +258,12 @@ export default class Item extends EventEmitter.Host<IItemEvents> implements IRef
|
|
|
259
258
|
* @returns A number (possibly 0 if no quality or action level).
|
|
260
259
|
*/
|
|
261
260
|
getItemUseBonus(action: ActionType): number;
|
|
262
|
-
getRangedWeapon(
|
|
261
|
+
getRangedWeapon(human: Human): Item | boolean;
|
|
263
262
|
/**
|
|
264
263
|
* Extinguishes to item if it is lit.
|
|
265
|
-
* @param
|
|
264
|
+
* @param human Human entity that is carrying the item to extinguish.
|
|
266
265
|
*/
|
|
267
|
-
extinguish(
|
|
266
|
+
extinguish(human: Human | undefined): void;
|
|
268
267
|
/**
|
|
269
268
|
* Get the maximum durability for an item based on many factors.
|
|
270
269
|
* @param human Player that we checking to get the maximum item durability (as game options can affect this).
|
|
@@ -200,7 +200,7 @@ export default class ItemManager extends ObjectManager<Item, IItemManagerEvents>
|
|
|
200
200
|
isItemInContainer(container: IContainer, itemTypeSearch: ItemType, options?: Partial<IGetItemOptions>): boolean;
|
|
201
201
|
isContainableInContainer(containable: IContainable, container: IContainer): boolean;
|
|
202
202
|
getAdjacentContainers(humanOrPosition: Human | IVector3, includeNpcs?: boolean, ignoreOptions?: boolean): IContainer[];
|
|
203
|
-
isContainableInAdjacentContainer(
|
|
203
|
+
isContainableInAdjacentContainer(human: Human, containable: IContainable, includeNpcs?: boolean, ignoreOptions?: boolean): boolean;
|
|
204
204
|
isInInventory(containable: IContainable): boolean;
|
|
205
205
|
isTileContainer(container: IContainer | undefined): boolean;
|
|
206
206
|
/**
|
|
@@ -253,11 +253,11 @@ export default class ItemManager extends ObjectManager<Item, IItemManagerEvents>
|
|
|
253
253
|
/**
|
|
254
254
|
* Summons a void dweller based on item worth and chance or provides a hint message.
|
|
255
255
|
* @param item Item to get the worth of.
|
|
256
|
-
* @param
|
|
256
|
+
* @param human The human that is dropping the item.
|
|
257
257
|
* @param point The point in which we are dropping the item.
|
|
258
258
|
* @returns True or false based on if we get a message or not.
|
|
259
259
|
*/
|
|
260
|
-
summonVoidDweller(item: Item,
|
|
260
|
+
summonVoidDweller(item: Item, human: Human, point: IVector3): boolean;
|
|
261
261
|
/**
|
|
262
262
|
* Note: don't print items to the console because the console will hold the item indefinitely
|
|
263
263
|
*/
|
|
@@ -44,7 +44,7 @@ interface IReferenceTypeMap {
|
|
|
44
44
|
export declare type Referenceable = IReferenceTypeMap[ReferenceableReferenceTypes];
|
|
45
45
|
export default class ReferenceManager {
|
|
46
46
|
static isEnumReference(type: ReferenceType): type is EnumReferenceTypes;
|
|
47
|
-
static getList(type: ReferenceType, gameIsland?: Island): import("../entity/creature/corpse/CorpseManager").default | import("../entity/creature/CreatureManager").default | import("../doodad/DoodadManager").default | import("../item/ItemManager").default | import("../entity/npc/NPCManager").default | import("../tile/TileEventManager").default | Player[] | readonly Milestone[] | readonly
|
|
47
|
+
static getList(type: ReferenceType, gameIsland?: Island): import("../entity/creature/corpse/CorpseManager").default | import("../entity/creature/CreatureManager").default | import("../doodad/DoodadManager").default | import("../item/ItemManager").default | import("../entity/npc/NPCManager").default | import("../tile/TileEventManager").default | Player[] | readonly Milestone[] | readonly SkillType[] | readonly ItemType[] | IterableIterator<Island> | readonly Stat[];
|
|
48
48
|
private referenceCursor;
|
|
49
49
|
create(): number;
|
|
50
50
|
get(thing: Referenceable): Reference | undefined;
|
package/package.json
CHANGED