internal static void Prefix(ref TechData.SoundType type)
 {
     if (IsFoodSoundType(type))
     {
         type = (TechData.SoundType) int.MaxValue;
     }
 }
Ejemplo n.º 2
0
 static void Prefix(ref TechData.SoundType type)
 {
     $"Trying to play use sound: {type}".logDbg();
     if (restrictedSounds.contains(type))
     {
         type = TechData.SoundType.Default;
     }
 }
 private static bool IsFoodSoundType(TechData.SoundType soundType)
 {
     return(soundType == TechData.SoundType.Meat ||
            soundType == TechData.SoundType.Food ||
            soundType == TechData.SoundType.Liquid);
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Sets the type of the sound.
 /// </summary>
 /// <param name="techType">Type of the tech.</param>
 /// <param name="soundType">Type of the sound.</param>
 void ICraftDataHandler.SetSoundType(TechType techType, TechData.SoundType soundType)
 {
     AddJsonProperty(techType, "soundType", new JsonValue((int)soundType));
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Sets the type of the sound.
 /// </summary>
 /// <param name="techType">Type of the tech.</param>
 /// <param name="soundType">Type of the sound.</param>
 public static void SetSoundType(TechType techType, TechData.SoundType soundType)
 {
     Main.SetSoundType(techType, soundType);
 }