Преглед на файлове

Change base production values to be percentages.

Old saves will have their base production values cleared.
tags/v1.1.0
Fen Dweller преди 5 години
родител
ревизия
75b0c71faf
променени са 3 файла, в които са добавени 47 реда и са изтрити 26 реда
  1. +18
    -18
      features.js
  2. +8
    -7
      game.js
  3. +21
    -1
      migrations.js

+ 18
- 18
features.js Целия файл

@@ -1192,9 +1192,9 @@ options = [
"name": "Passive cum production",
"id": "baseCumProduction",
"type": "float",
"default": "0.01",
"unit": "volume",
"tooltip": "The fraction of your maximum capacity produced every second"
"default": "1",
"unit": "percentage",
"tooltip": "How much you fill up every second"
},
{
"name": "Cum storage factor",
@@ -1357,9 +1357,9 @@ options = [
"name": "Passive femcum production",
"id": "baseFemcumProduction",
"type": "float",
"default": "0.01",
"unit": "volume",
"tooltip": "The fraction of your maximum capacity produced every second"
"default": "1",
"unit": "percentage",
"tooltip": "How much you fill up every second"
},
{
"name": "Femcum storage factor",
@@ -1486,9 +1486,9 @@ options = [
"name": "Passive milk production",
"id": "baseLactationProduction",
"type": "float",
"default": "0.001",
"unit": "volume",
"tooltip": "The fraction of your maximum capacity produced every second"
"default": "0.1",
"unit": "percentage",
"tooltip": "How much you fill up every second"
},
{
"name": "Milk storage scale",
@@ -1618,9 +1618,9 @@ options = [
"name": "Passive gas production",
"id": "baseGasProduction",
"type": "float",
"default": "0.01",
"unit": "volume",
"tooltip": "The fraction of your maximum capacity produced every second"
"default": "1",
"unit": "percentage",
"tooltip": "How much you fill up every second"
},
{
"name": "Gas storage scale",
@@ -1716,9 +1716,9 @@ options = [
"name": "Passive piss production",
"id": "basePissProduction",
"type": "float",
"default": "0.01",
"unit": "volume",
"tooltip": "The fraction of your maximum capacity produced every second"
"default": "1",
"unit": "percentage",
"tooltip": "How much you fill up every second"
},
{
"name": "Piss storage scale",
@@ -1809,9 +1809,9 @@ options = [
"name": "Passive scat production",
"id": "baseScatProduction",
"type": "float",
"default": "0.001",
"unit": "volume",
"tooltip": "The fraction of your maximum capacity produced every second"
"default": "0.1",
"unit": "percentage",
"tooltip": "How much you fill up every second"
},
{
"name": "Scat storage scale",


+ 8
- 7
game.js Целия файл

@@ -1336,7 +1336,7 @@ let macro = //macro controls every customizable part of the players body
},

"fillCum": function(self) {
self.cumStorage.amount += self.scaling(self.baseCumProduction / 10 / 1000, self.scale * self.ballScale, 3);
self.cumStorage.amount += self.cumStorage.limit * self.baseCumProduction / 10 / 100;
if (self.cumStorage.amount > self.cumStorage.limit)
self.arouse(1 * (self.cumStorage.amount / self.cumStorage.limit - 1));
setTimeout(function () { self.fillCum(self); }, 100);
@@ -1344,7 +1344,7 @@ let macro = //macro controls every customizable part of the players body
},

"fillFemcum": function(self) {
self.femcumStorage.amount += self.scaling(self.baseFemcumProduction / 10 / 1000, self.scale * self.wombScale, 3);
self.femcumStorage.amount += self.femcumStorage.limit * self.baseFemcumProduction / 10 / 100;
if (self.femcumStorage.amount > self.femcumStorage.limit)
self.arouse(1 * (self.femcumStorage.amount / self.femcumStorage.limit - 1));
setTimeout(function () { self.fillFemcum(self); }, 100);
@@ -1352,7 +1352,7 @@ let macro = //macro controls every customizable part of the players body
},

"fillBreasts": function(self) {
self.milkStorage.amount += self.scaling(self.baseLactationProduction / 10 / 1000, self.scale * self.breastScale, 3);
self.milkStorage.amount += self.milkStorage.limit * self.baseLactationProduction / 10 / 100;

if (self.milkStorage.amount > self.milkStorage.limit) {
breast_milk(self.milkStorage.amount - self.milkStorage.limit/2);
@@ -1366,7 +1366,7 @@ let macro = //macro controls every customizable part of the players body
},

"fillGas": function(self) {
self.gasStorage.amount += self.scaling(self.baseGasProduction / 10 / 1000, self.scale, 3);
self.gasStorage.amount += self.gasStorage.limit * self.baseGasProduction / 10 / 100;

let ratio = self.gasStorage.amount / self.gasStorage.limit;

@@ -1399,7 +1399,7 @@ let macro = //macro controls every customizable part of the players body
},

"fillPiss": function(self) {
self.pissStorage.amount += self.scaling(self.basePissProduction / 10 / 1000, self.scale, 3);
self.pissStorage.amount += self.pissStorage.limit * self.basePissProduction / 10 / 100;

if (self.pissStorage.amount > self.pissStorage.limit * 2)
piss(self.pissStorage.amount, false);
@@ -1408,7 +1408,7 @@ let macro = //macro controls every customizable part of the players body
},

"fillScat": function(self) {
self.scatStorage.amount += self.scaling(self.baseScatProduction / 10 / 1000, self.scale, 3);
self.scatStorage.amount += self.scatStorage.limit * self.baseScatProduction / 10 / 100;

if (self.scatStorage.amount > self.scatStorage.limit * 2)
scat(self.scatStorage.amount, false);
@@ -5355,7 +5355,8 @@ function updatePreview(name) {
result = volume(value * scale * scale * scale / 1000, unit);
else if (unitType == "mass")
result = mass(value * scale * scale * scale, unit);

else if (unitType == "percentage")
result = value + "%";
document.getElementById(name + "Preview").innerHTML = result;
}



+ 21
- 1
migrations.js Целия файл

@@ -6,6 +6,7 @@ migrations = [
// does nothing
save => {
},

// 1 -> 2

// automatic digestion is now a subcategory, so anyone with
@@ -35,8 +36,27 @@ migrations = [
save.cropTransferAuto = false;
if (save.wingDigestTime == 0)
save.wingDigestAuto = false;
}
},

// 2 -> 3

// passive production is now written as percentage points;
// old values won't make sense anymore, so we'll just
// erase them
save => {
if (save.baseCumProduction)
delete save.baseCumProduction;
if (save.baseFemcumProduction)
delete save.baseFemcumProduction;
if (save.baseLactationProduction)
delete save.baseLactationProduction;
if (save.baseGasProduction)
delete save.baseGasProduction;
if (save.basePissProduction)
delete save.basePissProduction;
if (save.baseScatProduction)
delete save.baseScatProduction;
}
];

function migrate(save, target=null) {


Loading…
Отказ
Запис