diff --git a/src/commands/mommy.cs b/src/commands/mommy.cs index 622c002..2e43448 100644 --- a/src/commands/mommy.cs +++ b/src/commands/mommy.cs @@ -1,13 +1,48 @@ using GameConsole; +using System; namespace UltraShellMommy { public class ShellMommy : ICommand { public void Execute(GameConsole.Console con, string[] args) { - con.PrintLine("test"); + if (args.Length < 1 || args[0] == "help") { + con.PrintLine("Usage: mommy [args]"); + if (USM != null) { + DoResponse(con, false); + } + } else { + var cmd = con.recognizedCommands[args[0]]; + List newArgs = new List(); + for (int i = 1; i < args.Length; i++) newArgs.Add(args[i]); + cmd.Execute(con, newArgs.ToArray()); + DoResponse(con, true); + } + } + + private void DoResponse(GameConsole.Console con, bool isPositive) { + string mommyLittle = USM.MommysLittle[random.Next(USM.MommysLittle.Length)]; + string mommyPronoun = USM.MommysPronouns[random.Next(USM.MommysPronouns.Length)]; + string mommyRole = USM.MommysRole[random.Next(USM.MommysRole.Length)]; + string response; + + if (isPositive) response = USM.MommyPositiveResponses[random.Next(USM.MommyPositiveResponses.Length)]; + else response = USM.MommyNegativeResponses[random.Next(USM.MommyNegativeResponses.Length)]; + + response = response.Replace("AFFECTIONATE_TERM", mommyLittle); + response = response.Replace("MOMMYS_PRONOUN", mommyPronoun); + response = response.Replace("MOMMYS_ROLE", mommyRole); + con.PrintLine(response); + } + + public void SetUSM(UltraShellMommy newUSM) { + USM = newUSM; } public string Name => "mommy"; public string Description => "idk"; public string Command => "mommy"; + + private Random random = new Random(); + + private UltraShellMommy USM = null; } } \ No newline at end of file diff --git a/src/plugin.cs b/src/plugin.cs index 4a1c16c..a231471 100644 --- a/src/plugin.cs +++ b/src/plugin.cs @@ -5,16 +5,54 @@ using System; using System.Collections; using GameConsole; +using BepInEx.Configuration; namespace UltraShellMommy { [BepInPlugin("UltraShellMommy", "Ultra Shell Mommy", "1.0.0")] + [BepInProcess("ULTRAKILL.exe")] public class UltraShellMommy : BaseUnityPlugin { public static readonly ICommand[] Commands = { new ShellMommy() }; + private ConfigEntry CfgMommysLittle; + private ConfigEntry CfgMommysRole; + private ConfigEntry CfgMommysPronouns; + private ConfigEntry CfgMommysPositiveResponses; + private ConfigEntry CfgMommysNegativeResponses; + + public String[] MommysLittle; + public String[] MommysRole; + public String[] MommysPronouns; + public String[] MommyPositiveResponses; + public String[] MommyNegativeResponses; + private void Awake() { GameConsole.Console.Instance.RegisterCommand(Commands[0]); + (Commands[0] as ShellMommy).SetUSM(this); + + // This could be more efficient, but too bad! I am too lazy. + CfgMommysLittle = Config.Bind("Mommy", "MommysLittle", "girl", + "Sets the affectionate term that mommy will use to refer to the user. The default value is \"girl\" and is split by '/'."); + + CfgMommysPronouns = Config.Bind("Mommy", "MommysPronouns", "her", + "Sets the pronouns that mommy will use to refer to itself. The default value is \"her\" and is split by '/'."); + + CfgMommysRole = Config.Bind("Mommy", "MommysRole", "mommy", + "Sets the role that mommy will have. The default value is \"mommy\" and is split by '/'."); + + CfgMommysPositiveResponses = Config.Bind("Mommy", "MommysPositiveResponses", "*pets your head*/awe, what a good AFFECTIONATE_TERM~\nMOMMYS_ROLE knew you could do it~ ❤️/good AFFECTIONATE_TERM~\nMOMMYS_ROLE's so proud of you~ ❤️/Keep up the good work, my love~ ❤️/MOMMYS_ROLE is proud of the progress you've made~ ❤️/MOMMYS_ROLE is so grateful to have you as MOMMYS_PRONOUN little AFFECTIONATE_TERM~ ❤️/I'm so proud of you, my love~ ❤️/MOMMYS_ROLE is so proud of you~ ❤️/MOMMYS_ROLE loves seeing MOMMYS_PRONOUN little AFFECTIONATE_TERM succeed~ ❤️/MOMMYS_ROLE thinks MOMMYS_PRONOUN little AFFECTIONATE_TERM earned a big hug~ ❤️/that's a good AFFECTIONATE_TERM~ ❤️/you did an amazing job, my dear~ ❤️/you're such a smart cookie~ ❤️", + "Sets the possible negative responses that mommy will use. "); + + CfgMommysNegativeResponses = Config.Bind("Mommy", "MommysNegativeResponses", "do you need MOMMYS_ROLE's help~? ❤️/Don't give up, my love~ ❤️/Don't worry, MOMMYS_ROLE is here to help you~ ❤️/I believe in you, my sweet AFFECTIONATE_TERM~ ❤️/It's okay to make mistakes, my dear~ ❤️/just a little further, sweetie~ ❤️/Let's try again together, okay~? ❤️/MOMMYS_ROLE believes in you, and knows you can overcome this~ ❤️/MOMMYS_ROLE believes in you~ ❤️/MOMMYS_ROLE is always here for you, no matter what~ ❤️/MOMMYS_ROLE is here to help you through it~ ❤️/MOMMYS_ROLE is proud of you for trying, no matter what the outcome~ ❤️/MOMMYS_ROLE knows it's tough, but you can do it~ ❤️/MOMMYS_ROLE knows MOMMYS_PRONOUN little AFFECTIONATE_TERM can do better~ ❤️/MOMMYS_ROLE knows you can do it, even if it's tough~ ❤️/MOMMYS_ROLE knows you're feeling down, but you'll get through it~ ❤️/MOMMYS_ROLE knows you're trying your best~ ❤️/MOMMYS_ROLE loves you, and is here to support you~ ❤️/MOMMYS_ROLE still loves you no matter what~ ❤️/You're doing your best, and that's all that matters to MOMMYS_ROLE~ ❤️/MOMMYS_ROLE is always here to encourage you~ ❤️", + "Sets the possible positive responses that mommy will use."); + + MommysLittle = CfgMommysLittle.Value.Split('/'); + MommysPronouns = CfgMommysPronouns.Value.Split('/'); + MommysRole = CfgMommysRole.Value.Split('/'); + MommyPositiveResponses = CfgMommysPositiveResponses.Value.Split('/'); + MommyNegativeResponses = CfgMommysNegativeResponses.Value.Split('/'); + Logger.LogInfo("Loaded UltraShellMommy!"); } } diff --git a/ultrashell-mommy.csproj.user.template b/ultrashell-mommy.csproj.user.template new file mode 100644 index 0000000..f4baf5f --- /dev/null +++ b/ultrashell-mommy.csproj.user.template @@ -0,0 +1,9 @@ + + + + /path/to/ULTRAKILL/ + /path/to/ULTRAKILL/BepInEx + /path/to/ULTRAKILL/BepInEx/core/ + /path/to/ULTRAKILL/ULTRAKILL_Data/Managed/ + + \ No newline at end of file