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

Method parseCachedLines

code/src/java/pcgen/io/PCGVer2Parser.java:626–1370  ·  view source on GitHub ↗

Does the actual work: Retrieves cached lines and parses each line. Note: May have to change parse order! author: Thomas Behr 31-07-02 @throws PCGParseException

()

Source from the content-addressed store, hash-verified

624 * @throws PCGParseException
625 */
626 private void parseCachedLines() throws PCGParseException
627 {
628 /*
629 * VERSION:x.x.x
630 */
631 if (cache.containsKey(IOConstants.TAG_VERSION))
632 {
633 parseVersionLine(cache.get(IOConstants.TAG_VERSION).get(0));
634 }
635
636 if (cache.containsKey(IOConstants.TAG_GAMEMODE))
637 {
638 parseGameMode(cache.get(IOConstants.TAG_GAMEMODE).get(0));
639 }
640
641 /*
642 * #System Information
643 * CAMPAIGN:CMP - Monkey Book I - Book For Monkeys
644 * CAMPAIGN:CMP - Monkey Book II - Book By Monkeys
645 * ...
646 *
647 * first thing to do is checking campaigns - no matter what!
648 */
649 if (cache.containsKey(IOConstants.TAG_CAMPAIGN))
650 {
651 checkDisplayListsHappy();
652 }
653
654 /*
655 * #Character Attributes
656 * STAT:STR=18
657 * STAT:DEX=18
658 * STAT:CON=18
659 * STAT:INT=18
660 * STAT:WIS=18
661 * STAT:CHA=18
662 * ALIGN:LG
663 * RACE:Human
664 */
665 if (cache.containsKey(IOConstants.TAG_STAT))
666 {
667 for (final String stat : cache.get(IOConstants.TAG_STAT))
668 {
669 parseStatLine(stat);
670 }
671
672 checkStats();
673 }
674
675 if (cache.containsKey(IOConstants.TAG_ALIGNMENT))
676 {
677 parseAlignmentLine(cache.get(IOConstants.TAG_ALIGNMENT).get(0));
678 }
679
680 /*
681 * # Kits - Just adds a reference to the character that the template
682 * was picked.
683 */

Callers 1

parsePCGMethod · 0.95

Calls 15

parseVersionLineMethod · 0.95
parseGameModeMethod · 0.95
parseStatLineMethod · 0.95
checkStatsMethod · 0.95
parseAlignmentLineMethod · 0.95
parseKitLineMethod · 0.95
parseRaceLineMethod · 0.95
parseFavoredClassLineMethod · 0.95
parsePoolPointsLineMethod · 0.95
parsePoolPointsLine2Method · 0.95

Tested by

no test coverage detected