Jump to content
NumbNutsJunior

[RELEASE] Arma Decorators

Recommended Posts

Arma Decorators

A vanilla SQF extension implementing python style decorators.

 

 

 

Disclaimer

This release is part of a series of releases containing projects that I have not completely fleshed out or implemented into any dedicated server environment. I am releasing these projects because I have stopped playing and scripting for Arma 3, but I figured that this project was interesting enough that others may want to implement them into their missions. That being said, use them as you will and enjoy.

- With this particular project, having "not been completely fleshed out" means that it may contain security bugs (although I don't think it does).
- - I have done extensive testing but I would advise only experienced scripters to use this if you plan on implementing it on any public servers.
 

Features

- Implement a subscript into any other script through config file attributes (eg. anti-cheat, logging, ect)

- Add custom meta-data into any script during compilation.

Setup

- Define the files found in the example mission into your mission's function library.
- Within your function library, copy and implement the example mission's "Decorators" category/class.
- - Exclude trackCalls & trackRuntime unless you want these example decorators hanging around.
- For any function you want to decorate, provide a decorators[] array attribute containing a list of decorator script names as strings.

- Within your mission's description.ext, set allowFunctionsRecompile = true. This process essentially just adds one more recompile pass.
- - All config, campaign, and mission function libraries will be compileFinal on the second pass (unless explicitly set otherwise).

Showcase


Download
https://github.com/NumbNutsJunior/Arma-Decorators


I hope you can find some use for it in your missions, feel free to modify and improve the system of course but just ask to leave my initial author credits.
~ NumbNutsJunior aka Pizza Man

  • Like 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×