diff --git a/src/canvases.json b/src/canvases.json index 6206343..d74a221 100644 --- a/src/canvases.json +++ b/src/canvases.json @@ -372,6 +372,7 @@ "bcd": 4000, "pcd" : 7000, "cds": 60000, + "ranked" : true, "sd": "2024-02-22" } } diff --git a/src/canvasesDesc.js b/src/canvasesDesc.js index f942abb..56b29de 100644 --- a/src/canvasesDesc.js +++ b/src/canvasesDesc.js @@ -38,7 +38,7 @@ function getCanvases(t) { 7: t`Black and White canvas`, 8: t`A canvas for the most active players from the the previous day. Daily ranking updates at 00:00 UTC.`, 10: t`Only four colors. Same rules as moon.`, - 11: t`Spam trash on a smaller earth with protected ocean`, + 11: t`Spam trash on a smaller earth with protected ocean. Shares cooldown with earth canvas`, }; /* * no edit below here needed when adding/removing canvas diff --git a/src/data/redis/cooldown.js b/src/data/redis/cooldown.js index 2022834..ab8e0f1 100644 --- a/src/data/redis/cooldown.js +++ b/src/data/redis/cooldown.js @@ -44,17 +44,15 @@ export default function allowPlace( ) { const isalKey = `${ALLOWED_PREFIX}:${ip}`; const captKey = (CAPTCHA_TIME >= 0) ? `${CAPTCHA_PREFIX}:${ip}` : 'nope'; - const ipCdKey = `${PREFIX}:${canvasId}:ip:${ip}`; + // ATTENTION: HARDCODED LINKED COODLOWN OF MINIMAP AND EARTH CANVAS + let canvasCdId = canvasId; + if (canvasId === 11) { + canvasCdId = 0; + } + const ipCdKey = `${PREFIX}:${canvasCdId}:ip:${ip}`; let idCdKey; if (id) { - idCdKey = `${PREFIX}:${canvasId}:id:${id}`; - /* - * cooldown by subnet should be more restrictive - * - } else if (ip.includes('.')) { - const ips = ip.slice(0, ip.lastIndexOf('.')); - idCdKey = `${PREFIX}:${canvasId}:ips:${ips}`; - */ + idCdKey = `${PREFIX}:${canvasCdId}:id:${id}`; } else { idCdKey = 'nope'; }