Exemplo n.º 1
0
  public static ArrayList<File> getFiles() {
    ArrayList<File> files = new ArrayList<File>();
    String dir = "plugins/mcMMO/Resources/";
    int x = 0;

    // XP BAR
    while (x < 255) {
      if (x < 10) {
        files.add(new File(dir + "HUD/Standard/xpbar_inc00" + x + ".png"));
      } else if (x < 100) {
        files.add(new File(dir + "HUD/Standard/xpbar_inc0" + x + ".png"));
      } else {
        files.add(new File(dir + "HUD/Standard/xpbar_inc" + x + ".png"));
      }
      x++;
    }

    // Standard XP Icons
    for (SkillType y : SkillType.values()) {
      if (y == SkillType.ALL) continue;
      files.add(new File(dir + "HUD/Standard/" + m.getCapitalized(y.toString()) + ".png"));
      files.add(new File(dir + "HUD/Retro/" + m.getCapitalized(y.toString()) + "_r.png"));
    }

    // Blank icons
    files.add(new File(dir + "HUD/Standard/Icon.png"));
    files.add(new File(dir + "HUD/Retro/Icon_r.png"));
    // Repair SFX
    files.add(new File(dir + "Sound/repair.wav"));
    // Level SFX
    files.add(new File(dir + "Sound/level.wav"));

    return files;
  }
Exemplo n.º 2
0
  public static void extractFiles() {
    // Setup directories
    new File("plugins/mcMMO/Resources/").mkdir();
    new File("plugins/mcMMO/Resources/HUD/").mkdir();
    new File("plugins/mcMMO/Resources/HUD/Standard/").mkdir();
    new File("plugins/mcMMO/Resources/HUD/Retro/").mkdir();
    new File("plugins/mcMMO/Resources/Sound/").mkdir();

    // Xp Bar images
    for (int x = 0; x < 255; x++) {
      // String s = File.separator;
      String theFilePath = "HUD/Standard/";
      if (x < 10) {
        String theFileName = "xpbar_inc00" + x + ".png";
        writeFile(theFileName, theFilePath);
      } else if (x < 100) {
        String theFileName = "xpbar_inc0" + x + ".png";
        writeFile(theFileName, theFilePath);
      } else {
        String theFileName = "xpbar_inc" + x + ".png";
        writeFile(theFileName, theFilePath);
      }
    }

    // Standard XP Icons

    String theFilePathA = "HUD/Standard/";
    String theFilePathB = "HUD/Retro/";

    for (SkillType y : SkillType.values()) {
      if (y == SkillType.ALL) continue;

      String theFileNameA = m.getCapitalized(y.toString()) + ".png";
      String theFileNameB = m.getCapitalized(y.toString()) + "_r.png";

      writeFile(theFileNameA, theFilePathA);
      writeFile(theFileNameB, theFilePathB);
    }

    // Blank icons

    writeFile("Icon.png", theFilePathA);
    writeFile("Icon_r.png", theFilePathB);

    String theSoundFilePath = "Sound/";
    // Repair SFX
    writeFile("repair.wav", theSoundFilePath);
    writeFile("level.wav", theSoundFilePath);
  }
Exemplo n.º 3
0
 @Override
 public Choices generateChoices(Interaction interaction)
     throws AbortInteraction, ContextDataRequired, GeneralInteractionError, PageFailure {
   Choices choices = new Choices(this, interaction);
   GroupHelper helper = new GroupHelper(interaction);
   VariablePrefixer variable = new VariablePrefixer(this, interaction);
   // list all the skills for which this group doesn't have an existing bonus
   Set<SkillType> existingBonuses = helper.record.getSkillBonuses();
   for (SkillType skill : SkillType.values()) {
     if (skill == SkillType.ALL) continue;
     if (existingBonuses.contains(skill)) continue;
     choices.addInternalChoice(WordUtils.capitalizeFully(skill.toString()), skill.toString());
   }
   // add a 'cancel' choice as well
   choices.addCancel(variable.define("cancel"));
   return choices;
 }