diff --git a/index.html b/index.html index 06051e142..78c7ca019 100644 --- a/index.html +++ b/index.html @@ -58,19 +58,19 @@ Active Scripts -
  • World
  • -
  • Create Program
  • -
  • Factions
  • -
  • +
  • Augmentations
  • @@ -119,10 +119,26 @@
    - + + + + + +
    + +
    + + +
    + +
    + + + \ No newline at end of file diff --git a/src/Faction.js b/src/Faction.js index e39b780e4..2ea5db0c8 100644 --- a/src/Faction.js +++ b/src/Faction.js @@ -2,6 +2,7 @@ function Faction(name) { this.name = name; this.augmentations = []; + this.information = ""; //Introductory/informational text about the faction //Player-related properties for faction this.isMember = false; //Whether player is member @@ -14,6 +15,10 @@ Faction.prototype.setAugmentations = function(augs) { } } +Faction.prototype.setInformation(info) { + this.information = info; +} + Faction.prototype.toJSON = function() { return Generic_toJSON("Faction", this); } @@ -32,6 +37,7 @@ AddToFactions = function(faction) { Factions[name] = faction; } +//TODO Add faction information initFactions = function() { //Endgame var Illuminati = new Faction("Illuminati"); @@ -97,4 +103,13 @@ initFactions = function() { AddToFactions(TianDiHui); var CyberSec = new Faction("CyberSec"); AddToFactions(CyberSec); +} + +//Displays the HTML content for this faction +displayFactionContent = function(faction) { + if (faction.isMember) { + + } else { + console.log("Not a member of this faction, cannot display faction information"); + } } \ No newline at end of file