ItsDeltin / Overwatch-Script-To-Workshop

Converts scripts to Overwatch workshops.
209 stars 26 forks source link

Built-in variables (extended collection and array builder) are created, even when not used at all. #131

Closed MichaelBrunn3r closed 3 years ago

MichaelBrunn3r commented 4 years ago

Currently variables "_extendedGlobalCollection", "_arrayBuilder", "Nodes", "Segments" and "_extendedPlayerCollection" are created even if the project never uses them. It would be great if the compiler only creates them if necessary, either by automatic optimization or a compiler instruction.

This could be expanded to custom variables as well. Currently every declared variable is exported, even if not used.

ItsDeltin commented 4 years ago

There should additionally be a warning when a variable is unused. Related to #112.

ItsDeltin commented 4 years ago

Nodes and Segments is no longer created in v1.3.

ItsDeltin commented 3 years ago

Done in v2.0