IExamine can now limit certain details behind a 'details' range check. (#1039)
* IExamine can now limit certain details behind a 'details' range check. * Comic's Review fixes. - colour -> color. My ancestors are saddened by this. - Can see wire panel opened/closed at any distance again.
This commit is contained in:
@@ -266,7 +266,7 @@ namespace Content.Server.GameObjects.Components.Chemistry
|
||||
}
|
||||
}
|
||||
|
||||
void IExamine.Examine(FormattedMessage message)
|
||||
void IExamine.Examine(FormattedMessage message, bool inDetailsRange)
|
||||
{
|
||||
if (NoExamine)
|
||||
{
|
||||
@@ -282,7 +282,26 @@ namespace Content.Server.GameObjects.Components.Chemistry
|
||||
{
|
||||
if (_prototypeManager.TryIndex(reagent.ReagentId, out ReagentPrototype proto))
|
||||
{
|
||||
message.AddText($"{proto.Name}: {reagent.Quantity}u\n");
|
||||
if (inDetailsRange)
|
||||
{
|
||||
message.AddText($"{proto.Name}: {reagent.Quantity}u\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
//This is trash but it shows the general idea
|
||||
var color = proto.SubstanceColor;
|
||||
var colorIsh = "Red";
|
||||
if (color.G > color.R)
|
||||
{
|
||||
colorIsh = "Green";
|
||||
}
|
||||
if (color.B > color.G && color.B > color.R)
|
||||
{
|
||||
colorIsh = "Blue";
|
||||
}
|
||||
|
||||
message.AddText(_loc.GetString("A {0} liquid\n", colorIsh));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user