Change some data definitions to not do IoC resolve in their constructors.
This commit is contained in:
@@ -5,13 +5,13 @@ using Content.Shared.Audio;
|
||||
using Content.Shared.Chemistry.Reaction;
|
||||
using Content.Shared.Sound;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Shared.Audio;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Log;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Player;
|
||||
using Robust.Shared.Serialization;
|
||||
using Robust.Shared.Serialization.Manager.Attributes;
|
||||
|
||||
namespace Content.Server.Chemistry.ReactionEffects
|
||||
@@ -21,7 +21,7 @@ namespace Content.Server.Chemistry.ReactionEffects
|
||||
/// </summary>
|
||||
[UsedImplicitly]
|
||||
[ImplicitDataDefinitionForInheritors]
|
||||
public abstract class AreaReactionEffect : IReactionEffect
|
||||
public abstract class AreaReactionEffect : IReactionEffect, ISerializationHooks
|
||||
{
|
||||
[Dependency] private readonly IMapManager _mapManager = default!;
|
||||
|
||||
@@ -82,7 +82,7 @@ namespace Content.Server.Chemistry.ReactionEffects
|
||||
/// </summary>
|
||||
[DataField("sound", required: true)] private SoundSpecifier _sound = default!;
|
||||
|
||||
protected AreaReactionEffect()
|
||||
void ISerializationHooks.AfterDeserialization()
|
||||
{
|
||||
IoCManager.InjectDependencies(this);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user