Mercurial > libervia-backend
annotate sat_frontends/quick_frontend/quick_games.py @ 2646:712cb4ff3e13
core: new EncryptionHandler class which manage encrypted session as a core feature:
Plugin handling encryption can now register using host.registerEncryptionPlugin, and an encryption session can now be started using messageEncryptionStart bridge method.
This will make encryption handling more easy, as we now know if a session is clear or e2e encrypted, and which plugin handle it.
author | Goffi <goffi@goffi.org> |
---|---|
date | Sun, 29 Jul 2018 19:22:56 +0200 |
parents | 56f94936df1e |
children | 003b8b4b56a7 |
rev | line source |
---|---|
1934
2daf7b4c6756
use of /usr/bin/env instead of /usr/bin/python in shebang
Goffi <goffi@goffi.org>
parents:
1766
diff
changeset
|
1 #!/usr/bin/env python2 |
1360
8ea8fa13c351
frontends (quick_frontend, primitivus): fixes room games:
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
2 # -*- coding: utf-8 -*- |
8ea8fa13c351
frontends (quick_frontend, primitivus): fixes room games:
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
3 |
8ea8fa13c351
frontends (quick_frontend, primitivus): fixes room games:
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
4 # helper class for making a SAT frontend |
2483 | 5 # Copyright (C) 2009-2018 Jérôme Poisson (goffi@goffi.org) |
1360
8ea8fa13c351
frontends (quick_frontend, primitivus): fixes room games:
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
6 |
8ea8fa13c351
frontends (quick_frontend, primitivus): fixes room games:
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
7 # This program is free software: you can redistribute it and/or modify |
8ea8fa13c351
frontends (quick_frontend, primitivus): fixes room games:
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
8 # it under the terms of the GNU Affero General Public License as published by |
8ea8fa13c351
frontends (quick_frontend, primitivus): fixes room games:
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
9 # the Free Software Foundation, either version 3 of the License, or |
8ea8fa13c351
frontends (quick_frontend, primitivus): fixes room games:
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
10 # (at your option) any later version. |
8ea8fa13c351
frontends (quick_frontend, primitivus): fixes room games:
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
11 |
8ea8fa13c351
frontends (quick_frontend, primitivus): fixes room games:
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
12 # This program is distributed in the hope that it will be useful, |
8ea8fa13c351
frontends (quick_frontend, primitivus): fixes room games:
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of |
8ea8fa13c351
frontends (quick_frontend, primitivus): fixes room games:
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
8ea8fa13c351
frontends (quick_frontend, primitivus): fixes room games:
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
15 # GNU Affero General Public License for more details. |
8ea8fa13c351
frontends (quick_frontend, primitivus): fixes room games:
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
16 |
8ea8fa13c351
frontends (quick_frontend, primitivus): fixes room games:
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
17 # You should have received a copy of the GNU Affero General Public License |
8ea8fa13c351
frontends (quick_frontend, primitivus): fixes room games:
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
18 # along with this program. If not, see <http://www.gnu.org/licenses/>. |
8ea8fa13c351
frontends (quick_frontend, primitivus): fixes room games:
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
19 |
8ea8fa13c351
frontends (quick_frontend, primitivus): fixes room games:
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
20 from sat.core.log import getLogger |
2624
56f94936df1e
code style reformatting using black
Goffi <goffi@goffi.org>
parents:
2562
diff
changeset
|
21 |
1360
8ea8fa13c351
frontends (quick_frontend, primitivus): fixes room games:
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
22 log = getLogger(__name__) |
8ea8fa13c351
frontends (quick_frontend, primitivus): fixes room games:
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
23 |
8ea8fa13c351
frontends (quick_frontend, primitivus): fixes room games:
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
24 from sat.core.i18n import _ |
8ea8fa13c351
frontends (quick_frontend, primitivus): fixes room games:
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
25 |
8ea8fa13c351
frontends (quick_frontend, primitivus): fixes room games:
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
26 from sat_frontends.tools import jid |
1379
da2ea16fabc6
quick_frontend: display MUC games symbols
souliane <souliane@mailoo.org>
parents:
1360
diff
changeset
|
27 from sat_frontends.tools import games |
1360
8ea8fa13c351
frontends (quick_frontend, primitivus): fixes room games:
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
28 from sat_frontends.quick_frontend.constants import Const as C |
8ea8fa13c351
frontends (quick_frontend, primitivus): fixes room games:
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
29 |
8ea8fa13c351
frontends (quick_frontend, primitivus): fixes room games:
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
30 import quick_chat |
8ea8fa13c351
frontends (quick_frontend, primitivus): fixes room games:
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
31 |
8ea8fa13c351
frontends (quick_frontend, primitivus): fixes room games:
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
32 |
8ea8fa13c351
frontends (quick_frontend, primitivus): fixes room games:
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
33 class RoomGame(object): |
8ea8fa13c351
frontends (quick_frontend, primitivus): fixes room games:
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
34 _game_name = None |
8ea8fa13c351
frontends (quick_frontend, primitivus): fixes room games:
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
35 _signal_prefix = None |
8ea8fa13c351
frontends (quick_frontend, primitivus): fixes room games:
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
36 _signal_suffixes = None |
8ea8fa13c351
frontends (quick_frontend, primitivus): fixes room games:
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
37 |
8ea8fa13c351
frontends (quick_frontend, primitivus): fixes room games:
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
38 @classmethod |
8ea8fa13c351
frontends (quick_frontend, primitivus): fixes room games:
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
39 def registerSignals(cls, host): |
8ea8fa13c351
frontends (quick_frontend, primitivus): fixes room games:
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
40 def make_handler(suffix, signal): |
8ea8fa13c351
frontends (quick_frontend, primitivus): fixes room games:
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
41 def handler(*args): |
8ea8fa13c351
frontends (quick_frontend, primitivus): fixes room games:
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
42 if suffix in ("Started", "Players"): |
8ea8fa13c351
frontends (quick_frontend, primitivus): fixes room games:
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
43 return cls.startedHandler(host, suffix, *args) |
8ea8fa13c351
frontends (quick_frontend, primitivus): fixes room games:
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
44 return cls.genericHandler(host, signal, *args) |
2624
56f94936df1e
code style reformatting using black
Goffi <goffi@goffi.org>
parents:
2562
diff
changeset
|
45 |
1360
8ea8fa13c351
frontends (quick_frontend, primitivus): fixes room games:
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
46 return handler |
8ea8fa13c351
frontends (quick_frontend, primitivus): fixes room games:
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
47 |
8ea8fa13c351
frontends (quick_frontend, primitivus): fixes room games:
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
48 for suffix in cls._signal_suffixes: |
8ea8fa13c351
frontends (quick_frontend, primitivus): fixes room games:
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
49 signal = cls._signal_prefix + suffix |
2624
56f94936df1e
code style reformatting using black
Goffi <goffi@goffi.org>
parents:
2562
diff
changeset
|
50 host.registerSignal( |
56f94936df1e
code style reformatting using black
Goffi <goffi@goffi.org>
parents:
2562
diff
changeset
|
51 signal, handler=make_handler(suffix, signal), iface="plugin" |
56f94936df1e
code style reformatting using black
Goffi <goffi@goffi.org>
parents:
2562
diff
changeset
|
52 ) |
1360
8ea8fa13c351
frontends (quick_frontend, primitivus): fixes room games:
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
53 |
8ea8fa13c351
frontends (quick_frontend, primitivus): fixes room games:
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
54 @classmethod |
8ea8fa13c351
frontends (quick_frontend, primitivus): fixes room games:
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
55 def startedHandler(cls, host, suffix, *args): |
8ea8fa13c351
frontends (quick_frontend, primitivus): fixes room games:
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
56 room_jid, args, profile = jid.JID(args[0]), args[1:-1], args[-1] |
8ea8fa13c351
frontends (quick_frontend, primitivus): fixes room games:
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
57 referee, players, args = args[0], args[1], args[2:] |
2624
56f94936df1e
code style reformatting using black
Goffi <goffi@goffi.org>
parents:
2562
diff
changeset
|
58 chat_widget = host.widgets.getOrCreateWidget( |
56f94936df1e
code style reformatting using black
Goffi <goffi@goffi.org>
parents:
2562
diff
changeset
|
59 quick_chat.QuickChat, room_jid, type_=C.CHAT_GROUP, profile=profile |
56f94936df1e
code style reformatting using black
Goffi <goffi@goffi.org>
parents:
2562
diff
changeset
|
60 ) |
1360
8ea8fa13c351
frontends (quick_frontend, primitivus): fixes room games:
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
61 |
1379
da2ea16fabc6
quick_frontend: display MUC games symbols
souliane <souliane@mailoo.org>
parents:
1360
diff
changeset
|
62 # update symbols |
da2ea16fabc6
quick_frontend: display MUC games symbols
souliane <souliane@mailoo.org>
parents:
1360
diff
changeset
|
63 if cls._game_name not in chat_widget.visible_states: |
da2ea16fabc6
quick_frontend: display MUC games symbols
souliane <souliane@mailoo.org>
parents:
1360
diff
changeset
|
64 chat_widget.visible_states.append(cls._game_name) |
da2ea16fabc6
quick_frontend: display MUC games symbols
souliane <souliane@mailoo.org>
parents:
1360
diff
changeset
|
65 symbols = games.SYMBOLS[cls._game_name] |
da2ea16fabc6
quick_frontend: display MUC games symbols
souliane <souliane@mailoo.org>
parents:
1360
diff
changeset
|
66 index = 0 |
1388
a025242bebe7
quick_frontend, primitivus: remove QuickChat.updateEntityState and QuickChat.setContactStates, use more general QuickChat.update (also called when joining the room to initialise the occupants list)
souliane <souliane@mailoo.org>
parents:
1379
diff
changeset
|
67 contact_list = host.contact_lists[profile] |
1379
da2ea16fabc6
quick_frontend: display MUC games symbols
souliane <souliane@mailoo.org>
parents:
1360
diff
changeset
|
68 for occupant in chat_widget.occupants: |
da2ea16fabc6
quick_frontend: display MUC games symbols
souliane <souliane@mailoo.org>
parents:
1360
diff
changeset
|
69 occupant_jid = jid.newResource(room_jid, occupant) |
2624
56f94936df1e
code style reformatting using black
Goffi <goffi@goffi.org>
parents:
2562
diff
changeset
|
70 contact_list.setCache( |
56f94936df1e
code style reformatting using black
Goffi <goffi@goffi.org>
parents:
2562
diff
changeset
|
71 occupant_jid, |
56f94936df1e
code style reformatting using black
Goffi <goffi@goffi.org>
parents:
2562
diff
changeset
|
72 cls._game_name, |
56f94936df1e
code style reformatting using black
Goffi <goffi@goffi.org>
parents:
2562
diff
changeset
|
73 symbols[index % len(symbols)] if occupant in players else None, |
56f94936df1e
code style reformatting using black
Goffi <goffi@goffi.org>
parents:
2562
diff
changeset
|
74 ) |
1388
a025242bebe7
quick_frontend, primitivus: remove QuickChat.updateEntityState and QuickChat.setContactStates, use more general QuickChat.update (also called when joining the room to initialise the occupants list)
souliane <souliane@mailoo.org>
parents:
1379
diff
changeset
|
75 chat_widget.update(occupant_jid) |
1379
da2ea16fabc6
quick_frontend: display MUC games symbols
souliane <souliane@mailoo.org>
parents:
1360
diff
changeset
|
76 |
1360
8ea8fa13c351
frontends (quick_frontend, primitivus): fixes room games:
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
77 if suffix == "Players" or chat_widget.nick not in players: |
8ea8fa13c351
frontends (quick_frontend, primitivus): fixes room games:
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
78 return # waiting for other players to join, or not playing |
8ea8fa13c351
frontends (quick_frontend, primitivus): fixes room games:
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
79 if cls._game_name in chat_widget.games: |
8ea8fa13c351
frontends (quick_frontend, primitivus): fixes room games:
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
80 return # game panel is already there |
8ea8fa13c351
frontends (quick_frontend, primitivus): fixes room games:
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
81 real_class = host.widgets.getRealClass(cls) |
8ea8fa13c351
frontends (quick_frontend, primitivus): fixes room games:
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
82 if real_class == cls: |
2624
56f94936df1e
code style reformatting using black
Goffi <goffi@goffi.org>
parents:
2562
diff
changeset
|
83 host.showDialog( |
56f94936df1e
code style reformatting using black
Goffi <goffi@goffi.org>
parents:
2562
diff
changeset
|
84 _( |
56f94936df1e
code style reformatting using black
Goffi <goffi@goffi.org>
parents:
2562
diff
changeset
|
85 u"A {game} activity between {players} has been started, but you couldn't take part because your client doesn't support it." |
56f94936df1e
code style reformatting using black
Goffi <goffi@goffi.org>
parents:
2562
diff
changeset
|
86 ).format(game=cls._game_name, players=", ".join(players)), |
56f94936df1e
code style reformatting using black
Goffi <goffi@goffi.org>
parents:
2562
diff
changeset
|
87 _(u"{game} Game").format(game=cls._game_name), |
56f94936df1e
code style reformatting using black
Goffi <goffi@goffi.org>
parents:
2562
diff
changeset
|
88 ) |
1360
8ea8fa13c351
frontends (quick_frontend, primitivus): fixes room games:
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
89 return |
8ea8fa13c351
frontends (quick_frontend, primitivus): fixes room games:
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
90 panel = real_class(chat_widget, referee, players, *args) |
8ea8fa13c351
frontends (quick_frontend, primitivus): fixes room games:
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
91 chat_widget.games[cls._game_name] = panel |
8ea8fa13c351
frontends (quick_frontend, primitivus): fixes room games:
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
92 chat_widget.addGamePanel(panel) |
8ea8fa13c351
frontends (quick_frontend, primitivus): fixes room games:
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
93 |
8ea8fa13c351
frontends (quick_frontend, primitivus): fixes room games:
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
94 @classmethod |
8ea8fa13c351
frontends (quick_frontend, primitivus): fixes room games:
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
95 def genericHandler(cls, host, signal, *args): |
8ea8fa13c351
frontends (quick_frontend, primitivus): fixes room games:
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
96 room_jid, args, profile = jid.JID(args[0]), args[1:-1], args[-1] |
8ea8fa13c351
frontends (quick_frontend, primitivus): fixes room games:
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
97 chat_widget = host.widgets.getWidget(quick_chat.QuickChat, room_jid, profile) |
8ea8fa13c351
frontends (quick_frontend, primitivus): fixes room games:
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
98 if chat_widget: |
8ea8fa13c351
frontends (quick_frontend, primitivus): fixes room games:
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
99 try: |
8ea8fa13c351
frontends (quick_frontend, primitivus): fixes room games:
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
100 game_panel = chat_widget.games[cls._game_name] |
8ea8fa13c351
frontends (quick_frontend, primitivus): fixes room games:
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
101 except KeyError: |
2624
56f94936df1e
code style reformatting using black
Goffi <goffi@goffi.org>
parents:
2562
diff
changeset
|
102 log.error( |
56f94936df1e
code style reformatting using black
Goffi <goffi@goffi.org>
parents:
2562
diff
changeset
|
103 "TODO: better game synchronisation - received signal %s but no panel is found" |
56f94936df1e
code style reformatting using black
Goffi <goffi@goffi.org>
parents:
2562
diff
changeset
|
104 % signal |
56f94936df1e
code style reformatting using black
Goffi <goffi@goffi.org>
parents:
2562
diff
changeset
|
105 ) |
1360
8ea8fa13c351
frontends (quick_frontend, primitivus): fixes room games:
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
106 return |
8ea8fa13c351
frontends (quick_frontend, primitivus): fixes room games:
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
107 else: |
8ea8fa13c351
frontends (quick_frontend, primitivus): fixes room games:
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
108 getattr(game_panel, "%sHandler" % signal)(*args) |
8ea8fa13c351
frontends (quick_frontend, primitivus): fixes room games:
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
109 |
8ea8fa13c351
frontends (quick_frontend, primitivus): fixes room games:
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
110 |
8ea8fa13c351
frontends (quick_frontend, primitivus): fixes room games:
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
111 class Tarot(RoomGame): |
8ea8fa13c351
frontends (quick_frontend, primitivus): fixes room games:
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
112 _game_name = "Tarot" |
8ea8fa13c351
frontends (quick_frontend, primitivus): fixes room games:
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
113 _signal_prefix = "tarotGame" |
2624
56f94936df1e
code style reformatting using black
Goffi <goffi@goffi.org>
parents:
2562
diff
changeset
|
114 _signal_suffixes = ( |
56f94936df1e
code style reformatting using black
Goffi <goffi@goffi.org>
parents:
2562
diff
changeset
|
115 "Started", |
56f94936df1e
code style reformatting using black
Goffi <goffi@goffi.org>
parents:
2562
diff
changeset
|
116 "Players", |
56f94936df1e
code style reformatting using black
Goffi <goffi@goffi.org>
parents:
2562
diff
changeset
|
117 "New", |
56f94936df1e
code style reformatting using black
Goffi <goffi@goffi.org>
parents:
2562
diff
changeset
|
118 "ChooseContrat", |
56f94936df1e
code style reformatting using black
Goffi <goffi@goffi.org>
parents:
2562
diff
changeset
|
119 "ShowCards", |
56f94936df1e
code style reformatting using black
Goffi <goffi@goffi.org>
parents:
2562
diff
changeset
|
120 "YourTurn", |
56f94936df1e
code style reformatting using black
Goffi <goffi@goffi.org>
parents:
2562
diff
changeset
|
121 "Score", |
56f94936df1e
code style reformatting using black
Goffi <goffi@goffi.org>
parents:
2562
diff
changeset
|
122 "CardsPlayed", |
56f94936df1e
code style reformatting using black
Goffi <goffi@goffi.org>
parents:
2562
diff
changeset
|
123 "InvalidCards", |
56f94936df1e
code style reformatting using black
Goffi <goffi@goffi.org>
parents:
2562
diff
changeset
|
124 ) |
1360
8ea8fa13c351
frontends (quick_frontend, primitivus): fixes room games:
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
125 |
8ea8fa13c351
frontends (quick_frontend, primitivus): fixes room games:
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
126 |
8ea8fa13c351
frontends (quick_frontend, primitivus): fixes room games:
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
127 class Quiz(RoomGame): |
8ea8fa13c351
frontends (quick_frontend, primitivus): fixes room games:
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
128 _game_name = "Quiz" |
8ea8fa13c351
frontends (quick_frontend, primitivus): fixes room games:
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
129 _signal_prefix = "quizGame" |
2624
56f94936df1e
code style reformatting using black
Goffi <goffi@goffi.org>
parents:
2562
diff
changeset
|
130 _signal_suffixes = ( |
56f94936df1e
code style reformatting using black
Goffi <goffi@goffi.org>
parents:
2562
diff
changeset
|
131 "Started", |
56f94936df1e
code style reformatting using black
Goffi <goffi@goffi.org>
parents:
2562
diff
changeset
|
132 "New", |
56f94936df1e
code style reformatting using black
Goffi <goffi@goffi.org>
parents:
2562
diff
changeset
|
133 "Question", |
56f94936df1e
code style reformatting using black
Goffi <goffi@goffi.org>
parents:
2562
diff
changeset
|
134 "PlayerBuzzed", |
56f94936df1e
code style reformatting using black
Goffi <goffi@goffi.org>
parents:
2562
diff
changeset
|
135 "PlayerSays", |
56f94936df1e
code style reformatting using black
Goffi <goffi@goffi.org>
parents:
2562
diff
changeset
|
136 "AnswerResult", |
56f94936df1e
code style reformatting using black
Goffi <goffi@goffi.org>
parents:
2562
diff
changeset
|
137 "TimerExpired", |
56f94936df1e
code style reformatting using black
Goffi <goffi@goffi.org>
parents:
2562
diff
changeset
|
138 "TimerRestarted", |
56f94936df1e
code style reformatting using black
Goffi <goffi@goffi.org>
parents:
2562
diff
changeset
|
139 ) |
1360
8ea8fa13c351
frontends (quick_frontend, primitivus): fixes room games:
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
140 |
8ea8fa13c351
frontends (quick_frontend, primitivus): fixes room games:
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
141 |
8ea8fa13c351
frontends (quick_frontend, primitivus): fixes room games:
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
142 class Radiocol(RoomGame): |
8ea8fa13c351
frontends (quick_frontend, primitivus): fixes room games:
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
143 _game_name = "Radiocol" |
8ea8fa13c351
frontends (quick_frontend, primitivus): fixes room games:
souliane <souliane@mailoo.org>
parents:
diff
changeset
|
144 _signal_prefix = "radiocol" |
2624
56f94936df1e
code style reformatting using black
Goffi <goffi@goffi.org>
parents:
2562
diff
changeset
|
145 _signal_suffixes = ( |
56f94936df1e
code style reformatting using black
Goffi <goffi@goffi.org>
parents:
2562
diff
changeset
|
146 "Started", |
56f94936df1e
code style reformatting using black
Goffi <goffi@goffi.org>
parents:
2562
diff
changeset
|
147 "Players", |
56f94936df1e
code style reformatting using black
Goffi <goffi@goffi.org>
parents:
2562
diff
changeset
|
148 "SongRejected", |
56f94936df1e
code style reformatting using black
Goffi <goffi@goffi.org>
parents:
2562
diff
changeset
|
149 "Preload", |
56f94936df1e
code style reformatting using black
Goffi <goffi@goffi.org>
parents:
2562
diff
changeset
|
150 "Play", |
56f94936df1e
code style reformatting using black
Goffi <goffi@goffi.org>
parents:
2562
diff
changeset
|
151 "NoUpload", |
56f94936df1e
code style reformatting using black
Goffi <goffi@goffi.org>
parents:
2562
diff
changeset
|
152 "UploadOk", |
56f94936df1e
code style reformatting using black
Goffi <goffi@goffi.org>
parents:
2562
diff
changeset
|
153 ) |