Skip to content

Commit b928970

Browse files
committed
Merge branch 'dev'
2 parents ed920e8 + be23e80 commit b928970

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

APITestMod/APITestMod.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,15 @@ public void Start()
4343

4444
ModHelper.Console.WriteLine("Sending string message test...");
4545
qsbAPI.RegisterHandler<string>("apitest-string", MessageHandler);
46-
qsbAPI.SendMessage("apitest-string", "STRING MESSAGE", true);
46+
qsbAPI.SendMessage("apitest-string", "STRING MESSAGE", receiveLocally: true);
4747

4848
ModHelper.Console.WriteLine("Sending int message test...");
4949
qsbAPI.RegisterHandler<int>("apitest-int", MessageHandler);
50-
qsbAPI.SendMessage("apitest-int", 123, true);
50+
qsbAPI.SendMessage("apitest-int", 123, receiveLocally: true);
5151

5252
ModHelper.Console.WriteLine("Sending float message test...");
5353
qsbAPI.RegisterHandler<float>("apitest-float", MessageHandler);
54-
qsbAPI.SendMessage("apitest-float", 3.14f, true);
54+
qsbAPI.SendMessage("apitest-float", 3.14f, receiveLocally: true);
5555
});
5656
};
5757
}

APITestMod/IQSBAPI.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using OWML.Common;
1+
using System;
2+
using OWML.Common;
23
using UnityEngine.Events;
34

45
public interface IQSBAPI
@@ -58,8 +59,9 @@ public interface IQSBAPI
5859
/// <typeparam name="T">The type of the data being sent. This type must be serializable.</typeparam>
5960
/// <param name="messageType">The unique key of the message.</param>
6061
/// <param name="data">The data to send.</param>
62+
/// <param name="to">The player to send this message to. (0 is the host, uint.MaxValue means every player)</param>
6163
/// <param name="receiveLocally">If true, the action given to <see cref="RegisterHandler{T}"/> will also be called on the same client that is sending the message.</param>
62-
void SendMessage<T>(string messageType, T data, bool receiveLocally = false);
64+
void SendMessage<T>(string messageType, T data, uint to = uint.MaxValue, bool receiveLocally = false);
6365

6466
/// <summary>
6567
/// Registers an action to be called when a message is received.

0 commit comments

Comments
 (0)