public static string ConstraintComparisonTypeToString(ConstraintComparisonType cons) { switch (cons) { case ConstraintComparisonType.Equals: return("=="); case ConstraintComparisonType.NotEquals: return("!="); case ConstraintComparisonType.GreaterThan: return(">"); case ConstraintComparisonType.LessThan: return("<"); case ConstraintComparisonType.GreaterThanEqualTo: return(">="); case ConstraintComparisonType.LessThanEqualTo: return("<="); case ConstraintComparisonType.None: return("Save Only"); } return(""); }
public Constraint(UInt64 parentPlotFragmentId, UInt64 parentPrecondStatementId, bool allowedToSave, UInt64 matchingEntityTypeId, StoryData world) { _matchingEntityTypeId = matchingEntityTypeId; _constraintId = world.getNewId(); _parentPrecondStmtId = parentPrecondStatementId; _allowedToSave = allowedToSave; _parentPlotFragmentId = parentPlotFragmentId; _constraintType = ConstraintComparisonType.Equals; _comparisonValue = new Parameter("", TraitDataType.Text, false, world); _saveAttribute = false; _savedVariable = new Trait("", TraitDataType.Text, "", 0, world); _mustAlwaysBeTrue = false; }
public static string ConstraintComparisonTypeToString(ConstraintComparisonType cons) { switch(cons) { case ConstraintComparisonType.Equals: return "=="; case ConstraintComparisonType.NotEquals: return "!="; case ConstraintComparisonType.GreaterThan: return ">"; case ConstraintComparisonType.LessThan: return "<"; case ConstraintComparisonType.GreaterThanEqualTo: return ">="; case ConstraintComparisonType.LessThanEqualTo: return "<="; case ConstraintComparisonType.None: return "Save Only"; } return ""; }