Package eu.ha3.matmos.engine.debug

Examples of eu.ha3.matmos.engine.debug.DumpData


 
  private void scrub(Distances subject, int x, int y)
  {
    for (String name : subject.keySet())
    {
      Visualized vis = subject.visualize(name);
     
      paint(x, y + subject.get(name) * this.GAP, vis);
    }
  }
View Full Code Here


      return this.provider.get(name);
    }
   
    public Dependable dependable(String name)
    {
      Visualized vis = this.provider.get(name);
      if (vis instanceof Dependable)
        return (Dependable) vis;
     
      return new DependableNullObject();
    }
View Full Code Here

    for (int expansionIndex = this.pageFromZero * this.IDS_PER_PAGE; expansionIndex < this.pageFromZero
      * this.IDS_PER_PAGE + this.IDS_PER_PAGE
      && expansionIndex < sortedNames.size(); expansionIndex++)
    {
      final String uniqueIdentifier = sortedNames.get(expansionIndex);
      final Expansion expansion = expansions.get(uniqueIdentifier);
      this.expansionList.add(expansion);
     
      HGuiSliderControl sliderControl =
        new HGuiSliderControl(
          id, _LEFT + _MIX, _MIX * (id + 1), _ELEMENT_WIDTH - _MIX * 2, _UNIT, "",
          expansion.getVolume() * 0.5f);
      sliderControl.setListener(new HSliderListener() {
        @Override
        public void sliderValueChanged(HGuiSliderControl slider, float value)
        {
          expansion.setVolumeAndUpdate(value * 2);
          if (value > 0f && !expansion.isActivated())
          {
            expansion.activate();
          }
          slider.updateDisplayString();
        }
       
        @Override
        public void sliderPressed(HGuiSliderControl hGuiSliderControl)
        {
        }
       
        @Override
        public void sliderReleased(HGuiSliderControl hGuiSliderControl)
        {
          if (MAtGuiMenu.this.isAutopreviewEnabled())
          {
            expansion.playSample();
          }
        }
      });
     
      sliderControl.setDisplayStringProvider(new HDisplayStringProvider() {
        @Override
        public String provideDisplayString()
        {
          String display = expansion.getFriendlyName() + ": ";
          if (expansion.getVolume() == 0f)
          {
            if (expansion.isActivated())
            {
              display = display + "Will be disabled";
            }
            else
            {
              display = display + "Disabled";
            }
          }
          else
          {
            display = display + (int) Math.floor(expansion.getVolume() * 100) + "%";
          }
         
          return ChatColorsSimple.THEN_ITALIC + display;
        }
      });
      sliderControl.updateDisplayString();
     
      this.buttonList.add(sliderControl);
     
      if (!this.mod.isDebugMode())
      {
        this.buttonList.add(new GuiButton(Make.make(new ActionPerformed() {
          @Override
          public void actionPerformed()
          {
            if (expansion.isActivated())
            {
              expansion.playSample();
            }
          }
        }), _RIGHT - _UNIT, _MIX * (id + 1), _UNIT, _UNIT, "?"));
       
        if (expansion.hasMoreInfo())
        {
          this.buttonList.add(new GuiButton(Make.make(new ActionPerformed() {
            @Override
            public void actionPerformed()
            {
View Full Code Here

    ((OperatorCaster) op()).setTickEnabled(true);
   
    TimeStatistic timeMeasure = new TimeStatistic(Locale.ENGLISH);
    this.userControl = new UserControl(this);
    this.expansionManager =
      new ExpansionManager(new File(util().getModsFolder(), "matmos/expansions_r27_userconfig/"), this);
   
    // Create default configuration
    this.updateNotifier.fillDefaults(this.config);
    this.config.setProperty("world.height", 256);
    this.config.setProperty("dump.sheets.enabled", false);
View Full Code Here

      }
      expansion.setLoadingAgent(new LegacyXMLLoadingAgent(new File(folder, filename)));
    }
    else
    {
      expansion.setLoadingAgent(new JasonLoadingAgent());
    }
   
    expansion.updateVolume();
  }
View Full Code Here

      String filename = identity.getUniqueName() + ".json";
      if (filename.startsWith("legacy__"))
      {
        filename = filename.substring("legacy__".length());
      }
      expansion.setLoadingAgent(new LegacyXMLLoadingAgent(new File(folder, filename)));
    }
    else
    {
      expansion.setLoadingAgent(new JasonLoadingAgent());
    }
View Full Code Here

    {
      this.expansion.refreshKnowledge();
    }
    else if (par1GuiButton.id == 203 && this.mod.isEditorAvailable())
    {
      final ExpansionDebugUnit debugUnit = this.expansion.obtainDebugUnit();
      if (debugUnit != null)
      {
        PluggableIntoMAtmos plug = new PluggableIntoMAtmos(this.mod, this.expansion);
        this.expansion.addPluggable(plug);
       
        Runnable editor = this.mod.instantiateRunnableEditor(plug);
        if (editor != null)
        {
          new Thread(editor, "EditorWindow_for_" + this.expansion.getName()).start();
         
          if (debugUnit instanceof ReadOnlyJasonStringEDU)
          {
            // XXX Read only mode
            this.mod.getChatter().printChat(
              ChatColorsSimple.COLOR_RED
                + "Expansions inside ZIP files are not supported in this version.");
            this.mod.getChatter().printChatShort(
              ChatColorsSimple.COLOR_RED + "Please unzip the resource packs to be able to view them.");
          }
        }
        else
        {
          this.mod.getChatter().printChat(
            ChatColorsSimple.COLOR_RED + "Could not start editor for an unknown reason.");
        }
      }
    }
    else if (par1GuiButton.id == 204)
    {
      final ExpansionDebugUnit debugUnit = this.expansion.obtainDebugUnit();
      if (debugUnit instanceof FolderResourcePackEditableEDU)
      {
        File expFolder = ((FolderResourcePackEditableEDU) debugUnit).obtainExpansionFolder();
        File minecraftFolder = new File(expFolder, "assets/minecraft/");
        if (minecraftFolder.exists())
View Full Code Here

   
    Map<String, Expansion> expansions = this.mod.getExpansionList();
    int id = 0;
   
    {
      final VolumeUpdatable globalVolumeControl = this.mod.getGlobalVolumeControl();
     
      HGuiSliderControl sliderControl =
        new HGuiSliderControl(
          id, _LEFT, _MIX, _ELEMENT_WIDTH, _UNIT, "", globalVolumeControl.getVolume() * 0.5f);
      sliderControl.setListener(new HSliderListener() {
        @Override
        public void sliderValueChanged(HGuiSliderControl slider, float value)
        {
          globalVolumeControl.setVolumeAndUpdate(value * 2);
          slider.updateDisplayString();
          MAtGuiMenu.this.mod.getConfig().setProperty("globalvolume.scale", globalVolumeControl.getVolume());
        }
       
        @Override
        public void sliderPressed(HGuiSliderControl hGuiSliderControl)
        {
        }
       
        @Override
        public void sliderReleased(HGuiSliderControl hGuiSliderControl)
        {
        }
      });
      sliderControl.setDisplayStringProvider(new HDisplayStringProvider() {
        @Override
        public String provideDisplayString()
        {
          return "Global Volume Control: " + (int) Math.floor(globalVolumeControl.getVolume() * 100) + "%";
        }
      });
      sliderControl.updateDisplayString();
     
      this.buttonList.add(sliderControl);
View Full Code Here

    this.expansionManager.deactivate();
    this.expansionManager.dispose();
   
    TimeStatistic stat = new TimeStatistic(Locale.ENGLISH);
   
    this.dataGatherer = new ModularDataGatherer(this);
    this.dataGatherer.load();
    this.visualDebugger = new VisualDebugger(this, this.dataGatherer);
    this.expansionManager.setData(this.dataGatherer.getData());
    this.expansionManager.setCollector(this.dataGatherer);
    this.expansionManager.loadExpansions();
View Full Code Here

    this.zS = zS;
    this.blocksPerCall = blocksPerCall;
   
    //
   
    this.base = new ExternalStringCountModule(data, baseName, true);
    this.subModules.add(baseName);
    data.getSheet(baseName).setDefaultValue("0");
    if (requireThousand)
    {
      String thousandName = baseName + THOUSAND_SUFFIX;
View Full Code Here

TOP

Related Classes of eu.ha3.matmos.engine.debug.DumpData

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.