@wayward/types 2.12.0-beta.dev.20221003.2 → 2.12.0-beta.dev.20221004.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,7 +30,7 @@ export declare abstract class ObjectManager<ObjectType extends StringableObject,
30
30
  get(id: number): ObjectType | undefined;
31
31
  set(id: number, value: ObjectType | undefined): void;
32
32
  getObjects(): SaferArray<ObjectType>;
33
- findUnusedId<T extends object>(): number;
33
+ findUnusedId(): number;
34
34
  protected replaceNullsWithUndefined(): void;
35
35
  protected registerForMemoryLeakDetection(object: SaferArray<ObjectType>): void;
36
36
  }
@@ -78,7 +78,7 @@ export default class DoodadManager extends ObjectManager<Doodad, IDoodadManagerE
78
78
  * Runs a full gamut of updates on doodads including decaying items inside containers, spreading/growing plants/mushrooms, water distillation/desenation and more.
79
79
  */
80
80
  updateAllAsync(ticks: number, playingHumans: Human[], updatesPerTick: number | undefined, onProgress: (progess: number) => Promise<void>): Promise<void>;
81
- verifyAndFixItemWeights(): void;
81
+ verifyAndFixItemWeights(allowFixesInMultiplayer?: boolean): void;
82
82
  /**
83
83
  * Used to spawn a random doodad on the current biome type and at a set location (and terrain type) based on spawnOnWorldGen properties in doodad descriptions.
84
84
  * @param terrainType The terrain type to check.
@@ -168,7 +168,7 @@ export default abstract class Human extends Entity implements IHasInsulation {
168
168
  * Returns the result of the `"getMaxHealth"` event, or the `max` in `Stat.Health`,
169
169
  * if the result of the hook is `undefined`.
170
170
  */
171
- getMaxHealth(): number;
171
+ getMaxHealth(withBonus?: boolean): number;
172
172
  getCraftingDifficulty(level: RecipeLevel): number;
173
173
  update(): void;
174
174
  updateStatsAndAttributes(): void;
@@ -85,7 +85,8 @@ export interface IIslandLoadOptions {
85
85
  travelTime: number;
86
86
  newWorldBiomeTypeOverride: BiomeType;
87
87
  pauseAndShowLoadingScreen: boolean;
88
- multiplayerLoadingDescription?: MultiplayerLoadingDescription;
88
+ multiplayerLoadingDescription: MultiplayerLoadingDescription;
89
+ allowItemAndDoodadFixesInMultiplayer: boolean;
89
90
  }
90
91
  export interface IMoveToIslandOptions {
91
92
  spawnPosition: IVector2;
@@ -106,6 +106,7 @@ export default class Island extends EventEmitter.Host<IIslandEvents> implements
106
106
  private _world;
107
107
  modifiersCollection?: IslandModifiersCollection;
108
108
  details?: IIslandDetails;
109
+ ranUpgrades: boolean;
109
110
  constructor(position?: IVector2, seed?: number);
110
111
  toString(): string;
111
112
  private registerMemoryLeakDetector;
@@ -323,7 +324,7 @@ export default class Island extends EventEmitter.Host<IIslandEvents> implements
323
324
  * Only allow loading references once
324
325
  * Even if an island is unloaded, the loaded references will remain
325
326
  */
326
- loadReferences(): void;
327
+ loadReferences(allowFixesInMultiplayer?: boolean): void;
327
328
  /**
328
329
  * Gets the items/resources from terrain based on the TerrainResources definition and checks if it is based on the current biome type.
329
330
  * @param terrainLoot The resource to check.
@@ -190,7 +190,7 @@ export default class Item extends EventEmitter.Host<IItemEvents> implements IRef
190
190
  * Fixes item issues.
191
191
  * Note: Be careful with what gets fixed in multiplayer! (when onlyRestoreIslandIds is set)
192
192
  */
193
- verifyAndFixItem(onlyRestoreIslandIds: boolean): void;
193
+ verifyAndFixItem(allowFixes: boolean): void;
194
194
  /**
195
195
  * @param source A string representing the reason for this damage. Used for multiplayer debugging. Just put a unique string of characters here
196
196
  * @param modifier The amount of damage to take. Defaults to 1.
@@ -314,7 +314,7 @@ export default class ItemManager extends ObjectManager<Item, IItemManagerEvents>
314
314
  /**
315
315
  * Note: don't print items to the console because the console will hold the item indefinitely
316
316
  */
317
- loadReference(container: IContainer, loadChildReferences?: boolean, parentContainer?: IContainer): boolean;
317
+ loadReference(allowFixes: boolean, container: IContainer, loadChildReferences?: boolean, parentContainer?: IContainer): boolean;
318
318
  private removeFromContainerInternal;
319
319
  private onItemMoveOrRemove;
320
320
  private getCraftTierBonus;
@@ -67,6 +67,7 @@ export default class Multiplayer extends EventEmitter.Host<IMultiplayerEvents> {
67
67
  isServer(): boolean;
68
68
  isClient(): boolean;
69
69
  getPlayerIdentifier(): string;
70
+ setPlayerIdentifier(identifier: string): void;
70
71
  getOptions(): IMultiplayerOptions;
71
72
  setOptions(options: IMultiplayerOptions, updateGame?: boolean): void;
72
73
  updateOptions(updates: Partial<IMultiplayerOptions>): void;
@@ -12,6 +12,7 @@ import type { IslandId } from "game/island/IIsland";
12
12
  import ClientPacket from "multiplayer/packets/ClientPacket";
13
13
  export default class LoadIslandPacket extends ClientPacket<Promise<void>> {
14
14
  islandId: IslandId;
15
+ allowItemFixes: boolean;
15
16
  getDebugInfo(): string;
16
17
  isSyncCheckEnabled(): boolean;
17
18
  process(): Promise<void>;
@@ -10,7 +10,3 @@
10
10
  */
11
11
  import type Island from "game/island/Island";
12
12
  export declare function upgradeIsland(island: Island): void;
13
- /**
14
- * Called after loading item & tile references
15
- */
16
- export declare function upgradeSaveAfterLoadingReferences(): void;
@@ -26,6 +26,7 @@ export declare type IDedicatedServerGameOptions = ICommonGameOptions;
26
26
  export interface IJoinServerOptions {
27
27
  joinProgrammatically: boolean;
28
28
  enableAllMilestoneModifiers?: boolean;
29
+ multiplayerIdentifier?: string;
29
30
  }
30
31
  export declare enum GameMode {
31
32
  Hardcore = "Hardcore Mode",
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.12.0-beta.dev.20221003.2",
4
+ "version": "2.12.0-beta.dev.20221004.1",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",