Merge pull request #7957 from Mailaender/ts-powerdown-indicator-palette

Fixed Tiberian Sun building repair and power down indicator palette
This commit is contained in:
Paul Chote
2015-04-25 19:50:21 +12:00
10 changed files with 38 additions and 13 deletions

View File

@@ -25,6 +25,13 @@ namespace OpenRA.Mods.Common.Traits
public readonly int[] RepairBonuses = { 100, 150, 175, 200, 220, 240, 260, 280, 300 };
public readonly bool CancelWhenDisabled = false;
public readonly string IndicatorImage = "allyrepair";
public readonly string IndicatorSequence = "repair";
[Desc("Overrides the IndicatorPalettePrefix.")]
public readonly string IndicatorPalette = "";
[Desc("Suffixed by the interal repairing player name.")]
public readonly string IndicatorPalettePrefix = "player";
public object Create(ActorInitializer init) { return new RepairableBuilding(init.Self, this); }
@@ -61,7 +68,7 @@ namespace OpenRA.Mods.Common.Traits
self.World.AddFrameEndTask(w =>
{
if (!self.IsDead)
w.Add(new RepairIndicator(self, Info.IndicatorPalettePrefix));
w.Add(new RepairIndicator(self));
});
}
}

View File

@@ -19,6 +19,11 @@ namespace OpenRA.Mods.Common.Traits
[Desc("Restore power when this trait is disabled.")]
public readonly bool CancelWhenDisabled = false;
public readonly string IndicatorImage = "poweroff";
public readonly string IndicatorSequence = "offline";
public readonly string IndicatorPalette = "chrome";
public object Create(ActorInitializer init) { return new CanPowerDown(init.Self, this); }
}