@wayward/types 2.14.2-beta.dev.20241222.1 → 2.14.3-beta.dev.20241224.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.
Files changed (56) hide show
  1. package/definitions/game/IGlobal.d.ts +3 -0
  2. package/definitions/game/event/EventBuses.d.ts +12 -8
  3. package/definitions/game/event/EventManager.d.ts +5 -4
  4. package/definitions/game/game/Game.d.ts +2 -0
  5. package/definitions/game/game/entity/Entity.d.ts +11 -9
  6. package/definitions/game/game/entity/EntityWithStats.d.ts +2 -1
  7. package/definitions/game/game/entity/IEntity.d.ts +2 -1
  8. package/definitions/game/game/entity/action/usable/UsableAction.d.ts +11 -0
  9. package/definitions/game/game/entity/action/usable/UsableActionRegistrar.d.ts +7 -1
  10. package/definitions/game/game/entity/ai/AI.d.ts +4 -0
  11. package/definitions/game/game/entity/ai/AiManager.d.ts +2 -2
  12. package/definitions/game/game/entity/creature/Creature.d.ts +3 -3
  13. package/definitions/game/game/entity/npc/NPC.d.ts +5 -6
  14. package/definitions/game/game/entity/player/Player.d.ts +2 -2
  15. package/definitions/game/game/inspection/InfoProvider.d.ts +2 -1
  16. package/definitions/game/game/inspection/InspectionsHandler.d.ts +2 -1
  17. package/definitions/game/game/island/Island.d.ts +3 -0
  18. package/definitions/game/game/item/ItemFinder.d.ts +1 -1
  19. package/definitions/game/mod/IMod.d.ts +2 -1
  20. package/definitions/game/renderer/world/WorldRenderer.d.ts +4 -0
  21. package/definitions/game/save/data/SaveData.d.ts +2 -0
  22. package/definitions/game/save/data/SaveDataGlobal.d.ts +2 -0
  23. package/definitions/game/save/serializer/PropertiesToSerialize.d.ts +6 -0
  24. package/definitions/game/save/upgrade/UpgradeVersion.d.ts +6 -1
  25. package/definitions/game/save/upgrade/versions/beta2.14.0/_beta.2.14.0-dev20240828.d.ts +1 -1
  26. package/definitions/game/save/upgrade/versions/beta2.14.0/{beta2.14.0-dev1.d.ts → beta2.14.0-dev00000001.d.ts} +1 -1
  27. package/definitions/game/save/upgrade/versions/beta2.14.0/{beta2.14.0-dev2.d.ts → beta2.14.0-dev00000002.d.ts} +1 -1
  28. package/definitions/game/save/upgrade/versions/beta2.14.0/beta2.14.0-dev20240827.d.ts +1 -1
  29. package/definitions/game/save/upgrade/versions/beta2.14.0/beta2.14.0-dev20240828.d.ts +1 -1
  30. package/definitions/game/save/upgrade/versions/beta2.14.0/beta2.14.0-dev20240829.d.ts +1 -1
  31. package/definitions/game/save/upgrade/versions/beta2.14.0/beta2.14.0-dev20240901.d.ts +1 -1
  32. package/definitions/game/save/upgrade/versions/beta2.14.0/beta2.14.0-dev20240905.d.ts +1 -1
  33. package/definitions/game/save/upgrade/versions/beta2.14.0/beta2.14.0-dev20241024.d.ts +1 -1
  34. package/definitions/game/save/upgrade/versions/beta2.14.0/beta2.14.0-dev20241129.d.ts +1 -1
  35. package/definitions/game/save/upgrade/versions/beta2.14.3/beta2.14.3-dev20241223.d.ts +12 -0
  36. package/definitions/game/steamworks/ISteamworks.d.ts +1 -0
  37. package/definitions/game/steamworks/Steamworks.d.ts +15 -0
  38. package/definitions/game/ui/component/ContextMenu.d.ts +1 -1
  39. package/definitions/game/ui/component/IComponent.d.ts +2 -1
  40. package/definitions/game/ui/screen/screens/game/component/ItemComponent.d.ts +2 -43
  41. package/definitions/game/ui/screen/screens/game/component/item/ItemComponentEventBus.d.ts +36 -0
  42. package/definitions/game/ui/screen/screens/game/component/item/ItemComponentHandler.d.ts +46 -0
  43. package/definitions/game/ui/screen/screens/game/component/item/ItemComponentTradeManager.d.ts +32 -0
  44. package/definitions/game/ui/screen/screens/game/dialog/EquipmentDialog.d.ts +2 -2
  45. package/definitions/game/ui/screen/screens/game/static/actions/ActionSlot.d.ts +3 -2
  46. package/definitions/game/ui/screen/screens/game/static/actions/ActionSlotConfigurationColumn.d.ts +2 -1
  47. package/definitions/game/utilities/Version.d.ts +16 -7
  48. package/definitions/hosts/shared/globalTypes.d.ts +4 -0
  49. package/definitions/hosts/shared/globals.d.ts +2 -2
  50. package/definitions/utilities/Errors.d.ts +10 -0
  51. package/definitions/utilities/Log.d.ts +5 -0
  52. package/definitions/utilities/collection/map/IterableWeakMap.d.ts +35 -0
  53. package/definitions/utilities/collection/map/LimitedMap.d.ts +45 -0
  54. package/definitions/utilities/event/EventEmitter.d.ts +27 -3
  55. package/definitions/utilities/event/EventManager.d.ts +11 -1
  56. package/package.json +1 -1
@@ -26,6 +26,7 @@ import type OldUi from "@wayward/game/ui/old/OldUi";
26
26
  import type Version from "@wayward/game/utilities/Version";
27
27
  import "@wayward/goodstream/apply";
28
28
  import "@wayward/hosts/shared/globalTypes";
29
+ import type { IBuildId } from "@wayward/hosts/shared/globalTypes";
29
30
  import "@wayward/utilities/IGlobal";
30
31
  import "@wayward/utilities/prototype/Promise";
31
32
  import "@wayward/utilities/typesglobal/Class";
@@ -57,6 +58,8 @@ declare global {
57
58
  const gameVersionTitleMajor: string;
58
59
  const gameVersionTitleMinor: string;
59
60
  const gameVersionTitle: string;
61
+ let gameVersionDeployId: IBuildId | undefined;
62
+ let gameVersionBuildId: IBuildId | undefined;
60
63
  let webGlVersion: number;
61
64
  const VIEWPORT_MIN_WIDTH: number;
62
65
  const VIEWPORT_MIN_HEIGHT: number;
@@ -44,6 +44,7 @@ import type SaveManager from "@wayward/game/save/SaveManager";
44
44
  import type Steamworks from "@wayward/game/steamworks/Steamworks";
45
45
  import type ScreenManager from "@wayward/game/ui/screen/ScreenManager";
46
46
  import type GameScreen from "@wayward/game/ui/screen/screens/GameScreen";
47
+ import type ItemComponentEventBus from "@wayward/game/ui/screen/screens/game/component/item/ItemComponentEventBus";
47
48
  import type ActionBar from "@wayward/game/ui/screen/screens/game/static/ActionBar";
48
49
  import type HoveredTileTracker from "@wayward/game/ui/screen/screens/game/util/HoveredTileTracker";
49
50
  import type ActionMenuHandler from "@wayward/game/ui/screen/screens/game/util/movement/ActionMenuHandler";
@@ -93,10 +94,11 @@ export declare enum EventBus {
93
94
  UiGameScreen = 38,
94
95
  UiHoveredTileTracker = 39,
95
96
  UiInteractionManager = 40,
96
- UiMovementHandler = 41,
97
- UiPathingHandler = 42,
98
- UsableActions = 43,
99
- WorldRenderer = 44
97
+ UiItemComponentStatic = 41,
98
+ UiMovementHandler = 42,
99
+ UiPathingHandler = 43,
100
+ UsableActions = 44,
101
+ WorldRenderer = 45
100
102
  }
101
103
  declare const eventBuses: {
102
104
  [EventBus.Actions](): ActionExecutor<any, any, any, any, any>;
@@ -140,6 +142,7 @@ declare const eventBuses: {
140
142
  [EventBus.UiGameScreen](): GameScreen;
141
143
  [EventBus.UiHoveredTileTracker](): HoveredTileTracker;
142
144
  [EventBus.UiInteractionManager](): InteractionManager;
145
+ [EventBus.UiItemComponentStatic](): ItemComponentEventBus;
143
146
  [EventBus.UiMovementHandler](): MovementHandler;
144
147
  [EventBus.UiPathingHandler](): PathingHandler;
145
148
  [EventBus.UsableActions](): UsableAction;
@@ -188,10 +191,11 @@ export declare const eventBusManager: EventBusManager<EventBus, {
188
191
  38(): GameScreen;
189
192
  39(): HoveredTileTracker;
190
193
  40(): InteractionManager;
191
- 41(): MovementHandler;
192
- 42(): PathingHandler;
193
- 43(): UsableAction;
194
- 44(): WorldRenderer;
194
+ 41(): ItemComponentEventBus;
195
+ 42(): MovementHandler;
196
+ 43(): PathingHandler;
197
+ 44(): UsableAction;
198
+ 45(): WorldRenderer;
195
199
  }>;
196
200
  /**
197
201
  * For backwards compat / ease of use
@@ -57,10 +57,11 @@ export declare const eventManager: EventManager<EventBus, {
57
57
  38(): import("../ui/screen/screens/GameScreen").default;
58
58
  39(): import("../ui/screen/screens/game/util/HoveredTileTracker").default;
59
59
  40(): import("../ui/screen/screens/game/util/movement/InteractionManager").default;
60
- 41(): import("../ui/screen/screens/game/util/movement/MovementHandler").default;
61
- 42(): import("../ui/screen/screens/game/util/movement/PathingHandler").default;
62
- 43(): import("../game/entity/action/usable/UsableAction").default;
63
- 44(): import("../renderer/world/WorldRenderer").WorldRenderer;
60
+ 41(): import("../ui/screen/screens/game/component/item/ItemComponentEventBus").default;
61
+ 42(): import("../ui/screen/screens/game/util/movement/MovementHandler").default;
62
+ 43(): import("../ui/screen/screens/game/util/movement/PathingHandler").default;
63
+ 44(): import("../game/entity/action/usable/UsableAction").default;
64
+ 45(): import("../renderer/world/WorldRenderer").WorldRenderer;
64
65
  }>;
65
66
  /**
66
67
  * EventHandler that is typed with the games event buses
@@ -51,6 +51,7 @@ import type { IVector2 } from "@wayward/game/utilities/math/IVector";
51
51
  import { WebWorkerManager } from "@wayward/game/webWorker/WebWorkerManager";
52
52
  import EventEmitter from "@wayward/utilities/event/EventEmitter";
53
53
  import type { Random } from "@wayward/utilities/random/Random";
54
+ import type { IBuildId } from "@wayward/hosts/shared/globalTypes";
54
55
  export declare class Game extends EventEmitter.Host<IGameEvents> {
55
56
  get isChallenge(): boolean;
56
57
  private difficultyOptions;
@@ -72,6 +73,7 @@ export declare class Game extends EventEmitter.Host<IGameEvents> {
72
73
  version: Version.String;
73
74
  lastSaveVersion?: Version.String;
74
75
  lastSaveBuildTime?: number;
76
+ lastSaveBuildId?: IBuildId;
75
77
  readonly interval = 16.6666;
76
78
  readonly autoSave: AutoSave;
77
79
  readonly commandManager: CommandManager;
@@ -27,13 +27,14 @@ import type { IslandId } from "@wayward/game/game/island/IIsland";
27
27
  import type Island from "@wayward/game/game/island/Island";
28
28
  import type { IUncastableContainer } from "@wayward/game/game/item/IItem";
29
29
  import type Item from "@wayward/game/game/item/Item";
30
- import type { EntityReferenceTypes, IReferenceable, Reference } from "@wayward/game/game/reference/IReferenceManager";
30
+ import { type EntityReferenceTypes, type IReferenceable, type Reference } from "@wayward/game/game/reference/IReferenceManager";
31
31
  import type { ITemperatureSource } from "@wayward/game/game/temperature/ITemperature";
32
32
  import type Tile from "@wayward/game/game/tile/Tile";
33
33
  import type TileEvent from "@wayward/game/game/tile/TileEvent";
34
34
  import { type ISerializedTranslation } from "@wayward/game/language/ITranslation";
35
35
  import type Translation from "@wayward/game/language/Translation";
36
36
  import type { RenderSource, UpdateRenderFlag } from "@wayward/game/renderer/IRenderer";
37
+ import type { Renderer } from "@wayward/game/renderer/Renderer";
37
38
  import type { INotificationLocation, ItemNotifierType, MarkerIconType, StatNotificationType } from "@wayward/game/renderer/notifier/INotifier";
38
39
  import type { IVector3 } from "@wayward/game/utilities/math/IVector";
39
40
  import type { IVector4 } from "@wayward/game/utilities/math/Vector4";
@@ -44,23 +45,18 @@ export default abstract class Entity<DescriptionType = unknown, TypeType extends
44
45
  abstract readonly tileUpdateType: TileUpdateType;
45
46
  id: number;
46
47
  type: TypeType;
48
+ historicalActions?: PartialRecord<ActionType, number>;
47
49
  referenceId?: number;
48
50
  renamed?: string | ISerializedTranslation;
49
51
  x: number;
50
52
  y: number;
51
53
  z: WorldZ;
52
54
  private _data?;
55
+ private _persistentMarker?;
56
+ private _persistentMarkerHidden?;
53
57
  private _tags?;
54
- historicalActions?: PartialRecord<ActionType, number>;
55
58
  islandId: IslandId;
56
59
  preventRendering?: boolean;
57
- /**
58
- * Notifier marker assigned to this entity
59
- */
60
- persistentMarker: {
61
- type: MarkerIconType;
62
- guid: string;
63
- } | undefined;
64
60
  private _humansWithinBound?;
65
61
  /**
66
62
  * Cached tile the entity is on.
@@ -121,6 +117,12 @@ export default abstract class Entity<DescriptionType = unknown, TypeType extends
121
117
  updateView(source: RenderSource, updateFov?: boolean | UpdateRenderFlag.FieldOfView | UpdateRenderFlag.FieldOfViewSkipTransition): void;
122
118
  notifyItem(itemNotifierType: ItemNotifierType, item: Item): void;
123
119
  notifyStat(type: StatNotificationType, value: number): void;
120
+ /**
121
+ * This is called clientside the first time the renderer seens the entity
122
+ */
123
+ onFirstRender(renderer: Renderer): void;
124
+ getCurrentMarkerIconType(): MarkerIconType | undefined;
125
+ setMarkerIconHidden(hidden: boolean): void;
124
126
  addMarkerIcon(type: MarkerIconType): void;
125
127
  removeMarkerIcon(...types: MarkerIconType[]): void;
126
128
  getProducedTemperature(): number | undefined;
@@ -14,6 +14,7 @@ import type { IEntityConstructorOptions, IStatus, StatusChangeReason } from "@wa
14
14
  import { type IStatEvents, type IStats } from "@wayward/game/game/entity/IStats";
15
15
  import type { IStatHost } from "@wayward/game/game/entity/Stats";
16
16
  import Stats from "@wayward/game/game/entity/Stats";
17
+ import type { StatusApplicability } from "@wayward/game/game/entity/status/IStatus";
17
18
  import { StatusType } from "@wayward/game/game/entity/status/IStatus";
18
19
  import Status from "@wayward/game/game/entity/status/Status";
19
20
  import type { EntityReferenceTypes } from "@wayward/game/game/reference/IReferenceManager";
@@ -40,7 +41,7 @@ export default abstract class EntityWithStats<DescriptionType = unknown, TypeTyp
40
41
  readonly stat: Stats<this>;
41
42
  private readonly statusHandlers;
42
43
  constructor(entityOptions?: IEntityConstructorOptions<TypeType>);
43
- protected getApplicableStatuses(): Set<StatusType> | undefined;
44
+ protected getStatusApplicability(): StatusApplicability | undefined;
44
45
  get asEntityWithStats(): EntityWithStats<DescriptionType, TypeType, EntityReferenceType, TagType>;
45
46
  /**
46
47
  * Returns whether the entity has the given `StatusType`
@@ -25,7 +25,8 @@ import type Item from "@wayward/game/game/item/Item";
25
25
  import type Tile from "@wayward/game/game/tile/Tile";
26
26
  import type TileEvent from "@wayward/game/game/tile/TileEvent";
27
27
  import type { Direction } from "@wayward/game/utilities/math/Direction";
28
- export interface IEntityEvents {
28
+ import type { IEventSubscriberEvents } from "@wayward/utilities/event/EventEmitter";
29
+ export interface IEntityEvents extends IEventSubscriberEvents {
29
30
  /**
30
31
  * Called when an entity is killed by another entity.
31
32
  */
@@ -35,6 +35,7 @@ export interface IUsableActionEvents {
35
35
  * Emitted when the UsableAction should be updated, exclusively for cached UsableActions.
36
36
  */
37
37
  update(): any;
38
+ dispose(): any;
38
39
  }
39
40
  /**
40
41
  * Create a basic usable action:
@@ -54,7 +55,13 @@ declare class UsableAction<REQUIREMENTS extends IUsableActionRequirements = IUsa
54
55
  readonly definition: DEFINITION;
55
56
  id: ActionId;
56
57
  readonly observe: Observer.IRegistrar<this>;
58
+ private usersCount;
59
+ readonly users: WeakMap<UsableActionRegistrar, true>;
60
+ private _disposed;
61
+ get disposed(): boolean;
57
62
  constructor(requirements: REQUIREMENTS, definition: DEFINITION);
63
+ addUser(user: UsableActionRegistrar): this;
64
+ removeUser(user: UsableActionRegistrar): this;
58
65
  is(id?: ActionId): boolean;
59
66
  isExecutable(): this is UsableAction<REQUIREMENTS, IUsableActionDefinitionExecutable<REQUIREMENTS>>;
60
67
  execute(player: Player, provided: IUsableActionUsing<REQUIREMENTS>, context: UsableActionExecutionContext | IUsableActionExecutionContext): {
@@ -102,6 +109,10 @@ declare class UsableAction<REQUIREMENTS extends IUsableActionRequirements = IUsa
102
109
  getInternalActionType(): ActionType | undefined;
103
110
  getAlignment(using?: IUsableActionPossibleUsing): DeityReal[];
104
111
  getInteractionDistance(provided?: IUsableActionPossibleUsing): InteractionDistance | undefined;
112
+ dispose(): void;
113
+ private readonly playerDisposalBindings;
114
+ private bindPlayerDisposal;
115
+ private clearItemFinderCache;
105
116
  }
106
117
  export interface IUsableActionFactory<REQUIREMENTS extends IUsableActionRequirements> {
107
118
  create: <DEFINITION extends IUsableActionDefinition<REQUIREMENTS>>(action: DEFINITION) => UsableAction<REQUIREMENTS, DEFINITION>;
@@ -15,11 +15,16 @@ import type UsableAction from "@wayward/game/game/entity/action/usable/UsableAct
15
15
  import ContextMenu from "@wayward/game/ui/component/ContextMenu";
16
16
  import type { IVector2 } from "@wayward/game/utilities/math/IVector";
17
17
  import EventEmitter from "@wayward/utilities/event/EventEmitter";
18
- export default class UsableActionRegistrar {
18
+ export interface UsableActionRegistrarEvents {
19
+ dispose(): any;
20
+ }
21
+ export default class UsableActionRegistrar extends EventEmitter.Host<UsableActionRegistrarEvents> {
19
22
  readonly id: string;
20
23
  readonly actions: Array<[string, UsableAction]>;
21
24
  readonly actionIndices: Record<string, number>;
22
25
  readonly actionIds: string[];
26
+ private readonly _disposed;
27
+ get disposed(): boolean;
23
28
  constructor(id: string);
24
29
  byId(id?: ActionId): UsableAction | undefined;
25
30
  filter(filter: (action: UsableAction, id: string) => any): UsableActionRegistrar;
@@ -30,6 +35,7 @@ export default class UsableActionRegistrar {
30
35
  showContextMenu(provided: IUsableActionPossibleUsing, contextMenu?: ContextMenu<ActionId>, context?: ActionDisplayLevel, initialiser?: (contextMenu: ContextMenu<ActionId>) => any, position?: IVector2): ContextMenu<ActionId> | undefined;
31
36
  static getContextMenuActionExecutionContext(provided: IUsableActionPossibleUsing): IUsableActionExecutionContext;
32
37
  createContextMenu(provided: IUsableActionPossibleUsing, contextMenu?: ContextMenu<ActionId>, context?: ActionDisplayLevel, initialiser?: (contextMenu: ContextMenu<ActionId>) => any): ContextMenu<ActionId> | undefined;
38
+ dispose(): void;
33
39
  }
34
40
  export interface IUsableActionGeneratorEvents {
35
41
  stopPersisting(): any;
@@ -110,6 +110,10 @@ export interface IAiMaskDescription {
110
110
  * Whether this AI mask should currently be applied
111
111
  */
112
112
  condition?(entity: Entity): boolean;
113
+ /**
114
+ * Called when changing whether the AI mask is applied to the entity
115
+ */
116
+ onChange?(entity: Entity, change: ChangeAiType): void;
113
117
  }
114
118
  export declare const aiMaskDescriptions: OptionalDescriptions<AiMaskType, IAiMaskDescription>;
115
119
  export declare enum ChangeAiType {
@@ -33,9 +33,9 @@ export default class AiManager<ENTITY extends EntityMovable = EntityMovable> {
33
33
  aiMasks: AiMaskType[];
34
34
  private lastCalculatedAi;
35
35
  private wanderIntent?;
36
- private entityRef?;
36
+ private readonly entityRef?;
37
+ constructor(entity: ENTITY);
37
38
  get entity(): ENTITY | undefined;
38
- set entity(entity: ENTITY | undefined);
39
39
  protected get entityEvent(): IEventEmitter<EntityMovable, IEntityMovableEvents & IEntityAiEvents> | undefined;
40
40
  protected get island(): Island | undefined;
41
41
  /**
@@ -27,7 +27,7 @@ import type Corpse from "@wayward/game/game/entity/creature/corpse/Corpse";
27
27
  import type { CreatureZone } from "@wayward/game/game/entity/creature/zone/CreatureZone";
28
28
  import type NPC from "@wayward/game/game/entity/npc/NPC";
29
29
  import type Player from "@wayward/game/game/entity/player/Player";
30
- import { StatusType } from "@wayward/game/game/entity/status/IStatus";
30
+ import { StatusApplicability } from "@wayward/game/game/entity/status/IStatus";
31
31
  import type { IUncastableContainer } from "@wayward/game/game/item/IItem";
32
32
  import type Item from "@wayward/game/game/item/Item";
33
33
  import type { Reference, ReferenceType } from "@wayward/game/game/reference/IReferenceManager";
@@ -50,6 +50,7 @@ export default class Creature extends EntityWithStats<ICreatureDescription, Crea
50
50
  fromX: number;
51
51
  fromY: number;
52
52
  aberrant?: true;
53
+ ai: AiManager<this>;
53
54
  enemy?: {
54
55
  reference: Reference;
55
56
  attacks: number;
@@ -64,7 +65,6 @@ export default class Creature extends EntityWithStats<ICreatureDescription, Crea
64
65
  };
65
66
  respawned?: number;
66
67
  zonePoint?: IVector3;
67
- ai: AiManager;
68
68
  spawnAnimationTime: IMovementTime | undefined;
69
69
  constructor(entityOptions?: IEntityConstructorOptions<CreatureType>, aberrant?: boolean);
70
70
  initializeAi(resetAiType?: boolean): void;
@@ -92,7 +92,7 @@ export default class Creature extends EntityWithStats<ICreatureDescription, Crea
92
92
  get isTamed(): boolean;
93
93
  get isValid(): boolean;
94
94
  getCommandedAiType(): AiType | undefined;
95
- protected getApplicableStatuses(): Set<StatusType> | undefined;
95
+ protected getStatusApplicability(): StatusApplicability | undefined;
96
96
  tickStatuses(): void;
97
97
  getDefense(human?: Human): Defense;
98
98
  /**
@@ -28,7 +28,7 @@ import { MessageManagerNoOp } from "@wayward/game/game/entity/player/MessageMana
28
28
  import type Player from "@wayward/game/game/entity/player/Player";
29
29
  import { NoteManagerNoOp } from "@wayward/game/game/entity/player/note/NoteManager";
30
30
  import { QuestManagerNoOp } from "@wayward/game/game/entity/player/quest/QuestManager";
31
- import { StatusType } from "@wayward/game/game/entity/status/IStatus";
31
+ import { StatusApplicability } from "@wayward/game/game/entity/status/IStatus";
32
32
  import type { IContainer, ItemType } from "@wayward/game/game/item/IItem";
33
33
  import type Item from "@wayward/game/game/item/Item";
34
34
  import type { ReferenceType } from "@wayward/game/game/reference/IReferenceManager";
@@ -58,11 +58,11 @@ export default abstract class NPC extends Human<INPCDescription, NPCType, Refere
58
58
  get entityType(): EntityType.NPC;
59
59
  get tileUpdateType(): TileUpdateType;
60
60
  event: IEventEmitter<this, INPCEvents>;
61
- seen: number;
62
61
  private weightCapacity;
63
- talked?: Map<string, number>;
62
+ ai: AiManager<this>;
64
63
  interactions?: Map<string, Set<number>>;
65
- ai: AiManager;
64
+ seen: number;
65
+ talked?: Map<string, number>;
66
66
  static getRegistrarId(): number;
67
67
  static setRegistrarId(id: number): void;
68
68
  constructor(entityOptions?: IEntityConstructorOptions<NPCType>);
@@ -74,9 +74,8 @@ export default abstract class NPC extends Human<INPCDescription, NPCType, Refere
74
74
  createMessageManager(): MessageManagerNoOp;
75
75
  createQuestManager(): QuestManagerNoOp;
76
76
  addMilestone(): void;
77
- protected getApplicableStatuses(): Set<StatusType> | undefined;
77
+ protected getStatusApplicability(): StatusApplicability | undefined;
78
78
  get isValid(): boolean;
79
- load(): void;
80
79
  /**
81
80
  * Creates inventory, equips items, and scales stats
82
81
  */
@@ -20,7 +20,7 @@ import type { IMovementIntent, IPlayerEvents, PlayerTitle } from "@wayward/game/
20
20
  import MessageManager from "@wayward/game/game/entity/player/MessageManager";
21
21
  import NoteManager from "@wayward/game/game/entity/player/note/NoteManager";
22
22
  import QuestManager from "@wayward/game/game/entity/player/quest/QuestManager";
23
- import { StatusType } from "@wayward/game/game/entity/status/IStatus";
23
+ import { StatusApplicability } from "@wayward/game/game/entity/status/IStatus";
24
24
  import type { IslandId } from "@wayward/game/game/island/IIsland";
25
25
  import type { IContainer } from "@wayward/game/game/item/IItem";
26
26
  import { ItemType } from "@wayward/game/game/item/IItem";
@@ -124,7 +124,7 @@ export default class Player extends Human<undefined, number, ReferenceType.Playe
124
124
  */
125
125
  isExploredClientSide(x: number, y: number, z: number): boolean;
126
126
  protected onSkillGain(skill: SkillType, fromValue: number, toValue: number, mod: number): void;
127
- protected getApplicableStatuses(): Set<StatusType> | undefined;
127
+ protected getStatusApplicability(): StatusApplicability | undefined;
128
128
  private canWriteInHours;
129
129
  private canWriteNote;
130
130
  private onWriteNote;
@@ -21,8 +21,9 @@ import type { ISerializedImagePath } from "@wayward/game/ui/util/ImagePath";
21
21
  import ImagePath from "@wayward/game/ui/util/ImagePath";
22
22
  import BaseObserver from "@wayward/game/utilities/Observer";
23
23
  import type { IStringSection } from "@wayward/game/utilities/string/Interpolator";
24
+ import type { IEventSubscriberEvents } from "@wayward/utilities/event/EventEmitter";
24
25
  import EventEmitter from "@wayward/utilities/event/EventEmitter";
25
- export interface IInfoProviderEvents {
26
+ export interface IInfoProviderEvents extends IEventSubscriberEvents {
26
27
  /**
27
28
  * Should be emitted when the info provider is starting to initialize its component.
28
29
  */
@@ -13,8 +13,9 @@ import type { InfoProviderContext } from "@wayward/game/game/inspection/InfoProv
13
13
  import type Inspection from "@wayward/game/game/inspection/Inspection";
14
14
  import type { ResolvedInspection } from "@wayward/game/game/inspection/InspectionTypeMap";
15
15
  import HashSet from "@wayward/utilities/collection/set/HashSet";
16
+ import type { IEventSubscriberEvents } from "@wayward/utilities/event/EventEmitter";
16
17
  import EventEmitter from "@wayward/utilities/event/EventEmitter";
17
- export interface IInspectionsHandlerEvents {
18
+ export interface IInspectionsHandlerEvents extends IEventSubscriberEvents {
18
19
  updatedInspections(type: InspectType, newInspections: HashSet<Inspection<any>>, oldInspections?: HashSet<Inspection<any>>): any;
19
20
  }
20
21
  export default abstract class InspectionsHandler extends EventEmitter.Host<IInspectionsHandlerEvents> {
@@ -48,6 +48,7 @@ import Version from "@wayward/game/utilities/Version";
48
48
  import { Direction } from "@wayward/game/utilities/math/Direction";
49
49
  import type { IVector2, IVector3 } from "@wayward/game/utilities/math/IVector";
50
50
  import Vector2 from "@wayward/game/utilities/math/Vector2";
51
+ import type { IBuildId } from "@wayward/hosts/shared/globalTypes";
51
52
  import EventEmitter from "@wayward/utilities/event/EventEmitter";
52
53
  import type { Random } from "@wayward/utilities/random/Random";
53
54
  import type { LegacySeededGenerator } from "@wayward/utilities/random/generators/LegacySeededGenerator";
@@ -85,11 +86,13 @@ export default class Island extends EventEmitter.Host<IIslandEvents> implements
85
86
  */
86
87
  mapGenVersion: Version.String;
87
88
  mapGenBuildTime?: number;
89
+ mapGenBuildId?: IBuildId;
88
90
  /**
89
91
  * The version this island was last loaded on
90
92
  */
91
93
  saveVersion: Version.String;
92
94
  saveBuildTime: number;
95
+ saveBuildId: IBuildId | undefined;
93
96
  biomeOptions?: unknown;
94
97
  biomeType: BiomeTypes;
95
98
  contaminatedWater: IWaterContamination[];
@@ -47,7 +47,7 @@ declare class ItemFinder extends EventEmitter.Host<IItemFinderEvents> {
47
47
  markDirty(): void;
48
48
  markDirtyPostFilter(): void;
49
49
  track(): this;
50
- dispose(): this;
50
+ dispose(): void;
51
51
  protected onItemStateChange(item: Item, event: "durabilityChange" | "toggleProtected" | "qualityChange" | "transformed"): void;
52
52
  protected onContainerItemAdd(items: ItemManager, itemsAdded: Item[], containerAddedTo: IContainer): void;
53
53
  protected onContainerItemRemove(items: ItemManager, itemsRemoved: Item[], containerRemovedFrom?: IContainer): void;
@@ -9,6 +9,7 @@
9
9
  * https://github.com/WaywardGame/types/wiki
10
10
  */
11
11
  import type Version from "@wayward/game/utilities/Version";
12
+ import type { IEventSubscriberEvents } from "@wayward/utilities/event/EventEmitter";
12
13
  export declare enum MultiplayerCompatibility {
13
14
  Clientside = "clientside",
14
15
  Serverside = "serverside",
@@ -35,7 +36,7 @@ export interface IModConfig {
35
36
  readonly github?: string;
36
37
  readonly saveGameData?: boolean;
37
38
  }
38
- export interface IModEvents {
39
+ export interface IModEvents extends IEventSubscriberEvents {
39
40
  unload(): any;
40
41
  initialize(): any;
41
42
  uninitialize(): any;
@@ -144,6 +144,10 @@ export declare class WorldRenderer extends EventEmitter.Host<IWorldRendererEvent
144
144
  private overlayBatch;
145
145
  private vehicleBatch;
146
146
  private readonly entitiesInViewport;
147
+ /**
148
+ * A set of entities seen before (rendered on screen at least once)
149
+ */
150
+ private entititiesRenderedBefore;
147
151
  private viewportSpritesDirty;
148
152
  private cachedBounds;
149
153
  private cachedBoundsTimestamp;
@@ -14,6 +14,7 @@ import type { ISerializedTranslation } from "@wayward/game/language/ITranslation
14
14
  import type { IMultiplayerState } from "@wayward/game/multiplayer/IMultiplayer";
15
15
  import type IClientStore from "@wayward/game/save/clientStore/IClientStore";
16
16
  import type EnumInfo from "@wayward/game/utilities/enum/EnumInfo";
17
+ import type { IBuildId } from "@wayward/hosts/shared/globalTypes";
17
18
  export declare const saveDataVersionUnknown = "Unknown";
18
19
  export default class SaveData {
19
20
  gameSlotName: string;
@@ -23,6 +24,7 @@ export default class SaveData {
23
24
  gameThumbnail: string;
24
25
  gameDifficulty: GameMode;
25
26
  gameBuildTime: number;
27
+ gameBuildId?: IBuildId;
26
28
  saveManagerSaveTime: number;
27
29
  saveManagerTicks: number;
28
30
  saveManagerDifficulty: GameMode;
@@ -16,11 +16,13 @@ import type { IDialogInfo } from "@wayward/game/ui/old/IOldUi";
16
16
  import type { ISavedCharacter } from "@wayward/game/ui/screen/screens/menu/menus/character/Character";
17
17
  import type Version from "@wayward/game/utilities/Version";
18
18
  import type EnumInfo from "@wayward/game/utilities/enum/EnumInfo";
19
+ import type { IBuildId } from "@wayward/hosts/shared/globalTypes";
19
20
  export default class SaveDataGlobal {
20
21
  static defaultOptions: IOptions;
21
22
  gameCrafted: SaferNumberIndexedObject<ICrafted>;
22
23
  gameLastPlayedVersion: Version.String;
23
24
  gameLastPlayedBuildTime?: number;
25
+ gameLastPlayedBuildId?: IBuildId;
24
26
  gameHighscores: IHighscore[];
25
27
  gamePlayedCount: number;
26
28
  options: IOptions;
@@ -64,6 +64,9 @@ declare const propertiesToSerializeObject: {
64
64
  gameBuildTime: {
65
65
  property: string[];
66
66
  };
67
+ gameBuildId: {
68
+ property: string[];
69
+ };
67
70
  saveTime: {
68
71
  property: string[];
69
72
  savePropertyFlag: SavePropertyFlag;
@@ -120,6 +123,9 @@ declare const propertiesToSerializeGlobalObject: {
120
123
  lastPlayedBuildTime: {
121
124
  property: string[];
122
125
  };
126
+ lastPlayedBuildId: {
127
+ property: string[];
128
+ };
123
129
  gamesPlayed: {
124
130
  property: string[];
125
131
  };
@@ -23,8 +23,10 @@ import type { IGameOptions } from "@wayward/game/game/options/IGameOptions";
23
23
  import type TileEvent from "@wayward/game/game/tile/TileEvent";
24
24
  import type { UpgradesArrayCompressedPusher } from "@wayward/game/save/upgrade/UpgradesArray";
25
25
  import type Version from "@wayward/game/utilities/Version";
26
+ import type { IBuildId } from "@wayward/hosts/shared/globalTypes";
26
27
  export interface IUpgradeVersion {
27
28
  name?: string;
29
+ buildId?: IBuildId;
28
30
  applies(buildVersion: Version.Info): boolean;
29
31
  upgradeGlobal?(version: Version.Info, upgrades: UpgradesArrayCompressedPusher): any;
30
32
  upgradeGame?(version: Version.Info, upgrades: UpgradesArrayCompressedPusher, game: Game): any;
@@ -44,4 +46,7 @@ export interface IUpgradeVersion {
44
46
  export type UpgradeType = Exclude<keyof IUpgradeVersion, "applies">;
45
47
  export type UpgradeParameters<TYPE extends UpgradeType> = Required<IUpgradeVersion>[TYPE] extends (_v: any, _u: any, ...params: infer PARAMS) => any ? PARAMS : never;
46
48
  export declare function oldify<CURRENT, OLD>(current: CURRENT): Merge<CURRENT, Partial<OLD>>;
47
- export default function (definition: IUpgradeVersion): IUpgradeVersion;
49
+ export interface IUpgradeVersionDefinition extends Omit<IUpgradeVersion, "applies" | "name" | "buildId"> {
50
+ applies?: IUpgradeVersion["applies"];
51
+ }
52
+ export default function (definition: IUpgradeVersionDefinition): IUpgradeVersionDefinition;
@@ -8,5 +8,5 @@
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
- declare const _default: import("@wayward/game/save/upgrade/UpgradeVersion").IUpgradeVersion;
11
+ declare const _default: import("@wayward/game/save/upgrade/UpgradeVersion").IUpgradeVersionDefinition;
12
12
  export default _default;
@@ -8,5 +8,5 @@
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
- declare const _default: import("@wayward/game/save/upgrade/UpgradeVersion").IUpgradeVersion;
11
+ declare const _default: import("@wayward/game/save/upgrade/UpgradeVersion").IUpgradeVersionDefinition;
12
12
  export default _default;
@@ -8,5 +8,5 @@
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
- declare const _default: import("@wayward/game/save/upgrade/UpgradeVersion").IUpgradeVersion;
11
+ declare const _default: import("@wayward/game/save/upgrade/UpgradeVersion").IUpgradeVersionDefinition;
12
12
  export default _default;
@@ -8,5 +8,5 @@
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
- declare const _default: import("@wayward/game/save/upgrade/UpgradeVersion").IUpgradeVersion;
11
+ declare const _default: import("@wayward/game/save/upgrade/UpgradeVersion").IUpgradeVersionDefinition;
12
12
  export default _default;
@@ -8,5 +8,5 @@
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
- declare const _default: import("@wayward/game/save/upgrade/UpgradeVersion").IUpgradeVersion;
11
+ declare const _default: import("@wayward/game/save/upgrade/UpgradeVersion").IUpgradeVersionDefinition;
12
12
  export default _default;
@@ -8,5 +8,5 @@
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
- declare const _default: import("@wayward/game/save/upgrade/UpgradeVersion").IUpgradeVersion;
11
+ declare const _default: import("@wayward/game/save/upgrade/UpgradeVersion").IUpgradeVersionDefinition;
12
12
  export default _default;
@@ -8,5 +8,5 @@
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
- declare const _default: import("@wayward/game/save/upgrade/UpgradeVersion").IUpgradeVersion;
11
+ declare const _default: import("@wayward/game/save/upgrade/UpgradeVersion").IUpgradeVersionDefinition;
12
12
  export default _default;
@@ -8,5 +8,5 @@
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
- declare const _default: import("@wayward/game/save/upgrade/UpgradeVersion").IUpgradeVersion;
11
+ declare const _default: import("@wayward/game/save/upgrade/UpgradeVersion").IUpgradeVersionDefinition;
12
12
  export default _default;
@@ -8,5 +8,5 @@
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
- declare const _default: import("@wayward/game/save/upgrade/UpgradeVersion").IUpgradeVersion;
11
+ declare const _default: import("@wayward/game/save/upgrade/UpgradeVersion").IUpgradeVersionDefinition;
12
12
  export default _default;
@@ -8,5 +8,5 @@
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
- declare const _default: import("@wayward/game/save/upgrade/UpgradeVersion").IUpgradeVersion;
11
+ declare const _default: import("@wayward/game/save/upgrade/UpgradeVersion").IUpgradeVersionDefinition;
12
12
  export default _default;
@@ -0,0 +1,12 @@
1
+ /*!
2
+ * Copyright 2011-2024 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
+ declare const _default: import("@wayward/game/save/upgrade/UpgradeVersion").IUpgradeVersionDefinition;
12
+ export default _default;