Update generationSlice.ts

Added perlin noise state restoration.
This commit is contained in:
Jonathan 2023-02-09 06:30:17 -06:00 committed by blessedcoolant
parent 3feff09fb3
commit 28eaffa188

View File

@ -195,8 +195,11 @@ export const generationSlice = createSlice({
} else { } else {
state.threshold = threshold; state.threshold = threshold;
} }
if (perlin) state.perlin = perlin; if (typeof perlin === 'undefined') {
if (typeof perlin === 'undefined') state.perlin = 0; state.perlin = 0;
} else {
state.perlin = perlin;
}
if (typeof seamless === 'boolean') state.seamless = seamless; if (typeof seamless === 'boolean') state.seamless = seamless;
// if (typeof hires_fix === 'boolean') state.hiresFix = hires_fix; // TODO: Needs to be fixed after reorg // if (typeof hires_fix === 'boolean') state.hiresFix = hires_fix; // TODO: Needs to be fixed after reorg
if (width) state.width = width; if (width) state.width = width;