adapap / OWScript

Python-like scripting language which transpiles into Overwatch Workshop script rulesets.
MIT License
37 stars 2 forks source link

Only add map detector code if get_map() was used at least once #39

Closed netux closed 4 years ago

netux commented 4 years ago

Currently, the map detection code is added to every piece of transpiled code inside the "Generated by..." rule. Its more optimal and clean to only include it if its used, either at the beginning of the script or before the rule that first uses it, with the rule comment indicating what's its purpose.