Esempio n. 1
0
        private void Unload()
        {
            UI.DestroyAll();

            _pluginInstance = null;
            _pluginConfig   = null;
        }
Esempio n. 2
0
        private void Init()
        {
            _pluginInstance = this;

            permission.RegisterPermission(PermissionDeploy, this);
            permission.RegisterPermission(PermissionDeployFree, this);
            permission.RegisterPermission(PermissionAutoDeploy, this);
            permission.RegisterPermission(PermissionViewItems, this);
            permission.RegisterPermission(PermissionDropItems, this);

            foreach (var capacityAmount in _pluginConfig.CapacityAmounts)
            {
                permission.RegisterPermission(GetCapacityPermission(capacityAmount), this);
            }

            Unsubscribe(nameof(OnEntitySpawned));

            if (_pluginConfig.TipChance <= 0)
            {
                Unsubscribe(nameof(OnEntityBuilt));
            }
        }