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

Add support for code to be run in map config function #982

Open
jlfarris91 opened this issue Jan 5, 2021 · 1 comment
Open

Add support for code to be run in map config function #982

jlfarris91 opened this issue Jan 5, 2021 · 1 comment

Comments

@jlfarris91
Copy link

I would like to be able to run code in the map's config function. The config function is like the main function but it runs prior to the lobby being joinable. My primary use case for this is to play a song in the map lobby. See this post for more info: https://www.hiveworkshop.com/threads/vjass-advanced-initialization.247590/#post-2682339

I can imagine this being accomplished by introducing an annotation @config that, when added to a function, flags it to be run during the map configuration or by introducing a new config scope, like the init scope, where all code within is injected into the map's config function. I've never heard of anyone using the config function to do anything other than play a sound in the lobby so explicitly tagging a single function might make more sense than introducing a new scope.

@jlfarris91 jlfarris91 changed the title Add support for functions to be run in map config function Add support for code to be run in map config function Jan 5, 2021
@Frotty
Copy link
Member

Frotty commented Feb 11, 2021

Yea could be added, but such injections are always a bit ugly imo.
If the only reason is to play a song in the lobby i don't think it's a strongly needed feature.

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

No branches or pull requests

2 participants