Computer and machine parts are only created on map init now.
Fixes #3795
This commit is contained in:
@@ -28,13 +28,6 @@ namespace Content.Server.GameObjects.Components
|
||||
}
|
||||
}
|
||||
|
||||
protected override void Startup()
|
||||
{
|
||||
base.Startup();
|
||||
|
||||
CreateComputerBoard();
|
||||
}
|
||||
|
||||
public override void HandleMessage(ComponentMessage message, IComponent? component)
|
||||
{
|
||||
base.HandleMessage(message, component);
|
||||
|
||||
@@ -23,15 +23,8 @@ namespace Content.Server.GameObjects.Components.Construction
|
||||
{
|
||||
base.Initialize();
|
||||
|
||||
_boardContainer = ContainerHelpers.EnsureContainer<Container>(Owner, MachineFrameComponent.BoardContainer);
|
||||
_partContainer = ContainerHelpers.EnsureContainer<Container>(Owner, MachineFrameComponent.PartContainer);
|
||||
}
|
||||
|
||||
protected override void Startup()
|
||||
{
|
||||
base.Startup();
|
||||
|
||||
CreateBoardAndStockParts();
|
||||
_boardContainer = Owner.EnsureContainer<Container>(MachineFrameComponent.BoardContainer);
|
||||
_partContainer = Owner.EnsureContainer<Container>(MachineFrameComponent.PartContainer);
|
||||
}
|
||||
|
||||
public IEnumerable<MachinePartComponent> GetAllParts()
|
||||
@@ -54,8 +47,8 @@ namespace Content.Server.GameObjects.Components.Construction
|
||||
public void CreateBoardAndStockParts()
|
||||
{
|
||||
// Entity might not be initialized yet.
|
||||
var boardContainer = ContainerHelpers.EnsureContainer<Container>(Owner, MachineFrameComponent.BoardContainer, out var existedBoard);
|
||||
var partContainer = ContainerHelpers.EnsureContainer<Container>(Owner, MachineFrameComponent.PartContainer, out var existedParts);
|
||||
var boardContainer = Owner.EnsureContainer<Container>(MachineFrameComponent.BoardContainer, out var existedBoard);
|
||||
var partContainer = Owner.EnsureContainer<Container>(MachineFrameComponent.PartContainer, out var existedParts);
|
||||
|
||||
if (string.IsNullOrEmpty(BoardPrototype))
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user