Fix spawned computers not adding the needed container to the ConstructionComponent
Fixes #3091
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
using Content.Server.GameObjects.Components.Construction;
|
||||||
using Content.Server.GameObjects.Components.Power.ApcNetComponents;
|
using Content.Server.GameObjects.Components.Power.ApcNetComponents;
|
||||||
using Content.Shared.GameObjects.Components;
|
using Content.Shared.GameObjects.Components;
|
||||||
using JetBrains.Annotations;
|
using JetBrains.Annotations;
|
||||||
@@ -87,6 +88,9 @@ namespace Content.Server.GameObjects.Components
|
|||||||
|
|
||||||
if(!container.Insert(board))
|
if(!container.Insert(board))
|
||||||
Logger.Warning($"Couldn't insert board {board} to computer {Owner}!");
|
Logger.Warning($"Couldn't insert board {board} to computer {Owner}!");
|
||||||
|
|
||||||
|
if (Owner.TryGetComponent(out ConstructionComponent construction))
|
||||||
|
construction.AddContainer("board");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void MapInit()
|
public void MapInit()
|
||||||
|
|||||||
Reference in New Issue
Block a user