MCPcopy Create free account
hub / github.com/PCGen/pcgen / writeCustomBioSet

Method writeCustomBioSet

code/src/java/pcgen/core/CustomData.java:432–470  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

430 }
431
432 private static void writeCustomBioSet()
433 {
434 try (BufferedWriter bw = getWriter(customBioSetFilePath(true)))
435 {
436
437 if (bw == null)
438 {
439 return;
440 }
441
442 bw.write("#");
443 bw.newLine();
444 bw.write(AUTO_GEN_WARN_LINE_1);
445 bw.newLine();
446 bw.write(AUTO_GEN_WARN_LINE_2);
447 bw.newLine();
448 bw.write("#");
449 bw.newLine();
450
451 for (final Race race : Globals.getContext().getReferenceContext().getConstructedCDOMObjects(Race.class))
452 {
453 if (race.isType(Constants.TYPE_CUSTOM))
454 {
455 final String key = race.getKeyName();
456 bw.write(SettingsHandler.getGameAsProperty().get().getBioSet().getBaseRegionPCCText(key));
457 bw.newLine();
458 }
459 }
460
461 // We are grouping the custom bio sets under the region of custom,
462 // rather than types which are used elsewhere.
463 // This done as type is not supported for bio sets.
464 //bw.write(BioSet.getRegionPCCText("Custom"));
465 bw.newLine();
466 } catch (IOException e)
467 {
468 Logging.errorPrint("Error in writeCustomBioSet", e);
469 }
470 }
471
472 private static void writeCustomClasses()
473 {

Callers 1

writeCustomFilesMethod · 0.95

Calls 14

getWriterMethod · 0.95
customBioSetFilePathMethod · 0.95
getContextMethod · 0.95
getGameAsPropertyMethod · 0.95
errorPrintMethod · 0.95
newLineMethod · 0.80
getBaseRegionPCCTextMethod · 0.80
writeMethod · 0.65
getReferenceContextMethod · 0.65
isTypeMethod · 0.65
getKeyNameMethod · 0.65

Tested by

no test coverage detected