Exemplo n.º 1
0
 public override IEnumerable <string> ConfigErrors()
 {
     foreach (string item in base.ConfigErrors())
     {
         yield return(item);
     }
     if (texturePath.NullOrEmpty())
     {
         yield return("missing texturePath");
     }
     if (fertility < 0f)
     {
         yield return(string.Concat("Terrain Def ", this, " has no fertility value set."));
     }
     if (renderPrecedence > 400)
     {
         yield return("Render order " + renderPrecedence + " is out of range (must be < 400)");
     }
     if (generatedFilth != null && (filthAcceptanceMask & FilthSourceFlags.Terrain) > FilthSourceFlags.None)
     {
         yield return(defName + " makes terrain filth and also accepts it.");
     }
     if (this.Flammable() && burnedDef == null && !layerable)
     {
         yield return("flammable but burnedDef is null and not layerable");
     }
     if (burnedDef != null && burnedDef.Flammable())
     {
         yield return("burnedDef is flammable");
     }
 }
Exemplo n.º 2
0
        public override IEnumerable <string> ConfigErrors()
        {
            using (IEnumerator <string> enumerator = base.ConfigErrors().GetEnumerator())
            {
                if (enumerator.MoveNext())
                {
                    string err = enumerator.Current;
                    yield return(err);

                    /*Error: Unable to find new state assignment for yield return*/;
                }
            }
            if (texturePath.NullOrEmpty())
            {
                yield return("missing texturePath");

                /*Error: Unable to find new state assignment for yield return*/;
            }
            if (fertility < 0f)
            {
                yield return("Terrain Def " + this + " has no fertility value set.");

                /*Error: Unable to find new state assignment for yield return*/;
            }
            if (renderPrecedence > 400)
            {
                yield return("Render order " + renderPrecedence + " is out of range (must be < 400)");

                /*Error: Unable to find new state assignment for yield return*/;
            }
            if (generatedFilth != null && acceptTerrainSourceFilth)
            {
                yield return(defName + " makes terrain filth and also accepts it.");

                /*Error: Unable to find new state assignment for yield return*/;
            }
            if (this.Flammable() && burnedDef == null && !layerable)
            {
                yield return("flammable but burnedDef is null and not layerable");

                /*Error: Unable to find new state assignment for yield return*/;
            }
            if (burnedDef != null && burnedDef.Flammable())
            {
                yield return("burnedDef is flammable");

                /*Error: Unable to find new state assignment for yield return*/;
            }
            yield break;
IL_0279:
            /*Error near IL_027a: Unexpected return in MoveNext()*/;
        }