Skip to content

Commit

Permalink
added data from Cradle of Humanity
Browse files Browse the repository at this point in the history
  • Loading branch information
crissian committed Mar 16, 2021
1 parent 570f317 commit 6a1a3ad
Show file tree
Hide file tree
Showing 22 changed files with 5,163 additions and 563 deletions.
5 changes: 3 additions & 2 deletions src/app/equipment/components/equipment-detail.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { ActivatedRoute } from '@angular/router';
import { EquipmentService } from '../../shared/services/equipment.service';
import { Title } from '@angular/platform-browser';
import { WareService } from '../../shared/services/ware.service';
import {BASE_TITLE} from '../../shared/services/constants';

interface ProductionWareData {
ware: Ware;
Expand Down Expand Up @@ -32,12 +33,12 @@ export class EquipmentDetailComponent extends EntityDetailsComponent<Equipment>
}

ngOnInit(): void {
this.titleService.setTitle('X4: Foundations / Split Vendetta - Equipment');
this.titleService.setTitle(`${BASE_TITLE} - Equipment`);
super.ngOnInit();
}

onEntityLoaded(entity: Equipment) {
this.titleService.setTitle(`X4: Foundations / Split Vendetta - ${entity.name}`);
this.titleService.setTitle(`${BASE_TITLE} - ${entity.name}`);
this.entityProduction = entity.production
.map<ProductionData>(x => {
return {
Expand Down
3 changes: 2 additions & 1 deletion src/app/equipment/components/equipments.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { RaceService } from '../../shared/services/race.service';
import { EquipmentType } from '../../shared/services/data/equipment-type-data';
import { EquipmentClass } from '../../shared/services/data/equipment-class-data';
import { EnumFn } from '../../core/services/enum-fn';
import {BASE_TITLE} from '../../shared/services/constants';

@Component({
templateUrl: './equipments.component.html'
Expand All @@ -28,7 +29,7 @@ export class EquipmentsComponent extends EntityListComponent<Equipment> implemen
}

ngOnInit(): void {
this.titleService.setTitle('X4: Foundations / Split Vendetta - Equipment');
this.titleService.setTitle(`${BASE_TITLE} - Equipment`);

this.sizes = EnumFn.values(Size);
this.equipmentTypes = EnumFn.values(EquipmentType);
Expand Down
39 changes: 20 additions & 19 deletions src/app/faction/components/faction-detail.component.ts
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
import { Component, OnInit } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { Title } from '@angular/platform-browser';
import { Faction } from '../../shared/services/model/model';
import { ModuleService } from '../../shared/services/module.service';
import { EntityDetailsComponent } from '../../shared/components/entity-details.component';
import { FactionService } from '../../shared/services/faction.service';
import {Component, OnInit} from '@angular/core';
import {ActivatedRoute} from '@angular/router';
import {Title} from '@angular/platform-browser';
import {Faction} from '../../shared/services/model/model';
import {ModuleService} from '../../shared/services/module.service';
import {EntityDetailsComponent} from '../../shared/components/entity-details.component';
import {FactionService} from '../../shared/services/faction.service';
import {BASE_TITLE} from '../../shared/services/constants';

@Component({
templateUrl: './faction-detail.component.html'
templateUrl: './faction-detail.component.html'
})
export class FactionDetailComponent extends EntityDetailsComponent<Faction> implements OnInit {
constructor(service: FactionService, private moduleService: ModuleService,
route: ActivatedRoute, private titleService: Title) {
super(service, route);
}
constructor(service: FactionService, private moduleService: ModuleService,
route: ActivatedRoute, private titleService: Title) {
super(service, route);
}

ngOnInit(): void {
this.titleService.setTitle('X4: Foundations / Split Vendetta - Factions');
super.ngOnInit();
}
ngOnInit(): void {
this.titleService.setTitle(`${BASE_TITLE} - Factions`);
super.ngOnInit();
}

onEntityLoaded(entity: Faction) {
this.titleService.setTitle(`X4: Foundations / Split Vendetta - ${this.entity.name}`);
}
onEntityLoaded(entity: Faction) {
this.titleService.setTitle(`${BASE_TITLE} - ${this.entity.name}`);
}
}
15 changes: 8 additions & 7 deletions src/app/faction/components/factions.component.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { Component, OnInit } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { Title } from '@angular/platform-browser';
import { Faction } from '../../shared/services/model/model';
import { EntityListComponent } from '../../shared/components/entity-list.component';
import { FactionService } from '../../shared/services/faction.service';
import {Component, OnInit} from '@angular/core';
import {ActivatedRoute, Router} from '@angular/router';
import {Title} from '@angular/platform-browser';
import {Faction} from '../../shared/services/model/model';
import {EntityListComponent} from '../../shared/components/entity-list.component';
import {FactionService} from '../../shared/services/faction.service';
import {BASE_TITLE} from '../../shared/services/constants';

@Component({
templateUrl: './factions.component.html'
Expand All @@ -17,7 +18,7 @@ export class FactionsComponent extends EntityListComponent<Faction> implements O
}

ngOnInit(): void {
this.titleService.setTitle('X4: Foundations / Split Vendetta - Factions');
this.titleService.setTitle(`${BASE_TITLE} - Factions`);
super.ngOnInit();
}
}
5 changes: 3 additions & 2 deletions src/app/module/components/module-detail.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { ModuleService } from '../../shared/services/module.service';
import { ActivatedRoute } from '@angular/router';
import { Title } from '@angular/platform-browser';
import { EntityDetailsComponent } from '../../shared/components/entity-details.component';
import {BASE_TITLE} from '../../shared/services/constants';

interface ProductionWareData {
ware: Ware;
Expand All @@ -31,12 +32,12 @@ export class ModuleDetailComponent extends EntityDetailsComponent<StationModule>
}

ngOnInit(): void {
this.titleService.setTitle('X4: Foundations / Split Vendetta - Modules');
this.titleService.setTitle(`${BASE_TITLE} - Modules`);
super.ngOnInit();
}

onEntityLoaded(entity: StationModule) {
this.titleService.setTitle(`X4: Foundations / Split Vendetta - Modules - ${this.entity.name}`);
this.titleService.setTitle(`${BASE_TITLE} - Modules - ${this.entity.name}`);

this.entityProduction = this.entity.production
.map<ProductionData>(x => {
Expand Down
3 changes: 2 additions & 1 deletion src/app/module/components/modules.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { ModuleTypes } from '../../shared/services/data/module-types-data';
import { RaceService } from '../../shared/services/race.service';
import { EnumFn } from '../../core/services/enum-fn';
import { Effects } from '../../shared/services/data/effects-data';
import {BASE_TITLE} from '../../shared/services/constants';

@Component({
templateUrl: './modules.component.html'
Expand All @@ -25,7 +26,7 @@ export class ModulesComponent extends EntityListComponent<StationModule> impleme
}

ngOnInit(): void {
this.titleService.setTitle('X4: Foundations / Split Vendetta - Modules');
this.titleService.setTitle(`${BASE_TITLE} - Modules`);

this.races = this.raceService.getEntities();
this.moduleTypes = EnumFn.values(ModuleTypes);
Expand Down
6 changes: 4 additions & 2 deletions src/app/races/components/race-detail.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import { Race } from '../../shared/services/model/model';
import { RaceService } from '../../shared/services/race.service';
import { ActivatedRoute } from '@angular/router';
import { Title } from '@angular/platform-browser';
import {environment} from '../../../environments/environment';
import {BASE_TITLE} from '../../shared/services/constants';

@Component({
templateUrl: 'race-detail.component.html'
Expand All @@ -14,11 +16,11 @@ export class RaceDetailComponent extends EntityDetailsComponent<Race> implements
}

ngOnInit(): void {
this.titleService.setTitle('X4: Foundations / Split Vendetta - Races');
this.titleService.setTitle(`${BASE_TITLE} - Races`);
super.ngOnInit();
}

onEntityLoaded(entity: Race) {
this.titleService.setTitle(`X4: Foundations / Split Vendetta - Races - ${entity.name}`);
this.titleService.setTitle(`${BASE_TITLE} - Races - ${entity.name}`);
}
}
3 changes: 2 additions & 1 deletion src/app/races/components/races.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Title } from '@angular/platform-browser';
import { Component, OnInit } from '@angular/core';
import { RaceService } from '../../shared/services/race.service';
import { EntityListComponent } from '../../shared/components/entity-list.component';
import {BASE_TITLE} from '../../shared/services/constants';

@Component({
templateUrl: './races.component.html'
Expand All @@ -17,7 +18,7 @@ export class RacesComponent extends EntityListComponent<Race> implements OnInit
}

ngOnInit(): void {
this.titleService.setTitle('X4: Foundations / Split Vendetta - Races');
this.titleService.setTitle(`${BASE_TITLE} - Races`);
super.ngOnInit();
}
}
1 change: 1 addition & 0 deletions src/app/shared/services/constants.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const BASE_TITLE = 'X4: Foundations / Split Vendetta / Cradle of Humanity';
Loading

0 comments on commit 6a1a3ad

Please sign in to comment.