Fix WaitForObjectPosition to use actual data
This commit is contained in:
parent
6f4e84692c
commit
5332247103
@ -43,7 +43,16 @@ internal static class WaitAtEnd
|
||||
return [new NextStep()];
|
||||
|
||||
case EInteractionType.WaitForObjectAtPosition:
|
||||
return [serviceProvider.GetRequiredService<WaitObjectAtPosition>(), new NextStep()];
|
||||
ArgumentNullException.ThrowIfNull(step.DataId);
|
||||
ArgumentNullException.ThrowIfNull(step.Position);
|
||||
|
||||
return
|
||||
[
|
||||
serviceProvider.GetRequiredService<WaitObjectAtPosition>()
|
||||
.With(step.DataId.Value, step.Position.Value),
|
||||
serviceProvider.GetRequiredService<WaitDelay>(),
|
||||
new NextStep()
|
||||
];
|
||||
|
||||
default:
|
||||
return [serviceProvider.GetRequiredService<WaitDelay>(), new NextStep()];
|
||||
@ -103,6 +112,13 @@ internal static class WaitAtEnd
|
||||
public uint DataId { get; set; }
|
||||
public Vector3 Destination { get; set; }
|
||||
|
||||
public ITask With(uint dataId, Vector3 destination)
|
||||
{
|
||||
DataId = dataId;
|
||||
Destination = destination;
|
||||
return this;
|
||||
}
|
||||
|
||||
public bool Start() => true;
|
||||
|
||||
public ETaskResult Update() =>
|
||||
|
Loading…
Reference in New Issue
Block a user