コード例 #1
0
 public override IEnumerable <string> ConfigErrors(ThingDef parentDef)
 {
     foreach (var error in base.ConfigErrors(parentDef))
     {
         yield return(error);
     }
     if (toggleDefs == null)
     {
         yield return($"unable to parse defName '{parentDef.defName}' - must have format '<baseName>{toggleDefTag}<toggleKey>'");
     }
     if (labelKey == DefaultLabelKey && !Translator.CanTranslate(labelKey))
     {
         yield return($"{nameof(labelKey)} has default value '{DefaultLabelKey}' which lacks a translation entry");
     }
 }