mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 12:11:33 -06:00
LADX: Swap out invalid characters in item names (#4495)
This commit is contained in:
@@ -2,6 +2,10 @@ import typing
|
||||
from ..checkMetadata import checkMetadataTable
|
||||
from .constants import *
|
||||
|
||||
custom_name_replacements = {
|
||||
'"':"'",
|
||||
'_':' ',
|
||||
}
|
||||
|
||||
class ItemInfo:
|
||||
MULTIWORLD = True
|
||||
@@ -23,6 +27,11 @@ class ItemInfo:
|
||||
def setLocation(self, location):
|
||||
self._location = location
|
||||
|
||||
def setCustomItemName(self, name):
|
||||
for key, val in custom_name_replacements.items():
|
||||
name = name.replace(key, val)
|
||||
self.custom_item_name = name
|
||||
|
||||
def getOptions(self):
|
||||
return self.OPTIONS
|
||||
|
||||
|
@@ -439,7 +439,7 @@ class LinksAwakeningWorld(World):
|
||||
# Otherwise, use a cute letter as the icon
|
||||
elif self.options.foreign_item_icons == 'guess_by_name':
|
||||
loc.ladxr_item.item = self.guess_icon_for_other_world(loc.item)
|
||||
loc.ladxr_item.custom_item_name = loc.item.name
|
||||
loc.ladxr_item.setCustomItemName(loc.item.name)
|
||||
|
||||
else:
|
||||
if loc.item.advancement:
|
||||
|
Reference in New Issue
Block a user