Browse Source

[fixed] Inhibition values reversed in display for custom setup to avoid confusion

KevinSmarts 4 years ago
parent
commit
dec5f82281
1 changed files with 9 additions and 1 deletions
  1. 9 1
      locations/preSYS2.qsrc

+ 9 - 1
locations/preSYS2.qsrc

@@ -167,6 +167,14 @@ if $ARGS[0] = 'modrel_setup3':
 	'<TR bgcolor=#ffffff><TD><<$ARGS[2]>> (<<x>>/200)</TD><TD><a href="exec:<<$ARGS[1]>> = 0 & gt ''preSYS2'', $metka">zero</a></TD><TD bgcolor=#ff9999><a href="exec:<<$ARGS[1]>> -= 10 & gt ''preSYS2'', $metka">minus 10</a></TD><TD bgcolor=#ff9999><a href="exec:<<$ARGS[1]>>  -= 5 & gt ''preSYS2'', $metka">minus 5</a></TD><TD bgcolor=#99ff99><a href="exec:<<$ARGS[1]>>  += 5 & gt ''preSYS2'', $metka">plus 5</a></TD><TD bgcolor=#99ff99><a href="exec:<<$ARGS[1]>>  += 10 & gt ''preSYS2'', $metka">plus 10</a></TD><TD><a href="exec:<<$ARGS[1]>>  = 200 & gt ''preSYS2'', $metka">200</a></TD>'
 end
 
+!!Values reversed just for inhib use
+if $ARGS[0] = 'modrel_setup4':
+	dynamic 'if <<$ARGS[1]>> < 0: <<$ARGS[1]>> = 0'
+	dynamic 'if <<$ARGS[1]>> > 100: <<$ARGS[1]>> = 100'
+	dynamic 'x = <<100-$ARGS[1]>>'
+	'<TR bgcolor=#ffffff><TD><<$ARGS[2]>> (<<x>>/100)</TD><TD><a href="exec:<<$ARGS[1]>> = 100 & gt ''preSYS2'', $metka">zero</a></TD><TD bgcolor=#ff9999><a href="exec:<<$ARGS[1]>> += 10 & gt ''preSYS2'', $metka">minus 10</a></TD><TD bgcolor=#ff9999><a href="exec:<<$ARGS[1]>>  += 5 & gt ''preSYS2'', $metka">minus 5</a></TD><TD bgcolor=#99ff99><a href="exec:<<$ARGS[1]>>  -= 5 & gt ''preSYS2'', $metka">plus 5</a></TD><TD bgcolor=#99ff99><a href="exec:<<$ARGS[1]>>  -= 10 & gt ''preSYS2'', $metka">plus 10</a></TD><TD><a href="exec:<<$ARGS[1]>>  = 0 & gt ''preSYS2'', $metka">100</a></TD>'
+end
+
 if $ARGS[0] = 'modite_cos':
 	$metka = 'modite_cos'
 	'<center><b>Cosmetic items</b></center>'
@@ -396,7 +404,7 @@ if $ARGS[0] = 'modatt':
 	gs 'preSYS2', 'modrel_setup2', 'pcs_prcptn', 'Perception'
 	if MagikDostup = 0: gs 'preSYS2', 'modrel_setup2', 'pcs_magik', 'Magic'
 	gs 'preSYS2', 'modrel_setup2', 'pcs_grades', 'Grades'
-	gs 'preSYS2', 'modrel_setup2', 'pcs_inhib', 'Inhibition'
+	gs 'preSYS2', 'modrel_setup4', '100-pcs_inhib', 'Inhibition'
 	gs 'preSYS2', 'modrel_setup2', 'pcs_heels', 'Heels'
 	'</table></center>'
 	nl