Merge branch '1.4.4' of https://github.com/CalamityTeam/CalamityMod into 1.4.4
No files matched your search
@@ -3,7 +3,6 @@ using System.Reflection;
|
||||
using CalamityMod.Graphics.Renderers.CalamityRenderers;
|
||||
using CalamityMod.Tiles.DraedonStructures;
|
||||
using CalamityMod.Tiles.FurnitureExo;
|
||||
using CalamityMod.Walls;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.GameContent;
|
||||
@@ -173,14 +172,6 @@ namespace CalamityMod.ILEditing
|
||||
//HeldOnlyItem detours Player.dropItemCheck, ItemSlot.Draw (Sb, itemarray, int, int, vector2, color) and ItemSlot.LeftClick_ItemArray to make its stuff work
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Loads things which need to be instantiated later in the load order.
|
||||
/// </summary>
|
||||
public override void AddRecipes()
|
||||
{
|
||||
WallVisibleThroughWater.InitializeWaterMapEntryLookups();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Unloads all IL Editing changes in the mod.
|
||||
/// </summary>
|
||||
|
||||
@@ -7,7 +7,7 @@ using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
public class AbyssalMirror : ModItem, ILocalizedModType
|
||||
public class AbyssalMirror : ModItem, ILocalizedModType, IHoldShiftTooltipItem
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Accessories";
|
||||
public override void SetDefaults()
|
||||
|
||||
@@ -9,7 +9,7 @@ using Terraria.ModLoader;
|
||||
namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
// TODO -- this item includes a dodge accessory, Brain of Cthulhu
|
||||
public class AmalgamatedBrain : ModItem, ILocalizedModType
|
||||
public class AmalgamatedBrain : ModItem, ILocalizedModType, IHoldShiftTooltipItem
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Accessories";
|
||||
public override void SetDefaults()
|
||||
|
||||
@@ -5,6 +5,7 @@ using CalamityMod.CalPlayer.Dashes;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Rarities;
|
||||
using CalamityMod.Tiles.Furniture.CraftingStations;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -12,9 +13,12 @@ using Terraria.ModLoader;
|
||||
namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
[AutoloadEquip(EquipType.Shield)]
|
||||
public class AsgardianAegis : ModItem, ILocalizedModType
|
||||
public class AsgardianAegis : ModItem, ILocalizedModType, IHoldShiftTooltipItem
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Accessories";
|
||||
|
||||
public Color? TooltipExtensionColor => new(195, 223, 255);
|
||||
|
||||
public const int ShieldSlamDamage = 1000;
|
||||
public const float ShieldSlamKnockback = 15f;
|
||||
public const int ShieldSlamIFrames = 12;
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.CalPlayer.Dashes;
|
||||
using CalamityMod.Items.Materials;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -9,9 +10,12 @@ using Terraria.ModLoader;
|
||||
namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
[AutoloadEquip(EquipType.Shield)]
|
||||
public class AsgardsValor : ModItem, ILocalizedModType
|
||||
public class AsgardsValor : ModItem, ILocalizedModType, IHoldShiftTooltipItem
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Accessories";
|
||||
|
||||
public Color? TooltipExtensionColor => new(195, 223, 255);
|
||||
|
||||
public const int ShieldSlamDamage = 200;
|
||||
public const float ShieldSlamKnockback = 9f;
|
||||
public const int ShieldSlamIFrames = 12;
|
||||
|
||||
@@ -8,9 +8,14 @@ using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
public class DaawnlightSpiritOrigin : ModItem, ILocalizedModType
|
||||
public class DaawnlightSpiritOrigin : ModItem, ILocalizedModType, IHoldShiftTooltipItem
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Accessories";
|
||||
|
||||
public bool HidesNormalTooltip => true;
|
||||
public bool HasFlavorTooltip => true;
|
||||
public Color? FlavorTooltipColor => new(149, 28, 235); // #951CEB
|
||||
|
||||
// "Despite the seemingly insane numbers here, I think this item might actually be underpowered"
|
||||
// hindsight: the item was not underpowered. Ozzatron 05NOV2021
|
||||
//
|
||||
|
||||
@@ -12,9 +12,11 @@ using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
public class DarkSunRing : ModItem, ILocalizedModType
|
||||
public class DarkSunRing : ModItem, ILocalizedModType, IHoldShiftTooltipItem
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Accessories";
|
||||
public bool HasFlavorTooltip => true;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(6, 7));
|
||||
|
||||
@@ -8,9 +8,11 @@ using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
public class EclipseMirror : ModItem, ILocalizedModType
|
||||
public class EclipseMirror : ModItem, ILocalizedModType, IHoldShiftTooltipItem
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Accessories";
|
||||
public bool HasFlavorTooltip => true;
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 30;
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.CalPlayer.Dashes;
|
||||
using CalamityMod.Rarities;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -9,9 +10,12 @@ using Terraria.ModLoader;
|
||||
namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
[AutoloadEquip(EquipType.Shield)]
|
||||
public class ElysianAegis : ModItem, ILocalizedModType
|
||||
public class ElysianAegis : ModItem, ILocalizedModType, IHoldShiftTooltipItem
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Accessories";
|
||||
|
||||
public Color? TooltipExtensionColor => new(195, 223, 255);
|
||||
|
||||
public const int ShieldSlamDamage = 500;
|
||||
public const float ShieldSlamKnockback = 12f;
|
||||
public const int ShieldSlamIFrames = 12;
|
||||
|
||||
@@ -4,7 +4,7 @@ using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
public class HallowedRune : ModItem, ILocalizedModType
|
||||
public class HallowedRune : ModItem, ILocalizedModType, IHoldShiftTooltipItem
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Accessories";
|
||||
public override void SetDefaults()
|
||||
|
||||
@@ -29,6 +29,7 @@ namespace CalamityMod.Items.Accessories
|
||||
Item.value = CalamityGlobalItem.RarityOrangeBuyPrice;
|
||||
Item.rare = ItemRarityID.Orange;
|
||||
Item.accessory = true;
|
||||
Item.SetRevExclusive();
|
||||
}
|
||||
|
||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||
|
||||
@@ -1,13 +1,17 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
public class Laudanum : ModItem, ILocalizedModType
|
||||
public class Laudanum : ModItem, ILocalizedModType, IHoldShiftTooltipItem
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Accessories";
|
||||
|
||||
public Color? TooltipExtensionColor => new(195, 223, 255);
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
ItemID.Sets.ShimmerTransformToItem[Type] = ModContent.ItemType<HeartofDarkness>();
|
||||
@@ -20,6 +24,7 @@ namespace CalamityMod.Items.Accessories
|
||||
Item.value = CalamityGlobalItem.RarityOrangeBuyPrice;
|
||||
Item.rare = ItemRarityID.Orange;
|
||||
Item.accessory = true;
|
||||
Item.SetRevExclusive();
|
||||
}
|
||||
|
||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Rarities;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -8,9 +9,13 @@ using Terraria.ModLoader;
|
||||
namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
[AutoloadEquip(EquipType.Face)]
|
||||
public class OccultSkullCrown : ModItem, ILocalizedModType
|
||||
public class OccultSkullCrown : ModItem, ILocalizedModType, IHoldShiftTooltipItem
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Accessories";
|
||||
|
||||
public bool HasFlavorTooltip => true;
|
||||
public Color? TooltipExtensionColor => new(195, 223, 255);
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
|
||||
@@ -30,6 +35,7 @@ namespace CalamityMod.Items.Accessories
|
||||
Item.rare = ModContent.RarityType<DarkBlue>();
|
||||
Item.value = CalamityGlobalItem.RarityDarkBlueBuyPrice;
|
||||
Item.accessory = true;
|
||||
Item.SetRevExclusive();
|
||||
}
|
||||
|
||||
public override void UpdateEquip(Player player)
|
||||
|
||||
@@ -8,7 +8,7 @@ using Terraria.ModLoader;
|
||||
namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
[LegacyName("DukeScales")]
|
||||
public class OldDukeScales : ModItem, ILocalizedModType
|
||||
public class OldDukeScales : ModItem, ILocalizedModType, IHoldShiftTooltipItem
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Accessories";
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
public class PhantomicArtifact : ModItem, ILocalizedModType
|
||||
public class PhantomicArtifact : ModItem, ILocalizedModType, IHoldShiftTooltipItem
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Accessories";
|
||||
public override void SetStaticDefaults()
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System;
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Items.Materials;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -8,9 +8,13 @@ using Terraria.ModLoader;
|
||||
namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
[AutoloadEquip(EquipType.Shield)]
|
||||
public class ShieldoftheHighRuler : ModItem, ILocalizedModType
|
||||
public class ShieldoftheHighRuler : ModItem, ILocalizedModType, IHoldShiftTooltipItem
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Accessories";
|
||||
|
||||
public bool HasFlavorTooltip => true;
|
||||
public Color? TooltipExtensionColor => new(195, 223, 255);
|
||||
|
||||
public const int ShieldSlamIFrames = 12;
|
||||
public const float EoCDashVelocity = 14.5f;
|
||||
public const float TabiDashVelocity = 18.9f;
|
||||
|
||||
@@ -6,7 +6,7 @@ using Terraria.ModLoader;
|
||||
namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
[LegacyName("SpiritGenerator")]
|
||||
public class SpiritGlyph : ModItem, ILocalizedModType
|
||||
public class SpiritGlyph : ModItem, ILocalizedModType, IHoldShiftTooltipItem
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Accessories";
|
||||
public override void SetDefaults()
|
||||
|
||||
@@ -6,7 +6,7 @@ using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
public class StatisNinjaBelt : ModItem, ILocalizedModType
|
||||
public class StatisNinjaBelt : ModItem, ILocalizedModType, IHoldShiftTooltipItem
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Accessories";
|
||||
public override void SetStaticDefaults()
|
||||
|
||||
@@ -14,7 +14,7 @@ using Terraria.ModLoader;
|
||||
namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
[LegacyName("StatisBeltOfCurses")]
|
||||
public class StatisVoidSash : ModItem, ILocalizedModType
|
||||
public class StatisVoidSash : ModItem, ILocalizedModType, IHoldShiftTooltipItem
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Accessories";
|
||||
public override void SetStaticDefaults()
|
||||
|
||||
@@ -21,6 +21,7 @@ namespace CalamityMod.Items.Accessories
|
||||
Item.value = CalamityGlobalItem.RarityOrangeBuyPrice;
|
||||
Item.rare = ItemRarityID.Orange;
|
||||
Item.accessory = true;
|
||||
Item.SetRevExclusive();
|
||||
}
|
||||
|
||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using CalamityMod.Balancing;
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Projectiles.Magic;
|
||||
using CalamityMod.Rarities;
|
||||
@@ -14,7 +13,7 @@ using static Terraria.ModLoader.ModContent;
|
||||
namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
// TODO -- this item includes a dodge accessory, Brain of Cthulhu
|
||||
public class TheAmalgam : ModItem, ILocalizedModType
|
||||
public class TheAmalgam : ModItem, ILocalizedModType, IHoldShiftTooltipItem
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Accessories";
|
||||
public override void SetStaticDefaults()
|
||||
|
||||
@@ -79,6 +79,7 @@ namespace CalamityMod.Items
|
||||
#endregion
|
||||
|
||||
// Miscellaneous stuff
|
||||
public bool revengeanceItem = false;
|
||||
public bool donorItem = false;
|
||||
public bool devItem = false;
|
||||
public bool canFirePointBlankShots = false;
|
||||
@@ -118,6 +119,7 @@ namespace CalamityMod.Items
|
||||
myClone.DischargeEnchantExhaustion = DischargeEnchantExhaustion;
|
||||
|
||||
// Miscellaneous
|
||||
myClone.revengeanceItem = revengeanceItem;
|
||||
myClone.donorItem = donorItem;
|
||||
myClone.devItem = devItem;
|
||||
myClone.canFirePointBlankShots = canFirePointBlankShots;
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace CalamityMod.Items
|
||||
/// When this line is not present, Calamity needs to insert tooltips in an <i>equivalent</i> position.<br />
|
||||
/// The best way to do this is to iterate backwards through all possible vanilla tooltip lines and pick the first one that is present.
|
||||
/// </summary>
|
||||
private static string[] BackupTooltipInsertionLineNames =
|
||||
private static string[] MainTooltipBackupInsertionPositions =
|
||||
{
|
||||
"Material",
|
||||
"Consumable",
|
||||
@@ -58,7 +58,36 @@ namespace CalamityMod.Items
|
||||
"Knockback",
|
||||
"NoTransfer",
|
||||
"FavoriteDesc",
|
||||
"ItemName"
|
||||
"ItemName",
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// This array contains (almost) every single vanilla tooltip in reverse order starting at "Expert" and ending at "Tooltip0".<br />
|
||||
/// Because "Tooltip0" is the first typical tooltip line, this is the earliest conceivable place where a "Revengeance" marker can be inserted.<br />
|
||||
/// Since none of these tooltip lines are guaranteed to exist, Calamity needs to iterate through all of them to find a suitable insertion point.<br />
|
||||
/// The best way to do this is to iterate backwards through all possible vanilla tooltip lines and pick the first one that is present.
|
||||
/// </summary>
|
||||
private static string[] RevTooltipInsertionPositions =
|
||||
{
|
||||
"Expert",
|
||||
"SetBonus",
|
||||
"PrefixAccMeleeSpeed",
|
||||
"PrefixAccMoveSpeed",
|
||||
"PrefixAccDamage",
|
||||
"PrefixAccCritChance",
|
||||
"PrefixAccMaxMana",
|
||||
"PrefixAccDefense",
|
||||
"PrefixKnockback",
|
||||
"PrefixShootSpeed",
|
||||
"PrefixSize",
|
||||
"PrefixUseMana",
|
||||
"PrefixCritChance",
|
||||
"PrefixSpeed",
|
||||
"PrefixDamage",
|
||||
"OneDropLogo",
|
||||
"BuffTime",
|
||||
"WellFedExpert",
|
||||
"EtherianManaWarning",
|
||||
};
|
||||
#endregion
|
||||
|
||||
@@ -90,7 +119,7 @@ namespace CalamityMod.Items
|
||||
if (firstTooltipIndex == -1)
|
||||
{
|
||||
noStandardTooltips = true;
|
||||
foreach (string lineName in BackupTooltipInsertionLineNames)
|
||||
foreach (string lineName in MainTooltipBackupInsertionPositions)
|
||||
{
|
||||
int idx = tooltips.FindIndex((line) => line.Name == lineName);
|
||||
if (idx != -1)
|
||||
@@ -112,7 +141,7 @@ namespace CalamityMod.Items
|
||||
// Adds "Does extra damage to enemies shot at point-blank range" to weapons capable of it.
|
||||
if (canFirePointBlankShots)
|
||||
{
|
||||
var lineText = CalamityUtils.GetText("Misc.PointBlank");
|
||||
LocalizedText lineText = CalamityUtils.GetText("Misc.PointBlank");
|
||||
TooltipLine line = new TooltipLine(Mod, "CalamityMod:PointBlankTooltip", lineText.Value);
|
||||
tooltips.Insert(++lastTooltipIndex, line);
|
||||
}
|
||||
@@ -141,25 +170,22 @@ namespace CalamityMod.Items
|
||||
tooltips.Insert(++lastTooltipIndex, line);
|
||||
}
|
||||
|
||||
// Generic support for any and all Hold SHIFT tooltips.
|
||||
// Generic mechanical implementation of any and all Hold SHIFT tooltips.
|
||||
// For more information, see IHoldShiftTooltipItem.
|
||||
//
|
||||
// Original code lifted from Iban's extended armor tooltips.
|
||||
if (item.ModItem is IHoldShiftTooltipItem holdShiftItem)
|
||||
{
|
||||
string dynamicKey = $"{Mod.Name}:{item.ModItem.Name}_HoldShift";
|
||||
string lineText = item.ModItem.GetLocalizedValue(holdShiftItem.TooltipExtensionKey);
|
||||
var line = new TooltipLine(Mod, dynamicKey, lineText);
|
||||
if (holdShiftItem.TooltipExtensionColor is not null)
|
||||
line.OverrideColor = holdShiftItem.TooltipExtensionColor;
|
||||
TooltipLine[] lines = { line };
|
||||
|
||||
//
|
||||
// Original code lifted from Iban's extended armor tooltips.
|
||||
//
|
||||
bool holdingShift = Main.keyState.IsKeyDown(Keys.LeftShift);
|
||||
|
||||
// If holding SHIFT, actually display the extended tooltip.
|
||||
if (holdingShift && firstTooltipIndex != -1)
|
||||
{
|
||||
string holdShiftText = item.ModItem.GetLocalizedValue(holdShiftItem.TooltipExtensionKey);
|
||||
TooltipLine holdShiftLine = new TooltipLine(Mod, IHoldShiftTooltipItem.ExtensionTooltipID, holdShiftText);
|
||||
if (holdShiftItem.TooltipExtensionColor is not null)
|
||||
holdShiftLine.OverrideColor = holdShiftItem.TooltipExtensionColor;
|
||||
|
||||
// If asked to, remove all standard tooltip lines. This moves the last tooltip index.
|
||||
// This only occurs if the standard tooltip lines are ACTUALLY standard tooltips. Otherwise, don't remove anything!
|
||||
if (holdShiftItem.HidesNormalTooltip && !noStandardTooltips)
|
||||
@@ -168,32 +194,82 @@ namespace CalamityMod.Items
|
||||
lastTooltipIndex -= standardTooltipCount;
|
||||
}
|
||||
|
||||
// Append every "Hold SHIFT" tooltip at the end of standard tooltips.
|
||||
tooltips.InsertRange(++lastTooltipIndex, lines);
|
||||
// Append the "Hold SHIFT" tooltip at the end of standard tooltips.
|
||||
tooltips.Insert(++lastTooltipIndex, holdShiftLine);
|
||||
}
|
||||
|
||||
// If not holding SHIFT, display the extension indicator if appropriate.
|
||||
if (!holdingShift && holdShiftItem.ShowExtensionIndicator)
|
||||
{
|
||||
LocalizedText indicatorText = CalamityUtils.GetText(holdShiftItem.ExtensionIndicatorKey);
|
||||
var indicator = new TooltipLine(Mod, IHoldShiftTooltipItem.ExtensionIndicatorTooltipID, indicatorText.Value);
|
||||
TooltipLine indicator = new TooltipLine(Mod, IHoldShiftTooltipItem.ExtensionIndicatorTooltipID, indicatorText.Value);
|
||||
if (holdShiftItem.ExtensionIndicatorColor is not null)
|
||||
indicator.OverrideColor = holdShiftItem.ExtensionIndicatorColor;
|
||||
|
||||
// Append the extension indicator tooltip at the end of standard tooltips.
|
||||
tooltips.Insert(++lastTooltipIndex, indicator);
|
||||
}
|
||||
|
||||
// Generic support for flavor tooltips.
|
||||
// This is only necessary on items with Hold SHIFT tooltips.
|
||||
// The extended tooltip and tooltip extension indicator are placed above flavor tooltips for vanilla consistency.
|
||||
//
|
||||
// Flavor tooltips display unconditionally if defined. They are visible both when holding SHIFT and when not.
|
||||
if (holdShiftItem.HasFlavorTooltip && holdShiftItem.FlavorTooltipKey is not null)
|
||||
{
|
||||
string flavorText = item.ModItem.GetLocalizedValue(holdShiftItem.FlavorTooltipKey);
|
||||
TooltipLine flavorLine = new TooltipLine(Mod, IHoldShiftTooltipItem.FlavorTooltipID, flavorText);
|
||||
if (holdShiftItem.FlavorTooltipColor is not null)
|
||||
flavorLine.OverrideColor = holdShiftItem.FlavorTooltipColor;
|
||||
|
||||
// Append the flavor tooltip at the end of standard tooltips, after all Hold SHIFT tooltips and reminders.
|
||||
tooltips.Insert(++lastTooltipIndex, flavorLine);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// "Late" tooltips are all inserted after vanilla's "Expert" and "Master" markers.
|
||||
//
|
||||
|
||||
// The best possible position is identified using a separate backwards search.
|
||||
int difficultyTooltipIdx = -1;
|
||||
foreach (string lineName in RevTooltipInsertionPositions)
|
||||
{
|
||||
int idx = tooltips.FindIndex((line) => line.Name == lineName);
|
||||
if (idx != -1)
|
||||
{
|
||||
difficultyTooltipIdx = idx + 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// If the backwards search fails, it defaults to the last known tooltip index from the previous search.
|
||||
if (difficultyTooltipIdx == -1)
|
||||
difficultyTooltipIdx = lastTooltipIndex;
|
||||
|
||||
// Adds "Revengeance" to all items which are Revengeance exclusive, like how vanilla does it for Expert and Master items.
|
||||
if (revengeanceItem)
|
||||
{
|
||||
LocalizedText revText = CalamityUtils.GetText("UI.Revengeance");
|
||||
TooltipLine revLine = new TooltipLine(Mod, "CalamityMod:RevengeanceItem", revText.Value);
|
||||
tooltips.Insert(++difficultyTooltipIdx, revLine);
|
||||
}
|
||||
|
||||
// Adds "Donor Item" and "Developer Item" to donor items and developer items respectively.
|
||||
// This is intentionally at the bottom, below everything else.
|
||||
if (devItem)
|
||||
{
|
||||
TooltipLine line = new TooltipLine(Mod, "CalamityDev", CalamityUtils.ColorMessage("- Developer Item -", CalamityUtils.DevItemColor));
|
||||
tooltips.Add(line);
|
||||
LocalizedText devText = CalamityUtils.GetText("UI.DevItemTooltip");
|
||||
string coloredText = CalamityUtils.ColorMessage(devText.Value, CalamityUtils.DevItemColor);
|
||||
TooltipLine devLine = new TooltipLine(Mod, "CalamityMod:DevItem", coloredText);
|
||||
tooltips.Insert(++difficultyTooltipIdx, devLine);
|
||||
}
|
||||
else if (donorItem)
|
||||
{
|
||||
TooltipLine line = new TooltipLine(Mod, "CalamityDonor", CalamityUtils.ColorMessage("- Donor Item -", CalamityUtils.DonatorItemColor));
|
||||
tooltips.Add(line);
|
||||
LocalizedText donorText = CalamityUtils.GetText("UI.DonorItemTooltip");
|
||||
string coloredText = CalamityUtils.ColorMessage(donorText.Value, CalamityUtils.DonatorItemColor);
|
||||
TooltipLine donorLine = new TooltipLine(Mod, "CalamityMod:DonorItem", coloredText);
|
||||
tooltips.Insert(++difficultyTooltipIdx, donorLine);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
Before Width: | Height: | Size: 431 B After Width: | Height: | Size: 481 B |
@@ -6,16 +6,35 @@ namespace CalamityMod.Items
|
||||
// All actual implementation of this behavior is done in CalamityGlobalItemTooltip.
|
||||
public interface IHoldShiftTooltipItem
|
||||
{
|
||||
#region Default Keys and Colors
|
||||
/// <summary>
|
||||
/// Internal ID for the TooltipLine which contains Calamity items' extended tooltips when holding SHIFT.
|
||||
/// </summary>
|
||||
internal const string ExtensionTooltipID = "CalamityMod:HoldShiftTooltip";
|
||||
|
||||
/// <summary>
|
||||
/// Internal ID for the TooltipLine which contains Calamity items' "Hold SHIFT" extension indicators.
|
||||
/// </summary>
|
||||
internal const string ExtensionIndicatorTooltipID = "CalamityMod:HoldShiftExtensionIndicator";
|
||||
|
||||
/// <summary>
|
||||
/// Internal ID for the TooltipLine which contains Calamity items' flavor tooltips.<br />
|
||||
/// Flavor tooltips on items which do not use this interface will be present in standard vanilla tooltip lines.
|
||||
/// </summary>
|
||||
internal const string FlavorTooltipID = "CalamityMod:FlavorTooltip";
|
||||
|
||||
/// <summary>
|
||||
/// The lang/localization key of the default tooltip extension indicator message.
|
||||
/// The lang/localization key of the default tooltip extension indicator message.<br />
|
||||
/// This key is used for items which don't replace their tooltips when holding SHIFT.
|
||||
/// </summary>
|
||||
public const string DefaultExtensionIndicatorKey = "UI.HoldShiftTooltipExtensionIndicator";
|
||||
|
||||
/// <summary>
|
||||
/// The lang/localization key of the default tooltip replacement indicator message.<br />
|
||||
/// This key is used for items which replace their tooltips entirely when holding SHIFT.
|
||||
/// </summary>
|
||||
public const string DefaultReplacementIndicatorKey = "UI.HoldShiftTooltipReplacementIndicator";
|
||||
|
||||
/// <summary>
|
||||
/// The default color of the default tooltip extension indicator message.
|
||||
/// </summary>
|
||||
@@ -26,27 +45,36 @@ namespace CalamityMod.Items
|
||||
/// </summary>
|
||||
public const string DefaultTooltipExtensionKey = "HoldShiftTooltip";
|
||||
|
||||
/// <summary>
|
||||
/// The default lang/localization key which is queried to show an item's flavor tooltip.
|
||||
/// </summary>
|
||||
public const string DefaultFlavorTooltipKey = "FlavorTooltip";
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// Whether holding Left SHIFT for the tooltip extension hides the normal tooltip. Typically this is false.
|
||||
/// </summary>
|
||||
public virtual bool HidesNormalTooltip => false;
|
||||
|
||||
#region Extension Indicator Properties
|
||||
/// <summary>
|
||||
/// Whether the "Hold SHIFT for more" extension indicator appears by default. Should essentially always be true.<br />
|
||||
/// You can set this to false for "secret" flavor or easter egg tooltips, like the one on Midas Prime.
|
||||
/// You can set this to false for "secret" easter egg tooltips, like the one on Midas Prime.
|
||||
/// </summary>
|
||||
public virtual bool ShowExtensionIndicator => true;
|
||||
|
||||
/// <summary>
|
||||
/// The lang/localization key of this item's tooltip extension indicator message.
|
||||
/// </summary>
|
||||
public virtual string ExtensionIndicatorKey => DefaultExtensionIndicatorKey;
|
||||
public virtual string ExtensionIndicatorKey => HidesNormalTooltip ? DefaultReplacementIndicatorKey : DefaultExtensionIndicatorKey;
|
||||
|
||||
/// <summary>
|
||||
/// The color of this item's tooltip extension indicator message. If set to <b>null</b>, the indicator will not be colored.
|
||||
/// </summary>
|
||||
public virtual Color? ExtensionIndicatorColor => DefaultExtensionIndicatorColor;
|
||||
#endregion
|
||||
|
||||
#region Tooltip Extension Properties
|
||||
/// <summary>
|
||||
/// The lang/localization key which this item uses for its tooltip extension.
|
||||
/// </summary>
|
||||
@@ -56,6 +84,24 @@ namespace CalamityMod.Items
|
||||
/// The color of this item's tooltip extension. If set to <b>null</b>, the tooltip extension will not be colored.
|
||||
/// </summary>
|
||||
public virtual Color? TooltipExtensionColor => null;
|
||||
#endregion
|
||||
|
||||
#region Flavor Tooltip Properties
|
||||
/// <summary>
|
||||
/// Whether or not this item should have a separate flavor tooltip. Flavor tooltips are rendered below tooltip extensions for vanilla consistency.<br />
|
||||
/// Flavor tooltips are optional. If an item only needs a flavor tooltip and not a Hold SHIFT tooltip, just add it to the normal tooltip and don't use this interface.
|
||||
/// </summary>
|
||||
public virtual bool HasFlavorTooltip => false;
|
||||
|
||||
/// <summary>
|
||||
/// The lang/localization key which this item uses for its flavor tooltip.
|
||||
/// </summary>
|
||||
public virtual string FlavorTooltipKey => DefaultFlavorTooltipKey;
|
||||
|
||||
/// <summary>
|
||||
/// The color of this item's flavor tooltip. If set to <b>null</b>, the flavor tooltip will not be colored.
|
||||
/// </summary>
|
||||
public virtual Color? FlavorTooltipColor => null;
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -22,7 +22,8 @@ namespace CalamityMod.Items.PermanentBoosters
|
||||
Item.useStyle = ItemUseStyleID.HoldUp;
|
||||
Item.UseSound = SoundID.Item122;
|
||||
Item.consumable = true;
|
||||
Item.rare = ModContent.RarityType<PureGreen>(); // Not researchable, only drops one time.
|
||||
Item.rare = ModContent.RarityType<PureGreen>();
|
||||
Item.SetRevExclusive();
|
||||
}
|
||||
|
||||
public override bool CanUseItem(Player player) => !player.Calamity().adrenalineBoostThree;
|
||||
|
||||
@@ -18,6 +18,7 @@ namespace CalamityMod.Items.PermanentBoosters
|
||||
Item.useStyle = ItemUseStyleID.HoldUp;
|
||||
Item.UseSound = SoundID.Item122;
|
||||
Item.consumable = true;
|
||||
Item.SetRevExclusive();
|
||||
}
|
||||
|
||||
public override bool CanUseItem(Player player)
|
||||
|
||||
@@ -17,7 +17,8 @@ namespace CalamityMod.Items.PermanentBoosters
|
||||
Item.useTime = 30;
|
||||
Item.useStyle = ItemUseStyleID.HoldUp;
|
||||
Item.UseSound = SoundID.Item122;
|
||||
Item.consumable = true; // Not researchable, only drops one time.
|
||||
Item.consumable = true;
|
||||
Item.SetRevExclusive();
|
||||
}
|
||||
|
||||
public override bool CanUseItem(Player player) => !player.Calamity().rageBoostTwo;
|
||||
|
||||
@@ -17,7 +17,8 @@ namespace CalamityMod.Items.PermanentBoosters
|
||||
Item.useTime = 30;
|
||||
Item.useStyle = ItemUseStyleID.HoldUp;
|
||||
Item.UseSound = SoundID.Item122;
|
||||
Item.consumable = true; // Not researchable, only drops one time.
|
||||
Item.consumable = true;
|
||||
Item.SetRevExclusive();
|
||||
}
|
||||
|
||||
public override bool CanUseItem(Player player) => !player.Calamity().rageBoostOne;
|
||||
|
||||
@@ -21,7 +21,8 @@ namespace CalamityMod.Items.PermanentBoosters
|
||||
Item.useStyle = ItemUseStyleID.HoldUp;
|
||||
Item.UseSound = SoundID.Item122;
|
||||
Item.consumable = true;
|
||||
Item.rare = ItemRarityID.Purple; // Not researchable, only drops one time.
|
||||
Item.rare = ItemRarityID.Purple;
|
||||
Item.SetRevExclusive();
|
||||
}
|
||||
|
||||
public override bool CanUseItem(Player player) => !player.Calamity().rageBoostThree;
|
||||
|
||||
@@ -17,7 +17,8 @@ namespace CalamityMod.Items.PermanentBoosters
|
||||
Item.useTime = 30;
|
||||
Item.useStyle = ItemUseStyleID.HoldUp;
|
||||
Item.UseSound = SoundID.Item122;
|
||||
Item.consumable = true; // Not researchable, only drops one time.
|
||||
Item.consumable = true;
|
||||
Item.SetRevExclusive();
|
||||
}
|
||||
|
||||
public override bool CanUseItem(Player player)
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
using CalamityMod.Tiles.FurnitureMarnite;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Placeables.FurnitureMarnite
|
||||
{
|
||||
public class MarniteToilet : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Placeables";
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 16;
|
||||
Item.height = 28;
|
||||
Item.maxStack = 9999;
|
||||
Item.useTurn = true;
|
||||
Item.autoReuse = true;
|
||||
Item.useAnimation = 15;
|
||||
Item.useTime = 10;
|
||||
Item.useStyle = ItemUseStyleID.Swing;
|
||||
Item.consumable = true;
|
||||
Item.value = 0;
|
||||
Item.createTile = ModContent.TileType<Tiles.FurnitureMarnite.MarniteToilet>();
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe().
|
||||
AddIngredient<PolishedMarniteBlock>(6).
|
||||
AddTile(TileID.WorkBenches).
|
||||
Register();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 420 B |
@@ -12,6 +12,7 @@ namespace CalamityMod.Items.Placeables.MusicBoxes
|
||||
{
|
||||
ItemID.Sets.CanGetPrefixes[Type] = false;
|
||||
ItemID.Sets.ShimmerTransformToItem[Type] = ItemID.MusicBox;
|
||||
MusicLoader.AddMusicBox(Mod, MusicLoader.GetMusicSlot(Mod, "Sounds/Music/DraedonExoSelect"), Type, ModContent.TileType<Tiles.MusicBoxes.DraedonExoSelectMusicBox>());
|
||||
}
|
||||
|
||||
public override void SetDefaults() => Item.DefaultToMusicBox(ModContent.TileType<Tiles.MusicBoxes.DraedonExoSelectMusicBox>(), 0);
|
||||
|
||||
@@ -11,6 +11,7 @@ namespace CalamityMod.Items.Placeables.MusicBoxes
|
||||
{
|
||||
ItemID.Sets.CanGetPrefixes[Type] = false;
|
||||
ItemID.Sets.ShimmerTransformToItem[Type] = ItemID.MusicBox;
|
||||
MusicLoader.AddMusicBox(Mod, MusicLoader.GetMusicSlot(Mod, "Sounds/Music/DraedonTalk"), Type, ModContent.TileType<Tiles.MusicBoxes.DraedonTalkMusicBox>());
|
||||
}
|
||||
|
||||
public override void SetDefaults() => Item.DefaultToMusicBox(ModContent.TileType<Tiles.MusicBoxes.DraedonTalkMusicBox>(), 0);
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
{
|
||||
Item.width = 28;
|
||||
Item.height = 30;
|
||||
Item.damage = 75;
|
||||
Item.damage = 68;
|
||||
Item.DamageType = DamageClass.Magic;
|
||||
Item.mana = 15;
|
||||
Item.useTime = 20;
|
||||
|
||||
@@ -15,7 +15,9 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
public class NanoblackReaper : RogueWeapon, IHoldShiftTooltipItem
|
||||
{
|
||||
public bool ShowExtensionIndicator => false;
|
||||
public bool HasFlavorTooltip => true;
|
||||
public Color? TooltipExtensionColor => new Color(31, 223, 128); // #1FDF80
|
||||
public Color? FlavorTooltipColor => TooltipExtensionColor;
|
||||
|
||||
public static float Knockback = 9f;
|
||||
public static float Speed = 16f;
|
||||
|
||||
@@ -11,7 +11,7 @@ DevilFish: So called for their demonic horns, devilfish absorb the fumes left be
|
||||
EidolonWyrm: Relatives of the auric dragons, they adapted to hide away in a forgotten corner of the world to survive the great purges. And yet even without auric souls, the power of eidolon wyrms rivals many of their brethren who possessed them.
|
||||
GiantSquid: Squid are known to be cannibalistic animals, having few qualms with consuming their own kind when in need of food. Quite ironically, this creature's main predator is itself.
|
||||
GulperEel: Though sluggish and bulky, these eels traverse the abyss with surprising ease. They blend into the darkness, with a mouth that can stretch abnormally wide used to slowly swallow prey whole. Their meals are left unaware of their predicament until it is far too late.
|
||||
Laserfish: Its eyes are blinded by bacteria that gather in large sacs on its head. As it swims through the waters, relying on primitive echolocation, the bacteria are able to release concussive blasts to clear its path.
|
||||
Laserfish: Although Draedon focused very little on researching the Abyss due to the immense pressure making it impractical, what time his machines did spend here can be seen in Laserfish. These cybernetic fish were once meant to act his eyes in the trench, along with being an experiment on how a biological body copes with a mechanical mind.
|
||||
LuminousCorvina: Lumenyl grows on the fins of these exotic corvina, making these creatures one of the few sources of light in the Abyss. It survives by guiding what would be its predators to other prey, signaling where it is by emitting a shrill pulse.
|
||||
MirageJelly: Using the light refracted from lumenyl crystals and water warmed by the scorching heat of scoria, these jellyfish can create afterimages of themselves to confuse predators, or catch prey of their own.
|
||||
MorayEel: When a fish bites your heel and it looks like an eel, that's a moray. When it swims in the reef and has two sets of teeth, that's a moray. When you're slapped in the face with a slimy embrace, that's a moray.
|
||||
|
||||
@@ -83,7 +83,7 @@ MOAB: {
|
||||
Acceleration multiplier: 1.0
|
||||
Good vertical speed
|
||||
Flight time: 75
|
||||
32% increased jump speed and allows constant jumping
|
||||
32% increased jump speed and allows auto-jump
|
||||
Grants the player cloud, blizzard, and sandstorm mid-air jumps
|
||||
'The Mother Of All Balloons'
|
||||
'''
|
||||
|
||||
@@ -85,20 +85,12 @@ CometShard: {
|
||||
|
||||
Ectoheart: {
|
||||
DisplayName: Ectoheart
|
||||
Tooltip:
|
||||
'''
|
||||
Permanently increases Adrenaline Mode damage by 20% and damage reduction by 5%
|
||||
Revengeance drop
|
||||
'''
|
||||
Tooltip: Permanently increases Adrenaline Mode damage by 20% and damage reduction by 5%
|
||||
}
|
||||
|
||||
ElectrolyteGelPack: {
|
||||
DisplayName: Electrolyte Gel Pack
|
||||
Tooltip:
|
||||
'''
|
||||
Permanently increases Adrenaline Mode damage by 20% and damage reduction by 5%
|
||||
Revengeance drop
|
||||
'''
|
||||
Tooltip: Permanently increases Adrenaline Mode damage by 20% and damage reduction by 5%
|
||||
}
|
||||
|
||||
EtherealCore: {
|
||||
@@ -112,11 +104,7 @@ EtherealCore: {
|
||||
|
||||
InfernalBlood: {
|
||||
DisplayName: Infernal Blood
|
||||
Tooltip:
|
||||
'''
|
||||
Permanently increases the duration of Rage Mode by 1 second
|
||||
Revengeance drop
|
||||
'''
|
||||
Tooltip: Permanently increases the duration of Rage Mode by 1 second
|
||||
}
|
||||
|
||||
MiracleFruit: {
|
||||
@@ -131,11 +119,7 @@ MiracleFruit: {
|
||||
|
||||
MushroomPlasmaRoot: {
|
||||
DisplayName: Mushroom Plasma Root
|
||||
Tooltip:
|
||||
'''
|
||||
Permanently increases the duration of Rage Mode by 1 second
|
||||
Revengeance drop
|
||||
'''
|
||||
Tooltip: Permanently increases the duration of Rage Mode by 1 second
|
||||
}
|
||||
|
||||
PhantomHeart: {
|
||||
@@ -149,11 +133,7 @@ PhantomHeart: {
|
||||
|
||||
RedLightningContainer: {
|
||||
DisplayName: Red Lightning Container
|
||||
Tooltip:
|
||||
'''
|
||||
Permanently increases the duration of Rage Mode by 1 second
|
||||
Revengeance drop
|
||||
'''
|
||||
Tooltip: Permanently increases the duration of Rage Mode by 1 second
|
||||
}
|
||||
|
||||
SacredStrawberry: {
|
||||
@@ -178,11 +158,7 @@ SanguineTangerine: {
|
||||
|
||||
StarlightFuelCell: {
|
||||
DisplayName: Starlight Fuel Cell
|
||||
Tooltip:
|
||||
'''
|
||||
Permanently increases Adrenaline Mode damage by 20% and damage reduction by 5%
|
||||
Revengeance drop
|
||||
'''
|
||||
Tooltip: Permanently increases Adrenaline Mode damage by 20% and damage reduction by 5%
|
||||
}
|
||||
|
||||
TaintedCloudberry: {
|
||||
|
||||
@@ -1911,6 +1911,121 @@ ExoWorkBench: {
|
||||
Tooltip: ""
|
||||
}
|
||||
|
||||
MarniteChest: {
|
||||
DisplayName: Marnite Chest
|
||||
Tooltip: ""
|
||||
}
|
||||
|
||||
MarniteDresser: {
|
||||
DisplayName: Marnite Dresser
|
||||
Tooltip: ""
|
||||
}
|
||||
|
||||
MarniteBathtub: {
|
||||
DisplayName: Marnite Bathtub
|
||||
Tooltip: ""
|
||||
}
|
||||
|
||||
MarniteBed: {
|
||||
DisplayName: Marnite Bed
|
||||
Tooltip: ""
|
||||
}
|
||||
|
||||
MarniteBookcase: {
|
||||
DisplayName: Marnite Bookcase
|
||||
Tooltip: ""
|
||||
}
|
||||
|
||||
MarniteCandelabra: {
|
||||
DisplayName: Marnite Candelabra
|
||||
Tooltip: ""
|
||||
}
|
||||
|
||||
MarniteCandle: {
|
||||
DisplayName: Marnite Candle
|
||||
Tooltip: ""
|
||||
}
|
||||
|
||||
MarniteChair: {
|
||||
DisplayName: Marnite Chair
|
||||
Tooltip: ""
|
||||
}
|
||||
|
||||
MarniteChandelier: {
|
||||
DisplayName: Marnite Chandelier
|
||||
Tooltip: ""
|
||||
}
|
||||
|
||||
MarniteClock: {
|
||||
DisplayName: Marnite Clock
|
||||
Tooltip: ""
|
||||
}
|
||||
|
||||
MarniteDoor: {
|
||||
DisplayName: Marnite Door
|
||||
Tooltip: ""
|
||||
}
|
||||
|
||||
MarniteLamp: {
|
||||
DisplayName: Marnite Lamp
|
||||
Tooltip: ""
|
||||
}
|
||||
|
||||
MarniteLantern: {
|
||||
DisplayName: Marnite Lantern
|
||||
Tooltip: ""
|
||||
}
|
||||
|
||||
MarniteLight: {
|
||||
DisplayName: Marnite Light
|
||||
Tooltip: ""
|
||||
}
|
||||
|
||||
MarniteOrgan: {
|
||||
DisplayName: Marnite Organ
|
||||
Tooltip: ""
|
||||
}
|
||||
|
||||
MarniteSink: {
|
||||
DisplayName: Marnite Sink
|
||||
Tooltip: ""
|
||||
}
|
||||
|
||||
MarniteSofa: {
|
||||
DisplayName: Marnite Sofa
|
||||
Tooltip: ""
|
||||
}
|
||||
|
||||
MarniteTable: {
|
||||
DisplayName: Marnite Table
|
||||
Tooltip: ""
|
||||
}
|
||||
|
||||
MarniteToilet: {
|
||||
DisplayName: Marnite Toilet
|
||||
Tooltip: ""
|
||||
}
|
||||
|
||||
MarniteWorkBench: {
|
||||
DisplayName: Marnite Work Bench
|
||||
Tooltip: ""
|
||||
}
|
||||
|
||||
PolishedMarniteBlock: {
|
||||
DisplayName: Polished Marnite Block
|
||||
Tooltip: ""
|
||||
}
|
||||
|
||||
PolishedMarnitePlatform: {
|
||||
DisplayName: Polished Marnite Platform
|
||||
Tooltip: ""
|
||||
}
|
||||
|
||||
PolishedMarniteWall: {
|
||||
DisplayName: Polished Marnite Wall
|
||||
Tooltip: ""
|
||||
}
|
||||
|
||||
MonolithBathtub: {
|
||||
DisplayName: Monolith Bathtub
|
||||
Tooltip: ""
|
||||
@@ -3712,113 +3827,3 @@ ScintillatingBloom: {
|
||||
DisplayName: Scintillating Bloom
|
||||
Tooltip: ""
|
||||
}
|
||||
|
||||
MarniteChest: {
|
||||
DisplayName: Marnite Chest
|
||||
Tooltip: ""
|
||||
}
|
||||
|
||||
MarniteDresser: {
|
||||
DisplayName: Marnite Dresser
|
||||
Tooltip: ""
|
||||
}
|
||||
|
||||
MarniteBathtub: {
|
||||
DisplayName: Marnite Bathtub
|
||||
Tooltip: ""
|
||||
}
|
||||
|
||||
MarniteBed: {
|
||||
DisplayName: Marnite Bed
|
||||
Tooltip: ""
|
||||
}
|
||||
|
||||
MarniteBookcase: {
|
||||
DisplayName: Marnite Bookcase
|
||||
Tooltip: ""
|
||||
}
|
||||
|
||||
MarniteCandelabra: {
|
||||
DisplayName: Marnite Candelabra
|
||||
Tooltip: ""
|
||||
}
|
||||
|
||||
MarniteCandle: {
|
||||
DisplayName: Marnite Candle
|
||||
Tooltip: ""
|
||||
}
|
||||
|
||||
MarniteChair: {
|
||||
DisplayName: Marnite Chair
|
||||
Tooltip: ""
|
||||
}
|
||||
|
||||
MarniteChandelier: {
|
||||
DisplayName: Marnite Chandelier
|
||||
Tooltip: ""
|
||||
}
|
||||
|
||||
MarniteClock: {
|
||||
DisplayName: Marnite Clock
|
||||
Tooltip: ""
|
||||
}
|
||||
|
||||
MarniteDoor: {
|
||||
DisplayName: Marnite Door
|
||||
Tooltip: ""
|
||||
}
|
||||
|
||||
MarniteLamp: {
|
||||
DisplayName: Marnite Lamp
|
||||
Tooltip: ""
|
||||
}
|
||||
|
||||
MarniteLantern: {
|
||||
DisplayName: Marnite Lantern
|
||||
Tooltip: ""
|
||||
}
|
||||
|
||||
MarniteLight: {
|
||||
DisplayName: Marnite Light
|
||||
Tooltip: ""
|
||||
}
|
||||
|
||||
MarniteOrgan: {
|
||||
DisplayName: Marnite Organ
|
||||
Tooltip: ""
|
||||
}
|
||||
|
||||
MarniteSink: {
|
||||
DisplayName: Marnite Sink
|
||||
Tooltip: ""
|
||||
}
|
||||
|
||||
MarniteSofa: {
|
||||
DisplayName: Marnite Sofa
|
||||
Tooltip: ""
|
||||
}
|
||||
|
||||
MarniteTable: {
|
||||
DisplayName: Marnite Table
|
||||
Tooltip: ""
|
||||
}
|
||||
|
||||
MarniteWorkBench: {
|
||||
DisplayName: Marnite Work Bench
|
||||
Tooltip: ""
|
||||
}
|
||||
|
||||
PolishedMarniteBlock: {
|
||||
DisplayName: Polished Marnite Block
|
||||
Tooltip: ""
|
||||
}
|
||||
|
||||
PolishedMarnitePlatform: {
|
||||
DisplayName: Polished Marnite Platform
|
||||
Tooltip: ""
|
||||
}
|
||||
|
||||
PolishedMarniteWall: {
|
||||
DisplayName: Polished Marnite Wall
|
||||
Tooltip: ""
|
||||
}
|
||||
@@ -144,7 +144,11 @@ BrimroseStaff: {
|
||||
|
||||
BurningSea: {
|
||||
DisplayName: Burning Sea
|
||||
Tooltip: Fires a bouncing brimstone fireball that splits into homing fireballs upon collision with water
|
||||
Tooltip:
|
||||
'''
|
||||
Fires a bouncing brimstone fireball that splits into homing fireballs upon collision with liquid
|
||||
Enemies inflicted with a water debuff also spawn homing fireballs on hit
|
||||
'''
|
||||
}
|
||||
|
||||
ChronomancersScythe: {
|
||||
|
||||
@@ -775,9 +775,15 @@ NanoblackReaper: {
|
||||
Unleashes a storm of nanoblack energy blades
|
||||
Blades target bosses whenever possible
|
||||
Stealth strikes cause the scythe to create a large amount of homing afterimages instead of energy blades
|
||||
'She smothered them in Her hatred'
|
||||
'''
|
||||
HoldShiftTooltip: "'He who picks up the pen writes the script. She plans to never let go.'"
|
||||
HoldShiftTooltip:
|
||||
'''
|
||||
'He who picks up the pen writes the script.
|
||||
She has no intention of ever putting it down.
|
||||
Her design eclipses your countable stars.
|
||||
The gleam She exudes will put them all to shame.'
|
||||
'''
|
||||
FlavorTooltip: "'She smothered them in Her hatred.'"
|
||||
}
|
||||
|
||||
NastyCholla: {
|
||||
|
||||
@@ -617,3 +617,7 @@ SulphurSea2: Irradiating one of the oceans
|
||||
Roxcalibur: I wanna rock
|
||||
// Hold Shift tooltip default
|
||||
HoldShiftTooltipExtensionIndicator: Hold "Left Shift" for more
|
||||
HoldShiftTooltipReplacementIndicator: Hold "Left Shift" for details
|
||||
// Dev and Donor Items
|
||||
DevItemTooltip: - Dev Item -
|
||||
DonorItemTooltip: - Donor Item -
|
||||
@@ -1236,6 +1236,10 @@ namespace CalamityMod
|
||||
private static Color MeleeDamageColor = new(254, 121, 2);
|
||||
private static Color MeleeCritColor = new(253, 62, 3);
|
||||
|
||||
private static Color MeleeRangedTooltipColor = new(144, 171, 76);
|
||||
private static Color MeleeRangedDamageColor = new(144, 171, 76);
|
||||
private static Color MeleeRangedCritColor = new(86, 102, 46);
|
||||
|
||||
private static Color RogueTooltipColor = new(206, 132, 227);
|
||||
private static Color RogueDamageColor = new(206, 132, 227);
|
||||
private static Color RogueCritColor = new(194, 38, 212);
|
||||
@@ -1256,6 +1260,9 @@ namespace CalamityMod
|
||||
coloredDamageTypes.Call("AddDamageType", TrueMeleeDamageClass.Instance, MeleeTooltipColor, MeleeDamageColor, MeleeCritColor);
|
||||
coloredDamageTypes.Call("AddDamageType", TrueMeleeNoSpeedDamageClass.Instance, MeleeTooltipColor, MeleeDamageColor, MeleeCritColor);
|
||||
|
||||
// Melee-ranged hybrid damage uses a 50% blend between Melee and Ranged, turning into Olive green
|
||||
coloredDamageTypes.Call("AddDamageType", MeleeRangedHybridDamageClass.Instance, MeleeRangedTooltipColor, MeleeRangedDamageColor, MeleeRangedCritColor);
|
||||
|
||||
// Rogue has its own lavender color. Stealth strikes are hued towards violet so they stick out more.
|
||||
// They would be hued towards magenta, but that would make them collide with Nebula-colored Magic in Colored Damage Types config.
|
||||
coloredDamageTypes.Call("AddDamageType", RogueDamageClass.Instance, RogueTooltipColor, RogueDamageColor, RogueCritColor);
|
||||
|
||||
@@ -23,32 +23,19 @@ namespace CalamityMod.Projectiles.Magic
|
||||
Projectile.height = 20;
|
||||
Projectile.friendly = true;
|
||||
Projectile.DamageType = DamageClass.Magic;
|
||||
Projectile.penetrate = 4;
|
||||
Projectile.penetrate = 3;
|
||||
Projectile.timeLeft = 300;
|
||||
Projectile.usesLocalNPCImmunity = true;
|
||||
Projectile.localNPCHitCooldown = 10;
|
||||
Projectile.localNPCHitCooldown = 20;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
Lighting.AddLight(Projectile.Center, 0.25f, 0f, 0f);
|
||||
if (Projectile.wet && !Projectile.lavaWet)
|
||||
if (Projectile.wet)
|
||||
{
|
||||
Projectile.Kill();
|
||||
if (Projectile.owner == Main.myPlayer)
|
||||
{
|
||||
for (int j = 0; j < 2; j++)
|
||||
{
|
||||
Vector2 velocity = new Vector2(Main.rand.NextFloat(-100f, 100f), Main.rand.NextFloat(-100f, -50f));
|
||||
while (velocity.X == 0f)
|
||||
{
|
||||
velocity.X = (float)Main.rand.Next(-100, 101);
|
||||
}
|
||||
velocity.Normalize();
|
||||
velocity *= Main.rand.NextFloat(7f, 10f);
|
||||
Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.oldPosition.X + (float)(Projectile.width / 2), Projectile.oldPosition.Y + (float)(Projectile.height / 2), velocity.X, velocity.Y, ModContent.ProjectileType<BrimstoneHomer>(), Projectile.damage, 0f, Projectile.owner, 0f, 0f);
|
||||
}
|
||||
}
|
||||
SpawnFireballs(true);
|
||||
}
|
||||
Projectile.localAI[0] += 1f;
|
||||
if (Projectile.localAI[0] > 4f)
|
||||
@@ -113,6 +100,37 @@ namespace CalamityMod.Projectiles.Magic
|
||||
SoundEngine.PlaySound(SoundID.Item20, Projectile.Center);
|
||||
}
|
||||
|
||||
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType<BrimstoneFlames>(), 120);
|
||||
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<BrimstoneFlames>(), 120);
|
||||
|
||||
if (target.HasBuff(BuffID.Wet) || target.Calamity().rTide > 0 || target.Calamity().cDepth > 0)
|
||||
{
|
||||
SpawnFireballs(false);
|
||||
}
|
||||
}
|
||||
|
||||
public void SpawnFireballs(bool isFromLiquidHit)
|
||||
{
|
||||
if (Projectile.owner == Main.myPlayer)
|
||||
{
|
||||
int homerAmt = 2;
|
||||
if (!isFromLiquidHit && Projectile.numHits > 0)
|
||||
homerAmt = 1;
|
||||
|
||||
for (int j = 0; j < homerAmt; j++)
|
||||
{
|
||||
Vector2 velocity = new Vector2(Main.rand.NextFloat(-100f, 100f), Main.rand.NextFloat(-100f, -50f));
|
||||
while (velocity.X == 0f)
|
||||
{
|
||||
velocity.X = (float)Main.rand.Next(-100, 101);
|
||||
}
|
||||
velocity.Normalize();
|
||||
velocity *= Main.rand.NextFloat(7f, 10f);
|
||||
float damageMult = isFromLiquidHit ? 1f : 0.25f;
|
||||
Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.oldPosition.X + (float)(Projectile.width / 2), Projectile.oldPosition.Y + (float)(Projectile.height / 2), velocity.X, velocity.Y, ModContent.ProjectileType<BrimstoneHomer>(), (int)(Projectile.damage * damageMult), 0f, Projectile.owner, 0f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -29,8 +29,8 @@ namespace CalamityMod.Projectiles.Magic
|
||||
int brimstone = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 1f);
|
||||
Main.dust[brimstone].noGravity = true;
|
||||
|
||||
if (Projectile.timeLeft < 150)
|
||||
CalamityUtils.HomeInOnNPC(Projectile, !Projectile.tileCollide, 200f, 8f, 20f);
|
||||
if (Projectile.timeLeft < 160)
|
||||
CalamityUtils.HomeInOnNPC(Projectile, !Projectile.tileCollide, 240f, 8f, 20f);
|
||||
}
|
||||
|
||||
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod
|
||||
{
|
||||
public class MusicBoxRegistry : ModSystem
|
||||
{
|
||||
private static void AddMusicBox(string musicFile, int itemID, int tileID)
|
||||
{
|
||||
Mod calamity = CalamityMod.Instance;
|
||||
int musicID = MusicLoader.GetMusicSlot(calamity, musicFile);
|
||||
MusicLoader.AddMusicBox(calamity, musicID, itemID, tileID);
|
||||
}
|
||||
|
||||
public override void PostSetupContent()
|
||||
{
|
||||
if (!Main.dedServ)
|
||||
{
|
||||
// 24APR2024: Ozzatron: unclear why these two songs are even in main mod, but I don't want to break precedent
|
||||
AddMusicBox("Sounds/Music/DraedonExoSelect", ModContent.ItemType<Items.Placeables.MusicBoxes.DraedonExoSelectMusicBox>(), ModContent.TileType<Tiles.MusicBoxes.DraedonExoSelectMusicBox>());
|
||||
AddMusicBox("Sounds/Music/DraedonTalk", ModContent.ItemType<Items.Placeables.MusicBoxes.DraedonTalkMusicBox>(), ModContent.TileType<Tiles.MusicBoxes.DraedonTalkMusicBox>());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 597 B After Width: | Height: | Size: 510 B |
|
Before Width: | Height: | Size: 232 B After Width: | Height: | Size: 195 B |
|
Before Width: | Height: | Size: 432 B After Width: | Height: | Size: 525 B |
|
Before Width: | Height: | Size: 375 B After Width: | Height: | Size: 390 B |
|
Before Width: | Height: | Size: 372 B After Width: | Height: | Size: 339 B |
|
Before Width: | Height: | Size: 402 B After Width: | Height: | Size: 348 B |
|
Before Width: | Height: | Size: 232 B After Width: | Height: | Size: 249 B |
|
Before Width: | Height: | Size: 273 B After Width: | Height: | Size: 258 B |
@@ -0,0 +1,80 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.Enums;
|
||||
using Terraria.GameContent;
|
||||
using Terraria.GameContent.ObjectInteractions;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ObjectData;
|
||||
|
||||
namespace CalamityMod.Tiles.FurnitureMarnite
|
||||
{
|
||||
public class MarniteToilet : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
RegisterItemDrop(ModContent.ItemType<Items.Placeables.FurnitureMarnite.MarniteToilet>());
|
||||
|
||||
Main.tileFrameImportant[Type] = true;
|
||||
Main.tileWaterDeath[Type] = false;
|
||||
TileObjectData.newTile.CopyFrom(TileObjectData.Style1x2);
|
||||
TileObjectData.newTile.CoordinateHeights = new int[] { 16, 18 };
|
||||
TileObjectData.newTile.CoordinatePadding = 2;
|
||||
TileObjectData.newTile.Direction = TileObjectDirection.PlaceLeft;
|
||||
TileObjectData.newTile.StyleHorizontal = true;
|
||||
TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile);
|
||||
TileObjectData.newAlternate.Direction = TileObjectDirection.PlaceRight;
|
||||
TileObjectData.addAlternate(1);
|
||||
TileObjectData.addTile(Type);
|
||||
|
||||
// Toilets count as Chairs
|
||||
AddToArray(ref TileID.Sets.RoomNeeds.CountsAsChair);
|
||||
AddMapEntry(new Color(191, 142, 111), Language.GetText("MapObject.Toilet"));
|
||||
TileID.Sets.CanBeSatOnForNPCs[Type] = true;
|
||||
TileID.Sets.CanBeSatOnForPlayers[Type] = true;
|
||||
TileID.Sets.HasOutlines[Type] = true;
|
||||
AdjTiles = new int[] { TileID.Chairs };
|
||||
}
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, DustID.Granite, 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 ModifySittingTargetInfo(int i, int j, ref TileRestingInfo info) => CalamityUtils.ChairSitInfo(i, j, ref info, shitter: true);
|
||||
|
||||
public override bool RightClick(int i, int j) => CalamityUtils.ChairRightClick(i, j);
|
||||
|
||||
public override void MouseOver(int i, int j) => CalamityUtils.ChairMouseOver(i, j, ModContent.ItemType<Items.Placeables.FurnitureMarnite.MarniteToilet>());
|
||||
|
||||
public override bool HasSmartInteract(int i, int j, SmartInteractScanSettings settings)
|
||||
{
|
||||
return settings.player.IsWithinSnappngRangeToTile(i, j, PlayerSittingHelper.ChairSittingMaxDistance);
|
||||
}
|
||||
|
||||
public override void HitWire(int i, int j) // I hate this please make it stop. - Merkalto
|
||||
{
|
||||
Tile tile = Main.tile[i, j];
|
||||
|
||||
int spawnX = i;
|
||||
int spawnY = j - tile.TileFrameY / 18;
|
||||
|
||||
Wiring.SkipWire(spawnX, spawnY);
|
||||
Wiring.SkipWire(spawnX, spawnY + 1);
|
||||
|
||||
if (Wiring.CheckMech(spawnX, spawnY, 60))
|
||||
{
|
||||
Projectile.NewProjectile(Wiring.GetProjectileSource(spawnX, spawnY), spawnX * 16 + 8, spawnY * 16 + 12, 0f, 0f, ProjectileID.ToiletEffect, 0, 0f, Main.myPlayer);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 252 B |
@@ -2,9 +2,12 @@
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.GameContent.Drawing;
|
||||
using Terraria.GameContent.ObjectInteractions;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ObjectData;
|
||||
using Terraria.Utilities;
|
||||
|
||||
namespace CalamityMod.Tiles.MusicBoxes
|
||||
{
|
||||
@@ -15,13 +18,15 @@ namespace CalamityMod.Tiles.MusicBoxes
|
||||
{
|
||||
Main.tileFrameImportant[Type] = true;
|
||||
Main.tileObsidianKill[Type] = true;
|
||||
TileID.Sets.HasOutlines[Type] = true;
|
||||
TileID.Sets.DisableSmartCursor[Type] = true;
|
||||
TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2);
|
||||
TileObjectData.newTile.Origin = new Point16(0, 1);
|
||||
TileObjectData.newTile.LavaDeath = false;
|
||||
TileObjectData.newTile.DrawYOffset = 2;
|
||||
TileObjectData.newTile.StyleLineSkip = 2;
|
||||
TileObjectData.addTile(Type);
|
||||
TileID.Sets.DisableSmartCursor[Type] = true;
|
||||
|
||||
AddMapEntry(new Color(191, 142, 111), CalamityUtils.GetItemName(ItemID.MusicBox));
|
||||
}
|
||||
|
||||
@@ -33,27 +38,25 @@ namespace CalamityMod.Tiles.MusicBoxes
|
||||
player.cursorItemIconID = ModContent.ItemType<Items.Placeables.MusicBoxes.DraedonExoSelectMusicBox>();
|
||||
}
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
public override bool HasSmartInteract(int i, int j, SmartInteractScanSettings settings) => true;
|
||||
public override bool CreateDust(int i, int j, ref int type) => false;
|
||||
|
||||
public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref TileDrawInfo drawData)
|
||||
{
|
||||
if (Main.gamePaused || !Main.instance.IsActive || Lighting.UpdateEveryFrame && !Main.rand.NextBool(4))
|
||||
if (Lighting.UpdateEveryFrame && new FastRandom(Main.TileFrameSeed).WithModifier(i, j).Next(4) != 0)
|
||||
return;
|
||||
|
||||
if (Main.tile[i, j].TileFrameX == 36 && Main.tile[i, j].TileFrameY % 36 == 0 && (int)Main.timeForVisualEffects % 7 == 0 && Main.rand.NextBool(3))
|
||||
Tile tile = Main.tile[i, j];
|
||||
if (TileDrawing.IsVisible(tile) && tile.TileFrameX == 36 && tile.TileFrameY % 36 == 0 && (int)Main.timeForVisualEffects % 7 == 0 && Main.rand.NextBool(3))
|
||||
{
|
||||
int goreType = Main.rand.Next(570, 573);
|
||||
Vector2 position = new Vector2(i * 16 + 8, j * 16 - 8);
|
||||
Vector2 velocity = new Vector2(Main.WindForVisuals * 2f, -0.5f);
|
||||
velocity.X *= 1f + Main.rand.NextFloat(-0.5f, 0.5f);
|
||||
velocity.Y *= 1f + Main.rand.NextFloat(-0.5f, 0.5f);
|
||||
velocity.X *= Main.rand.NextFloat(0.5f, 1.5f);
|
||||
velocity.Y *= Main.rand.NextFloat(0.5f, 1.5f);
|
||||
if (goreType == 572)
|
||||
position.X -= 8f;
|
||||
|
||||
if (goreType == 571)
|
||||
else if (goreType == 571)
|
||||
position.X -= 4f;
|
||||
|
||||
Gore.NewGore(new EntitySource_TileUpdate(i, j), position, velocity, goreType, 0.8f);
|
||||
|
||||
|
After Width: | Height: | Size: 363 B |
@@ -2,9 +2,12 @@
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.GameContent.Drawing;
|
||||
using Terraria.GameContent.ObjectInteractions;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ObjectData;
|
||||
using Terraria.Utilities;
|
||||
|
||||
namespace CalamityMod.Tiles.MusicBoxes
|
||||
{
|
||||
@@ -14,13 +17,15 @@ namespace CalamityMod.Tiles.MusicBoxes
|
||||
{
|
||||
Main.tileFrameImportant[Type] = true;
|
||||
Main.tileObsidianKill[Type] = true;
|
||||
TileID.Sets.HasOutlines[Type] = true;
|
||||
TileID.Sets.DisableSmartCursor[Type] = true;
|
||||
TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2);
|
||||
TileObjectData.newTile.Origin = new Point16(0, 1);
|
||||
TileObjectData.newTile.LavaDeath = false;
|
||||
TileObjectData.newTile.DrawYOffset = 2;
|
||||
TileObjectData.newTile.StyleLineSkip = 2;
|
||||
TileObjectData.addTile(Type);
|
||||
TileID.Sets.DisableSmartCursor[Type] = true;
|
||||
|
||||
AddMapEntry(new Color(191, 142, 111), CalamityUtils.GetItemName(ItemID.MusicBox));
|
||||
}
|
||||
|
||||
@@ -32,27 +37,25 @@ namespace CalamityMod.Tiles.MusicBoxes
|
||||
player.cursorItemIconID = ModContent.ItemType<Items.Placeables.MusicBoxes.DraedonTalkMusicBox>();
|
||||
}
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
public override bool HasSmartInteract(int i, int j, SmartInteractScanSettings settings) => true;
|
||||
public override bool CreateDust(int i, int j, ref int type) => false;
|
||||
|
||||
public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref TileDrawInfo drawData)
|
||||
{
|
||||
if (Main.gamePaused || !Main.instance.IsActive || Lighting.UpdateEveryFrame && !Main.rand.NextBool(4))
|
||||
if (Lighting.UpdateEveryFrame && new FastRandom(Main.TileFrameSeed).WithModifier(i, j).Next(4) != 0)
|
||||
return;
|
||||
|
||||
if (Main.tile[i, j].TileFrameX == 36 && Main.tile[i, j].TileFrameY % 36 == 0 && (int)Main.timeForVisualEffects % 7 == 0 && Main.rand.NextBool(3))
|
||||
Tile tile = Main.tile[i, j];
|
||||
if (TileDrawing.IsVisible(tile) && tile.TileFrameX == 36 && tile.TileFrameY % 36 == 0 && (int)Main.timeForVisualEffects % 7 == 0 && Main.rand.NextBool(3))
|
||||
{
|
||||
int goreType = Main.rand.Next(570, 573);
|
||||
Vector2 position = new Vector2(i * 16 + 8, j * 16 - 8);
|
||||
Vector2 velocity = new Vector2(Main.WindForVisuals * 2f, -0.5f);
|
||||
velocity.X *= 1f + Main.rand.NextFloat(-0.5f, 0.5f);
|
||||
velocity.Y *= 1f + Main.rand.NextFloat(-0.5f, 0.5f);
|
||||
velocity.X *= Main.rand.NextFloat(0.5f, 1.5f);
|
||||
velocity.Y *= Main.rand.NextFloat(0.5f, 1.5f);
|
||||
if (goreType == 572)
|
||||
position.X -= 8f;
|
||||
|
||||
if (goreType == 571)
|
||||
else if (goreType == 571)
|
||||
position.X -= 4f;
|
||||
|
||||
Gore.NewGore(new EntitySource_TileUpdate(i, j), position, velocity, goreType, 0.8f);
|
||||
|
||||
|
After Width: | Height: | Size: 339 B |
@@ -29,9 +29,16 @@ namespace CalamityMod
|
||||
/// <param name="item">The item to check.</param>
|
||||
public static bool IsWhip(this Item item) => item.shoot > ProjectileID.None && ProjectileID.Sets.IsAWhip[item.shoot];
|
||||
|
||||
/// <summary>
|
||||
/// Marks the item as Revengeance Mode exclusive.<br />
|
||||
/// This causes it to have a tooltip line which says "Revengeance", like how vanilla says "Expert" and "Master".
|
||||
/// </summary>
|
||||
/// <param name="item">The item to make difficulty exclusive.</param>
|
||||
public static void SetRevExclusive(this Item item) => item.Calamity().revengeanceItem = true;
|
||||
|
||||
#region Color Constants
|
||||
internal static readonly Color DevItemColor = new Color(255, 0, 255);
|
||||
internal static readonly Color DonatorItemColor = new Color(196, 35, 44);
|
||||
internal static readonly Color DonatorItemColor = new Color(255, 121, 156);
|
||||
#endregion
|
||||
|
||||
// TODO -- This probably isn't the best place to put this but it needs to be somewhere easily accessible.
|
||||
|
||||
@@ -105,6 +105,9 @@ namespace CalamityMod
|
||||
Wiring.SkipWire(x + k, y + l);
|
||||
}
|
||||
}
|
||||
|
||||
if (Main.netMode != NetmodeID.SinglePlayer)
|
||||
NetMessage.SendTileSquare(-1, x, y, tileX, tileY);
|
||||
}
|
||||
|
||||
public static void DrawFlameEffect(Texture2D flameTexture, int i, int j, int offsetX = 0, int offsetY = 0)
|
||||
|
||||
@@ -4,13 +4,15 @@ using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Walls
|
||||
{
|
||||
public class DriftwoodWall : WallVisibleThroughWater
|
||||
public class DriftwoodWall : ModWall, IVisibleThroughWater
|
||||
{
|
||||
int IVisibleThroughWater.WaterMapEntry { get; set; }
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.wallHouse[Type] = true;
|
||||
|
||||
AddEntries(new Color(69, 56, 58));
|
||||
this.AddMapEntryWithWaterVisibility(new Color(69, 56, 58));
|
||||
}
|
||||
|
||||
public override void NumDust(int i, int j, bool fail, ref int num) => num = fail ? 1 : 3;
|
||||
|
||||
@@ -5,12 +5,14 @@ using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Walls
|
||||
{
|
||||
public class LimestoneWall : WallVisibleThroughWater
|
||||
public class LimestoneWall : ModWall, IVisibleThroughWater
|
||||
{
|
||||
int IVisibleThroughWater.WaterMapEntry { get; set; }
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DustType = 22;
|
||||
AddEntries(new Color(147, 92, 63));
|
||||
this.AddMapEntryWithWaterVisibility(new Color(147, 92, 63));
|
||||
}
|
||||
|
||||
public override void NumDust(int i, int j, bool fail, ref int num) => num = fail ? 1 : 3;
|
||||
|
||||
@@ -5,13 +5,15 @@ using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Walls
|
||||
{
|
||||
public class RunestoneWall : WallVisibleThroughWater
|
||||
public class RunestoneWall : ModWall, IVisibleThroughWater
|
||||
{
|
||||
int IVisibleThroughWater.WaterMapEntry { get; set; }
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.wallHouse[Type] = true;
|
||||
|
||||
AddEntries(new Color(122, 59, 48));
|
||||
this.AddMapEntryWithWaterVisibility(new Color(122, 59, 48));
|
||||
}
|
||||
|
||||
public override void NumDust(int i, int j, bool fail, ref int num) => num = fail ? 1 : 3;
|
||||
|
||||
@@ -4,14 +4,16 @@ using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Walls
|
||||
{
|
||||
public class ShellstoneSlabWall : WallVisibleThroughWater
|
||||
public class ShellstoneSlabWall : ModWall, IVisibleThroughWater
|
||||
{
|
||||
int IVisibleThroughWater.WaterMapEntry { get; set; }
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.wallHouse[Type] = true;
|
||||
DustType = 24;
|
||||
|
||||
AddEntries(new Color(100, 127, 137));
|
||||
this.AddMapEntryWithWaterVisibility(new Color(100, 127, 137));
|
||||
}
|
||||
|
||||
public override void NumDust(int i, int j, bool fail, ref int num) => num = fail ? 1 : 3;
|
||||
|
||||
@@ -4,14 +4,16 @@ using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Walls
|
||||
{
|
||||
public class ShellstoneWall : WallVisibleThroughWater
|
||||
public class ShellstoneWall : ModWall, IVisibleThroughWater
|
||||
{
|
||||
int IVisibleThroughWater.WaterMapEntry { get; set; }
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.wallHouse[Type] = false;
|
||||
DustType = 24;
|
||||
|
||||
AddEntries(new Color(74, 71, 84));
|
||||
this.AddMapEntryWithWaterVisibility(new Color(74, 71, 84));
|
||||
}
|
||||
|
||||
public override void NumDust(int i, int j, bool fail, ref int num) => num = fail ? 1 : 3;
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria.Localization;
|
||||
using Terraria.Map;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Walls
|
||||
{
|
||||
public abstract class WallVisibleThroughWater : ModWall
|
||||
{
|
||||
public const float WaterTransparency = 0.5f;
|
||||
public static readonly Color WaterColor = new Color(9, 61, 191);
|
||||
|
||||
public int WaterMapEntry { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Adds the map entry, and further entries for being covered in water.
|
||||
/// Please use this over AddMapEntry in walls which utilize this base class.
|
||||
/// </summary>
|
||||
/// <param name="baseColor"></param>
|
||||
/// <param name="text"></param>
|
||||
public void AddEntries(Color baseColor, LocalizedText text = null)
|
||||
{
|
||||
AddMapEntry(baseColor, text);
|
||||
AddMapEntry(Color.Lerp(baseColor, WaterColor, WaterTransparency), text);
|
||||
}
|
||||
|
||||
public static void InitializeWaterMapEntryLookups()
|
||||
{
|
||||
foreach (var wall in CalamityMod.Instance.GetContent<WallVisibleThroughWater>())
|
||||
{
|
||||
int lookup = MapHelper.wallLookup[wall.Type];
|
||||
wall.WaterMapEntry = lookup + 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||