Skip to content

Commit 4085bd0

Browse files
authored
fix spelling (#73)
1 parent e6b436b commit 4085bd0

9 files changed

Lines changed: 54 additions & 54 deletions

File tree

app/src/main/java/de/twonirwana/infinity/HtmlPrinter.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ public void printCardForArmyCode(List<UnitOption> unitOptions,
111111
String fileName,
112112
String armyCode,
113113
boolean useInch,
114-
boolean showSavingRollInstantOfAmmo,
114+
boolean showSavingRollInsteadOfAmmo,
115115
Set<Weapon.Type> showWeaponOfType,
116116
boolean showImage,
117117
boolean showHackingPrograms,
@@ -129,7 +129,7 @@ public void printCardForArmyCode(List<UnitOption> unitOptions,
129129
UNIT_LOGOS_FOLDER,
130130
CARD_FOLDER,
131131
useInch,
132-
showSavingRollInstantOfAmmo,
132+
showSavingRollInsteadOfAmmo,
133133
showWeaponOfType,
134134
showImage,
135135
showHackingPrograms,
@@ -223,7 +223,7 @@ public void writeToFile(UnitOption unitOption,
223223
String logoImagePath,
224224
String outputFolder,
225225
boolean useInch,
226-
boolean showSavingRollInstantOfAmmo,
226+
boolean showSavingRollInsteadOfAmmo,
227227
Template template) {
228228
String fileName = "%s_%s".formatted(unitOption.getCombinedId(), unitOption.getSlug());
229229
writeCards(List.of(unitOption),
@@ -239,7 +239,7 @@ public void writeToFile(UnitOption unitOption,
239239
logoImagePath,
240240
outputFolder,
241241
useInch,
242-
showSavingRollInstantOfAmmo,
242+
showSavingRollInsteadOfAmmo,
243243
Set.of(Weapon.Type.WEAPON, Weapon.Type.EQUIPMENT, Weapon.Type.SKILL),
244244
true,
245245
false,
@@ -259,7 +259,7 @@ public void writeCards(List<UnitOption> unitOptions,
259259
String logoImagePath,
260260
String outputFolder,
261261
boolean useInch,
262-
boolean showSavingRollInstantOfAmmo,
262+
boolean showSavingRollInsteadOfAmmo,
263263
Set<Weapon.Type> showWeaponOfType,
264264
boolean showImage,
265265
boolean showHackingPrograms,
@@ -319,7 +319,7 @@ public void writeCards(List<UnitOption> unitOptions,
319319
context.setVariable("primaryColor", primaryColor);
320320
context.setVariable("secondaryColor", secondaryColor);
321321
context.setVariable("headerColor", headerColor);
322-
context.setVariable("showSavingRollInstantOfAmmo", showSavingRollInstantOfAmmo);
322+
context.setVariable("showSavingRollInsteadOfAmmo", showSavingRollInsteadOfAmmo);
323323
context.setVariable("printUtils", new PrintUtils());
324324
context.setVariable("programs", programsCard1);
325325
context.setVariable("programs2", programsCard2);

app/src/main/java/de/twonirwana/infinity/PrintUtils.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ public static String getSavingRoll(Weapon weapon, String ps, TrooperProfile troo
222222
String extraString = extraList.isEmpty() ? "" : " " + Joiner.on(" ").join(extraList);
223223

224224
final String savingNumber;
225-
if(weapon.getProperties().contains(VIRAL_TRAIT)){
225+
if (weapon.getProperties().contains(VIRAL_TRAIT)) {
226226
savingNumber = "2";
227227
} else {
228228
savingNumber = weapon.getSavingNum();
@@ -237,12 +237,12 @@ public static String getRangeModifier(Weapon.RangeModifier rangeModifier, boolea
237237
rangeModifier.modifier());
238238
}
239239

240-
public static String getWeaponPropertiesString(Weapon weapon, boolean showSavingRollInstantOfAmmo) {
240+
public static String getWeaponPropertiesString(Weapon weapon, boolean showSavingRollInsteadOfAmmo) {
241241
return weapon.getProperties().stream()
242242
.map(PrintUtils::stripTeardropSuffix)
243243
.filter(s -> !REMOVE_WEAPON_TRAITS.contains(s))
244244
.filter(s -> !CC_PROPERTY.equals(s)) //shown in range
245-
.filter(s -> !VIRAL_TRAIT.equals(s) || !showSavingRollInstantOfAmmo)
245+
.filter(s -> !VIRAL_TRAIT.equals(s) || !showSavingRollInsteadOfAmmo)
246246
.collect(Collectors.joining(", "));
247247
}
248248

app/src/main/java/de/twonirwana/infinity/util/ExportMissingImageOverview.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ private static String imageData(UnitOption u, Trooper t, TrooperProfile p, Atomi
8787
p.getWeapons().stream()
8888
.filter(w -> w.getSkill() == Weapon.Skill.BS)
8989
.filter(w -> Set.of(Weapon.Type.WEAPON, Weapon.Type.TURRET).contains(w.getType()))
90+
.filter(w -> !w.getName().equals("Suppressive Fire Mode Weapon"))
9091
.collect(Collectors.groupingBy(Weapon::getId)).values().stream()
9192
.map(List::getFirst)
9293
.map(Weapon::getName).collect(Collectors.joining(", ")),

app/src/main/resources/templates/ColorAndOptionalImageCard.html

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -248,10 +248,10 @@ <h2 class="unit-header-title">
248248
<th th:text="${printUtils.get100cmRangeName(unitPrintCard.isUseInch())}">100</th>
249249
<th th:text="${printUtils.get120cmRangeName(unitPrintCard.isUseInch())}">120</th>
250250
<th th:text="${printUtils.get240cmRangeName(unitPrintCard.isUseInch())}">240cm</th>
251-
<th th:if="${!showSavingRollInstantOfAmmo}">PS</th>
251+
<th th:if="${!showSavingRollInsteadOfAmmo}">PS</th>
252252
<th class="weaponPadding">B</th>
253-
<th class="weaponPadding" th:if="${showSavingRollInstantOfAmmo}">Saving Roll</th>
254-
<th th:if="${!showSavingRollInstantOfAmmo}">Ammo</th>
253+
<th class="weaponPadding" th:if="${showSavingRollInsteadOfAmmo}">Saving Roll</th>
254+
<th th:if="${!showSavingRollInsteadOfAmmo}">Ammo</th>
255255
<th>Traits</th>
256256
</tr>
257257
</thead>
@@ -284,18 +284,18 @@ <h2 class="unit-header-title">
284284
th:class="${printUtils.getRangeClassWithOptionalXVisor(unitPrintCard.getProfile(), weapon.getUpTo240cmRangeModi(), rangeModifierClassMap)}"></td>
285285
</th:block>
286286

287-
<td th:if="${!showSavingRollInstantOfAmmo}"
287+
<td th:if="${!showSavingRollInsteadOfAmmo}"
288288
th:text="${printUtils.getWeaponPsWithExtra(unitPrintCard.getProfile(), weapon)}"></td>
289289

290290
<td class="weaponPadding"
291291
th:text="${printUtils.getWeaponBurstWithExtra(unitPrintCard, weapon)}"></td>
292-
<td class="weaponPadding" th:if="${showSavingRollInstantOfAmmo}"
292+
<td class="weaponPadding" th:if="${showSavingRollInsteadOfAmmo}"
293293
th:text="${printUtils.getWeaponSavingRollWithExtra(unitPrintCard.getProfile(), weapon)}"></td>
294294

295-
<td th:if="${!showSavingRollInstantOfAmmo}"
295+
<td th:if="${!showSavingRollInsteadOfAmmo}"
296296
th:text="${weapon.ammunition != null ? weapon.ammunition.name : ''}"></td>
297297

298-
<td th:text="${printUtils.getWeaponPropertiesString(weapon,showSavingRollInstantOfAmmo)}"
298+
<td th:text="${printUtils.getWeaponPropertiesString(weapon, showSavingRollInsteadOfAmmo)}"
299299
style="white-space: normal; font-size: 12pt"></td>
300300
</tr>
301301
</tbody>
@@ -441,10 +441,10 @@ <h2>Booty Weapons</h2>
441441
<th th:text="${printUtils.get100cmRangeName(useInch)}">100</th>
442442
<th th:text="${printUtils.get120cmRangeName(useInch)}">120</th>
443443
<th th:text="${printUtils.get240cmRangeName(useInch)}">240cm</th>
444-
<th th:if="${!showSavingRollInstantOfAmmo}">PS</th>
444+
<th th:if="${!showSavingRollInsteadOfAmmo}">PS</th>
445445
<th class="weaponPadding">B</th>
446-
<th class="weaponPadding" th:if="${showSavingRollInstantOfAmmo}">Saving Roll</th>
447-
<th th:if="${!showSavingRollInstantOfAmmo}">Ammo</th>
446+
<th class="weaponPadding" th:if="${showSavingRollInsteadOfAmmo}">Saving Roll</th>
447+
<th th:if="${!showSavingRollInsteadOfAmmo}">Ammo</th>
448448
<th>Traits</th>
449449
</tr>
450450
</thead>
@@ -477,18 +477,18 @@ <h2>Booty Weapons</h2>
477477
th:class="${printUtils.getRangeClass( weapon.getUpTo240cmRangeModi(), rangeModifierClassMap)}"></td>
478478
</th:block>
479479

480-
<td th:if="${!showSavingRollInstantOfAmmo}"
480+
<td th:if="${!showSavingRollInsteadOfAmmo}"
481481
th:text="${weapon.getProbabilityOfSurvival()}"></td>
482482

483483
<td class="weaponPadding"
484484
th:text="${weapon.getBurst()}"></td>
485-
<td class="weaponPadding" th:if="${showSavingRollInstantOfAmmo}"
485+
<td class="weaponPadding" th:if="${showSavingRollInsteadOfAmmo}"
486486
th:text="${printUtils.getSavingRoll(weapon, weapon.getProbabilityOfSurvival(), null)}"></td>
487487

488-
<td th:if="${!showSavingRollInstantOfAmmo}"
488+
<td th:if="${!showSavingRollInsteadOfAmmo}"
489489
th:text="${weapon.ammunition != null ? weapon.ammunition.name : ''}"></td>
490490

491-
<td th:text="${printUtils.getWeaponPropertiesString(weapon, showSavingRollInstantOfAmmo)}"
491+
<td th:text="${printUtils.getWeaponPropertiesString(weapon, showSavingRollInsteadOfAmmo)}"
492492
style="white-space: normal; font-size: 12pt"></td>
493493
</tr>
494494
</tbody>

app/src/main/resources/templates/ColorAndOptionalImageCardSmall.html

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -248,10 +248,10 @@ <h2 class="unit-header-title">
248248
<th th:text="${printUtils.get100cmRangeName(unitPrintCard.isUseInch())}">100</th>
249249
<th th:text="${printUtils.get120cmRangeName(unitPrintCard.isUseInch())}">120</th>
250250
<th th:text="${printUtils.get240cmRangeName(unitPrintCard.isUseInch())}">240cm</th>
251-
<th th:if="${!showSavingRollInstantOfAmmo}">PS</th>
251+
<th th:if="${!showSavingRollInsteadOfAmmo}">PS</th>
252252
<th class="weaponPadding">B</th>
253-
<th class="weaponPadding" th:if="${showSavingRollInstantOfAmmo}">Saving Roll</th>
254-
<th th:if="${!showSavingRollInstantOfAmmo}">Ammo</th>
253+
<th class="weaponPadding" th:if="${showSavingRollInsteadOfAmmo}">Saving Roll</th>
254+
<th th:if="${!showSavingRollInsteadOfAmmo}">Ammo</th>
255255
<th>Traits</th>
256256
</tr>
257257
</thead>
@@ -284,18 +284,18 @@ <h2 class="unit-header-title">
284284
th:class="${printUtils.getRangeClassWithOptionalXVisor(unitPrintCard.getProfile(), weapon.getUpTo240cmRangeModi(), rangeModifierClassMap)}"></td>
285285
</th:block>
286286

287-
<td th:if="${!showSavingRollInstantOfAmmo}"
287+
<td th:if="${!showSavingRollInsteadOfAmmo}"
288288
th:text="${printUtils.getWeaponPsWithExtra(unitPrintCard.getProfile(), weapon)}"></td>
289289

290290
<td class="weaponPadding"
291291
th:text="${printUtils.getWeaponBurstWithExtra(unitPrintCard, weapon)}"></td>
292-
<td class="weaponPadding" th:if="${showSavingRollInstantOfAmmo}"
292+
<td class="weaponPadding" th:if="${showSavingRollInsteadOfAmmo}"
293293
th:text="${printUtils.getWeaponSavingRollWithExtra(unitPrintCard.getProfile(), weapon)}"></td>
294294

295-
<td th:if="${!showSavingRollInstantOfAmmo}"
295+
<td th:if="${!showSavingRollInsteadOfAmmo}"
296296
th:text="${weapon.ammunition != null ? weapon.ammunition.name : ''}"></td>
297297

298-
<td th:text="${printUtils.getWeaponPropertiesString(weapon, showSavingRollInstantOfAmmo)}"
298+
<td th:text="${printUtils.getWeaponPropertiesString(weapon, showSavingRollInsteadOfAmmo)}"
299299
style="white-space: normal; font-size: 4pt"></td>
300300
</tr>
301301
</tbody>
@@ -441,10 +441,10 @@ <h2>Booty Weapons</h2>
441441
<th th:text="${printUtils.get100cmRangeName(useInch)}">100</th>
442442
<th th:text="${printUtils.get120cmRangeName(useInch)}">120</th>
443443
<th th:text="${printUtils.get240cmRangeName(useInch)}">240cm</th>
444-
<th th:if="${!showSavingRollInstantOfAmmo}">PS</th>
444+
<th th:if="${!showSavingRollInsteadOfAmmo}">PS</th>
445445
<th class="weaponPadding">B</th>
446-
<th class="weaponPadding" th:if="${showSavingRollInstantOfAmmo}">Saving Roll</th>
447-
<th th:if="${!showSavingRollInstantOfAmmo}">Ammo</th>
446+
<th class="weaponPadding" th:if="${showSavingRollInsteadOfAmmo}">Saving Roll</th>
447+
<th th:if="${!showSavingRollInsteadOfAmmo}">Ammo</th>
448448
<th>Traits</th>
449449
</tr>
450450
</thead>
@@ -477,18 +477,18 @@ <h2>Booty Weapons</h2>
477477
th:class="${printUtils.getRangeClass( weapon.getUpTo240cmRangeModi(), rangeModifierClassMap)}"></td>
478478
</th:block>
479479

480-
<td th:if="${!showSavingRollInstantOfAmmo}"
480+
<td th:if="${!showSavingRollInsteadOfAmmo}"
481481
th:text="${weapon.getProbabilityOfSurvival()}"></td>
482482

483483
<td class="weaponPadding"
484484
th:text="${weapon.getBurst()}"></td>
485-
<td class="weaponPadding" th:if="${showSavingRollInstantOfAmmo}"
485+
<td class="weaponPadding" th:if="${showSavingRollInsteadOfAmmo}"
486486
th:text="${printUtils.getSavingRoll(weapon, weapon.getProbabilityOfSurvival(), null)}"></td>
487487

488-
<td th:if="${!showSavingRollInstantOfAmmo}"
488+
<td th:if="${!showSavingRollInsteadOfAmmo}"
489489
th:text="${weapon.ammunition != null ? weapon.ammunition.name : ''}"></td>
490490

491-
<td th:text="${printUtils.getWeaponPropertiesString(weapon, showSavingRollInstantOfAmmo)}"
491+
<td th:text="${printUtils.getWeaponPropertiesString(weapon, showSavingRollInsteadOfAmmo)}"
492492
style="white-space: normal; font-size: 4pt"></td>
493493
</tr>
494494
</tbody>

app/src/test/java/de/twonirwana/infinity/HtmlPrinterTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@ public class HtmlPrinterTest {
3131
private static Stream<Arguments> generateTestData() {
3232
List<Arguments> testData = new ArrayList<>();
3333
for (boolean useInch : new boolean[]{true, false}) {
34-
for (boolean showSavingRollInstantOfAmmo : new boolean[]{true, false}) {
34+
for (boolean showSavingRollInsteadOfAmmo : new boolean[]{true, false}) {
3535
for (Set<Weapon.Type> weaponOption : WEAPON_TYPE_OPTIONS) {
3636
for (boolean showImage : new boolean[]{true, false}) {
3737
for (boolean showHackingProgram : new boolean[]{true, false}) {
3838
for (HtmlPrinter.Template template : HtmlPrinter.Template.values()) {
39-
testData.add(Arguments.of(useInch, weaponOption, showImage, showHackingProgram, showSavingRollInstantOfAmmo, template));
39+
testData.add(Arguments.of(useInch, weaponOption, showImage, showHackingProgram, showSavingRollInsteadOfAmmo, template));
4040
}
4141
}
4242
}
@@ -134,9 +134,9 @@ void setup() {
134134

135135
@ParameterizedTest
136136
@MethodSource("generateTestData")
137-
void testHtml(boolean useInch, Set<Weapon.Type> weaponOption, boolean showImage, boolean showHackingProgram, boolean showSavingRollInstantOfAmmo, HtmlPrinter.Template template) {
137+
void testHtml(boolean useInch, Set<Weapon.Type> weaponOption, boolean showImage, boolean showHackingProgram, boolean showSavingRollInsteadOfAmmo, HtmlPrinter.Template template) {
138138
fileName = "testFile_" + System.currentTimeMillis();
139-
underTest.writeCards(List.of(unitOption), List.of(hackingProgram), martialArtLevels, bootyRolls, metaChemistryRolls, fileName, "", sectorial, "", "", "", "", useInch, showSavingRollInstantOfAmmo, weaponOption, showImage, showHackingProgram, template);
139+
underTest.writeCards(List.of(unitOption), List.of(hackingProgram), martialArtLevels, bootyRolls, metaChemistryRolls, fileName, "", sectorial, "", "", "", "", useInch, showSavingRollInsteadOfAmmo, weaponOption, showImage, showHackingProgram, template);
140140

141141
assertThat(new File("out/html/" + fileName + ".html")).exists();
142142
}

app/src/test/java/de/twonirwana/infinity/ManualHtmlPrinterTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,14 +85,14 @@ private static Stream<Arguments> generateTestData() {
8585
}
8686
List<Arguments> testData = new ArrayList<>();
8787
for (boolean useInch : new boolean[]{true, false}) {
88-
for (boolean showSavingRollInstantOfAmmo : new boolean[]{true, false}) {
88+
for (boolean showSavingRollInsteadOfAmmo : new boolean[]{true, false}) {
8989
for (Set<Weapon.Type> weaponOption : WEAPON_TYPE_OPTIONS) {
9090
for (boolean showImage : new boolean[]{true, false}) {
9191
for (boolean showHackingPrograms : new boolean[]{true, false}) {
9292
for (HtmlPrinter.Template template : HtmlPrinter.Template.values()) {
9393
testData.addAll(
9494
armyCodeAndUnits.stream()
95-
.map(a -> Arguments.of(a.get(0), a.get(1), useInch, showSavingRollInstantOfAmmo, weaponOption, showImage, showHackingPrograms, template))
95+
.map(a -> Arguments.of(a.get(0), a.get(1), useInch, showSavingRollInsteadOfAmmo, weaponOption, showImage, showHackingPrograms, template))
9696
.toList()
9797
);
9898
}
@@ -106,7 +106,7 @@ private static Stream<Arguments> generateTestData() {
106106

107107
@ParameterizedTest
108108
@MethodSource("generateTestData")
109-
void testHtml(String armyCode, String expectedUnitIds, boolean useInch, boolean showSavingRollInstantOfAmmo, Set<Weapon.Type> weaponOption, boolean showImage, boolean showHackingPrograms, HtmlPrinter.Template template) throws IOException {
109+
void testHtml(String armyCode, String expectedUnitIds, boolean useInch, boolean showSavingRollInsteadOfAmmo, Set<Weapon.Type> weaponOption, boolean showImage, boolean showHackingPrograms, HtmlPrinter.Template template) throws IOException {
110110
fileName = HashUtil.hash128Bit(armyCode);
111111

112112
assertThat(db.validateArmyCodeUnits(armyCode)).isEmpty();
@@ -128,7 +128,7 @@ void testHtml(String armyCode, String expectedUnitIds, boolean useInch, boolean
128128
.flatMap(k -> al.getCombatGroups().get(k).stream())
129129
.toList();
130130

131-
underTest.printCardForArmyCode(armyListOptions, db.getAllHackingPrograms(), db.getAllMartialArtLevels(), db.getAllBootyRolls(), db.getAllMetaChemistryRolls(), al.getSectorial(), fileName, armyCode, useInch, showSavingRollInstantOfAmmo, weaponOption, showImage, showHackingPrograms, template);
131+
underTest.printCardForArmyCode(armyListOptions, db.getAllHackingPrograms(), db.getAllMartialArtLevels(), db.getAllBootyRolls(), db.getAllMetaChemistryRolls(), al.getSectorial(), fileName, armyCode, useInch, showSavingRollInsteadOfAmmo, weaponOption, showImage, showHackingPrograms, template);
132132

133133
Path result = Paths.get("out/html/card/" + fileName + ".html");
134134
assertThat(result).exists();

0 commit comments

Comments
 (0)