Fix some of the build (#2894)

* THIS TIME FOR REAL

* Fix build

* Bring back old power code

* Remove debugger break

Co-authored-by: AJCM <AJCM@tutanota.com>
This commit is contained in:
DrSmugleaf
2021-01-05 05:36:25 +01:00
committed by GitHub
parent 1032576a20
commit e7eb23a9b0
2 changed files with 5 additions and 5 deletions

View File

@@ -4,6 +4,7 @@ using System.Diagnostics;
using System.Linq; using System.Linq;
using Content.Server.GameObjects.Components.Power; using Content.Server.GameObjects.Components.Power;
using Content.Server.GameObjects.Components.Power.ApcNetComponents; using Content.Server.GameObjects.Components.Power.ApcNetComponents;
using Robust.Shared.Utility;
using Robust.Shared.ViewVariables; using Robust.Shared.ViewVariables;
namespace Content.Server.GameObjects.Components.NodeContainer.NodeGroups namespace Content.Server.GameObjects.Components.NodeContainer.NodeGroups
@@ -92,7 +93,7 @@ namespace Content.Server.GameObjects.Components.NodeContainer.NodeGroups
public void UpdatePowerProviderReceivers(PowerProviderComponent provider, int oldLoad, int newLoad) public void UpdatePowerProviderReceivers(PowerProviderComponent provider, int oldLoad, int newLoad)
{ {
Debug.Assert(_providers.Contains(provider)); DebugTools.Assert(_providers.Contains(provider));
TotalPowerReceiverLoad -= oldLoad; TotalPowerReceiverLoad -= oldLoad;
TotalPowerReceiverLoad += newLoad; TotalPowerReceiverLoad += newLoad;
} }
@@ -150,9 +151,8 @@ namespace Content.Server.GameObjects.Components.NodeContainer.NodeGroups
private void SetTotalPowerReceiverLoad(int totalPowerReceiverLoad) private void SetTotalPowerReceiverLoad(int totalPowerReceiverLoad)
{ {
Debug.Assert(totalPowerReceiverLoad >= 0); DebugTools.Assert(totalPowerReceiverLoad >= 0, $"Expected load equal to or greater than 0, was {totalPowerReceiverLoad}");
_totalPowerReceiverLoad = totalPowerReceiverLoad; _totalPowerReceiverLoad = totalPowerReceiverLoad;
} }
#endregion #endregion

View File

@@ -18,7 +18,7 @@ using Robust.Shared.Localization.Macros;
namespace Content.Tests.Server.Preferences namespace Content.Tests.Server.Preferences
{ {
[TestFixture] [TestFixture]
public class ServerDbSqliteTests : RobustUnitTest public class ServerDbSqliteTests : ContentUnitTest
{ {
private static HumanoidCharacterProfile CharlieCharlieson() private static HumanoidCharacterProfile CharlieCharlieson()
{ {