소스 검색

Fix volumes being cubic meters, not liters, in the creation screen

This involves dividing inputs by 1000 when starting the game and multiplying by 1000 to get back to the
original settings. This does not require a migration; although it does change the behavior of saves,
it changes the behavior to what people expected in the first place
tags/v1.1.1
Fen Dweller 5 년 전
부모
커밋
3c5558ed8c
1개의 변경된 파일10개의 추가작업 그리고 0개의 파일을 삭제
  1. +10
    -0
      game.js

+ 10
- 0
game.js 파일 보기

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

"fillFemcum": function(self) {
self.femcumStorage.amount += self.femcumStorage.limit * self.baseFemcumProduction * fillPeriod / 1000;
console.log(self.femcumStorage.limit * self.baseFemcumProduction * fillPeriod / 1000);
if (self.femcumStorage.amount > self.femcumStorage.limit)
self.arouse(1 * (self.femcumStorage.amount / self.femcumStorage.limit - 1));
setTimeout(function () { self.fillFemcum(self); }, fillPeriod);
@@ -4822,6 +4823,8 @@ function generateSettings(diff=false) {
else if (form[i].type == "number") {
if (form[i].dataset.unit == "percentage") {
settings[form[i].name] = parseFloat(value) / 100;
} else if (form[i].dataset.unit == "volume") {
settings[form[i].name] = parseFloat(value) / 1000;
} else {
settings[form[i].name] = parseFloat(value);
}
@@ -4882,6 +4885,11 @@ function recurseDeletePanel(settings, panel) {
if (option.unit == "percentage") {
if (settings[option.id] * 100 == option.default)
delete settings[option.id];
}

else if (option.unit == "volume") {
if (settings[option.id] * 1000 == option.default)
delete settings[option.id];
}
else if (settings[option.id] == option.default && option.id != "name") {
@@ -5012,6 +5020,8 @@ function loadSettings(settings = null) {
else if (form[i].type == "number") {
if (form[i].dataset.unit == "percentage") {
form[i].value = settings[form[i].name] * 100;
} else if (form[i].dataset.unit == "volume") {
form[i].value = settings[form[i].name] * 1000;
} else {
form[i].value = settings[form[i].name];
}


불러오는 중...
취소
저장