Exemplo 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);
 }
Exemplo 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;
 }