This repository has been archived by the owner on Sep 12, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
removed now all refresh commands commands
- Loading branch information
1 parent
13145d8
commit 1536898
Showing
4 changed files
with
55 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
using CommandSystem; | ||
using CommandSystem.Commands; | ||
using Harmony; | ||
|
||
namespace Synapse.Events.Patches.SynapsePatches | ||
{ | ||
[HarmonyPatch(typeof(GameConsoleCommandHandler), nameof(GameConsoleCommandHandler.LoadGeneratedCommands))] | ||
static class GameCommandsPatch | ||
{ | ||
public static bool Prefix(GameConsoleCommandHandler __instance) | ||
{ | ||
__instance.RegisterCommand(new CommandSystem.Commands.ArgsCommand()); | ||
__instance.RegisterCommand(new CommandSystem.Commands.BuildInfoCommand()); | ||
__instance.RegisterCommand(CommandSystem.Commands.ConfigCommand.Create()); | ||
__instance.RegisterCommand(new CommandSystem.Commands.HelpCommand(__instance)); | ||
return false; | ||
} | ||
} | ||
|
||
[HarmonyPatch(typeof(ClientCommandHandler), nameof(ClientCommandHandler.LoadGeneratedCommands))] | ||
static class ClientCommandPatch | ||
{ | ||
public static bool Prefix(GameConsoleCommandHandler __instance) | ||
{ | ||
__instance.RegisterCommand(new HelpCommand(__instance)); | ||
return false; | ||
} | ||
} | ||
|
||
[HarmonyPatch(typeof(RemoteAdminCommandHandler), nameof(RemoteAdminCommandHandler.LoadGeneratedCommands))] | ||
static class RemoteCommandsPatch | ||
{ | ||
public static bool Prefix(GameConsoleCommandHandler __instance) | ||
{ | ||
__instance.RegisterCommand(new CommandSystem.Commands.BuildInfoCommand()); | ||
__instance.RegisterCommand(new CommandSystem.Commands.ChangeNameCommand()); | ||
__instance.RegisterCommand(CommandSystem.Commands.ConfigCommand.Create()); | ||
__instance.RegisterCommand(new CommandSystem.Commands.HelpCommand(__instance)); | ||
__instance.RegisterCommand(new CommandSystem.Commands.IntercomTextCommand()); | ||
return false; | ||
} | ||
} | ||
} |
15 changes: 0 additions & 15 deletions
15
Synapse/Events/Patches/SynapsePatches/RefreshCommandsPatch.cs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters