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

Comparing deliantra/Deliantra/res2pm (file contents):
Revision 1.11 by elmex, Fri Aug 10 12:13:16 2007 UTC vs.
Revision 1.13 by elmex, Fri Mar 19 21:38:14 2010 UTC

1#!/opt/bin/perl 1#!/opt/bin/perl
2 2
3# usage: res2pm 3# usage: res2pm
4 4
5open STDOUT, ">:utf8", "Crossfire/Data.pm" 5open STDOUT, ">:utf8", "Deliantra/Data.pm"
6 or die "Crossfire/Data.pm: $!"; 6 or die "Deliantra/Data.pm: $!";
7 7
8print <<EOF; 8print <<EOF;
9=head1 NAME 9=head1 NAME
10 10
11Crossfire::Data - various data structures useful for understanding archs and objects 11Deliantra::Data - various data structures useful for understanding archs and objects
12 12
13=head1 13=head1
14 14
15THIS FILE IS AUTOGENERATED, DO NOT EDIT! 15THIS FILE IS AUTOGENERATED, DO NOT EDIT!
16 16
22 22
23See F<res/README> for more info. 23See F<res/README> for more info.
24 24
25=cut 25=cut
26 26
27package Crossfire::Data; 27package Deliantra::Data;
28 28
29EOF 29EOF
30 30
31use Data::Dumper; 31use Data::Dumper;
32use XML::Grove::Builder; 32use XML::Grove::Builder;
130 } elsif ($e->{Name} eq "ignore") { 130 } elsif ($e->{Name} eq "ignore") {
131 for my $i (grep $_->isa ('XML::Grove::Element'), @{$e->{Contents}}) { 131 for my $i (grep $_->isa ('XML::Grove::Element'), @{$e->{Contents}}) {
132 if ($i->{Name} eq "ignore_list") { 132 if ($i->{Name} eq "ignore_list") {
133 push @{$type->{ignore}}, $ignore_list{$i->{Attributes}->{name}} ||= []; 133 push @{$type->{ignore}}, $ignore_list{$i->{Attributes}->{name}} ||= [];
134 } elsif ($i->{Name} eq "attribute") { 134 } elsif ($i->{Name} eq "attribute") {
135 warn "ACDD $i->{Attributes}->{arch}\n";
135 push @{$type->{ignore}}, $i->{Attributes}->{arch}; 136 push @{$type->{ignore}}, [$i->{Attributes}->{arch}];
136 } 137 }
137 } 138 }
138 } elsif ($e->{Name} eq "import_type") { 139 } elsif ($e->{Name} eq "import_type") {
139 #push @{$type->{import}}, $type{$e->{Attributes}->{name}} ||= {}; 140 #push @{$type->{import}}, $type{$e->{Attributes}->{name}} ||= {};
140 push @{$type->{import}}, $e->{Attributes}->{name}; 141 push @{$type->{import}}, $e->{Attributes}->{name};

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines