Extra astral tiles and some other relevant fixes
No files matched your search
|
Before Width: | Height: | Size: 271 B After Width: | Height: | Size: 283 B |
@@ -0,0 +1,46 @@
|
||||
using CalamityMod.Items.Placeables.Walls;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
namespace CalamityMod.Items.Placeables
|
||||
{
|
||||
public class AstralClay : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Astral Clay");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.createTile = ModContent.TileType<Tiles.Astral.AstralClay>();
|
||||
item.useStyle = 1;
|
||||
item.useTurn = true;
|
||||
item.useAnimation = 15;
|
||||
item.useTime = 10;
|
||||
item.autoReuse = true;
|
||||
item.consumable = true;
|
||||
item.width = 16;
|
||||
item.height = 16;
|
||||
item.maxStack = 999;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
recipe.AddIngredient(this, 2);
|
||||
recipe.AddTile(TileID.Furnaces);
|
||||
recipe.SetResult(ItemID.Bowl);
|
||||
recipe.AddRecipe();
|
||||
recipe = new ModRecipe(mod);
|
||||
recipe.AddIngredient(this, 2);
|
||||
recipe.AddTile(TileID.Furnaces);
|
||||
recipe.SetResult(ItemID.ClayPot);
|
||||
recipe.AddRecipe();
|
||||
recipe = new ModRecipe(mod);
|
||||
recipe.AddIngredient(this, 2);
|
||||
recipe.AddTile(TileID.Furnaces);
|
||||
recipe.SetResult(ItemID.PinkVase);
|
||||
recipe.AddRecipe();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 323 B |
|
Before Width: | Height: | Size: 236 B After Width: | Height: | Size: 231 B |
@@ -0,0 +1,161 @@
|
||||
using CalamityMod.Items.Placeables.Walls;
|
||||
using Terraria.ID;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
using CalamityMod.World;
|
||||
|
||||
namespace CalamityMod.Items.Placeables
|
||||
{
|
||||
public class AstralFossil : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Celestial Remains");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
ItemID.Sets.ExtractinatorMode[item.type] = item.type;
|
||||
item.createTile = ModContent.TileType<Tiles.AstralDesert.AstralFossil>();
|
||||
item.useStyle = 1;
|
||||
item.useTurn = true;
|
||||
item.useAnimation = 15;
|
||||
item.useTime = 10;
|
||||
item.autoReuse = true;
|
||||
item.consumable = true;
|
||||
item.width = 16;
|
||||
item.height = 16;
|
||||
item.maxStack = 999;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
recipe.AddTile(18);
|
||||
recipe.AddIngredient(ModContent.ItemType<AstralFossilWall>(), 4);
|
||||
recipe.SetResult(this, 1);
|
||||
recipe.AddRecipe();
|
||||
base.AddRecipes();
|
||||
}
|
||||
|
||||
public override void ExtractinatorUse(ref int resultType, ref int resultStack)
|
||||
{
|
||||
/*
|
||||
Celestial remains will give stardust, fallen stars, ancient bone dust, gems and HM ores always by default
|
||||
When Astrum Deus has been defeated, it will give Astral Ore
|
||||
*/
|
||||
|
||||
float val = Main.rand.NextFloat(100);
|
||||
if (val < 20f)
|
||||
{
|
||||
resultType = ItemID.CopperCoin;
|
||||
resultStack = Main.rand.Next(1, 100);
|
||||
}
|
||||
else if (val < 27f)
|
||||
{
|
||||
resultType = ItemID.SilverCoin;
|
||||
resultStack = Main.rand.Next(1, 100);
|
||||
}
|
||||
else if (val < 28f)
|
||||
{
|
||||
resultType = ItemID.GoldCoin;
|
||||
resultStack = Main.rand.Next(1, 100);
|
||||
}
|
||||
else if (val < 28.03f)
|
||||
{
|
||||
resultType = ItemID.PlatinumCoin;
|
||||
resultStack = Main.rand.Next(1, 11);
|
||||
}
|
||||
else if (val < 48.03f)
|
||||
{
|
||||
resultType = ModContent.ItemType<Items.Materials.AncientBoneDust>();
|
||||
resultStack = Main.rand.Next(1, 11);
|
||||
}
|
||||
else if (val < 58.03f && !Main.dayTime)
|
||||
{
|
||||
resultType = ItemID.FallenStar;
|
||||
resultStack = Main.rand.Next(1, 11);
|
||||
}
|
||||
else if (val < 58.03f && !Main.dayTime)
|
||||
{
|
||||
resultType = ItemID.FallenStar;
|
||||
resultStack = Main.rand.Next(1, 11);
|
||||
}
|
||||
else if (val < 68.03f)
|
||||
{
|
||||
resultType = ModContent.ItemType<Items.Materials.Stardust>();
|
||||
resultStack = Main.rand.Next(1, 11);
|
||||
}
|
||||
else if (val < 69.03f)
|
||||
{
|
||||
resultType = ItemID.Diamond;
|
||||
resultStack = Main.rand.Next(1, 21);
|
||||
}
|
||||
else if (val < 70.03f)
|
||||
{
|
||||
resultType = ItemID.Ruby;
|
||||
resultStack = Main.rand.Next(1, 21);
|
||||
}
|
||||
else if (val < 71.03f)
|
||||
{
|
||||
resultType = ItemID.Topaz;
|
||||
resultStack = Main.rand.Next(1, 21);
|
||||
}
|
||||
else if (val < 72.03f)
|
||||
{
|
||||
resultType = ItemID.Emerald;
|
||||
resultStack = Main.rand.Next(1, 21);
|
||||
}
|
||||
else if (val < 73.03f)
|
||||
{
|
||||
resultType = ItemID.Sapphire;
|
||||
resultStack = Main.rand.Next(1, 21);
|
||||
}
|
||||
else if (val < 74.03f)
|
||||
{
|
||||
resultType = ItemID.Amethyst;
|
||||
resultStack = Main.rand.Next(1, 21);
|
||||
}
|
||||
else if (val < 79.03f)
|
||||
{
|
||||
resultType = ItemID.Amber;
|
||||
resultStack = Main.rand.Next(1, 21);
|
||||
}
|
||||
else if (val < 81.78f)
|
||||
{
|
||||
resultType = ItemID.PalladiumOre;
|
||||
resultStack = Main.rand.Next(1, 17);
|
||||
}
|
||||
else if (val < 83.03f)
|
||||
{
|
||||
resultType = ItemID.CobaltOre;
|
||||
resultStack = Main.rand.Next(1, 17);
|
||||
}
|
||||
else if (val < 85.03f)
|
||||
{
|
||||
resultType = ItemID.MythrilOre;
|
||||
resultStack = Main.rand.Next(1, 17);
|
||||
}
|
||||
else if (val < 87.03f)
|
||||
{
|
||||
resultType = ItemID.OrichalcumOre;
|
||||
resultStack = Main.rand.Next(1, 17);
|
||||
}
|
||||
else if (val < 88.78f)
|
||||
{
|
||||
resultType = ItemID.AdamantiteOre;
|
||||
resultStack = Main.rand.Next(1, 17);
|
||||
}
|
||||
else if (val < 89.53f)
|
||||
{
|
||||
resultType = ItemID.TitaniumOre;
|
||||
resultStack = Main.rand.Next(1, 17);
|
||||
}
|
||||
else if (CalamityWorld.downedStarGod)
|
||||
{
|
||||
resultType = ModContent.ItemType<Items.Placeables.Ores.AstralOre>();
|
||||
resultStack = Main.rand.Next(1, 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 660 B |
|
Before Width: | Height: | Size: 240 B After Width: | Height: | Size: 253 B |
|
Before Width: | Height: | Size: 291 B After Width: | Height: | Size: 338 B |
@@ -0,0 +1,140 @@
|
||||
|
||||
using Terraria.ID;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
using CalamityMod.World;
|
||||
|
||||
namespace CalamityMod.Items.Placeables
|
||||
{
|
||||
public class AstralSilt : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Novae Slag");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
ItemID.Sets.ExtractinatorMode[item.type] = item.type;
|
||||
item.createTile = ModContent.TileType<Tiles.Astral.AstralSilt>();
|
||||
item.useStyle = 1;
|
||||
item.useTurn = true;
|
||||
item.useAnimation = 15;
|
||||
item.useTime = 10;
|
||||
item.autoReuse = true;
|
||||
item.consumable = true;
|
||||
item.width = 16;
|
||||
item.height = 16;
|
||||
item.maxStack = 999;
|
||||
}
|
||||
public override void ExtractinatorUse(ref int resultType, ref int resultStack)
|
||||
{
|
||||
/*
|
||||
Novae slag will give stardust, fallen stars, gems and HM ores always by default
|
||||
When Astrum Deus has been defeated, it will give Astral Ore
|
||||
*/
|
||||
|
||||
float val = Main.rand.NextFloat(100);
|
||||
if (val < 30f)
|
||||
{
|
||||
resultType = ItemID.CopperCoin;
|
||||
resultStack = Main.rand.Next(1, 100);
|
||||
}
|
||||
else if (val < 37f)
|
||||
{
|
||||
resultType = ItemID.SilverCoin;
|
||||
resultStack = Main.rand.Next(1, 100);
|
||||
}
|
||||
else if (val < 38f)
|
||||
{
|
||||
resultType = ItemID.GoldCoin;
|
||||
resultStack = Main.rand.Next(1, 100);
|
||||
}
|
||||
else if (val < 38.03f)
|
||||
{
|
||||
resultType = ItemID.PlatinumCoin;
|
||||
resultStack = Main.rand.Next(1, 11);
|
||||
}
|
||||
else if (val < 48.03f && !Main.dayTime)
|
||||
{
|
||||
resultType = ItemID.FallenStar;
|
||||
resultStack = Main.rand.Next(1, 21);
|
||||
}
|
||||
else if (val < 58.03f)
|
||||
{
|
||||
resultType = ModContent.ItemType<Items.Materials.Stardust>();
|
||||
resultStack = Main.rand.Next(1, 21);
|
||||
}
|
||||
else if (val < 61.03f)
|
||||
{
|
||||
resultType = ItemID.Diamond;
|
||||
resultStack = Main.rand.Next(1, 21);
|
||||
}
|
||||
else if (val < 64.03f)
|
||||
{
|
||||
resultType = ItemID.Ruby;
|
||||
resultStack = Main.rand.Next(1, 21);
|
||||
}
|
||||
else if (val < 67.03f)
|
||||
{
|
||||
resultType = ItemID.Topaz;
|
||||
resultStack = Main.rand.Next(1, 21);
|
||||
}
|
||||
else if (val < 70.03f)
|
||||
{
|
||||
resultType = ItemID.Emerald;
|
||||
resultStack = Main.rand.Next(1, 21);
|
||||
}
|
||||
else if (val < 73.03f)
|
||||
{
|
||||
resultType = ItemID.Sapphire;
|
||||
resultStack = Main.rand.Next(1, 21);
|
||||
}
|
||||
else if (val < 76.03f)
|
||||
{
|
||||
resultType = ItemID.Amethyst;
|
||||
resultStack = Main.rand.Next(1, 21);
|
||||
}
|
||||
else if (val < 76.53f)
|
||||
{
|
||||
resultType = ItemID.Amber;
|
||||
resultStack = Main.rand.Next(1, 21);
|
||||
}
|
||||
else if (val < 78.78f)
|
||||
{
|
||||
resultType = ItemID.PalladiumOre;
|
||||
resultStack = Main.rand.Next(1, 17);
|
||||
}
|
||||
else if (val < 81.03f)
|
||||
{
|
||||
resultType = ItemID.CobaltOre;
|
||||
resultStack = Main.rand.Next(1, 17);
|
||||
}
|
||||
else if (val < 83.03f)
|
||||
{
|
||||
resultType = ItemID.MythrilOre;
|
||||
resultStack = Main.rand.Next(1, 17);
|
||||
}
|
||||
else if (val < 85.03f)
|
||||
{
|
||||
resultType = ItemID.OrichalcumOre;
|
||||
resultStack = Main.rand.Next(1, 17);
|
||||
}
|
||||
else if (val < 87.78f)
|
||||
{
|
||||
resultType = ItemID.AdamantiteOre;
|
||||
resultStack = Main.rand.Next(1, 17);
|
||||
}
|
||||
else if (val < 89.53f)
|
||||
{
|
||||
resultType = ItemID.TitaniumOre;
|
||||
resultStack = Main.rand.Next(1, 17);
|
||||
}
|
||||
else if (CalamityWorld.downedStarGod)
|
||||
{
|
||||
resultType = ModContent.ItemType<Items.Placeables.Ores.AstralOre>();
|
||||
resultStack = Main.rand.Next(1, 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 322 B |
@@ -0,0 +1,36 @@
|
||||
using CalamityMod.Items.Placeables.Walls;
|
||||
using Terraria.ModLoader;
|
||||
namespace CalamityMod.Items.Placeables
|
||||
{
|
||||
public class AstralSnow : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Astral Snow");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.createTile = ModContent.TileType<Tiles.AstralSnow.AstralSnow>();
|
||||
item.useStyle = 1;
|
||||
item.useTurn = true;
|
||||
item.useAnimation = 15;
|
||||
item.useTime = 10;
|
||||
item.autoReuse = true;
|
||||
item.consumable = true;
|
||||
item.width = 16;
|
||||
item.height = 16;
|
||||
item.maxStack = 999;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
recipe.AddTile(18);
|
||||
recipe.AddIngredient(ModContent.ItemType<AstralSnowWall>(), 4);
|
||||
recipe.SetResult(this, 1);
|
||||
recipe.AddRecipe();
|
||||
base.AddRecipes();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 255 B |
|
Before Width: | Height: | Size: 224 B After Width: | Height: | Size: 226 B |
|
Before Width: | Height: | Size: 517 B After Width: | Height: | Size: 512 B |
@@ -0,0 +1,36 @@
|
||||
using Terraria.ModLoader;
|
||||
using WallTiles = CalamityMod.Walls;
|
||||
namespace CalamityMod.Items.Placeables.Walls
|
||||
{
|
||||
public class AstralFossilWall : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Celestial Remains Wall");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.createWall = ModContent.WallType<WallTiles.AstralFossilWall>();
|
||||
item.useStyle = 1;
|
||||
item.useTurn = true;
|
||||
item.useAnimation = 15;
|
||||
item.useTime = 10;
|
||||
item.autoReuse = true;
|
||||
item.consumable = true;
|
||||
item.width = 16;
|
||||
item.height = 16;
|
||||
item.maxStack = 999;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
recipe.AddTile(18);
|
||||
recipe.AddIngredient(ModContent.ItemType<AstralFossil>());
|
||||
recipe.SetResult(this, 4);
|
||||
recipe.AddRecipe();
|
||||
base.AddRecipes();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 410 B |
@@ -0,0 +1,36 @@
|
||||
using Terraria.ModLoader;
|
||||
using WallTiles = CalamityMod.Walls;
|
||||
namespace CalamityMod.Items.Placeables.Walls
|
||||
{
|
||||
public class AstralSnowWall : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Astral Snow Wall");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.createWall = ModContent.WallType<WallTiles.AstralSnowWallSafe>();
|
||||
item.useStyle = 1;
|
||||
item.useTurn = true;
|
||||
item.useAnimation = 15;
|
||||
item.useTime = 10;
|
||||
item.autoReuse = true;
|
||||
item.consumable = true;
|
||||
item.width = 16;
|
||||
item.height = 16;
|
||||
item.maxStack = 999;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
recipe.AddTile(18);
|
||||
recipe.AddIngredient(ModContent.ItemType<AstralSnow>());
|
||||
recipe.SetResult(this, 4);
|
||||
recipe.AddRecipe();
|
||||
base.AddRecipes();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 408 B |
@@ -1,7 +1,9 @@
|
||||
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Tiles.Abyss
|
||||
{
|
||||
public class AbyssGravel : ModTile
|
||||
@@ -32,5 +34,11 @@ namespace CalamityMod.Tiles.Abyss
|
||||
{
|
||||
num = fail ? 1 : 3;
|
||||
}
|
||||
|
||||
public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak)
|
||||
{
|
||||
CustomTileFraming.FrameTileForCustomMergeFrom(i, j, Type, TileID.Dirt);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -16,6 +16,11 @@ namespace CalamityMod.Tiles
|
||||
AddMapEntry(new Color(68, 58, 145));
|
||||
}
|
||||
|
||||
public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak)
|
||||
{
|
||||
return CustomTileFraming.BetterGemsparkFraming(i, j, resetFrame);
|
||||
}
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, 1, 0f, 0f, 1, new Color(119, 102, 255), 1f);
|
||||
|
||||
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 8.1 KiB |
@@ -0,0 +1,41 @@
|
||||
|
||||
using CalamityMod.Dusts;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Tiles.Astral
|
||||
{
|
||||
public class AstralClay : ModTile
|
||||
{
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Main.tileSolid[Type] = true;
|
||||
Main.tileBlockLight[Type] = true;
|
||||
|
||||
TileMerge.MergeGeneralTiles(Type);
|
||||
TileMerge.MergeAstralTiles(Type);
|
||||
TileMerge.MergeOreTiles(Type);
|
||||
|
||||
dustType = ModContent.DustType<AstralBasic>();
|
||||
drop = ModContent.ItemType<Items.Placeables.AstralClay>();
|
||||
|
||||
AddMapEntry(new Color(133, 69, 115));
|
||||
|
||||
TileID.Sets.ChecksForMerge[Type] = true;
|
||||
TileID.Sets.CanBeClearedDuringOreRunner[Type] = true;
|
||||
}
|
||||
|
||||
public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak)
|
||||
{
|
||||
CustomTileFraming.FrameTileForCustomMerge(i, j, Type, ModContent.TileType<AstralDirt>());
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void NumDust(int i, int j, bool fail, ref int num)
|
||||
{
|
||||
num = fail ? 1 : 3;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 17 KiB |
@@ -17,6 +17,10 @@ namespace CalamityMod.Tiles.Astral
|
||||
TileMerge.MergeGeneralTiles(Type);
|
||||
TileMerge.MergeAstralTiles(Type);
|
||||
TileMerge.MergeOreTiles(Type);
|
||||
TileMerge.MergeTile(Type, TileID.Grass);
|
||||
TileMerge.MergeTile(Type, TileID.CorruptGrass);
|
||||
TileMerge.MergeTile(Type, TileID.HallowedGrass);
|
||||
TileMerge.MergeTile(Type, TileID.FleshGrass);
|
||||
|
||||
dustType = ModContent.DustType<AstralBasic>();
|
||||
drop = ModContent.ItemType<Items.Placeables.AstralDirt>();
|
||||
@@ -29,7 +33,7 @@ namespace CalamityMod.Tiles.Astral
|
||||
|
||||
public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak)
|
||||
{
|
||||
CustomTileFraming.FrameTileForCustomMergeFrom(i, j, Type);
|
||||
CustomTileFraming.FrameTileForCustomMergeFrom(i, j, Type, TileID.Dirt);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
|
||||
using CalamityMod.Tiles.Astral;
|
||||
using CalamityMod.Dusts;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
@@ -15,9 +16,11 @@ namespace CalamityMod.Tiles.Astral
|
||||
Main.tileBlockLight[Type] = true;
|
||||
Main.tileBrick[Type] = true;
|
||||
|
||||
TileMerge.MergeGeneralTiles(Type);
|
||||
TileMerge.MergeAstralTiles(Type);
|
||||
TileMerge.MergeOreTiles(Type);
|
||||
TileMerge.MergeTile(Type, ModContent.TileType<AstralDirt>());
|
||||
TileMerge.MergeTile(Type, TileID.Grass);
|
||||
TileMerge.MergeTile(Type, TileID.CorruptGrass);
|
||||
TileMerge.MergeTile(Type, TileID.HallowedGrass);
|
||||
TileMerge.MergeTile(Type, TileID.FleshGrass);
|
||||
|
||||
dustType = ModContent.DustType<AstralBasic>();
|
||||
drop = ModContent.ItemType<Items.Placeables.AstralDirt>();
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
|
||||
using CalamityMod.Dusts;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Tiles.Astral
|
||||
{
|
||||
public class AstralSilt : ModTile
|
||||
{
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Main.tileSolid[Type] = true;
|
||||
Main.tileBlockLight[Type] = true;
|
||||
|
||||
TileMerge.MergeGeneralTiles(Type);
|
||||
TileMerge.MergeAstralTiles(Type);
|
||||
TileMerge.MergeOreTiles(Type);
|
||||
|
||||
dustType = ModContent.DustType<AstralBasic>();
|
||||
drop = ModContent.ItemType<Items.Placeables.AstralSilt>();
|
||||
|
||||
ModTranslation name = CreateMapEntryName();
|
||||
name.SetDefault("Novae Slag");
|
||||
AddMapEntry(new Color(133, 69, 115));
|
||||
|
||||
TileID.Sets.ChecksForMerge[Type] = true;
|
||||
TileID.Sets.CanBeClearedDuringOreRunner[Type] = true;
|
||||
}
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, ModContent.DustType<AstralBlue>(), 0f, 0f, 1, new Color(255, 255, 255), 1f);
|
||||
Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, ModContent.DustType<AstralOrange>(), 0f, 0f, 1, new Color(255, 255, 255), 1f);
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak)
|
||||
{
|
||||
CustomTileFraming.FrameTileForCustomMerge(i, j, Type, ModContent.TileType<AstralDirt>());
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void NumDust(int i, int j, bool fail, ref int num)
|
||||
{
|
||||
num = fail ? 1 : 3;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
@@ -0,0 +1,42 @@
|
||||
|
||||
using CalamityMod.Dusts;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Tiles.AstralDesert
|
||||
{
|
||||
public class AstralFossil : ModTile
|
||||
{
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Main.tileSolid[Type] = true;
|
||||
Main.tileBlockLight[Type] = true;
|
||||
|
||||
TileMerge.MergeGeneralTiles(Type);
|
||||
TileMerge.MergeDesertTiles(Type);
|
||||
TileMerge.MergeAstralTiles(Type);
|
||||
|
||||
dustType = ModContent.DustType<AstralBasic>();
|
||||
drop = ModContent.ItemType<Items.Placeables.AstralFossil>();
|
||||
|
||||
ModTranslation name = CreateMapEntryName();
|
||||
name.SetDefault("Celestial Remains");
|
||||
AddMapEntry(new Color(59, 50, 77));
|
||||
|
||||
TileID.Sets.ForAdvancedCollision.ForSandshark[Type] = true;
|
||||
}
|
||||
|
||||
public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak)
|
||||
{
|
||||
CustomTileFraming.FrameTileForCustomMerge(i, j, Type, ModContent.TileType<AstralSandstone>(), false, false, false, false, resetFrame);
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void NumDust(int i, int j, bool fail, ref int num)
|
||||
{
|
||||
num = fail ? 1 : 3;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 19 KiB |
@@ -25,7 +25,7 @@ namespace CalamityMod.Tiles.AstralDesert
|
||||
dustType = 108;
|
||||
drop = ModContent.ItemType<Items.Placeables.AstralSand>();
|
||||
|
||||
AddMapEntry(new Color(149, 156, 155));
|
||||
AddMapEntry(new Color(187, 220, 237));
|
||||
|
||||
TileID.Sets.TouchDamageSands[Type] = 15;
|
||||
TileID.Sets.Conversion.Sand[Type] = true;
|
||||
@@ -51,7 +51,8 @@ namespace CalamityMod.Tiles.AstralDesert
|
||||
WorldGen.SquareTileFrame(i, j);
|
||||
return false;
|
||||
}
|
||||
CustomTileFraming.FrameTileForCustomMerge(i, j, Type, ModContent.TileType<AstralDirt>());
|
||||
// CustomTileFraming.FrameTileForCustomMerge(i, j, Type, ModContent.TileType<AstralDirt>());
|
||||
CustomTileFraming.FrameTileForCustomMergeFrom(i, j, Type, ModContent.TileType<AstralDirt>());
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace CalamityMod.Tiles.AstralDesert
|
||||
dustType = ModContent.DustType<AstralBasic>();
|
||||
drop = ModContent.ItemType<Items.Placeables.AstralSandstone>();
|
||||
|
||||
AddMapEntry(new Color(79, 61, 97));
|
||||
AddMapEntry(new Color(93, 78, 107));
|
||||
|
||||
TileID.Sets.Conversion.Sandstone[Type] = true;
|
||||
TileID.Sets.ForAdvancedCollision.ForSandshark[Type] = true;
|
||||
@@ -29,7 +29,8 @@ namespace CalamityMod.Tiles.AstralDesert
|
||||
|
||||
public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak)
|
||||
{
|
||||
CustomTileFraming.FrameTileForCustomMerge(i, j, Type, ModContent.TileType<HardenedAstralSand>(), false, false, false, false, resetFrame);
|
||||
// CustomTileFraming.FrameTileForCustomMerge(i, j, Type, ModContent.TileType<HardenedAstralSand>(), false, false, false, false, resetFrame);
|
||||
CustomTileFraming.FrameTileForCustomMergeFrom(i, j, Type, ModContent.TileType<HardenedAstralSand>());
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace CalamityMod.Tiles.AstralDesert
|
||||
dustType = 108;
|
||||
drop = ModContent.ItemType<Items.Placeables.HardenedAstralSand>();
|
||||
|
||||
AddMapEntry(new Color(45, 36, 63));
|
||||
AddMapEntry(new Color(128, 128, 158));
|
||||
|
||||
TileID.Sets.Conversion.HardenedSand[Type] = true;
|
||||
TileID.Sets.ForAdvancedCollision.ForSandshark[Type] = true;
|
||||
@@ -29,7 +29,8 @@ namespace CalamityMod.Tiles.AstralDesert
|
||||
|
||||
public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak)
|
||||
{
|
||||
CustomTileFraming.FrameTileForCustomMerge(i, j, Type, ModContent.TileType<AstralSand>(), false, false, false, false, resetFrame);
|
||||
// CustomTileFraming.FrameTileForCustomMerge(i, j, Type, ModContent.TileType<AstralSand>(), false, false, false, false, resetFrame);
|
||||
CustomTileFraming.FrameTileForCustomMergeFrom(i, j, Type, ModContent.TileType<AstralSand>());
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ namespace CalamityMod.Tiles.AstralSnow
|
||||
|
||||
public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak)
|
||||
{
|
||||
CustomTileFraming.FrameTileForCustomMerge(i, j, Type, ModContent.TileType<AstralDirt>(), false, false, false, false, resetFrame);
|
||||
CustomTileFraming.FrameTileForCustomMerge(i, j, Type, ModContent.TileType<AstralSnow>(), false, false, false, false, resetFrame);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 27 KiB |
@@ -0,0 +1,55 @@
|
||||
|
||||
using CalamityMod.Tiles.Astral;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Tiles.AstralSnow
|
||||
{
|
||||
public class AstralSnow : ModTile
|
||||
{
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Main.tileSolid[Type] = true;
|
||||
Main.tileBlockLight[Type] = true;
|
||||
Main.tileBrick[Type] = true;
|
||||
|
||||
TileMerge.MergeGeneralTiles(Type);
|
||||
TileMerge.MergeSnowTiles(Type);
|
||||
TileMerge.MergeAstralTiles(Type);
|
||||
|
||||
dustType = 173;
|
||||
drop = ModContent.ItemType<Items.Placeables.AstralSnow>();
|
||||
|
||||
soundType = 2;
|
||||
soundStyle = 48;
|
||||
|
||||
AddMapEntry(new Color(189, 211, 221));
|
||||
|
||||
TileID.Sets.Snow[Type] = true;
|
||||
TileID.Sets.ChecksForMerge[Type] = true;
|
||||
TileID.Sets.CanBeClearedDuringOreRunner[Type] = true;
|
||||
|
||||
SetModTree(new AstralSnowTree());
|
||||
}
|
||||
|
||||
public override void NumDust(int i, int j, bool fail, ref int num)
|
||||
{
|
||||
num = fail ? 1 : 3;
|
||||
}
|
||||
|
||||
public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak)
|
||||
{
|
||||
// CustomTileFraming.FrameTileForCustomMerge(i, j, Type, ModContent.TileType<AstralDirt>(), false, false, false, false, resetFrame);
|
||||
CustomTileFraming.FrameTileForCustomMergeFrom(i, j, Type, ModContent.TileType<AstralDirt>());
|
||||
return false;
|
||||
}
|
||||
|
||||
public override int SaplingGrowthType(ref int style)
|
||||
{
|
||||
style = 0;
|
||||
return ModContent.TileType<AstralSnowTreeSapling>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 19 KiB |
@@ -0,0 +1,39 @@
|
||||
using Terraria.ModLoader;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
|
||||
namespace CalamityMod.Tiles
|
||||
{
|
||||
public class AstralSnowTree : ModTree
|
||||
{
|
||||
public override Texture2D GetTopTextures(int i, int j, ref int frame, ref int frameWidth, ref int frameHeight, ref int xOffsetLeft, ref int yOffset)
|
||||
{
|
||||
frame = (i + j * j) % 6;
|
||||
return ModContent.GetTexture("CalamityMod/Tiles/AstralSnow/AstralSnowTree_Tops");
|
||||
}
|
||||
|
||||
public override Texture2D GetBranchTextures(int i, int j, int trunkOffset, ref int frame)
|
||||
{
|
||||
return ModContent.GetTexture("CalamityMod/Tiles/AstralSnow/AstralSnowTree_Branches");
|
||||
}
|
||||
|
||||
public override Texture2D GetTexture()
|
||||
{
|
||||
return ModContent.GetTexture("CalamityMod/Tiles/AstralSnow/AstralSnowTree");
|
||||
}
|
||||
|
||||
public override int DropWood()
|
||||
{
|
||||
return ModContent.ItemType<Items.Placeables.AstralMonolith>();
|
||||
}
|
||||
|
||||
public override int CreateDust()
|
||||
{
|
||||
return ModContent.DustType<Dusts.AstralBasic>();
|
||||
}
|
||||
|
||||
public override int GrowthFXGore()
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 11 KiB |
@@ -0,0 +1,71 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.Enums;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ObjectData;
|
||||
|
||||
namespace CalamityMod.Tiles.AstralSnow
|
||||
{
|
||||
public class AstralSnowTreeSapling : ModTile
|
||||
{
|
||||
//All of this code is taken directly from Example Mod.
|
||||
//Cheers Blushie
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Main.tileFrameImportant[Type] = true;
|
||||
Main.tileNoAttach[Type] = true;
|
||||
Main.tileLavaDeath[Type] = true;
|
||||
TileObjectData.newTile.Width = 1;
|
||||
TileObjectData.newTile.Height = 2;
|
||||
TileObjectData.newTile.Origin = new Point16(0, 1);
|
||||
TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile, TileObjectData.newTile.Width, 0);
|
||||
TileObjectData.newTile.UsesCustomCanPlace = true;
|
||||
TileObjectData.newTile.CoordinateHeights = new[] { 16, 18 };
|
||||
TileObjectData.newTile.CoordinateWidth = 16;
|
||||
TileObjectData.newTile.CoordinatePadding = 2;
|
||||
TileObjectData.newTile.AnchorValidTiles = new[] { mod.TileType("AstralSnow") };
|
||||
TileObjectData.newTile.StyleHorizontal = true;
|
||||
TileObjectData.newTile.DrawFlipHorizontal = true;
|
||||
TileObjectData.newTile.WaterPlacement = LiquidPlacement.NotAllowed;
|
||||
TileObjectData.newTile.LavaDeath = true;
|
||||
TileObjectData.newTile.RandomStyleRange = 3;
|
||||
TileObjectData.addTile(Type);
|
||||
sapling = true;
|
||||
ModTranslation name = CreateMapEntryName();
|
||||
name.SetDefault("Sapling");
|
||||
AddMapEntry(new Color(200, 200, 200), name);
|
||||
dustType = mod.DustType("AstralBasic");
|
||||
adjTiles = new int[] { TileID.Saplings };
|
||||
}
|
||||
|
||||
public override void NumDust(int i, int j, bool fail, ref int num)
|
||||
{
|
||||
num = fail ? 1 : 3;
|
||||
}
|
||||
|
||||
public override void RandomUpdate(int i, int j)
|
||||
{
|
||||
if (WorldGen.genRand.Next(20) == 0)
|
||||
{
|
||||
bool isPlayerNear = WorldGen.PlayerLOS(i, j);
|
||||
bool success = WorldGen.GrowTree(i, j);
|
||||
if (success && isPlayerNear)
|
||||
{
|
||||
WorldGen.TreeGrowFXCheck(i, j);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void SetSpriteEffects(int i, int j, ref SpriteEffects effects)
|
||||
{
|
||||
if (i % 2 == 1)
|
||||
{
|
||||
effects = SpriteEffects.FlipHorizontally;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 916 B |
|
After Width: | Height: | Size: 4.2 KiB |
|
After Width: | Height: | Size: 8.5 KiB |
@@ -43,7 +43,8 @@ namespace CalamityMod.Tiles.SunkenSea
|
||||
|
||||
public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak)
|
||||
{
|
||||
CustomTileFraming.FrameTileForCustomMerge(i, j, Type, TileID.Sandstone, false, false, false, false, resetFrame);
|
||||
// CustomTileFraming.FrameTileForCustomMerge(i, j, Type, TileID.Sandstone, false, false, false, false, resetFrame);
|
||||
CustomTileFraming.FrameTileForCustomMergeFrom(i, j, Type, TileID.Sandstone);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -102,7 +102,8 @@ namespace CalamityMod.Tiles.SunkenSea
|
||||
|
||||
public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak)
|
||||
{
|
||||
CustomTileFraming.FrameTileForCustomMerge(i, j, Type, ModContent.TileType<EutrophicSand>(), false, false, false, false, resetFrame);
|
||||
// CustomTileFraming.FrameTileForCustomMerge(i, j, Type, ModContent.TileType<EutrophicSand>(), false, false, false, false, resetFrame);
|
||||
CustomTileFraming.FrameTileForCustomMergeFrom(i, j, Type, ModContent.TileType<EutrophicSand>());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,9 +58,13 @@ namespace CalamityMod
|
||||
tileMergeTypes[ModContent.TileType<AstralDirt>()][ModContent.TileType<AstralStone>()] = true;
|
||||
tileMergeTypes[ModContent.TileType<AstralDirt>()][ModContent.TileType<AstralSand>()] = true;
|
||||
tileMergeTypes[ModContent.TileType<AstralDirt>()][ModContent.TileType<AstralMonolith>()] = true;
|
||||
tileMergeTypes[ModContent.TileType<AstralDirt>()][ModContent.TileType<AstralIce>()] = true;
|
||||
tileMergeTypes[ModContent.TileType<AstralDirt>()][ModContent.TileType<AstralSnow>()] = true;
|
||||
tileMergeTypes[ModContent.TileType<AstralDirt>()][ModContent.TileType<AstralClay>()] = true;
|
||||
tileMergeTypes[ModContent.TileType<AstralDirt>()][ModContent.TileType<AstralSilt>()] = true;
|
||||
tileMergeTypes[ModContent.TileType<AstralSnow>()][ModContent.TileType<AstralIce>()] = true;
|
||||
tileMergeTypes[ModContent.TileType<AstralSand>()][ModContent.TileType<HardenedAstralSand>()] = true;
|
||||
tileMergeTypes[ModContent.TileType<HardenedAstralSand>()][ModContent.TileType<AstralSandstone>()] = true;
|
||||
tileMergeTypes[ModContent.TileType<AstralSandstone>()][ModContent.TileType<AstralFossil>()] = true;
|
||||
|
||||
tileMergeTypes[ModContent.TileType<BrimstoneSlag>()][ModContent.TileType<CharredOre>()] = true;
|
||||
|
||||
@@ -72,7 +76,7 @@ namespace CalamityMod
|
||||
tileMergeTypes[ModContent.TileType<AbyssGravel>()][ModContent.TileType<PlantyMush>()] = true;
|
||||
tileMergeTypes[ModContent.TileType<AbyssGravel>()][ModContent.TileType<Voidstone>()] = true;
|
||||
tileMergeTypes[ModContent.TileType<AbyssGravel>()][ModContent.TileType<SulphurousSand>()] = true;
|
||||
tileMergeTypes[ModContent.TileType<PlantyMush>()][ModContent.TileType<Tenebris>()] = true;
|
||||
tileMergeTypes[ModContent.TileType<AbyssGravel>()][ModContent.TileType<Tenebris>()] = true;
|
||||
|
||||
}
|
||||
|
||||
@@ -1479,7 +1483,7 @@ namespace CalamityMod
|
||||
return;
|
||||
}
|
||||
|
||||
public static void FrameTileForCustomMergeFrom(int x, int y, int myType)
|
||||
public static void FrameTileForCustomMergeFrom(int x, int y, int myType, int mergeType)
|
||||
{
|
||||
bool forceSameUp = false;
|
||||
bool forceSameDown = false;
|
||||
@@ -1495,6 +1499,9 @@ namespace CalamityMod
|
||||
|
||||
if (up.active() && tileMergeTypes[myType][up.type])
|
||||
{
|
||||
TileMerge.MergeTile(myType, up.type, false);
|
||||
TileID.Sets.ChecksForMerge[myType] = true;
|
||||
|
||||
bool mergedDown;
|
||||
FrameTileForCustomMerge(x, y - 1, up.type, myType, out tmp, out tmp, out tmp, out mergedDown, false, false, false, false, false);
|
||||
if (mergedDown)
|
||||
@@ -1504,6 +1511,9 @@ namespace CalamityMod
|
||||
}
|
||||
if (left.active() && tileMergeTypes[myType][left.type])
|
||||
{
|
||||
TileMerge.MergeTile(myType, left.type, false);
|
||||
TileID.Sets.ChecksForMerge[myType] = true;
|
||||
|
||||
bool mergedRight;
|
||||
FrameTileForCustomMerge(x - 1, y, left.type, myType, out tmp, out tmp, out mergedRight, out tmp, false, false, false, false, false);
|
||||
if (mergedRight)
|
||||
@@ -1513,6 +1523,9 @@ namespace CalamityMod
|
||||
}
|
||||
if (right.active() && tileMergeTypes[myType][right.type])
|
||||
{
|
||||
TileMerge.MergeTile(myType, right.type, false);
|
||||
TileID.Sets.ChecksForMerge[myType] = true;
|
||||
|
||||
bool mergedLeft;
|
||||
FrameTileForCustomMerge(x + 1, y, right.type, myType, out tmp, out mergedLeft, out tmp, out tmp, false, false, false, false, false);
|
||||
if (mergedLeft)
|
||||
@@ -1522,6 +1535,9 @@ namespace CalamityMod
|
||||
}
|
||||
if (down.active() && tileMergeTypes[myType][down.type])
|
||||
{
|
||||
TileMerge.MergeTile(myType, down.type, false);
|
||||
TileID.Sets.ChecksForMerge[myType] = true;
|
||||
|
||||
bool mergedUp;
|
||||
FrameTileForCustomMerge(x, y + 1, down.type, myType, out mergedUp, out tmp, out tmp, out tmp, false, false, false, false, false);
|
||||
if (mergedUp)
|
||||
@@ -1530,7 +1546,7 @@ namespace CalamityMod
|
||||
}
|
||||
}
|
||||
|
||||
FrameTileForCustomMerge(x, y, myType, TileID.Dirt, forceSameDown, forceSameUp, forceSameLeft, forceSameRight);
|
||||
FrameTileForCustomMerge(x, y, myType, mergeType, forceSameDown, forceSameUp, forceSameLeft, forceSameRight);
|
||||
}
|
||||
|
||||
private static void SetFrameAt(int x, int y, int frameX, int frameY)
|
||||
|
||||
@@ -144,6 +144,7 @@ namespace CalamityMod
|
||||
MergeTile(type, TileID.HallowedIce);
|
||||
//Calam snow tiles
|
||||
MergeTile(type, ModContent.TileType<AstralIce>());
|
||||
MergeTile(type, ModContent.TileType<AstralSnow>());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -197,6 +198,7 @@ namespace CalamityMod
|
||||
MergeTile(type, ModContent.TileType<AstralSandstone>());
|
||||
//Astral Snow
|
||||
MergeTile(type, ModContent.TileType<AstralIce>());
|
||||
MergeTile(type, ModContent.TileType<AstralSnow>());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
|
Before Width: | Height: | Size: 8.8 KiB After Width: | Height: | Size: 8.5 KiB |
@@ -0,0 +1,24 @@
|
||||
using Terraria;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
namespace CalamityMod.Walls
|
||||
{
|
||||
public class AstralFossilWall : ModWall
|
||||
{
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
dustType = ModContent.DustType<Dusts.AstralBasic>();
|
||||
drop = ModContent.ItemType<Items.Placeables.Walls.AstralFossilWall>();
|
||||
Main.wallHouse[Type] = true;
|
||||
|
||||
AddMapEntry(new Color(29, 38, 49));
|
||||
}
|
||||
|
||||
public override void NumDust(int i, int j, bool fail, ref int num)
|
||||
{
|
||||
num = fail ? 1 : 3;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 11 KiB |
@@ -0,0 +1,21 @@
|
||||
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
namespace CalamityMod.Walls
|
||||
{
|
||||
public class AstralSnowWall : ModWall
|
||||
{
|
||||
public override void SetDefaults()
|
||||
{
|
||||
dustType = ModContent.DustType<Dusts.AstralBasic>();
|
||||
|
||||
AddMapEntry(new Color(135, 145, 149));
|
||||
}
|
||||
|
||||
public override void NumDust(int i, int j, bool fail, ref int num)
|
||||
{
|
||||
num = fail ? 1 : 3;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 9.7 KiB |
@@ -0,0 +1,24 @@
|
||||
using Terraria;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
namespace CalamityMod.Walls
|
||||
{
|
||||
public class AstralSnowWallSafe : ModWall
|
||||
{
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
dustType = ModContent.DustType<Dusts.AstralBasic>();
|
||||
drop = ModContent.ItemType<Items.Placeables.Walls.AstralSnowWall>();
|
||||
Main.wallHouse[Type] = true;
|
||||
|
||||
AddMapEntry(new Color(135, 145, 149));
|
||||
}
|
||||
|
||||
public override void NumDust(int i, int j, bool fail, ref int num)
|
||||
{
|
||||
num = fail ? 1 : 3;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 9.7 KiB |
@@ -630,13 +630,13 @@ namespace CalamityMod.World
|
||||
sulphurTiles = tileCounts[ModContent.TileType<SulphurousSand>()];
|
||||
|
||||
#region Astral Stuff
|
||||
int astralDesertTiles = tileCounts[ModContent.TileType<AstralSand>()] + tileCounts[ModContent.TileType<AstralSandstone>()] + tileCounts[ModContent.TileType<HardenedAstralSand>()];
|
||||
int astralSnowTiles = tileCounts[ModContent.TileType<AstralIce>()];
|
||||
int astralDesertTiles = tileCounts[ModContent.TileType<AstralSand>()] + tileCounts[ModContent.TileType<AstralSandstone>()] + tileCounts[ModContent.TileType<HardenedAstralSand>()] + tileCounts[ModContent.TileType<AstralFossil>()];
|
||||
int astralSnowTiles = tileCounts[ModContent.TileType<AstralIce>()] + tileCounts[ModContent.TileType<AstralSnow>()];
|
||||
|
||||
Main.sandTiles += astralDesertTiles;
|
||||
Main.snowTiles += astralSnowTiles;
|
||||
|
||||
astralTiles = astralDesertTiles + astralSnowTiles + tileCounts[ModContent.TileType<AstralDirt>()] + tileCounts[ModContent.TileType<AstralStone>()] + tileCounts[ModContent.TileType<AstralGrass>()] + tileCounts[ModContent.TileType<AstralOre>()];
|
||||
astralTiles = astralDesertTiles + astralSnowTiles + tileCounts[ModContent.TileType<AstralDirt>()] + tileCounts[ModContent.TileType<AstralStone>()] + tileCounts[ModContent.TileType<AstralGrass>()] + tileCounts[ModContent.TileType<AstralOre>()] + tileCounts[ModContent.TileType<AstralSilt>()] + tileCounts[ModContent.TileType<AstralClay>()];
|
||||
#endregion
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -1716,6 +1716,12 @@ namespace CalamityMod.World
|
||||
case WallID.Dirt:
|
||||
Main.tile[x, y].wall = (ushort)ModContent.WallType<AstralDirtWall>();
|
||||
break;
|
||||
case WallID.SnowWallUnsafe:
|
||||
Main.tile[x, y].wall = (ushort)ModContent.WallType<AstralSnowWall>();
|
||||
break;
|
||||
case WallID.DesertFossil:
|
||||
Main.tile[x, y].wall = (ushort)ModContent.WallType<AstralFossilWall>();
|
||||
break;
|
||||
case WallID.IceUnsafe:
|
||||
Main.tile[x, y].wall = (ushort)ModContent.WallType<AstralIceWall>();
|
||||
break;
|
||||
@@ -1753,6 +1759,18 @@ namespace CalamityMod.World
|
||||
case TileID.Dirt:
|
||||
Main.tile[x, y].type = (ushort)ModContent.TileType<AstralDirt>();
|
||||
break;
|
||||
case TileID.SnowBlock:
|
||||
Main.tile[x, y].type = (ushort)ModContent.TileType<AstralSnow>();
|
||||
break;
|
||||
case TileID.Silt:
|
||||
Main.tile[x, y].type = (ushort)ModContent.TileType<AstralSilt>();
|
||||
break;
|
||||
case TileID.DesertFossil:
|
||||
Main.tile[x, y].type = (ushort)ModContent.TileType<AstralFossil>();
|
||||
break;
|
||||
case TileID.ClayBlock:
|
||||
Main.tile[x, y].type = (ushort)ModContent.TileType<AstralClay>();
|
||||
break;
|
||||
case TileID.Vines:
|
||||
Main.tile[x, y].type = (ushort)ModContent.TileType<AstralVines>();
|
||||
break;
|
||||
@@ -1934,6 +1952,14 @@ namespace CalamityMod.World
|
||||
{
|
||||
Main.tile[x, y].wall = WallID.DirtUnsafe;
|
||||
}
|
||||
else if (wallType == ModContent.WallType<AstralSnowWall>() || wallType == ModContent.WallType<AstralSnowWallSafe>())
|
||||
{
|
||||
Main.tile[x, y].wall = WallID.SnowWallUnsafe;
|
||||
}
|
||||
else if (wallType == ModContent.WallType<AstralFossilWall>())
|
||||
{
|
||||
Main.tile[x, y].wall = WallID.DesertFossil;
|
||||
}
|
||||
else if (wallType == ModContent.WallType<AstralGrassWall>())
|
||||
{
|
||||
switch (convert)
|
||||
@@ -1984,6 +2010,22 @@ namespace CalamityMod.World
|
||||
{
|
||||
tile.type = TileID.Dirt;
|
||||
}
|
||||
else if (type == ModContent.TileType<AstralSnow>())
|
||||
{
|
||||
tile.type = TileID.SnowBlock;
|
||||
}
|
||||
else if (type == ModContent.TileType<AstralSilt>())
|
||||
{
|
||||
tile.type = TileID.Silt;
|
||||
}
|
||||
else if (type == ModContent.TileType<AstralFossil>())
|
||||
{
|
||||
tile.type = TileID.DesertFossil;
|
||||
}
|
||||
else if (type == ModContent.TileType<AstralClay>())
|
||||
{
|
||||
tile.type = TileID.ClayBlock;
|
||||
}
|
||||
else if (type == ModContent.TileType<AstralGrass>())
|
||||
{
|
||||
SetTileFromConvert(x, y, convert, TileID.CorruptGrass, TileID.FleshGrass, TileID.HallowedGrass, TileID.Grass);
|
||||
|
||||