diff --git a/devNotes/Useful JS Function Documentation.txt b/devNotes/Useful JS Function Documentation.txt index 0bf3273d18366301b75c1efb80e23d3eda189649..8faea827966d6336569f053c48597e22f77b4bce 100644 --- a/devNotes/Useful JS Function Documentation.txt +++ b/devNotes/Useful JS Function Documentation.txt @@ -132,7 +132,7 @@ tooBigButt(slave) - Returns if the slave's butt is too big for her to move. milkAmount(slave) - Returns the slave's expected milk output in liters. -foodAmount(slave) - Returns the slave's expected food output in kilograms. +App.Facilities.Farmyard.foodAmount(slave) - Returns the slave's expected food output in kilograms. cumAmount(slave) - Returns the slave's expected cum output in deciliters. diff --git a/src/endWeek/saWorkTheFarm.js b/src/endWeek/saWorkTheFarm.js index d2a362218139ad1a8c38899ef300fffa0892095b..af527a4183a69c4b6267f9c1735e96e9aabd7bba 100644 --- a/src/endWeek/saWorkTheFarm.js +++ b/src/endWeek/saWorkTheFarm.js @@ -38,7 +38,7 @@ window.saWorkTheFarm = function saWorkTheFarm(slave) { // Open Food Production - let food = Math.trunc(foodAmount(slave)); + let food = Math.trunc(App.Facilities.Farmyard.foodAmount(slave)); if (food < 1) { food = 1; } @@ -116,7 +116,7 @@ window.saWorkTheFarm = function saWorkTheFarm(slave) { // Open Shows - incomeStats.income += farmShowsIncome(slave); + incomeStats.income += App.Facilities.Farmyard.farmShowsIncome(slave); if (V.farmyardShows) { t += `${He} also puts on shows with animals this week. `; diff --git a/src/js/food.js b/src/js/food.js index dac7767f6c72fc922f13de88dd20cd4fd4c50b4e..34040d208fe8ade5b579c3c51c4bdeda4fcbc356 100644 --- a/src/js/food.js +++ b/src/js/food.js @@ -2,7 +2,7 @@ * @param {App.Entity.SlaveState} slave * @returns {number} */ -window.foodAmount = function(slave) { +App.Facilities.Farmyard.foodAmount = function(slave) { let food = 400; // kg / food produced by base slave / week if (!slave) { return null; @@ -53,7 +53,7 @@ window.foodAmount = function(slave) { * @param {App.Entity.SlaveState} slave * @returns {number} */ -window.farmShowsIncome = function(slave) { +App.Facilities.Farmyard.farmShowsIncome = function(slave) { // TODO: incorporate farmyardRestraints let arcology = V.arcologies[0]; let cash = 100; // TODO: this is just a placeholder