mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-17 14:59:16 +02:00
Preparing code to create the Factions page
This commit is contained in:
@@ -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");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user