Skip to content
This repository has been archived by the owner on Jul 26, 2024. It is now read-only.

Commit

Permalink
cool but broken rev%
Browse files Browse the repository at this point in the history
  • Loading branch information
KirisameSoup committed Apr 6, 2024
1 parent 0e52285 commit 51fcc14
Show file tree
Hide file tree
Showing 7 changed files with 497 additions and 91 deletions.
6 changes: 4 additions & 2 deletions cprev/Plugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ void Start()
{
harmony = Harmony.CreateAndPatchAll(typeof(CpRev), "com.kirisoup.hff.cprev");

if (onlyCoreModding) return;

if (timerLoaded) harmony.PatchAll(typeof(TimerInteg));

Cmds.RegCmds();
Expand All @@ -27,7 +29,7 @@ void Start()

void OnGUI()
{
if (!enabledCPR || !shouldWarnInvalid) return;
if (!enabledCPR || onlyCoreModding) return;

if (!cpMissed) return;

Expand Down Expand Up @@ -149,7 +151,7 @@ static class TimerInteg
}

public static bool enabledCPR = true;
public static bool shouldWarnInvalid = true;
public static bool onlyCoreModding = false;
static bool cpMissed;
static readonly bool timerLoaded = BepInEx.Bootstrap.Chainloader.PluginInfos.ContainsKey("com.plcc.hff.timer");
}
Expand Down
10 changes: 8 additions & 2 deletions reversed/Command.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ public static void RegCmds()
"Setting reversed% mode on/off",
"<on(1), off(0), toggle(t), query(q)>");

Soup.Regcmds.ToShell("rt", "", new Action(PlayerRt));
Soup.Regcmds.ToShell("throw", "", new Action<string>(ThrowPlayer));


}

Expand All @@ -33,7 +34,7 @@ public static bool SyntaxError(string error = null, bool badSyntax = true)
{
if (badSyntax)
print("Command syntax error" + (error.IsNullOrWhiteSpace() ? null : ": " + error) + newline +
helpClr + Soup.Regcmds.description_["reversed"] + "</color>"
helpClr + Soup.Regcmds.description_["reversedmode"] + "</color>"
);

return badSyntax;
Expand Down Expand Up @@ -81,6 +82,11 @@ public static void Toggler(String param)
case "query": case "q":
break;

case "alwaysSpawnInside": case "asi":
alwaysSpawnInside = !alwaysSpawnInside;
print($"{helpClr}reversed% alwaysSpawnInside:</color> " + alwaysSpawnInside + " <#ff0088>(Changed!)</color>");
break;

default:
Cmds.SyntaxError("Unexpected parameters");
return;
Expand Down
Loading

0 comments on commit 51fcc14

Please sign in to comment.