Remove NPC IEntityManager resolves (#12648)

This commit is contained in:
metalgearsloth
2022-11-19 08:07:52 +11:00
committed by GitHub
parent c58204255f
commit b749d0d275
16 changed files with 46 additions and 44 deletions

View File

@@ -6,6 +6,7 @@ namespace Content.Server.NPC.HTN.PrimitiveTasks.Operators;
public sealed class RandomOperator : HTNOperator
{
[Dependency] private readonly IEntityManager _entManager = default!;
[Dependency] private readonly IRobustRandom _random = default!;
/// <summary>
@@ -30,8 +31,8 @@ public sealed class RandomOperator : HTNOperator
{
{
TargetKey,
_random.NextFloat(blackboard.GetValueOrDefault<float>(MinKey),
blackboard.GetValueOrDefault<float>(MaxKey))
_random.NextFloat(blackboard.GetValueOrDefault<float>(MinKey, _entManager),
blackboard.GetValueOrDefault<float>(MaxKey, _entManager))
}
});
}