(LoadContext context, Ability a)
| 58 | } |
| 59 | |
| 60 | @Override |
| 61 | public boolean process(LoadContext context, Ability a) |
| 62 | { |
| 63 | if (a.getSafe(ObjectKey.MULTIPLE_ALLOWED)) |
| 64 | { |
| 65 | if (a.get(ObjectKey.CHOOSE_INFO) == null) |
| 66 | { |
| 67 | Logging.errorPrint( |
| 68 | "Ability (" + a.getCategory() + ") " + a.getKeyName() + " had MULT:YES but no CHOOSE", context); |
| 69 | return false; |
| 70 | } |
| 71 | if (a.getKeyName().contains("(")) |
| 72 | { |
| 73 | String base = AbilityUtilities.removeChoicesFromName(a.getKeyName()); |
| 74 | Ability conflict = |
| 75 | context.getReferenceContext().getManufacturerId(a.getCDOMCategory()).getActiveObject(base); |
| 76 | if ((conflict != null) && conflict.getSafe(ObjectKey.MULTIPLE_ALLOWED)) |
| 77 | { |
| 78 | Logging.errorPrint("Ability (" + a.getCategory() + ") " + conflict.getKeyName() |
| 79 | + " had MULT:YES which " + "prohibits Ability Key with same base " |
| 80 | + "and parenthesis, but data included: " + a.getKeyName(), context); |
| 81 | return false; |
| 82 | } |
| 83 | } |
| 84 | } |
| 85 | else |
| 86 | { |
| 87 | if (a.get(ObjectKey.CHOOSE_INFO) != null) |
| 88 | { |
| 89 | Logging.errorPrint( |
| 90 | "Ability (" + a.getCategory() + ") " + a.getKeyName() + " had MULT:NO but did have CHOOSE", |
| 91 | context); |
| 92 | return false; |
| 93 | } |
| 94 | } |
| 95 | return false; |
| 96 | } |
| 97 | |
| 98 | @Override |
| 99 | public int getPriority() |
nothing calls this directly
no test coverage detected