Esempio n. 1
0
 public void save() {
   File partyFile = fileRef.getReference();
   List<File> characterFiles = new ArrayList<File>();
   for (CharacterFacade character : this) {
     characterFiles.add(character.getFileRef().getReference());
   }
   (new PCGIOHandler()).write(partyFile, characterFiles);
 }
Esempio n. 2
0
 private boolean isCompanionOpen(CompanionFacade companion) {
   File compFile = companion.getFileRef().getReference();
   if (compFile == null) {
     return true;
   }
   for (CharacterFacade character : CharacterManager.getCharacters()) {
     File charFile = character.getFileRef().getReference();
     if (compFile.equals(charFile)) {
       return true;
     }
   }
   return false;
 }