コード例 #1
0
ファイル: StdElecItem.java プロジェクト: JEBailey/CoffeeMud
 @Override
 public Manufacturer getFinalManufacturer() {
   if (cachedManufact == null) {
     cachedManufact = CMLib.tech().getManufacturerOf(this, manufacturer.toUpperCase().trim());
     if (cachedManufact == null) cachedManufact = CMLib.tech().getDefaultManufacturer();
   }
   return cachedManufact;
 }
コード例 #2
0
 @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;
     }
   }
 }
コード例 #3
0
 @Override
 public void destroy() {
   if ((!destroyed) && (circuitKey != null)) {
     CMLib.tech().unregisterElectronics(this, circuitKey);
     circuitKey = null;
   }
   super.destroy();
 }