Proper delegate naming
This commit is contained in:
@@ -35,26 +35,26 @@ namespace Torch.API.Managers
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="msg"></param>
|
/// <param name="msg"></param>
|
||||||
/// <param name="consumed">If true, this event has been consumed and should be ignored</param>
|
/// <param name="consumed">If true, this event has been consumed and should be ignored</param>
|
||||||
public delegate void DelMessageRecieved(TorchChatMessage msg, ref bool consumed);
|
public delegate void MessageRecievedDel(TorchChatMessage msg, ref bool consumed);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Callback used to indicate the user is attempting to send a message locally.
|
/// Callback used to indicate the user is attempting to send a message locally.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="msg">Message the user is attempting to send</param>
|
/// <param name="msg">Message the user is attempting to send</param>
|
||||||
/// <param name="consumed">If true, this event has been consumed and should be ignored</param>
|
/// <param name="consumed">If true, this event has been consumed and should be ignored</param>
|
||||||
public delegate void DelMessageSending(string msg, ref bool consumed);
|
public delegate void MessageSendingDel(string msg, ref bool consumed);
|
||||||
|
|
||||||
public interface IChatManagerClient : IManager
|
public interface IChatManagerClient : IManager
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Event that is raised when a message addressed to us is recieved. <see cref="DelMessageRecieved"/>
|
/// Event that is raised when a message addressed to us is recieved. <see cref="MessageRecievedDel"/>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
event DelMessageRecieved MessageRecieved;
|
event MessageRecievedDel MessageRecieved;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Event that is raised when we are attempting to send a message. <see cref="DelMessageSending"/>
|
/// Event that is raised when we are attempting to send a message. <see cref="MessageSendingDel"/>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
event DelMessageSending MessageSending;
|
event MessageSendingDel MessageSending;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Triggers the <see cref="MessageSending"/> event,
|
/// Triggers the <see cref="MessageSending"/> event,
|
||||||
|
@@ -9,19 +9,19 @@ namespace Torch.API.Managers
|
|||||||
{
|
{
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Callback used to indicate the server has recieved a message to process.
|
/// Callback used to indicate the server has recieved a message to process and forward on to others.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="authorId">Steam ID of the user sending a message</param>
|
/// <param name="authorId">Steam ID of the user sending a message</param>
|
||||||
/// <param name="msg">Message the user is attempting to send</param>
|
/// <param name="msg">Message the user is attempting to send</param>
|
||||||
/// <param name="consumed">If true, this event has been consumed and should be ignored</param>
|
/// <param name="consumed">If true, this event has been consumed and should be ignored</param>
|
||||||
public delegate void DelMessageProcessing(TorchChatMessage msg, ref bool consumed);
|
public delegate void MessageProcessingDel(TorchChatMessage msg, ref bool consumed);
|
||||||
|
|
||||||
public interface IChatManagerServer : IChatManagerClient
|
public interface IChatManagerServer : IChatManagerClient
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Event triggered when the server has recieved a message and should process it. <see cref="DelMessageProcessing"/>
|
/// Event triggered when the server has recieved a message and should process it. <see cref="MessageProcessingDel"/>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
event DelMessageProcessing MessageProcessing;
|
event MessageProcessingDel MessageProcessing;
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@@ -26,11 +26,11 @@ namespace Torch.Managers.ChatManager
|
|||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
// TODO doesn't work in Offline worlds. Method injection or network injection.
|
// TODO doesn't work in Offline worlds. Method injection or network injection.
|
||||||
public event DelMessageRecieved MessageRecieved;
|
public event MessageRecievedDel MessageRecieved;
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
// TODO doesn't work at all. Method injection or network injection.
|
// TODO doesn't work at all. Method injection or network injection.
|
||||||
public event DelMessageSending MessageSending;
|
public event MessageSendingDel MessageSending;
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public void SendMessageAsSelf(string message)
|
public void SendMessageAsSelf(string message)
|
||||||
|
@@ -36,7 +36,7 @@ namespace Torch.Managers.ChatManager
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public event DelMessageProcessing MessageProcessing;
|
public event MessageProcessingDel MessageProcessing;
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public void SendMessageAsOther(ulong authorId, string message, ulong targetSteamId = 0)
|
public void SendMessageAsOther(ulong authorId, string message, ulong targetSteamId = 0)
|
||||||
@@ -59,9 +59,9 @@ namespace Torch.Managers.ChatManager
|
|||||||
|
|
||||||
|
|
||||||
#pragma warning disable 649
|
#pragma warning disable 649
|
||||||
private delegate void DelMultiplayerBaseSendChatMessage(ref ChatMsg arg);
|
private delegate void MultiplayerBaseSendChatMessageDel(ref ChatMsg arg);
|
||||||
[ReflectedStaticMethod(Name = "SendChatMessage", Type = typeof(MyMultiplayerBase))]
|
[ReflectedStaticMethod(Name = "SendChatMessage", Type = typeof(MyMultiplayerBase))]
|
||||||
private static DelMultiplayerBaseSendChatMessage _dedicatedServerBaseSendChatMessage;
|
private static MultiplayerBaseSendChatMessageDel _dedicatedServerBaseSendChatMessage;
|
||||||
|
|
||||||
// [ReflectedMethod] doesn't play well with instance methods and refs.
|
// [ReflectedMethod] doesn't play well with instance methods and refs.
|
||||||
[ReflectedMethodInfo(typeof(MyDedicatedServerBase), "OnChatMessage")]
|
[ReflectedMethodInfo(typeof(MyDedicatedServerBase), "OnChatMessage")]
|
||||||
|
Reference in New Issue
Block a user