From 52a268380c60676abe8960c7f6f0659c59eb71ea Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Mon, 18 May 2009 01:53:38 +0100 Subject: [PATCH] remove parser for ship info from notes file (@-thing) --- ypp-restock-rum | 29 ----------------------------- 1 file changed, 29 deletions(-) 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})); -- 2.30.2