Colored tooltips to catch the eye better
This commit is contained in:
1 parent
7ce88218e9
commit
40cf8f203b
3 files changed
+40
-8
No files matched your search
@@ -10,6 +10,7 @@ using Terraria.ID;
|
||||
using static Terraria.ModLoader.ModContent;
|
||||
using Terraria.ModLoader;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace CalamityMod.Items.Weapons.Melee
|
||||
{
|
||||
@@ -19,15 +20,23 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
public float Charge = 0f;
|
||||
public override bool CloneNewInstances => true;
|
||||
|
||||
const string ParryTooltip = "Using RMB will extend the Ark out in front of you. Hitting an enemy with it will parry them, granting you a small window of invulnerability\n" +
|
||||
"You can also parry projectiles and temporarily make them deal 100 less damage\n" +
|
||||
"Parrying will empower the next 10 swings of the sword, boosting their damage and letting them throw projectiles out\n";
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Ark of the Ancients");
|
||||
Tooltip.SetDefault("Using RMB will extend the Ark out in front of you. Hitting an enemy with it will parry them, granting you a small window of invulnerability\n" +
|
||||
"You can also parry projectiles and temporarily make them deal 100 less damage\n" +
|
||||
"Parrying will empower the next 10 swings of the sword, boosting their damage and letting them throw projectiles out\n" +
|
||||
Tooltip.SetDefault("This line gets set in ModifyTooltips\n" +
|
||||
"A heavenly blade forged to vanquish all evil");
|
||||
}
|
||||
|
||||
public override void ModifyTooltips(List<TooltipLine> tooltips)
|
||||
{
|
||||
var tooltip = tooltips.FirstOrDefault(x => x.Name == "Tooltip0" && x.mod == "Terraria");
|
||||
tooltip.text = $"[ c/9999ff:" + ParryTooltip + "]";
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = item.height = 60;
|
||||
|
||||
@@ -5,6 +5,7 @@ using CalamityMod.Projectiles.Melee;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using Terraria;
|
||||
@@ -21,10 +22,22 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
|
||||
public const float ComboLenght = 4f; //How many regular swings before the long throw happens
|
||||
|
||||
const string ParryTooltip = "Using RMB will snip out the scissor blades in front of you. Hitting an enemy with it will parry them, granting you a small window of invulnerability\n" +
|
||||
"You can also parry projectiles and temporarily make them deal 200 less damage\n" +
|
||||
"Parrying will empower the next 10 swings of the sword, letting you use both blades at once\n" +
|
||||
"Using RMB and pressing up while the Ark is charged will release all the charges in a powerful burst of energy\n";
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Ark of the Elements");
|
||||
Tooltip.SetDefault("A heavenly pair of blades infused with the essence of Terraria");
|
||||
Tooltip.SetDefault("This line gets set in ModifyTooltips\n" +
|
||||
"A heavenly pair of blades infused with the essence of Terraria");
|
||||
}
|
||||
|
||||
public override void ModifyTooltips(List<TooltipLine> tooltips)
|
||||
{
|
||||
var tooltip = tooltips.FirstOrDefault(x => x.Name == "Tooltip0" && x.mod == "Terraria");
|
||||
tooltip.text = $"[ c/ffb399:" + ParryTooltip + "]";
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
|
||||
@@ -4,6 +4,7 @@ using CalamityMod.Projectiles.Melee;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using Terraria;
|
||||
@@ -18,16 +19,25 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
public float Combo = 1f;
|
||||
public float Charge = 0f;
|
||||
public override bool CloneNewInstances => true;
|
||||
|
||||
const string ParryTooltip = "Using RMB will extend the Ark out in front of you. Hitting an enemy with it will parry them, granting you a small window of invulnerability\n" +
|
||||
"You can also parry projectiles and temporarily make them deal 160 less damage\n" +
|
||||
"Parrying will empower the next 10 swings of the sword, boosting their damage and letting them throw stronger projectiles\n" +
|
||||
"Using RMB and pressing up while the Ark is charged will release all the charges in a powerful burst of energy\n";
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("True Ark of the Ancients");
|
||||
Tooltip.SetDefault("Using RMB will extend the Ark out in front of you. Hitting an enemy with it will parry them, granting you a small window of invulnerability\n" +
|
||||
"You can also parry projectiles and temporarily make them deal 160 less damage\n" +
|
||||
"Parrying will empower the next 10 swings of the sword, boosting their damage and letting them throw stronger projectiles\n" +
|
||||
"Using RMB and pressing up while the Ark is charged will release all the charges in a powerful burst of energy\n" +
|
||||
Tooltip.SetDefault("This line gets set in ModifyTooltips\n" +
|
||||
"A heavenly blade forged to vanquish all evil");
|
||||
}
|
||||
|
||||
public override void ModifyTooltips(List<TooltipLine> tooltips)
|
||||
{
|
||||
var tooltip = tooltips.FirstOrDefault(x => x.Name == "Tooltip0" && x.mod == "Terraria");
|
||||
tooltip.text = $"[ c/9999ff:" + ParryTooltip + "]";
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = item.height = 72;
|
||||
|
||||
Reference in new issue
Block a user