Grasscutter icon indicating copy to clipboard operation
Grasscutter copied to clipboard

Update SetPropCommand.java

Open Secretboy-SMR opened this issue 2 years ago • 2 comments

Not need to add values.

Description

Please carefully read the Contributing note and Code of conduct before making any pull requests. And, Do not make a pull request to merge into stable unless it is a hotfix. Use the development branch instead.

Issues fixed by this PR

Type of changes

  • [ ] Bug fix
  • [x] New feature
  • [ ] Enhancement
  • [ ] Documentation

Checklist:

  • [x] My code follows the style guidelines of this project
  • [x] My pull request is unique and no other pull requests have been opened for these changes
  • [x] I have read the Contributing note and Code of conduct
  • [x] I am responsible for any copyright issues with my code if it occurs in the future.

Secretboy-SMR avatar Dec 14 '22 13:12 Secretboy-SMR

This is great, no need to add area id every time the version is updated

NctimeAza avatar Dec 15 '22 11:12 NctimeAza

You can accomplish the same thing with much less code via

final static private List<Integer> sceneAreas = IntStream.range(1, 1000).boxed().toList();

But I'm not sure simply bruteforcing the list is a good idea. At the very least it's ugly.

GanyusLeftHorn avatar Dec 18 '22 17:12 GanyusLeftHorn