refactor: split hook delegate into before and after with result
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
using Vintagestory.API.Common;
|
||||
|
||||
namespace CommandHook;
|
||||
|
||||
public delegate void CommandBeforeDelegate(ref CommandData data);
|
||||
public delegate void CommandAfterDelegate(ref CommandData data, TextCommandResult result);
|
||||
@@ -1,3 +0,0 @@
|
||||
namespace CommandHook;
|
||||
|
||||
public delegate void CommandHookDelegate(ref CommandData data);
|
||||
@@ -2,10 +2,10 @@ namespace CommandHook;
|
||||
|
||||
public struct CommandRegistration
|
||||
{
|
||||
public readonly CommandHookDelegate? Before;
|
||||
public readonly CommandHookDelegate? After;
|
||||
public readonly CommandBeforeDelegate? Before;
|
||||
public readonly CommandAfterDelegate? After;
|
||||
|
||||
public CommandRegistration(CommandHookDelegate? before, CommandHookDelegate? after)
|
||||
public CommandRegistration(CommandBeforeDelegate? before, CommandAfterDelegate? after)
|
||||
{
|
||||
Before = before;
|
||||
After = after;
|
||||
|
||||
Reference in New Issue
Block a user