From 7049f68fbd1f8fcf652b6824a266a9c1fc18fbb3 Mon Sep 17 00:00:00 2001 From: Mustafa Alperen Seki Date: Thu, 21 Feb 2019 16:02:53 +0300 Subject: [PATCH] Add a boolean to show or not Refund X$ on the tooltip while selling. --- OpenRA.Mods.Common/Traits/Sellable.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/OpenRA.Mods.Common/Traits/Sellable.cs b/OpenRA.Mods.Common/Traits/Sellable.cs index 682e6ca1d1..aa481ebb1d 100644 --- a/OpenRA.Mods.Common/Traits/Sellable.cs +++ b/OpenRA.Mods.Common/Traits/Sellable.cs @@ -29,6 +29,9 @@ namespace OpenRA.Mods.Common.Traits [Desc("Whether to show the cash tick indicators rising from the actor.")] public readonly bool ShowTicks = true; + [Desc("Whether to show the refund text on the tooltip, when actor is hovered over with sell order.")] + public readonly bool ShowTooltipText = true; + [Desc("Skip playing (reversed) make animation.")] public readonly bool SkipMakeAnimation = false; @@ -86,7 +89,7 @@ namespace OpenRA.Mods.Common.Traits public bool IsTooltipVisible(Player forPlayer) { - if (!IsTraitDisabled && self.World.OrderGenerator is SellOrderGenerator) + if (info.ShowTooltipText && !IsTraitDisabled && self.World.OrderGenerator is SellOrderGenerator) return forPlayer == self.Owner; return false; }