/// <summary> /// Add an exit blueprint to the pipeline. These blueprints are called /// at the end of the chain after all regular blueprints. They receive /// a fully constructed object and are the final chance to alter the /// result of an object. /// </summary> /// <param name="blueprint"></param> /// <returns></returns> public Construktion Apply(ExitBlueprint blueprint) { blueprint = blueprint ?? throw new ArgumentNullException(nameof(blueprint)); apply(x => x.Apply(blueprint)); return(this); }
public Exit(ExitBlueprint blueprint, IRoom destination) { Name = blueprint.Keyword; Keywords = Name?.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries) ?? Enumerable.Empty <string>(); Description = blueprint.Description; Destination = destination; Blueprint = blueprint; CurrentFlags = Blueprint.Flags; }
public IExit AddExit(IRoom from, IRoom to, ExitBlueprint blueprint, ExitDirections direction) { if (blueprint == null) { throw new ArgumentNullException(nameof(blueprint)); } Exit from2To = new Exit(blueprint, to); from.Exits[(int)direction] = from2To; return(from2To); }
public IExit AddExit(IRoom from, IRoom to, ExitBlueprint blueprint, ExitDirections direction) { throw new NotImplementedException(); }
/// <summary> /// Add an exit blueprint to the pipeline. These blueprints are called /// at the end of the chain after all regular blueprints. They receive /// a fully constructed object and are the final chance to alter the /// result of an object. /// </summary> public ConstruktionRegistry AddExitBlueprint(ExitBlueprint blueprint) { _settings.Apply(blueprint); return(this); }
public void Apply(ExitBlueprint exitBlueprint) => _exitBlueprints.Add(exitBlueprint);