Engine Entity Anchoring Changes (#4195)

* Converted all SnapGridPositionChangedEvent subscriptions to AnchorStateChangedEvent.

* Fixes power tests with new anchored requirements.

* Moved AnchorableComponent into construction.
AnchorableComponent now uses Transform.Anchored.

* Fixed bug with nodes, power works again.

* Adds lifetime stages to Component.

* Update Engine to v0.4.70.
This commit is contained in:
Acruid
2021-06-19 19:41:26 -07:00
committed by GitHub
parent 0ab7b3a5d2
commit 15fb554c28
187 changed files with 279 additions and 287 deletions

View File

@@ -41,7 +41,7 @@ namespace Content.Server.Power.Components
[DataField("transferEfficiency")]
private float _transferEfficiency = 0.85f;
public override void Initialize()
protected override void Initialize()
{
base.Initialize();
@@ -61,7 +61,7 @@ namespace Content.Server.Power.Components
}
}
public override void OnRemove()
protected override void OnRemove()
{
_heldBattery = null;

View File

@@ -25,13 +25,13 @@ namespace Content.Server.Power.Components
[ViewVariables]
private bool _needsNet = true;
public override void OnAdd()
protected override void OnAdd()
{
base.OnAdd();
_net = NullNet;
}
public override void Initialize()
protected override void Initialize()
{
base.Initialize();
if (_needsNet)
@@ -40,7 +40,7 @@ namespace Content.Server.Power.Components
}
}
public override void OnRemove()
protected override void OnRemove()
{
ClearNet();
base.OnRemove();

View File

@@ -26,7 +26,7 @@ namespace Content.Server.Power.Components
[DataField("activeSupplyRate")]
private int _activeSupplyRate = 50;
public override void Initialize()
protected override void Initialize()
{
base.Initialize();
Owner.EnsureComponentWarn<PowerSupplierComponent>();

View File

@@ -27,7 +27,7 @@ namespace Content.Server.Power.Components
[ComponentDependency] private PowerConsumerComponent? _consumer = default!;
public override void Initialize()
protected override void Initialize()
{
base.Initialize();
Owner.EnsureComponentWarn<PowerConsumerComponent>();

View File

@@ -86,7 +86,7 @@ namespace Content.Server.Power.Components
}
}
public override void OnRemove()
protected override void OnRemove()
{
Connectable = false;
var receivers = _linkedReceivers.ToArray();

View File

@@ -92,7 +92,7 @@ namespace Content.Server.Power.Components
}
}
public override void OnRemove()
protected override void OnRemove()
{
_provider.RemoveReceiver(this);
base.OnRemove();