示例#1
0
 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);
     }
 }
示例#2
0
 public static void Message(string text, MessageTypeDef type)
 {
     if (Messages.AcceptsMessage(text, TargetInfo.Invalid))
     {
         LiveMessage msg = new LiveMessage(text);
         Messages.Message(msg, type);
     }
 }
示例#3
0
 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);
     }
 }
示例#4
0
 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);
     }
 }
示例#5
0
 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);
         }
     }
 }