@@ -384,15 +384,19 @@ const resolvers = {
384384 gymRadius : scanner . scanZone . scanZoneRadius . gym ,
385385 spacing : scanner . scanZone . scanZoneSpacing ,
386386 maxSize : scanner . scanZone . scanZoneMaxSize ,
387- cooldown : scanner . scanZone . userCooldownSeconds ,
387+ cooldown :
388+ perms ?. scannerCooldowns ?. [ mode ] ??
389+ scanner . scanZone . userCooldownSeconds ,
388390 refreshQueue : scanner . backendConfig . queueRefreshInterval ,
389391 enabled : scanner [ mode ] . enabled ,
390392 }
391393 : {
392394 scannerType : scanner . backendConfig . platform ,
393395 showScanCount : scanner . scanNext . showScanCount ,
394396 showScanQueue : scanner . scanNext . showScanQueue ,
395- cooldown : scanner . scanNext . userCooldownSeconds ,
397+ cooldown :
398+ perms ?. scannerCooldowns ?. [ mode ] ??
399+ scanner . scanNext . userCooldownSeconds ,
396400 refreshQueue : scanner . backendConfig . queueRefreshInterval ,
397401 enabled : scanner [ mode ] . enabled ,
398402 }
@@ -597,11 +601,11 @@ const resolvers = {
597601 ( ! req . session . cooldown || req . session . cooldown < Date . now ( ) )
598602 ) {
599603 const validCoords = getValidCoords ( category , data ?. scanCoords , perms )
600-
604+ const cooldownSeconds =
605+ perms ?. scannerCooldowns ?. [ category ] ||
606+ config . getSafe ( `scanner.${ category } .userCooldownSeconds` )
601607 const cooldown =
602- config . getSafe ( `scanner.${ category } .userCooldownSeconds` ) *
603- validCoords . filter ( Boolean ) . length *
604- 1000 +
608+ cooldownSeconds * validCoords . filter ( Boolean ) . length * 1000 +
605609 Date . now ( )
606610 req . session . cooldown = cooldown
607611 return scannerApi (
0 commit comments