isaacscript-common 1.2.206 → 1.2.207

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.
@@ -16,6 +16,8 @@ interface CopyRNGReturn {
16
16
  */
17
17
  export declare function copyRNG<R extends RNG | SerializedRNG, S extends SerializationType>(rng: R, serializationType: S): CopyRNGReturn[S];
18
18
  export declare function copyRNG<R extends RNG | SerializedRNG>(rng: R): CopyRNGReturn[SerializationType.NONE];
19
+ /** Helper function to get the next seed value for the provided RNG object. */
20
+ export declare function getNewSeed(rng: RNG): Seed;
19
21
  /**
20
22
  * Helper function to get a random `Seed` value to be used in spawning entities and so on. Use this
21
23
  * instead of calling the `Random` function directly since that can return a value of 0 and crash
@@ -92,6 +92,10 @@ function ____exports.copyRNG(self, rng, serializationType)
92
92
  end
93
93
  until true
94
94
  end
95
+ function ____exports.getNewSeed(self, rng)
96
+ rng:Next()
97
+ return rng:GetSeed()
98
+ end
95
99
  function ____exports.isSerializedRNG(self, object)
96
100
  local objectType = type(object)
97
101
  if objectType ~= "table" then
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "1.2.206",
3
+ "version": "1.2.207",
4
4
  "description": "Helper functions for IsaacScript mods",
5
5
  "keywords": [
6
6
  "isaac",