Merge pull request #8556 from suvjunmd/tooltips

Modified actor tooltips to include friendly name and internal name
This commit is contained in:
Matthias Mailänder
2015-06-28 13:35:37 +02:00
2 changed files with 6 additions and 3 deletions

View File

@@ -69,8 +69,8 @@ namespace OpenRA.Mods.Common.Traits
Footprint = new ReadOnlyDictionary<CPos, SubCell>(footprint);
}
var tooltipInfo = Info.Traits.GetOrDefault<ITooltipInfo>();
Tooltip = "{0} ({1})".F(tooltipInfo != null ? tooltipInfo.TooltipForPlayerStance(Stance.None) : Info.Name, ID);
var tooltip = Info.Traits.GetOrDefault<TooltipInfo>();
Tooltip = tooltip == null ? Info.Name + " - " + ID : tooltip.Name + " (" + Info.Name + ") - " + ID;
GeneratePreviews();