Ejemplo n.º 1
0
 public void ReportCommand(FriendlyShipIntel agent, TaskType taskType, MyTuple <IntelItemType, long> targetKey, TimeSpan timestamp, CommandType commandType = CommandType.Override)
 {
     if (Host != null)
     {
         Host.ReportCommand(agent, taskType, targetKey, timestamp, commandType);
     }
     if (agent.ID == Context.Reference.CubeGrid.EntityId && MyAgent != null)
     {
         MyAgent.AddTask(taskType, targetKey, CommandType.Override, 0, timestamp + CanonicalTimeDiff);
     }
     else
     {
         Context.IGC.SendBroadcastMessage(agent.CommandChannelTag, MyTuple.Create((int)taskType, MyTuple.Create((int)targetKey.Item1, targetKey.Item2), (int)commandType, 0));
     }
 }