Пример #1
0
        private void Init()
        {
            permission.RegisterPermission(PermUse, this);
            permission.RegisterPermission(PermUseRadius, this);
            permission.RegisterPermission(PermUseSamRadius, this);

            cmd.AddChatCommand(_config.ToggleCommand, this, nameof(TurretCommand));
            cmd.AddChatCommand(_config.ToggleTcCommand, this, nameof(ToggleTurretsInTc));
            cmd.AddChatCommand(_config.ToggleSamTcCommand, this, nameof(ToggleSamsInTc));

            _instance      = this;
            _stored        = Interface.Oxide.DataFileSystem.ReadObject <PluginData>(Name);
            _turretManager = new TurretManager();
        }
        private void Init()
        {
            config        = Config.ReadObject <Configuration>();
            data          = Interface.Oxide.DataFileSystem.ReadObject <Data>(Name);
            turretManager = new TurretManager();
            Instance      = this;

            permission.RegisterPermission(permUse, this);
            permission.RegisterPermission(permUseRadius, this);
            permission.RegisterPermission(permUseSamRadius, this);

            cmd.AddChatCommand(config.ToggleCommand, this, "TurretCommand");
            cmd.AddChatCommand(config.ToggleTCCommand, this, "ToggleTurretsInTc");
            cmd.AddChatCommand(config.ToggleSamTcCommand, this, "ToggleSamsInTc");
        }
Пример #3
0
 private void Unload()
 {
     _instance = null;
 }