public static void UserFeedbackChain(ModSound sound, string message = "") { if (Controller.UseSounds) { SoundDef audio = null; switch (sound) { case ModSound.TaskCompleted: audio = TaskCompleted; break; case ModSound.TaskRejected: audio = TaskRejected; break; } audio.PlayOneShotOnCamera(null); } if (message != "") { Messages.Message(message, MessageTypeDefOf.SilentInput); } }
public static int AddSound(string path, SoundType type = SoundType.Custom, ModSound modSound = null) { instance.AddSound(type, "Origins/" + path, modSound); return(SoundLoader.GetSoundSlot(type, "Origins/" + path)); }