public override void CheckCompatibility(ref MisCondition existing) { if (Position == null) { if (!existing.Condition.RequiresPosition()) { throw new InvalidOperationException("The original condition ({0}) did not have a position defined. A position must be specified.".F(existing.Condition)); } } }
public override void Write(ref MisCondition condition) { // Make copy (could submit it to a undo/redo state machine for undo measure...) //MisCondition old = condition; condition = new MisCondition { Condition = ConditionType.FLAG, }; }
public override void Write(ref MisCondition condition) { // Make copy (could submit it to a undo/redo state machine for undo measure...) MisCondition old = condition; condition = new MisCondition { Condition = ConditionType.HARVESTED, Value = Value ?? old.Value, }; }
public override void Write(ref MisCondition condition) { // Make copy (could submit it to a undo/redo state machine for undo measure...) MisCondition old = condition; condition = new MisCondition { Condition = ConditionType.UNITEXISTS, House = House ?? old.House, Unit = Unit ?? old.Unit, }; }
public override void Write(ref MisCondition condition) { // Make copy (could submit it to a undo/redo state machine for undo measure...) MisCondition old = condition; condition = new MisCondition { Condition = ConditionType.TIMER, Compare = Compare ?? old.Compare, Time = Time ?? old.Time }; }
public override void Write(ref MisCondition condition) { // Make copy (could submit it to a undo/redo state machine for undo measure...) MisCondition old = condition; condition = new MisCondition { Condition = ConditionType.REVEALED, Position = Position ?? old.Position, Value = Unknown, }; }
public override void Write(ref MisCondition condition) { // Make copy (could submit it to a undo/redo state machine for undo measure...) MisCondition old = condition; condition = new MisCondition { Condition = ObjectTypeExt.ToConditionType(State), House = House ?? old.House, Value = Unknown, }; }
public override void Write(ref MisCondition condition) { // Make copy (could submit it to a undo/redo state machine for undo measure...) MisCondition old = condition; condition = new MisCondition { Condition = ConditionType.BUILDINGEXISTS, House = House ?? old.House, Building = Building ?? old.Building, }; }
public override void Write(ref MisCondition condition) { // Make copy (could submit it to a undo/redo state machine for undo measure...) MisCondition old = condition; condition = new MisCondition { Condition = ConditionType.UNITEXISTS, House = House ?? old.House, Value = Minimum ?? old.Value, Ratio = Ratio ?? old.Ratio }; }
public override void Write(ref MisCondition condition) { // Make copy (could submit it to a undo/redo state machine for undo measure...) MisCondition old = condition; condition = new MisCondition { Condition = ConditionType.TIMER, InitialDelay = InitialDelay ?? old.InitialDelay, Time = Time ?? old.Time, Value = RunCount ?? old.Value }; }
public override void CheckCompatibility(ref MisCondition existing) { //if (State == null) // if (existing.Condition != ConditionTypeEnum.NO_BUILDINGS_LEFT && existing.Condition != ConditionTypeEnum.NO_UNITS_LEFT) // throw new InvalidOperationException("The original condition ({0}) was not a no more objects condition. The object type must be specified.".F(existing.Condition)); if (House == null) { if (!existing.Condition.RequiresHouse()) { throw new InvalidOperationException("The original condition ({0}) did not have a house defined. A house must be specified.".F(existing.Condition)); } } }
public override void CheckCompatibility(ref MisCondition existing) { if (Unit == null) { if (existing.Condition != ConditionType.UNITEXISTS) { throw new InvalidOperationException("The original condition ({0}) was not a unit exist condition. The unit must be specified.".F(existing.Condition)); } } if (House == null) { if (!existing.Condition.RequiresHouse()) { throw new InvalidOperationException("The original condition ({0}) did not have a house defined. A house must be specified.".F(existing.Condition)); } } }
public override void CheckCompatibility(ref MisCondition existing) { if (Compare == null) { if (existing.Condition != ConditionType.TIMER) { throw new InvalidOperationException("The original condition ({0}) was not a timer condition. The comparer must be specified.".F(existing.Condition)); } } if (Time == null) { if (!existing.Condition.RequiresTime()) { throw new InvalidOperationException("The original condition ({0}) did not have a time defined. A time must be specified.".F(existing.Condition)); } } }
public override void CheckCompatibility(ref MisCondition existing) { if (InitialDelay == null || RunCount == null) { if (existing.Condition != ConditionType.INTERVAL) { throw new InvalidOperationException("The original condition ({0}) was not an interval condition. The initial delay and run count must be specified.".F(existing.Condition)); } } if (Time == null) { if (!existing.Condition.RequiresTime()) { throw new InvalidOperationException("The original condition ({0}) did not have a time defined. A time must be specified.".F(existing.Condition)); } } }
public override void CheckCompatibility(ref MisCondition existing) { if (Ratio == null || Minimum == null) { if (existing.Condition != ConditionType.CASUALTIES) { throw new InvalidOperationException("The original condition ({0}) was not a casuality condition. The minimum loss and ratio must be specified.".F(existing.Condition)); } } if (House == null) { if (!existing.Condition.RequiresHouse()) { throw new InvalidOperationException("The original condition ({0}) did not have a house defined. A house must be specified.".F(existing.Condition)); } } }
public abstract void Write(ref MisCondition action);
public virtual void CheckCompatibility(ref MisCondition existing) { }