LockerPlugin¶
Inherits:
The LockerPlugin class is the manager of the Locker Plugin’s editor features.
Description¶
This class is responsible for managing the access of the settings of this Plugin through the use of the LokSettingsManager class. The settings of this Plugin only become available while the LockerPlugin is active, though. When active, this Plugin also registers the LokGlobalStorageManager as an autoload singleton.
Version: 1.0.0 Author: github.com/nadjiel <github.com/nadjiel>_
Method Index¶
Constant Descriptions¶
AUTOLOAD_NAME = "LokGlobalStorageManager"¶
The AUTOLOAD_NAME constant stores the name that should be given to the LockerPlugin’s autoload, when registered.
AUTOLOAD_PATH = "res://addons/locker/scripts/storage_manager/global_storage_manager.gd"¶
The AUTOLOAD_PATH constant stores the path to the script of the LokGlobalStorageManager so that this LockerPlugin can register it as an autoload when it is activated.
Method Descriptions¶
void _start_plugin()¶
The _start_plugin method registers the singleton needed by the LockerPlugin as an autoload, so it isn’t needed to do that manually. This method also updates and registers the settings of this plugin in the ProjectSettings, making sure to load any settings used before deactivating this plugin. When doing that, this method makes it so arbitrary LokAccessStratey are also made available in the ProjectSettings so that they can be easily selected. Finally, this method makes sure that whenever a setting from this Plugin is altered, it is saved in the ConfigFile in the LokSettingsManager.CONFIG_PATH.
void _finish_plugin()¶
The _finish_plugin method unregisters the singleton needed by the LockerPlugin from the autoloads, so it doesn’t stay there without the Plugin being active. This method also unregisters the settings of this plugin from the ProjectSettings.