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

Method parseCharacterTypeLine

code/src/java/pcgen/io/PCGVer2Parser.java:2286–2301  ·  view source on GitHub ↗
(final String line)

Source from the content-addressed store, hash-verified

2284 }
2285
2286 private void parseCharacterTypeLine(final String line)
2287 {
2288 final StringTokenizer stok = new StringTokenizer(line.substring(IOConstants.TAG_CHARACTERTYPE.length() + 1),
2289 IOConstants.TAG_END, false);
2290
2291 String characterType = stok.nextToken();
2292 if (!SettingsHandler.getGameAsProperty().get().getCharacterTypeList().contains(characterType))
2293 {
2294 String wantedType = characterType;
2295 characterType = SettingsHandler.getGameAsProperty().get().getDefaultCharacterType();
2296 final String message = "Character type " + wantedType + " not found. Using " + characterType; //$NON-NLS-1$
2297 warnings.add(message);
2298 }
2299 ChannelUtilities.setControlledChannel(thePC.getCharID(),
2300 CControl.CHARACTERTYPE, characterType);
2301 }
2302
2303 private void parsePreviewSheetLine(final String line)
2304 {

Callers 1

parseCachedLinesMethod · 0.95

Calls 9

getGameAsPropertyMethod · 0.95
setControlledChannelMethod · 0.95
nextTokenMethod · 0.80
getCharacterTypeListMethod · 0.80
containsMethod · 0.65
getMethod · 0.65
addMethod · 0.65
getCharIDMethod · 0.65

Tested by

no test coverage detected