X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=scripts%2Fparseplanets.pl;h=8866435d7fcdb6adce037b71bebf2e632a7d5b90;hb=9a036ffed7e1b7aae37274f9963047c564db8be4;hp=9278fea56b39fd388ad13e0a90b67f6800562a4b;hpb=44d272d9a8cff54ec21b9fb07325a0c63a5b1121;p=ndwebbie.git diff --git a/scripts/parseplanets.pl b/scripts/parseplanets.pl index 9278fea..8866435 100755 --- a/scripts/parseplanets.pl +++ b/scripts/parseplanets.pl @@ -26,8 +26,6 @@ use local::lib; use DBI; use DBD::Pg qw(:pg_types); -use LWP::Simple; - use FindBin; use lib "$FindBin::Bin/../lib"; @@ -46,11 +44,11 @@ $dumps->execute($tick); if (@_ = $dumps->fetchrow){ $_ = $_[0]; $hour = (gmtime($_[1]))[2]; - my $planetid = $dbh->prepare(q{SELECT find_planet_id($1,$2,$3)}); - while (m/(\d+)\t(\d+)\t(\d+)\t\"(.*)\"\t\"(.*)\"\t(Ter|Cat|Zik|Xan|Etd)\t(\d+)\t(\d+)\t(\d+)\t(\d+)/g){ - $planetid->execute($5,$4,$6); + my $planetid = $dbh->prepare(q{SELECT find_planet_id($1,$2,$3,$4)}); + while (m/(\w+)\t(\d+)\t(\d+)\t(\d+)\t\"(.*)\"\t\"(.*)\"\t(Ter|Cat|Zik|Xan|Etd)\t(\d+)\t(\d+)\t(\d+)\t(\d+)/g){ + $planetid->execute($1,$6,$5,$7); my @id = $planetid->fetchrow; - push @planets,[$tick,$id[0],$1,$2,$3,$7,$8,$9,$10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]; + push @planets,[$tick,$id[0],$2,$3,$4,$8,$9,$10,$11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]; } }