mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 17:51:24 +01:00
v1.5.276 - libs minification
This commit is contained in:
parent
1a2eb2291a
commit
71ca7a1166
17 changed files with 24 additions and 1226 deletions
|
|
@ -475,7 +475,7 @@ function toggleIce(event) {
|
|||
function drawIce() {
|
||||
const cells = grid.cells, vertices = grid.vertices, n = cells.i.length, temp = cells.temp, h = cells.h;
|
||||
const used = new Uint8Array(cells.i.length);
|
||||
Math.seedrandom(seed);
|
||||
Math.random = aleaPRNG(seed);
|
||||
|
||||
const shieldMin = -6; // max temp to form ice shield (glacier)
|
||||
const icebergMax = 2; // max temp to form an iceberg
|
||||
|
|
|
|||
|
|
@ -389,7 +389,7 @@ function applyStoredOptions() {
|
|||
|
||||
// randomize options if randomization is allowed (not locked or options='default')
|
||||
function randomizeOptions() {
|
||||
Math.seedrandom(seed); // reset seed to initial one
|
||||
Math.random = aleaPRNG(seed); // reset seed to initial one
|
||||
const randomize = new URL(window.location.href).searchParams.get("options") === "default"; // ignore stored options
|
||||
|
||||
// 'Options' settings
|
||||
|
|
|
|||
|
|
@ -97,7 +97,8 @@ function recalculatePopulation() {
|
|||
}
|
||||
|
||||
function regenerateStates() {
|
||||
Math.seedrandom(Math.floor(Math.random() * 1e9)); // new random seed
|
||||
const localSeed = Math.floor(Math.random() * 1e9); // new random seed
|
||||
Math.random = aleaPRNG(localSeed);
|
||||
const burgs = pack.burgs.filter(b => b.i && !b.removed);
|
||||
if (!burgs.length) {
|
||||
tip("No burgs to generate states. Please create burgs first", false, "error");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue