-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Added automated Load attributes #127
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5a4727e
to
6b6877b
Compare
Open
Spartan322
added a commit
that referenced
this pull request
Nov 4, 2021
Operates after all plugins are loaded Common use case is acting upon the plugin list Added Load, PostLoad, and Unload events Enables organization and separation of load related behavior With #127 load behavior can be automated without a plugin Load method Load and PostLoad events run after their method counterparts Unload events run before its method counterpart PostLoad and Unload are patches to the related HacknetPlugin methods Load is patched to postfix HacknetChainloader.LoadPlugin Added Assembly indexer getter to AssemblyAssociatedList Enables retrieving Assembly pure assembly lists Useful for Load events Added EventManager.InvokeAssembly Used for Load events EventManager's invoke behavior put into a central private static method
Added IgnorePluginAttribute to skip the plugin's assembly Added OptionsTabAttribute for globally declaring the plugins OptionsTab Tag for OptionAttribute Added OptionAttribute for registering an Options object Added Meta.Load.HacknetPluginExtensions.GetOptionsTag to retrieve OptionsTab tag for plugin AttributeManager.ReadAttributesFor is patched to prefix Plugin Loading
Corrected to run right before Load is called Now patches HacknetChainloader with ILManipulator instead Actually compile the Pathfinder.Meta.Load namespace Made EventAttribute able to function on Types as well If an EventAttribute is on a type, checks type for any applicable event methods Valid methods are static void methods whose only parameter is of type PathfinderEvent Can ignore specific events for a auto-register with IgnoreEventAttribute Renamed Meta.Load.ComputerExecutor to ComputerExecutorAttribute
3cf0f1c
to
79669ba
Compare
Check both instance and static members Correct OptionAttribute throw messages Make PortAttribute use PortRecord Throw if EventAttribute is on a method that isn't static
Windows10CE
pushed a commit
that referenced
this pull request
Nov 8, 2021
* Added HacknetPlugin.PostLoad Operates after all plugins are loaded Common use case is acting upon the plugin list Added Load, PostLoad, and Unload events Enables organization and separation of load related behavior With #127 load behavior can be automated without a plugin Load method Load and PostLoad events run after their method counterparts Unload events run before its method counterpart PostLoad and Unload are patches to the related HacknetPlugin methods Load is patched to postfix HacknetChainloader.LoadPlugin Added Assembly indexer getter to AssemblyAssociatedList Enables retrieving Assembly pure assembly lists Useful for Load events Added EventManager.InvokeAssembly Used for Load events EventManager's invoke behavior put into a central private static method * Fix incorrect directory for Load events * Changed EventManager.InvokeAll and InvokeAssembly access to public Enables calling events, like for custom events Does not consider plugin ownership of the event
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Attribute Association (defaults to class unless specified otherwise)
void (OS, string[])
method)static void (PathfinderEvent)
methodsstatic void (PathfinderEvent)
methodAdditional Attributes
Extensions
Adds HacknetPlugin.GetOptionsTag() and HacknetPlugin.HasOptionsTag() for handling OptionsTabAttribute registry
AttributeManager