fix: take child result into account in ConditionAction::modify#5042
fix: take child result into account in ConditionAction::modify#5042jdrueckert wants to merge 2 commits intodevelopfrom
Conversation
|
The "assess whether original logic was intentional" is the kind of thing that makes me look for a unit test. I see that this change to the code didn't change the result of any the existing I'm also not sure how to interpret How does that mean |
No idea either... I would hope that @casals can shed some light here.
The fact that none of the existing tests fails with this change tells me that if the original logic was intentional, we don't seem to have the associated assumptions covered in any of these tests. Would be interesting to understand what the existing tests are supposed to cover. |
|
This test checks if the returned states are as expected, according to a predefined enum: https://github.com/MovingBlocks/Terasology/blob/be0f9ded060c09c4aa29cec8bc811ded35dc14c1/engine/src/main/java/org/terasology/engine/logic/behavior/core/BehaviorState.java |
The
modifymethod checks the condition, but doesn't make use of the input parameterBehaviorState resultwhich it gets passed to fromDecoratorNodebased on previous execution of the node's child.I believe that this is one of the issues leading to Terasology/WildAnimals#98.
TODO:
modifyinGuardActionas well (or instead?)