Add entity prototype save test (#10274)

This commit is contained in:
Leon Friedrich
2022-08-17 12:47:58 +12:00
committed by GitHub
parent ad67a8508a
commit 93584f21db
104 changed files with 813 additions and 144 deletions

View File

@@ -33,11 +33,11 @@ namespace Content.Server.Body.Components
mechanism.Owner.RandomOffset(0.25f);
}
protected override void Initialize()
public void MapInitialize()
{
base.Initialize();
_mechanismContainer = Owner.EnsureContainer<Container>($"{Name}-{nameof(BodyPartComponent)}");
_mechanismContainer = Owner.EnsureContainer<Container>(ContainerId);
// This is ran in Startup as entities spawned in Initialize
// are not synced to the client since they are assumed to be

View File

@@ -21,6 +21,7 @@ namespace Content.Server.Body.Systems
SubscribeLocalEvent<BodyComponent, MoveInputEvent>(OnRelayMoveInput);
SubscribeLocalEvent<BodyComponent, ApplyMetabolicMultiplierEvent>(OnApplyMetabolicMultiplier);
SubscribeLocalEvent<BodyComponent, BeingMicrowavedEvent>(OnBeingMicrowaved);
SubscribeLocalEvent<BodyPartComponent, MapInitEvent>((_, c, _) => c.MapInitialize());
}
private void OnRelayMoveInput(EntityUid uid, BodyComponent component, ref MoveInputEvent args)