--- deliantra/server/ext/jeweler.ext 2007/07/31 09:40:15 1.12 +++ deliantra/server/ext/jeweler.ext 2007/12/17 08:03:22 1.15 @@ -1,9 +1,9 @@ #! perl -use Data::Dumper; +use strict; + use Jeweler; use List::Util qw/max min sum/; -use strict; sub ingred_alias { my ($ing) = @_; @@ -114,9 +114,6 @@ $ring->power_to_level, $exp, $make_status; warn "$make_info\n" if $make_status eq 'succeeded'; - - $ring_ob->set_ob_key_value (ext_jeweler_made_by => $pl->name); - $ring_ob->set_ob_key_value (ext_jeweler_make_info => $make_info); } $chdl->put ($ring_ob); @@ -214,16 +211,15 @@ if ($plan) { my @ring = $ingred->get_ring; - if ((@ring > 1) || ($ring[0]->nrof > 1)) { - # actually the algorithm cant handle more than one improvement at a time - $pl->message ("You can't manage to improve more than one thing at a time!"); - return; - - } elsif (@ring < 1) { + if (!@ring) { # actually the algorithm cant $pl->message ("You slap yourself, you forgot the jewelery!"); return; + } elsif ((@ring > 1) || (grep { $_->nrof > 1 } @ring)) { + # actually the algorithm cant handle more than one improvement at a time + $pl->message ("You can't manage to improve more than one thing at a time!"); + return; } else { my $ringo = Jeweler::Object->new (object => $ring[0]); my $iring = $ingred->improve_ring_by_plan ($plan, $ringo); @@ -275,5 +271,5 @@ } ); -Jeweler::read_config "$DATADIR/jeweler.yaml"; +Jeweler::read_config "res/jeweler.yaml";