ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/Deliantra/Deliantra.pm
(Generate patch)

Comparing deliantra/Deliantra/Deliantra.pm (file contents):
Revision 1.60 by root, Mon Mar 27 17:23:35 2006 UTC vs.
Revision 1.61 by root, Mon Mar 27 17:38:18 2006 UTC

431 my $type = $obj->{type} || $arch->{type}; 431 my $type = $obj->{type} || $arch->{type};
432 432
433 if ($type > 0) { 433 if ($type > 0) {
434 $root = $Crossfire::Data::ATTR{$type}; 434 $root = $Crossfire::Data::ATTR{$type};
435 } else { 435 } else {
436 my %a = (%$arch, %$obj);
437
438 if ($a{is_floor} && !$a{alive}) {
439 $root = $Crossfire::Data::TYPE{Floor};
440 } elsif (!$a{is_floor} && $a{alive} && !$a{tear_down}) {
441 $root = $Crossfire::Data::TYPE{"Monster & NPC"};
442 } elsif (!$a{is_floor} && !$a{alive} && $a{move_block}) {
443 $root = $Crossfire::Data::TYPE{Wall};
444 } elsif (!$a{is_floor} && $a{alive} && $a{tear_down}) {
445 $root = $Crossfire::Data::TYPE{"Weak Wall"};
446 } else {
436 $root = $Crossfire::Data::TYPE{Misc}; 447 $root = $Crossfire::Data::TYPE{Misc};
437
438 type:
439 for (@Crossfire::Data::ATTR0) {
440 my $req = $_->{required}
441 or die "internal error: ATTR0 without 'required'";
442
443 keys %$req;
444 while (my ($k, $v) = each %$req) {
445 next type
446 unless $obj->{$k} == $v || $arch->{$k} == $v;
447 }
448
449 $root = $_;
450 } 448 }
451 } 449 }
452 450
453 my @import = ($root); 451 my @import = ($root);
454 452

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines