From: Ian Jackson Date: Mon, 18 May 2009 00:53:38 +0000 (+0100) Subject: remove parser for ship info from notes file (@-thing) X-Git-Tag: 1.0~18 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?p=ypp-sc-tools.db-test.git;a=commitdiff_plain;h=52a268380c60676abe8960c7f6f0659c59eb71ea remove parser for ship info from notes file (@-thing) --- diff --git a/ypp-restock-rum b/ypp-restock-rum index b76d1c4..a879150 100755 --- a/ypp-restock-rum +++ b/ypp-restock-rum @@ -249,35 +249,6 @@ sub compute_restock_requirements () { if ($ship =~ m/^\d+/) { $need{Fine} = $ship; } else { - $ship =~ y/_/ /; - open F, "/home/ian/private/puzzle-pirates" or die $!; - my $this_ship= 0; - my $the_ship; - while () { - if (!m/\S/ || m/^\s*\#/) { - $this_ship= 0; - next; - } - if (!m/^\@/) { - next; - } - if (m/^\@(( [A-Z][-a-z]+){2,})\s*$/) { - $this_ship= (uc $1 eq uc " $ship" or - uc $+ eq uc " $ship"); - $the_ship= $1; - next; - } - next unless $this_ship; - if (m/^\@\s+(\d+)\s+fine\s*/) { - $need{Fine} = $1; - last; - } - } - die $! if F->error; - die "unknown ship $ship" unless defined $need{Fine}; - if (defined $ship) { - pr1("vessel",$the_ship); - } } pr1('desired stock level', sprintf("%4d fine rum", $need{Fine}));