Exemplo n.º 1
0
    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)
Exemplo n.º 2
0
    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
Exemplo n.º 3
0
    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")
Exemplo n.º 4
0
    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")
Exemplo n.º 5
0
    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")
Exemplo n.º 6
0
    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")
Exemplo n.º 7
0
    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")
Exemplo n.º 8
0
    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")
Exemplo n.º 9
0
    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")
Exemplo n.º 10
0
    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")
Exemplo n.º 11
0
    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")
Exemplo n.º 12
0
    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")
Exemplo n.º 13
0
    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")
Exemplo n.º 14
0
    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")
Exemplo n.º 15
0
    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")
Exemplo n.º 16
0
    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")
Exemplo n.º 17
0
    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")
Exemplo n.º 18
0
    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")
Exemplo n.º 19
0
    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")
Exemplo n.º 20
0
    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")
Exemplo n.º 21
0
    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")
Exemplo n.º 22
0
    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")
Exemplo n.º 23
0
    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")
Exemplo n.º 24
0
    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")
Exemplo n.º 25
0
    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")
Exemplo n.º 26
0
    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")
Exemplo n.º 27
0
    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")
Exemplo n.º 28
0
    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")
Exemplo n.º 29
0
    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")
Exemplo n.º 30
0
    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")