v1.5.276 - libs minification

This commit is contained in:
Azgaar 2021-02-14 16:49:35 +03:00
parent 1a2eb2291a
commit 71ca7a1166
17 changed files with 24 additions and 1226 deletions

View file

@ -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

View file

@ -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

View file

@ -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");