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.
Added fishing stuffs & few other things
- Loading branch information
1 parent
40b251f
commit fff135c
Showing
17 changed files
with
225 additions
and
75 deletions.
There are no files selected for viewing
Binary file not shown.
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
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.Fishing | ||
{ | ||
public class AddItemToCrate : GlobalItem | ||
{ | ||
public string Context; | ||
public bool RandomBool; // still no idea how either string or bool works here, but got errors without using InstancePerEntity & code works fine | ||
|
||
public override bool InstancePerEntity => true; | ||
|
||
public override GlobalItem Clone(Item item, Item itemClone) | ||
{ | ||
AddItemToCrate myClone = (AddItemToCrate)base.Clone(item, itemClone); | ||
myClone.Context = Context; | ||
myClone.RandomBool = RandomBool; | ||
return myClone; | ||
} | ||
public override void OpenVanillaBag(string context, Player player, int arg) | ||
{ | ||
if (context == "crate" && arg == ItemID.IronCrate) | ||
// if context & arg is = text & item id | ||
// Context has to be one of these examples: "present", "bossBag", "crate", "lockBox", "herbBag", or "goodieBag" | ||
// arg specifies the present/bag/crate itemid | ||
{ | ||
// Each item here will roll individually, but it is possible to get multiple of them at once | ||
if (Main.rand.NextBool(33)) player.QuickSpawnItem(ItemID.WoodenSword); // number/100 or "100% if its at 1" chance/rng & also Specifies the item to add to the present/bag/crate | ||
// if (Main.rand.NextBool(25)) player.QuickSpawnItem(ItemID.Meowmere); | ||
// if (Main.rand.NextBool(50)) player.QuickSpawnItem(ItemID.PlanteraBossBag); | ||
// if (Main.rand.NextBool(75)) player.QuickSpawnItem(ItemID.HotlineFishingHook); | ||
|
||
} | ||
} | ||
} | ||
} |
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,24 @@ | ||
using Terraria.ID; | ||
using Terraria; | ||
using Terraria.ModLoader; | ||
|
||
namespace NekoTweakMod.Items | ||
{ | ||
public class FishingRods : GlobalItem // class name & vanilla hook | ||
{ | ||
public override void SetDefaults(Item item) // SetDefaults allows you to set/change properties of items | ||
{ // Single line "if" statements as we are only changing 1 property | ||
if (item.type == ItemID.WoodFishingPole) item.fishingPole = 15; // sets fishing power to 15% | ||
if (item.type == ItemID.ReinforcedFishingPole) item.fishingPole = 20; | ||
//if (item.type == ItemID.ScarabFishingRod) item.fishingPole = 30; | ||
//if (item.type == ItemID.ChumCaster) item.fishingPole = 30; | ||
if (item.type == ItemID.FiberglassFishingPole) item.fishingPole = 30; | ||
if (item.type == ItemID.SittingDucksFishingRod) item.fishingPole = 33; | ||
if (item.type == ItemID.FisherofSouls) item.fishingPole = 35; | ||
if (item.type == ItemID.Fleshcatcher) item.fishingPole = 37; | ||
if (item.type == ItemID.MechanicsRod) item.fishingPole = 45; | ||
if (item.type == ItemID.HotlineFishingHook) item.fishingPole = 47; | ||
|
||
} | ||
} | ||
} |
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,49 @@ | ||
using Terraria.ID; | ||
using Terraria; | ||
using Terraria.ModLoader; | ||
|
||
namespace NekoTweakMod.Items | ||
{ | ||
public class ModifyAccessories : GlobalItem | ||
{ | ||
public override void UpdateAccessory(Item item, Player player, bool hideVisual) | ||
{ | ||
if (item.type == ItemID.FeralClaws) | ||
{ | ||
player.meleeSpeed -= 0.12f; // Gives -12% melee speed | ||
player.kbGlove = false; // Sets this item as a knockback glove | ||
if (player.HeldItem.melee || player.HeldItem.summon) // if the player is holding/using either a melee or summoner weapon | ||
// Thanks to Oli for telling me about player.helditem | ||
{ | ||
player.releaseUseItem = true; // Makes the accessory give autoReuse/AutoSwing to the players item/weapon | ||
} | ||
|
||
} | ||
{ | ||
//single-line "if" statement examples, changing 1 property only for each 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.FireGauntlet) | ||
{ | ||
player.meleeDamage += 0.02f;// 2% increase | ||
player.meleeSpeed += 0.02f; | ||
if (player.HeldItem.melee || player.HeldItem.summon) player.releaseUseItem = true; | ||
} | ||
} | ||
{ | ||
if (item.type == ItemID.MechanicalGlove) | ||
{ | ||
if (player.HeldItem.melee || player.HeldItem.summon) player.releaseUseItem = true; | ||
} | ||
} | ||
{ | ||
if (item.type == ItemID.PowerGlove) | ||
{ | ||
if (player.HeldItem.melee || player.HeldItem.summon) player.releaseUseItem = true; | ||
} | ||
} | ||
} | ||
} | ||
} |
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,62 @@ | ||
using Terraria.ID; | ||
using Terraria; | ||
using Terraria.ModLoader; | ||
|
||
namespace NekoTweakMod.Items | ||
{ | ||
public class NoFakeChests : GlobalItem | ||
{ | ||
public override void SetDefaults(Item item) | ||
{ | ||
} | ||
} // still missing few 1.4 fake chests | ||
} // hopefully this simple code change them to working chests~ | ||
/* | ||
if(item.type == ItemID.Fake_BlueDungeonChest) item.CloneDefaults(ItemID.DeadMansChest); | ||
if (item.type == ItemID.Fake_BoneChest) item.CloneDefaults(ItemID.DeadMansChest); | ||
if (item.type == ItemID.Fake_BorealWoodChest) item.CloneDefaults(ItemID.DeadMansChest); | ||
if (item.type == ItemID.Fake_CactusChest) item.CloneDefaults(ItemID.DeadMansChest); | ||
if (item.type == ItemID.Fake_Chest) item.CloneDefaults(ItemID.DeadMansChest); | ||
if (item.type == ItemID.Fake_CorruptionChest) item.CloneDefaults(ItemID.DeadMansChest); | ||
if (item.type == ItemID.Fake_CrimsonChest) item.CloneDefaults(ItemID.DeadMansChest); | ||
if (item.type == ItemID.Fake_CrystalChest) item.CloneDefaults(ItemID.DeadMansChest); | ||
if (item.type == ItemID.Fake_DynastyChest) item.CloneDefaults(ItemID.DeadMansChest); | ||
if (item.type == ItemID.Fake_EbonwoodChest) item.CloneDefaults(ItemID.DeadMansChest); | ||
if (item.type == ItemID.Fake_FleshChest) item.CloneDefaults(ItemID.DeadMansChest); | ||
if (item.type == ItemID.Fake_FrozenChest) item.CloneDefaults(ItemID.DeadMansChest); | ||
if (item.type == ItemID.Fake_GlassChest) item.CloneDefaults(ItemID.DeadMansChest); | ||
if (item.type == ItemID.Fake_GoldChest) item.CloneDefaults(ItemID.DeadMansChest); | ||
if (item.type == ItemID.Fake_GoldenChest) item.CloneDefaults(ItemID.DeadMansChest); | ||
if (item.type == ItemID.Fake_GraniteChest) item.CloneDefaults(ItemID.DeadMansChest); | ||
if (item.type == ItemID.Fake_GreenDungeonChest) item.CloneDefaults(ItemID.DeadMansChest); | ||
if (item.type == ItemID.Fake_HallowedChest) item.CloneDefaults(ItemID.DeadMansChest); | ||
if (item.type == ItemID.Fake_HoneyChest) item.CloneDefaults(ItemID.DeadMansChest); | ||
if (item.type == ItemID.Fake_IceChest) item.CloneDefaults(ItemID.DeadMansChest); | ||
if (item.type == ItemID.Fake_IvyChest) item.CloneDefaults(ItemID.DeadMansChest); | ||
if (item.type == ItemID.Fake_JungleChest) item.CloneDefaults(ItemID.DeadMansChest); | ||
if (item.type == ItemID.Fake_LihzahrdChest) item.CloneDefaults(ItemID.DeadMansChest); | ||
if (item.type == ItemID.Fake_LivingWoodChest) item.CloneDefaults(ItemID.DeadMansChest); | ||
if (item.type == ItemID.Fake_MarbleChest) item.CloneDefaults(ItemID.DeadMansChest); | ||
if (item.type == ItemID.Fake_MartianChest) item.CloneDefaults(ItemID.DeadMansChest); | ||
if (item.type == ItemID.Fake_MeteoriteChest) item.CloneDefaults(ItemID.DeadMansChest); | ||
if (item.type == ItemID.Fake_MushroomChest) item.CloneDefaults(ItemID.DeadMansChest); | ||
if (item.type == ItemID.Fake_newchest1) item.CloneDefaults(ItemID.DeadMansChest); | ||
if (item.type == ItemID.Fake_newchest2) item.CloneDefaults(ItemID.DeadMansChest); | ||
if (item.type == ItemID.Fake_ObsidianChest) item.CloneDefaults(ItemID.DeadMansChest); | ||
if (item.type == ItemID.Fake_PalmWoodChest) item.CloneDefaults(ItemID.DeadMansChest); | ||
if (item.type == ItemID.Fake_PearlwoodChest) item.CloneDefaults(ItemID.DeadMansChest); | ||
if (item.type == ItemID.Fake_PinkDungeonChest) item.CloneDefaults(ItemID.DeadMansChest); | ||
if (item.type == ItemID.Fake_PumpkinChest) item.CloneDefaults(ItemID.DeadMansChest); | ||
if (item.type == ItemID.Fake_RichMahoganyChest) item.CloneDefaults(ItemID.DeadMansChest); | ||
if (item.type == ItemID.Fake_ShadewoodChest) item.CloneDefaults(ItemID.DeadMansChest); | ||
if (item.type == ItemID.Fake_ShadowChest) item.CloneDefaults(ItemID.DeadMansChest); | ||
if (item.type == ItemID.Fake_SkywareChest) item.CloneDefaults(ItemID.DeadMansChest); | ||
if (item.type == ItemID.Fake_SlimeChest) item.CloneDefaults(ItemID.DeadMansChest); | ||
if (item.type == ItemID.Fake_SpookyChest) item.CloneDefaults(ItemID.DeadMansChest); | ||
if (item.type == ItemID.Fake_SteampunkChest) item.CloneDefaults(ItemID.DeadMansChest); | ||
if (item.type == ItemID.Fake_WaterChest) item.CloneDefaults(ItemID.DeadMansChest); | ||
if (item.type == ItemID.Fake_WebCoveredChest) item.CloneDefaults(ItemID.DeadMansChest); | ||
} | ||
} | ||
} | ||
*/ |
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
using Terraria; | ||
using Terraria.ID; | ||
using Terraria.ModLoader; | ||
|
||
namespace NekoTweakMod.NPCs | ||
{ | ||
public class NPCshops : GlobalNPC | ||
{ | ||
public override void SetupShop(int type, Chest shop, ref int nextSlot) // Allows you to add items to NPC shops | ||
{ | ||
if(type == NPCID.Merchant) // Specifies the npc we are changing | ||
{ | ||
shop.item[nextSlot].SetDefaults(ItemID.MiningShirt); // Add an item with the itemid to the next available slot in the NPCs shop | ||
shop.item[nextSlot].shopCustomPrice = 40000; // sets the purchase cost, 40000 = 4 gold | ||
nextSlot++; | ||
shop.item[nextSlot].SetDefaults(ItemID.MiningPants); | ||
shop.item[nextSlot].shopCustomPrice = 40000; | ||
nextSlot++; | ||
} | ||
} | ||
} | ||
} |
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 |
---|---|---|
|
@@ -4,5 +4,6 @@ namespace NekoTweakMod | |
{ | ||
public class NekoTweakMod : Mod | ||
{ | ||
//owo whats this | ||
} | ||
} |
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.1.1 | ||
version = 0.1.2.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.