Exemple #1
0
        // Cannot fully initialize until shard is completely loaded, due to conflicts with the CommandSystem
        public static void Start()
        {
            CommandEntry entry = CommandSystem.Entries["SpeedBoost"];                                                // Find the SpeedBoost CommandEntry

            if (entry != null)                                                                                       //  The SpeedBoost command exists...
            {
                HasAccess = entry.AccessLevel;                                                                       // Set the access to the system to the AccessLevel required to use the SpeedBoost command
                CommandSystem.Register("AutoSpeedBooster", HasAccess, new CommandEventHandler(EventSink_OnCommand)); // Register the ASB command in the CommandSystem
                HelpInfo.FillTable();                                                                                // Refresh the HelpInfo dictionary to include the ASB command
                Initialized = true;                                                                                  // The script has now been initialized
            }
            else // The SpeedBoost command does not exist...
            {
                Running = false; // Deactivate the script
            }
        }