Browse Source

Add some more ammunition

master
Fen Dweller 4 years ago
parent
commit
77d12c1734
3 changed files with 52 additions and 4 deletions
  1. +22
    -0
      media/objects/ammunition/.223 Remington.svg
  2. +22
    -0
      media/objects/ammunition/.30-06 Springfield.svg
  3. +8
    -4
      presets/objects.js

+ 22
- 0
media/objects/ammunition/.223 Remington.svg View File

@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 25.2.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="135.1" height="809.63" viewBox="0 0 135.1 809.63" style="enable-background:new 0 0 135.1 809.63;" xml:space="preserve">
<style type="text/css">
.st0{fill:#333333;stroke:#000000;stroke-width:2;stroke-miterlimit:10;}
.st1{fill:#FFFFFF;}
.st2{fill:#1A1A1A;stroke:#000000;stroke-width:2;stroke-miterlimit:10;}
</style>
<g id="Layer_1">
</g>
<g id="Layer_2">
<g>
<path class="st0" d="M107.63,177.53c0,0-0.44-176.53-40.07-176.53S27.48,177.53,27.48,177.53"/>
<polyline class="st1" points="67.55,808.63 8.98,808.63 1,800.65 1,791.46 9.2,791.46 9.2,781.66 1,764.27 4.47,292.96
22.3,248.38 22.3,177.53 67.55,177.53 "/>
<polygon class="st2" points="67.55,177.53 112.8,177.53 112.8,248.38 130.63,292.96 134.1,764.27 125.9,781.66 125.9,791.46
134.1,791.46 134.1,800.65 126.12,808.63 67.55,808.63 8.98,808.63 1,800.65 1,791.46 9.2,791.46 9.2,781.66 1,764.27
4.47,292.96 22.3,248.38 22.3,177.53 "/>
</g>
</g>
</svg>

+ 22
- 0
media/objects/ammunition/.30-06 Springfield.svg View File

@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 25.2.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="143.5" height="1021.59" viewBox="0 0 143.5 1021.59" style="enable-background:new 0 0 143.5 1021.59;" xml:space="preserve">
<style type="text/css">
.st0{fill:#333333;stroke:#000000;stroke-width:2;stroke-miterlimit:10;}
.st1{fill:#FFFFFF;}
.st2{fill:#1A1A1A;stroke:#000000;stroke-width:2;stroke-miterlimit:10;}
</style>
<g id="Layer_1">
</g>
<g id="Layer_2">
<g>
<path class="st0" d="M117.11,277.44c0,0-6.5-276.44-45.36-276.44S26.39,277.44,26.39,277.44"/>
<polyline class="st1" points="71.75,1020.59 6.8,1020.59 1,1014.79 1,1004.38 14.61,1004.38 14.61,992.82 1,971.24 6.36,443.46
21.77,392.16 21.77,278.87 26.39,277.44 71.75,277.44 "/>
<polygon class="st2" points="71.75,277.44 117.11,277.44 121.73,278.87 121.73,392.16 137.15,443.46 142.5,971.24 128.89,992.82
128.89,1004.38 142.5,1004.38 142.5,1014.79 136.7,1020.59 71.75,1020.59 6.8,1020.59 1,1014.79 1,1004.38 14.61,1004.38
14.61,992.82 1,971.24 6.36,443.46 21.77,392.16 21.77,278.87 26.39,277.44 "/>
</g>
</g>
</svg>

+ 8
- 4
presets/objects.js View File

@@ -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(


Loading…
Cancel
Save