Tarot game: basic trick
- plugin xep-0045: new method getRoomNick - plugin tarot: basic trick - wix: played card are shown in CardPanel
This commit is contained in:
parent
71352c7b80
commit
2e6c6142d5
1 changed files with 97 additions and 6 deletions
|
|
@ -53,6 +53,7 @@ class QuickApp():
|
|||
self.bridge.register("tarotGameChooseContrat", self.tarotChooseContrat)
|
||||
self.bridge.register("tarotGameShowCards", self.tarotShowCards)
|
||||
self.bridge.register("tarotGameYourTurn", self.tarotMyTurn)
|
||||
self.bridge.register("tarotGameCardsPlayed", self.tarotCardsPlayed)
|
||||
self.bridge.register("subscribe", self.subscribe)
|
||||
self.bridge.register("paramUpdate", self.paramUpdate)
|
||||
self.bridge.register("contactDeleted", self.contactDeleted)
|
||||
|
|
@ -306,7 +307,14 @@ class QuickApp():
|
|||
debug (_("My turn to play"))
|
||||
if self.chat_wins.has_key(room_jid):
|
||||
self.chat_wins[room_jid].getGame("Tarot").MyTurn()
|
||||
|
||||
|
||||
def tarotCardsPlayed(self, room_jid, player, cards, profile):
|
||||
if not self.__check_profile(profile):
|
||||
return
|
||||
debug (_("Card(s) played (%(player)s): %(cards)s") % {"player":player, "cards":cards})
|
||||
if self.chat_wins.has_key(room_jid):
|
||||
self.chat_wins[room_jid].getGame("Tarot").cardsPlayed(player, cards)
|
||||
|
||||
def subscribe(self, type, raw_jid, profile):
|
||||
"""Called when a subsciption management signal is received"""
|
||||
if not self.__check_profile(profile):
|
||||
|
|
|
|||
Loading…
Reference in a new issue