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

Method writeCustomSpells

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

Source from the content-addressed store, hash-verified

575 }
576
577 private static void writeCustomSpells()
578 {
579
580 try (BufferedWriter bw = getWriter(customSpellFilePath(true)))
581 {
582
583 if (bw == null)
584 {
585 return;
586 }
587
588 writeCustomHeader(bw);
589
590 for (Spell spell : Globals.getContext().getReferenceContext().getConstructedCDOMObjects(Spell.class))
591 {
592 if (spell.isType(Constants.TYPE_CUSTOM))
593 {
594 bw.write(spell.getPCCText());
595 bw.newLine();
596 }
597 }
598 } catch (IOException e)
599 {
600 Logging.errorPrint("Error in writeCustomSpells", e);
601 }
602 }
603
604 private static void writeCustomTemplates()
605 {

Callers 1

writeCustomFilesMethod · 0.95

Calls 11

getWriterMethod · 0.95
customSpellFilePathMethod · 0.95
writeCustomHeaderMethod · 0.95
getContextMethod · 0.95
errorPrintMethod · 0.95
newLineMethod · 0.80
getReferenceContextMethod · 0.65
isTypeMethod · 0.65
writeMethod · 0.65
getPCCTextMethod · 0.45

Tested by

no test coverage detected