@wayward/types 2.11.4-beta.dev.20220207.1 → 2.11.4-beta.dev.20220211.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.
@@ -108,7 +108,10 @@ export default abstract class Human extends Entity implements IHasInsulation {
108
108
  */
109
109
  burn(fireType: FireType, skipMessage?: boolean, skipParry?: boolean, equipType?: EquipType, fromCombat?: boolean): number | undefined;
110
110
  setPosition(point: IVector3): void;
111
- setZ(z: number, updateFlowField?: boolean): void;
111
+ /**
112
+ * @param effects If true, adds a delay to the player, clears any particles, and updates the view. (Default: true)
113
+ */
114
+ setZ(z: number, effects?: boolean, updateFlowField?: boolean): void;
112
115
  getMovementIntent(): IMovementIntent;
113
116
  updateMovementIntent(movementIntent: IMovementIntent): boolean;
114
117
  hasWalkPath(): boolean;
@@ -91,6 +91,10 @@ export interface IHumanEvents extends Events<Entity>, ISkillEvents {
91
91
  * Called when the walk path of the player changes.
92
92
  */
93
93
  walkPathChange(walkPath: IVector2[] | undefined): any;
94
+ /**
95
+ * Called when the human changes their layer (z position)
96
+ */
97
+ changeZ(z: number, oldZ: number): any;
94
98
  /**
95
99
  * Called when a book is opened by a player
96
100
  * @param book The book that was opened
@@ -111,7 +111,7 @@ declare const actionDescriptions: {
111
111
  89: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.ItemNearby, import("game/entity/action/IAction").ActionArgument.Boolean], import("../player/Player").default | import("../npc/NPC").default, void, [import("../../item/Item").default, boolean]>;
112
112
  59: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.Direction, [import("game/entity/action/IAction").ActionArgument.Integer32, import("game/entity/action/IAction").ActionArgument.Undefined]], import("../player/Player").default | import("../npc/NPC").default, void, [import("../../../utilities/math/Direction").Direction.None | import("../../../utilities/math/Direction").Direction.East | import("../../../utilities/math/Direction").Direction.North | import("../../../utilities/math/Direction").Direction.West | import("../../../utilities/math/Direction").Direction.South, (number | undefined)?]>;
113
113
  90: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.Container, [import("game/entity/action/IAction").ActionArgument.UnsignedInteger32NumberArray, import("game/entity/action/IAction").ActionArgument.Undefined]], import("../player/Player").default, void, [import("../../item/IItem").IContainer, (number[] | undefined)?]>;
114
- 97: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.Item, [import("game/entity/action/IAction").ActionArgument.Integer32, import("game/entity/action/IAction").ActionArgument.Undefined]], import("../player/Player").default, void, [import("../../item/Item").default, (number | undefined)?]>;
114
+ 97: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.Item, import("game/entity/action/IAction").ActionArgument.Integer32, [import("game/entity/action/IAction").ActionArgument.Boolean, import("game/entity/action/IAction").ActionArgument.Undefined]], import("../player/Player").default, void, [import("../../item/Item").default, number, (boolean | undefined)?]>;
115
115
  104: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.String, import("game/entity/action/IAction").ActionArgument.Object], import("../player/Player").default, void, [string, any?]>;
116
116
  92: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.ItemNearby, [import("game/entity/action/IAction").ActionArgument.ItemNearby, import("game/entity/action/IAction").ActionArgument.Undefined]], import("../player/Player").default | import("../npc/NPC").default, void, [import("../../item/Item").default, (import("../../item/Item").default | undefined)?]>;
117
117
  62: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.ItemNearby, import("game/entity/action/IAction").ActionArgument.ActionType], import("../player/Player").default | import("../npc/NPC").default, void, [import("../../item/Item").default, ActionType]>;
@@ -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.Item, [ActionArgument.Integer32, ActionArgument.Undefined]], import("../../player/Player").default, void, [import("../../../item/Item").default, (number | undefined)?]>;
13
+ declare const _default: Action<[ActionArgument.Item, ActionArgument.Integer32, [ActionArgument.Boolean, ActionArgument.Undefined]], import("../../player/Player").default, void, [import("../../../item/Item").default, number, (boolean | undefined)?]>;
14
14
  export default _default;
@@ -14,10 +14,9 @@ import type Player from "game/entity/player/Player";
14
14
  import type Item from "game/item/Item";
15
15
  import type { ITreasure } from "game/mapping/DrawnMap";
16
16
  import type DrawnMap from "game/mapping/DrawnMap";
17
- import type { IVector3 } from "utilities/math/IVector";
18
17
  export declare enum GatherTreasureResult {
19
18
  NoTreasure = 0,
20
19
  NotYet = 1,
21
20
  Gathered = 2
22
21
  }
23
- export default function (map: DrawnMap, treasure: ITreasure, actionPoint: IVector3, action: IActionHandlerApi<Player | NPC>, tool?: Item): GatherTreasureResult;
22
+ export default function (map: DrawnMap, treasure: ITreasure, action: IActionHandlerApi<Player | NPC>, tool?: Item): GatherTreasureResult;
@@ -156,7 +156,6 @@ export interface IPlayerEvents extends Events<Human> {
156
156
  * Called when the player completes a movement
157
157
  */
158
158
  moveComplete(): any;
159
- changeZ(z: number, oldZ: number): any;
160
159
  /**
161
160
  * Called when the players weight is being updated
162
161
  * @param newWeight The new weight of the player
@@ -163,10 +163,6 @@ export default class Player extends Human implements IUnserializedCallback {
163
163
  setTamedCreatureEnemy(enemy: Player | Creature): void;
164
164
  setPosition(point: IVector3): void;
165
165
  getNextPosition(): IVector3;
166
- /**
167
- * @param effects If true, adds a delay to the player, clears any particles, and updates the view. (Default: true)
168
- */
169
- setZ(z: number, effects?: boolean): void;
170
166
  isGhost(): boolean;
171
167
  isDead(): boolean;
172
168
  /**
@@ -187,6 +187,7 @@ export interface IItemDescription extends IObjectDescription, IModdable, ITemper
187
187
  /**
188
188
  * Array of items that the item is "made from" in cases where we can't use the disassembly items to burn into.
189
189
  * All items in array are required to have onBurn set in their description to function properly.
190
+ * This should eventually be removed since we want to be able to break down items into proper sub-ingredients/items.
190
191
  */
191
192
  burnsLike?: ItemType[];
192
193
  spawnableTiles?: TileGroup;
@@ -145,7 +145,7 @@ export default class Item extends EventEmitter.Host<IItemEvents> implements IRef
145
145
  getDecayRate(isClientSide: boolean): number;
146
146
  getPreservationDecayMultiplier(): number;
147
147
  getTemperatureDecayMultiplier(isClientSide: boolean): number;
148
- getTotalWeight(bypassContainer?: boolean): number;
148
+ getTotalWeight(bypassContainer?: boolean, targetContainer?: IContainer): number;
149
149
  getDisassemblyWeight(): number;
150
150
  getDisassemblyItems(): IItemDisassembleResult | undefined;
151
151
  isNearby(executor: Entity, allowNearby?: boolean): boolean;
@@ -169,7 +169,7 @@ export default class Item extends EventEmitter.Host<IItemEvents> implements IRef
169
169
  isEquipped(): boolean;
170
170
  getEquippedPlayer(): Human | undefined;
171
171
  getEquipSlot(): EquipType | undefined;
172
- setQuickSlot(player: Player, quickSlot: number | undefined): void;
172
+ setQuickSlot(player: Player, quickSlot: number, removeQuickSlot?: boolean): void;
173
173
  clearQuickSlot(): void;
174
174
  isDecayed(): boolean;
175
175
  changeInto(type: ItemType, disableNotify?: boolean, emitTransformation?: boolean): void;
@@ -223,9 +223,10 @@ export default class Item extends EventEmitter.Host<IItemEvents> implements IRef
223
223
  revertFromDoodad(doodad: Doodad): void;
224
224
  /**
225
225
  * Returns the container weight reduction
226
+ * @param targetContainer Container to calculate the weight reduction for
226
227
  * @returns 1 if there is no reducton or [-50% + magical storing values]
227
228
  */
228
- getContainerWeightReduction(): number;
229
+ getContainerWeightReduction(container?: IContainer | undefined): number;
229
230
  canBeRefined(): boolean;
230
231
  getProducedTemperature(): number | undefined;
231
232
  postProcessDecay(): void;
@@ -134,7 +134,7 @@ export default class ItemManager extends ObjectManager<Item, IItemManagerEvents>
134
134
  getMagicalWeightCapacity(container: IContainer): number;
135
135
  moveAllFromContainerToContainer(human: Human | undefined, fromContainer: IContainer, toContainer: IContainer, itemType?: ItemType | undefined, ofQuality?: Quality | undefined, checkWeight?: boolean, filterText?: string | undefined, onMoveItem?: (item: Item) => void): Item[];
136
136
  moveToContainer(human: Human | undefined, item: Item, container: IContainer): boolean;
137
- hasRoomInContainer(extraWeight: number, container: IContainer, itemToMove: Item): boolean;
137
+ hasRoomInContainer(targetContainer: IContainer, itemToMove: Item): boolean;
138
138
  breakContainerOnTile(itemContainer: Item, x: number, y: number, z: number): void;
139
139
  /**
140
140
  * Drop items in a 3x3 square around the location
@@ -208,7 +208,7 @@ export default class ItemManager extends ObjectManager<Item, IItemManagerEvents>
208
208
  * Note: It may return the real containedItems array!
209
209
  */
210
210
  getOrderedContainerItems(container: IContainer, options?: Partial<IGetItemOptions>): Item[];
211
- reduceDismantleWeight(createdItems: Item[], itemWeight: number): void;
211
+ capWeightOfItems(createdItems: Item[], itemWeight: number): void;
212
212
  getItemTypeTranslation(itemType: ItemType | ItemTypeGroup): Translation;
213
213
  getItemTypeTranslation(itemType: ItemType | ItemTypeGroup, count: number): Translation;
214
214
  getItemTypeTranslation(itemType: ItemType | ItemTypeGroup, article: boolean): Translation;
@@ -125,6 +125,7 @@ export default class DrawnMap extends EventEmitter.Host<IDrawnMapEvents> impleme
125
125
  get isValid(): boolean;
126
126
  get island(): Island;
127
127
  private constructor();
128
+ toString(): string;
128
129
  preSerializeObject(): void;
129
130
  onUnserialized(): void;
130
131
  getTreasure(): readonly ITreasure[];
@@ -33,7 +33,7 @@ export declare module FireStage {
33
33
  function getTemperature(stage: FireStage, min: number, max: number): number;
34
34
  }
35
35
  export declare module IFire {
36
- function dissassemblyBurn(island: Island, item: Item, container: ITileContainer, disassembly: boolean): void;
36
+ function dissassemblyBurn(island: Island, item: Item, container: ITileContainer, disassembly: boolean): Item[];
37
37
  function harvestGatherBurn(step: number, resources: ILootItem[] | undefined, container: IContainer, quality: Quality | undefined, tileEvent: TileEvent): void;
38
- function burnsLike(burnsLikeItem: ItemType, tileEvent: TileEvent, tileContainer: IContainer, quality: Quality | undefined): void;
38
+ function burnsLike(burnsLikeItem: ItemType, tileEvent: TileEvent, tileContainer: IContainer, quality: Quality | undefined): Item[];
39
39
  }
@@ -166,7 +166,7 @@ export default class InGameScreen extends BaseScreen {
166
166
  addItemToFreeQuickSlot(itemId: number): boolean;
167
167
  clearQuickSlot(quickSlot: number, internal?: boolean): void;
168
168
  removeItemFromQuickSlot(quickSlot: number, itemId?: number, skipSync?: boolean): void;
169
- setItemQuickslot(item: Item, quickSlot: number | undefined): void;
169
+ setItemQuickslot(item: Item, quickSlot: number, removeQuickSlot?: boolean): void;
170
170
  updateQuickSlotItem(quickSlot: number): boolean;
171
171
  onUpdateQuickSlotsOrEquips(): void;
172
172
  onSortableItemReceive(sortableEvent: ISortableEvent): void;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@wayward/types",
3
3
  "description": "TypeScript declarations for Wayward, used for modding.",
4
- "version": "2.11.4-beta.dev.20220207.1",
4
+ "version": "2.11.4-beta.dev.20220211.1",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",