v0.19.0.0 (unstable)

This commit is contained in:
Regalis11
2022-07-20 18:47:07 +03:00
parent 2e2663a175
commit 6b55adcdd9
170 changed files with 2769 additions and 1634 deletions
@@ -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)