public TownPortalScrollRecipe(TownPortalScrollItem moditem) : base(moditem.mod)
        {
            this.AddTile(18);                 // Crafting bench

            this.AddRecipeGroup("WormholesMod:EvacPotions", 3);
            this.AddRecipeGroup("WormholesMod:BasicBooks", 1);
            //this.AddIngredient( ItemID.WormholePotion, 1 );
            this.AddIngredient(ItemID.ManaCrystal, 1);
            this.SetResult(moditem, WormholesConfig.Instance.TownPortalRecipeQuantity);
        }
Exemplo n.º 2
0
        public override bool ConsumeItem( Player player )
        {
            var player_pos = player.Center;
            var home_pos = PlayerHelpers.GetSpawnPoint( player );
            player_pos.X -= WormholePortal.Width / 2;
            player_pos.Y -= 128 + player.height + 1;
            home_pos.X -= WormholePortal.Width / 2;
            home_pos.Y -= 128 + player.height + 1;

            TownPortalScrollItem.OpenPortal( (WormholesMod)this.mod, player, player_pos, home_pos );

            return base.ConsumeItem( player );
        }