Terasology / ManualLabor

Work is hard. Here are tools a workman needs to make digging and chopping easier.
0 stars 11 forks source link

Add shearing system test #55

Closed meetcshah19 closed 3 years ago

jdrueckert commented 3 years ago

@keturn did you manage to have a look yet?

keturn commented 3 years ago

@meetcshah19 This PR has some git conflicts.

(I'm also not sure why it has the assets for the effects in here, but maybe that'll clear up once the branch is up to date.)

meetcshah19 commented 3 years ago

@meetcshah19 This PR has some git conflicts.

(I'm also not sure why it has the assets for the effects in here, but maybe that'll clear up once the branch is up to date.)

@keturn Solved

keturn commented 3 years ago

I remembered the other thing I thought about testing for switchPrefab! https://github.com/Terasology/ManualLabor/blob/50553b4fc83c3c489a870af6b76f243825ba8f3b/src/main/java/org/terasology/manualLabor/systems/ShearingSystem.java#L162

It would be real easy to write that code and then forget to call saveComponent at the end, so I was wondering whether the tests catch that.

I did a little reading of the Entity implementation and I'm not sure they will.

Because we don't have any good precedent for it, I won't make it a requirement for this PR, but if you do happen to find a clean way to test that—or a better API which would make it harder to make that mistake—please let us know!

meetcshah19 commented 3 years ago

New clean PR here : https://github.com/Terasology/ManualLabor/pull/59 , with the requested changes.

keturn commented 3 years ago

superseded by #59