Skip to content
Browse files

make_halls: oops, don't try to make 0

  • Loading branch information...
1 parent 6ff4ab8 commit b25e9396bdb2bbab34926cd75c547e528d23db0f @ysth ysth committed Dec 27, 2012
Showing with 10 additions and 8 deletions.
  1. +10 −8 make_halls.pl
View
18 make_halls.pl
@@ -117,14 +117,16 @@
for my $recipe (@recipes) {
my $count = $possible{$recipe};
- print "Making $count halls with ".join(", ", @$recipe)."\n";
- my $result = eval { $client->glyph_assemble($body_id, $recipe, $count); };
- if (!$result) {
- warn "Couldn't assemble glyphs on $planets->{$body_id}: $@\n";
- } elsif ($result->{item_name} eq "Halls of Vrbansk") {
- $made{$body_id} += $count;
- } else {
- print "Failed to make halls!\n";
+ if ($count) {
+ print "Making $count halls with ".join(", ", @$recipe)."\n";
+ my $result = eval { $client->glyph_assemble($body_id, $recipe, $count); };
+ if (!$result) {
+ warn "Couldn't assemble glyphs on $planets->{$body_id}: $@\n";
+ } elsif ($result->{item_name} eq "Halls of Vrbansk") {
+ $made{$body_id} += $count;
+ } else {
+ print "Failed to make halls!\n";
+ }
}
}

0 comments on commit b25e939

Please sign in to comment.
Something went wrong with that request. Please try again.