Skip to content
Snippets Groups Projects
Commit 18ffae99 authored by Pregmodder's avatar Pregmodder
Browse files

Merge branch 'fixes' into 'pregmod-master'

Custom Slave Trade Display Consistency

See merge request pregmodfan/fc-pregmod!2490
parents d1192d36 3af338a7
No related branches found
No related tags found
1 merge request!2490Custom Slave Trade Display Consistency
...@@ -76,9 +76,11 @@ You are using standardized slave trading channels. [[Customize the slave trade|C ...@@ -76,9 +76,11 @@ You are using standardized slave trading channels. [[Customize the slave trade|C
<</if>> <</if>>
<br style="clear:both" /><hr style="margin:0"> <br style="clear:both" /><hr style="margin:0">
<<set _len = Object.keys($nationalitiescheck).length>> <<set _len = Object.keys($nationalitiescheck).length>>
<<set _j = 0>>
<<for _nation, _i range $nationalitiescheck>> <<for _nation, _i range $nationalitiescheck>>
<<print _nation>> @@.orange;<<print (($nationalities[_nation]/hashSum($nationalities))*100).toFixed(2)>>%@@ <<print _nation>> @@.orange;<<print (($nationalities[_nation]/hashSum($nationalities))*100).toFixed(2)>>%@@
<<if _i < _len-1>> | <</if>> <<set _j++>>
<<if _j < _len>> | <</if>>
<</for>> <</for>>
<br style="clear:both" /><hr style="margin:0"> <br style="clear:both" /><hr style="margin:0">
<</if>> /* closes $customVariety is defined */ <</if>> /* closes $customVariety is defined */
......
...@@ -20,9 +20,11 @@ ...@@ -20,9 +20,11 @@
/* Prints distribution of $nationalities, using $nationalitiescheck to render array */ /* Prints distribution of $nationalities, using $nationalitiescheck to render array */
<<set _percentPerPoint = 100.0 / hashSum($nationalities)>> <<set _percentPerPoint = 100.0 / hashSum($nationalities)>>
<<set _len = Object.keys($nationalitiescheck).length>> <<set _len = Object.keys($nationalitiescheck).length>>
<<set _j = 0>>
<<for _nation, _i range $nationalitiescheck>> <<for _nation, _i range $nationalitiescheck>>
_nation @@.orange;<<= ($nationalities[_nation] * _percentPerPoint).toFixed(2)>>%@@ _nation @@.orange;<<= ($nationalities[_nation] * _percentPerPoint).toFixed(2)>>%@@
<<if _len != 0>> | <</if>> <<set _j++>>
<<if _j < _len>> | <</if>>
<</for>> <</for>>
<<unset _percentPerPoint>> <<unset _percentPerPoint>>
<br><br> <br><br>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment