public static void Message(string text, MessageTypeDef def, bool historical = true) { if (Messages.AcceptsMessage(text, TargetInfo.Invalid)) { Message msg = new Message(text, def); Messages.Message(msg, historical); } }
public static void Message(string text, MessageTypeDef type) { if (Messages.AcceptsMessage(text, TargetInfo.Invalid)) { LiveMessage msg = new LiveMessage(text); Messages.Message(msg, type); } }
public static void Message(string text, LookTargets lookTargets, MessageTypeDef def, bool historical = true) { if (Messages.AcceptsMessage(text, lookTargets)) { Message msg = new Message(text, def, lookTargets); Messages.Message(msg, historical); } }
public static void Message(string text, GlobalTargetInfo lookTarget, MessageTypeDef type) { if (Messages.AcceptsMessage(text, lookTarget)) { LiveMessage msg = new LiveMessage(text, lookTarget); Messages.Message(msg, type); } }
public static void Message(Message msg, bool historical = true) { if (Messages.AcceptsMessage(msg.text, msg.lookTargets)) { if (historical && Find.Archive != null) { Find.Archive.Add(msg); } Messages.liveMessages.Add(msg); while (Messages.liveMessages.Count > 12) { Messages.liveMessages.RemoveAt(0); } if (msg.def.sound != null) { msg.def.sound.PlayOneShotOnCamera(null); } } }