|
|
|
@@ -57,7 +57,7 @@ function addShoeView(object, name, points) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
function makeHeight(info, category, prefix = "", type = "objects") { |
|
|
|
function makeHeight(info, category, prefix = "", type = "objects", rename = true) { |
|
|
|
const views = {}; |
|
|
|
|
|
|
|
|
|
|
|
@@ -75,7 +75,7 @@ function makeHeight(info, category, prefix = "", type = "objects") { |
|
|
|
views[object[0]] = { |
|
|
|
height: math.unit(object[1], object[2]), |
|
|
|
image: { source: src }, |
|
|
|
name: object[0].replace(/-/g, " ").replace(/\b\w/g, x => x.toUpperCase()).replace(/'[A-Z]/g, x => x.toLowerCase()), |
|
|
|
name: rename ? object[0].replace(/-/g, " ").replace(/\b\w/g, x => x.toUpperCase()).replace(/'[A-Z]/g, x => x.toLowerCase()) : object[0], |
|
|
|
rename: true |
|
|
|
} |
|
|
|
}); |
|
|
|
@@ -735,10 +735,14 @@ function makeObjects() { |
|
|
|
[ |
|
|
|
[".308 Winchester", 71.374, "mm", "./media/objects/ammunition/.308 Winchester.svg"], |
|
|
|
[".22 LR", 25.40, "mm", "./media/objects/ammunition/.22 LR.svg"], |
|
|
|
["9mm Luger", 29.69, "mm", "./media/objects/ammunition/9mm Luger.svg"] |
|
|
|
["9mm Luger", 29.69, "mm", "./media/objects/ammunition/9mm Luger.svg"], |
|
|
|
[".223 Remington", 2.260, "inches", "./media/objects/ammunition/.223 Remington.svg"], |
|
|
|
[".30-06 Springfield", 3.340, "inches", "./media/objects/ammunition/.30-06 Springfield.svg"], |
|
|
|
], |
|
|
|
"Ammunition", |
|
|
|
"" |
|
|
|
"", |
|
|
|
"objects", |
|
|
|
false |
|
|
|
)) |
|
|
|
|
|
|
|
results.push(makeHeight( |
|
|
|
|