diff --git a/src/facilities/farmyard/farmyard.js b/src/facilities/farmyard/farmyard.js index 24ee2a42f93932e522a8ddb785c41e5251ac4961..c631db4d5bff5634d6ad014ae850fc113011ded2 100644 --- a/src/facilities/farmyard/farmyard.js +++ b/src/facilities/farmyard/farmyard.js @@ -212,7 +212,8 @@ App.Facilities.Farmyard.farmyard = function() { note = document.createElement("span"), cost = document.createElement("span"), - upgradeCost = Math.trunc(V.farmyard * 1000 * V.upgradeMultiplierArcology); + upgradeCost = Math.trunc(V.farmyard * 1000 * V.upgradeMultiplierArcology), + farmhands = App.Entity.facilities.farmyard.totalEmployeesCount; link.classList.add("indent"); note.classList.add("note"); @@ -220,7 +221,7 @@ App.Facilities.Farmyard.farmyard = function() { cost.append(cashFormat(upgradeCost)); - desc.append(`It can support ${V.farmyard} farmhands. Currently there ${V.farmyard === 1 ? `is` : `are`} ${V.farmyard} ${V.farmyard === 1 ? `farmhand` : `farmhands`} in ${V.farmyardName}. `); + desc.append(`It can support ${V.farmyard} farmhands. Currently there ${farmhands === 1 ? `is` : `are`} ${farmhands} ${farmhands === 1 ? `farmhand` : `farmhands`} in ${V.farmyardName}. `); note.append(` Costs `, cost, ` and will increase upkeep costs`); link.append(App.UI.DOM.passageLink(`Expand ${V.farmyardName}`, "Farmyard", () => { @@ -254,7 +255,9 @@ App.Facilities.Farmyard.farmyard = function() { removeLink.append(warning); } - frag.append(removeLink); + if (App.Entity.facilities.farmyard.totalEmployeesCount) { + frag.append(removeLink); + } } return frag;