()
| 430 | } |
| 431 | |
| 432 | private static void writeCustomBioSet() |
| 433 | { |
| 434 | try (BufferedWriter bw = getWriter(customBioSetFilePath(true))) |
| 435 | { |
| 436 | |
| 437 | if (bw == null) |
| 438 | { |
| 439 | return; |
| 440 | } |
| 441 | |
| 442 | bw.write("#"); |
| 443 | bw.newLine(); |
| 444 | bw.write(AUTO_GEN_WARN_LINE_1); |
| 445 | bw.newLine(); |
| 446 | bw.write(AUTO_GEN_WARN_LINE_2); |
| 447 | bw.newLine(); |
| 448 | bw.write("#"); |
| 449 | bw.newLine(); |
| 450 | |
| 451 | for (final Race race : Globals.getContext().getReferenceContext().getConstructedCDOMObjects(Race.class)) |
| 452 | { |
| 453 | if (race.isType(Constants.TYPE_CUSTOM)) |
| 454 | { |
| 455 | final String key = race.getKeyName(); |
| 456 | bw.write(SettingsHandler.getGameAsProperty().get().getBioSet().getBaseRegionPCCText(key)); |
| 457 | bw.newLine(); |
| 458 | } |
| 459 | } |
| 460 | |
| 461 | // We are grouping the custom bio sets under the region of custom, |
| 462 | // rather than types which are used elsewhere. |
| 463 | // This done as type is not supported for bio sets. |
| 464 | //bw.write(BioSet.getRegionPCCText("Custom")); |
| 465 | bw.newLine(); |
| 466 | } catch (IOException e) |
| 467 | { |
| 468 | Logging.errorPrint("Error in writeCustomBioSet", e); |
| 469 | } |
| 470 | } |
| 471 | |
| 472 | private static void writeCustomClasses() |
| 473 | { |
no test coverage detected