private static void SetupSounds(ThingDef thingDef, PokedexDef pokedexDef) { foreach (var pawnKindLifeStage in thingDef.race.lifeStageAges) { SoundDef sound = SoundDef.Named("Cries/" + pokedexDef.Nat.ToString().PadLeft(3, '0') + ".wav"); if (sound != null) { pawnKindLifeStage.soundAngry = pawnKindLifeStage.soundCall = pawnKindLifeStage.soundDeath = pawnKindLifeStage.soundWounded = sound; } else { Error(pokedexDef, "No sound file?"); } } }
private static void Error(PokedexDef pokedexDef, string msg) { Log.Error(pokedexDef.defName + ":" + msg); }