forked from ppfun/pixelplanet
make cooldown linking configurable, remove hardcoded link between
minimap and earth
This commit is contained in:
parent
6aed8bbb94
commit
6a4d2f01bf
|
@ -146,6 +146,7 @@ Meaning of some values:
|
||||||
| hid | Hidden canvases, can be just seen by pressing P (default: false)|
|
| hid | Hidden canvases, can be just seen by pressing P (default: false)|
|
||||||
| sd | Start-date of the canvas (for historical view) |
|
| sd | Start-date of the canvas (for historical view) |
|
||||||
| ed | end date for historical view (canvas retired) |
|
| ed | end date for historical view (canvas retired) |
|
||||||
|
| linkcd | id of another canvas to take the cooldown from |
|
||||||
|
|
||||||
Notes:
|
Notes:
|
||||||
|
|
||||||
|
|
|
@ -373,6 +373,7 @@
|
||||||
"pcd" : 7000,
|
"pcd" : 7000,
|
||||||
"cds": 60000,
|
"cds": 60000,
|
||||||
"ranked" : true,
|
"ranked" : true,
|
||||||
|
"linkcd" : 0,
|
||||||
"sd": "2024-02-22"
|
"sd": "2024-02-22"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -189,6 +189,7 @@ export default async function drawByOffsets(
|
||||||
user.country,
|
user.country,
|
||||||
ranked,
|
ranked,
|
||||||
canvasId,
|
canvasId,
|
||||||
|
canvas.linkcd ?? canvasId,
|
||||||
i, j,
|
i, j,
|
||||||
clrIgnore,
|
clrIgnore,
|
||||||
req,
|
req,
|
||||||
|
|
|
@ -23,6 +23,8 @@ const PREFIX = 'cd';
|
||||||
* @param id userId
|
* @param id userId
|
||||||
* @param ranked boolean if increasing rank (should only be true if logged in)
|
* @param ranked boolean if increasing rank (should only be true if logged in)
|
||||||
* @param clrIgnore, bcd, pcd, cds information about canvas
|
* @param clrIgnore, bcd, pcd, cds information about canvas
|
||||||
|
* @param canvasId id of the canvas we are placing on
|
||||||
|
* @param canvasCdId id of the canvas we take the cooldown from
|
||||||
* @param i, j chunk coordinates
|
* @param i, j chunk coordinates
|
||||||
* @param pxls Array with offsets of pixels
|
* @param pxls Array with offsets of pixels
|
||||||
* @return see lua/placePixel.lua
|
* @return see lua/placePixel.lua
|
||||||
|
@ -33,6 +35,7 @@ export default function allowPlace(
|
||||||
country,
|
country,
|
||||||
ranked,
|
ranked,
|
||||||
canvasId,
|
canvasId,
|
||||||
|
canvasCdId,
|
||||||
i, j,
|
i, j,
|
||||||
clrIgnore,
|
clrIgnore,
|
||||||
req,
|
req,
|
||||||
|
@ -44,11 +47,6 @@ export default function allowPlace(
|
||||||
) {
|
) {
|
||||||
const isalKey = `${ALLOWED_PREFIX}:${ip}`;
|
const isalKey = `${ALLOWED_PREFIX}:${ip}`;
|
||||||
const captKey = (CAPTCHA_TIME >= 0) ? `${CAPTCHA_PREFIX}:${ip}` : 'nope';
|
const captKey = (CAPTCHA_TIME >= 0) ? `${CAPTCHA_PREFIX}:${ip}` : 'nope';
|
||||||
// ATTENTION: HARDCODED LINKED COODLOWN OF MINIMAP AND EARTH CANVAS
|
|
||||||
let canvasCdId = canvasId;
|
|
||||||
if (canvasId === 11) {
|
|
||||||
canvasCdId = 0;
|
|
||||||
}
|
|
||||||
const ipCdKey = `${PREFIX}:${canvasCdId}:ip:${ip}`;
|
const ipCdKey = `${PREFIX}:${canvasCdId}:ip:${ip}`;
|
||||||
let idCdKey;
|
let idCdKey;
|
||||||
if (id) {
|
if (id) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user