you can now only put up to 500 characters into a page of paper (#6213)
This commit is contained in:
@@ -27,6 +27,10 @@ namespace Content.Server.Paper
|
|||||||
[DataField("content")]
|
[DataField("content")]
|
||||||
public string Content { get; set; } = "";
|
public string Content { get; set; } = "";
|
||||||
|
|
||||||
|
[DataField("contentSize")]
|
||||||
|
public int ContentSize { get; set; } = 500;
|
||||||
|
|
||||||
|
|
||||||
[ViewVariables] private BoundUserInterface? UserInterface => Owner.GetUIOrNull(PaperUiKey.Key);
|
[ViewVariables] private BoundUserInterface? UserInterface => Owner.GetUIOrNull(PaperUiKey.Key);
|
||||||
|
|
||||||
protected override void Initialize()
|
protected override void Initialize()
|
||||||
@@ -44,6 +48,7 @@ namespace Content.Server.Paper
|
|||||||
|
|
||||||
public void SetContent(string content)
|
public void SetContent(string content)
|
||||||
{
|
{
|
||||||
|
|
||||||
Content = content + '\n';
|
Content = content + '\n';
|
||||||
UpdateUserInterface();
|
UpdateUserInterface();
|
||||||
|
|
||||||
@@ -93,7 +98,9 @@ namespace Content.Server.Paper
|
|||||||
if (string.IsNullOrEmpty(msg.Text))
|
if (string.IsNullOrEmpty(msg.Text))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Content += msg.Text + '\n';
|
|
||||||
|
if (msg.Text.Length + Content.Length <= ContentSize)
|
||||||
|
Content += msg.Text + '\n';
|
||||||
|
|
||||||
if (_entMan.TryGetComponent(Owner, out AppearanceComponent? appearance))
|
if (_entMan.TryGetComponent(Owner, out AppearanceComponent? appearance))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user