Exemplo n.º 1
0
 @Override
 public Manufacturer getFinalManufacturer() {
   if (cachedManufact == null) {
     cachedManufact = CMLib.tech().getManufacturerOf(this, manufacturer.toUpperCase().trim());
     if (cachedManufact == null) cachedManufact = CMLib.tech().getDefaultManufacturer();
   }
   return cachedManufact;
 }
 @Override
 public void setOwner(ItemPossessor newOwner) {
   final ItemPossessor prevOwner = super.owner;
   super.setOwner(newOwner);
   if (prevOwner != newOwner) {
     if (newOwner instanceof Room) circuitKey = CMLib.tech().registerElectrics(this, circuitKey);
     else {
       CMLib.tech().unregisterElectronics(this, circuitKey);
       circuitKey = null;
     }
   }
 }
 @Override
 public void destroy() {
   if ((!destroyed) && (circuitKey != null)) {
     CMLib.tech().unregisterElectronics(this, circuitKey);
     circuitKey = null;
   }
   super.destroy();
 }