getInternalName() public method

public getInternalName ( ) : string
return string
Ejemplo n.º 1
0
  private void addToReactionEngine(Device device) {
    Logger.Log("Equipment::addToReactionEngine reactions from device "+device.getInternalName()+" ("+device.ToString ()+")", Logger.Level.TRACE);

    LinkedList<IReaction> reactions = device.getReactions();
    Logger.Log("Equipment::addToReactionEngine reactions="+Logger.ToString<IReaction>(reactions)+" from "+device, Logger.Level.INFO);

    foreach (IReaction reaction in reactions) {
      Logger.Log("Equipment::addToReactionEngine adding reaction="+reaction, Logger.Level.TRACE);
      _reactionEngine.addReactionToMedium(_celliaMediumID, reaction);
    }
  }
Ejemplo n.º 2
0
    public override AddingResult askAddDevice(Device device, bool reportToRedMetrics = false)
    {
        Logger.Log("Inventory::askAddDevice", Logger.Level.TRACE);
        AddingResult addingResult = canAddDevice(device);
        if (addingResult == AddingResult.SUCCESS)
        {
            Logger.Log("Inventory::askAddDevice: AddingResult.SUCCESS, will add device=" + device, Logger.Level.INFO);
            addDevice(device);

            if (reportToRedMetrics)
            {
                RedMetricsManager.get().sendEvent(TrackingEvent.CRAFT, new CustomData(CustomDataTag.DEVICE, device.getInternalName()));
            }

            //uncomment to save user-created devices
            //TODO FIXME uncommenting this entails bugs on loading devices from _saveFilePath
            //DeviceSaver dSaver = new DeviceSaver();
            //dSaver.saveDevicesToFile(_devices, _saveFilePathWrite);
        }
        else
        {
            Logger.Log("Inventory::askAddDevice: " + addingResult + ", didn't add device=" + device, Logger.Level.INFO);
        }
        return addingResult;
    }
Ejemplo n.º 3
0
   //copy factory
 public static Device buildDevice(Device device)
 {
   if (device == null)
   {
     Logger.Log("Device::buildDevice device == null", Logger.Level.WARN);
     return null;
   }
   return buildDevice(device.getInternalName(), device._modules);
 }
Ejemplo n.º 4
0
 public static bool displayTooltip(bool isOver, Device device, Vector3 pos)
 {
   string code = (null == device)?null:_devicePrefix+device.getInternalName();
   return displayTooltip(isOver, code, pos);
 }