Files
tbd-station-14/Content.Client/Guidebook/Richtext/Table.cs
David 691ca31b95 (Cleanup) Fix logger obsolete warnings (#40553)
* Switched obsolete logger usages to use Sawmill

Fix the majority of obsolete logger usages outside the engine code.

* Fix injection in ChatManager and revert BuildMech changes

* Removed extra manual injection

* Reduced extra static injection and reverted changes to CommandButton as it needs engine changes.

* Removed two more cases of double injection and an extra using

* Reverted changes for Inventory Display

* Moved sawmill setup outside constructor in Table to resolve test failure
2025-10-07 11:45:01 +00:00

33 lines
966 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
{
[Dependency] private readonly ILogManager _logManager = default!;
private ISawmill Sawmill => _sawmill ??= _logManager.GetSawmill("table");
private ISawmill? _sawmill;
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))
{
Sawmill.Error("Guidebook tag \"Table\" does not specify required property \"Columns.\"");
control = null;
return false;
}
Columns = columnsCount;
return true;
}
}