… | |
… | |
154 | "--exclude", "CVS", "--exclude", "/world-precomposed", |
154 | "--exclude", "CVS", "--exclude", "/world-precomposed", |
155 | "--delete", "--delete-excluded" |
155 | "--delete", "--delete-excluded" |
156 | and die "map installation failed.\n"; |
156 | and die "map installation failed.\n"; |
157 | |
157 | |
158 | print "maps installed successfully.\n"; |
158 | print "maps installed successfully.\n"; |
|
|
159 | } |
|
|
160 | |
|
|
161 | sub autoglyph { |
|
|
162 | my ($stem, $face) = @_; |
|
|
163 | |
|
|
164 | if ($stem =~ /^wall\/|Nimwall/) { |
|
|
165 | # warn $stem; |
|
|
166 | "+" |
|
|
167 | } elsif ($stem =~ /^floor\/|^ground\/|Nimfloor/) { |
|
|
168 | "." |
|
|
169 | } else { |
|
|
170 | substr $stem, 0, 1 |
|
|
171 | } |
159 | } |
172 | } |
160 | |
173 | |
161 | { |
174 | { |
162 | our %ANIMINFO; |
175 | our %ANIMINFO; |
163 | our %FACEINFO; |
176 | our %FACEINFO; |
… | |
… | |
801 | |
814 | |
802 | #length $v->{data32} <= 10000 or warn "$k: face32 larger than 10000 bytes, will not work with crossfire client.\n"; |
815 | #length $v->{data32} <= 10000 or warn "$k: face32 larger than 10000 bytes, will not work with crossfire client.\n"; |
803 | #length $v->{data64} <= 10000 or warn "$k: face64 larger than 10000 bytes.\n"; |
816 | #length $v->{data64} <= 10000 or warn "$k: face64 larger than 10000 bytes.\n"; |
804 | |
817 | |
805 | my $stem = delete $v->{stem}; |
818 | my $stem = delete $v->{stem}; |
806 | $v->{glyph} //= substr $stem, 0, 1; |
819 | $v->{glyph} //= autoglyph $stem, $v; |
807 | |
820 | |
808 | if (my $magicmap = $v->{magicmap}) { |
821 | if (my $magicmap = $v->{magicmap}) { |
809 | $magicmap =~ y/A-Z_\-/a-z/d; |
822 | $magicmap =~ y/A-Z_\-/a-z/d; |
810 | $v->{magicmap} = $COLOR{$magicmap}; |
823 | $v->{magicmap} = $COLOR{$magicmap}; |
811 | } |
824 | } |