Can disable cell colors in v6 mode
This commit is contained in:
parent
1e866e82f4
commit
d354078ad1
99
mibpov.js
99
mibpov.js
@ -1131,6 +1131,7 @@ function drawV6() {
|
|||||||
|
|
||||||
clear(context);
|
clear(context);
|
||||||
|
|
||||||
|
|
||||||
if (v6_flag_snowbiomes) {
|
if (v6_flag_snowbiomes) {
|
||||||
|
|
||||||
let cx, cy;
|
let cx, cy;
|
||||||
@ -1149,52 +1150,58 @@ function drawV6() {
|
|||||||
// Desert <-> Jungle <-> Temperate
|
// Desert <-> Jungle <-> Temperate
|
||||||
[cx_hot2, cy_hot2] = biomeCoordsToCanvasPixelCoords(MGV6_FREQ_HOT, MGV6_FREQ_JUNGLE);
|
[cx_hot2, cy_hot2] = biomeCoordsToCanvasPixelCoords(MGV6_FREQ_HOT, MGV6_FREQ_JUNGLE);
|
||||||
|
|
||||||
// Render biome areas
|
if (showCellColors) {
|
||||||
context.fillStyle = CELL_COLOR_V6_NORMAL;
|
// Render biome areas
|
||||||
// Temperate
|
context.fillStyle = CELL_COLOR_V6_NORMAL;
|
||||||
context.beginPath();
|
// Temperate
|
||||||
context.moveTo(cx_snow, 0);
|
context.beginPath();
|
||||||
context.lineTo(cx_snow, h);
|
context.moveTo(cx_snow, 0);
|
||||||
context.lineTo(cx_hot, h);
|
context.lineTo(cx_snow, h);
|
||||||
context.lineTo(cx_hot, 0);
|
context.lineTo(cx_hot, h);
|
||||||
context.closePath();
|
context.lineTo(cx_hot, 0);
|
||||||
context.fill();
|
context.closePath();
|
||||||
// Tundra
|
context.fill();
|
||||||
context.fillStyle = CELL_COLOR_V6_TUNDRA;
|
// Tundra
|
||||||
context.beginPath();
|
context.fillStyle = CELL_COLOR_V6_TUNDRA;
|
||||||
context.moveTo(0, 0);
|
context.beginPath();
|
||||||
context.lineTo(cx_snow2, 0);
|
context.moveTo(0, 0);
|
||||||
context.lineTo(cx_snow2, cy_snow2);
|
context.lineTo(cx_snow2, 0);
|
||||||
context.lineTo(0, cy_snow2);
|
context.lineTo(cx_snow2, cy_snow2);
|
||||||
context.closePath();
|
context.lineTo(0, cy_snow2);
|
||||||
context.fill();
|
context.closePath();
|
||||||
// Taiga
|
context.fill();
|
||||||
context.fillStyle = CELL_COLOR_V6_TAIGA;
|
// Taiga
|
||||||
context.beginPath();
|
context.fillStyle = CELL_COLOR_V6_TAIGA;
|
||||||
context.moveTo(cx_snow2, cy_snow2);
|
context.beginPath();
|
||||||
context.lineTo(cx_snow2, h);
|
context.moveTo(cx_snow2, cy_snow2);
|
||||||
context.lineTo(0, h);
|
context.lineTo(cx_snow2, h);
|
||||||
context.lineTo(0, cy_snow2);
|
context.lineTo(0, h);
|
||||||
context.closePath();
|
context.lineTo(0, cy_snow2);
|
||||||
context.fill();
|
context.closePath();
|
||||||
// Jungle
|
context.fill();
|
||||||
context.fillStyle = CELL_COLOR_V6_JUNGLE;
|
// Jungle
|
||||||
context.beginPath();
|
context.fillStyle = CELL_COLOR_V6_JUNGLE;
|
||||||
context.moveTo(w, 0);
|
context.beginPath();
|
||||||
context.lineTo(cx_hot2, 0);
|
context.moveTo(w, 0);
|
||||||
context.lineTo(cx_hot2, cy_hot2);
|
context.lineTo(cx_hot2, 0);
|
||||||
context.lineTo(w, cy_hot2);
|
context.lineTo(cx_hot2, cy_hot2);
|
||||||
context.closePath();
|
context.lineTo(w, cy_hot2);
|
||||||
context.fill();
|
context.closePath();
|
||||||
// Desert
|
context.fill();
|
||||||
context.fillStyle = CELL_COLOR_V6_DESERT;
|
// Desert
|
||||||
context.beginPath();
|
context.fillStyle = CELL_COLOR_V6_DESERT;
|
||||||
context.moveTo(cx_hot2, cy_hot2);
|
context.beginPath();
|
||||||
context.lineTo(cx_hot2, h);
|
context.moveTo(cx_hot2, cy_hot2);
|
||||||
context.lineTo(w, h);
|
context.lineTo(cx_hot2, h);
|
||||||
context.lineTo(w, cy_snow2);
|
context.lineTo(w, h);
|
||||||
context.closePath();
|
context.lineTo(w, cy_snow2);
|
||||||
context.fill();
|
context.closePath();
|
||||||
|
context.fill();
|
||||||
|
} else {
|
||||||
|
// Use a "neutral" background color for the whole area if cell colors are disabled
|
||||||
|
context.fillStyle = CELL_COLOR_NEUTRAL;
|
||||||
|
context.fillRect(-DRAW_OFFSET, -DRAW_OFFSET, w+DRAW_OFFSET, h+DRAW_OFFSET);
|
||||||
|
}
|
||||||
|
|
||||||
// Render biome borders
|
// Render biome borders
|
||||||
context.lineWidth = 2.5;
|
context.lineWidth = 2.5;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user