@wayward/types 2.13.3-beta.dev.20230702.2 → 2.13.4-beta.dev.20230703.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.
@@ -30,6 +30,7 @@ import type { ISkillAttribute } from "game/entity/skill/ISkills";
30
30
  import SkillManager from "game/entity/skill/SkillManager";
31
31
  import type { StatChangeTimerFactory } from "game/entity/StatFactory";
32
32
  import { StatChangeCurrentTimerStrategy } from "game/entity/StatFactory";
33
+ import StatusEffect from "game/entity/status/StatusEffect";
33
34
  import { FireType } from "game/IGame";
34
35
  import type { Quality } from "game/IObject";
35
36
  import type { IMobCheck, IMoveToIslandOptions, IslandId } from "game/island/IIsland";
@@ -194,7 +195,10 @@ export default abstract class Human<TypeType extends number = number> extends En
194
195
  private getAttackSkillBonus;
195
196
  private getAttackSkill;
196
197
  damage(damageInfoOrAmount: IDamageInfo | number): number | undefined;
197
- damage(damageInfoOrAmount: IDamageInfo | number, damageMessage?: Message | Translation, soundDelay?: number, causesBlood?: boolean): number | undefined;
198
+ /**
199
+ * @deprecated provide a full IDamageInfo object yourself you lazy fiend
200
+ */
201
+ damage(damageInfoOrAmount: IDamageInfo | number, damageMessage?: Message | Translation, soundDelay?: number, causesBlood?: boolean, statusEffect?: StatusEffect): number | undefined;
198
202
  getEquippedItems(includeDisabled?: true): Item[];
199
203
  getEquippedItem(slot: EquipType, includeDisabled?: true): Item | undefined;
200
204
  isOffHandDisabled(): boolean;
@@ -251,6 +255,7 @@ export default abstract class Human<TypeType extends number = number> extends En
251
255
  updateMovementIntent(movementIntent: IMovementIntent): boolean;
252
256
  hasWalkPath(): boolean;
253
257
  setWalkPath(path: IVector2[] | undefined, force?: boolean): void;
258
+ protected onDie(): void;
254
259
  checkUnder(inFacingDirection?: boolean, options?: ICheckUnderOptions): ICheckUnderOptions;
255
260
  trampleFire(fireEvent: TileEvent): void;
256
261
  damageByInteractingWith(thing: Doodad | TileEvent, options: ICheckUnderOptions | undefined, damageLocation: EquipType): ICheckUnderOptions;
@@ -257,6 +257,10 @@ export interface IHumanEvents extends Events<EntityWithStats>, ISkillEvents {
257
257
  * @return `false` to stop the human from dying
258
258
  */
259
259
  shouldDie(): false | void;
260
+ /**
261
+ * Called when the human is killed.
262
+ */
263
+ die(): any;
260
264
  /**
261
265
  * Called when the human position is set, from a teleport type of movement
262
266
  * @param tile Tile the human is now on
@@ -18,6 +18,7 @@ import type { DamageType, Defense, ICausesStatusEffect, IStatChangeInfo, MoveTyp
18
18
  import { AiType } from "game/entity/IEntity";
19
19
  import type { IStat } from "game/entity/IStats";
20
20
  import type { IPackedMessage } from "game/entity/player/IMessageManager";
21
+ import type StatusEffect from "game/entity/status/StatusEffect";
21
22
  import type { ItemType, ItemTypeGroup } from "game/item/IItem";
22
23
  import type Item from "game/item/Item";
23
24
  import type { LootGroupType } from "game/item/LootGroups";
@@ -325,6 +326,7 @@ export interface IDamageInfo {
325
326
  damageMessage?: Message | Translation;
326
327
  soundDelay?: number;
327
328
  surpressAttackAnimation?: boolean;
329
+ statusEffect?: StatusEffect;
328
330
  }
329
331
  export interface IDamageOutcomeInput {
330
332
  human?: Human;
@@ -44,7 +44,7 @@ export interface IPlayerEvents extends Events<Human> {
44
44
  * Called when the player is killed.
45
45
  * @param showingGameEndScreen True if the game end screen will be shown
46
46
  */
47
- die(showingGameEndScreen: boolean): any;
47
+ die(showingGameEndScreen?: boolean): any;
48
48
  /**
49
49
  * Called when the player will be respawned. If any handlers return `false` to stop the player from respawning,
50
50
  * no further handlers will be called.
@@ -8,11 +8,12 @@
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 { IEventEmitter } from "event/EventEmitter";
11
+ import { type IEventEmitter } from "event/EventEmitter";
12
12
  import { TileUpdateType } from "game/IGame";
13
13
  import Human from "game/entity/Human";
14
14
  import { EntityType } from "game/entity/IEntity";
15
15
  import { SkillType } from "game/entity/IHuman";
16
+ import type { IDamageInfo } from "game/entity/creature/ICreature";
16
17
  import { CreatureType } from "game/entity/creature/ICreature";
17
18
  import type { IMovementIntent, IPlayerEvents } from "game/entity/player/IPlayer";
18
19
  import MessageManager from "game/entity/player/MessageManager";
@@ -68,7 +69,10 @@ export default class Player extends Human implements IPreSerializeCallback, IUns
68
69
  */
69
70
  addItemMilestones(item: Item): void;
70
71
  checkSkillMilestones(): void;
72
+ private getUsableAction;
73
+ protected onGetMovementIntent(): IMovementIntent | undefined;
71
74
  protected onCanMove(direction: Direction.Cardinal): false | undefined;
75
+ protected onDamage(damageInfo: IDamageInfo): void;
72
76
  addMilestone(milestone: Milestone, data?: number | string, update?: boolean): void;
73
77
  updateMovementIntent(movementIntent: IMovementIntent): boolean;
74
78
  load(): void;
@@ -94,7 +94,7 @@ export default class GameScreen extends Screen {
94
94
  onOpenBook(human: Human, item: Item): void;
95
95
  protected onReadMap1(map: DrawnMap, item: Item, reader: Human): void;
96
96
  protected onSailOffMapEdge(player: Player, direction: Direction): void;
97
- protected onDie(player: Player, showingGameEndScreen: boolean): void;
97
+ protected onDie(player: Player, showingGameEndScreen?: boolean): void;
98
98
  protected onRespawn(): void;
99
99
  protected onItemMenu(api: IBindHandlerApi): boolean;
100
100
  protected onZoom(api: IBindHandlerApi): boolean;
@@ -9,7 +9,6 @@
9
9
  * https://github.com/WaywardGame/types/wiki
10
10
  */
11
11
  import EventEmitter from "event/EventEmitter";
12
- import type { IDamageInfo } from "game/entity/creature/ICreature";
13
12
  import type Component from "ui/component/Component";
14
13
  import type { IBindHandlerApi } from "ui/input/Bind";
15
14
  import WalkToTileHandler from "ui/screen/screens/game/util/movement/WalkToTileHandler";
@@ -32,8 +31,6 @@ export default class MovementHandler extends EventEmitter.Host<IMovementHandlerE
32
31
  deregister(): this;
33
32
  protected onMoveStart(): void;
34
33
  protected onMoveComplete(): void;
35
- protected onPlayerDamage(_: any, damageInfo: IDamageInfo): void;
36
- protected onPlayerDeath(): void;
37
34
  protected onFaceDown(api: IBindHandlerApi): boolean;
38
35
  faceTowardsMouse(api?: Pick<IBindHandlerApi, "mouse">): void;
39
36
  protected onFaceDirection(api?: Pick<IBindHandlerApi, "mouse" | "input">): boolean;
@@ -9,7 +9,6 @@
9
9
  * https://github.com/WaywardGame/types/wiki
10
10
  */
11
11
  import EventEmitter from "event/EventEmitter";
12
- import type { IStat } from "game/entity/IStats";
13
12
  import type Player from "game/entity/player/Player";
14
13
  import type Tile from "game/tile/Tile";
15
14
  import type Component from "ui/component/Component";
@@ -50,7 +49,6 @@ export default class WalkToTileHandler extends EventEmitter.Host<IWalkToTileHand
50
49
  protected onCancelMoveToTile(_api: IBindHandlerApi): boolean;
51
50
  protected onHoldMoveToTilePreview(api: IBindHandlerApi): boolean;
52
51
  protected onReleaseMoveToTilePreview(): void;
53
- protected onStatChanged(player: Player, stat: IStat): void;
54
52
  protected onPostMove(player: Player, fromTile: Tile, toTile: Tile): void;
55
53
  protected onWalkPathChange(player: Player, walkPath: IVector2[] | undefined): void;
56
54
  private resetToMouse;
@@ -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
- export declare const gameVersionStage = "beta", gameVersionMajor = 2, gameVersionMinor = 13, gameVersionPatch = 3, gameVersionName = "Beacon's Call";
11
+ export declare const gameVersionStage = "beta", gameVersionMajor = 2, gameVersionMinor = 13, gameVersionPatch = 4, gameVersionName = "Beacon's Call";
12
12
  export declare const gameVersion: string;
13
13
  export declare const gameVersionTitleMajor: string;
14
14
  export declare const gameVersionTitleMinor: string;
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.13.3-beta.dev.20230702.2",
4
+ "version": "2.13.4-beta.dev.20230703.1",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",