… | |
… | |
158 | print "maps installed successfully.\n"; |
158 | print "maps installed successfully.\n"; |
159 | } |
159 | } |
160 | |
160 | |
161 | our @WALL_SUFFIX = qw(⬤ ╹ ╺ ┗ ╻ ┃ ┏ ┣ ╸ ┛ ━ ┻ ┓ ┫ ┳ ╋); |
161 | our @WALL_SUFFIX = qw(⬤ ╹ ╺ ┗ ╻ ┃ ┏ ┣ ╸ ┛ ━ ┻ ┓ ┫ ┳ ╋); |
162 | |
162 | |
|
|
163 | # used to create crude text glyphs for text-based clients |
163 | sub autoglyph { |
164 | sub autoglyph { |
164 | my ($stem, $face) = @_; |
165 | my ($stem, $face) = @_; |
165 | |
166 | |
166 | if ($stem =~ /^wall\/|Nimwall/) { |
167 | if ($stem =~ /^wall\/|Nimwall/) { |
167 | return $WALL_SUFFIX[hex $1] |
168 | return $WALL_SUFFIX[hex $1] |
168 | if $stem =~ /(_[0-9A-F]).x11/; |
169 | if $stem =~ /(_[0-9A-F]).x11/; |
169 | |
170 | |
|
|
171 | "█" |
|
|
172 | |
|
|
173 | } elsif ($stem =~ /^traps\//) { |
|
|
174 | "☠" |
|
|
175 | |
|
|
176 | } elsif ($stem =~ /^armour\/shield/) { |
|
|
177 | "Ø" |
|
|
178 | |
|
|
179 | } elsif ($stem =~ /^armour\//) { |
170 | "+" |
180 | "A" |
171 | |
181 | |
|
|
182 | } elsif ($stem =~ /^weapon\//) { |
|
|
183 | "†" |
|
|
184 | |
|
|
185 | } elsif ($stem =~ /^readable\//) { |
|
|
186 | "✉" |
|
|
187 | |
172 | } elsif ($stem =~ /^monster.*\/(.)/) { |
188 | } elsif ($stem =~ /^river\//) { |
173 | $1 |
189 | "~" |
174 | |
190 | |
175 | } elsif ($stem =~ /^floor\/|^ground\/|Nimfloor/) { |
191 | } elsif ($stem =~ /^floor\/|^ground\/|Nimfloor/) { |
|
|
192 | "·" |
|
|
193 | |
|
|
194 | } elsif ($stem =~ /^spells\//) { |
176 | "." |
195 | "!" |
177 | |
196 | |
178 | } elsif ($stem =~ /^player\//) { |
197 | } elsif ($stem =~ /^player\//) { |
179 | "\@" |
198 | "\@" |
|
|
199 | |
|
|
200 | } elsif ($stem =~ /^(?:monster|misc|class|connect|gods|indoor|inorganic|mining|music|skills).*\/(.)/) { |
|
|
201 | $1 |
180 | |
202 | |
181 | } else { |
203 | } else { |
182 | substr $stem, 0, 1 |
204 | substr $stem, 0, 1 |
183 | } |
205 | } |
184 | } |
206 | } |