DoAfter can now raise events so you don't need to use async with it (#4253)
This commit is contained in:
committed by
GitHub
parent
d5e34c6ad4
commit
ef958185fb
@@ -258,7 +258,7 @@ namespace Content.Server.Construction.Components
|
||||
{
|
||||
case ArbitraryInsertConstructionGraphStep arbitraryStep:
|
||||
if (arbitraryStep.EntityValid(eventArgs.Using)
|
||||
&& await doAfterSystem.DoAfter(doAfterArgs) == DoAfterStatus.Finished)
|
||||
&& await doAfterSystem.WaitDoAfter(doAfterArgs) == DoAfterStatus.Finished)
|
||||
{
|
||||
valid = true;
|
||||
}
|
||||
@@ -267,7 +267,7 @@ namespace Content.Server.Construction.Components
|
||||
|
||||
case MaterialConstructionGraphStep materialStep:
|
||||
if (materialStep.EntityValid(eventArgs.Using, out var stack)
|
||||
&& await doAfterSystem.DoAfter(doAfterArgs) == DoAfterStatus.Finished)
|
||||
&& await doAfterSystem.WaitDoAfter(doAfterArgs) == DoAfterStatus.Finished)
|
||||
{
|
||||
var splitStack = EntitySystem.Get<StackSystem>().Split(eventArgs.Using.Uid, stack, materialStep.Amount, eventArgs.User.Transform.Coordinates);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user