isaacscript-common
Version:
Helper functions and features for IsaacScript mods.
22 lines (21 loc) • 686 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getStartSeedString = getStartSeedString;
exports.nextSeed = nextSeed;
const cachedClasses_1 = require("../core/cachedClasses");
const rng_1 = require("./rng");
/** Alias for the `Seeds.GetStartSeedString` method. */
function getStartSeedString() {
const seeds = cachedClasses_1.game.GetSeeds();
return seeds.GetStartSeedString();
}
/**
* Helper function to get the next seed value.
*
* This function is useful when you are working with seed values directly over RNG objects.
*/
function nextSeed(seed) {
const rng = (0, rng_1.newRNG)(seed);
rng.Next();
return rng.GetSeed();
}