Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Event Support #4

Open
Spartan322 opened this issue Apr 1, 2016 · 3 comments
Open

Event Support #4

Spartan322 opened this issue Apr 1, 2016 · 3 comments

Comments

@Spartan322
Copy link
Collaborator

An idea for addons and hookins might be Events, when the API becomes usable.

This should probably be discussed and decided upon.

@Spartan322
Copy link
Collaborator Author

Event Ideas:
ScriptEvent - itself does nothing, is just a prototype event like EntiyEvent or PlayerEvent in Forge (holds ScriptInstance and input args)
ScriptEvent.PreParse - triggers before the script is parsed (cancel prevents parsing, result in nothing)
ScriptEvent.PostParse - triggers after script is parsed, also accesses a list of IScriptObjects (cancel prevents activation of script objects, can be used to control just before the activation of the script)
ScriptEvent.End - triggers just after all objects are activated (post activation event, can't cancel)
ScriptEvent.TypeActive<T extends IScriptObject> - triggers on specific script objects activated (cancel prevents activation of type)

WardEvent - prototype ward event (extends ScriptEvent, but also contains the ward instance object, #3 discussed handling of wards)
WardEvent.Create - triggers on the creation of a ward (cancel prevents ward creation)
WardEvent.Activate - triggers on the activation of a ward (cancel prevents ward activation)
WardEvent.Destroy - triggers on destruction of a ward (cancel prevents ward destruction)

Any others in mind?

@Spartan322
Copy link
Collaborator Author

Event System for scripts is on Spartan322/event-api

@Spartan322
Copy link
Collaborator Author

ScriptEvents covered by #14

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant