Added sink (#14348)

This commit is contained in:
Topy
2023-07-01 00:10:47 +02:00
committed by GitHub
parent 7d89b9e253
commit b85c902189
36 changed files with 484 additions and 104 deletions

View File

@@ -89,7 +89,7 @@ public abstract partial class SharedDoAfterSystem : EntitySystem
// I feel like this is somewhat cursed, but its the only way I can think of without having to just send
// redundant data over the network and increasing DoAfter boilerplate.
var evType = typeof(DoAfterAttemptEvent<>).MakeGenericType(args.Event.GetType());
doAfter.AttemptEvent = _factory.CreateInstance(evType, new object[] { doAfter, args.Event }, inject: false);
doAfter.AttemptEvent = _factory.CreateInstance(evType, new object[] { doAfter, args.Event });
}
if (args.EventTarget != null)