bloxstrap/Bloxstrap/Models/GameMessage.cs
pizzaboxer 39d919811f
Add support for game message communication (#183)
game scripts can print a client message to send messages to bloxstrap, right now only for setting the presence status

message is a json string formatted with the properties "command" and "data" that's prefixed with the string "[SendBloxstrapMessage]"

example:
print('[SendBloxstrapMessage] {"command":"SetPresenceStatus", "data":"hi"}')
2023-05-09 12:21:56 +01:00

14 lines
299 B
C#

using System.Text.Json.Serialization;
namespace Bloxstrap.Models
{
public class GameMessage
{
[JsonPropertyName("command")]
public string Command { get; set; } = null!;
[JsonPropertyName("data")]
public string Data { get; set; } = null!;
}
}