v0.19.0.0 (unstable)
This commit is contained in:
@@ -6,6 +6,8 @@ namespace Barotrauma
|
||||
{
|
||||
private readonly Queue<WalletChangedData> transactions = new Queue<WalletChangedData>();
|
||||
|
||||
public bool ShouldForceUpdate;
|
||||
|
||||
partial void SettingsChanged(Option<int> balanceChanged, Option<int> rewardChanged)
|
||||
{
|
||||
transactions.Enqueue(new WalletChangedData
|
||||
@@ -15,6 +17,15 @@ namespace Barotrauma
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Forces the server to sync the state of the wallet regardless if the balance/reward has changed
|
||||
/// </summary>
|
||||
public void ForceUpdate()
|
||||
{
|
||||
SettingsChanged(balanceChanged: Option<int>.Some(0), rewardChanged: Option<int>.None());
|
||||
ShouldForceUpdate = true;
|
||||
}
|
||||
|
||||
public bool HasTransactions() => transactions.Count > 0;
|
||||
|
||||
public NetWalletTransaction DequeueAndMergeTransactions(ushort id)
|
||||
|
||||
Reference in New Issue
Block a user