From 4baefeba68caa2282a2ad5792da12e3a1cf9c27b Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Fri, 23 Feb 2024 21:18:40 +0200 Subject: [PATCH] Extend per-entry scan depth limit, add warnings on overflow --- public/index.html | 2 +- public/scripts/world-info.js | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/public/index.html b/public/index.html index 642344aa0..56257737c 100644 --- a/public/index.html +++ b/public/index.html @@ -4539,7 +4539,7 @@
Scan Depth - +
Case-Sensitive diff --git a/public/scripts/world-info.js b/public/scripts/world-info.js index 5b3edd40e..79a80eaa6 100644 --- a/public/scripts/world-info.js +++ b/public/scripts/world-info.js @@ -70,7 +70,7 @@ const SORT_ORDER_KEY = 'world_info_sort_order'; const METADATA_KEY = 'world_info'; const DEFAULT_DEPTH = 4; -const MAX_SCAN_DEPTH = 100; +const MAX_SCAN_DEPTH = 1000; /** * Represents a scanning buffer for one evaluation of World Info. @@ -1513,11 +1513,13 @@ function getWorldEntry(name, data, entry) { // Clamp if necessary if (value < 0) { $(this).val(0).trigger('input'); + toastr.warning('Scan depth cannot be negative'); return; } if (value > MAX_SCAN_DEPTH) { $(this).val(MAX_SCAN_DEPTH).trigger('input'); + toastr.warning(`Scan depth cannot exceed ${MAX_SCAN_DEPTH}`); return; }