internal static void Prefix(ref TechData.SoundType type)
 {
     if (IsFoodSoundType(type))
     {
         type = (TechData.SoundType) int.MaxValue;
     }
 }
示例#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);
 }
示例#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));
 }
示例#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);
 }