Пример #1
0
        public bool IsSatisfied(GameState_EliteDangerous gameState)
        {
            if (callback != null && !callback(gameState))
            {
                return(false);
            }

            if (guiFocus != null && Array.IndexOf(guiFocus, gameState.Status.GuiFocus) == Flag.UNSPECIFIED)
            {
                return(false);
            }

            if (flagsSet != Flag.UNSPECIFIED && !Flag.IsFlagSet(gameState.Status.Flags, flagsSet))
            {
                return(false);
            }

            if (flagsNotSet != Flag.UNSPECIFIED && Flag.AtLeastOneFlagSet(gameState.Status.Flags, flagsNotSet))
            {
                return(false);
            }

            return(true);
        }