add STARTYCHUNK env
This commit is contained in:
parent
cf3c2bc968
commit
6adf4adb8a
@ -33,6 +33,7 @@ services:
|
||||
PGPASSWORD: enter
|
||||
PGPORT: 5432
|
||||
AREAS_FILE: /areas.dat
|
||||
# STARTYCHUNK: -50
|
||||
restart: "no"
|
||||
|
||||
volumes:
|
||||
|
@ -5,11 +5,15 @@ const bounds = require("./bounds");
|
||||
async function worker() {
|
||||
|
||||
const ybounds = await bounds.find_y_bounds();
|
||||
const minychunk = Math.floor((ybounds.miny + 2) / 5);
|
||||
let minychunk = Math.floor((ybounds.miny + 2) / 5);
|
||||
const maxychunk = Math.floor((ybounds.maxy + 2) / 5);
|
||||
let chunkcount = 0;
|
||||
let removecount = 0;
|
||||
|
||||
if (process.env.STARTYCHUNK) {
|
||||
minychunk = +process.env.STARTYCHUNK;
|
||||
}
|
||||
|
||||
for (let chunky = minychunk; chunky <= maxychunk; chunky++){
|
||||
const miny = (chunky * 5) - 2;
|
||||
const maxy = miny + 4;
|
||||
|
Loading…
x
Reference in New Issue
Block a user