swarm-0.6.0.0: data/scenarios/Testing/201-require/1664-require-system-robot-children.yaml
version: 1
name: Requirements of system-robot children
description: |
Normally, system robots are not required to possess devices in order to use any particular command.
However, a robot built by a system robot becomes subject to the requirement.
This is a bug.
In this scenario, the child robot cannot be built because the
parent robot ("queenbee") does not possess a "beaglepuss" in its inventory.
objectives:
- condition: |
try {
robotnamed "childbot";
return true;
} {
return false;
}
solution: |
noop;
robots:
- name: base
dir: east
- name: queenbee
dir: east
system: true
display:
invisible: false
char: 'Q'
inventory:
- [1, solar panel]
- [0, beaglepuss]
program: |
def createWorker =
build {
setname "childbot";
appear "B" (inl ());
};
end;
createWorker;
known: [water]
world:
palette:
'.': [grass]
'B': [grass, null, base]
'Q': [grass, null, queenbee]
upperleft: [-1, 1]
map: |
B..Q
....
....