Fuck you *abstractifies your class*
This commit is contained in:
1 parent
329fca21ac
commit
ce3efb7614
3 files changed
+35
-23
No files matched your search
@@ -13,7 +13,7 @@ namespace CalamityMod.Items.Placeables
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.createTile = ModContent.TileType<Tiles.SuperDirectionalTile>();
|
||||
item.createTile = ModContent.TileType<Tiles.MetaTileCrystalExample>();
|
||||
item.useStyle = ItemUseStyleID.SwingThrow;
|
||||
item.useTurn = true;
|
||||
item.useAnimation = 15;
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
using CalamityMod.World;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Tiles
|
||||
{
|
||||
public class MetaTileCrystalExample : SuperDirectionalTile
|
||||
{
|
||||
public override bool Autoload(ref string name, ref string texture)
|
||||
{
|
||||
texture = "CalamityMod/Tiles/MetaTileCrystalExample";
|
||||
return base.Autoload(ref name, ref texture);
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Main.tileSolid[Type] = true;
|
||||
Main.tileBlockLight[Type] = true;
|
||||
|
||||
CalamityUtils.MergeWithGeneral(Type);
|
||||
CalamityUtils.MergeAstralTiles(Type);
|
||||
CalamityUtils.SetMerge(Type, TileID.LeafBlock);
|
||||
CalamityUtils.SetMerge(Type, TileID.LivingMahoganyLeaves);
|
||||
CalamityUtils.SetMerge(Type, TileID.LivingWood);
|
||||
CalamityUtils.SetMerge(Type, TileID.LivingMahogany);
|
||||
|
||||
drop = ModContent.ItemType<Items.Placeables.MetaTile>();
|
||||
AddMapEntry(new Color(45, 36, 63));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,13 +6,8 @@ using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Tiles
|
||||
{
|
||||
public class SuperDirectionalTile : ModTile
|
||||
public abstract class SuperDirectionalTile : ModTile
|
||||
{
|
||||
public override bool Autoload(ref string name, ref string texture)
|
||||
{
|
||||
texture = "CalamityMod/Tiles/MetaTileCrystalExample";
|
||||
return base.Autoload(ref name, ref texture);
|
||||
}
|
||||
private enum TileDirection : byte
|
||||
{
|
||||
Up, Down, Left, Right, UpLeft, UpRight, DownLeft, DownRight, Center
|
||||
@@ -33,22 +28,6 @@ namespace CalamityMod.Tiles
|
||||
{ 1, 1, 2, 2, 3, 3, 1, 2, 3, null, null, null, null }
|
||||
};
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Main.tileSolid[Type] = true;
|
||||
Main.tileBlockLight[Type] = true;
|
||||
|
||||
CalamityUtils.MergeWithGeneral(Type);
|
||||
CalamityUtils.MergeAstralTiles(Type);
|
||||
CalamityUtils.SetMerge(Type, TileID.LeafBlock);
|
||||
CalamityUtils.SetMerge(Type, TileID.LivingMahoganyLeaves);
|
||||
CalamityUtils.SetMerge(Type, TileID.LivingWood);
|
||||
CalamityUtils.SetMerge(Type, TileID.LivingMahogany);
|
||||
|
||||
drop = ModContent.ItemType<Items.Placeables.MetaTile>();
|
||||
AddMapEntry(new Color(45, 36, 63));
|
||||
}
|
||||
|
||||
private TileDirection? GiveDirection(int type, int i, int j)
|
||||
{
|
||||
Tile tile = Main.tile[i, j];
|
||||
|
||||
Reference in new issue
Block a user