@wayward/types 2.14.0-beta.dev.20240824.3 → 2.14.0-beta.dev.20240825.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.
@@ -179,6 +179,7 @@ export default abstract class Entity<DescriptionType = unknown, TypeType extends
179
179
  abstract isItem(): this is Item;
180
180
  abstract isTile(): this is Tile;
181
181
  abstract isContainer(): this is IUncastableContainer;
182
+ asNot(entity: Entity): this | undefined;
182
183
  isEntity(): this is Entity;
183
184
  asType(type: TypeType): this | undefined;
184
185
  get asUnion(): Player | NPC | Creature | TileEvent | Item | Corpse | Doodad;
@@ -510,6 +510,10 @@ export default abstract class Human<DescriptionType = unknown, TypeType extends
510
510
  isContainer(): this is IUncastableContainer;
511
511
  get point(): IVector3;
512
512
  get tile(): Tile;
513
+ /**
514
+ * Recompute lights around the human
515
+ */
516
+ computeLights(): void;
513
517
  /**
514
518
  * Moves inventory items to the target island
515
519
  * This should be called before switching islands
@@ -45,7 +45,6 @@ export declare class WorldLayer implements IPreSerializeCallback {
45
45
  onDoodadUpdates: Map<number, onDoodadUpdateDelegate>;
46
46
  private terrainMap;
47
47
  instance: IWorldLayerCPP | undefined;
48
- private _loadedLightLevelMap;
49
48
  private _loadedLightBlockMap;
50
49
  constructor(width: number | undefined, height: number, z: WorldZ);
51
50
  preSerializeObject(): void;
@@ -77,5 +77,6 @@ declare class MessageLogTurnGroup extends Component {
77
77
  export declare class MessageComponent extends Component {
78
78
  readonly message: IMessage;
79
79
  constructor(message: IMessage);
80
+ toString(): string;
80
81
  }
81
82
  export {};
@@ -8,18 +8,19 @@
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 { ActionType } from "@wayward/game/game/entity/action/IAction";
12
+ import type Player from "@wayward/game/game/entity/player/Player";
13
+ import { ItemType } from "@wayward/game/game/item/IItem";
11
14
  import type { Load } from "@wayward/game/game/meta/Loading";
12
15
  import type { Prompt } from "@wayward/game/game/meta/prompt/IPrompt";
13
16
  import type { ScreenId } from "@wayward/game/ui/screen/IScreen";
14
17
  import type { MenuId } from "@wayward/game/ui/screen/screens/menu/component/IMenu";
15
- import type { Random } from "@wayward/utilities/random/Random";
16
18
  import ApplicationInteractions from "@wayward/test/core/applicationInteractions";
17
19
  import type { ApplicationManager } from "@wayward/test/core/applicationManager";
20
+ import { ItemComponentMarshal } from "@wayward/test/core/marshals/ui/itemComponentMarshal";
18
21
  import type { IAppPaths } from "@wayward/test/interfaces";
19
22
  import type { TestRunContext } from "@wayward/test/testRunner";
20
- import type Player from "@wayward/game/game/entity/player/Player";
21
- import { ItemType } from "@wayward/game/game/item/IItem";
22
- import { ItemComponentMarshal } from "@wayward/test/core/marshals/ui/itemComponentMarshal";
23
+ import type { Random } from "@wayward/utilities/random/Random";
23
24
  export interface IApplicationOptions {
24
25
  additionalArgs?: string[];
25
26
  mods?: string[];
@@ -74,6 +75,7 @@ export declare class Application extends ApplicationInteractions {
74
75
  * Asserts some code on just this app
75
76
  */
76
77
  assertScript(executor: (player: Player) => boolean, assertMessage?: string): Promise<void>;
78
+ getActionCount(actionType: ActionType): Promise<number>;
77
79
  findItemComponents(itemType: ItemType): Promise<ItemComponentMarshal[]>;
78
80
  requestVideo(videoPath: string): void;
79
81
  private recordVideoFrame;
@@ -11,8 +11,8 @@
11
11
  import type Player from "@wayward/game/game/entity/player/Player";
12
12
  import { Direction } from "@wayward/game/utilities/math/Direction";
13
13
  import type { Application, ITestState } from "@wayward/test/core/application";
14
- import type { INewGameOptions, ITestJoinServerOptions, ITestSetup } from "@wayward/test/interfaces";
15
14
  import { ApplicationInteraction } from "@wayward/test/core/applicationInteraction";
15
+ import type { INewGameOptions, ITestJoinServerOptions, ITestSetup } from "@wayward/test/interfaces";
16
16
  export declare class ApplicationManager {
17
17
  private readonly _logs;
18
18
  private readonly _applications;
@@ -8,15 +8,18 @@
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 { DoodadType } from "@wayward/game/game/doodad/IDoodad";
11
+ import type { DoodadType, GrowingStage } from "@wayward/game/game/doodad/IDoodad";
12
+ import type { ActionType } from "@wayward/game/game/entity/action/IAction";
12
13
  import type { Quality } from "@wayward/game/game/IObject";
13
14
  import type { INewIslandOverrides } from "@wayward/game/game/island/IIsland";
14
15
  import type { ContainerSort, ItemType } from "@wayward/game/game/item/IItem";
15
16
  import type { Milestone } from "@wayward/game/game/milestones/IMilestone";
16
17
  import type { GameMode } from "@wayward/game/game/options/IGameOptions";
18
+ import type { IOptions } from "@wayward/game/save/data/ISaveDataGlobal";
17
19
  import type { SortDirection } from "@wayward/game/save/ISaveManager";
18
20
  import type { DialogId } from "@wayward/game/ui/screen/screens/game/Dialogs";
19
21
  import type { Direction } from "@wayward/game/utilities/math/Direction";
22
+ import type { IVector3 } from "@wayward/game/utilities/math/IVector";
20
23
  export interface ICommonGameOptions {
21
24
  gameMode: GameMode;
22
25
  seed?: string | number;
@@ -59,18 +62,26 @@ export interface IPaths extends Omit<IAppPaths, "saveZipPath"> {
59
62
  saveImportsPath: string;
60
63
  }
61
64
  export interface ITestSetup {
65
+ options?: Partial<IOptions>;
62
66
  ui?: {
63
67
  dialogs?: PartialRecord<DialogId, boolean>;
68
+ actionSlots?: Array<{
69
+ itemType?: ItemType;
70
+ actionType?: ActionType;
71
+ autoUse?: boolean;
72
+ }>;
64
73
  };
65
74
  world?: {
66
75
  doodads?: Array<{
67
76
  type: DoodadType;
77
+ growingStage?: GrowingStage;
68
78
  x: number;
69
79
  y: number;
70
80
  inventory?: ITestSetupItemContainer;
71
81
  }>;
72
82
  };
73
83
  player?: {
84
+ position?: IVector3;
74
85
  direction?: Direction.Cardinal;
75
86
  inventory?: ITestSetupItemContainer;
76
87
  };
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.14.0-beta.dev.20240824.3",
4
+ "version": "2.14.0-beta.dev.20240825.1",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",