more proper serv4 usage because i forgot to push for the last pr (#12965)

This commit is contained in:
Paul Ritter
2022-12-11 00:25:04 +01:00
committed by GitHub
parent 5715b0c2be
commit bca66488bf
4 changed files with 4 additions and 5 deletions

View File

@@ -1,6 +1,5 @@
using Content.Server.GameTicking;
using Content.Shared.Traits;
using Content.Shared.Whitelist;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.Manager;
@@ -38,7 +37,7 @@ public sealed class TraitSystem : EntitySystem
// Add all components required by the prototype
foreach (var entry in traitPrototype.Components.Values)
{
var comp = (Component) _serializationManager.CreateCopy(entry.Component);
var comp = (Component) _serializationManager.CreateCopy(entry.Component, notNullableOverride: true);
comp.Owner = args.Mob;
EntityManager.AddComponent(args.Mob, comp);
}