You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
751 B

  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. namespace IPA.Loader.Features
  7. {
  8. internal class NoRuntimeEnableFeature : Feature
  9. {
  10. internal static bool HaveLoadedPlugins = false;
  11. public override bool Initialize(PluginLoader.PluginMetadata meta, string[] parameters)
  12. {
  13. return parameters.Length == 0;
  14. }
  15. public override bool BeforeLoad(PluginLoader.PluginMetadata plugin)
  16. {
  17. return !HaveLoadedPlugins;
  18. }
  19. public override string InvalidMessage
  20. {
  21. get => "Plugin requested to not be loaded after initial plugin load";
  22. protected set { }
  23. }
  24. }
  25. }