diff --git a/css/facilities/farmyard.css b/css/facilities/farmyard.css index 9db4266282fc4af9fc1f3adccc204c105295d698..eddd66d9a37b03f05deb26a80c90f2e6b3a3431b 100644 --- a/css/facilities/farmyard.css +++ b/css/facilities/farmyard.css @@ -8,6 +8,7 @@ .farmyard-rules, .farmyard-upgrades, .farmyard-animals, +.farmyard-remove, .farmyard-slaves, .farmyard-heading { margin-top: 1em; diff --git a/src/facilities/farmyard/farmyard.js b/src/facilities/farmyard/farmyard.js index 0af2610d0d0eb64b57d4b52fa53e6e4e6087f6b0..365e0990623ebc8e40a9a8a57abfe8e4b0a8ff6b 100644 --- a/src/facilities/farmyard/farmyard.js +++ b/src/facilities/farmyard/farmyard.js @@ -603,6 +603,8 @@ App.Facilities.Farmyard.farmyard = function() { } function animals() { + animalsDiv.classList.add("farmyard-animals"); + animalsDiv.append(kennels(), stables(), cages()); if (V.farmyardKennels || V.farmyardStables || V.farmyardCages) { @@ -641,15 +643,18 @@ App.Facilities.Farmyard.farmyard = function() { kennelsDiv.append(App.UI.DOM.passageLink("Kennels", "Farmyard Animals"), ` have been built in one corner of ${V.farmyardName}, and are currently ${CL < 1 ? `empty` : `occupied by ${dogs}`}.`); if (V.rep > 10000) { - App.UI.DOM.appendNewElement("div", kennelsDiv, App.UI.DOM.passageLink("Upgrade kennels", - "Farmyard", () => { - cashX(forceNeg(upgradedCost), "farmyard"); - V.farmyardKennels = 2; - }, - `Costs ${cashFormat(upgradedCost)} will incur additional upkeep costs, and unlocks exotic canines`), + App.UI.DOM.appendNewElement("div", kennelsDiv, App.UI.DOM.link("Upgrade kennels", () => { + cashX(forceNeg(upgradedCost), "farmyard"); + V.farmyardKennels = 2; + }, + null, + 'Farmyard', + `Costs ${cashFormat(upgradedCost)} will incur additional upkeep costs, and unlocks exotic canines`), ['indent']); } else { - App.UI.DOM.appendNewElement("div", kennelsDiv, `You must be more reputable to be able to house exotic canines`, ['note']); + App.UI.DOM.appendNewElement("div", stablesDiv, App.UI.DOM.disabledLink("Upgrade kennels", + [`You must be more reputable to be able to house exotic canines.`]), + ['indent']); } } else if (V.farmyardKennels === 2) { kennelsDiv.append(App.UI.DOM.passageLink("Large kennels", "Farmyard Animals"), ` have been built in one corner of ${V.farmyardName}, and are currently ${CL < 1 ? `empty` : `occupied by ${canines}`}.`); @@ -675,8 +680,7 @@ App.Facilities.Farmyard.farmyard = function() { }, null, 'Farmyard', - `Costs ${cashFormat(baseCost)}, will incur upkeep costs, and unlocks domestic hooved animals`), - ['indent']); + `Costs ${cashFormat(baseCost)}, will incur upkeep costs, and unlocks domestic hooved animals`)); } else if (V.farmyardStables === 1) { stablesDiv.append(App.UI.DOM.passageLink("Stables", "Farmyard Animals"), ` have been built in one corner of ${V.farmyardName}, and are currently ${HL < 1 ? `empty` : `occupied by ${hooved}`}.`); @@ -689,9 +693,12 @@ App.Facilities.Farmyard.farmyard = function() { }, null, 'Farmyard', - `Costs ${cashFormat(upgradedCost)}, will incur additional upkeep costs, and unlocks exotic hooved animals`)); + `Costs ${cashFormat(upgradedCost)}, will incur additional upkeep costs, and unlocks exotic hooved animals`), + ['indent']); } else { - App.UI.DOM.appendNewElement("div", stablesDiv, `You must be more reputable to be able to house exotic hooved animals`, ['note']); + App.UI.DOM.appendNewElement("div", stablesDiv, App.UI.DOM.disabledLink("Upgrade stables", + [`You must be more reputable to be able to house exotic hooved animals.`]), + ['indent']); } } else if (V.farmyardStables === 2) { stablesDiv.append(App.UI.DOM.passageLink("Large stables", "Farmyard Animals"), ` have been built in one corner of ${V.farmyardName}, and are currently ${HL < 1 ? `empty` : `occupied by ${hooved}`}.`); @@ -739,7 +746,9 @@ App.Facilities.Farmyard.farmyard = function() { `Costs ${cashFormat(upgradedCost)}, will increase upkeep costs, and unlocks exotic felines`), ['indent']); } else { - App.UI.DOM.appendNewElement("div", cagesDiv, `You must be more reputable to be able to house exotic felines`, ['note']); + App.UI.DOM.appendNewElement("div", cagesDiv, App.UI.DOM.disabledLink("Upgrade cages", + [`You must be more reputable to be able to house exotic felines.`]), + ['indent']); } } else if (V.farmyardCages === 2) { cagesDiv.append(App.UI.DOM.passageLink("Large cages", "Farmyard Animals"), ` have been built in one corner of ${V.farmyardName}, and are currently ${FL < 1 ? `empty` : `occupied by ${felines}`}.`); @@ -749,9 +758,9 @@ App.Facilities.Farmyard.farmyard = function() { } function removeHousing() { - const removeHousingPrice = ((V.farmyardKennels + V.farmyardStables + V.farmyardCages) * 5000) * V.upgradeMultiplierArcology; + removeHousingDiv.classList.add("farmyard-remove"); - removeHousingDiv.append(document.createElement("br")); + const removeHousingPrice = ((V.farmyardKennels + V.farmyardStables + V.farmyardCages) * 5000) * V.upgradeMultiplierArcology; App.UI.DOM.appendNewElement("div", removeHousingDiv, App.UI.DOM.link("Remove the animal housing", () => { V.farmyardKennels = 0; @@ -769,8 +778,7 @@ App.Facilities.Farmyard.farmyard = function() { }, null, 'Farmyard', - `Will cost ${cashFormat(removeHousingPrice)}`), - ['indent']); + `Will cost ${cashFormat(removeHousingPrice)}`)); return removeHousingDiv; }