-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Semigroup EntityMap instance to update Capabilities map properly …
…when there are overridden devices (#2242) Fixes #2240. Fixes the `Semigroup EntityMap` instance so that devices which are overridden are removed from the lists of devices providing certain capabilities. - Also adds a test scenario which generated an incorrect error message before this fix. - Also adds the test scenario from #2241 to the test suite which was missed previously.
- Loading branch information
Showing
4 changed files
with
72 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
data/scenarios/Testing/2240-overridden-entity-capabilities.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
version: 1 | ||
name: Overridden entity capabilities | ||
description: | | ||
Overridden standard entity should not still be suggested for its | ||
capabilities. The error message should suggest "- tank treads", not | ||
"- treads or tank treads". | ||
creative: false | ||
objectives: | ||
- goal: | ||
- Place a rock | ||
condition: | | ||
as base { | ||
isHere "rock" | ||
}; | ||
entities: | ||
- name: treads | ||
display: | ||
char: '#' | ||
attr: red | ||
description: | ||
- Broken treads | ||
properties: [known, pickable] | ||
robots: | ||
- name: base | ||
dir: east | ||
devices: | ||
- logger | ||
- clock | ||
- grabber | ||
inventory: | ||
- [1, rock] | ||
- name: crasher | ||
dir: east | ||
devices: | ||
- logger | ||
- treads | ||
program: | | ||
move | ||
solution: | | ||
wait 5; place "rock" | ||
world: | ||
dsl: | | ||
{grass} | ||
palette: | ||
'C': [grass, null, crasher] | ||
'B': [grass, null, base] | ||
upperleft: [0, 0] | ||
map: | | ||
BC |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters