def Compile(self: Any) -> None: """Compile the Battle Pass XAssets for the COD Tracker Database.""" dbPasses: List[Dict[str, Any]] = [] passes: List[Dict[str, Any]] = Utility.ReadFile( self, f"{self.eXAssets}/battlePasses.json") for battlePass in passes: if battlePass.get("name") is None: continue items: List[Dict[str, Any]] = [] for item in battlePass.get("items"): item.pop("type") item.pop("billboard") items.append(item) dbPasses.append(battlePass) self.count += 1 Utility.WriteFile( self, f"{self.eDatabase}/battlePasses.json", dbPasses, compress=True, ) Utility.WriteFile(self, f"{self.eDatabase}/_battlePasses.json", dbPasses)
def DiffStore(self: Any, store: Dict[str, Any]) -> bool: """ Determine if the Modern Warfare and Warzone Store has updated since the last time the application was ran. """ apiHash: str = store.get("hash") if Utility.FileExists(self, "latest.txt") is False: Utility.WriteFile(self, "latest.txt", apiHash) log.warning("No local Store hash found, created it") return False localHash: str = Utility.ReadFile(self, "latest.txt") if localHash == apiHash: log.info( "The Store has not updated, the local hash matches the API hash" ) return False else: return True
def Compile(self: Any) -> None: """Compile the Game Type XAssets.""" types: List[Dict[str, Any]] = [] types = GameTypes.Table(self, types) Utility.WriteFile(self, f"{self.eXAssets}/gameTypes.json", types) log.info(f"Compiled {len(types):,} Game Types")
def Compile(self: Any) -> None: """Compile the Bundle XAssets.""" bundles: List[Dict[str, Any]] = [] bundles = Bundles.IDs(self, bundles) Utility.WriteFile(self, f"{self.eXAssets}/bundles.json", bundles) log.info(f"Compiled {len(bundles):,} Bundles")
def Compile(self: Any) -> None: """Compile the Item Source XAssets.""" sources: List[Dict[str, Any]] = [] sources = ItemSources.Table(self, sources) Utility.WriteFile(self, f"{self.eXAssets}/itemSources.json", sources) log.info(f"Compiled {len(sources):,} Item Sources")
def Compile(self: Any) -> None: """Compile the Feature XAssets.""" features: List[Dict[str, Any]] = [] features = Features.IDs(self, features) Utility.WriteFile(self, f"{self.eXAssets}/features.json", features) log.info(f"Compiled {len(features):,} Features")
def Compile(self: Any) -> None: """Compile the Map XAssets.""" maps: List[Dict[str, Any]] = [] maps = Maps.Table(self, maps) Utility.WriteFile(self, f"{self.eXAssets}/maps.json", maps) log.info(f"Compiled {len(maps):,} Maps")
def Compile(self: Any) -> None: """Compile the Vehicle XAssets.""" vehicles: List[Dict[str, Any]] = [] vehicles = Vehicles.Table(self, vehicles) Utility.WriteFile(self, f"{self.eXAssets}/vehicles.json", vehicles) log.info(f"Compiled {len(vehicles):,} Vehicles")
def Compile(self: Any) -> None: """Compile the Splash XAssets.""" splashes: List[Dict[str, Any]] = [] splashes = Splashes.Table(self, splashes) Utility.WriteFile(self, f"{self.eXAssets}/splashes.json", splashes) log.info(f"Compiled {len(splashes):,} Splashes")
def Compile(self: Any) -> None: """Compile the Mission Item XAssets.""" items: List[Dict[str, Any]] = [] items = MissionItems.IDs(self, items) Utility.WriteFile(self, f"{self.eXAssets}/missionItems.json", items) log.info(f"Compiled {len(items):,} Mission Items")
def Compile(self: Any) -> None: """Compile the Quip XAssets.""" quips: List[Dict[str, Any]] = [] quips = Quips.IDs(self, quips) quips = Quips.Table(self, quips) Utility.WriteFile(self, f"{self.eXAssets}/operatorQuips.json", quips) log.info(f"Compiled {len(quips):,} Operator Quips")
def Compile(self: Any) -> None: """Compile the Weekly Multiplayer Challenges XAssets.""" challenges: List[Dict[str, Any]] = [] challenges = WeeklyChallengesMP.Table(self, challenges) Utility.WriteFile(self, f"{self.eXAssets}/weeklyChallengesMP.json", challenges) log.info(f"Compiled {len(challenges):,} Weekly Multiplayer Challenges")
def Compile(self: Any) -> None: """Compile the Execution XAssets.""" executions: List[Dict[str, Any]] = [] executions = Executions.IDs(self, executions) executions = Executions.Table(self, executions) Utility.WriteFile(self, f"{self.eXAssets}/executions.json", executions) log.info(f"Compiled {len(executions):,} Executions")
def Compile(self: Any) -> None: """Compile the Consumable XAssets.""" consumables: List[Dict[str, Any]] = [] consumables = Consumables.IDs(self, consumables) Utility.WriteFile(self, f"{self.eXAssets}/consumables.json", consumables) log.info(f"Compiled {len(consumables):,} Consumables")
def Compile(self: Any) -> None: """Compile the Officer Challenge XAssets.""" challenges: List[Dict[str, Any]] = [] challenges = OfficerChallenges.Table(self, challenges) Utility.WriteFile(self, f"{self.eXAssets}/officerChallenges.json", challenges) log.info(f"Compiled {len(challenges):,} Officer Challenges")
def Compile(self: Any) -> None: """Compile the Vehicle Track XAssets.""" tracks: List[Dict[str, Any]] = [] tracks = VehicleTracks.IDs(self, tracks) tracks = VehicleTracks.Table(self, tracks) Utility.WriteFile(self, f"{self.eXAssets}/vehicleTracks.json", tracks) log.info(f"Compiled {len(tracks):,} Vehicle Tracks")
def Compile(self: Any) -> None: """Compile the Charm XAssets.""" charms: List[Dict[str, Any]] = [] charms = Charms.IDs(self, charms) charms = Charms.Table(self, charms) Utility.WriteFile(self, f"{self.eXAssets}/charms.json", charms) log.info(f"Compiled {len(charms):,} Charms")
def Compile(self: Any) -> None: """Compile the Miscellaneous Challenges XAssets.""" challenges: List[Dict[str, Any]] = [] challenges = MiscellaneousChallenges.Table(self, challenges) Utility.WriteFile(self, f"{self.eXAssets}/miscChallenges.json", challenges) log.info(f"Compiled {len(challenges):,} Miscellaneous Challenges")
def Compile(self: Any) -> None: """Compile the Tomogunchi Turbo Challenges XAssets.""" challenges: List[Dict[str, Any]] = [] challenges = TurboChallenges.Table(self, challenges) Utility.WriteFile(self, f"{self.eXAssets}/turboChallenges.json", challenges) log.info(f"Compiled {len(challenges):,} Tomogunchi Turbo Challenges")
def Compile(self: Any) -> None: """Compile the Killstreak XAssets.""" streaks: List[Dict[str, Any]] = [] streaks = Killstreaks.IDs(self, streaks) streaks = Killstreaks.Table(self, streaks) Utility.WriteFile(self, f"{self.eXAssets}/killstreaks.json", streaks) log.info(f"Compiled {len(streaks):,} Killstreaks")
def Compile(self: Any) -> None: """Compile the Gesture XAssets.""" gestures: List[Dict[str, Any]] = [] gestures = Gestures.IDs(self, gestures) gestures = Gestures.Table(self, gestures) Utility.WriteFile(self, f"{self.eXAssets}/gestures.json", gestures) log.info(f"Compiled {len(gestures):,} Gestures")
def Compile(self: Any) -> None: """Compile the Vehicle Horn XAssets.""" horns: List[Dict[str, Any]] = [] horns = VehicleHorns.IDs(self, horns) horns = VehicleHorns.Table(self, horns) Utility.WriteFile(self, f"{self.eXAssets}/vehicleHorns.json", horns) log.info(f"Compiled {len(horns):,} Vehicle Horns")
def Compile(self: Any) -> None: """Compile the Weapon Unlock Challenge XAssets.""" challenges: List[Dict[str, Any]] = [] challenges = WeaponUnlockChallenges.Table(self, challenges) Utility.WriteFile(self, f"{self.eXAssets}/weaponUnlockChallenges.json", challenges) log.info(f"Compiled {len(challenges):,} Weapon Unlock Challenges")
def Compile(self: Any) -> None: """Compile the Sticker XAssets.""" stickers: List[Dict[str, Any]] = [] stickers = Stickers.IDs(self, stickers) stickers = Stickers.Table(self, stickers) Utility.WriteFile(self, f"{self.eXAssets}/stickers.json", stickers) log.info(f"Compiled {len(stickers):,} Weapon Stickers")
def Compile(self: Any) -> None: """Compile the Skin XAssets.""" skins: List[Dict[str, Any]] = [] skins = Skins.IDs(self, skins) skins = Skins.Table(self, skins) Utility.WriteFile(self, f"{self.eXAssets}/operatorSkins.json", skins) log.info(f"Compiled {len(skins):,} Operator Skins")
def Compile(self: Any) -> None: """Compile the Emblem XAssets.""" emblems: List[Dict[str, Any]] = [] emblems = Emblems.IDs(self, emblems) emblems = Emblems.Table(self, emblems) Utility.WriteFile(self, f"{self.eXAssets}/emblems.json", emblems) log.info(f"Compiled {len(emblems):,} Emblems")
def Compile(self: Any) -> None: """Compile the Equipment XAssets.""" equipment: List[Dict[str, Any]] = [] equipment = Equipment.IDs(self, equipment) equipment = Equipment.Table(self, equipment) Utility.WriteFile(self, f"{self.eXAssets}/equipment.json", equipment) log.info(f"Compiled {len(equipment):,} Equipment")
def Compile(self: Any) -> None: """Compile the Camo XAssets.""" camos: List[Dict[str, Any]] = [] camos = Camos.IDs(self, camos) camos = Camos.Table(self, camos) Utility.WriteFile(self, f"{self.eXAssets}/camos.json", camos) log.info(f"Compiled {len(camos):,} Camos")
def Compile(self: Any) -> None: """Compile the Mission XAssets.""" missions: List[Dict[str, Any]] = [] missions = Missions.QuestTable(self, missions) missions = Missions.IntelTable(self, missions) Utility.WriteFile(self, f"{self.eXAssets}/missions.json", missions) log.info(f"Compiled {len(missions):,} Missions")
def Compile(self: Any) -> None: """Compile the Accessory XAssets.""" accessories: List[Dict[str, Any]] = [] accessories = Accessories.IDs(self, accessories) accessories = Accessories.Table(self, accessories) Utility.WriteFile(self, f"{self.eXAssets}/accessories.json", accessories) log.info(f"Compiled {len(accessories):,} Accessories")