NOVA-Team / NOVA-Monorepo

The core API of the NOVA voxel game modding system
https://nova-team.github.io
GNU Lesser General Public License v3.0
66 stars 23 forks source link

Move EnumSelector from Worldgen to Core #232

Closed ExE-Boss closed 7 years ago

ExE-Boss commented 7 years ago

This PR will move EnumSelector from Worldgen to Core.

Reason:

EnumSelector seems like a class that would benefit more from being in Core than in Worldgen.

Other changes:

It is now possible to write:

EnumSelector<EnumExample> enumSelectorExample = EnumSelector.of(EnumExample.class)
        .blockAll().apart(EnumExample.EXAMPLE_24, EnumExample.EXAMPLE_42).lock();

Instead of needing to write:

EnumSelector<EnumExample> enumSelectorExample = EnumSelector.of(EnumExample.class);
enumSelectorExample.blockAll();
enumSelectorExample.apart(EnumExample.EXAMPLE_24);
enumSelectorExample.apart(EnumExample.EXAMPLE_42);
enumSelectorExample.lock();
codecov-io commented 7 years ago

Current coverage is 13.75% (diff: 100%)

Merging #232 into master will increase coverage by 0.41%

@@             master       #232   diff @@
==========================================
  Files           386        387     +1   
  Lines         10787      10839    +52   
  Methods           0          0          
  Messages          0          0          
  Branches       1537       1547    +10   
==========================================
+ Hits           1439       1491    +52   
  Misses         9271       9271          
  Partials         77         77          

Powered by Codecov. Last update 1026510...f1f9dda

ExE-Boss commented 7 years ago

Done now.

ExE-Boss commented 7 years ago

@RX14 I’ve implemented all the changes that you’ve requested and I now consider this PR feature complete. If there’s anything else you’d like to add, feel free to say it.

RX14 commented 7 years ago

It would be nice if you could hit 100% branch coverage on the file (codecov), but I don't consider it essential. For example you should test raising behaviour, and there are a few partials where short-cut evaluation means the right side of an && expression is never evaluated.

ExE-Boss commented 7 years ago

@RX14 I’ve now reached 100% Code Coverage on the file, as you requested. The PR is now ready to be reviewed and merged.