mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-18 14:07:53 +03:00
# Description Cleaned up Logger obsolete compiler warnings in non robust code. Should probably be changed to a ISawmill reference in classes to avoid repeated lookups in heavy logging logic. --- # Changelog 🆑 - tweak: Logger to Logger.GetSawmill("name"); --------- Co-authored-by: ilmenwe <no@mail.com> (cherry picked from commit 2e8ffd971716d38dc6d5a520bebdf88b743045a3)
28 lines
812 B
C#
28 lines
812 B
C#
using System.Diagnostics.CodeAnalysis;
|
|
using Content.Client.UserInterface.Controls;
|
|
using JetBrains.Annotations;
|
|
using Robust.Client.UserInterface;
|
|
|
|
namespace Content.Client.Guidebook.Richtext;
|
|
|
|
[UsedImplicitly]
|
|
public sealed class Table : TableContainer, IDocumentTag
|
|
{
|
|
public bool TryParseTag(Dictionary<string, string> args, [NotNullWhen(true)] out Control? control)
|
|
{
|
|
HorizontalExpand = true;
|
|
control = this;
|
|
|
|
if (!args.TryGetValue("Columns", out var columns) || !int.TryParse(columns, out var columnsCount))
|
|
{
|
|
Logger.GetSawmill("richtext.table").Error("Guidebook tag \"Table\" does not specify required property \"Columns.\"");
|
|
control = null;
|
|
return false;
|
|
}
|
|
|
|
Columns = columnsCount;
|
|
|
|
return true;
|
|
}
|
|
}
|