Closed elistevens closed 2 years ago
Thank you for the pull request!
This is a simple enough change, but a few of the unit tests will also need to be updated. I can have a look at those later today, but feel free to update the pull request yourself if you would like.
-Ben
Hrm, I think that I'm wrong - entity1
in the test_delete_entity
test is already 1
.
I misunderstood the create_enitity
function. Since it does self._next_entity_id += 1
before adding the entity, the first entity value is already 1
.
Sorry for the noise! I should have run some tests on my end first.
Ah, you're right. But no worries! I didn't realize it either, even after glancing at the unit tests.
Prior to this change, to have a value that stores a component ID set to a non-value, we must either:
This change makes it so that we can use the naturally falsy 0 value for unset IDs.