예제 #1
0
        public double BroadcastRange(bool onlyAntenna = false)
        {
            if (!ActiveEntity())
            {
                return(0);
            }

            return(EntityEvaluator.GridBroadcastRange(LinkedGrids));
        }
예제 #2
0
        public double BroadcastRange(bool onlyAntenna = false)
        {
            if (IsClosed())
            {
                return(0);
            }

            if (IsParentEntityGrid)
            {
                var grid = ParentEntity as IMyCubeGrid;

                if (grid == null)
                {
                    return(0);
                }

                return(EntityEvaluator.GridBroadcastRange(LinkedGrids));
            }
            else
            {
                var character = ParentEntity as IMyCharacter;

                if (character == null)
                {
                    return(0);
                }

                var controlledEntity = character as Sandbox.Game.Entities.IMyControllableEntity;

                if (controlledEntity == null || !controlledEntity.EnabledBroadcasting)
                {
                    return(0);
                }

                return(200);                //200 is max range of suit antenna
            }
        }
예제 #3
0
 public double BroadcastRange(bool onlyAntenna = false)
 {
     return(EntityEvaluator.GridBroadcastRange(LinkedGrids, onlyAntenna));
 }