Cardiopulmonary Resuscitation (CPR) Plugin
-
PLUGIN.CPR:New(name[, author])
-
Create a new plugin.
Parameters:
Returns:
PLUGIN
Inhereted from:
-
PLUGIN.CPR:CallAsHook(name, ...)
-
Call the hooks of this plugin.
Parameters:
- name
string
Name of the hook to call.
- ...
vararg
Data to pass to the hook function.
Returns:
vararg
Returns from the called functions.
Inhereted from:
-
PLUGIN.CPR:Call(name, ...)
-
Call the hooks of this plugin, ignoring any output.
Parameters:
- name
string
Name of the hook
- ...
vararg
Data to pass to the hook function.
Returns:
vararg
Returns from the called functions.
Inhereted from:
See also:
-
PLUGIN.CPR:Hook(name, func)
-
Adds a hook function to the plugin.
Parameters:
- name
string
Hook name.
- func
func
Function to add.
Returns:
PLUGIN
Inhereted from:
-
PLUGIN.CPR:AddHook(name, func)
-
Adds a hook function to the plugin, and also registers the hook with hook.Add
Parameters:
- name
string
Hook name.
- func
func
Function to add.
Returns:
PLUGIN
Inhereted from:
-
PLUGIN.CPR:Enable()
-
Enable the plugin.
Returns:
PLUGIN
Inhereted from:
-
PLUGIN.CPR:Disable()
-
Disable the plugin.
Returns:
PLUGIN
Inhereted from:
-
PLUGIN.CPR:Enabled()
-
Get if the plugin is enabled.
Returns:
bool
Inhereted from:
-
PLUGIN.CPR:IsValid()
-
Checks if the plugin is valid (currently checks enabled status)
Returns:
bool
Inhereted from:
See also:
-
PLUGIN.CPR:Register([name=self.name])
-
Registers the plugin.
Parameters:
- name
string
Name to register the plugin with, if not already defined.
(default self.name)
Inhereted from:
-
PLUGIN.CPR:CreateFolder(fullPath)
-
Create a folder, along with any intermedate folders.
Parameters:
Returns:
PLUGIN
Inhereted from:
-
PLUGIN.CPR:DataFolder()
-
Gets the data folder for this plugin.
Returns:
string
Inhereted from:
-
PLUGIN.CPR:CreateDataFolder()
-
Creates this plugin's data folder.
Returns:
PLUGIN
Inhereted from:
-
PLUGIN.CPR:DataFile(name)
-
Gets the path to a data file for this plugin.
Parameters:
Returns:
string
Full path.
Inhereted from:
-
PLUGIN.CPR:MapFolder()
-
Gets the data folder for this plugin on the current map.
Returns:
string
Inhereted from:
-
PLUGIN.CPR:CreateMapFolder()
-
Creates this plugin's data folder for the current map.
Returns:
PLUGIN
Inhereted from:
-
PLUGIN.CPR:MapFile(name)
-
Gets the path to a map file for this plugin.
Parameters:
Returns:
string
Full path.
Inhereted from:
-
PLUGIN.CPR:OpenDataFile(name[, mode=r])
-
Gets the file class for the given file.
Parameters:
Returns:
file_class
Inhereted from:
See also:
-
PLUGIN.CPR:OpenMapFile(name[, mode=r])
-
Gets the file class for the given file.
Parameters:
Returns:
file_class
Inhereted from:
See also:
-
PLUGIN.CPR:ReadDataFile(name)
-
Reads a given data file.
Parameters:
Returns:
string
File contents.
Inhereted from:
-
PLUGIN.CPR:WriteDataFile(name, contents)
-
Writes a given data file.
Parameters:
Returns:
PLUGIN
Inhereted from:
-
PLUGIN.CPR:ReadMapFile(name)
-
Reads a given data file.
Parameters:
Returns:
string
File contents.
Inhereted from:
-
PLUGIN.CPR:WriteMapFile(name, contents)
-
Writes a given data file.
Parameters:
Returns:
PLUGIN
Inhereted from: