Rename UpgradableTrait to ConditionalTrait.

This commit is contained in:
Paul Chote
2016-12-23 23:28:34 +00:00
parent d0270ab866
commit 268ed016ab
57 changed files with 114 additions and 114 deletions

View File

@@ -14,7 +14,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits.Sound
{
[Desc("Plays a looping audio file at the actor position. Attach this to the `World` actor to cover the whole map.")]
class AmbientSoundInfo : UpgradableTraitInfo
class AmbientSoundInfo : ConditionalTraitInfo
{
[FieldLoader.Require]
public readonly string SoundFile = null;
@@ -25,7 +25,7 @@ namespace OpenRA.Mods.Common.Traits.Sound
public override object Create(ActorInitializer init) { return new AmbientSound(init.Self, this); }
}
class AmbientSound : UpgradableTrait<AmbientSoundInfo>, ITick
class AmbientSound : ConditionalTrait<AmbientSoundInfo>, ITick
{
ISound currentSound;
bool wasDisabled = true;

View File

@@ -15,7 +15,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits.Sound
{
[Desc("Played when preparing for an attack or attacking.")]
public class AttackSoundsInfo : UpgradableTraitInfo
public class AttackSoundsInfo : ConditionalTraitInfo
{
[Desc("Play a randomly selected sound from this list when preparing for an attack or attacking.")]
public readonly string[] Sounds = { };
@@ -29,7 +29,7 @@ namespace OpenRA.Mods.Common.Traits.Sound
public override object Create(ActorInitializer init) { return new AttackSounds(init, this); }
}
public class AttackSounds : UpgradableTrait<AttackSoundsInfo>, INotifyAttack, ITick
public class AttackSounds : ConditionalTrait<AttackSoundsInfo>, INotifyAttack, ITick
{
readonly AttackSoundsInfo info;
int tick;