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:
Asher Baker
2021-07-18 17:19:27 +01:00
committed by GitHub
parent 39aa75436e
commit 6a2ac9800b
4 changed files with 53 additions and 11 deletions
+5
View File
@@ -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