You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug State[{"location":(1,1)}] or its more readable equivalent State.get_with_property({"location":(1,1)}, combined=True) fails to return the correct objects (in this example all objects at location 1,1).
To Reproduce
objects_at_loc=State[{"location":(1,1)}]
Expected behavior
To only return the objects actually at that location, not a list of objects that have seemingly nothing in common.
Screenshots
N/A
Stacktrace
N/A
Additional context
Came across this bug when we tested #202
The text was updated successfully, but these errors were encountered:
This behaviour is caused by how State functions when queried like this:
objs=State[{"foo": ["bar1", "bar2"] }]
In this case the State will look for all objects that have the property "foo" with as value "bar1"or"bar2". In the case of the location it will thus search for all objects that have 1 or 1 as its value. Returning all objects that have 1 as either their x- or y-coordinate.
A straightforward fix is to tackle the location property as an outlier and treat its value (in the example (1,1)) as is, instead of as a list of potential values allowed.
Describe the bug
State[{"location":(1,1)}]
or its more readable equivalentState.get_with_property({"location":(1,1)}, combined=True)
fails to return the correct objects (in this example all objects at location 1,1).To Reproduce
Expected behavior
To only return the objects actually at that location, not a list of objects that have seemingly nothing in common.
Screenshots
N/A
Stacktrace
N/A
Additional context
Came across this bug when we tested #202
The text was updated successfully, but these errors were encountered: