Add a new InfoSystem that sends SharedInfo from the server to client when requested. Currently, only the rule header and rule text is sent. Previously, the rule header and rule text was bundled in the client, which means that the client would only display rules that it was built with, even if the server has different rules. This allows servers all running the same build to send different rules. This could be useful, for example, for servers running the official builds to send different rulesets without a client rebuild.
29 lines
644 B
C#
29 lines
644 B
C#
using Robust.Shared.Serialization;
|
|
|
|
namespace Content.Shared.Info
|
|
{
|
|
/// <summary>
|
|
/// A client request for server rules.
|
|
/// </summary>
|
|
[Serializable, NetSerializable]
|
|
public sealed class RequestRulesMessage : EntityEventArgs
|
|
{
|
|
}
|
|
|
|
/// <summary>
|
|
/// A server response with server rules.
|
|
/// </summary>
|
|
[Serializable, NetSerializable]
|
|
public sealed class RulesMessage : EntityEventArgs
|
|
{
|
|
public string Title;
|
|
public string Text;
|
|
|
|
public RulesMessage(string title, string rules)
|
|
{
|
|
Title = title;
|
|
Text = rules;
|
|
}
|
|
}
|
|
}
|