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

Comparing deliantra/server/ext/cfplus_build.ext (file contents):
Revision 1.3 by root, Mon Jun 4 12:19:08 2007 UTC vs.
Revision 1.4 by elmex, Sat Jul 21 16:06:22 2007 UTC

22 22
23 (items => { 23 (items => {
24 map { 24 map {
25 my $arch = $_; 25 my $arch = $_;
26 my $buildarch = cf::arch::find ($arch->slaying); 26 my $buildarch = cf::arch::find ($arch->slaying);
27 my $h = { value => $arch->value, build_arch_name => $buildarch->name }; 27 my $h = { value => $arch->value, build_arch_name => $buildarch->archname };
28 28
29 if (((grep { $buildarch->type == $_ } @CONNECTABLE) > 0) 29 if (((grep { $buildarch->type == $_ } @CONNECTABLE) > 0)
30 || ($buildarch->name eq 'magic_mouth' && $buildarch->type == cf::SIGN)) { 30 || ($buildarch->archname eq 'magic_mouth' && $buildarch->type == cf::SIGN)) {
31 $h->{has_connection} = 1; 31 $h->{has_connection} = 1;
32 } 32 }
33 33
34 if (grep { $buildarch->type == $_ } @READABLE) { 34 if (grep { $buildarch->type == $_ } @READABLE) {
35 $h->{has_name} = 1; 35 $h->{has_name} = 1;
36 $h->{has_text} = 1; 36 $h->{has_text} = 1;
37 } 37 }
38 38
39 $arch->name => $h 39 $arch->archname => $h
40 } values %materials 40 } values %materials
41 }) 41 })
42}; 42};
43 43
44cf::register_extcmd builder_build => sub { 44cf::register_extcmd builder_build => sub {
164for (0 .. cf::arch::archetypes_size - 1) { 164for (0 .. cf::arch::archetypes_size - 1) {
165 my $farch = cf::arch::archetypes $_; 165 my $farch = cf::arch::archetypes $_;
166 166
167 if ($farch->type == cf::MATERIAL) { 167 if ($farch->type == cf::MATERIAL) {
168 if (cf::arch::find $farch->slaying) { 168 if (cf::arch::find $farch->slaying) {
169 $materials{$farch->name} = $farch; 169 $materials{$farch->archname} = $farch;
170 } else { 170 } else {
171 warn "Undefined build archetype '" . $farch->slaying . "' for build material '" . $farch->name . "'\n"; 171 warn "Undefined build archetype '" . $farch->slaying . "' for build material '" . $farch->archname . "'\n";
172 } 172 }
173 } 173 }
174} 174}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines