A broken Crags Pylon naturally generates
Breaking it gives the standard functional Crags Pylon Rubblemaker can be used to place the broken Pylon Removed Crags Pylon crafting recipe
This commit is contained in:
1 parent
b2b08b130b
commit
4ec0257d6f
3 files changed
+54
-10
No files matched your search
@@ -16,15 +16,5 @@ namespace CalamityMod.Items.Placeables.Pylons
|
||||
Item.value = Item.sellPrice(gold: 2);
|
||||
Item.rare = ItemRarityID.Blue;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe().
|
||||
AddIngredient<ScorchedRemains>(15).
|
||||
AddIngredient<ScorchedBone>(10).
|
||||
AddIngredient(ItemID.Hellstone, 15).
|
||||
AddTile(TileID.Anvils).
|
||||
Register();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
using CalamityMod.Items.Placeables.Pylons;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.Enums;
|
||||
using Terraria.GameContent;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ObjectData;
|
||||
|
||||
namespace CalamityMod.Tiles.Pylons
|
||||
{
|
||||
public class CragsPylonBrokenTile : ModTile
|
||||
{
|
||||
public override string Texture => "CalamityMod/Tiles/Pylons/CragsPylonTile";
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.tileLavaDeath[Type] = false;
|
||||
Main.tileFrameImportant[Type] = true;
|
||||
TileObjectData.newTile.CopyFrom(TileObjectData.Style3x4);
|
||||
TileObjectData.newTile.StyleHorizontal = true;
|
||||
TileObjectData.newTile.LavaDeath = false;
|
||||
TileObjectData.newTile.LavaPlacement = LiquidPlacement.Allowed;
|
||||
TileObjectData.newTile.DrawYOffset = 2;
|
||||
TileObjectData.addTile(Type);
|
||||
|
||||
RegisterItemDrop(ModContent.ItemType<CragsPylon>());
|
||||
FlexibleTileWand.RubblePlacementLarge.AddVariations(ModContent.ItemType<CragsPylon>(), Type, 0);
|
||||
|
||||
AddMapEntry(Color.OrangeRed, CalamityUtils.GetItemName(ModContent.ItemType<CragsPylon>()));
|
||||
TileID.Sets.PreventsSandfall[Type] = true;
|
||||
}
|
||||
public override bool CreateDust(int i, int j, ref int type) => false;
|
||||
}
|
||||
}
|
||||
@@ -6,6 +6,7 @@ using CalamityMod.Tiles.Crags.Lily;
|
||||
using CalamityMod.Tiles.Crags.Spike;
|
||||
using CalamityMod.Tiles.Crags.Tree;
|
||||
using CalamityMod.Tiles.Ores;
|
||||
using CalamityMod.Tiles.Pylons;
|
||||
using CalamityMod.Walls.UnsafeWalls;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
@@ -266,6 +267,24 @@ namespace CalamityMod.World
|
||||
SchematicManager.PlaceSchematic<Action<Chest>>(SchematicManager.CragRuinKey2,
|
||||
new Point(biomeEdge - 150 + house4Offset, Main.maxTilesY - 125), SchematicAnchor.BottomCenter, ref place);
|
||||
|
||||
//place the broken Crags Pylon
|
||||
Point pylonPlace = new Point(GenVars.dungeonSide == 1 ? (biomeStart + biomeMiddle) / 2 : (biomeMiddle + biomeEdge) / 2, Main.maxTilesY - 150);
|
||||
while (!Main.tile[pylonPlace].HasTile && pylonPlace.Y < Main.maxTilesY - 75)
|
||||
pylonPlace.Y++;
|
||||
//make sure there's space to place it
|
||||
for (int i = pylonPlace.X - 1; i <= pylonPlace.X + 1; i++)
|
||||
{
|
||||
for (int j = pylonPlace.Y - 4; j <= pylonPlace.Y; j++)
|
||||
{
|
||||
Tile t = Main.tile[i, j];
|
||||
if (j == pylonPlace.Y)
|
||||
t.ResetToType(Main.tile[pylonPlace].TileType);
|
||||
else
|
||||
WorldGen.KillTile(i, j);
|
||||
}
|
||||
}
|
||||
WorldGen.PlaceObject(pylonPlace.X, pylonPlace.Y - 1, ModContent.TileType<CragsPylonBrokenTile>());
|
||||
|
||||
//lava clean up again
|
||||
for (int x = biomeStart; x <= biomeEdge; x++)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user