release/v1.9.6
HardiReady 2019-10-11 16:27:41 +02:00
parent 55c59612a6
commit 4cfa642228
3 changed files with 18 additions and 18 deletions

View File

@ -60,8 +60,8 @@ export interface War {
endDate?: string; endDate?: string;
ptBlufor?: number; ptBlufor?: number;
ptOpfor?: number; ptOpfor?: number;
fractionMappingBlufor?: Fraction.SWORD | Fraction.ARF | "BLUFOR" | "OPFOR"; fractionMappingBlufor?: Fraction.SWORD | Fraction.ARF | 'BLUFOR' | 'OPFOR';
fractionMappingOpfor?: Fraction.SWORD | Fraction.ARF | "BLUFOR" | "OPFOR"; fractionMappingOpfor?: Fraction.SWORD | Fraction.ARF | 'BLUFOR' | 'OPFOR';
playersBlufor?: number; playersBlufor?: number;
playersOpfor?: number; playersOpfor?: number;
budgetBlufor?: number; budgetBlufor?: number;

View File

@ -75,18 +75,18 @@ export class FractionStatsComponent implements OnInit, OnChanges {
ngOnChanges(changes: SimpleChanges) { ngOnChanges(changes: SimpleChanges) {
if (changes.war || changes.logData) { if (changes.war || changes.logData) {
this.fractionNameBlufor = FractionHelpers.getFractionName(this.war, "BLUFOR"); this.fractionNameBlufor = FractionHelpers.getFractionName(this.war, 'BLUFOR');
this.fractionNameOpfor = FractionHelpers.getFractionName(this.war, "OPFOR"); this.fractionNameOpfor = FractionHelpers.getFractionName(this.war, 'OPFOR');
this.colorScheme = { this.colorScheme = {
domain: [ domain: [
FractionHelpers.getFractionColor(this.war, "BLUFOR"), FractionHelpers.getFractionColor(this.war, 'BLUFOR'),
FractionHelpers.getFractionColor(this.war, "OPFOR"), FractionHelpers.getFractionColor(this.war, 'OPFOR'),
FractionHelpers.getFractionColor(this.war, "BLUFOR", 'LIGHT'), FractionHelpers.getFractionColor(this.war, 'BLUFOR', 'LIGHT'),
FractionHelpers.getFractionColor(this.war, "OPFOR", 'LIGHT'), FractionHelpers.getFractionColor(this.war, 'OPFOR', 'LIGHT'),
FractionHelpers.getFractionColor(this.war, "BLUFOR", 'DARK'), FractionHelpers.getFractionColor(this.war, 'BLUFOR', 'DARK'),
FractionHelpers.getFractionColor(this.war, "OPFOR", 'DARK'), FractionHelpers.getFractionColor(this.war, 'OPFOR', 'DARK'),
FractionHelpers.getFractionColor(this.war, "BLUFOR", 'GREY'), FractionHelpers.getFractionColor(this.war, 'BLUFOR', 'GREY'),
FractionHelpers.getFractionColor(this.war, "OPFOR", 'GREY'), FractionHelpers.getFractionColor(this.war, 'OPFOR', 'GREY'),
] ]
}; };

View File

@ -26,7 +26,7 @@ export const FractionHelpers = {
default: default:
return Fraction.COLOR_ARF; return Fraction.COLOR_ARF;
} }
case "BLUFOR": case 'BLUFOR':
switch (style) { switch (style) {
case 'LIGHT': case 'LIGHT':
return Fraction.COLOR_BLUFOR_LIGHT; return Fraction.COLOR_BLUFOR_LIGHT;
@ -37,7 +37,7 @@ export const FractionHelpers = {
default: default:
return Fraction.COLOR_BLUFOR; return Fraction.COLOR_BLUFOR;
} }
case "OPFOR": case 'OPFOR':
switch (style) { switch (style) {
case 'LIGHT': case 'LIGHT':
return Fraction.COLOR_OPFOR_LIGHT; return Fraction.COLOR_OPFOR_LIGHT;
@ -66,9 +66,9 @@ export const FractionHelpers = {
switch (fraction === 'BLUFOR' ? war.fractionMappingBlufor : war.fractionMappingOpfor) { switch (fraction === 'BLUFOR' ? war.fractionMappingBlufor : war.fractionMappingOpfor) {
case Fraction.ARF: case Fraction.ARF:
return Fraction.COLOR_ARF; return Fraction.COLOR_ARF;
case "BLUFOR": case 'BLUFOR':
return Fraction.COLOR_BLUFOR; return Fraction.COLOR_BLUFOR;
case "OPFOR": case 'OPFOR':
return Fraction.COLOR_OPFOR; return Fraction.COLOR_OPFOR;
case Fraction.SWORD: case Fraction.SWORD:
return Fraction.COLOR_SWORD; return Fraction.COLOR_SWORD;
@ -79,9 +79,9 @@ export const FractionHelpers = {
switch (fraction === 'BLUFOR' ? war.fractionMappingBlufor : war.fractionMappingOpfor) { switch (fraction === 'BLUFOR' ? war.fractionMappingBlufor : war.fractionMappingOpfor) {
case Fraction.ARF: case Fraction.ARF:
return Fraction.ARF; return Fraction.ARF;
case "BLUFOR": case 'BLUFOR':
return Fraction.BLUFOR; return Fraction.BLUFOR;
case "OPFOR": case 'OPFOR':
return Fraction.OPFOR; return Fraction.OPFOR;
case Fraction.SWORD: case Fraction.SWORD:
return Fraction.SWORD; return Fraction.SWORD;