Techmino
Techmino copied to clipboard
Refactor eventsets by passing in arguments using ENV
As an example, currently, we have different eventsets for each of the Classic modes. This means there is a lot of repeated code.
An approach we could use to fix this is to supply eventset arguments using ENV.
-- mode
return{
-- ...
eventset='classic',
start_lvl=18,
transition_lines=100,
end_lines=200
-- ...
}
-- eventset
return{
-- ...
task=function()
ENV.start_lvl=ENV.start_lvl or 18
-- ...
end
}
~~Too lazy to fix, you can do it if you don't want to see them~~