Files
CalamityModPublic/Items/Placeables/BaseTiles/BaseBanner.cs
T
Altixal 490afcfe29 bulk TILE changes part 1
- Used
- Added a sell value to Draedon lab furniture (30 copper)
- Above not applied to standard furniture -- Lab doors now sell for 40 copper like other doors
- White rarity applied to non-significant lab furniture
- Reduced most Calamity torch prices from 1 silver to 12 copper (biome torch price)
- Spawn rate candle recipe tweaks
- Added sell price of 40 gold to Altar of the Accursed
- Added sell price of 2 gold to most other crafting stations & Astral Beacon
- Added sell price to monoliths and adjusted obtainment for a couple
- Added sell price to a couple more misc furniture items
2024-09-18 00:55:17 +07:00

39 lines
1.8 KiB
C#

using CalamityMod.Tiles;
using Terraria;
using Terraria.ID;
using Terraria.Localization;
using Terraria.ModLoader;
namespace CalamityMod.Items.Placeables
{
public abstract class BaseBanner : ModItem, ILocalizedModType
{
// As of now, all Calamity banners are nested into one tile with multiple styles.
// We may decide to change this sooner or later. But for now, the only essential value to override is style for generic enemy banners.
public virtual int BannerTileID => ModContent.TileType<MonsterBanner>();
public virtual int BannerTileStyle => 0;
public virtual int BannerKillRequirement => ItemID.Sets.DefaultKillsForBannerNeeded;
// Associated Modded NPC
public virtual int BonusNPCID => MonsterBanner.GetBannerNPC(BannerTileStyle);
public new string LocalizationCategory => "Items.Placeables";
// Override these if there are no NPCs attached to the banner.
public virtual LocalizedText NPCName => NPCLoader.GetNPC(BonusNPCID).DisplayName;
public override LocalizedText DisplayName => CalamityUtils.GetText($"{LocalizationCategory}.FormattedBannerName").WithFormatArgs(NPCName.ToString());
public override LocalizedText Tooltip => CalamityUtils.GetText($"{LocalizationCategory}.FormattedBannerTooltip").WithFormatArgs(NPCName.ToString());
public override void SetStaticDefaults() => ItemID.Sets.KillsToBanner[Type] = BannerKillRequirement;
public override void SetDefaults()
{
Item.DefaultToPlaceableTile(BannerTileID, BannerTileStyle);
// Banners usually have these values.
Item.width = 10;
Item.height = 24;
Item.value = Item.sellPrice(silver: 2);
Item.rare = ItemRarityID.Blue;
}
}
}