Skip to content

Commit

Permalink
remove shared api proxy, we're using swagger proxies now
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Rosack authored and mrosack committed Nov 19, 2017
1 parent a45d711 commit b981b69
Show file tree
Hide file tree
Showing 10 changed files with 189 additions and 351 deletions.
2 changes: 0 additions & 2 deletions index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
export * from './src/api.service';
export * from './src/civdefs.service';
export * from './src/entity';
export * from './src/profileCache.service';
export * from './src/busy/busy.component';
export * from './src/busy/busy.service';
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"main": "index.ts",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"prepublish": "tsc",
"lint": "tslint --type-check --project tsconfig.json ./src/**/*.ts",
"prepublish": "npm run clean && npm run lint && tsc",
"clean": "rm -rf dist"
},
"author": "",
Expand Down
194 changes: 0 additions & 194 deletions src/api.service.ts

This file was deleted.

19 changes: 9 additions & 10 deletions src/busy/busy.component.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
import { ChangeDetectorRef, Component, trigger, state, style, transition, animate } from "@angular/core";
import { Observable } from "rxjs/Observable";
import { BusyService } from "./busy.service";
import { ChangeDetectorRef, Component, trigger, state, style, transition, animate } from '@angular/core';
import { BusyService } from './busy.service';

@Component({
selector: "pydt-busy",
selector: 'pydt-busy',
animations: [
trigger("visibilityChanged", [
state("shown", style({ opacity: 1 })),
state("hidden", style({ opacity: 0 })),
transition("* => *", animate(".2s"))
trigger('visibilityChanged', [
state('shown', style({ opacity: 1 })),
state('hidden', style({ opacity: 0 })),
transition('* => *', animate('.2s'))
])
],
template: `
Expand All @@ -34,15 +33,15 @@ export class BusyComponent {
}

public animationStarted(event: any) {
if (event.toState === "shown") {
if (event.toState === 'shown') {
this.busyHidden = false;
}

this.cdRef.detectChanges();
}

public animationDone(event: any) {
if (event.toState === "hidden") {
if (event.toState === 'hidden') {
this.busyHidden = true;
}

Expand Down
8 changes: 4 additions & 4 deletions src/busy/busy.service.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Injectable } from "@angular/core";
import { Subject } from "rxjs/Subject";
import { Subscription } from "rxjs/Subscription";
import { Injectable } from '@angular/core';
import { Subject } from 'rxjs/Subject';
import { Subscription } from 'rxjs/Subscription';

@Injectable()
export class BusyService {
Expand All @@ -15,4 +15,4 @@ export class BusyService {
public subscribeBusy(callback: (value: boolean) => void) {
return this.busyStream.subscribe(callback);
}
}
}
24 changes: 12 additions & 12 deletions src/civdefs.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export class DLC {
}
}

export const Civ6DLCs: DLC[] = [
export const CIV6_DLCS: DLC[] = [
new DLC('02A8BDDE-67EA-4D38-9540-26E685E3156E', 'Aztec Civilization Pack'),
new DLC('3809975F-263F-40A2-A747-8BFB171D821A', 'Poland Civilization & Scenario Pack'),
new DLC('2F6E858A-28EF-46B3-BEAC-B985E52E9BC1', 'Vikings Scenario Pack'),
Expand All @@ -52,10 +52,10 @@ export function filterCivsByDlc(leaders: CivDef[], dlcIds: string[]) {
return result;
}

export const RandomCiv = new CivDef('CIVILIZATION_RANDOM', 'LEADER_RANDOM', 'Random Leader');
export const RANDOM_CIV = new CivDef('CIVILIZATION_RANDOM', 'LEADER_RANDOM', 'Random Leader');

export const Civ6Leaders = [
RandomCiv,
export const CIV6_LEADERS = [
RANDOM_CIV,
new CivDef('CIVILIZATION_MACEDON', 'LEADER_ALEXANDER', null, 'E2749E9A-8056-45CD-901B-C368C8E83DEB'),
new CivDef('CIVILIZATION_NUBIA', 'LEADER_AMANITORE', null, '643EA320-8E1A-4CF1-A01C-00D88DDD131A'),
new CivDef('CIVILIZATION_FRANCE', 'LEADER_CATHERINE_DE_MEDICI'),
Expand Down Expand Up @@ -90,7 +90,7 @@ export class GameSpeed {
}
}

export const Civ6GameSpeeds = new Array<GameSpeed>(
export const CIV6_GAME_SPEEDS = new Array<GameSpeed>(
new GameSpeed('GAMESPEED_ONLINE', 'Online'),
new GameSpeed('GAMESPEED_QUICK', 'Quick'),
new GameSpeed('GAMESPEED_STANDARD', 'Standard'),
Expand All @@ -103,7 +103,7 @@ export class MapSize {
}
}

export const Civ6MapSizes = new Array<MapSize>(
export const CIV6_MAP_SIZES = new Array<MapSize>(
new MapSize('MAPSIZE_DUEL', 'Duel', 2),
new MapSize('MAPSIZE_TINY', 'Tiny', 4),
new MapSize('MAPSIZE_SMALL', 'Small', 6),
Expand All @@ -113,18 +113,18 @@ export const Civ6MapSizes = new Array<MapSize>(
);

export class Map {
constructor(public file:string, public displayName: string, public mapSize?: MapSize) {
constructor(public file: string, public displayName: string, public mapSize?: MapSize) {
}
}

export const Civ6Maps = new Array<Map>(
export const CIV6_MAPS = new Array<Map>(
new Map('Continents.lua', 'Continents'),
new Map('Fractal.lua', 'Fractal'),
new Map('InlandSea.lua', 'Inland Sea'),
new Map('Island_Plates.lua', 'Island Plates'),
new Map('Pangaea.lua', 'Pangaea'),
new Map('Shuffle.lua', 'Shuffle'),
new Map('Balanced4.Civ6Map', '4-Leaf Clover', Civ6MapSizes[1]),
new Map('Balanced6.Civ6Map', '6-Armed Snowflake', Civ6MapSizes[2]),
new Map('EarthStandard.Civ6Map', 'Earth Map', Civ6MapSizes[3])
);
new Map('Balanced4.Civ6Map', '4-Leaf Clover', CIV6_MAP_SIZES[1]),
new Map('Balanced6.Civ6Map', '6-Armed Snowflake', CIV6_MAP_SIZES[2]),
new Map('EarthStandard.Civ6Map', 'Earth Map', CIV6_MAP_SIZES[3])
);
Loading

0 comments on commit b981b69

Please sign in to comment.