Fix #115 - add player color to offerRejected
Signed-off-by: James Ketrenos <james_eikona@ketrenos.com>
This commit is contained in:
parent
784ea1ecee
commit
d95335d59b
@ -442,7 +442,7 @@ const Trade = () => {
|
||||
You have not made a trade offer.
|
||||
</span>}
|
||||
|
||||
{ !isTurn && isSameOffer && isOfferValid && _gets !== 'nothing' && _gives !== 'nothing' && <span style={{fontWeight: 'bold'}}>
|
||||
{!isTurn && isSameOffer && !youWereRejected && isOfferValid && _gets !== 'nothing' && _gives !== 'nothing' && <span style={{fontWeight: 'bold'}}>
|
||||
Your submitted offer agrees with {turn.name}'s terms.
|
||||
</span> }
|
||||
</> }
|
||||
|
@ -1962,6 +1962,10 @@ const trade = (game, session, action, offer) => {
|
||||
other.offerRejected = {};
|
||||
}
|
||||
other.offerRejected[session.color] = true;
|
||||
if (!session.player.offerRejected) {
|
||||
session.player.offerRejected = {};
|
||||
}
|
||||
session.player.offerRejected[offer.color] = true;
|
||||
addActivity(game, session, `${session.name} rejected ${other.name}'s offer.`);
|
||||
return;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user