From 3374d375f64bbe145959049345107bd0d5671edc Mon Sep 17 00:00:00 2001
From: pregmodfan <pregmodfan@cock.li>
Date: Sun, 24 Sep 2017 15:21:43 +0300
Subject: [PATCH] RA rules quick swithcing, and more then 10 rules allowed
 (with warning).

---
 src/uncategorized/rulesAssistant.tw | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/src/uncategorized/rulesAssistant.tw b/src/uncategorized/rulesAssistant.tw
index c2b2befb041..612e5ec8503 100644
--- a/src/uncategorized/rulesAssistant.tw
+++ b/src/uncategorized/rulesAssistant.tw
@@ -121,7 +121,19 @@
 
 //<<if def $PC.customTitle>>$PC.customTitle<<elseif $PC.title != 0>>Sir<<else>>Ma'am<</if>>, I will review your slaves and make changes that will have a beneficial effect. Apologies, sir, but this function is... not fully complete. It may have some serious limitations. Please use the 'no default setting' option to identify areas I should not address.//
 
+<br><br> /* Control method for quick switching to specific rule in list */
+List of rules: <br>
+<<if _length > 1>>
+	<<set _crule = $r-1>>
+	<<for _r = 0; _r < _length; _r++>>
+		<<rbutton "_crule" _r>> $defaultRules[_r].name <br>
+	<</for>>
+	<<link "Switch to selected rule">>
+		<<set $currentRule = $defaultRules[_crule]>>
+		<<goto "Rules Assistant">>
+	<</link>>
 <br><br>
+<</if>>
 
 <<if _length < 1>>
 ''No rules.''
@@ -2380,7 +2392,9 @@ Relationship rules: <span id="relation">''$currentRule.relationshipRules.''</spa
 
 <br><br>
 
-<<if _length < 10>>
+<<if _length >= 10>>''@@.red;ATTENTION! Current rules count is 10 or above. High rules count can dramaticaly slow down game speed (especially if slaves count is high too), or even cause freeze of game page/browser. Use at you own risk!@@''
+<br><br>
+<</if>>
 
 	<<link "Add a new rule">>
 
@@ -2398,7 +2412,6 @@ Relationship rules: <span id="relation">''$currentRule.relationshipRules.''</spa
 
 	<</link>> |
 
-<</if>>
 
 <<if _length > 0>>
 	<span id="applyresult"></span>
-- 
GitLab