Refactored Factions class so that it works with saving/loading. Defined initFactions() function for currently brainstormed factions

This commit is contained in:
Daniel Xie 2016-12-20 14:31:41 -06:00
parent f1ec376f33
commit fc3d52b832

@ -19,37 +19,64 @@ Faction.prototype.setAugmentations = function(augs) {
} }
} }
//Map of factions indexed by faction name
Factions = {} Factions = {}
Factions = {
//TODO Saving this for later, IShima is a kinda cool name maybe use it for something AddToFactions = function(faction) {
var name = faction.name;
Factions[name] = faction;
}
initFactions = function() {
//Endgame //Endgame
Illuminati: new Faction("Illuminati"), var Illuminati = new Faction("Illuminati");
Daedalus: new Faction("Daedalus"), AddToFactions(Illuminati);
Covenant: new Faction("The Covenant"), var Daedalus = new Faction("Daedalus");
AddToFactions(Daedalus);
var Covenant = new Faction("The Covenant");
AddToFactions(Covenant);
//Megacorporations, each forms its own faction //Megacorporations, each forms its own faction
ECorp: new Faction("ECorp"), var ECorp = new Faction("ECorp");
MegaCorp: new Faction("MegaCorp"), AddToFactions(ECorp);
BachmanAndAssociates: new Faction("Bachman & Associates"), var MegaCorp = new Faction("MegaCorp");
BladeIndustries: new Faction("Blade Industries"), AddToFactions(MegaCorp);
NWO: new Faction("NWO"), var BachmanAndAssociates = new Faction("Bachman & Associates");
ClarkeIncorporated: new Faction("Clarke Incorporated"), AddToFactions(BachmanAndAssociates);
OmniTekIncorporated: new Faction("OmniTek Incorporated"), var BladeIndustries = new Faction("Blade Industries");
FourSigma: new Faction("Four Sigma"), AddToFactions(BladeIndustries);
KuaiGongInternational: new Faction("KuaiGong International"), var NWO = new Faction("NWO");
AddToFactions(NWO);
var ClarkeIncorporated = new Faction("Clarke Incorporated");
AddToFactions(ClarkeIncorporated);
var OmniTekIncorporated = new Faction("OmniTek Incorporated");
AddToFactions(OmniTekIncorporated);
var FourSigma = new Faction("Four Sigma");
AddToFactions(FourSigma);
var KuaiGongInternational = new Faction("KuaiGong International");
AddToFactions(KuaiGongInternational);
//Hacker groups //Hacker groups
BitRunners: new Faction("BitRunners"), var BitRunners = new Faction("BitRunners");
BlackHand: new Faction("The Black Hand"), AddToFactions(BitRunners);
NiteSec: new Faction("NiteSec"), var BlackHand = new Faction("The Black Hand");
AddToFactions(BlackHand);
var NiteSec = new Faction("NiteSec");
AddToFactions(NiteSec);
//City factions, essentially governments //City factions, essentially governments
Chongqing: new Faction("Chongqing"), var Chongqing = new Faction("Chongqing");
Sector12: new Faction("Sector-12"), AddToFactions(Chongqing);
HongKong: new Faction("New Tokyo"), var Sector12 = new Faction("Sector-12");
Aevum: new Faction("Aevum"), AddToFactions(Sector12);
Ishima: new Faction("Ishima"), var HongKong = new Faction("New Tokyo");
Volhaven: new Faction("Volhaven"), AddToFactions(HongKong);
var Aevum = new Faction("Aevum");
AddToFactions(Aevum);
var Ishima = new Faction("Ishima");
AddToFactions(Ishima);
var Volhaven = new Faction("Volhaven");
AddToFactions(Volhaven);
//Criminal Organizations/Gangs //Criminal Organizations/Gangs