Files
CalamityModPublic/Tiles/Furniture/CraftingStations/StaticRefiner.cs
T
NalydddNobel c1b47d5a60 Tile Map Entries cleanup (part 1)
-Added many entries into "Localization/en-US/Tiles.hjson"
**Note: "Localization/en-US/Mods.CalamityMod.hjson" currently has duplicates for some Map Entries.
-Added Utilities/LocalizationUtils.cs , contains a few helper methods for getting Localized Text instances.
-Updated many Tiles to utilize existing localization values.
**Note: Some tiles may now have altered names, due to their Tile names not matching with their item names previously. (Most notably, Altar of the Accursed)
-Updated Pylons to re-use the text entry from their Item
2023-04-18 17:01:28 -07:00

49 lines
1.5 KiB
C#

using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.Localization;
using Terraria.ModLoader;
using Terraria.ObjectData;
namespace CalamityMod.Tiles.Furniture.CraftingStations
{
public class StaticRefiner : ModTile
{
public override void SetStaticDefaults()
{
Main.tileLighted[Type] = true;
Main.tileFrameImportant[Type] = true;
Main.tileLavaDeath[Type] = true;
TileObjectData.newTile.CopyFrom(TileObjectData.Style3x3);
TileObjectData.addTile(Type);
AddMapEntry(new Color(191, 142, 111), CalamityUtils.GetItemName<Items.Placeables.Furniture.CraftingStations.StaticRefiner>());
AnimationFrameHeight = 54;
//also counts as a Solidifier
AdjTiles = new int[] { TileID.Solidifier };
}
public override bool CreateDust(int i, int j, ref int type)
{
Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, 243, 0f, 0f, 1, new Color(255, 255, 255), 1f);
return false;
}
public override void NumDust(int i, int j, bool fail, ref int num)
{
num = fail ? 1 : 3;
}
public override void AnimateTile(ref int frame, ref int frameCounter)
{
frameCounter++;
if (frameCounter >= 6)
{
frame = (frame + 1) % 10;
frameCounter = 0;
}
}
}
}