This repository has been archived by the owner on Apr 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cleaned up everything, Added several new methods & actually added in …
…planned item changes and not just example/test items
- Loading branch information
1 parent
6f5874b
commit c270881
Showing
12 changed files
with
196 additions
and
113 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
using Terraria.ID; | ||
using System.Collections.Generic; | ||
using Terraria; | ||
using Terraria.ModLoader; | ||
|
||
namespace NekoTweakMod.Items | ||
{ | ||
public class AddTooltip : GlobalItem | ||
{ | ||
public override void ModifyTooltips(Item item, List<TooltipLine> tooltips) // Allows you to modify tooltip properties for items | ||
{ | ||
base.ModifyTooltips(item, tooltips); | ||
if (item.type == ItemID.Shackle) // Specifies what item | ||
{ | ||
TooltipLine newTooltip = new TooltipLine(mod, "Tooltip0", "Enemies are more likely to target you"); | ||
// Creates a new TooltipLine for your mod with the name Tooltip0 | ||
//"Tooltip#" - A tooltip line of the item. # will be 0 for the first line, 1 for the second, etc. | ||
tooltips.Add(newTooltip); | ||
//Adds the Tooltip to the list | ||
} | ||
{ | ||
if (item.type == ItemID.TitanGlove) | ||
{ | ||
TooltipLine newTooltip = new TooltipLine(mod, "Tooltip0", "12% increased melee speed"); | ||
tooltips.Add(newTooltip); | ||
} | ||
} | ||
{ | ||
if (item.type == ItemID.PowerGlove) | ||
{ | ||
TooltipLine newTooltip = new TooltipLine(mod, "Tooltip0", "Enables auto swing for melee weapons"); | ||
tooltips.Add(newTooltip); | ||
} | ||
} | ||
{ | ||
if (item.type == ItemID.MechanicalGlove) | ||
{ | ||
TooltipLine newTooltip = new TooltipLine(mod, "Tooltip0", "Enables auto swing for melee weapons"); | ||
tooltips.Add(newTooltip); | ||
} | ||
} | ||
{ | ||
if (item.type == ItemID.FireGauntlet) | ||
{ | ||
TooltipLine newTooltip = new TooltipLine(mod, "Tooltip0", "Enables auto swing for melee weapons"); | ||
tooltips.Add(newTooltip); | ||
} | ||
} | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
using Terraria; | ||
using Terraria.ID; | ||
using Terraria.ModLoader; | ||
|
||
namespace NekoTweakMod.Items | ||
{ | ||
public class SetNameOverride : GlobalItem // class name & vanilla hook | ||
{ | ||
public override void SetDefaults(Item item) // SetDefaults allows you to set/change properties of items | ||
{ | ||
base.SetDefaults(item); | ||
if (item.type == ItemID.IvyWhip) item.SetNameOverride("Ivy Hook"); // Ocd fix due to summoners having whip weapons | ||
// specifies what item to change | ||
// Set the name of the specified item to "Name" | ||
// seperation between each "if" statement when trying to change another item | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
using Terraria.ID; | ||
using Terraria; | ||
using Terraria.ModLoader; | ||
|
||
namespace NekoTweakMod.Items | ||
{ | ||
public class UpdateAccessories : GlobalItem | ||
{ | ||
public override void UpdateAccessory(Item item, Player player, bool hideVisual) | ||
{ | ||
base.UpdateAccessory(item, player, hideVisual); | ||
{ | ||
if (item.type == ItemID.FeralClaws) | ||
{ | ||
player.meleeSpeed -= 0.12f; // Gives -12% melee speed | ||
player.kbGlove = false; // Sets this item as a knockback glove | ||
player.releaseUseItem = true; // Gives the accessory autoReuse/AutoSwing | ||
} | ||
} | ||
{ | ||
//single-line "if" statement examples, changing 1 property only for each if statement | ||
if (item.type == ItemID.TitanGlove) player.meleeSpeed += 0.12f; // 12% increased melee speed | ||
if (item.type == ItemID.Shackle) player.aggro += 50; // increases players aggro by 50+ | ||
if (item.type == ItemID.PowerGlove) player.releaseUseItem = true; | ||
if (item.type == ItemID.MechanicalGlove) player.releaseUseItem = true; | ||
} | ||
{ | ||
if (item.type == ItemID.FireGauntlet) | ||
{ | ||
player.releaseUseItem = true; | ||
player.meleeDamage += 0.02f;// 2% increase | ||
player.meleeSpeed += 0.02f; | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
displayName = Neko's Tweak Mod | ||
author = Neko | ||
version = 0.1.0.1 | ||
homepage = https://forums.terraria.org/index.php?members/neko.6574/ | ||
version = 0.1.1.0 | ||
homepage = https://forums.terraria.org/index.php?threads/nekos-tweak-mod.93711/ | ||
buildIgnore = obj\*, bin\*, *.csproj, .git\*, .gitattributes, .gitignore, .psd, .sln, ..vs\*, LICENSE |
Oops, something went wrong.