Rename UpgradableTrait to ConditionalTrait.
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user