diff --git a/db.py b/db.py index dc74a650..bccbd204 100644 --- a/db.py +++ b/db.py @@ -904,31 +904,31 @@ class Halloween(Base): def pieces_completed(self) -> int: count = 0 - if puzzle_piece_a is not None: + if self.puzzle_piece_a is not None: count += 1 - if puzzle_piece_b is not None: + if self.puzzle_piece_b is not None: count += 1 - if puzzle_piece_c is not None: + if self.puzzle_piece_c is not None: count += 1 - if puzzle_piece_d is not None: + if self.puzzle_piece_d is not None: count += 1 - if puzzle_piece_e is not None: + if self.puzzle_piece_e is not None: count += 1 - if puzzle_piece_f is not None: + if self.puzzle_piece_f is not None: count += 1 - if puzzle_piece_g is not None: + if self.puzzle_piece_g is not None: count += 1 - if puzzle_piece_h is not None: + if self.puzzle_piece_h is not None: count += 1 - if puzzle_piece_i is not None: + if self.puzzle_piece_i is not None: count += 1 - if puzzle_piece_j is not None: + if self.puzzle_piece_j is not None: count += 1 return count @staticmethod def puzzle_is_complete() -> bool: - session = db.Session() + session = Session() halloweens = session.query(Halloween).all() session.close() completed_a = False @@ -969,7 +969,7 @@ class Halloween(Base): @staticmethod def puzzle_piece_a_complete() -> bool: - session = db.Session() + session = Session() halloweens = session.query(Halloween).all() session.close() for halloween in halloweens: @@ -979,7 +979,7 @@ class Halloween(Base): @staticmethod def puzzle_piece_b_complete() -> bool: - session = db.Session() + session = Session() halloweens = session.query(Halloween).all() session.close() for halloween in halloweens: @@ -989,7 +989,7 @@ class Halloween(Base): @staticmethod def puzzle_piece_c_complete() -> bool: - session = db.Session() + session = Session() halloweens = session.query(Halloween).all() session.close() for halloween in halloweens: @@ -1000,7 +1000,7 @@ class Halloween(Base): @staticmethod def puzzle_piece_d_complete() -> bool: - session = db.Session() + session = Session() halloweens = session.query(Halloween).all() session.close() for halloween in halloweens: @@ -1010,7 +1010,7 @@ class Halloween(Base): @staticmethod def puzzle_piece_e_complete() -> bool: - session = db.Session() + session = Session() halloweens = session.query(Halloween).all() session.close() for halloween in halloweens: @@ -1020,7 +1020,7 @@ class Halloween(Base): @staticmethod def puzzle_piece_f_complete() -> bool: - session = db.Session() + session = Session() halloweens = session.query(Halloween).all() session.close() for halloween in halloweens: @@ -1030,7 +1030,7 @@ class Halloween(Base): @staticmethod def puzzle_piece_g_complete() -> bool: - session = db.Session() + session = Session() halloweens = session.query(Halloween).all() session.close() for halloween in halloweens: @@ -1040,7 +1040,7 @@ class Halloween(Base): @staticmethod def puzzle_piece_h_complete() -> bool: - session = db.Session() + session = Session() halloweens = session.query(Halloween).all() session.close() for halloween in halloweens: @@ -1050,7 +1050,7 @@ class Halloween(Base): @staticmethod def puzzle_piece_i_complete() -> bool: - session = db.Session() + session = Session() halloweens = session.query(Halloween).all() session.close() for halloween in halloweens: @@ -1060,7 +1060,7 @@ class Halloween(Base): @staticmethod def puzzle_piece_j_complete() -> bool: - session = db.Session() + session = Session() halloweens = session.query(Halloween).all() session.close() for halloween in halloweens: diff --git a/discordbot.py b/discordbot.py index bac1460f..b87dc9a7 100644 --- a/discordbot.py +++ b/discordbot.py @@ -265,6 +265,7 @@ class RoyalDiscordBot(discord.Client): "!skip": self.cmd_skip, "!s": self.cmd_skip, "!remove": self.cmd_remove, + "!r": self.cmd_remove, "!cancel": self.cmd_remove, "!queue": self.cmd_queue, "!q": self.cmd_queue, @@ -494,7 +495,7 @@ class RoyalDiscordBot(discord.Client): while True: # Fun things will happen with multiple voice clients! for voice_client in self.voice_clients: - if not voice_client.is_connected() or voice_client.is_playing(): + if not voice_client.is_connected() or voice_client.is_playing() or voice_client.is_paused(): continue if len(self.video_queue) == 0: self.now_playing = None diff --git a/static/spoopy.less b/static/spoopy.less index f8a3bd7c..655a271b 100644 --- a/static/spoopy.less +++ b/static/spoopy.less @@ -749,6 +749,21 @@ table { grid-column: 3; } } + + .halloweenmini { + background-color: #311515; + padding: 18px; + grid-template-columns: 100%; + + .stars { + grid-column: 1; + + i { + color: yellow; + font-size: 30px; + } + } + } } .wiki { @@ -814,6 +829,11 @@ ntry { .right { grid-column: 2; } + + .halloween { + grid-column-start: 1; + grid-column-end: 3; + } } @media (max-width:600px) { @@ -828,6 +848,38 @@ ntry { .right { grid-row: 2; } + + .halloween { + grid-row-start: 1; + grid-row-end: 3; + } + } + + .halloween { + .upper-box { + font-size: xx-large; + } + + .lower-box { + text-align: center; + + .stars a { + color: @link-color; + font-size: 64px; + + &:hover { + color: @highlight-color; + } + + .fas { + color: yellow; + } + } + + .time-left { + font-size: 64px; + } + } } } @@ -878,28 +930,6 @@ ntry { } } -@keyframes shake { - 0%, 100% { - transform: translate(2px, 2px); - } - - 20%, 80% { - transform: translate(-2px, -2px); - } - - 40% { - transform: translate(2px, -2px); - } - - 60% { - transform: translate(-2px, 2px); - } - - 10%, 30%, 50%, 70%, 90% { - transform: translate(0px, 0px); - } -} - #debug-mode { color: red; font-weight: bold; diff --git a/templates/game.html b/templates/game.html index ce64767f..35aeb415 100644 --- a/templates/game.html +++ b/templates/game.html @@ -2,6 +2,7 @@ {% block prehead %} + {% endblock %} {% block pagetitle %} diff --git a/templates/main.html b/templates/main.html index e49829b6..49a053f3 100644 --- a/templates/main.html +++ b/templates/main.html @@ -4,19 +4,22 @@ Pagina principale {% endblock %} +{% block prehead %} + +{% endblock %} + {% block posthead %} {% endblock %} @@ -25,6 +28,32 @@ Royal Games