コード例 #1
0
 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;
 }
コード例 #2
0
 public static final boolean isAllWiringHot(Electronics E) {
   if (E instanceof ElecPanel) return isThisPanelActivated((ElecPanel) E);
   if (E.container() instanceof ElecPanel) return isThisPanelActivated((ElecPanel) E.container());
   return false;
 }