more proper serv4 usage because i forgot to push for the last pr (#12965)
This commit is contained in:
@@ -384,7 +384,7 @@ namespace Content.Server.Disease
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var freshDisease = _serializationManager.CreateCopy(addedDisease);
|
var freshDisease = _serializationManager.CreateCopy(addedDisease, notNullableOverride: true);
|
||||||
|
|
||||||
if (freshDisease == null) return;
|
if (freshDisease == null) return;
|
||||||
|
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ public sealed class RandomHumanoidSystem : EntitySystem
|
|||||||
|
|
||||||
foreach (var entry in prototype.Components.Values)
|
foreach (var entry in prototype.Components.Values)
|
||||||
{
|
{
|
||||||
var comp = (Component) _serialization.CreateCopy(entry.Component);
|
var comp = (Component) _serialization.CreateCopy(entry.Component, notNullableOverride: true);
|
||||||
comp.Owner = humanoid;
|
comp.Owner = humanoid;
|
||||||
EntityManager.AddComponent(humanoid, comp, true);
|
EntityManager.AddComponent(humanoid, comp, true);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
using Content.Server.GameTicking;
|
using Content.Server.GameTicking;
|
||||||
using Content.Shared.Traits;
|
using Content.Shared.Traits;
|
||||||
using Content.Shared.Whitelist;
|
|
||||||
using Robust.Shared.Prototypes;
|
using Robust.Shared.Prototypes;
|
||||||
using Robust.Shared.Serialization.Manager;
|
using Robust.Shared.Serialization.Manager;
|
||||||
|
|
||||||
@@ -38,7 +37,7 @@ public sealed class TraitSystem : EntitySystem
|
|||||||
// Add all components required by the prototype
|
// Add all components required by the prototype
|
||||||
foreach (var entry in traitPrototype.Components.Values)
|
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;
|
comp.Owner = args.Mob;
|
||||||
EntityManager.AddComponent(args.Mob, comp);
|
EntityManager.AddComponent(args.Mob, comp);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ namespace Content.Shared.Decals
|
|||||||
bool alwaysWrite = false,
|
bool alwaysWrite = false,
|
||||||
ISerializationContext? context = null)
|
ISerializationContext? context = null)
|
||||||
{
|
{
|
||||||
return serializationManager.WriteValue(value.ChunkCollection, alwaysWrite, context);
|
return serializationManager.WriteValue(value.ChunkCollection, alwaysWrite, context, notNullableOverride: true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user