Skip to content
Snippets Groups Projects
Commit 74496562 authored by Blank_Alt's avatar Blank_Alt Committed by Pregmodder
Browse files

Sec exp hotfix+art tools mode revert

parent 7d61eec1
No related branches found
No related tags found
No related merge requests found
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
......@@ -232,9 +232,8 @@ window.calculateCosts = (function() {
// security expansion
function getSecurityExpansionCost() {
const V = State.variables;
let secExpCost = 0;
let soldierMod = 0;
if (V.secExpEnabled === 1) {
let secExpCost = 0, soldierMod = 0;
if (V.secExpEnabled > 0) {
secExpCost += App.SecExp.upkeep('edictsCash');
secExpCost += App.SecExp.upkeep('SF');
secExpCost += App.SecExp.upkeep('buildings');
......@@ -457,8 +456,8 @@ window.calculateCosts = (function() {
return cost;
}
function getEnvironmentCosts(cost) {
if (State.variables.secExpEnabled === 1) {
function getEnvironmentCosts(cost = 0) {
if (State.variables.secExpEnabled > 0) {
if (State.variables.terrain === 'oceanic' || State.variables.terrain === 'marine') {
if (State.variables.docks > 0) {
cost *= (1 - State.variables.docks * 0.05);
......
......@@ -127,7 +127,7 @@ for (var i = 0; i < State.variables.lastWeeksRepIncome.length; i++){
</tr>
<<print budgetLine("policies", "Capital expenses")>>
<<print budgetLine("edicts", "<<if $secExpEnabled>>[[Edicts|edicts]]<<else>>Edicts<</if>>")>>
<<print budgetLine("edicts", "<<if $secExpEnabled > 0>>[[Edicts|edicts]]<<else>>Edicts<</if>>")>>
<<print budgetLine("capEx", "[[Policies|Policies][$nextButton = \"Back to Budget\", $nextLink = \"Rep Budget\"]] and [[Edicts|edicts][$nextButton = \"Back to Budget\", $nextLink = \"Rep Budget\"]]")>>
......@@ -142,6 +142,8 @@ for (var i = 0; i < State.variables.lastWeeksRepIncome.length; i++){
<<print budgetLine("specialForces", "Special forces")>>
<<print budgetLine("securityExpansion", "securityExpansion")>>
<<print budgetLine("peacekeepers", "Peacekeepers")>>
<<print budgetLine("war", "Conflict")>>
......
......@@ -2,65 +2,61 @@
<<set _Pass = passage()>>
<<widget "userButton">>
/*Don't remove these spans, it will break things.*/
<<if _Pass !== "End Week">>
<<if _Pass !== "Encyclopedia">> <br><br> <</if>>
<<if _Pass === "Main" && $nextButton === "END WEEK">>
<span id="endWeekButton"> <strong>
<<link [[END WEEK|End Week]]>><</link>>
</strong> </span> @@.cyan;[Ent]@@
/* Must use link so spacebar shortcut will work. */
/* Don't remove these spans, it will break things. */
<<if _Pass != "End Week">>
<<if _Pass == "Main">>
<strong> <span id="endWeekButton"> <br><br>
<<link "$nextButton">> <<goto $nextLink>> <</link>> @@.cyan;[Ent]@@
</span> </strong>
<<if $rulesError && $rulesAssistantAuto == 1>>
<br>@@.yellow; WARNING: some custom rules will change slave variables@@
<br>@@.yellow;WARNING: some custom rules will change slave variables@@
<</if>>
<<else>>
<span id="nextButton">
<<if $nextButton !== " ">>
<strong>
<<if _Pass !== "Encyclopedia">> /* must use link so spacebar shortcut will work */
<<link "$nextButton">> <<goto $nextLink>> <</link>>
<<else>>
<<link [[Back to Free Cities|$nextLink]]>><</link>>
<</if>>
</strong> @@.cyan;[Space]@@
<strong> <span id="nextButton"> <<if $nextButton != " ">> <br><br>
<<link "$nextButton">> <<goto $nextLink>> <</link>> @@.cyan;[Space]@@
<</if>>
</span>
<</if>>
<br>
<</if>>
</span> </strong> <</if>>
<</if>> <br>
<</widget>>
<<widget "security">> <br>
<<if $SF.Toggle && $SF.Active >= 1 && _Pass !== "Firebase">>
<<widget "security">>
<<if ($SF.Toggle && $SF.Active >= 1) || $secExpEnabled > 0 && ($SecExp.buildings.propHub.active + $secHQ + $SecExp.buildings.barracks.active + $riotCenter) > 1>>
<br>
<</if>>
<<if $SF.Toggle && $SF.Active >= 1 && _Pass != "Firebase">>
<span id="SFMButton"> <br>
<<link "$SF.Caps's firebase""Firebase">><</link>>
</span> @@.cyan;[Z]@@
<</if>>
<<if $SecExp.buildings.propHub.active > 0 && _Pass !== "propagandaHub">>
<span id="propHub"> <br>
<<link [[Manage PR|propagandaHub]]>><</link>>
</span> @@.cyan;[Shift+H]@@
<</if>>
<<if $secHQ > 0 && _Pass !== "securityHQ">>
<span id="securityHQ"> <br>
<<link [[Manage Security|securityHQ]]>><</link>>
</span> @@.cyan;[Shift+S]@@
<</if>>
<<if $secExpEnabled > 0>>
<<if $SecExp.buildings.propHub.active > 0 && _Pass != "propagandaHub">>
<span id="propHub"> <br>
<<link [[Manage PR|propagandaHub]]>><</link>>
</span> @@.cyan;[Shift+H]@@
<</if>>
<<if $secHQ > 0 && _Pass != "securityHQ">>
<span id="securityHQ"> <br>
<<link [[Manage Security|securityHQ]]>><</link>>
</span> @@.cyan;[Shift+S]@@
<</if>>
<<if $SecExp.buildings.barracks.active > 0 && _Pass !== "secBarracks">>
<span id="secBarracks"> <br>
<<link [[Manage Military|secBarracks]]>><</link>>
</span> @@.cyan;[Shift+A]@@
<</if>>
<<if $riotCenter > 0 && _Pass !== "riotControlCenter">>
<span id="riotCenter"> <br>
<<link [[Manage Rebels|riotControlCenter]]>><</link>>
</span> @@.cyan;[Shift+R]@@
<<if $SecExp.buildings.barracks.active > 0 && _Pass != "secBarracks">>
<span id="secBarracks"> <br>
<<link [[Manage Military|secBarracks]]>><</link>>
</span> @@.cyan;[Shift+A]@@
<</if>>
<<if $riotCenter > 0 && _Pass != "riotControlCenter">>
<span id="riotCenter"> <br>
<<link [[Manage Rebels|riotControlCenter]]>><</link>>
</span> @@.cyan;[Shift+R]@@
<</if>>
<</if>>
<</widget>>
<<if $ui != "start" || _Pass === "Encyclopedia">>
<<if _Pass !== "Encyclopedia">>
<<if _Pass != "Encyclopedia">>
<<if $cheatMode || $debugMode>> _Pass<br> <</if>>
<span id="week">''Week $week''</span>
<<if $week > 52>> (<<= years($week)>>) <</if>>
......@@ -75,17 +71,14 @@
<</link>>
<</if>>
<br>
<<if $weatherToday.severity == 1>>
//@@.cyan;$weatherToday.name@@//
<<elseif $weatherToday.severity == 2>>
//@@.yellow;$weatherToday.name@@//
<<elseif $weatherToday.severity == 3>>
//@@.orange;$weatherToday.name@@//
<<else>>
//@@.red;$weatherToday.name@@//
<<if $weatherToday.severity == 1>> //@@.cyan;
<<elseif $weatherToday.severity == 2>> //@@.yellow;
<<elseif $weatherToday.severity == 3>> //@@.orange;
<<else>> //@@.red;
<</if>>
$weatherToday.name@@//
<</if>>
<<userButton>>
<<if _Pass != "End Week">> <<userButton>> <</if>>
<</if>>
<<if _Pass == "Encyclopedia">> <br>
......@@ -113,7 +106,7 @@
<span id="cost"><<SlaveCostDescription>></span> <br><br>
<</if>>
<<if $ui != "start" && _Pass !== "Encyclopedia">> <br>
<<if $ui != "start" && _Pass != "Encyclopedia">>
<<if $sideBarOptions.Cash > 0>>
<<set $cash = Math.trunc($cash)>>
<span id="cash">
......@@ -171,9 +164,7 @@
<<else>>
@@.red;Food@@
<</if>>
<<if $food < 0>>
<<set $food = 0>>
<</if>>
<<if $food < 0>> <<set $food = 0>> <</if>>
| <<print massFormat($food)>>
</span>
......@@ -181,10 +172,11 @@
<<set _TFood2 = ($food-$foodLastWeek)>>
<span id="oldfood">
<<if _TFood2 < 0>>
(@@.red;<<print massFormat(_TFood2)>>@@
(@@.red;
<<else>>
(@@.chocolate;+<<print massFormat(_TFood2)>>@@
(@@.chocolate;+
<</if>>
<<print massFormat(_TFood2)>>@@)
</span>
since last week)
<<if ($cheatMode) && ($cheatModeM)>>
......@@ -247,8 +239,8 @@
<br>@@.pink;Luxury Rooms@@ | <<if $roomsPopulation > $rooms>>@@.red;<<print $roomsPopulation>>@@<<else>><<print $roomsPopulation>><</if>>/<<print $rooms>>
<</if>>
<<if _Pass !== "Manage Penthouse">>
<<if $sideBarOptions.GSP > 0 && _Pass !== "Neighbor Interact">> <br>
<<if _Pass != "Manage Penthouse">>
<<if $sideBarOptions.GSP > 0 && _Pass != "Neighbor Interact">> <br>
@@.yellowgreen;GSP@@ |
<<print Math.trunc(0.1*$arcologies[0].prosperity)>>m
<<if $arcologies[0].ownership >= $arcologies[0].minority>>
......@@ -382,7 +374,7 @@
<</if>>
<</if>>
<<if $secExpEnabled == 1 && ( $sideBarOptions.Authority > 0 || $sideBarOptions.Security > 0 || $sideBarOptions.Crime > 0)>>
<<if $secExpEnabled > 0 && ($sideBarOptions.Authority + $sideBarOptions.Security + $sideBarOptions.Crime > 0)>>
<<if $sideBarOptions.Authority > 0>> <br>
@@.darkviolet;Auth@@ |
<<set $SecExp.core.authority = Math.clamp(Math.trunc($SecExp.core.authority), 0, 20000)>>
......@@ -521,26 +513,26 @@
<</if>>
<</if>> /* Closes secExp check and associated sideBarOptions options */
<</if>> /* Closes Pass !== "Manage Penthouse""*/
<</if>> /* Closes Pass != "Manage Penthouse""*/
<<if $nextButton !== "Continue" && $nextButton !== " ">> <br>
<<if _Pass !== "Manage Penthouse">> <br>
<<if $nextButton != "Continue" && $nextButton != " ">> <br>
<<if _Pass != "Manage Penthouse">> <br>
<span id="managePenthouse">
<<link [[Manage Penthouse]]>><</link>>
</span> @@.cyan;[P]@@
<</if>>
<<if _Pass !== "Manage Arcology">> <br>
<<if _Pass != "Manage Arcology">> <br>
<span id="manageArcology">
<<link [[Manage Arcology]]>><</link>>
</span> @@.cyan;[C]@@
<</if>>
<<if _Pass !== "Manage Personal Affairs">>
<<if _Pass != "Manage Personal Affairs">>
<span id="managePerson"> <br>
<<link [[Manage Personal Affairs]]>><</link>>
</span> @@.cyan;[X]@@
<</if>>
<<if $corpAnnounced == 1 && _Pass !== "Manage Corporation">>
<<if $corpAnnounced == 1 && _Pass != "Manage Corporation">>
<span id="manageCorporation"> <br>
<<link [[Manage Corporation][$nextButton = "Back", $nextLink = _Pass]]>><</link>>
</span>
......@@ -705,7 +697,7 @@
<<link [[Policies]]>><</link>>
</span> @@.cyan;[Y]@@
<<if $secExpEnabled == 1>>
<<if $secExpEnabled > 0>>
<span id="edictButton"> <br>
<<link [[Edicts|edicts]]>><</link>>
</span> @@.cyan;[D]@@
......@@ -715,7 +707,7 @@
<</if>>
<span id="Security">
<<if $secExpEnabled > 0 && ($SecExp.buildings.propHub.active > 0 || $secHQ > 0 || $SecExp.buildings.barracks.active > 0 || $riotCenter > 0) || $SF.Toggle && $SF.Active >= 1>> <br>
<<if ($secExpEnabled > 0 && ($SecExp.buildings.propHub.active + $secHQ + $SecExp.buildings.barracks.active + $riotCenter > 0)) || $SF.Toggle && $SF.Active >= 1>> <br>
<<link "Manage Security">> <<replace "#Security">>
<<security>>
<</replace>> <</link>>
......@@ -745,11 +737,11 @@
<</if>>
<<elseif ["Dispensary", "Organ Farm", "Implant Manufactory", "Gene Lab", "Prosthetic Lab"].includes(_Pass)>>
<<if $dispensary && _Pass !== "Dispensary">> <br>[[Pharmaceutical Fabricator|Dispensary]]<</if>>
<<if $organFarmUpgrade && _Pass !== "Organ Farm">> <br>[[Organ Farm]]<</if>>
<<if $ImplantProductionUpgrade && _Pass !== "Implant Manufactory">> <br>[[Implant Manufactory]]<</if>>
<<if $geneticMappingUpgrade && _Pass !== "Gene Lab">> <br>[[Gene Lab]]<</if>>
<<if $prostheticsUpgrade && _Pass !== "Prosthetic Lab">> <br>[[Prosthetic Lab]]<</if>>
<<if $dispensary && _Pass != "Dispensary">> <br>[[Pharmaceutical Fabricator|Dispensary]]<</if>>
<<if $organFarmUpgrade && _Pass != "Organ Farm">> <br>[[Organ Farm]]<</if>>
<<if $ImplantProductionUpgrade && _Pass != "Implant Manufactory">> <br>[[Implant Manufactory]]<</if>>
<<if $geneticMappingUpgrade && _Pass != "Gene Lab">> <br>[[Gene Lab]]<</if>>
<<if $prostheticsUpgrade && _Pass != "Prosthetic Lab">> <br>[[Prosthetic Lab]]<</if>>
<<elseif _Pass == "Rules Assistant">> <br>
[[Rules Assistant Summary]]
......@@ -768,20 +760,20 @@
<<link [[Game Options|Options][$nextButton = "Back", $nextLink = _Pass]]>><</link>>
</span> @@.cyan;[O]@@
<<else>>
<<if _Pass !== "Summary Options">> [[Summary Options]] <</if>>
<<if _Pass != "Summary Options">> [[Summary Options]] <</if>>
<<if _Pass === "Options">> <br> <</if>>
<<if _Pass !== "Description Options">> [[Description Options]] <</if>>
<<if _Pass != "Description Options">> [[Description Options]] <</if>>
<</if>>
<</if>> /* Closes nextButton !== "Continue" && nextButton !== " " */
<</if>> /* Closes nextButton != "Continue" && nextButton != " " */
<</if>>
<<if _Pass !== "Encyclopedia" && $showEncyclopedia > 0 && $nextButton !== "Continue">>
<<if _Pass != "Encyclopedia" && $showEncyclopedia > 0 && $nextButton != "Continue">>
<<if $nextButton === " ">> <br> <</if>> <<if $ui != "start">> <br> <</if>>
//''FCE'':// [[$encyclopedia|Encyclopedia][$nextButton = "Back", $nextLink = _Pass]]
<</if>>
<<if $ui != "start" && _Pass !== "Encyclopedia" && $debugMode > 0>>
<<if $ui != "start" && _Pass != "Encyclopedia" && $debugMode > 0>>
<br><br>Debugging Tools<br> <<link "Display Variables">><<checkvars>><</link>>
<br> <<link "Display Changed Variables">>
<<set Config.history.maxStates = 2>> /* makes sure we store the current state so we can return to it */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment