Skip to content
Snippets Groups Projects
Commit e424df97 authored by brickode's avatar brickode
Browse files

Moved food functions out of global scope

parent 5620ebeb
No related branches found
No related tags found
No related merge requests found
......@@ -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.
......
......@@ -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. `;
......
......@@ -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
......
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