Screenshots, README and adjustments to code
This commit is contained in:
parent
30946b5a25
commit
c3dfc4c669
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -3,4 +3,4 @@ obj/
|
|||
bin/
|
||||
|
||||
# Files
|
||||
ultrashell-mommy.csproj.user
|
||||
UltraShellMommy.csproj.user
|
13
README.md
Normal file
13
README.md
Normal file
|
@ -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.<br>
|
||||
`mommy <command> {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.<br>
|
||||
Then, run `dotnet build` in the directory with UltraShellMommy.csproj.
|
BIN
screenshots/SD_Invalid.png
Normal file
BIN
screenshots/SD_Invalid.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 335 KiB |
BIN
screenshots/Valid.png
Normal file
BIN
screenshots/Valid.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 MiB |
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
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 <command> [args]");
|
||||
if (USM != null) {
|
||||
if (args.Length >= 1 && args[0] != "help") {
|
||||
DoResponse(con, false);
|
||||
}
|
||||
} else {
|
||||
var cmd = con.recognizedCommands[args[0]];
|
||||
List<String> newArgs = new List<string>();
|
||||
for (int i = 1; i < args.Length; i++) newArgs.Add(args[i]);
|
||||
cmd.Execute(con, newArgs.ToArray<string>());
|
||||
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<String> newArgs = new List<String>();
|
||||
for (int i = 1; i < args.Length; i++) newArgs.Add(args[i]);
|
||||
cmd.Execute(con, newArgs.ToArray<string>());
|
||||
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;
|
||||
}
|
||||
}
|
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
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<ICommand> Commands = new List<ICommand>();
|
||||
|
||||
private ConfigEntry<String> CfgMommysLittle;
|
||||
private ConfigEntry<String> 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.");
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue