[style] Fixing TSLint violations

This commit is contained in:
Steven Evans 2018-07-18 12:49:46 -04:00
parent b5e8d61ad6
commit 1412b01be5
4 changed files with 176 additions and 139 deletions

@ -64,166 +64,202 @@ class FactionInfo {
*/ */
// tslint:disable-next-line:variable-name // tslint:disable-next-line:variable-name
export const FactionInfos: IMap<FactionInfo> = { export const FactionInfos: IMap<FactionInfo> = {
// Endgame // Endgame
Illuminati: new FactionInfo("Humanity never changes. No matter how civilized society becomes, it will eventually " + Illuminati: new FactionInfo(
"fall back into chaos. And from this chaos, we are the Invisible hand that guides them to order. ", "Humanity never changes. No matter how civilized society becomes, it will eventually fall back into chaos. And " +
[], true, true, true, false), "from this chaos, we are the Invisible hand that guides them to order.",
[], true, true, true, false),
Daedalus: new FactionInfo("Yesterday we obeyed kings and bent our necks to emperors. Today we kneel only to truth.", Daedalus: new FactionInfo(
[], true, true, true, false), "Yesterday we obeyed kings and bent our necks to emperors. Today we kneel only to truth.",
[], true, true, true, false),
"The Covenant": new FactionInfo("Surrender yourself. Give up your empty individuality to become part of something " + "The Covenant": new FactionInfo(
"great, something eternal. Become a slave. Submit your mind, body, and soul. Only " + "Surrender yourself. Give up your empty individuality to become part of something great, something eternal. " +
"then can you set yourself free.<br><br> Only then can you discover immortality.", "Become a slave. Submit your mind, body, and soul. Only then can you set yourself free.<br>" +
[], true, true, true, false), "<br>" +
"Only then can you discover immortality.",
[], true, true, true, false),
// Megacorporations, each forms its own faction // Megacorporations, each forms its own faction
ECorp: new FactionInfo("ECorp's mission is simple: to connect the world of today with the technology of tomorrow. " + ECorp: new FactionInfo(
"With our wide range of Internet-related software and commercial hardware, ECorp makes " + "ECorp's mission is simple: to connect the world of today with the technology of tomorrow. With our wide range " +
"the world's information universally accessible.", "of Internet-related software and commercial hardware, ECorp makes the world's information universally accessible.",
[], true, true, true, true), [], true, true, true, true),
MegaCorp: new FactionInfo("MegaCorp does things that others don't. We imagine. We create. We invent. We build " + MegaCorp: new FactionInfo(
"things that others have never even dreamed of. Our work fills the world's needs for " + "MegaCorp does things that others don't. We imagine. We create. We invent. We build things that others have " +
"food, water, power, and transporation on an unprecendented scale, in ways that no " + "never even dreamed of. Our work fills the world's needs for food, water, power, and transporation on an " +
"other company can.<br><br>In our labs and factories and on the ground with customers, " + "unprecendented scale, in ways that no other company can.<br>" +
"MegaCorp is ushering in a new era for the world.", "<br>" +
[], true, true, true, true), "In our labs and factories and on the ground with customers, MegaCorp is ushering in a new era for the world.",
[], true, true, true, true),
"Bachman & Associates": new FactionInfo("Where Law and Business meet - thats where we are. <br><br>" + "Bachman & Associates": new FactionInfo(
"Legal Insight - Business Instinct - Experience Innovation", "Where Law and Business meet - thats where we are. <br>" +
[], true, true, true, true), "<br>" +
"Legal Insight - Business Instinct - Experience Innovation",
[], true, true, true, true),
"Blade Industries": new FactionInfo("Augmentation is salvation", [], true, true, true, true), "Blade Industries": new FactionInfo(
"Augmentation is salvation",
[], true, true, true, true),
NWO: new FactionInfo("The human being does not truly desire freedom. It wants " + NWO: new FactionInfo(
"to be observed, understood, and judged. It wants to be given purpose and " + "The human being does not truly desire freedom. It wants to be observed, understood, and judged. It wants to be " +
"direction in its life. That is why humans created God. " + "given purpose and direction in its life. That is why humans created God. And that is why humans created " +
"And that is why humans created civilization - " + "civilization - not because of willingness, but because of a need to be incorporated into higher orders of " +
"not because of willingness, " + "structure and meaning.",
"but because of a need to be incorporated into higher orders of structure and meaning.", [], true, true, true, true),
[], true, true, true, true),
"Clarke Incorporated": new FactionInfo("Unlocking the power of the genome", "Clarke Incorporated": new FactionInfo(
[], true, true, true, true), "Unlocking the power of the genome",
[], true, true, true, true),
"OmniTek Incorporated": new FactionInfo("Simply put, our mission is to design and build robots that make a difference", "OmniTek Incorporated": new FactionInfo(
[], true, true, true, true), "Simply put, our mission is to design and build robots that make a difference",
[], true, true, true, true),
"Four Sigma": new FactionInfo("The scientific method is the best way to approach investing. Big strategies backed " + "Four Sigma": new FactionInfo(
"up with big data. Driven by deep learning and innovative ideas. And improved by iteration. That's Four Sigma.", "The scientific method is the best way to approach investing. Big strategies backed up with big data. Driven by " +
[], true, true, true, true), "deep learning and innovative ideas. And improved by iteration. That's Four Sigma.",
[], true, true, true, true),
"KuaiGong International": new FactionInfo("Dream big. Work hard. Make history.", "KuaiGong International": new FactionInfo(
[], true, true, true, true), "Dream big. Work hard. Make history.",
[], true, true, true, true),
// Other Corporations // Other Corporations
"Fulcrum Secret Technologies": new FactionInfo("The human organism has an innate desire to worship. " + "Fulcrum Secret Technologies": new FactionInfo(
"That is why they created gods. If there were no gods, " + "The human organism has an innate desire to worship. That is why they created gods. If there were no gods, it " +
"it would be necessary to create them. And now we can.", "would be necessary to create them. And now we can.",
[], true, true, false, true), [], true, true, false, true),
// Hacker groups // Hacker groups
BitRunners: new FactionInfo("Our entire lives are controlled by bits. All of our actions, our thoughts, our " + BitRunners: new FactionInfo(
"personal information. It's all transformed into bits, stored in bits, communicated through bits. " + "Our entire lives are controlled by bits. All of our actions, our thoughts, our personal information. It's all " +
"Its impossible for any person to move, to live, to operate at any level without the use of " + "transformed into bits, stored in bits, communicated through bits. Its impossible for any person to move, to " +
"bits. And when a person moves, lives, and operates, they leave behind their bits, mere traces of " + "live, to operate at any level without the use of bits. And when a person moves, lives, and operates, they leave " +
"seemingly meaningless fragments of information. But these bits can be reconstructed. " + "behind their bits, mere traces of seemingly meaningless fragments of information. But these bits can be " +
"Transformed. Used.<br><br>Those who run the bits, run the world", "reconstructed. Transformed. Used.<br>" +
[], true, true, false, false), "<br>" +
"Those who run the bits, run the world",
[], true, true, false, false),
"The Black Hand": new FactionInfo("The world, so afraid of strong government, now has no government. " + "The Black Hand": new FactionInfo(
"Only power - Digital power. Financial power. Technological power. And those at the top rule with " + "The world, so afraid of strong government, now has no government. Only power - Digital power. Financial power. " +
"an invisible hand. They built a society where the rich get richer, and everyone else suffers." + "Technological power. And those at the top rule with an invisible hand. They built a society where the rich get " +
"<br><br>So much pain. So many lives. Their darkness must end.", "richer, and everyone else suffers.<br>" +
[], true, true, true, false), "<br>" +
"So much pain. So many lives. Their darkness must end.",
[], true, true, true, false),
NiteSec: new FactionInfo( NiteSec: new FactionInfo(
" __..__ <br>" + " __..__ <br>" +
" _.nITESECNIt. <br>" + " _.nITESECNIt. <br>" +
" .-'NITESECNITESEc. <br>" + " .-'NITESECNITESEc. <br>" +
" .' NITESECNITESECn <br>" + " .' NITESECNITESECn <br>" +
" / NITESECNITESEC; <br>" + " / NITESECNITESEC; <br>" +
" : :NITESECNITESEC; <br>" + " : :NITESECNITESEC; <br>" +
" ; $ NITESECNITESECN <br>" + " ; $ NITESECNITESECN <br>" +
" : _, ,N'ITESECNITESEC <br>" + " : _, ,N'ITESECNITESEC <br>" +
" : .+^^`, : `NITESECNIT <br>" + " : .+^^`, : `NITESECNIT <br>" +
" ) /), `-,-=,NITESECNI <br>" + " ) /), `-,-=,NITESECNI <br>" +
" / ^ ,-;|NITESECN; <br>" + " / ^ ,-;|NITESECN; <br>" +
" / _.' '-';NITESECN <br>" + " / _.' '-';NITESECN <br>" +
" ( , ,-''`^NITE' <br>" + " ( , ,-''`^NITE' <br>" +
" )` :`. .' <br>" + " )` :`. .' <br>" +
" )-- ; `- / <br>" + " )-- ; `- / <br>" +
" \' _.-' : <br>" + " \' _.-' : <br>" +
" ( _.-' \. \ <br>" + " ( _.-' \. \ <br>" +
" \------. \ \ <br>" + " \------. \ \ <br>" +
" \. \ \ <br>" + " \. \ \ <br>" +
" \ _.nIt <br>" + " \ _.nIt <br>" +
" \ _.nITESECNi <br>" + " \ _.nITESECNi <br>" +
" nITESECNIT^' \ <br>" + " nITESECNIT^' \ <br>" +
" NITE^' ___ \ <br>" + " NITE^' ___ \ <br>" +
" / .gP''''Tp. \ <br>" + " / .gP''''Tp. \ <br>" +
" : d' . `b \ <br>" + " : d' . `b \ <br>" +
" ; d' o `b ; <br>" + " ; d' o `b ; <br>" +
" / d; `b| <br>" + " / d; `b| <br>" +
" /, $; @ `: <br>" + " /, $; @ `: <br>" +
" /' $$ ; <br>" + " /' $$ ; <br>" +
" .' $$b o | <br>" + " .' $$b o | <br>" +
" .' d$$$; : <br>" + " .' d$$$; : <br>" +
" / .d$$$$; , ; <br>" + " / .d$$$$; , ; <br>" +
" d .dNITESEC $ | <br>" + " d .dNITESEC $ | <br>" +
" :bp.__.gNITESEC$$ :$ ; <br>" + " :bp.__.gNITESEC$$ :$ ; <br>" +
" NITESECNITESECNIT $$b : <br>", " NITESECNITESECNIT $$b : <br>",
[], true, true, false, false), [], true, true, false, false),
// City factions, essentially governments // City factions, essentially governments
Aevum: new FactionInfo("The Silicon City", Aevum: new FactionInfo(
["Chongqing", "New Tokyo", "Ishima", "Volhaven"], true, true, true, true), "The Silicon City",
Chongqing: new FactionInfo("Serve the people", ["Chongqing", "New Tokyo", "Ishima", "Volhaven"], true, true, true, true),
["Sector-12", "Aevum", "Volhaven"], true, true, true, true), Chongqing: new FactionInfo(
Ishima: new FactionInfo("The East Asian Order of the Future", "Serve the people",
["Sector-12", "Aevum", "Volhaven"], true, true, true, true), ["Sector-12", "Aevum", "Volhaven"], true, true, true, true),
"New Tokyo": new FactionInfo("Asia's World City", Ishima: new FactionInfo(
["Sector-12", "Aevum", "Volhaven"], true, true, true, true), "The East Asian Order of the Future",
"Sector-12": new FactionInfo("The City of the Future", ["Sector-12", "Aevum", "Volhaven"], true, true, true, true),
["Chongqing", "New Tokyo", "Ishima", "Volhaven"], true, true, true, true), "New Tokyo": new FactionInfo(
Volhaven: new FactionInfo("Benefit, Honour, and Glory", "Asia's World City",
["Chongqing", "Sector-12", "New Tokyo", "Aevum", "Ishima"], true, true, true, true), ["Sector-12", "Aevum", "Volhaven"], true, true, true, true),
"Sector-12": new FactionInfo(
"The City of the Future",
["Chongqing", "New Tokyo", "Ishima", "Volhaven"], true, true, true, true),
Volhaven: new FactionInfo(
"Benefit, Honour, and Glory",
["Chongqing", "Sector-12", "New Tokyo", "Aevum", "Ishima"], true, true, true, true),
// Criminal Organizations/Gangs // Criminal Organizations/Gangs
"Speakers for the Dead": new FactionInfo("It is better to reign in hell than to serve in heaven.", "Speakers for the Dead": new FactionInfo(
[], true, true, true, true), "It is better to reign in hell than to serve in heaven.",
[], true, true, true, true),
"The Dark Army": new FactionInfo("The World doesn't care about right or wrong. It's all about power.", "The Dark Army": new FactionInfo(
[], true, true, true, false), "The World doesn't care about right or wrong. It's all about power.",
[], true, true, true, false),
"The Syndicate": new FactionInfo("Honor holds you back", [], true, true, true, true), "The Syndicate": new FactionInfo(
"Honor holds you back",
[], true, true, true, true),
Silhouette: new FactionInfo("Corporations have filled the void of power left behind by the collapse of Western " + Silhouette: new FactionInfo(
"government. The issue is they've become so big that you don't know who they're working for. And " + "Corporations have filled the void of power left behind by the collapse of Western government. The issue is " +
"if you're employed at one of these corporations, you don't even know who you're working for.\n\n" + "they've become so big that you don't know who they're working for. And if you're employed at one of these " +
"That's terror. Terror, fear, and corruption. All born into the system, all propagated by the " + "corporations, you don't even know who you're working for.<br>" +
"system.", "<br>" +
[], true, true, true, false), "That's terror. Terror, fear, and corruption. All born into the system, all propagated by the system.",
[], true, true, true, false),
Tetrads: new FactionInfo("Following the Mandate of Heaven and Carrying out the Way", [], false, false, true, true), Tetrads: new FactionInfo(
"Following the Mandate of Heaven and Carrying out the Way",
[], false, false, true, true),
"Slum Snakes": new FactionInfo("Slum Snakes rule!", [], false, false, true, true), "Slum Snakes": new FactionInfo(
"Slum Snakes rule!",
[], false, false, true, true),
// Earlygame factions - factions the player will prestige with early on that don't belong in other categories. // Earlygame factions - factions the player will prestige with early on that don't belong in other categories.
Netburners: new FactionInfo("~~//*>H4CK|\|3T 8URN3R5**>?>\\~~", [], true, true, false, false), Netburners: new FactionInfo(
"~~//*>H4CK|\|3T 8URN3R5**>?>\\~~",
[], true, true, false, false),
"Tian Di Hui": new FactionInfo("Obey Heaven and Work Righteousness", [], true, true, false, true), "Tian Di Hui": new FactionInfo(
"Obey Heaven and Work Righteousness",
[], true, true, false, true),
CyberSec: new FactionInfo("The Internet is the first thing that humanity has built that humanity doesnt " + CyberSec: new FactionInfo(
"understand, the largest experiment in anarchy that we have ever had. And as the world becomes " + "The Internet is the first thing that humanity has built that humanity doesnt understand, the largest " +
"increasingly dominated by the internet, society approaches the brink of total chaos. We serve only " + "experiment in anarchy that we have ever had. And as the world becomes increasingly dominated by the internet, " +
"to protect society, to protect humanity, to protect the world from its imminent collapse.", "society approaches the brink of total chaos. We serve only to protect society, to protect humanity, to protect " +
[], true, true, false, false), "the world from its imminent collapse.",
[], true, true, false, false),
// Special Factions // Special Factions
Bladeburners: new FactionInfo("It's too bad they won't live. But then again, who does?<br><br>Note that for this " + Bladeburners: new FactionInfo(
"faction, reputation can only be gained through Bladeburner actions. Completing " + "It's too bad they won't live. But then again, who does?<br><br>Note that for this faction, reputation can only " +
"Bladeburner contracts/operations will increase your reputation.", "be gained through Bladeburner actions. Completing Bladeburner contracts/operations will increase your reputation.",
[], false, false, false, false), [], false, false, false, false),
}; };

@ -4,5 +4,6 @@
*/ */
export function roundToTwo(decimal: number) { export function roundToTwo(decimal: number) {
const leftShift: number = Math.round(parseFloat(`${decimal}e+2`)); const leftShift: number = Math.round(parseFloat(`${decimal}e+2`));
return +(`${leftShift}e-2`); return +(`${leftShift}e-2`);
} }

@ -27,18 +27,18 @@ interface IAccordionConfigurationParameters {
export function createAccordionElement(params: IAccordionConfigurationParameters) { export function createAccordionElement(params: IAccordionConfigurationParameters) {
const liElem: HTMLLIElement = createElement("li") as HTMLLIElement; const liElem: HTMLLIElement = createElement("li") as HTMLLIElement;
const header: HTMLButtonElement = createElement("button", { const header: HTMLButtonElement = createElement("button", {
class: "accordion-header",
clickListener() { clickListener() {
this.classList.toggle("active"); this.classList.toggle("active");
const pnl: CSSStyleDeclaration = (this.nextElementSibling as HTMLDivElement).style; const pnl: CSSStyleDeclaration = (this.nextElementSibling as HTMLDivElement).style;
pnl.display = pnl.display === "block" ? "none" : "block"; pnl.display = pnl.display === "block" ? "none" : "block";
}, },
id: params.id !== undefined ? `${params.id}-hdr` : undefined, id: params.id !== undefined ? `${params.id}-hdr` : undefined,
class:"accordion-header",
innerHTML: params.hdrText, innerHTML: params.hdrText,
}) as HTMLButtonElement; }) as HTMLButtonElement;
const panel: HTMLDivElement = createElement("div", { const panel: HTMLDivElement = createElement("div", {
class: "accordion-panel",
id: params.id !== undefined ? `${params.id}-panel` : undefined, id: params.id !== undefined ? `${params.id}-panel` : undefined,
class:"accordion-panel",
innerHTML: params.panelText, innerHTML: params.panelText,
}) as HTMLDivElement; }) as HTMLDivElement;

@ -10,7 +10,7 @@ export function createPopup(id: string, elems: HTMLElement[]) {
const container: HTMLDivElement = createElement("div", { const container: HTMLDivElement = createElement("div", {
class: "popup-box-container", class: "popup-box-container",
display: "block", display: "block",
id: id, id,
}) as HTMLDivElement; }) as HTMLDivElement;
const content: HTMLElement = createElement("div", { const content: HTMLElement = createElement("div", {
class: "popup-box-content", class: "popup-box-content",