mirror of
https://github.com/freedoom/freedoom.git
synced 2025-09-02 16:25:47 -04:00
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:
parent
1891b5e40b
commit
2b49e3eabc
1 changed files with 5 additions and 1 deletions
|
@ -33,6 +33,8 @@
|
||||||
# that are generated, and the text to show in each one.
|
# that are generated, and the text to show in each one.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
import re
|
||||||
|
|
||||||
# Adjustments for character position based on character pairs. Some
|
# Adjustments for character position based on character pairs. Some
|
||||||
# pairs of characters can fit more snugly together, which looks more
|
# pairs of characters can fit more snugly together, which looks more
|
||||||
# visually appealing. This is highly dependent on the font graphics,
|
# 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:
|
if bexname not in bexdata:
|
||||||
raise Exception('Level name %s not defined in '
|
raise Exception('Level name %s not defined in '
|
||||||
'DEHACKED lump!' % bexname)
|
'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 e in range(4):
|
||||||
for m in range(9):
|
for m in range(9):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue