From 24723faee3c1b46ecdd5734d6a8072e786dfc26e Mon Sep 17 00:00:00 2001 From: Alberto Xamin Date: Fri, 25 Jun 2021 17:21:05 +0200 Subject: [PATCH] chat write discard --- backend/bang/players.py | 1 + frontend/src/i18n/en.json | 3 ++- frontend/src/i18n/it.json | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/backend/bang/players.py b/backend/bang/players.py index 444240d..f51f050 100644 --- a/backend/bang/players.py +++ b/backend/bang/players.py @@ -694,6 +694,7 @@ class Player: player = self.game.get_player_named(self.choose_text.split('|')[1]) player.gold_rush_equipment.remove(self.available_cards[card_index]) self.game.deck.shop_deck.append(self.available_cards[card_index]) + self.sio.emit('chat_message', room=self.game.name, data=f'_gold_rush_pay_discard|{self.name}|{player.name}|{self.available_cards[card_index].name}') player.notify_self() self.pending_action = PendingAction.PLAY self.notify_self() diff --git a/frontend/src/i18n/en.json b/frontend/src/i18n/en.json index 816ddd9..355077d 100644 --- a/frontend/src/i18n/en.json +++ b/frontend/src/i18n/en.json @@ -125,7 +125,8 @@ "flip_event": "🎴 EVENT: {0} 🎴", "choose_manette": "{0} committed to play only cards of suit {1} in this turn.", "UnionPacific": "{0} played Union Pacific and draws 4 cards from the deck", - "use_special": "{0} used the special ability of their character ({1})" + "use_special": "{0} used the special ability of their character ({1})", + "gold_rush_pay_discard": "{0} discarded {2} from {1}." }, "foc": { "leggedelwest": "He must play this card on this turn if possible." diff --git a/frontend/src/i18n/it.json b/frontend/src/i18n/it.json index 6fba3ab..75b4283 100644 --- a/frontend/src/i18n/it.json +++ b/frontend/src/i18n/it.json @@ -125,7 +125,8 @@ "flip_event": "🎴 EVENTO: {0} 🎴", "choose_manette": "{0} si è impegnato ad usare solo carte di seme {1} in questo turno.", "UnionPacific": "{0} ha giocato Union Pacific e ha pescato 4 carte", - "use_special": "{0} ha usato l'abilità speciale del suo personaggio ({1})" + "use_special": "{0} ha usato l'abilità speciale del suo personaggio ({1})", + "gold_rush_pay_discard": "{0} ha fatto scartare {2} a {1}." }, "foc": { "leggedelwest": "Ed è obbligato a usarla nel suo turno, se possibile"