diff --git a/.gitignore b/.gitignore
index 0320111..9e7d640 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,4 +3,4 @@ obj/
bin/
# Files
-ultrashell-mommy.csproj.user
\ No newline at end of file
+UltraShellMommy.csproj.user
\ No newline at end of file
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..c58029f
--- /dev/null
+++ b/README.md
@@ -0,0 +1,13 @@
+# UltraShellMommy
+The wonders of [shell-mommy](https://github.com/sudofox/shell-mommy), now in your ULTRAKILL console/shell.
+## Usage
+Anything in `{arguments}` depends on the command being used.
+`mommy {arguments}`.
+# Dependencies
+- BepInEx
+- ULTRAKILL (must be a legitimate copy from Steam)
+# Installing
+Place `UltraShellMommy.dll` in the `BepInEx/plugins` folder in your ULTRAKILL installation folder.
+# Building
+Create a file called UltraShellMommy.csproj.user and fill in the data from the template then place it next to UltraShellMommy.
+Then, run `dotnet build` in the directory with UltraShellMommy.csproj.
\ No newline at end of file
diff --git a/ultrashell-mommy.csproj b/UltraShellMommy.csproj
similarity index 100%
rename from ultrashell-mommy.csproj
rename to UltraShellMommy.csproj
diff --git a/ultrashell-mommy.csproj.user.template b/UltraShellMommy.csproj.user.template
similarity index 100%
rename from ultrashell-mommy.csproj.user.template
rename to UltraShellMommy.csproj.user.template
diff --git a/build.sh b/build.sh
deleted file mode 100755
index 7ae50ca..0000000
--- a/build.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/bash
-export LANG=en_gb.UTF-8
-dotnet build
diff --git a/screenshots/SD_Invalid.png b/screenshots/SD_Invalid.png
new file mode 100644
index 0000000..0ce6a5e
Binary files /dev/null and b/screenshots/SD_Invalid.png differ
diff --git a/screenshots/Valid.png b/screenshots/Valid.png
new file mode 100644
index 0000000..c78067e
Binary files /dev/null and b/screenshots/Valid.png differ
diff --git a/src/commands/mommy.cs b/src/commands/mommy.cs
index 2e43448..681c9cc 100644
--- a/src/commands/mommy.cs
+++ b/src/commands/mommy.cs
@@ -1,48 +1,80 @@
+/*
+Copyright (C) 2023 Tulpenkiste
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see .
+*/
+
using GameConsole;
using System;
namespace UltraShellMommy {
public class ShellMommy : ICommand {
+ public ShellMommy(UltraShellMommy commandsMommy) {
+ _mommy = commandsMommy;
+ }
+
public void Execute(GameConsole.Console con, string[] args) {
if (args.Length < 1 || args[0] == "help") {
+ // Print help and (if conditions are met) do ShellMommy negative response
con.PrintLine("Usage: mommy [args]");
- if (USM != null) {
+ if (args.Length >= 1 && args[0] != "help") {
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);
+ // Check if command exists
+ if (con.recognizedCommands.Keys.Contains(args[0])) {
+ // Ok it exists, execute it
+ 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);
+ } else {
+ UnityEngine.Debug.LogWarning("Unrecognized command: \"CMD\"".Replace("CMD", args[0]));
+ DoResponse(con, false);
+ }
}
}
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)];
+ // Random number handler
+ Random random = new Random();
+
+ // Get random values from UltraShellMommy
+ string mommyLittle = _mommy.MommysLittle[random.Next(_mommy.MommysLittle.Length)];
+ string mommyPronoun = _mommy.MommysPronouns[random.Next(_mommy.MommysPronouns.Length)];
+ string mommyRole = _mommy.MommysRole[random.Next(_mommy.MommysRole.Length)];
string response;
- if (isPositive) response = USM.MommyPositiveResponses[random.Next(USM.MommyPositiveResponses.Length)];
- else response = USM.MommyNegativeResponses[random.Next(USM.MommyNegativeResponses.Length)];
-
+ if (isPositive) response = _mommy.MommyPositiveResponses[random.Next(_mommy.MommyPositiveResponses.Length)];
+ else response = _mommy.MommyNegativeResponses[random.Next(_mommy.MommyNegativeResponses.Length)];
+
+ // Replace text in the response
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;
+
+ if (isPositive) con.PrintLine(response);
+ else UnityEngine.Debug.LogWarning(response);
}
+ // Command details
public string Name => "mommy";
- public string Description => "idk";
+ public string Description => "Emulates a nuturing and supportive figure for you on your debugging journeys";
public string Command => "mommy";
- private Random random = new Random();
-
- private UltraShellMommy USM = null;
+ // Current UltraShellMommy instance
+ private UltraShellMommy _mommy;
}
}
\ No newline at end of file
diff --git a/src/plugin.cs b/src/plugin.cs
index a231471..868a561 100644
--- a/src/plugin.cs
+++ b/src/plugin.cs
@@ -1,4 +1,21 @@
-using BepInEx;
+/*
+Copyright (C) 2023 Tulpenkiste
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see .
+*/
+
+using BepInEx;
using BepInEx.Logging;
using System;
@@ -11,9 +28,7 @@ namespace UltraShellMommy {
[BepInPlugin("UltraShellMommy", "Ultra Shell Mommy", "1.0.0")]
[BepInProcess("ULTRAKILL.exe")]
public class UltraShellMommy : BaseUnityPlugin {
- public static readonly ICommand[] Commands = {
- new ShellMommy()
- };
+ List Commands = new List();
private ConfigEntry CfgMommysLittle;
private ConfigEntry CfgMommysRole;
@@ -28,18 +43,19 @@ namespace UltraShellMommy {
public String[] MommyNegativeResponses;
private void Awake() {
+ Commands.Add(new ShellMommy(this));
+ // Register a new command
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 '/'.");
+ "Sets the affectionate term that mommy will use to refer to the user. Note: this and every other configurable value is split by a '/'.");
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 '/'.");
+ "Sets the pronouns that mommy will use to refer to itself.");
CfgMommysRole = Config.Bind("Mommy", "MommysRole", "mommy",
- "Sets the role that mommy will have. The default value is \"mommy\" and is split by '/'.");
+ "Sets the role that mommy will have.");
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. ");
@@ -47,6 +63,7 @@ namespace UltraShellMommy {
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.");
+ // Split everything into string[] by the '/' seperator
MommysLittle = CfgMommysLittle.Value.Split('/');
MommysPronouns = CfgMommysPronouns.Value.Split('/');
MommysRole = CfgMommysRole.Value.Split('/');
@@ -54,6 +71,9 @@ namespace UltraShellMommy {
MommyNegativeResponses = CfgMommysNegativeResponses.Value.Split('/');
Logger.LogInfo("Loaded UltraShellMommy!");
+
+ // License PrintLine
+ GameConsole.Console.Instance.PrintLine("[UltraShellMommy] This ULTRAKILL BepInEx plugin is provided under the GNU General Public License v3.\nIf you did not receive such a file, you can obtain a copy at https://www.gnu.org/licenses/gpl-3.0.en.html.");
}
}
}
\ No newline at end of file