public override Actuator CreateItem(LegacyMapBuilder context, Tile currentTile, IReadOnlyList<ActuatorItemData> matchedSequence)
 {
     var items = context.WallActuatorCreator.CurrentGrabableItems.Select(x => context.ItemCreator.CreateItem(x, currentTile));
     return new AlcoveActuator(context.GetWallPosition(matchedSequence[0].TilePosition, context.WallActuatorCreator.CurrentTile), items)
     {
         AlcoveTexture = context.WallTextures[matchedSequence[0].Decoration - 1]
     };
 }
Beispiel #2
0
        public override Actuator CreateItem(LegacyMapBuilder context, Tile currentTile, IReadOnlyList <ActuatorItemData> matchedSequence)
        {
            var items = context.WallActuatorCreator.CurrentGrabableItems.Select(x => context.ItemCreator.CreateItem(x, currentTile));

            return(new AlcoveActuator(context.GetWallPosition(matchedSequence[0].TilePosition, context.WallActuatorCreator.CurrentTile), items)
            {
                AlcoveTexture = context.WallTextures[matchedSequence[0].Decoration - 1]
            });
        }
Beispiel #3
0
 public override Actuator CreateItem(LegacyMapBuilder context, Tile currentTile, IReadOnlyList<ActuatorItemData> matchedSequence)
 {
     return new Button(
         context.GetWallPosition(matchedSequence[0].TilePosition, currentTile),
         context.GetTargetTile(matchedSequence[0]),
         matchedSequence[0].GetActionStateX())
     {
         Texture = context.WallTextures[matchedSequence[0].Decoration - 1],
     };
 }
Beispiel #4
0
 public override Actuator CreateItem(LegacyMapBuilder context, Tile currentTile, IReadOnlyList <ActuatorItemData> matchedSequence)
 {
     return(new Button(
                context.GetWallPosition(matchedSequence[0].TilePosition, currentTile),
                context.GetTargetTile(matchedSequence[0]),
                matchedSequence[0].GetActionStateX())
     {
         Texture = context.WallTextures[matchedSequence[0].Decoration - 1],
     });
 }
 public override Actuator CreateItem(LegacyMapBuilder context, Tile currentTile, IReadOnlyList<ActuatorItemData> matchedSequence)
 {
     var data = matchedSequence[0];
     var constrain = new GrabableItemConstrain(context.GetItemFactory(data.Data), invertConstraion: false);
     var item = context.WallActuatorCreator.CurrentGrabableItems.Select(k => new LegacyItemCreator(context).CreateItem(k, currentTile)).SingleOrDefault();
     return new ExchangerActuator(context.GetWallPosition(data.TilePosition, context.WallActuatorCreator.CurrentTile), item, constrain, data.IsOnceOnly)
     {
         DecorationActivated = context.WallTextures[data.Decoration - 1],
         DecorationDeactived = context.WallTextures[matchedSequence[1].Decoration - 1]
     };
 }
 public override Actuator CreateItem(LegacyMapBuilder context, Tile currentTile, IReadOnlyList<ActuatorItemData> matchedSequence)
 {
     return new SwitchSequenceActuator(
         context.GetWallPosition(matchedSequence[0].TilePosition, context.WallActuatorCreator.CurrentTile),
         matchedSequence.Take(matchedSequence.Count - 1).Select(context.GetTargetTile),
         matchedSequence.Take(matchedSequence.Count - 1).Select(x => x.GetActionStateX()))
     {
         UpTexture = context.WallTextures[matchedSequence[0].Decoration - 1],
         DownTexture = context.WallTextures[matchedSequence[1].Decoration - 1]
     };
 }
 public override Actuator CreateItem(LegacyMapBuilder context, Tile currentTile, IReadOnlyList <ActuatorItemData> matchedSequence)
 {
     return(new SwitchSequenceActuator(
                context.GetWallPosition(matchedSequence[0].TilePosition, context.WallActuatorCreator.CurrentTile),
                matchedSequence.Take(matchedSequence.Count - 1).Select(context.GetTargetTile),
                matchedSequence.Take(matchedSequence.Count - 1).Select(x => x.GetActionStateX()))
     {
         UpTexture = context.WallTextures[matchedSequence[0].Decoration - 1],
         DownTexture = context.WallTextures[matchedSequence[1].Decoration - 1]
     });
 }
 public override Actuator CreateItem(LegacyMapBuilder context, Tile currentTile, IReadOnlyList<ActuatorItemData> matchedSequence)
 {
     Texture2D decoration;
     IConstrain constrain;
     Tile targetTile;
     context.PrepareActuatorData(matchedSequence[0], out targetTile, out constrain, out decoration, putOnWall: true);
     return new KeyHoleActuator(context.GetWallPosition(matchedSequence[0].TilePosition, context.WallActuatorCreator.CurrentTile),
         Enumerable.Repeat(targetTile,1), Enumerable.Repeat(matchedSequence[0].GetActionStateX(),1), constrain, destroyItem: true)
     {
         DecorationTexture = decoration
     };
 }
Beispiel #9
0
        public override Actuator CreateItem(LegacyMapBuilder context, Tile currentTile, IReadOnlyList <ActuatorItemData> matchedSequence)
        {
            var data      = matchedSequence[0];
            var constrain = new GrabableItemConstrain(context.GetItemFactory(data.Data), invertConstraion: false);
            var item      = context.WallActuatorCreator.CurrentGrabableItems.Select(k => new LegacyItemCreator(context).CreateItem(k, currentTile)).SingleOrDefault();

            return(new ExchangerActuator(context.GetWallPosition(data.TilePosition, context.WallActuatorCreator.CurrentTile), item, constrain, onceOnly: true)
            {
                DecorationActivated = context.WallTextures[data.Decoration - 1],
                DecorationDeactived = context.WallTextures[data.Decoration - 1],
            });
        }
 public override Actuator CreateItem(LegacyMapBuilder context, Tile currentTile, IReadOnlyList<ActuatorItemData> matchedSequence)
 {
     var leverDown = matchedSequence[1];
     return new LeverActuator(
         context.GetWallPosition(matchedSequence[0].TilePosition, context.WallActuatorCreator.CurrentTile),
         context.GetTargetTile(matchedSequence[0]),
         false,//TODO onceOnlyy flag ???
         matchedSequence[0].GetActionStateX())
     {
         UpTexture = context.WallTextures[matchedSequence[0].Decoration - 1],
         DownTexture = context.WallTextures[leverDown.Decoration - 1]
     };
 }
        public override Actuator CreateItem(LegacyMapBuilder context, Tile currentTile, IReadOnlyList <ActuatorItemData> matchedSequence)
        {
            Texture2D  decoration;
            IConstrain constrain;
            Tile       targetTile;

            context.PrepareActuatorData(matchedSequence[0], out targetTile, out constrain, out decoration, putOnWall: true);
            return(new KeyHoleActuator(context.GetWallPosition(matchedSequence[0].TilePosition, context.WallActuatorCreator.CurrentTile),
                                       Enumerable.Repeat(targetTile, 1), Enumerable.Repeat(matchedSequence[0].GetActionStateX(), 1), constrain, destroyItem: true)
            {
                DecorationTexture = decoration
            });
        }
        public override Actuator CreateItem(LegacyMapBuilder context, Tile currentTile, IReadOnlyList <ActuatorItemData> matchedSequence)
        {
            var leverDown = matchedSequence[1];

            return(new LeverActuator(
                       context.GetWallPosition(matchedSequence[0].TilePosition, context.WallActuatorCreator.CurrentTile),
                       context.GetTargetTile(matchedSequence[0]),
                       false,//TODO onceOnlyy flag ???
                       matchedSequence[0].GetActionStateX())
            {
                UpTexture = context.WallTextures[matchedSequence[0].Decoration - 1],
                DownTexture = context.WallTextures[leverDown.Decoration - 1]
            });
        }
Beispiel #13
0
        public override Actuator CreateItem(LegacyMapBuilder context, Tile currentTile, IReadOnlyList<ActuatorItemData> matchedSequence)
        {
            descriptor = FindChampionDescriptor(context).Split('|');

            var champion = new Champion(context.ChampionToken, context.CreatureToken.ToEnumerable(), this)
            {
                Name = descriptor[0],
                Title = descriptor[1] + descriptor[2],
                IsMale = descriptor[3] == "M",
            };

            var items = context.WallActuatorCreator.CurrentGrabableItems.Select(k => context.ItemCreator.CreateItem(k, currentTile));

            var res = new ChampoinActuator(context.GetWallPosition(matchedSequence[0].TilePosition, context.WallActuatorCreator.CurrentTile), champion);
            ((CubeGraphic)res.Graphics).Texture = context.WallTextures[matchedSequence[0].Decoration - 1];

            return res;
        }
Beispiel #14
0
        public override Actuator CreateItem(LegacyMapBuilder context, Tile currentTile, IReadOnlyList <ActuatorItemData> matchedSequence)
        {
            descriptor = FindChampionDescriptor(context).Split('|');

            var champion = new Champion(context.ChampionToken, context.CreatureToken.ToEnumerable(), this)
            {
                Name   = descriptor[0],
                Title  = descriptor[1] + descriptor[2],
                IsMale = descriptor[3] == "M",
            };

            var items = context.WallActuatorCreator.CurrentGrabableItems.Select(k => context.ItemCreator.CreateItem(k, currentTile));

            var res = new ChampoinActuator(context.GetWallPosition(matchedSequence[0].TilePosition, context.WallActuatorCreator.CurrentTile), champion);

            ((CubeGraphic)res.Graphics).Texture = context.WallTextures[matchedSequence[0].Decoration - 1];

            return(res);
        }
 public override Actuator CreateItem(LegacyMapBuilder context, Tile currentTile, IReadOnlyList <ActuatorItemData> matchedSequence)
 {
     return(new DecorationItem(context.GetWallPosition(matchedSequence[0].TilePosition, context.WallActuatorCreator.CurrentTile), context.WallTextures[matchedSequence[0].Decoration - 1]));
 }
 public override Actuator CreateItem(LegacyMapBuilder context, Tile currentTile, IReadOnlyList<ActuatorItemData> matchedSequence)
 {
     return new DecorationItem(context.GetWallPosition(matchedSequence[0].TilePosition, context.WallActuatorCreator.CurrentTile), context.WallTextures[matchedSequence[0].Decoration - 1]);
 }