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);
|
||||
|
||||
|
||||
if (v6_flag_snowbiomes) {
|
||||
|
||||
let cx, cy;
|
||||
@ -1149,52 +1150,58 @@ function drawV6() {
|
||||
// Desert <-> Jungle <-> Temperate
|
||||
[cx_hot2, cy_hot2] = biomeCoordsToCanvasPixelCoords(MGV6_FREQ_HOT, MGV6_FREQ_JUNGLE);
|
||||
|
||||
// Render biome areas
|
||||
context.fillStyle = CELL_COLOR_V6_NORMAL;
|
||||
// Temperate
|
||||
context.beginPath();
|
||||
context.moveTo(cx_snow, 0);
|
||||
context.lineTo(cx_snow, h);
|
||||
context.lineTo(cx_hot, h);
|
||||
context.lineTo(cx_hot, 0);
|
||||
context.closePath();
|
||||
context.fill();
|
||||
// Tundra
|
||||
context.fillStyle = CELL_COLOR_V6_TUNDRA;
|
||||
context.beginPath();
|
||||
context.moveTo(0, 0);
|
||||
context.lineTo(cx_snow2, 0);
|
||||
context.lineTo(cx_snow2, cy_snow2);
|
||||
context.lineTo(0, cy_snow2);
|
||||
context.closePath();
|
||||
context.fill();
|
||||
// Taiga
|
||||
context.fillStyle = CELL_COLOR_V6_TAIGA;
|
||||
context.beginPath();
|
||||
context.moveTo(cx_snow2, cy_snow2);
|
||||
context.lineTo(cx_snow2, h);
|
||||
context.lineTo(0, h);
|
||||
context.lineTo(0, cy_snow2);
|
||||
context.closePath();
|
||||
context.fill();
|
||||
// Jungle
|
||||
context.fillStyle = CELL_COLOR_V6_JUNGLE;
|
||||
context.beginPath();
|
||||
context.moveTo(w, 0);
|
||||
context.lineTo(cx_hot2, 0);
|
||||
context.lineTo(cx_hot2, cy_hot2);
|
||||
context.lineTo(w, cy_hot2);
|
||||
context.closePath();
|
||||
context.fill();
|
||||
// Desert
|
||||
context.fillStyle = CELL_COLOR_V6_DESERT;
|
||||
context.beginPath();
|
||||
context.moveTo(cx_hot2, cy_hot2);
|
||||
context.lineTo(cx_hot2, h);
|
||||
context.lineTo(w, h);
|
||||
context.lineTo(w, cy_snow2);
|
||||
context.closePath();
|
||||
context.fill();
|
||||
if (showCellColors) {
|
||||
// Render biome areas
|
||||
context.fillStyle = CELL_COLOR_V6_NORMAL;
|
||||
// Temperate
|
||||
context.beginPath();
|
||||
context.moveTo(cx_snow, 0);
|
||||
context.lineTo(cx_snow, h);
|
||||
context.lineTo(cx_hot, h);
|
||||
context.lineTo(cx_hot, 0);
|
||||
context.closePath();
|
||||
context.fill();
|
||||
// Tundra
|
||||
context.fillStyle = CELL_COLOR_V6_TUNDRA;
|
||||
context.beginPath();
|
||||
context.moveTo(0, 0);
|
||||
context.lineTo(cx_snow2, 0);
|
||||
context.lineTo(cx_snow2, cy_snow2);
|
||||
context.lineTo(0, cy_snow2);
|
||||
context.closePath();
|
||||
context.fill();
|
||||
// Taiga
|
||||
context.fillStyle = CELL_COLOR_V6_TAIGA;
|
||||
context.beginPath();
|
||||
context.moveTo(cx_snow2, cy_snow2);
|
||||
context.lineTo(cx_snow2, h);
|
||||
context.lineTo(0, h);
|
||||
context.lineTo(0, cy_snow2);
|
||||
context.closePath();
|
||||
context.fill();
|
||||
// Jungle
|
||||
context.fillStyle = CELL_COLOR_V6_JUNGLE;
|
||||
context.beginPath();
|
||||
context.moveTo(w, 0);
|
||||
context.lineTo(cx_hot2, 0);
|
||||
context.lineTo(cx_hot2, cy_hot2);
|
||||
context.lineTo(w, cy_hot2);
|
||||
context.closePath();
|
||||
context.fill();
|
||||
// Desert
|
||||
context.fillStyle = CELL_COLOR_V6_DESERT;
|
||||
context.beginPath();
|
||||
context.moveTo(cx_hot2, cy_hot2);
|
||||
context.lineTo(cx_hot2, h);
|
||||
context.lineTo(w, h);
|
||||
context.lineTo(w, cy_snow2);
|
||||
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
|
||||
context.lineWidth = 2.5;
|
||||
|
Loading…
x
Reference in New Issue
Block a user