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

Refactor eventsets by passing in arguments using ENV #1118

Open
Not-A-Normal-Robot opened this issue May 28, 2024 · 1 comment
Open

Refactor eventsets by passing in arguments using ENV #1118

Not-A-Normal-Robot opened this issue May 28, 2024 · 1 comment
Labels
enhancement New feature or request internal Issue regarding the internal code of the game

Comments

@Not-A-Normal-Robot
Copy link
Member

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
}
@Not-A-Normal-Robot Not-A-Normal-Robot added the internal Issue regarding the internal code of the game label May 28, 2024
@MrZ626
Copy link
Collaborator

MrZ626 commented May 28, 2024

Too lazy to fix, you can do it if you don't want to see them

@shoucandanghehe shoucandanghehe added the enhancement New feature or request label May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request internal Issue regarding the internal code of the game
Projects
None yet
Development

No branches or pull requests

3 participants