ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/ext/jeweler.ext
(Generate patch)

Comparing deliantra/server/ext/jeweler.ext (file contents):
Revision 1.2 by root, Thu Dec 21 22:41:34 2006 UTC vs.
Revision 1.3 by elmex, Wed Jan 31 14:11:02 2007 UTC

152 my $c2 = $iring->calc_costs; 152 my $c2 = $iring->calc_costs;
153 153
154 my %keys; 154 my %keys;
155 my %cdiff; 155 my %cdiff;
156 for (keys %$c1, keys %$c2) { $keys{$_} = 1 } 156 for (keys %$c1, keys %$c2) { $keys{$_} = 1 }
157 for (keys %keys) { $cdiff{$_} = $c2->{$_} - $c1->{$_} } 157 for (keys %keys) { $cdiff{$_} = $c2->{$_} - $c1->{$_}; warn "$_: $c2->{$_} | $c1->{$_}\n"; }
158 158
159 unless (grep { $_ > 0 } values %cdiff) { 159 unless ($iring->is_better_than ($ringo)) {
160 $pl->message ("This plan doesn't improve anything, you find yourself puzzled about what you missed..."); 160 $pl->message ("This plan doesn't improve anything, you find yourself puzzled about what you missed...");
161 return; 161 return;
162 } 162 }
163 163
164 my $remcosts = $ingred->check_costs (\%cdiff); 164 my $remcosts = $ingred->check_costs (\%cdiff);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines