Ejemplo n.º 1
0
 public MessageReceiver(IMyMultiplayer multiplayer, IMyUtilities utilities)
 {
     this.multiplayer        = multiplayer;
     this.utilities          = utilities;
     this.messageLogger      = new MessageLogger();
     this.spawnToolsReplacer = new SpawnToolsReplacer();
 }
Ejemplo n.º 2
0
 public static void SendMessageTo(this IMyMultiplayer Multiplayer, byte[] message, ulong recipient, bool reliable = true)
 {
     if (!Multiplayer.SendMessageTo(MessageHandler.ModId, message, recipient, reliable))
     {
         throw new MessageTooLongException(message.Length);
     }
 }
Ejemplo n.º 3
0
 public static bool IsClient(this IMyMultiplayer multiplayer)
 {
     if (!multiplayer.MultiplayerActive)
     {
         return(false);
     }
     return(!multiplayer.IsServer);
 }
Ejemplo n.º 4
0
 public static void Clean()
 {
     Session               = null;
     Entities              = null;
     Players               = null;
     CubeBuilder           = null;
     TerminalActionsHelper = null;
     Utilities             = null;
     Parallel              = null;
     Multiplayer           = null;
     PrefabManager         = null;
 }
Ejemplo n.º 5
0
 public static void Clean()
 {
     Session     = null;
     Entities    = null;
     Players     = null;
     CubeBuilder = null;
     if (IngameScripting != null)
     {
         IngameScripting.Clean();
     }
     IngameScripting       = null;
     TerminalActionsHelper = null;
     Utilities             = null;
     Parallel         = null;
     Physics          = null;
     Multiplayer      = null;
     PrefabManager    = null;
     Input            = null;
     TerminalControls = null;
 }
Ejemplo n.º 6
0
 public static void Clean()
 {
     Session = null;
     Entities = null;
     Players = null;
     CubeBuilder = null;
     TerminalActionsHelper = null;
     Utilities = null;
     Parallel = null;
     Multiplayer = null;
     PrefabManager = null;
     Input = null;
 }
 public static void Clean()
 {
     Session = null;
     Entities = null;
     Players = null;
     CubeBuilder = null;
     if (IngameScripting != null)
     {
         IngameScripting.Clean();
     }
     IngameScripting = null;
     TerminalActionsHelper = null;
     Utilities = null;
     Parallel = null;
     Physics = null;
     Multiplayer = null;
     PrefabManager = null;
     Input = null;
     TerminalControls = null;
 }
Ejemplo n.º 8
0
 public MessageSender(IMyMultiplayer multiplayer, IMyUtilities utilities)
 {
     this.multiplayer = multiplayer;
     this.utilities   = utilities;
 }
Ejemplo n.º 9
0
 public static bool TrySendMessageToServer(this IMyMultiplayer Multiplayer, byte[] message, bool reliable = true)
 {
     return(Multiplayer.SendMessageToServer(MessageHandler.ModId, message, reliable));
 }
Ejemplo n.º 10
0
 public static bool TrySendMessageTo(this IMyMultiplayer Multiplayer, byte[] message, ulong recipient, bool reliable = true)
 {
     return(Multiplayer.SendMessageTo(MessageHandler.ModId, message, recipient, reliable));
 }