diff --git a/example_config/chuni.yaml b/example_config/chuni.yaml index ca27fad..ce2f683 100644 --- a/example_config/chuni.yaml +++ b/example_config/chuni.yaml @@ -12,7 +12,18 @@ mods: # note: quanity is not refreshed on "continue" after set - only on subsequent login stock_tickets: stock_count: 99 - + + # Allow use of all available customization items in frontend web ui + # note: This effectively makes every available item appear to be in the user's inventory. It does _not_ override the "disableFlag" setting on individual items + # warning: This can result in pushing a lot of data, especially the userbox items. Recommended for local network use only. + forced_item_unlocks: + map_icons: False + system_voices: False + avatar_accessories: False + nameplates: False + trophies: False + character_icons: False + version: 11: rom: 2.00.00 diff --git a/titles/chuni/config.py b/titles/chuni/config.py index 51f819c..f0e15f3 100644 --- a/titles/chuni/config.py +++ b/titles/chuni/config.py @@ -65,6 +65,17 @@ class ChuniModsConfig: self.__config, "chuni", "mods", "stock_count", default=99 ) + def forced_item_unlocks(self, item: str) -> bool: + forced_item_unlocks = CoreConfig.get_config_field( + self.__config, "chuni", "mods", "forced_item_unlocks", default={} + ) + + if item not in forced_item_unlocks.keys(): + # default to no forced unlocks + return False + + return forced_item_unlocks[item] + class ChuniVersionConfig: def __init__(self, parent_config: "ChuniConfig") -> None: diff --git a/titles/chuni/frontend.py b/titles/chuni/frontend.py index 381c08c..a7f08c8 100644 --- a/titles/chuni/frontend.py +++ b/titles/chuni/frontend.py @@ -360,7 +360,9 @@ class ChuniFrontend(FE_Base): if rows: for row in rows: # Only include items that are either available by default or in the user unlocked list - if row["defaultHave"] or row["mapIconId"] in user_unlocked_items: + if row["defaultHave"] or \ + row["mapIconId"] in user_unlocked_items or \ + self.game_cfg.mods.forced_item_unlocks("map_icons"): item = dict() item["id"] = row["mapIconId"] item["name"] = row["name"] @@ -375,7 +377,9 @@ class ChuniFrontend(FE_Base): if rows: for row in rows: # Only include items that are either available by default or in the user unlocked list - if row["defaultHave"] or row["voiceId"] in user_unlocked_items: + if row["defaultHave"] or \ + row["voiceId"] in user_unlocked_items or \ + self.game_cfg.mods.forced_item_unlocks("system_voices"): item = dict() item["id"] = row["voiceId"] item["name"] = row["name"] @@ -390,7 +394,9 @@ class ChuniFrontend(FE_Base): if rows: for row in rows: # Only include items that are either available by default or in the user unlocked list - if row["defaultHave"] or row["nameplateId"] in user_unlocked_items: + if row["defaultHave"] or \ + row["nameplateId"] in user_unlocked_items or \ + self.game_cfg.mods.forced_item_unlocks("nameplates"): item = dict() item["id"] = row["nameplateId"] item["name"] = row["name"] @@ -405,7 +411,9 @@ class ChuniFrontend(FE_Base): if rows: for row in rows: # Only include items that are either available by default or in the user unlocked list - if row["defaultHave"] or row["trophyId"] in user_unlocked_items: + if row["defaultHave"] or \ + row["trophyId"] in user_unlocked_items or \ + self.game_cfg.mods.forced_item_unlocks("trophies"): item = dict() item["id"] = row["trophyId"] item["name"] = row["name"] @@ -420,7 +428,9 @@ class ChuniFrontend(FE_Base): if rows: for row in rows: # Only include items that are either available by default or in the user unlocked list - if row["defaultHave"] or row["characterId"] in user_unlocked_items: + if row["defaultHave"] or \ + row["characterId"] in user_unlocked_items or \ + self.game_cfg.mods.forced_item_unlocks("character_icons"): item = dict() item["id"] = row["characterId"] item["name"] = row["name"] @@ -435,7 +445,9 @@ class ChuniFrontend(FE_Base): if rows: for row in rows: # Only include items that are either available by default or in the user unlocked list - if row["defaultHave"] or row["avatarAccessoryId"] in user_unlocked_items: + if row["defaultHave"] or \ + row["avatarAccessoryId"] in user_unlocked_items or \ + self.game_cfg.mods.forced_item_unlocks("avatar_accessories"): item = dict() item["id"] = row["avatarAccessoryId"] item["name"] = row["name"]