Merge pull request #10015 from atlimit8/MapEditorTooltips

Add map editor only tooltips
This commit is contained in:
Paul Chote
2015-12-28 18:46:07 +00:00
10 changed files with 56 additions and 5 deletions

View File

@@ -69,7 +69,7 @@ namespace OpenRA.Mods.Common.Traits
Footprint = new ReadOnlyDictionary<CPos, SubCell>(footprint);
}
var tooltip = Info.TraitInfoOrDefault<TooltipInfo>();
var tooltip = Info.TraitInfoOrDefault<EditorOnlyTooltipInfo>() as TooltipInfoBase ?? Info.TraitInfoOrDefault<TooltipInfo>();
Tooltip = (tooltip == null ? " < " + Info.Name + " >" : tooltip.Name) + "\n" + owner.Name + " (" + owner.Faction + ")"
+ "\nID: " + ID + "\nType: " + Info.Name;