protected static boolean reportError(
     final Electronics me,
     final Software controlI,
     final MOB mob,
     final String literalMessage,
     final String controlMessage) {
   if ((mob != null)
       && (mob.location() == CMLib.map().roomLocation(me))
       && (literalMessage != null)) mob.tell(literalMessage);
   if (controlMessage != null) {
     if (controlI != null) controlI.addScreenMessage(controlMessage);
     else if ((mob != null) && (me != null))
       mob.tell(CMLib.lang().L("A panel on @x1 reports '@x2'.", me.name(mob), controlMessage));
   }
   return false;
 }
Beispiel #2
0
 public static final boolean isAllWiringConnected(Electronics E) {
   if (E instanceof Electronics.ElecPanel) return isThisPanelActivated((Electronics.ElecPanel) E);
   if (E.container() instanceof Electronics.ElecPanel)
     return isThisPanelActivated((Electronics.ElecPanel) E.container());
   return true;
 }