Add missing WirePanel components (#16676)
This commit is contained in:
@@ -237,10 +237,7 @@ public sealed class WiresSystem : SharedWiresSystem
|
||||
|
||||
private void OnWiresStartup(EntityUid uid, WiresComponent component, ComponentStartup args)
|
||||
{
|
||||
if (!String.IsNullOrEmpty(component.LayoutId))
|
||||
SetOrCreateWireLayout(uid, component);
|
||||
|
||||
UpdateUserInterface(uid);
|
||||
EnsureComp<WiresPanelComponent>(uid);
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -498,17 +495,16 @@ public sealed class WiresSystem : SharedWiresSystem
|
||||
|
||||
private void OnMapInit(EntityUid uid, WiresComponent component, MapInitEvent args)
|
||||
{
|
||||
EnsureComp<WiresPanelComponent>(uid);
|
||||
if (!string.IsNullOrEmpty(component.LayoutId))
|
||||
SetOrCreateWireLayout(uid, component);
|
||||
|
||||
if (component.SerialNumber == null)
|
||||
{
|
||||
GenerateSerialNumber(uid, component);
|
||||
}
|
||||
|
||||
if (component.WireSeed == 0)
|
||||
{
|
||||
component.WireSeed = _random.Next(1, int.MaxValue);
|
||||
UpdateUserInterface(uid);
|
||||
}
|
||||
|
||||
UpdateUserInterface(uid);
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
Reference in New Issue
Block a user