Make examine use tooltips. (#189)

FANCY.
This commit is contained in:
Pieter-Jan Briers
2019-04-09 17:33:53 +02:00
committed by GitHub
parent e4676395c0
commit c283634efb
12 changed files with 283 additions and 48 deletions

View File

@@ -1,9 +1,11 @@
using System;
using System.Text;
using SS14.Shared.Interfaces.GameObjects;
using SS14.Shared.Utility;
using YamlDotNet.RepresentationModel;
using SS14.Server.GameObjects;
using Content.Server.GameObjects.EntitySystems;
using SS14.Shared.Maths;
using SS14.Shared.Serialization;
using SS14.Shared.ViewVariables;
@@ -145,13 +147,22 @@ namespace Content.Server.GameObjects.Components.Interactable.Tools
}
}
string IExamine.Examine()
void IExamine.Examine(FormattedMessage message)
{
if (Activated)
{
return "The welding tool is currently lit";
message.PushColor(Color.Orange);
message.AddText("Lit\n");
message.Pop();
}
return null;
else
{
message.AddText("Not lit\n");
}
message.AddText("Fuel: ");
message.PushColor(Fuel < FuelCapacity / 4f ? Color.DarkOrange : Color.Orange);
message.AddText($"{Math.Round(Fuel)}/{FuelCapacity}");
message.Pop();
}
}
}