Content update for NetEntities (#18935)

This commit is contained in:
metalgearsloth
2023-09-11 09:42:41 +10:00
committed by GitHub
parent 389c8d1a2c
commit 5a0fc68be2
526 changed files with 3058 additions and 2215 deletions

View File

@@ -67,20 +67,14 @@ namespace Content.Client.MassMedia.Ui
var stringContent = Rope.Collapse(_menu.ContentInput.TextRope);
if (stringContent == null || stringContent.Length == 0) return;
if (_gameTicker == null) return;
if (stringContent == null || stringContent.Length == 0)
return;
NewsArticle article = new NewsArticle();
var stringName = _menu.NameInput.Text;
var name = (stringName.Length <= 25 ? stringName.Trim() : $"{stringName.Trim().Substring(0, 25)}...");
article.Name = name;
article.Content = stringContent;
article.ShareTime = _gameTiming.CurTime.Subtract(_gameTicker.RoundStartTimeSpan);
_menu.ContentInput.TextRope = new Rope.Leaf(string.Empty);
_menu.NameInput.Text = string.Empty;
SendMessage(new NewsWriteShareMessage(article));
SendMessage(new NewsWriteShareMessage(name, stringContent));
}
private void OnDeleteButtonPressed(int articleNum)