protected override bool?DetermineSuccess()
        {
            if (!(GameMain.GameSession?.GameMode is CampaignMode campaignMode))
            {
                return(false);
            }

            string[] splitString = Condition.Split(' ');
            string   value       = Condition;

            if (splitString.Length > 0)
            {
                for (int i = 1; i < splitString.Length; i++)
                {
                    value = splitString[i] + (i > 1 && i < splitString.Length ? " " : "");
                }
            }
            else
            {
                DebugConsole.ThrowError($"{Condition} is too short, it should start with an operator followed by a boolean or a floating point value.");
                return(false);
            }

            string op = splitString[0];

            Operator = PropertyConditional.GetOperatorType(op);
            if (Operator == PropertyConditional.OperatorType.None)
            {
                return(false);
            }

            bool?tryBoolean = TryBoolean(campaignMode, value);

            if (tryBoolean != null)
            {
                return(tryBoolean);
            }

            bool?tryFloat = TryFloat(campaignMode, value);

            if (tryFloat != null)
            {
                return(tryFloat);
            }

            DebugConsole.ThrowError($"{value2} ({Condition}) did not match a boolean or a float.");
            return(false);
        }
        protected override bool?DetermineSuccess()
        {
            if (!(GameMain.GameSession?.GameMode is CampaignMode campaignMode))
            {
                return(false);
            }

            string[] splitString = Condition.Split(' ');
            string   value       = Condition;

            if (splitString.Length > 0)
            {
                for (int i = 1; i < splitString.Length; i++)
                {
                    value = splitString[i] + (i > 1 && i < splitString.Length ? " " : "");
                }
            }
            else
            {
                DebugConsole.ThrowError($"{Condition} is too short, it should start with an operator followed by a boolean or a floating point value.");
                return(false);
            }

            string op = splitString[0];

            Operator = PropertyConditional.GetOperatorType(op);
            if (Operator == PropertyConditional.OperatorType.None)
            {
                return(false);
            }

            if (CheckAgainstMetadata)
            {
                object?metadata1 = campaignMode.CampaignMetadata.GetValue(Identifier);
                object?metadata2 = campaignMode.CampaignMetadata.GetValue(value);

                if (metadata1 == null || metadata2 == null)
                {
                    return(Operator switch
                    {
                        PropertyConditional.OperatorType.Equals => metadata1 == metadata2,
                        PropertyConditional.OperatorType.NotEquals => metadata1 != metadata2,
                        _ => false
                    });