mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-06-13 00:28:10 -05:00
add configuration update callback for script plugins & update plugins to utilize
This commit is contained in:
@ -291,6 +291,15 @@ public class ScriptPluginV2 : IPluginV2
|
||||
_scriptPluginConfigurationWrapper =
|
||||
new ScriptPluginConfigurationWrapper(_fileName.Split(Path.DirectorySeparatorChar).Last(), ScriptEngine,
|
||||
_configHandler);
|
||||
|
||||
_scriptPluginConfigurationWrapper.ConfigurationUpdated += (configValue, callbackAction) =>
|
||||
{
|
||||
WrapJavaScriptErrorHandling(() =>
|
||||
{
|
||||
callbackAction.DynamicInvoke(JsValue.Undefined, new[] { configValue });
|
||||
return Task.CompletedTask;
|
||||
}, _logger, _fileName, _onProcessingScript);
|
||||
};
|
||||
}
|
||||
|
||||
private void UnregisterScriptEntities(IManager manager)
|
||||
|
Reference in New Issue
Block a user