Add map editor only tooltips

This commit is contained in:
atlimit8
2015-11-15 20:53:59 -06:00
parent 3e8df55bcb
commit e417ecb93f
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;