diff --git a/css/arcologyBuilding/arcologyBuilding.css b/css/arcologyBuilding/arcologyBuilding.css index 7fdb9580fadbe6d5ec8429548b6cf0d446ab2593..c9dea2c8a61dafc145b23d4de93243dee1def74b 100644 --- a/css/arcologyBuilding/arcologyBuilding.css +++ b/css/arcologyBuilding/arcologyBuilding.css @@ -172,7 +172,7 @@ border-color: gray; } -.building .row .transportHub { +.building .row .transport-hub { border-color: magenta; } diff --git a/js/002-config/fc-js-init.js b/js/002-config/fc-js-init.js index 9df9b04d98527041e66b1d6be969d5455e1c7b82..06055378dded51791caf6ef2b7818b46da49cab6 100644 --- a/js/002-config/fc-js-init.js +++ b/js/002-config/fc-js-init.js @@ -49,6 +49,7 @@ App.Facilities.Pit = {}; App.Facilities.Schoolroom = {}; App.Facilities.ServantsQuarters = {}; App.Facilities.Spa = {}; +App.Facilities.TransportHub = {}; App.Interact = {}; App.Interact.Sale = {}; App.Intro = {}; diff --git a/src/005-passages/facilitiesPassages.js b/src/005-passages/facilitiesPassages.js index 78e6554c572c9c8696c87b257a6bd63872d1b4a5..bcb5d203cfe7c0e313f1eaf081f03f17a32c3d96 100644 --- a/src/005-passages/facilitiesPassages.js +++ b/src/005-passages/facilitiesPassages.js @@ -25,6 +25,8 @@ new App.DomPassage("Servants' Quarters", () => { return new App.Facilities.Serva new App.DomPassage("Spa", () => { return new App.Facilities.Spa.spa().render(); }, ["jump-to-safe", "jump-from-safe"]); +new App.DomPassage("Transport Hub", () => { return App.Facilities.TransportHub.transportHub(); }); + /* ### Slave Interact Facilities ### */ new App.DomPassage("Wardrobe", () => { diff --git a/src/Mods/SecExp/buildings/transportHub.js b/src/Mods/SecExp/buildings/transportHub.js new file mode 100644 index 0000000000000000000000000000000000000000..45f46d82d52d938ec8b6db82b89647aea5174dc3 --- /dev/null +++ b/src/Mods/SecExp/buildings/transportHub.js @@ -0,0 +1,255 @@ +App.Facilities.TransportHub.transportHub = function() { + const frag = new DocumentFragment(); + + V.nextButton = "Back"; + V.nextLink = "Main"; + + App.UI.DOM.appendNewElement("h1", frag, `The Transport Hub`); + + const refreshDiv = document.createElement("div"); + const refresh = () => App.UI.DOM.replace(refreshDiv, content()); + + function content() { + const div = document.createElement("div"); + + div.append( + intro(), + trade(), + upgrades(), + ); + + return div; + } + + frag.append(content()); + + return frag; + + function intro() { + const div = document.createElement("div"); + const text = []; + + text.push(`You quickly reach the transport hub, where a constant stream of vehicles, people and goods greets you. Part of the structure is dedicated to air travel and the other is mainly occupied by the ${V.terrain !== "oceanic" && V.terrain !== "marine" ? `monorail station` : `docks`}.`); + + if (V.SecExp.edicts.limitImmigration || V.policies.immigrationRep === -1) { + text.push(`Due to your strict policies concerning immigration, very few new citizens arrive in the transport hub.`); + } else if (V.SecExp.edicts.openBorders || V.policies.immigrationCash) { + text.push(`Due to your liberal policies concerning immigration, the transport hub is filled with a flow of new citizens.`); + } + + App.Events.addNode(div, text, "div", ['scene-intro']); + App.UI.DOM.appendNewElement("div", div, App.UI.DOM.passageLink(`Decommission the Transport Hub`, "Main", () => { + delete V.SecExp.buildings.transportHub; + cashX(forceNeg(Math.trunc(10000 * V.upgradeMultiplierArcology)), "capEx"); + + App.Arcology.cellUpgrade(V.building, App.Arcology.Cell.Market, "Transport Hub", "Markets"); + }), ['indent']); + + return div; + } + + function trade() { + const div = document.createElement("div"); + const text = []; + + App.UI.DOM.appendNewElement("h2", div, `Trade`); + + if (V.SecExp.core.trade <= 20) { + text.push(`Trade is <span class="red">almost non-existent.</span> Outside the supplies for the arcology's domestic consumption little else crosses the territory of the free city.`); + } else if (V.SecExp.core.trade <= 40) { + text.push(`Trade is <span class="orange">low.</span> There's some but limited commercial activity crossing the territory of the free city.`); + } else if (V.SecExp.core.trade <= 60) { + text.push(`Trade is at <span class="yellow">positive levels.</span> There's a good amount commercial activity outside the supplies for the arcology's domestic consumption.`); + } else if (V.SecExp.core.trade <= 80) { + text.push(`Trade is at <span class="limegreen">high levels.</span> There's a lot of commercial activity outside the supplies for the arcology's domestic consumption.`); + } else { + text.push(`Trade is at <span class="green">extremely high levels.</span> There's a constant stream of commercial activity crossing the arcology.`); + } + + App.Events.addNode(div, text); + + return div; + } + + function upgrades() { + const div = document.createElement("div"); + + const price = cost => Math.trunc(cost * V.upgradeMultiplierArcology); + + App.UI.DOM.appendNewElement("h2", div, `Upgrades`); + + div.append( + airport(), + V.terrain !== "oceanic" && V.terrain !== "marine" + ? land() + : sea(), + security(), + ); + + return div; + + function airport() { + const div = document.createElement("div"); + const text = []; + const links = []; + + if (V.SecExp.buildings.transportHub.airport === 1) { + text.push(`The arcology's airport is relatively small and poorly equipped. It can handle some traffic, but nothing noteworthy.`); + links.push(App.UI.DOM.link(`Modernize the airport`, () => { + V.SecExp.buildings.transportHub.airport = 2; + cashX(forceNeg(price(5000)), "capEx"); + + refresh(); + }, [], '', `Costs ${cashFormat(price(5000))} and will increase trade, but will affect security.`)); + } else if (V.SecExp.buildings.transportHub.airport === 2) { + text.push(`The arcology's airport is relatively small, but fairly well equipped. It can handle some traffic, but nothing too serious.`); + links.push(App.UI.DOM.link(`Enlarge the airport`, () => { + V.SecExp.buildings.transportHub.airport = 3; + cashX(forceNeg(price(15000)), "capEx"); + + refresh(); + }, [], '', `Costs ${cashFormat(price(15000))} and will increase trade, but will affect security.`)); + } else if (V.SecExp.buildings.transportHub.airport === 3) { + text.push(`The arcology's airport is good sized and well equipped. It can handle a good amount of traffic.`); + links.push(App.UI.DOM.link(`Further modernize the airport`, () => { + V.SecExp.buildings.transportHub.airport = 4; + cashX(forceNeg(price(45000)), "capEx"); + + refresh(); + }, [], '', `Costs ${cashFormat(price(45000))} and will increase trade, but will affect security.`)); + } else if (V.SecExp.buildings.transportHub.airport === 4) { + links.push(App.UI.DOM.link(`Further modernize the airport`, () => { + V.SecExp.buildings.transportHub.airport = 5; + cashX(forceNeg(price(85000)), "capEx"); + + refresh(); + }, [], '', `Costs ${cashFormat(price(85000))} and will increase trade, but will affect security.`)); + text.push(`The arcology's airport is good sized and very well equipped. It can handle a lot of traffic.`); + } else { + text.push(`The arcology's airport is huge and very well equipped. It can handle an impressive amount of traffic.`); + } + + App.Events.addNode(div, text); + App.UI.DOM.appendNewElement("div", div, App.UI.DOM.generateLinksStrip(links), ['indent']); + + return div; + } + + function land() { + const div = document.createElement("div"); + const text = []; + const links = []; + + if (V.SecExp.buildings.transportHub.surfaceTransport === 1) { + text.push(`The railway network is old and limited. It can handle some traffic, but not sustain commercial activity.`); + links.push(App.UI.DOM.link(`Modernize the railway`, () => { + V.SecExp.buildings.transportHub.surfaceTransport = 2; + cashX(forceNeg(price(10000)), "capEx"); + + refresh(); + }, [], '', `Costs ${cashFormat(price(10000))} and will increase trade, but will affect security.`)); + } else if (V.SecExp.buildings.transportHub.surfaceTransport === 2) { + text.push(`The railway network is modern and efficient, but limited in reach. It can handle some traffic, but not sustain commercial activity of any significant size.`); + links.push(App.UI.DOM.link(`Enlarge the railway`, () => { + V.SecExp.buildings.transportHub.surfaceTransport = 3; + cashX(forceNeg(price(25000)), "capEx"); + + refresh(); + }, [], '', `Costs ${cashFormat(price(25000))} and will increase trade, but will affect security.`)); + } else if (V.SecExp.buildings.transportHub.surfaceTransport === 3) { + text.push(`The railway network is modern, efficient and expansive. It can handle a significant amount of traffic.`); + links.push(App.UI.DOM.link(`Further modernize the railway`, () => { + V.SecExp.buildings.transportHub.surfaceTransport = 4; + cashX(forceNeg(price(65000)), "capEx"); + + refresh(); + }, [], '', `Costs ${cashFormat(price(65000))} and will increase trade, but will affect security.`)); + } else { + text.push(`The railway network is high tech and very far reaching. It can handle an enormous amount of traffic.`); + } + + App.Events.addNode(div, text); + App.UI.DOM.appendNewElement("div", div, App.UI.DOM.generateLinksStrip(links), ['indent']); + + return div; + } + + function sea() { + const div = document.createElement("div"); + const text = []; + const links = []; + + if (V.SecExp.buildings.transportHub.surfaceTransport === 1) { + text.push(`The docks are old and small. They can handle some traffic, but not sustain commercial activity.`); + links.push(App.UI.DOM.link(`Modernize the docks`, () => { + V.SecExp.buildings.transportHub.surfaceTransport = 2; + cashX(forceNeg(price(10000)), "capEx"); + + refresh(); + }, [], '', `Costs ${cashFormat(price(10000))} and will increase trade, but will affect security.`)); + } else if (V.SecExp.buildings.transportHub.surfaceTransport === 2) { + text.push(`The docks are modern and efficient, but limited in size. They can handle some traffic, but not sustain commercial activity of significant size.`); + links.push(App.UI.DOM.link(`Enlarge the docks`, () => { + V.SecExp.buildings.transportHub.surfaceTransport = 3; + cashX(forceNeg(price(25000)), "capEx"); + + refresh(); + }, [], '', `Costs ${cashFormat(price(25000))} and will increase trade, but will affect security.`)); + } else if (V.SecExp.buildings.transportHub.surfaceTransport === 3) { + text.push(`The docks are modern, efficient and expansive. They can handle a significant amount of traffic.`); + links.push(App.UI.DOM.link(`Further modernize the docks`, () => { + V.SecExp.buildings.transportHub.surfaceTransport = 4; + cashX(forceNeg(price(65000)), "capEx"); + + refresh(); + }, [], '', `Costs ${cashFormat(price(65000))} and will increase trade, but will affect security.`)); + } else { + text.push(`The docks are huge in size and high tech. They can handle an enormous amount of traffic.`); + } + + App.Events.addNode(div, text); + App.UI.DOM.appendNewElement("div", div, App.UI.DOM.generateLinksStrip(links), ['indent']); + + return div; + } + + function security() { + const div = document.createElement("div"); + const text = []; + const links = []; + + if (V.SecExp.buildings.transportHub.security === 1) { + text.push(`The security of the hub is limited to a few cameras and the occasional guard.`); + links.push(App.UI.DOM.link(`Expand and modernize the surveillance system`, () => { + V.SecExp.buildings.transportHub.security = 2; + cashX(forceNeg(price(15000)), "capEx"); + + refresh(); + }, [], '', `Costs ${cashFormat(price(15000))}, increases upkeep costs, and will increase security.`)); + } else if (V.SecExp.buildings.transportHub.security === 2) { + text.push(`The security of the hub is guaranteed by a powerful camera surveillance system.`); + links.push(App.UI.DOM.link(`Establish a rapid response team`, () => { + V.SecExp.buildings.transportHub.security = 3; + cashX(forceNeg(price(35000)), "capEx"); + + refresh(); + }, [], '', `Costs ${cashFormat(price(35000))}, increases upkeep costs, and will increase security.`)); + } else if (V.SecExp.buildings.transportHub.security === 3) { + text.push(`The security of the hub is guaranteed by a powerful camera surveillance system and a rapid response team constantly patrolling the structure.`); + links.push(App.UI.DOM.link(`Add additional security drones to the structure`, () => { + V.SecExp.buildings.transportHub.security = 4; + cashX(forceNeg(price(55000)), "capEx"); + + refresh(); + }, [], '', `Costs ${cashFormat(price(55000))}, increases upkeep costs, and will increase security.`)); + } else { + text.push(`The security of the hub is guaranteed by a powerful camera surveillance system, a rapid response team constantly patrolling the building and additional security drones making the rounds around the exterior.`); + } + + App.Events.addNode(div, text); + App.UI.DOM.appendNewElement("div", div, App.UI.DOM.generateLinksStrip(links), ['indent']); + + return div; + } + } +}; diff --git a/src/Mods/SecExp/buildings/transportHub.tw b/src/Mods/SecExp/buildings/transportHub.tw deleted file mode 100644 index bef5fd6c4891c4a3ca8fc870769d223a2d9af04f..0000000000000000000000000000000000000000 --- a/src/Mods/SecExp/buildings/transportHub.tw +++ /dev/null @@ -1,153 +0,0 @@ -:: transportHub [nobr] - -<<set $nextButton = "Back", $nextLink = "Main">> - -<strong>The Transport Hub</strong> <hr> -You quickly reach the transport hub, where a constant stream of vehicles, people and goods greets you. Part of the structure is dedicated to air travel and the other is mainly occupied by the <<if $terrain != "oceanic" && $terrain != "marine">>rail station<<else>>docks<</if>>. - -<<if $SecExp.edicts.limitImmigration == 1 || $policies.immigrationRep == -1>> - Due to your strict policies concerning immigration, very few new citizens arrive in the transport hub. -<<elseif $SecExp.edicts.openBorders == 1 || $policies.immigrationCash == 1>> - Due to your liberal policies concerning immigration, the transport hub is filled with a flow of new citizens. -<</if>> - -<<if $SecExp.buildings.transportHub.airport == 1>> - The arcology's airport is relatively small and poorly equipped. It can handle some traffic, but nothing noteworthy. -<<elseif $SecExp.buildings.transportHub.airport == 2>> - The arcology's airport is relatively small, but well equipped. It can handle some traffic, but nothing too serious. -<<elseif $SecExp.buildings.transportHub.airport == 3>> - The arcology's airport is good sized and well equipped. It can handle a good amount of traffic. -<<elseif $SecExp.buildings.transportHub.airport == 4>> - The arcology's airport is good sized and very well equipped. It can handle a lot of traffic. -<<else>> - The arcology's airport is huge and very well equipped. It can handle an impressive amount of traffic. -<</if>> - -<<if $terrain != "oceanic" && $terrain != "marine">> - <<if $SecExp.buildings.transportHub.surfaceTransport == 1>> - The railway network is old and limited. It can handle some traffic, but not sustain commercial activity. - <<elseif $SecExp.buildings.transportHub.surfaceTransport == 2>> - The railway network is modern and efficient, but limited in reach. It can handle some traffic, but not sustain commercial activity of any significant size. - <<elseif $SecExp.buildings.transportHub.surfaceTransport == 3>> - The railway network is modern, efficient and expansive. It can handle a significant amount of traffic. - <<else>> - The railway network is high tech and very far reaching. It can handle an enormous amount of traffic. - <</if>> -<<else>> - <<if $SecExp.buildings.transportHub.surfaceTransport == 1>> - The docks are old and small. They can handle some traffic, but not sustain commercial activity. - <<elseif $SecExp.buildings.transportHub.surfaceTransport == 2>> - The docks are modern and efficient, but limited in size. They can handle some traffic, but not sustain commercial activity of significant size. - <<elseif $SecExp.buildings.transportHub.surfaceTransport == 3>> - The docks are modern, efficient and expansive. They can handle a significant amount of traffic. - <<else>> - The docks are huge in size and high tech. They can handle an enormous amount of traffic. - <</if>> -<</if>> - - -<<if $SecExp.buildings.transportHub.security == 1>> - The security of the hub is limited to a few cameras and the occasional guard. -<<elseif $SecExp.buildings.transportHub.security == 2>> - The security of the hub is guaranteed by a powerful camera surveillance system. -<<elseif $SecExp.buildings.transportHub.security == 3>> - The security of the hub is guaranteed by a powerful camera surveillance system and a rapid response team constantly patrolling the structure. -<<else>> - The security of the hub is guaranteed by a powerful camera surveillance system, a rapid response team constantly patrolling the building and additional security drones making the rounds around the exterior. -<</if>> - -<<if $SecExp.core.trade <= 20>> - <br><br>Trade is @@.red;almost non-existent.@@ Outside the supplies for the arcology's domestic consumption little else crosses the territory of the free city. -<<elseif $SecExp.core.trade <= 40>> - <br><br>Trade is @@.orange;low.@@ There's some but limited commercial activity crossing the territory of the free city. -<<elseif $SecExp.core.trade <= 60>> - <br><br>Trade is at @@.yellow;positive levels.@@ There's a good amount commercial activity outside the supplies for the arcology's domestic consumption. -<<elseif $SecExp.core.trade <= 80>> - <br><br>Trade is at @@.limegreen;high levels.@@ There's a lot of commercial activity outside the supplies for the arcology's domestic consumption. -<<else>> - <br><br>Trade is at @@.green;extremely high levels.@@ There's a constant stream of commercial activity crossing the arcology. -<</if>> - -<<if $SecExp.buildings.transportHub.airport == 1>> - <br><br> <<link "Modernize the airport" "transportHub">> - <<run cashX(forceNeg(Math.trunc(5000*$upgradeMultiplierArcology)), "capEx")>> - <<set $SecExp.buildings.transportHub.airport++>> - <</link>> //Will cost <<print cashFormat(Math.trunc(5000*$upgradeMultiplierArcology))>> and will increase trade, but will affect security// -<<elseif $SecExp.buildings.transportHub.airport == 2>> - <br><br> <<link "Enlarge the airport" "transportHub">> - <<run cashX(forceNeg(Math.trunc(15000*$upgradeMultiplierArcology)), "capEx")>> - <<set $SecExp.buildings.transportHub.airport++>> - <</link>> //Will cost <<print cashFormat(Math.trunc(15000*$upgradeMultiplierArcology))>> and will increase trade, but will affect security// -<<elseif $SecExp.buildings.transportHub.airport == 3>> - <br><br> <<link "Further modernize the airport" "transportHub">> - <<run cashX(forceNeg(Math.trunc(45000*$upgradeMultiplierArcology)), "capEx")>> - <<set $SecExp.buildings.transportHub.airport++>> - <</link>> //Will cost <<print cashFormat(Math.trunc(45000*$upgradeMultiplierArcology))>> and will increase trade, but will affect security// -<<elseif $SecExp.buildings.transportHub.airport == 4>> - <br><br> <<link "Further enlarge the airport" "transportHub">> - <<run cashX(forceNeg(Math.trunc(85000*$upgradeMultiplierArcology)), "capEx")>> - <<set $SecExp.buildings.transportHub.airport++>> - <</link>> //Will cost <<print cashFormat(Math.trunc(85000*$upgradeMultiplierArcology))>> and will increase trade, but will affect security// -<<else>> - <br><br>The airport is fully upgraded. -<</if>> - -<<if $terrain != "oceanic" && $terrain != "marine">> /* trainyard/dockyard */ - <<if $SecExp.buildings.transportHub.surfaceTransport == 1>> - <br> <<link "Modernize the railway" "transportHub">> - <<run cashX(forceNeg(Math.trunc(10000*$upgradeMultiplierArcology)), "capEx")>> - <<set $SecExp.buildings.transportHub.surfaceTransport++>> - <</link>> //Will cost <<print cashFormat(Math.trunc(10000*$upgradeMultiplierArcology))>>, will increase trade and slightly lower arcology's upkeep, but will affect security// - <<elseif $SecExp.buildings.transportHub.surfaceTransport == 2>> - <br> <<link "Enlarge the railway" "transportHub">> - <<run cashX(forceNeg(Math.trunc(25000*$upgradeMultiplierArcology)), "capEx")>> - <<set $SecExp.buildings.transportHub.surfaceTransport++>> - <</link>> //Will cost <<print cashFormat(Math.trunc(25000*$upgradeMultiplierArcology))>>, will increase trade and slightly lower arcology's upkeep, but will affect security// - <<elseif $SecExp.buildings.transportHub.surfaceTransport == 3>> - <br> <<link "Further modernize and enlarge the railway" "transportHub">> - <<run cashX(forceNeg(Math.trunc(65000*$upgradeMultiplierArcology)), "capEx")>> - <<set $SecExp.buildings.transportHub.surfaceTransport++>> - <</link>> //Will cost <<print cashFormat(Math.trunc(65000*$upgradeMultiplierArcology))>>, will increase trade and slightly lower arcology's upkeep, but will affect security// - <<else>> - <br>The railway is fully upgraded. - <</if>> -<<else>> - <<if $SecExp.buildings.transportHub.surfaceTransport == 1>> - <br> <<link "Modernize the docks" "transportHub">> - <<run cashX(forceNeg(Math.trunc(10000*$upgradeMultiplierArcology)), "capEx")>> - <<set $SecExp.buildings.transportHub.surfaceTransport++>> - <</link>> //Will cost <<print cashFormat(Math.trunc(10000*$upgradeMultiplierArcology))>>, will increase trade and slightly lower arcology's upkeep, but will affect security// - <<elseif $SecExp.buildings.transportHub.surfaceTransport == 2>> - <br> <<link "Enlarge the docks" "transportHub">> - <<run cashX(forceNeg(Math.trunc(25000*$upgradeMultiplierArcology)), "capEx")>> - <<set $SecExp.buildings.transportHub.surfaceTransport++>> - <</link>> //Will cost <<print cashFormat(Math.trunc(25000*$upgradeMultiplierArcology))>>, will increase trade and slightly lower arcology's upkeep, but will affect security// - <<elseif $SecExp.buildings.transportHub.surfaceTransport == 3>> - <br> <<link "Further modernize and enlarge the docks" "transportHub">> - <<run cashX(forceNeg(Math.trunc(65000*$upgradeMultiplierArcology)), "capEx")>> - <<set $SecExp.buildings.transportHub.surfaceTransport++>> - <</link>> //Will cost <<print cashFormat(Math.trunc(65000*$upgradeMultiplierArcology))>>, will increase trade and slightly lower arcology's upkeep, but will affect security// - <<else>> - <br>The docks are fully upgraded. - <</if>> -<</if>> - -<<if $SecExp.buildings.transportHub.security == 1>> /* security */ - <br> <<link "Expand and modernize the surveillance system" "transportHub">> - <<run cashX(forceNeg(Math.trunc(15000*$upgradeMultiplierArcology)), "capEx")>> - <<set $SecExp.buildings.transportHub.security++>> - <</link>> //Will cost <<print cashFormat(Math.trunc(15000*$upgradeMultiplierArcology))>> and lower the transport hub security modifiers// -<<elseif $SecExp.buildings.transportHub.security == 2>> - <br> <<link "Establish a rapid response team" "transportHub">> - <<run cashX(forceNeg(Math.trunc(35000*$upgradeMultiplierArcology)), "capEx")>> - <<set $SecExp.buildings.transportHub.security++>> - <</link>> //Will cost <<print cashFormat(Math.trunc(35000*$upgradeMultiplierArcology))>> and further lower the transport hub security modifiers// -<<elseif $SecExp.buildings.transportHub.security == 3>> - <br> <<link "Add additional security drones to the structure" "transportHub">> - <<run cashX(forceNeg(Math.trunc(55000*$upgradeMultiplierArcology)), "capEx")>> - <<set $SecExp.buildings.transportHub.security++>> - <</link>> //Will cost <<print cashFormat(Math.trunc(55000*$upgradeMultiplierArcology))>> and further lower the transport hub security modifiers// -<<else>> - <br>The hub security is fully upgraded -<</if>> -<br><br>[[Return this sector to standard markets|Main][delete $SecExp.buildings.transportHub, cashX(forceNeg(Math.trunc(10000*$upgradeMultiplierArcology)), "capEx"), App.Arcology.cellUpgrade($building, App.Arcology.Cell.Market, "Transport Hub", "Markets")]] //Costs <<print cashFormat(Math.trunc(10000*$upgradeMultiplierArcology))>>// \ No newline at end of file diff --git a/src/arcologyBuilding/markets.js b/src/arcologyBuilding/markets.js index a42238708b7fd1370f4695466de288b74936910a..34fc2eb9c2de1fedcfded6e0551b52bba11deaeb 100644 --- a/src/arcologyBuilding/markets.js +++ b/src/arcologyBuilding/markets.js @@ -24,7 +24,7 @@ App.Arcology.Cell.Market = class extends App.Arcology.Cell.BaseCell { case "Pit": return "pit"; case "Transport Hub": - return "transportHub"; + return "transport-hub"; case "Corporate Market": return "corporateMarket"; default: @@ -57,7 +57,7 @@ App.Arcology.Cell.Market = class extends App.Arcology.Cell.BaseCell { case "Markets": return App.Arcology.getCellLinkFromPath(path, "Markets"); case "Transport Hub": - return App.UI.DOM.passageLink("Transport Hub", "transportHub"); + return App.UI.DOM.passageLink("Transport Hub", "Transport Hub"); case "Corporate Market": return App.UI.DOM.passageLink( "Corporate Market", @@ -117,7 +117,7 @@ App.Arcology.Cell.Market = class extends App.Arcology.Cell.BaseCell { () => { this.type = "Transport Hub"; App.SecExp.transportHub.Init(); - }, cost, "transportHub" + }, cost, "Transport Hub" )); } diff --git a/src/endWeek/economics/arcmgmt.js b/src/endWeek/economics/arcmgmt.js index f082b52fe23a20804391a4cd2fa08524fcedab91..31b1472fe3c30294b5c37e21ac36a9ad464c4375 100644 --- a/src/endWeek/economics/arcmgmt.js +++ b/src/endWeek/economics/arcmgmt.js @@ -1,6 +1,6 @@ App.EndWeek.arcManagement = function() { const el = new DocumentFragment(); - const secExpImigrationBonus = App.SecExp.propagandaEffects("immigration"); + const secExpImmigrationBonus = App.SecExp.propagandaEffects("immigration"); let r; let _enslaved; let _crime; @@ -1629,7 +1629,7 @@ App.EndWeek.arcManagement = function() { } r = []; if (V.lowerClass < _LCD) { - let _LCImmigration = Math.trunc((_LCD - V.lowerClass) * (0.3 * _terrain)) + 1 + secExpImigrationBonus.effect; + let _LCImmigration = Math.trunc((_LCD - V.lowerClass) * (0.3 * _terrain)) + 1 + secExpImmigrationBonus.effect; if (V.arcologies[0].FSIntellectualDependencyLaw === 1) { /* Enslaving the dumb lower class immigrants*/ const _intellectualDependencyEnslaved = Math.trunc(_LCImmigration * 0.25); _LCImmigration -= _intellectualDependencyEnslaved; @@ -1694,7 +1694,7 @@ App.EndWeek.arcManagement = function() { appendDiv(`Your middle class is <span class="green">sexually satiated</span> and their happiness attracts others.`); } if (V.middleClass < _MCD) { - const _MCImmigration = Math.trunc((_MCD - V.middleClass) * (0.3 * _terrain)) + 1 + secExpImigrationBonus.effect; + const _MCImmigration = Math.trunc((_MCD - V.middleClass) * (0.3 * _terrain)) + 1 + secExpImmigrationBonus.effect; V.middleClass += _MCImmigration; if (_MCImmigration > 1) { appendDiv(`<span class="green">${num(_MCImmigration)} middle class citizens</span> moved to your arcology.`); @@ -1732,7 +1732,7 @@ App.EndWeek.arcManagement = function() { appendDiv(`Your upper class is <span class="green">sexually satiated</span> and their happiness attracts others.`); } if (V.upperClass < _UCD) { - const _UCImmigration = Math.trunc((_UCD - V.upperClass) * (0.3 * _terrain)) + 1 + secExpImigrationBonus.effect; + const _UCImmigration = Math.trunc((_UCD - V.upperClass) * (0.3 * _terrain)) + 1 + secExpImmigrationBonus.effect; V.upperClass += _UCImmigration; if (_UCImmigration > 1) { appendDiv(`<span class="green">${num(_UCImmigration)} upper class citizens</span> moved to your arcology.`); @@ -1776,7 +1776,7 @@ App.EndWeek.arcManagement = function() { appendDiv(`Your millionaires are <span class="green">sexually satiated</span> and their happiness attracts others.`); } if (V.topClass < _TCD) { - const _TCImmigration = Math.trunc((_TCD - V.topClass) * (0.3 * _terrain)) + 1 + secExpImigrationBonus.effect; + const _TCImmigration = Math.trunc((_TCD - V.topClass) * (0.3 * _terrain)) + 1 + secExpImmigrationBonus.effect; V.topClass += _TCImmigration; if (_TCImmigration > 1) { appendDiv(`<span class="green">${num(_TCImmigration)} millionaires</span> moved to your arcology.`); /* Fat Cat? One-Percenter? */ @@ -1794,7 +1794,7 @@ App.EndWeek.arcManagement = function() { } } } - appendDiv(secExpImigrationBonus.text); + appendDiv(secExpImmigrationBonus.text); } function slaveRetirement() {