isaacscript-common 1.2.206 → 1.2.209
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.
package/dist/functions/rng.d.ts
CHANGED
|
@@ -35,13 +35,6 @@ export declare function isSerializedRNG(object: unknown): object is SerializedRN
|
|
|
35
35
|
* @param seed The seed to initialize it with. Default is `getRandomSeed()`.
|
|
36
36
|
*/
|
|
37
37
|
export declare function newRNG(seed?: Seed): RNG;
|
|
38
|
-
/**
|
|
39
|
-
* Helper function to get the next seed value.
|
|
40
|
-
*
|
|
41
|
-
* This function is useful if you are working with data structures that store seed values instead of
|
|
42
|
-
* RNG objects.
|
|
43
|
-
*/
|
|
44
|
-
export declare function nextSeed(seed: Seed): Seed;
|
|
45
38
|
/**
|
|
46
39
|
* Helper function to iterate over the provided object and set the seed for all of the values that
|
|
47
40
|
* are RNG objects equal to a particular seed.
|
package/dist/functions/rng.lua
CHANGED
|
@@ -104,11 +104,6 @@ function ____exports.isSerializedRNG(self, object)
|
|
|
104
104
|
table.unpack(KEYS)
|
|
105
105
|
) and ____table[SerializationBrand.RNG] ~= nil
|
|
106
106
|
end
|
|
107
|
-
function ____exports.nextSeed(self, seed)
|
|
108
|
-
local rng = ____exports.newRNG(nil, seed)
|
|
109
|
-
rng:Next()
|
|
110
|
-
return rng:GetSeed()
|
|
111
|
-
end
|
|
112
107
|
function ____exports.setAllRNGToSeed(self, object, seed)
|
|
113
108
|
local objectType = type(object)
|
|
114
109
|
if objectType ~= "table" then
|