@wayward/types 2.11.6-beta.dev.20220428.2 → 2.11.6-beta.dev.20220502.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.
@@ -107,6 +107,16 @@ export default class Item extends EventEmitter.Host<IItemEvents> implements IRef
107
107
  constructor(itemType?: ItemType | undefined, islandId?: IslandId, quality?: Quality, human?: Human);
108
108
  get island(): import("../island/Island").default;
109
109
  toString(): string;
110
+ /**
111
+ * Gets the owner of this item.
112
+ * This will be the human who crafted it.
113
+ * Note: The owner might be different than the human whose inventory the item is currently in
114
+ */
115
+ getOwner(): Player | undefined;
116
+ /**
117
+ * Gets the current human that has the item in their inventory
118
+ */
119
+ private getCurrentOwner;
110
120
  /**
111
121
  * Sets the item as magical with a chance based on quality (and clears any existing magical properties)
112
122
  * @param bonus The number that chances get multiplied by, for example, 2 or 3
@@ -287,5 +297,4 @@ export default class Item extends EventEmitter.Host<IItemEvents> implements IRef
287
297
  private setupDurabilityHandlers;
288
298
  private checkIfItemsMatch;
289
299
  private checkIfItemArraysMatch;
290
- private getOwner;
291
300
  }
@@ -55,34 +55,35 @@ export declare enum LogSource {
55
55
  Player = 42,
56
56
  PlayerManager = 43,
57
57
  Prompts = 44,
58
- Reflow = 45,
59
- Renderer = 46,
60
- ReplayManager = 47,
61
- ResourceLoader = 48,
62
- SaveLoad = 49,
63
- SaveManager = 50,
64
- Serializer = 51,
65
- Shaders = 52,
66
- SoundEffect = 53,
67
- SpritePack = 54,
68
- SshCommandManager = 55,
69
- SshServer = 56,
70
- Steamworks = 57,
71
- StringTokenizer = 58,
72
- TemperatureManager = 59,
73
- TileEventManager = 60,
74
- TileUpdate = 61,
75
- Timer = 62,
76
- Trello = 63,
77
- Ui = 64,
78
- Utilities = 65,
79
- WebAssembly = 66,
80
- WebGlContext = 67,
81
- WebRTCConnection = 68,
82
- WebSocketConnection = 69,
83
- World = 70,
84
- WorldLayerRenderer = 71,
85
- WorldRenderer = 72
58
+ Random = 45,
59
+ Reflow = 46,
60
+ Renderer = 47,
61
+ ReplayManager = 48,
62
+ ResourceLoader = 49,
63
+ SaveLoad = 50,
64
+ SaveManager = 51,
65
+ Serializer = 52,
66
+ Shaders = 53,
67
+ SoundEffect = 54,
68
+ SpritePack = 55,
69
+ SshCommandManager = 56,
70
+ SshServer = 57,
71
+ Steamworks = 58,
72
+ StringTokenizer = 59,
73
+ TemperatureManager = 60,
74
+ TileEventManager = 61,
75
+ TileUpdate = 62,
76
+ Timer = 63,
77
+ Trello = 64,
78
+ Ui = 65,
79
+ Utilities = 66,
80
+ WebAssembly = 67,
81
+ WebGlContext = 68,
82
+ WebRTCConnection = 69,
83
+ WebSocketConnection = 70,
84
+ World = 71,
85
+ WorldLayerRenderer = 72,
86
+ WorldRenderer = 73
86
87
  }
87
88
  export declare enum LogLineType {
88
89
  Debug = 0,
@@ -102,7 +102,6 @@ export declare class SeededGenerator implements IRandomGenerator {
102
102
  private readonly addMultiplayerSyncChecks;
103
103
  private history;
104
104
  private maxHistoryLength;
105
- private debug;
106
105
  private seed;
107
106
  private readonly pushedSeeds;
108
107
  constructor(seed?: number, addMultiplayerSyncChecks?: boolean);
@@ -110,14 +109,13 @@ export declare class SeededGenerator implements IRandomGenerator {
110
109
  getSeed(): number;
111
110
  setSeed(newSeed: number): void;
112
111
  generateSeed(): void;
113
- setDebug(value: boolean): void;
114
112
  pushSeed(newSeed?: number): void;
115
113
  popSeed(): number;
116
114
  get(): number;
117
115
  startHistory(maxHistory?: number): void;
118
116
  getHistory(): IRandomHistory[] | undefined;
119
117
  takeHistory(): IRandomHistory[] | undefined;
120
- stopHistory(print?: string): IRandomHistory[];
118
+ stopHistory(): IRandomHistory[];
121
119
  getBaseSeed(): number;
122
120
  }
123
121
  export declare enum RandomInstance {
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.11.6-beta.dev.20220428.2",
4
+ "version": "2.11.6-beta.dev.20220502.1",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",