From: Ian Jackson Date: Sat, 14 Nov 2009 15:55:59 +0000 (+0000) Subject: Commodity location in deciles X-Git-Tag: 6.0~5 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?p=ypp-sc-tools.main.git;a=commitdiff_plain;h=2aa3a575e41e6c9ed3b58e822dde0cf73502012b Commodity location in deciles --- diff --git a/yarrg/web/docs b/yarrg/web/docs index 5c058bd..0f62491 100755 --- a/yarrg/web/docs +++ b/yarrg/web/docs @@ -210,22 +210,25 @@ comes the initial letter of the category: @{ $getclasses->fetchall_arrayref() } %>.

-Then, if applicable, follows one of the following indications: -<% join ', ', map { "$_" } qw(tt t m b bb) %> -indicating whether the commodity is in the top, 2nd, middle, -2nd-to-last or bottom fifth of the list of commodities of the same -class, respectively. + +Then, if applicable, follows a number from 0 to +9 indicating roughly where the commodity is in the +list of commodities of the same class. The number indicates which +tenth of the list is: 0 for the first (top) tenth, +1 for the 2nd, and so on, up to 9 +for the final tenth. +

For example,

Fine pink cloth  
C t
+ title="Fine pink cloth is under Cloth, commodity 14 of 55">C 2
indicates that Fine pink cloth can be found under Cloth, -between 20% and 40% of the way down through the types of Cloth. +between 20% and 30% of the way down through the types of Cloth. If you mouseover that in a suitably equipped browser you should see the text:
@@ -233,7 +236,7 @@ Fine pink cloth is under Cloth, commodity 14 of 55

-The position indicator (tt, t, etc.) isn't shown for very small +The position indicator digit isn't shown for very small categories. The exact location of the commodity in the actual game diff --git a/yarrg/web/routetrade b/yarrg/web/routetrade index 72e9bf7..b5b5bf3 100644 --- a/yarrg/web/routetrade +++ b/yarrg/web/routetrade @@ -710,9 +710,9 @@ END $desc.= (sprintf ", commodity %d of %d", $incl, $maxpic); if ($classinfo->{'maxposinclass'} >= 8) { - my @tmbs= qw(tt t m b bb); + my @tmbs= qw(0 1 2 3 4 5 6 7 8 9); my $tmbi= ($incl+0.5)*$#tmbs/$maxpic; - $abbrev.= " ".$tmbs[$tmbi]; + $abbrev.= " ".$tmbs[$tmbi]." "; } } $$todo->{'posinclass'}=