#1 Minor updates - 2 new approx length units, code cleanup in the approx length units section, and a typo fix

Отворени
clonk2u wants to merge 2 commits from clonk2u/stroll:clonkbranch1 into master
променени са 2 файла, в които са добавени 11 реда и са изтрити 15 реда
  1. +1
    -1
      recursive-desc.js
  2. +10
    -14
      units.js

+ 1
- 1
recursive-desc.js Целия файл

@@ -4836,7 +4836,7 @@ function pickStringChance(chance, ...array) {
? " rubs along your prostate" ? " rubs along your prostate"
: " slides into velvety depths") + : " slides into velvety depths") +
".\ ".\
You moan and clench hard, yanking it in with a wet <i>shlrrp</i> and abruplty silencing its blaring horn."
You moan and clench hard, yanking it in with a wet <i>shlrrp</i> that abruptly silences its blaring horn."
); );
}, },
}); });


+ 10
- 14
units.js Целия файл

@@ -442,28 +442,24 @@ function customarySymLength(m, singular = false) {
} }


function approxLength(m, singular = false) { function approxLength(m, singular = false) {
if (m < 25) {
if (m < 0.8) {
let length = round(m / 0.4, 1);
return length + (singular || length == 1 ? " cinderblock" : " cinderblocks");
} else if (m < 0.9) {
let length = round(1, 1);
return length + (singular || length == 1 ? " baseball bat" : " baseball bats");
} else if (m < 25) {
let length = round(m / 1.9, 1); let length = round(m / 1.9, 1);
return length + (singular || length == 1 ? " person" : " people"); return length + (singular || length == 1 ? " person" : " people");
} else if (m < 350) { } else if (m < 350) {
let length = round(m / 49, 1); let length = round(m / 49, 1);
return (
length +
(singular || length == 1 ? " football field" : " football fields")
);
return length + (singular || length == 1 ? " football field" : " football fields");
} else if (m < 20000) { } else if (m < 20000) {
let length = round(m / 449, 1); let length = round(m / 449, 1);
return (
length +
(singular || length == 1
? " Empire State Building"
: " Empire State Buildings")
);
return length +(singular || length == 1 ? " Empire State Building" : " Empire State Buildings");
} else if (m < 2000000) { } else if (m < 2000000) {
let length = round(m / 80467.2, 1); let length = round(m / 80467.2, 1);
return (
length + (singular || length == 1 ? " Panama Canal" : " Panama Canals")
);
return length + (singular || length == 1 ? " Panama Canal" : " Panama Canals");
} else if (m < 3474574 * 2) { } else if (m < 3474574 * 2) {
let length = round(m / 3474574, 1); let length = round(m / 3474574, 1);
return length + (singular || length == 1 ? " Moon" : " moons"); return length + (singular || length == 1 ? " Moon" : " moons");


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