|
1 | | -using AET.ModVerify.Settings; |
| 1 | +using AET.ModVerify.Reporting; |
| 2 | +using AET.ModVerify.Settings; |
2 | 3 | using AET.ModVerify.Verifiers.Commons; |
3 | 4 | using AnakinRaW.CommonUtilities.FileSystem.Normalization; |
4 | 5 | using Microsoft.Extensions.DependencyInjection; |
5 | 6 | using PG.StarWarsGame.Engine; |
| 7 | +using PG.StarWarsGame.Engine.Audio.Sfx; |
6 | 8 | using PG.StarWarsGame.Engine.Localization; |
7 | 9 | using System; |
8 | 10 | using System.Collections.Generic; |
9 | 11 | using System.IO.Abstractions; |
10 | 12 | using System.Threading; |
11 | | -using PG.StarWarsGame.Engine.Audio.Sfx; |
12 | 13 |
|
13 | 14 | namespace AET.ModVerify.Verifiers.SfxEvents; |
14 | 15 |
|
@@ -45,6 +46,12 @@ public SfxEventVerifier( |
45 | 46 |
|
46 | 47 | protected override void VerifyEntity(SfxEvent entity, string[] context, double progress, CancellationToken token) |
47 | 48 | { |
| 49 | + if (entity.Name.Length >= PGConstants.MaxSFXEventName) |
| 50 | + { |
| 51 | + AddError(VerificationError.Create(this, VerifierErrorCodes.NameTooLong, |
| 52 | + $"The SFXEvent name '{entity.Name}' is too long. Maximum length is {PGConstants.MaxSFXEventName}.", |
| 53 | + VerificationSeverity.Critical, entity.Name)); |
| 54 | + } |
48 | 55 | VerifyPresetRef(entity, context); |
49 | 56 | VerifySamples(entity, context, token); |
50 | 57 | } |
|
0 commit comments