I've got a question.. for the past few days I've been trying to select two different devicetypes (supp_bsgen and supp_res) with the selectdevices rules, so that they may be activated with the enbladevice command. (and no, enabling them with two separate SelectDevices commands doesn't count). Or, in other words, I need to put those devices into a variable useful for the EnableDevice command.
Somehow, writing
SelectDevices(1, m.*ship*, s.this:Devtype=#supp_BsGen & s.this:Devtype=#supp_res);
doesn't work, and writing a list and using the additem command doesn't work either... here's the rule I'm working with atm:
SelectDevices(1, m.ac, InSet(s.this,66));
Execlist(1,
debug(s.this);
dev:=s.this;
Debug(dev);
);
SelectDevices(2, m.ac, InSet(s.this,65));
Execlist(2,
debug(s.this);
addItem(dev, s.this);
Debug(dev);
);
Debug("----------------The devices are:", dev);
E.time:=250;
m.pgen:=1;
ChangeState(countdown, dev:=dev; E.time:=p.time);
In the countdown state all that is there is a "EnableDevice(dev, 1);"