Add "IRL" as another special game, that can be earned anywhere
This commit is contained in:
1 parent
d7446a7692
commit
b5e199301e
3 files changed
+5
-5
No files matched your search
+1
-1
@@ -462,7 +462,7 @@ class DropsCampaign:
|
||||
and (
|
||||
ignore_channel_status
|
||||
or channel.game is not None and channel.game == self.game
|
||||
or self.game.is_special_events()
|
||||
or self.game.is_special()
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -993,7 +993,7 @@ class Twitch:
|
||||
and channel.drops_enabled
|
||||
and channel.game in self.wanted_games
|
||||
# let the campaign ignore all channel-related checks
|
||||
or campaign.game.is_special_events()
|
||||
or campaign.game.is_special()
|
||||
)
|
||||
):
|
||||
return True
|
||||
|
||||
@@ -419,7 +419,7 @@ class AwaitableValue(Generic[_T]):
|
||||
|
||||
|
||||
class Game:
|
||||
SPECIAL_EVENTS_GAME_ID: int = 509663
|
||||
SPECIAL_GAME_IDS: set[int] = {509663, 509672}
|
||||
|
||||
def __init__(self, data: JsonType):
|
||||
self.id: int = int(data["id"])
|
||||
@@ -454,5 +454,5 @@ class Game:
|
||||
slug_text = re.sub(r'-{2,}', '-', slug_text.strip('-'))
|
||||
return slug_text
|
||||
|
||||
def is_special_events(self) -> bool:
|
||||
return self.id == self.SPECIAL_EVENTS_GAME_ID
|
||||
def is_special(self) -> bool:
|
||||
return self.id in self.SPECIAL_GAME_IDS
|
||||
Reference in new issue
Block a user