Track the creating plugin for convars (#1537)
Similar to the recent work for commands, track and expose the creating plugin for convars. The first plugin to register a given cvar becomes the owner until that plugin is unloaded. If a plugin attempts to register a convar that was already registered and the originally registering plugin has been unloaded, that plugin becomes the owner. This isn't quite as nice as the way commands shift "ownership" as plugins are unloaded, but we don't have a sane data structure currently to implement that, and it seemed like a lot of unnecessary work as there shouldn't really be multiple plugins with conflicting cvars. Closes #1492
This commit is contained in:
@@ -122,6 +122,11 @@ methodmap ConVar < Handle
|
||||
public native set(int flags);
|
||||
}
|
||||
|
||||
// Retrieves the plugin handle of the convar's creator
|
||||
property Handle Plugin {
|
||||
public native get();
|
||||
}
|
||||
|
||||
// Sets the boolean value of a console variable.
|
||||
//
|
||||
// Note: The replicate and notify params are only relevant for the
|
||||
|
||||
Reference in New Issue
Block a user