forked from rDrama/rDrama
1
0
Fork 0

allow PCM and WPD users to opt into event music

master
Aevann1 2022-12-20 05:52:00 +02:00
parent 59738f5701
commit d17cfbf323
2 changed files with 3 additions and 1 deletions

View File

@ -1144,4 +1144,4 @@ class User(Base):
@property
@lazy
def can_toggle_event_music(self):
return self.has_badge(91)
return SITE_NAME != 'rDrama' or self.has_badge(91)

View File

@ -1,6 +1,7 @@
from sqlalchemy import inspect
from files.helpers.config.awards import AWARDS, AWARDS_ENABLED, AWARDS_DISABLED
from files.helpers.config.const import SITE_NAME
from files.__main__ import engine
from files.events.classes import *
@ -19,6 +20,7 @@ def _populate_awards():
AWARDS_ENABLED.update(temp)
for award in EVENT_AWARDS:
if award == 'grinch' and SITE_NAME != 'rDrama': continue
EVENT_AWARDS[award]['ghost'] = EVENT_AWARDS[award]['cosmetic']
if award in AWARDS_DISABLED:
AWARDS_DISABLED.remove(award)