Ejemplo n.º 1
0
        /// <summary>
        /// Sets IFF on or off.  This is a setting in the reveal event.
        /// 
        /// </summary>
        /// <param name="on"></param>
        /// <param name="isPirate"></param>
        /// <param name="reveal"></param>
        protected T_Reveal SetIFF(bool on, bool isPirate, T_Threat threat, T_Reveal reveal)
        {
            //If we're revealing a new vessel, we can set its IFF on if we need to.  Default is off so we don't 
            // have to do anything.  We can't change existing ships.
            if (reveal != null)
            {
                if (on && !isPirate)
                    SetIFFOn(isPirate, reveal);

                //If it's a pirate, ignore what it says in the ambiguity table.  
                //Unambiguous == IFF ON always.  Ambiguous = IFF OFF always
                if (isPirate && threat == T_Threat.Unambiguous)
                    SetIFFOn(isPirate, reveal);

            }
            return reveal;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Sets IFF on or off.  This is a setting in the reveal event.
        ///
        /// </summary>
        /// <param name="on"></param>
        /// <param name="isPirate"></param>
        /// <param name="reveal"></param>
        protected T_Reveal SetIFF(bool on, bool isPirate, T_Threat threat, T_Reveal reveal)
        {
            //If we're revealing a new vessel, we can set its IFF on if we need to.  Default is off so we don't
            // have to do anything.  We can't change existing ships.
            if (reveal != null)
            {
                if (on && !isPirate)
                {
                    SetIFFOn(isPirate, reveal);
                }

                //If it's a pirate, ignore what it says in the ambiguity table.
                //Unambiguous == IFF ON always.  Ambiguous = IFF OFF always
                if (isPirate && threat == T_Threat.Unambiguous)
                {
                    SetIFFOn(isPirate, reveal);
                }
            }
            return(reveal);
        }