Replace ITraitInfo interface with TraitInfo class.
This commit is contained in:
@@ -26,11 +26,11 @@ namespace OpenRA.Mods.Common.Lint
|
||||
this.emitError = emitError;
|
||||
|
||||
foreach (var actorInfo in rules.Actors)
|
||||
foreach (var traitInfo in actorInfo.Value.TraitInfos<ITraitInfo>())
|
||||
foreach (var traitInfo in actorInfo.Value.TraitInfos<TraitInfo>())
|
||||
CheckTrait(actorInfo.Value, traitInfo, rules);
|
||||
}
|
||||
|
||||
void CheckTrait(ActorInfo actorInfo, ITraitInfo traitInfo, Ruleset rules)
|
||||
void CheckTrait(ActorInfo actorInfo, TraitInfo traitInfo, Ruleset rules)
|
||||
{
|
||||
var actualType = traitInfo.GetType();
|
||||
foreach (var field in actualType.GetFields())
|
||||
@@ -50,7 +50,7 @@ namespace OpenRA.Mods.Common.Lint
|
||||
}
|
||||
|
||||
void CheckActorReference(ActorInfo actorInfo,
|
||||
ITraitInfo traitInfo,
|
||||
TraitInfo traitInfo,
|
||||
FieldInfo fieldInfo,
|
||||
IReadOnlyDictionary<string, ActorInfo> dict,
|
||||
ActorReferenceAttribute attribute)
|
||||
@@ -81,7 +81,7 @@ namespace OpenRA.Mods.Common.Lint
|
||||
}
|
||||
|
||||
void CheckWeaponReference(ActorInfo actorInfo,
|
||||
ITraitInfo traitInfo,
|
||||
TraitInfo traitInfo,
|
||||
FieldInfo fieldInfo,
|
||||
IReadOnlyDictionary<string, WeaponInfo> dict,
|
||||
WeaponReferenceAttribute attribute)
|
||||
@@ -99,7 +99,7 @@ namespace OpenRA.Mods.Common.Lint
|
||||
}
|
||||
|
||||
void CheckVoiceReference(ActorInfo actorInfo,
|
||||
ITraitInfo traitInfo,
|
||||
TraitInfo traitInfo,
|
||||
FieldInfo fieldInfo,
|
||||
IReadOnlyDictionary<string, SoundInfo> dict,
|
||||
VoiceSetReferenceAttribute attribute)
|
||||
|
||||
Reference in New Issue
Block a user