Revert Rich text (#5848)

This commit is contained in:
Paul Ritter
2021-12-20 12:42:42 +01:00
committed by GitHub
parent e3a1b2b37b
commit cc57d1380c
60 changed files with 212 additions and 302 deletions

View File

@@ -7,7 +7,6 @@ using Robust.Shared.GameObjects;
using Robust.Shared.Localization;
using Robust.Shared.Serialization.Manager.Attributes;
using Robust.Shared.Utility;
using Robust.Shared.Utility.Markup;
using Robust.Shared.ViewVariables;
namespace Content.Server.NodeContainer
@@ -44,20 +43,28 @@ namespace Content.Server.NodeContainer
return false;
}
public void Examine(FormattedMessage.Builder message, bool inDetailsRange)
public void Examine(FormattedMessage message, bool inDetailsRange)
{
if (!_examinable || !inDetailsRange) return;
foreach (var node in Nodes.Values)
{
if (node == null) continue;
message.AddMarkup(node.NodeGroupID switch
switch (node.NodeGroupID)
{
NodeGroupID.HVPower => Loc.GetString("node-container-component-on-examine-details-hvpower") + "\n",
NodeGroupID.MVPower => Loc.GetString("node-container-component-on-examine-details-mvpower") + "\n",
NodeGroupID.Apc => Loc.GetString("node-container-component-on-examine-details-apc") + "\n",
_ => ""
});
case NodeGroupID.HVPower:
message.AddMarkup(
Loc.GetString("node-container-component-on-examine-details-hvpower") + "\n");
break;
case NodeGroupID.MVPower:
message.AddMarkup(
Loc.GetString("node-container-component-on-examine-details-mvpower") + "\n");
break;
case NodeGroupID.Apc:
message.AddMarkup(
Loc.GetString("node-container-component-on-examine-details-apc") + "\n");
break;
}
}
}
}