diff --git a/LATEST.md b/LATEST.md index f1f4240..f39a2de 100644 --- a/LATEST.md +++ b/LATEST.md @@ -1 +1,3 @@ -Fixes lag with hitboxes deactivated. Sorry bout' that! \ No newline at end of file +Release 1.0.0 + +This is a bad idea uwu \ No newline at end of file diff --git a/Main.cs b/Main.cs index fbc331a..cdb08a6 100644 --- a/Main.cs +++ b/Main.cs @@ -1,4 +1,5 @@ -using System.Collections.Generic; +using System; +using System.Collections.Generic; using System.IO; using System.Linq; using BTD_Mod_Helper; @@ -35,12 +36,14 @@ public override void OnEarlyInitialize() if (tokens.Length == 1) continue; if (string.IsNullOrEmpty(tokens[0])) continue; if (string.IsNullOrEmpty(tokens[1])) continue; - + + var endsWithQuotes = Reverse(tokens[1])[tokens.Length-1].Equals('\"'); // Don't ask me why, strings are being dumb today + if (tokens[1].StartsWith("\"")) { key = tokens[0]; tokens[1] = tokens[1].TrimStart('"'); - if (tokens[1].EndsWith("\"")) + if (endsWithQuotes) { tokens[1] = tokens[1].TrimEnd('"'); chainValues.Add(tokens[1]); @@ -51,7 +54,7 @@ public override void OnEarlyInitialize() continue; } } - else if (tokens[1].EndsWith("\"")) + else if (endsWithQuotes) { tokens[1] = tokens[1].TrimEnd('"'); chainValues.Add(tokens[1]); @@ -64,7 +67,7 @@ public override void OnEarlyInitialize() var valueString = chainValues.Aggregate("", (current, value) => current + (value + "\n")); valueString = valueString.TrimEnd('\n'); - valueString = Owoifier.Owoify(valueString); + valueString = Owoifier.Owoify(valueString, Owoifier.OwoifyLevel.Uwu); Dict.Add(key, valueString); chainValues.Clear(); @@ -76,6 +79,13 @@ public static Dictionary GetDictionary() { return Dict; } + + private static string Reverse( string s) + { + var charArray = s.ToCharArray(); + Array.Reverse(charArray); + return new string(charArray); + } } } diff --git a/Owoify-Net/WordMappingFunctions.cs b/Owoify-Net/WordMappingFunctions.cs index 710623d..c96373d 100644 --- a/Owoify-Net/WordMappingFunctions.cs +++ b/Owoify-Net/WordMappingFunctions.cs @@ -6,11 +6,9 @@ namespace Owoify.Owoify_Net internal static partial class Utility { private static readonly string[] Faces = { - "(・`ω´・)", ";;w;;", "owo", "UwU", ">w<", "^w^", "(* ^ ω ^)", - "(⌒ω⌒)", "ヽ(*・ω・)ノ", "(o´∀`o)", "(o・ω・o)", "\(^▽^)/", - "(*^ω^)", "(◕‿◕✿)", "(◕ᴥ◕)", "ʕ•ᴥ•ʔ", "ʕ→ᴥ←ʔ", "(*^.^*)", - "(。♥‿♥。)", "OwO", "uwu", "uvu", "UvU", "(* ̄з ̄)", "(つ✧ω✧)つ", - "(/ =ω=)/", "(╯°□°)╯︵ ┻━┻", "┬─┬ ノ( ゜-゜ノ)", "¯\\_(ツ)_/¯", + "(・`ω´・)", ";;w;;", "owo", "UwU", ">w<", "^w^", "(* ^ ω ^)" + ,"(oωo)", "(*^ω^)", "ʕ•ᴥ•ʔ", "(*^.^*)","OwO", "uwu", "uvu", + "UvU", "(/ =ω=)/" }; private static readonly Regex OToOwO = new Regex(@"o"); @@ -23,8 +21,7 @@ internal static partial class Utility private static readonly Regex ReadToWeadLower = new Regex(@"read"); private static readonly Regex BracketsToStarTrailsFore = new Regex(@"[({<]"); private static readonly Regex BracketsToStarTrailsRear = new Regex(@"[)}>]"); - private static readonly Regex PeriodCommaExclamationSemicolonToKaomojisFirst = new Regex(@"[.,](?![0-9])"); - private static readonly Regex PeriodCommaExclamationSemicolonToKaomojisSecond = new Regex(@"[!;]+"); + private static readonly Regex PeriodCommaExclamationSemicolonToKaomojisSecond = new Regex(@"[!]+"); private static readonly Regex ThatToDatLower = new Regex(@"that"); private static readonly Regex ThatToDatUpper = new Regex(@"That"); private static readonly Regex ThToFLower = new Regex(@"[Tt]h(?![Ee])"); @@ -103,8 +100,7 @@ private static Word MapBracketsToStarTrails(Word input) private static Word MapPeriodCommaExclamationSemicolonToKaomojis(Word input) { var rng = new Random(); - return input.Replace(PeriodCommaExclamationSemicolonToKaomojisFirst, () => " " + Faces[rng.Next(0, Faces.Length)]) - .Replace(PeriodCommaExclamationSemicolonToKaomojisSecond, () => " " + Faces[rng.Next(0, Faces.Length)]); + return input.Replace(PeriodCommaExclamationSemicolonToKaomojisSecond, () => " " + Faces[rng.Next(0, Faces.Length)]); } private static Word MapThatToDat(Word input) diff --git a/Properties/launchSettings.json b/Properties/launchSettings.json index 7d5bb85..334066f 100644 --- a/Properties/launchSettings.json +++ b/Properties/launchSettings.json @@ -3,7 +3,8 @@ "BloonsTD6": { "commandName": "Executable", "executablePath": "$(BloonsTD6)/BloonsTD6.exe", - "workingDirectory": "$(BloonsTD6)" + "workingDirectory": "$(BloonsTD6)", + "commandLineArgs": "--melonloader.maxlogs 0 --melonloader.disablestartscreen --melonloader.consoleontop" }, "BloonsTD6 (ML Debug)": { "commandName": "Executable", diff --git a/README.md b/README.md index 87441de..096889d 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,5 @@  ![Requires BTD6 Mod Helper](https://i.imgur.com/ID7iwfY.png) -![GitHub all releases](https://img.shields.io/github/downloads/TheMegax/HitboxMod/total) +![GitHub all releases](https://img.shields.io/github/downloads/TheMegax/OwoifyMod/total) -This mod adds toggleable hitboxes to the game. This includes tower collision, projectiles, bloons, ~~map obstacles~~ (soon), and paths. - -TODO: -- [ ] Optimize code for rendering hundreds of hitboxes -- [ ] Add map collision and obstacles -- [ ] In-game button toggles -- [ ] Fix bloons/towers extras affecting the hitbox +This mod owoifies all text using Owoify-Net. I have no regrets. \ No newline at end of file