chiark / gitweb /
move into misc-data.pl: HS1 texts
[pandemic-rising-tide.git] / generate-board
index 97047ddd73d51081c079bf28ed9e9f33965a386e..484c6492e0fd5e7e3464d895969afc229ff06a59 100755 (executable)
@@ -934,8 +934,14 @@ sub dykes(){
 }
 
 sub hs_initial_1 ($;$$$) {
-  my ($colour, $text, $text2, $fn) = @_;
+  my ($colour, $fn) = @_;
   my $hs1 = $c{HS1}{$colour};
+  my ($text, $text2);
+  if ($hs1->{Water}) {
+    ($text,$text2) = ('up to '.$hs1->{Water}, 'fewer');
+  } elsif ($hs1->{Dykes}) {
+    ($text,$text2) = ('up to '.$hs1->{Dykes}, '');
+  }
   my $interval = $hs_sz * 1.75;
   my $demo_h = $hs_sz; #water_cubes_sz(3);
   my $demo_x0 = $hs_sz * 0.75 + $dyke_l * 0.60;
@@ -966,12 +972,12 @@ sub hs_initial_1 ($;$$$) {
 sub hs_initial () {
   hs_initial_1('red');
   hs_initial_1('purple');
-  hs_initial_1('green', 'up to 6', 'fewer', sub {
+  hs_initial_1('green', sub {
     o("    ",(water_cubes_sz(1))," 0 translate\n");
     o("    0 ",(-water_cubes_sz(1) * 0.3)," translate\n");
     water_cubes(1, miscpscolour('edge'));
   });
-  hs_initial_1('yellow', 'up to 4', '', sub {
+  hs_initial_1('yellow', sub {
     o("    newpath dykepath\n");
     o("    gsave ",miscpscolour('edge')," stroke grestore\n");
     o("    gsave ",miscpscolour('dykehsadd')," fill grestore\n");