From b08e55b9f657b9e8de52c076e9f9b1007be46ca7 Mon Sep 17 00:00:00 2001 From: Wolfsblvt Date: Sat, 31 Aug 2024 22:20:35 +0200 Subject: [PATCH] WI highlight/log on automatic setting change --- public/scripts/world-info.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/public/scripts/world-info.js b/public/scripts/world-info.js index 29cb62a1a..8fc8a19a2 100644 --- a/public/scripts/world-info.js +++ b/public/scripts/world-info.js @@ -4777,8 +4777,10 @@ jQuery(() => { world_info_min_activations = Number($(this).val()); $('#world_info_min_activations_counter').val(world_info_min_activations); - if (world_info_min_activations !== 0) { + if (world_info_min_activations !== 0 && world_info_max_recursion_steps !== 0) { $('#world_info_max_recursion_steps').val(0).trigger('input'); + flashHighlight($('#world_info_max_recursion_steps').parent()); // flash the other control to show it has changed + console.info('[WI] Max recursion steps set to 0, as min activations is set to', world_info_min_activations); } else { saveSettings(); } @@ -4840,8 +4842,10 @@ jQuery(() => { $('#world_info_max_recursion_steps').on('input', function () { world_info_max_recursion_steps = Number($(this).val()); $('#world_info_max_recursion_steps_counter').val(world_info_max_recursion_steps); - if (world_info_max_recursion_steps !== 0) { + if (world_info_max_recursion_steps !== 0 && world_info_min_activations !== 0) { $('#world_info_min_activations').val(0).trigger('input'); + flashHighlight($('#world_info_min_activations').parent()); // flash the other control to show it has changed + console.info('[WI] Min activations set to 0, as max recursion steps is set to', world_info_max_recursion_steps); } else { saveSettings(); }