Skip to content

Commit

Permalink
Release uwu
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMegax committed Nov 18, 2022
1 parent b2f468b commit d24f9be
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 24 deletions.
4 changes: 3 additions & 1 deletion LATEST.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
Fixes lag with hitboxes deactivated. Sorry bout' that!
Release 1.0.0

This is a bad idea uwu
20 changes: 15 additions & 5 deletions Main.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Collections.Generic;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using BTD_Mod_Helper;
Expand Down Expand Up @@ -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]);
Expand All @@ -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]);
Expand All @@ -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();
Expand All @@ -76,6 +79,13 @@ public static Dictionary<string, string> GetDictionary()
{
return Dict;
}

private static string Reverse( string s)
{
var charArray = s.ToCharArray();
Array.Reverse(charArray);
return new string(charArray);
}
}
}

14 changes: 5 additions & 9 deletions Owoify-Net/WordMappingFunctions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand All @@ -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])");
Expand Down Expand Up @@ -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)
Expand Down
3 changes: 2 additions & 1 deletion Properties/launchSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
10 changes: 2 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.

0 comments on commit d24f9be

Please sign in to comment.