textgen: Strip map number from level name graphics.

The level name shown in the automap should be in the form:
"ExMy: Level Name" but for the intermission screen graphics we just
want "Level Name". Strip the leading level name if it is present.
This commit is contained in:
Simon Howard 2013-12-14 20:14:20 -05:00
parent 1891b5e40b
commit 2b49e3eabc

View file

@ -33,6 +33,8 @@
# that are generated, and the text to show in each one.
#
import re
# Adjustments for character position based on character pairs. Some
# pairs of characters can fit more snugly together, which looks more
# visually appealing. This is highly dependent on the font graphics,
@ -227,7 +229,9 @@ def update_from_bex(config, bexdata):
if bexname not in bexdata:
raise Exception('Level name %s not defined in '
'DEHACKED lump!' % bexname)
config[lumpname] = bexdata[bexname]
# Strip "MAP01: " or "E1M2: " etc. from start, if present:
levelname = re.sub('^\w*\d:\s*', '', bexdata[bexname])
config[lumpname] = levelname
for e in range(4):
for m in range(9):