Adds repeating DoAfters to Food and Drink (#15233)

This commit is contained in:
keronshb
2023-04-15 18:14:26 -04:00
committed by GitHub
parent 39e59f11bf
commit c6aae19a16
7 changed files with 33 additions and 11 deletions

View File

@@ -117,7 +117,14 @@ public abstract partial class SharedDoAfterSystem : EntitySystem
}
doAfter.Completed = true;
RaiseDoAfterEvents(doAfter, component);
if (doAfter.Args.Event.Repeat)
{
doAfter.StartTime = GameTiming.CurTime;
doAfter.Completed = false;
}
}
private bool ShouldCancel(DoAfter doAfter,