From 8abd08fda89d5155d26f6a3927b1538f2145792d Mon Sep 17 00:00:00 2001 From: in0finite Date: Tue, 23 Feb 2021 00:54:46 +0100 Subject: [PATCH] provide list of registered commands --- Assets/Scripts/Commands/BaseCommands.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Assets/Scripts/Commands/BaseCommands.cs b/Assets/Scripts/Commands/BaseCommands.cs index 440cc4f0..592d149d 100644 --- a/Assets/Scripts/Commands/BaseCommands.cs +++ b/Assets/Scripts/Commands/BaseCommands.cs @@ -20,6 +20,9 @@ namespace SanAndreasUnity.Commands readonly Dictionary m_perPlayerData = new Dictionary(); + List m_registeredCommands = new List(); + public IReadOnlyList RegisteredCommands => m_registeredCommands; + public float vehicleLimitInterval = 3f; public float pedLimitInterval = 2f; public float weaponLimitInterval = 1f; @@ -57,6 +60,8 @@ namespace SanAndreasUnity.Commands cmd.commandHandler = ProcessCommand; CommandManager.Singleton.RegisterCommand(cmd); } + + m_registeredCommands = commands.Select(c => c.command).ToList(); } private void PlayerOnDisable(Player player)