mirror of
https://github.com/enzet/map-machine.git
synced 2025-06-08 05:41:55 +02:00
Fix extra icon processing in wiki.
This commit is contained in:
parent
6add634596
commit
796ce70a59
1 changed files with 7 additions and 5 deletions
|
@ -109,7 +109,12 @@ def generate_new_text(
|
||||||
icon, _ = SCHEME.get_icon(
|
icon, _ = SCHEME.get_icon(
|
||||||
EXTRACTOR, table.collection.tags, processed, MapConfiguration()
|
EXTRACTOR, table.collection.tags, processed, MapConfiguration()
|
||||||
)
|
)
|
||||||
if icon.main_icon.is_default():
|
if not icon.main_icon.is_default():
|
||||||
|
wiki_text = (
|
||||||
|
f"[[Image:Röntgen {icon.main_icon.get_name()}.svg|32px]]\n"
|
||||||
|
)
|
||||||
|
icons.append(icon.main_icon)
|
||||||
|
elif icon.extra_icons:
|
||||||
wiki_text = (
|
wiki_text = (
|
||||||
f"Röntgen icon set has additional icon for the tag: "
|
f"Röntgen icon set has additional icon for the tag: "
|
||||||
f"[[Image:Röntgen {icon.extra_icons[0].get_name()}.svg|32px]]."
|
f"[[Image:Röntgen {icon.extra_icons[0].get_name()}.svg|32px]]."
|
||||||
|
@ -117,10 +122,7 @@ def generate_new_text(
|
||||||
)
|
)
|
||||||
icons.append(icon.extra_icons[0])
|
icons.append(icon.extra_icons[0])
|
||||||
else:
|
else:
|
||||||
wiki_text = (
|
wiki_text = ""
|
||||||
f"[[Image:Röntgen {icon.main_icon.get_name()}.svg|32px]]\n"
|
|
||||||
)
|
|
||||||
icons.append(icon.main_icon)
|
|
||||||
|
|
||||||
lines: list[str] = old_text.split("\n")
|
lines: list[str] = old_text.split("\n")
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue