@wayward/types 2.15.0-beta.dev.20251009.1 → 2.15.0-beta.dev.20251010.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.
@@ -86,7 +86,7 @@ export default class DoodadManager extends EntityManager<Doodad> {
86
86
  */
87
87
  updateAllAsync(ticks: number, playingHumans: Human[], playerHumanTiles: Set<Tile>, onProgress: (progess: number) => Promise<void>): Promise<void>;
88
88
  verifyAndFixItemWeights(): void;
89
- getScarecrowInRange(tile: Tile): Doodad | undefined;
89
+ getScarecrowInRange(tile: Tile, group?: DoodadTypeGroup): Doodad | undefined;
90
90
  getScarecrowInLineOfSight(creature: Creature, isClientside: boolean): Doodad | undefined;
91
91
  addScarecrow(doodad: Doodad): void;
92
92
  removeScarecrow(doodad: Doodad): void;
@@ -17,6 +17,7 @@ import type { SkillType } from "@wayward/game/game/entity/IHuman";
17
17
  import type { IDecayTemperatureRange } from "@wayward/game/game/IGame";
18
18
  import type { ILootItem } from "@wayward/game/game/ILoot";
19
19
  import type { IObjectDescription, IObjectOptions } from "@wayward/game/game/IObject";
20
+ import type { WaterType } from "@wayward/game/game/island/IIsland";
20
21
  import type Island from "@wayward/game/game/island/Island";
21
22
  import type { IContainer, IItemOld, ItemType, ItemTypeExtra, ItemTypeGroup } from "@wayward/game/game/item/IItem";
22
23
  import type Item from "@wayward/game/game/item/Item";
@@ -528,7 +529,8 @@ export declare enum DoodadTypeGroup {
528
529
  Altar = -9978,
529
530
  OpenFireSource = -9977,
530
531
  RequiresCandleToLight = -9976,
531
- ContainsFuelSource = -9975
532
+ ContainsFuelSource = -9975,
533
+ CurseWard = -9974
532
534
  }
533
535
  export declare enum DoorOrientation {
534
536
  /**
@@ -559,6 +561,7 @@ export interface IHasBuilder {
559
561
  export interface IHasWater {
560
562
  top?: true;
561
563
  bottom?: true;
564
+ waterType?: WaterType;
562
565
  }
563
566
  export interface IDoodadGetNameOptions {
564
567
  count: number;
@@ -10,8 +10,8 @@
10
10
  */
11
11
  import CombatStrengthManager from "@wayward/game/game/entity/CombatStrengthManager";
12
12
  import Creature from "@wayward/game/game/entity/creature/Creature";
13
- import type { ICreatureCheckMoveOptions } from "@wayward/game/game/entity/creature/ICreature";
14
- import { CreatureType, TileGroup } from "@wayward/game/game/entity/creature/ICreature";
13
+ import type { ICreatureCheckMoveOptions, ICreatureSpawnOptions } from "@wayward/game/game/entity/creature/ICreature";
14
+ import { CreatureType } from "@wayward/game/game/entity/creature/ICreature";
15
15
  import type { IEntityRemoveOptions } from "@wayward/game/game/entity/EntityManager";
16
16
  import EntityManager from "@wayward/game/game/entity/EntityManager";
17
17
  import type Human from "@wayward/game/game/entity/Human";
@@ -48,12 +48,8 @@ export default class CreatureManager extends EntityManager<Creature, IEntityRemo
48
48
  * Spawns a creature.
49
49
  * @param type The type of creature to spawn.
50
50
  * @param tile The tile
51
- * @param bypass Whether to bypass checks for whether the creature can spawn there naturally. Defaults to false, if the creature can't spawn naturally, it won't.
52
- * @param forceAberrant If provided, forces the spawned creature's aberrant state to be the passed boolean. True = aberrant, false = not aberrant. If not provided, the aberrant state is decided based on chance.
53
- * @param spawnTiles If set, this will overwrite the creature's description for which tiles it can spawn on
54
- * @param bypassCreatureLimit If set, the creature limit will be ignored and spawn the creature over the set limit
55
51
  */
56
- spawn(type: CreatureType, tile: Tile, bypass?: boolean, forceAberrant?: boolean, spawnTiles?: TileGroup, bypassCreatureLimit?: boolean, bypassAll?: boolean): Creature | undefined;
52
+ spawn(type: CreatureType, tile: Tile, options?: ICreatureSpawnOptions): Creature | undefined;
57
53
  spawnFromZone(tile: Tile, bypassCreatureLimit?: boolean, checkTerrainType?: boolean): Creature | undefined;
58
54
  createFake(type: CreatureType, aberrant: boolean, tile?: Tile, id?: number): Creature;
59
55
  exists(creature: Creature): boolean;
@@ -521,3 +521,29 @@ export interface ICreatureCheckMoveOptions {
521
521
  ignoreScareCrow: boolean;
522
522
  ignoreMoveTypeNone: boolean;
523
523
  }
524
+ export interface ICreatureSpawnOptions {
525
+ /**
526
+ * If set to true, the creature will ignore blocked or full tile checks as well as ignore spawnTiles definitions set on the creature.
527
+ */
528
+ bypassTiles?: boolean;
529
+ /**
530
+ * If provided, forces the spawned creature's aberrant state to be the passed boolean. True = aberrant, false = not aberrant. If not provided, the aberrant state is decided based on chance.
531
+ */
532
+ forceAberrant?: boolean;
533
+ /**
534
+ * If set, this will overwrite the creature's description for which tiles it can spawn on. This will also change which tiles it can path on to, differing from its set definitions.
535
+ */
536
+ spawnTiles?: TileGroup;
537
+ /**
538
+ * If set to true, this will bypass the current zone's creature limit and spawn it regardless.
539
+ */
540
+ bypassCreatureLimit?: boolean;
541
+ /**
542
+ * If set to true, the creatures will ignore scarecrows when spawning. Note that this does NOT ignore the chance of being scared by a scarecrow when moving, just the initial spawn checks.
543
+ */
544
+ bypassScarecrows?: boolean;
545
+ /**
546
+ * If set to true, all checks will be bypassed and the creature will spawn no matter what.
547
+ */
548
+ bypassAll?: boolean;
549
+ }
@@ -29,6 +29,7 @@ import type Corpse from "@wayward/game/game/entity/creature/corpse/Corpse";
29
29
  import type NPC from "@wayward/game/game/entity/npc/NPC";
30
30
  import type Player from "@wayward/game/game/entity/player/Player";
31
31
  import type { IMobCheck, IslandId } from "@wayward/game/game/island/IIsland";
32
+ import { WaterType } from "@wayward/game/game/island/IIsland";
32
33
  import type { ContainerReference, DisplayableItemType, IConstructedInfo, IContainable, IContainer, IItemChangeIntoOptions, IItemDescription, IItemDisassembleResult, IItemDisassembly, IItemGetNameOptions, IItemUsed, IItemVehicle, IMagicalPropertyInfo, IItemMovementResult as IMoveToTileMobCheckResult, IMoveToTileOptions, ItemTag } from "@wayward/game/game/item/IItem";
33
34
  import { ItemTypeExtra } from "@wayward/game/game/item/IItem";
34
35
  import { BookType, ContainerSort, ItemDamageResult, ItemType, ItemTypeGroup, ItemWeightChange, SYMBOL_CONTAINER_CACHED_REFERENCE } from "@wayward/game/game/item/IItem";
@@ -525,6 +526,11 @@ export default class Item extends EntityMovable<IItemDescription, ItemType, Refe
525
526
  */
526
527
  getReturnType(): ItemType;
527
528
  createReturnItem(returnType: ItemType, container?: IContainer): Item | undefined;
529
+ /**
530
+ * Returns the type of water contained in the item in the case of containers of liquid.
531
+ * @returns WaterType enum value.
532
+ */
533
+ getWaterType(): WaterType;
528
534
  private checkIfItemsMatch;
529
535
  private checkIfItemArraysMatch;
530
536
  }
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.15.0-beta.dev.20251009.1",
4
+ "version": "2.15.0-beta.dev.20251010.1",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",