Cleanup warning in StealConditionSystem (#37903)

Fix 1 warning in StealConditionSystem
This commit is contained in:
Tayrtahn
2025-05-28 12:17:43 -04:00
committed by GitHub
parent f6dcae8d3a
commit 447f866745

View File

@@ -93,12 +93,12 @@ public sealed class StealConditionSystem : EntitySystem
}
private void OnGetProgress(Entity<StealConditionComponent> condition, ref ObjectiveGetProgressEvent args)
{
args.Progress = GetProgress(args.Mind, condition);
args.Progress = GetProgress((args.MindId, args.Mind), condition);
}
private float GetProgress(MindComponent mind, StealConditionComponent condition)
private float GetProgress(Entity<MindComponent> mind, StealConditionComponent condition)
{
if (!_containerQuery.TryGetComponent(mind.OwnedEntity, out var currentManager))
if (!_containerQuery.TryGetComponent(mind.Comp.OwnedEntity, out var currentManager))
return 0;
var containerStack = new Stack<ContainerManagerComponent>();
@@ -128,7 +128,7 @@ public sealed class StealConditionSystem : EntitySystem
}
//check pulling object
if (TryComp<PullerComponent>(mind.OwnedEntity, out var pull)) //TO DO: to make the code prettier? don't like the repetition
if (TryComp<PullerComponent>(mind.Comp.OwnedEntity, out var pull)) //TO DO: to make the code prettier? don't like the repetition
{
var pulledEntity = pull.Pulling;
if (pulledEntity != null)