1
0
mirror of synced 2025-02-13 00:44:33 +01:00

Added customization unlock overrides

This commit is contained in:
daydensteve 2024-11-03 19:12:49 -05:00
parent 626ce6bd96
commit f5205801a8
3 changed files with 41 additions and 7 deletions

View File

@ -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

View File

@ -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:

View File

@ -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"]