1 #region Copyright & License Information 2 /* 3 * Copyright 2007-2020 The OpenRA Developers (see AUTHORS) 4 * This file is part of OpenRA, which is free software. It is made 5 * available to you under the terms of the GNU General Public License 6 * as published by the Free Software Foundation, either version 3 of 7 * the License, or (at your option) any later version. For more 8 * information, see COPYING. 9 */ 10 #endregion 11 12 using OpenRA.Traits; 13 14 namespace OpenRA.Mods.Common.Traits 15 { 16 public class RepairsUnitsInfo : PausableConditionalTraitInfo 17 { 18 [Desc("Cost in % of the unit value to fully repair the unit.")] 19 public readonly int ValuePercentage = 20; 20 21 public readonly int HpPerStep = 10; 22 23 [Desc("Time (in ticks) between two repair steps.")] 24 public readonly int Interval = 24; 25 26 [NotificationReference("Speech")] 27 [Desc("The sound played when starting to repair a unit.")] 28 public readonly string StartRepairingNotification = null; 29 30 [NotificationReference("Speech")] 31 [Desc("The sound played when repairing a unit is done.")] 32 public readonly string FinishRepairingNotification = null; 33 34 [Desc("Experience gained by the player owning this actor for repairing an allied unit.")] 35 public readonly int PlayerExperience = 0; 36 Create(ActorInitializer init)37 public override object Create(ActorInitializer init) { return new RepairsUnits(this); } 38 } 39 40 public class RepairsUnits : PausableConditionalTrait<RepairsUnitsInfo> 41 { RepairsUnits(RepairsUnitsInfo info)42 public RepairsUnits(RepairsUnitsInfo info) 43 : base(info) { } 44 } 45 } 46