… | |
… | |
742 | @ARC = grep $_->{_name} !~ /^(?:type|class)_/, @ARC; |
742 | @ARC = grep $_->{_name} !~ /^(?:type|class)_/, @ARC; |
743 | |
743 | |
744 | print "generating plurals...\n" if $VERBOSE; |
744 | print "generating plurals...\n" if $VERBOSE; |
745 | generate_plurals; |
745 | generate_plurals; |
746 | |
746 | |
747 | print "writing archetypes...\n" if $VERBOSE; |
747 | printf "writing %d archetypes...\n", scalar @ARC if $VERBOSE; |
748 | open my $fh, ">:utf8", "$DATADIR/archetypes~" |
748 | open my $fh, ">:utf8", "$DATADIR/archetypes~" |
749 | or die "$DATADIR/archetypes~: $!"; |
749 | or die "$DATADIR/archetypes~: $!"; |
750 | print $fh Deliantra::archlist_to_string [sort { $a->{_name} cmp $b->{_name} } @ARC]; |
750 | print $fh Deliantra::archlist_to_string [sort { $a->{_name} cmp $b->{_name} } @ARC]; |
751 | } |
751 | } |
752 | |
752 | |
753 | { |
753 | { |
754 | print "writing treasures...\n" if $VERBOSE; |
754 | printf "writing treasures (%d octets)...\n", length $TRS if $VERBOSE; |
755 | open my $fh, ">:utf8", "$DATADIR/treasures~" |
755 | open my $fh, ">:utf8", "$DATADIR/treasures~" |
756 | or die "$DATADIR/treasures~: $!"; |
756 | or die "$DATADIR/treasures~: $!"; |
757 | print $fh $TRS; |
757 | print $fh $TRS; |
758 | } |
758 | } |
759 | |
759 | |
… | |
… | |
772 | } |
772 | } |
773 | |
773 | |
774 | delete $v->{arc}; |
774 | delete $v->{arc}; |
775 | } |
775 | } |
776 | |
776 | |
777 | print "writing facedata...\n" if $VERBOSE; |
777 | printf "writing facedata (%d faces, %d anims, %d resources)...\n", |
|
|
778 | scalar keys %FACEINFO, |
|
|
779 | scalar keys %ANIMINFO, |
|
|
780 | scalar keys %RESOURCE |
|
|
781 | if $VERBOSE; |
|
|
782 | |
778 | open my $fh, ">:perlio", "$DATADIR/facedata~" |
783 | open my $fh, ">:perlio", "$DATADIR/facedata~" |
779 | or die "$DATADIR/facedata~: $!"; |
784 | or die "$DATADIR/facedata~: $!"; |
780 | |
785 | |
781 | print $fh freeze { |
786 | print $fh freeze { |
782 | version => 2, |
787 | version => 2, |
783 | faceinfo => \%FACEINFO, |
788 | faceinfo => \%FACEINFO, |
784 | animinfo => \%ANIMINFO, |
789 | animinfo => \%ANIMINFO, |
785 | resource => \%RESOURCE, |
790 | resource => \%RESOURCE, |
786 | }; |
791 | }; |
|
|
792 | |
787 | } |
793 | } |
788 | |
794 | |
789 | print "committing files...\n" if $VERBOSE; |
795 | print "committing files...\n" if $VERBOSE; |
790 | |
796 | |
791 | for (qw(archetypes facedata treasures)) { |
797 | for (qw(archetypes facedata treasures)) { |