All these on/off- checks, can't they be written like this instead to minimize repetitive text?
```"The 'AI control allowed' light is " + ((A.aiControlDisabled==0 && !A.emagged) ? "on." : "off."),```