-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
55 lines
1.7 KiB
C#
55 lines
1.7 KiB
C#
using CalamityMod.Buffs.Placeables;
|
|
using CalamityMod.Items.Placeables.Furniture;
|
|
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
|
|
{
|
|
public class PinkCandle : ModTile
|
|
{
|
|
public override void SetStaticDefaults()
|
|
{
|
|
Main.tileLighted[Type] = true;
|
|
Main.tileFrameImportant[Type] = true;
|
|
Main.tileLavaDeath[Type] = true;
|
|
TileObjectData.newTile.CopyFrom(TileObjectData.Style1x2);
|
|
TileObjectData.addTile(Type);
|
|
AdjTiles = new int[] { TileID.Candles };
|
|
AddToArray(ref TileID.Sets.RoomNeeds.CountsAsTorch);
|
|
AddMapEntry(new Color(238, 145, 105), CalamityUtils.GetItemName<VigorousCandle>());
|
|
AnimationFrameHeight = 34;
|
|
}
|
|
|
|
public override void AnimateTile(ref int frame, ref int frameCounter)
|
|
{
|
|
frameCounter++;
|
|
if (frameCounter >= 6)
|
|
{
|
|
frame = (frame + 1) % 6;
|
|
frameCounter = 0;
|
|
}
|
|
}
|
|
|
|
public override void NearbyEffects(int i, int j, bool closer)
|
|
{
|
|
Player player = Main.LocalPlayer;
|
|
if (player is null)
|
|
return;
|
|
if (!player.dead && player.active)
|
|
player.AddBuff(ModContent.BuffType<CirrusPinkCandleBuff>(), 20);
|
|
}
|
|
|
|
public override void ModifyLight(int i, int j, ref float r, ref float g, ref float b)
|
|
{
|
|
r = 0.75f;
|
|
g = 0.35f;
|
|
b = 0.65f;
|
|
}
|
|
}
|
|
}
|