@wayward/types 2.15.3-beta.dev.20260318.1 → 2.15.3-beta.dev.20260320.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.
@@ -101,8 +101,8 @@ export declare enum EventBus {
101
101
  UiInteractionManager = 42,
102
102
  UiItemComponentStatic = 43,
103
103
  UiMovementHandler = 44,
104
- UiPathQueryCache = 45,
105
- UiPathingHandler = 46,
104
+ UiPathingHandler = 45,
105
+ UiPathQueryCache = 46,
106
106
  UsableActions = 47,
107
107
  WorldRenderer = 48
108
108
  }
@@ -152,8 +152,8 @@ declare const eventBuses: {
152
152
  [EventBus.UiInteractionManager](): InteractionManager;
153
153
  [EventBus.UiItemComponentStatic](): ItemComponentEventBus;
154
154
  [EventBus.UiMovementHandler](): MovementHandler;
155
- [EventBus.UiPathQueryCache](): PathQueryCache;
156
155
  [EventBus.UiPathingHandler](): PathingHandler;
156
+ [EventBus.UiPathQueryCache](): PathQueryCache;
157
157
  [EventBus.UsableActions](): UsableAction;
158
158
  [EventBus.WorldRenderer](): WorldRenderer;
159
159
  };
@@ -204,8 +204,8 @@ export declare const eventBusManager: EventBusManager<EventBus, {
204
204
  42(): InteractionManager;
205
205
  43(): ItemComponentEventBus;
206
206
  44(): MovementHandler;
207
- 45(): PathQueryCache;
208
- 46(): PathingHandler;
207
+ 45(): PathingHandler;
208
+ 46(): PathQueryCache;
209
209
  47(): UsableAction;
210
210
  48(): WorldRenderer;
211
211
  }>;
@@ -61,8 +61,8 @@ export declare const eventManager: EventManager<EventBus, {
61
61
  42(): import("../ui/screen/screens/game/util/movement/InteractionManager").default;
62
62
  43(): import("../ui/screen/screens/game/component/item/ItemComponentEventBus").default;
63
63
  44(): import("../ui/screen/screens/game/util/movement/MovementHandler").default;
64
- 45(): import("../ui/screen/screens/game/util/movement/PathQueryCache").default;
65
- 46(): import("../ui/screen/screens/game/util/movement/PathingHandler").default;
64
+ 45(): import("../ui/screen/screens/game/util/movement/PathingHandler").default;
65
+ 46(): import("../ui/screen/screens/game/util/movement/PathQueryCache").default;
66
66
  47(): import("../game/entity/action/usable/UsableAction").default;
67
67
  48(): import("../renderer/world/WorldRenderer").WorldRenderer;
68
68
  }>;
@@ -104,6 +104,11 @@ export declare const CURSE_EVENTS_RUNE_CHANCE_MULTIPLIER_LUCKY: IRange<number>;
104
104
  export declare const CURSE_EVENTS_RUNES_KILL_TAME: Array<WeightedOption<IRange>>;
105
105
  export declare const CURSE_EVENTS_RUNES_SURVIVED: IRange<number>;
106
106
  export declare const CURSE_EVENTS_CREATURE_WANDER_CURSEBEARER_PRIORITY: IRange<number>;
107
+ export declare const CURSE_EVENTS_VISUAL_EXPLORED_FADE_TURNS = 30;
108
+ export declare const CURSE_EVENTS_VISUAL_EXPLORED_FAST_PHASE_TURNS = 50;
109
+ export declare const CURSE_EVENTS_VISUAL_EXPLORED_MAIN_ALGORITHM_RADIUS = 150;
110
+ export declare const CURSE_EVENTS_VISUAL_EXPLORED_ALPHA_BATCH_SIZE = 4096;
111
+ export declare const CURSE_EVENTS_VISUAL_EXPLORED_VISIBLE_BUFFER_RADIUS = 1;
107
112
  declare namespace Curse {
108
113
  interface Helper {
109
114
  context: CurseEventContext;
@@ -127,6 +132,8 @@ declare namespace Curse {
127
132
  function attemptCurseEventSpawn(category: CurseCategory | null, human: Human, curse: number, humans: Human[], events: CurseEventInstance[], allowDependents?: boolean): CurseEventInstance | undefined;
128
133
  function attemptSpecificCurseEventSpawn(human: Human, type: CurseEventType, humans: Human[], curse?: number, force?: boolean | "full"): CurseEventInstance | undefined;
129
134
  function attemptSpecificCurseEventSpawnOnPlayer(player: Human, curseType: CurseEventType, force: boolean | "full"): CurseEventInstance | undefined;
135
+ function resetVisualExploredState(island: Island): void;
136
+ function obscureVisualExploredState(island: Island): void;
130
137
  function unload(island: Island): void;
131
138
  function cleanup(island: Island, humans?: Human[], isMorning?: boolean): void;
132
139
  function cleanupEphemerals(island: Island): void;
@@ -136,10 +143,19 @@ declare namespace Curse {
136
143
  declare const SYMBOL_CURSE_EVENT_SUBSCRIBER_INSTANCES: unique symbol;
137
144
  declare const SYMBOL_CURSE_EVENT_GLOBAL_SUBSCRIBER_INSTANCE: unique symbol;
138
145
  declare const SYMBOL_CURSE_EVENT_ACTIVE_SUBSCRIBER_INSTANCE: unique symbol;
146
+ type CurseVisualHiddenExploredTilesByZ = Partial<Record<number, number[]>>;
147
+ type CurseVisualFastStepsByZ = Partial<Record<number, number>>;
148
+ type CurseVisualOriginsByZ = Partial<Record<number, IVector2>>;
139
149
  interface Curse {
140
150
  night?: true;
141
151
  globalCurse?: number;
142
152
  events?: CurseEventInstance[];
153
+ visualState?: CurseVisualHiddenExploredTilesByZ;
154
+ visualStateFastHideStepsByZ?: CurseVisualFastStepsByZ;
155
+ visualStateFastRestoreStepsByZ?: CurseVisualFastStepsByZ;
156
+ visualStateHideOriginsByZ?: CurseVisualOriginsByZ;
157
+ visualStateRestoreOriginsByZ?: CurseVisualOriginsByZ;
158
+ visualStateWeightedRestoreStepsByZ?: CurseVisualFastStepsByZ;
143
159
  cooldown?: number;
144
160
  ephemeralCreatures?: number[];
145
161
  [SYMBOL_CURSE_EVENT_GLOBAL_SUBSCRIBER_INSTANCE]?: CurseEventSubscriber;
@@ -15,7 +15,7 @@ import Deity from "@wayward/game/game/deity/Deity";
15
15
  import Doodad from "@wayward/game/game/doodad/Doodad";
16
16
  import type Entity from "@wayward/game/game/entity/Entity";
17
17
  import EntityWithStats from "@wayward/game/game/entity/EntityWithStats";
18
- import type { IAttack, ICausesDamage, IEntityConstructorOptions, IMovingData, MoveFlag } from "@wayward/game/game/entity/IEntity";
18
+ import type { IAttack, IEntityConstructorOptions, IMovingData, MoveFlag } from "@wayward/game/game/entity/IEntity";
19
19
  import { AttackType, DamageType, IStatChangeInfo, StatusChangeReason } from "@wayward/game/game/entity/IEntity";
20
20
  import type { HumanTag, ICheckUnderOptions as ICheckInteractionOptions, ICrafted, ICustomizations, IHumanEvents, ILoadOnIslandOptions, IRestData, IVoyageInfo, WalkToChangeReason } from "@wayward/game/game/entity/IHuman";
21
21
  import { EquipType, RestCancelReason } from "@wayward/game/game/entity/IHuman";
@@ -404,7 +404,7 @@ export default abstract class Human<DescriptionType = unknown, TypeType extends
404
404
  */
405
405
  tick(isPassTurn?: boolean, turnType?: TurnTypeFlag): boolean;
406
406
  private restTick;
407
- getDamage(causesDamage: ICausesDamage, equipType?: EquipType): number;
407
+ getDamage(baseDamage: number, equipType?: EquipType): number;
408
408
  private slitherSuckerDamage;
409
409
  /**
410
410
  * Event handler for when resting begins, weight changes, or strength changes.
@@ -0,0 +1,21 @@
1
+ /*!
2
+ * Copyright 2011-2025 Unlok
3
+ * https://www.unlok.ca
4
+ *
5
+ * Credits & Thanks:
6
+ * https://www.unlok.ca/credits-thanks/
7
+ *
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
+ * https://github.com/WaywardGame/types/wiki
10
+ */
11
+ import type Player from "@wayward/game/game/entity/player/Player";
12
+ import PlayerTargetedServerPacket from "@wayward/game/multiplayer/packets/PlayerTargetedServerPacket";
13
+ import type { ICurseVisualExploredStateIslandUpdates } from "@wayward/game/save/clientStore/clientData/ExploredMap";
14
+ export default class UpdateCurseVisualStatePacket extends PlayerTargetedServerPacket {
15
+ static create(player: Player, updates: Map<string, ICurseVisualExploredStateIslandUpdates>): UpdateCurseVisualStatePacket;
16
+ updates: Map<string, ICurseVisualExploredStateIslandUpdates>;
17
+ getDebugInfo(): string;
18
+ isSyncCheckEnabled(): boolean;
19
+ isAllowedWhenPaused(): boolean;
20
+ process(): void;
21
+ }
@@ -8,6 +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 { IExploredTileAlpha } from "@wayward/game/renderer/fieldOfView/IFieldOfViewPlatform";
11
12
  import type { WebGlRendererContext } from "@wayward/game/renderer/platform/webgl/WebGlRendererContext";
12
13
  import type ExploreMap from "@wayward/game/renderer/exploreMap/ExploreMap";
13
14
  import type { IWorldLayerRendererPlatform } from "@wayward/game/renderer/world/IWorldLayerRendererPlatform";
@@ -21,7 +22,8 @@ export declare class WorldLayerRendererWebGl implements IWorldLayerRendererPlatf
21
22
  texExplored: WebGLTexture;
22
23
  constructor(context: WebGlRendererContext, worldLayerRenderer: WorldLayerRenderer);
23
24
  delete(): void;
24
- setWorldLayer(worldLayer: WorldLayer, exploreMap: ExploreMap, sizeChanged: boolean): void;
25
+ setWorldLayer(worldLayer: WorldLayer, exploreMap: ExploreMap, sizeChanged: boolean, exploredData?: Uint8Array): void;
26
+ setExploredAlpha(tiles: IExploredTileAlpha[]): void;
25
27
  updateTileLightBlock(x: number, y: number, value: number): void;
26
28
  updateTileLightBlockMap(lightBlockMap: Uint8Array): void;
27
29
  }
@@ -9,6 +9,7 @@
9
9
  * https://github.com/WaywardGame/types/wiki
10
10
  */
11
11
  import type ExploreMap from "@wayward/game/renderer/exploreMap/ExploreMap";
12
+ import type { IExploredTileAlpha } from "@wayward/game/renderer/fieldOfView/IFieldOfViewPlatform";
12
13
  import type { WebGpuRendererContext } from "@wayward/game/renderer/platform/webgpu/WebGpuRendererContext";
13
14
  import type { IWorldLayerRendererPlatform } from "@wayward/game/renderer/world/IWorldLayerRendererPlatform";
14
15
  import type { WorldLayer } from "@wayward/game/renderer/world/WorldLayer";
@@ -16,7 +17,8 @@ import type { WorldLayerRenderer } from "@wayward/game/renderer/world/WorldLayer
16
17
  export declare class WorldLayerRendererWebGpu implements IWorldLayerRendererPlatform {
17
18
  constructor(context: WebGpuRendererContext, worldLayerRenderer: WorldLayerRenderer);
18
19
  delete(): void;
19
- setWorldLayer(worldLayer: WorldLayer, exploreMap: ExploreMap, sizeChanged: boolean): void;
20
+ setWorldLayer(worldLayer: WorldLayer, exploreMap: ExploreMap, sizeChanged: boolean, exploredData?: Uint8Array): void;
21
+ setExploredAlpha(tiles: IExploredTileAlpha[]): void;
20
22
  updateTileLightBlock(x: number, y: number, value: number): void;
21
23
  updateTileLightBlockMap(lightBlockMap: Uint8Array): void;
22
24
  }
@@ -9,10 +9,12 @@
9
9
  * https://github.com/WaywardGame/types/wiki
10
10
  */
11
11
  import type ExploreMap from "@wayward/game/renderer/exploreMap/ExploreMap";
12
+ import type { IExploredTileAlpha } from "@wayward/game/renderer/fieldOfView/IFieldOfViewPlatform";
12
13
  import type { WorldLayer } from "@wayward/game/renderer/world/WorldLayer";
13
14
  export interface IWorldLayerRendererPlatform {
14
15
  delete(): void;
15
- setWorldLayer(worldLayer: WorldLayer, exploreMap: ExploreMap, sizeChanged: boolean): void;
16
+ setWorldLayer(worldLayer: WorldLayer, exploreMap: ExploreMap, sizeChanged: boolean, exploredData?: Uint8Array): void;
17
+ setExploredAlpha(tiles: IExploredTileAlpha[]): void;
16
18
  updateTileLightBlock(x: number, y: number, value: number): void;
17
19
  updateTileLightBlockMap(lightBlockMap: Uint8Array): void;
18
20
  }
@@ -10,6 +10,7 @@
10
10
  */
11
11
  import EventEmitter from "@wayward/utilities/event/EventEmitter";
12
12
  import type Tile from "@wayward/game/game/tile/Tile";
13
+ import type { IExploredTileAlpha } from "@wayward/game/renderer/fieldOfView/IFieldOfViewPlatform";
13
14
  import type { IDoodadUpdate } from "@wayward/game/renderer/world/IWorldLayer";
14
15
  import type { IWorldLayerRendererEvents } from "@wayward/game/renderer/world/IWorldLayerRenderer";
15
16
  import { RenderLayerFlag } from "@wayward/game/renderer/world/IWorldRenderer";
@@ -72,6 +73,7 @@ export declare class WorldLayerRenderer extends EventEmitter.Host<IWorldLayerRen
72
73
  private deleteTileLayers;
73
74
  reset(): void;
74
75
  setWorldLayer(worldLayer: WorldLayer, exploredMapClientData: ExploredMapClientData): void;
76
+ setExploredAlpha(tiles: IExploredTileAlpha[]): void;
75
77
  addTileLayer(tileLayer: ITileLayerRendererPlatform): void;
76
78
  updateAll(): void;
77
79
  updateDoodad({ x, y }: Tile, flushTileImmediately: boolean, { doodadDescription, doodadInfo, doodadVariationX, doodadVariationY, terrainMasks }: IDoodadUpdate): void;
@@ -26,6 +26,7 @@ import WallTileAdaptor from "@wayward/game/renderer/tile/adaptors/Wall";
26
26
  import type TileAtlas from "@wayward/game/renderer/tile/atlas/TileAtlas";
27
27
  import type { IBounds } from "@wayward/game/renderer/world/IWorldRenderer";
28
28
  import { RenderFlag, SpriteBatchLayer } from "@wayward/game/renderer/world/IWorldRenderer";
29
+ import type { WorldLayer } from "@wayward/game/renderer/world/WorldLayer";
29
30
  import { WorldLayerRenderer } from "@wayward/game/renderer/world/WorldLayerRenderer";
30
31
  import EventEmitter from "@wayward/utilities/event/EventEmitter";
31
32
  import type { IRendererContext } from "@wayward/game/renderer/context/IRendererContext";
@@ -33,6 +34,7 @@ import type { IWorldRendererPlatform } from "@wayward/game/renderer/world/IWorld
33
34
  import type { IVector2 } from "@wayward/game/utilities/math/IVector";
34
35
  import Vector2 from "@wayward/game/utilities/math/Vector2";
35
36
  export interface IWorldRendererEvents {
37
+ getExploredMapTextureData(data: Uint8Array, worldLayer: WorldLayer): Uint8Array;
36
38
  /**
37
39
  * Called when calculating creatures in the viewport
38
40
  * @param creature The creature object
@@ -10,14 +10,44 @@
10
10
  */
11
11
  import type Island from "@wayward/game/game/island/Island";
12
12
  import ExploreMap from "@wayward/game/renderer/exploreMap/ExploreMap";
13
+ import type { IVector2 } from "@wayward/game/utilities/math/IVector";
13
14
  import type { IPreSerializeCallback } from "@wayward/game/save/serializer/ISerializer";
14
15
  export interface IExploredMapClientDataOld {
15
16
  exploredMapEncodedData: number[][];
16
17
  }
18
+ export interface ICurseVisualExploredState {
19
+ hiddenTiles: number[];
20
+ fastHideStep?: number;
21
+ fastRestoreStep?: number;
22
+ hideOrigin?: IVector2;
23
+ restoreOrigin?: IVector2;
24
+ weightedRestoreStep?: number;
25
+ }
26
+ export interface ICurseVisualExploredStateUpdate {
27
+ addHiddenTiles?: number[];
28
+ removeHiddenTiles?: number[];
29
+ replaceHiddenTiles?: number[];
30
+ clearState?: true;
31
+ fastHideStep?: number | null;
32
+ fastRestoreStep?: number | null;
33
+ hideOrigin?: IVector2 | null;
34
+ restoreOrigin?: IVector2 | null;
35
+ weightedRestoreStep?: number | null;
36
+ }
37
+ export interface ICurseVisualExploredStateIslandUpdates {
38
+ clearAll?: true;
39
+ updatesByZ?: Record<number, ICurseVisualExploredStateUpdate>;
40
+ }
17
41
  export default class ExploredMapClientData implements IPreSerializeCallback {
18
42
  exploredMapEncodedData: Map<string, Record<number, number[]>>;
43
+ curseVisualStates: Map<string, Record<number, ICurseVisualExploredState>>;
19
44
  private readonly exploredMaps;
20
45
  preSerializeObject(): void;
21
46
  clear(): void;
22
47
  getExploreMap(island: Island, z: number): ExploreMap;
48
+ getCurseVisualState(island: Island | string, z: number, create?: boolean): ICurseVisualExploredState | undefined;
49
+ clearCurseVisualState(island: Island | string, z?: number): void;
50
+ applyCurseVisualStateUpdates(islandId: string, islandUpdates: ICurseVisualExploredStateIslandUpdates): void;
51
+ private applyCurseVisualStateUpdate;
52
+ private applyCurseVisualScalarUpdate;
23
53
  }
@@ -0,0 +1,13 @@
1
+ /*!
2
+ * Copyright 2011-2025 Unlok
3
+ * https://www.unlok.ca
4
+ *
5
+ * Credits & Thanks:
6
+ * https://www.unlok.ca/credits-thanks/
7
+ *
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
+ * https://github.com/WaywardGame/types/wiki
10
+ */
11
+ import type { IPaths } from "@wayward/test/interfaces";
12
+ import type { TestConfig } from "@wayward/test";
13
+ export default function (_paths: IPaths, _config: TestConfig): 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.15.3-beta.dev.20260318.1",
4
+ "version": "2.15.3-beta.dev.20260320.1",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",