From 7927e2bfe7d520c5fc7be25c49f3dfc7c739ef8f Mon Sep 17 00:00:00 2001 From: Olivier Gagnon Date: Tue, 26 Jun 2018 16:10:04 -0400 Subject: [PATCH] little more ts --- src/{FactionInfo.js => FactionInfo.ts} | 31 +++++++++++++++++--------- 1 file changed, 21 insertions(+), 10 deletions(-) rename src/{FactionInfo.js => FactionInfo.ts} (92%) diff --git a/src/FactionInfo.js b/src/FactionInfo.ts similarity index 92% rename from src/FactionInfo.js rename to src/FactionInfo.ts index 4426cd607..38840b2e9 100644 --- a/src/FactionInfo.js +++ b/src/FactionInfo.ts @@ -1,16 +1,27 @@ //Contains the "information" property for all the Factions, which is just a description //of each faction -function FactionInfo(infoText, enemies, offerHackingMission, offerHackingWork, offerFieldWork, offerSecurityWork) { - this.infoText = infoText; - this.enemies = enemies; - this.offerHackingMission = offerHackingMission; - this.offerHackingWork = offerHackingWork; - this.offerFieldWork = offerFieldWork; - this.offerSecurityWork = offerSecurityWork; +class FactionInfo { + infoText: string; + enemies: string[]; + offerHackingMission: boolean; + offerHackingWork: boolean; + offerFieldWork: boolean; + offerSecurityWork: boolean; + augmentationPriceMult: number; + augmentationRepRequirementMult: number; - // these are always all 1 for now. - this.augmentationPriceMult = 1; - this.augmentationRepRequirementMult = 1; + constructor(infoText: string, enemies: string[], offerHackingMission: boolean, offerHackingWork: boolean, offerFieldWork: boolean, offerSecurityWork: boolean) { + this.infoText = infoText; + this.enemies = enemies; + this.offerHackingMission = offerHackingMission; + this.offerHackingWork = offerHackingWork; + this.offerFieldWork = offerFieldWork; + this.offerSecurityWork = offerSecurityWork; + + // these are always all 1 for now. + this.augmentationPriceMult = 1; + this.augmentationRepRequirementMult = 1; + } } const FactionInfos = {