diff --git a/AutofisherHooks.cs b/AutofisherHooks.cs index 823ac6d..7af226c 100644 --- a/AutofisherHooks.cs +++ b/AutofisherHooks.cs @@ -18,7 +18,7 @@ static class AutofisherHooks { static Dictionary> hooks = new Dictionary>(); - public static void Initialize() + static AutofisherHooks() { hooks[HookType.CatchFish] = new List(); hooks[HookType.GetFishingLevel] = new List(); diff --git a/Config.cs b/Config.cs index d3af9b2..ab09c44 100644 --- a/Config.cs +++ b/Config.cs @@ -232,7 +232,7 @@ public static void LoadFKConfig() setting.AddComment("Stat changes and new early game gem staves", commentScale); setting.AddBool(AltStaffsKey, "Alternate Staves", false); - setting.AddComment("Magic stones that replуnish health and mana for a number of uses.", commentScale); + setting.AddComment("Magic stones that replenish health and mana for a number of uses.", commentScale); setting.AddBool(MagicStonesKey, "Magic Stones", false); setting.AddComment("Unobtainable God Mode item(use Cheat Sheet or another mod.)", commentScale); setting.AddBool(GodStoneKey, "God Stone", false); diff --git a/GoldensMisc.cs b/GoldensMisc.cs index a657c45..3233f8a 100644 --- a/GoldensMisc.cs +++ b/GoldensMisc.cs @@ -20,6 +20,7 @@ using Terraria.Localization; using Terraria.ModLoader; using Terraria.UI; +using System.Linq; namespace GoldensMisc { @@ -40,11 +41,10 @@ public GoldensMisc() public override void Load() { Instance = this; //apparently you get some problems with Mod Reloading if you put this in the constructor + FixCSharp6CompilerIssueThing(); FKtModSettingsLoaded = ModLoader.GetMod("FKTModSettings") != null; VanillaTweaksLoaded = ModLoader.GetMod("VanillaTweaks") != null; - AutofisherHooks.Initialize(); - if(!Main.dedServ) { if(FKtModSettingsLoaded) @@ -80,6 +80,15 @@ public override void Load() AddProjectile("MagicSpearMiniAlt", new MagicSpearMini()); } } + + static void FixCSharp6CompilerIssueThing() + { + var thing = Enumerable.Range(5, 10); + foreach(int i in thing) + { + //nothing + } + } public override void PostSetupContent() { diff --git a/GoldensMisc.csproj b/GoldensMisc.csproj index 649cc98..5e4efda 100644 --- a/GoldensMisc.csproj +++ b/GoldensMisc.csproj @@ -190,7 +190,7 @@ - E:\Yurik\Steam\SteamApps\common\Terraria\Terraria.exe -build "$(ProjectDir)\" -savedirectory "E:\Yurik\Terraria" + E:\Yurik\Steam\SteamApps\common\Terraria\tModLoaderServer.exe -build "$(ProjectDir)\" -savedirectory "E:\Yurik\Terraria" diff --git a/Projectiles/AutofisherBobber.cs b/Projectiles/AutofisherBobber.cs index 7c76353..0526dc5 100644 --- a/Projectiles/AutofisherBobber.cs +++ b/Projectiles/AutofisherBobber.cs @@ -54,11 +54,9 @@ public override void SetDefaults() //ai[1] - tile entity ID public override void AI() { - //Main.NewText(projectile.ai[1]); if(!TileEntity.ByID.ContainsKey((int)projectile.ai[1]) || !(TileEntity.ByID[(int)projectile.ai[1]] is AutofisherTE)) { projectile.Kill(); - //Main.NewText("kill me"); return; } var te = (AutofisherTE)TileEntity.ByID[(int)projectile.ai[1]]; @@ -142,7 +140,7 @@ public override void AI() Rectangle rectangle2 = new Rectangle(te.Position.X * 16, te.Position.Y * 16, 48, 32); if(((Rectangle)rectangle1).Intersects(rectangle2)) { - if((double)projectile.ai[0] > 0.0 && (double)projectile.ai[0] < 3930.0) + if((double)projectile.ai[0] > 0.0) { int Type = (int)projectile.ai[0]; Item newItem = new Item(); @@ -189,7 +187,6 @@ public override void AI() } else { - //Main.NewText("just fishin"); //bool flag = false; //Vector2 vector2 = new Vector2((float)(projectile.position.X + (double)projectile.width * 0.5), (float)(projectile.position.Y + (double)projectile.height * 0.5)); //float num1 = (float)(Main.player[projectile.owner].position.X + (double)(Main.player[projectile.owner].width / 2) - vector2.X); @@ -199,7 +196,6 @@ public override void AI() // projectile.ai[0] = 1f; if(projectile.wet) { - //Main.NewText("wet"); projectile.rotation = 0.0f; projectile.velocity.X *= 0.9f; int index1 = (int)(projectile.Center.X + (double)((projectile.width / 2 + 8) * projectile.direction)) / 16; @@ -443,7 +439,6 @@ public int FishingCheck() // num18 += 10; int type = -1; var zone = MiscUtils.GetZoneInLocation(te.Position.X, te.Position.Y); - //Main.NewText(zone); bool junk = false; diff --git a/Tiles/AutofisherTE.cs b/Tiles/AutofisherTE.cs index 5876206..f406bca 100644 --- a/Tiles/AutofisherTE.cs +++ b/Tiles/AutofisherTE.cs @@ -49,13 +49,11 @@ public override void Update() if(baitItem != null && (bobberProj == -1 || !Main.projectile[bobberProj].active || Main.projectile[bobberProj].type != mod.ProjectileType())) { - //Main.NewText("new proj!"); var bobberPos = new Point(Position.X + (facingRight ? 2 : 0), Position.Y).ToWorldCoordinates(); bobberProj = Projectile.NewProjectile(bobberPos, new Vector2(facingRight ? 3f : -3f, 0f), mod.ProjectileType(), 0, 0, ai1: this.ID); Main.projectile[bobberProj].ai[1] = this.ID; Main.projectile[bobberProj].netUpdate = true; } - //Main.NewText(FishingCooldown); if(FishingCooldown > 0) { FishingCooldown--; @@ -64,7 +62,6 @@ public override void Update() { if(Main.rand.Next(150) == 1) { - //Main.NewText("hello!"); FishingCooldown = 500; int itemType = 0; try @@ -126,7 +123,6 @@ public int GetFishingLevel(Item baitItem) power = (int)((double)power * 0.949999988079071); if(Main.moonPhase == 4) power = (int)((double)power * 0.899999976158142); - //Main.NewText("raw fish power: " + num2); AutofisherHooks.GetFishingLevel(this, baitItem, ref power); return power; } diff --git a/build.txt b/build.txt index 9612d0a..3674daf 100644 --- a/build.txt +++ b/build.txt @@ -1,6 +1,6 @@ displayName = Miscellania author = goldenapple -version = 1.6.3 +version = 1.6.4 homepage = http://forums.terraria.org/index.php?threads/miscellania.39500/ hideResources = false hideCode = false