ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/utils/cfutil.in
(Generate patch)

Comparing deliantra/server/utils/cfutil.in (file contents):
Revision 1.73 by root, Mon Oct 26 11:31:39 2009 UTC vs.
Revision 1.77 by root, Tue Nov 3 23:44:21 2009 UTC

1#!@PERL@ 1#!@PERL@
2
3#
4# This file is part of Deliantra, the Roguelike Realtime MMORPG.
5#
6# Copyright (©) 2007,2008,2009 Marc Alexander Lehmann / Robin Redeker / the Deliantra team
7#
8# Deliantra is free software: you can redistribute it and/or modify it under
9# the terms of the Affero GNU General Public License as published by the
10# Free Software Foundation, either version 3 of the License, or (at your
11# option) any later version.
12#
13# This program is distributed in the hope that it will be useful,
14# but WITHOUT ANY WARRANTY; without even the implied warranty of
15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16# GNU General Public License for more details.
17#
18# You should have received a copy of the Affero GNU General Public License
19# and the GNU General Public License along with this program. If not, see
20# <http://www.gnu.org/licenses/>.
21#
22# The authors can be reached via e-mail to <support@deliantra.net>
23#
2 24
3use strict; 25use strict;
4 26
5my $prefix = "@prefix@"; 27my $prefix = "@prefix@";
6my $exec_prefix = "@exec_prefix@"; 28my $exec_prefix = "@exec_prefix@";
383 push @ARC, $o; 405 push @ARC, $o;
384 for (my $m = $o; $m; $m = $m->{more}) { 406 for (my $m = $o; $m; $m = $m->{more}) {
385 $ARC{$m->{_name}} = $m; 407 $ARC{$m->{_name}} = $m;
386 } 408 }
387 409
388 $o->{editor_folder} = $dir; 410 $o->{editor_folder} ||= "\x00$dir"; # horrible kludge
389 411
390 my $visibility = delete $o->{visibility}; 412 my $visibility = delete $o->{visibility};
391 my $magicmap = delete $o->{magicmap}; 413 my $magicmap = delete $o->{magicmap};
392 414
393 # find upper left corner :/ 415 # find upper left corner :/
607 } 629 }
608 630
609 sub generate_plurals { 631 sub generate_plurals {
610# use Lingua::EN::Inflect (); 632# use Lingua::EN::Inflect ();
611# Lingua::EN::Inflect::classical; 633# Lingua::EN::Inflect::classical;
612# Lingua::EN::Inflect::def_noun 'talisman' => 'talismans'; 634# Lingua::EN::Inflect::def_noun '(.*)staff' => '$1staves'; # policy
613# Lingua::EN::Inflect::def_noun '(.*)boots' => '$1boots'; # hack 635# Lingua::EN::Inflect::def_noun '(.*)boots' => '$1boots'; # hack
614# 636#
615# for my $a (@ARC) { 637# for my $a (@ARC) {
616# my $name = $a->{name} || $a->{_name}; 638# my $name = $a->{name} || $a->{_name};
617# 639#
618# next unless $a->{name_pl}; 640# next unless $a->{name_pl};
619# 641# next if $a->{invisible};
642# next if $a->{is_floor};
643# next if $a->{no_pick};
620# 644#
621# my $test = Lingua::EN::Inflect::PL_N_eq $name, Lingua::EN::Inflect::PL $name; 645# my $test = Lingua::EN::Inflect::PL_N_eq $name, Lingua::EN::Inflect::PL $name;
622# my $pl = $test =~ /^(?:eq|p:.)$/ 646# my $pl = $test =~ /^(?:eq|p:.)$/
623# ? $name 647# ? $name
624# : Lingua::EN::Inflect::PL $name; 648# : Lingua::EN::Inflect::PL $name;
625# die "$test $pl" if $pl =~ /bootss/;#d#
626# 649#
627# if ($pl ne $a->{name_pl}) { 650# if ($pl ne $a->{name_pl}) {
628# warn "$a->{_name}: plural differs, $pl vs $a->{name_pl}\n"; 651# warn "$a->{_name}: plural differs, $pl vs $a->{name_pl}\n";
629# } 652# }
630# } 653# }
676 $_->join for (@a_trs, @a_res, @a_png); 699 $_->join for (@a_trs, @a_res, @a_png);
677 700
678 print "scanning done, processing results...\n" if $VERBOSE; 701 print "scanning done, processing results...\n" if $VERBOSE;
679 { 702 {
680 # remove path prefix from editor_folder 703 # remove path prefix from editor_folder
704 $_->{editor_folder} =~ /^\x00/
681 substr $_->{editor_folder}, 0, 1 + length $path, "" 705 and substr $_->{editor_folder}, 0, 2 + length $path, ""
682 for values %ARC; 706 for values %ARC;
683 707
684 print "resolving inheritance tree...\n" if $VERBOSE; 708 print "resolving inheritance tree...\n" if $VERBOSE;
685 # resolve inherit 709 # resolve inherit
686 while () { 710 while () {
687 my $progress; 711 my $progress;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines