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

Method applyKit

code/src/java/pcgen/core/Kit.java:375–402  ·  view source on GitHub ↗
(final Kit aKit, final PlayerCharacter aPC)

Source from the content-addressed store, hash-verified

373 }
374
375 public static void applyKit(final Kit aKit, final PlayerCharacter aPC)
376 {
377 if (aKit == null)
378 {
379 return;
380 }
381 if (aKit.getSafe(ObjectKey.APPLY_MODE) == KitApply.PERMANENT && aPC.containsKit(aKit))
382 {
383 return;
384 }
385
386 final List<BaseKit> thingsToAdd = new ArrayList<>();
387 final List<String> warnings = new ArrayList<>();
388 aKit.testApplyKit(aPC, thingsToAdd, warnings);
389 if (Logging.isLoggable(Logging.WARNING))
390 {
391 if (!warnings.isEmpty())
392 {
393 Logging.log(Logging.WARNING,
394 "The following warnings were encountered when applying the kit " + aKit.getKeyName());
395 for (String string : warnings)
396 {
397 Logging.log(Logging.WARNING, " " + string);
398 }
399 }
400 }
401 aKit.processKit(aPC, thingsToAdd);
402 }
403
404 public KitTable getTable(String name)
405 {

Callers 2

applyChoiceMethod · 0.95
applyChoiceMethod · 0.95

Calls 8

isLoggableMethod · 0.95
logMethod · 0.95
getSafeMethod · 0.80
containsKitMethod · 0.80
testApplyKitMethod · 0.80
processKitMethod · 0.80
isEmptyMethod · 0.65
getKeyNameMethod · 0.65

Tested by

no test coverage detected