resource styling

This commit is contained in:
Azgaar 2021-04-27 12:09:32 +03:00
parent 05171fc881
commit 5f76a483d9
4 changed files with 74 additions and 78 deletions

View file

@ -2169,6 +2169,10 @@ svg.button {
user-select: none; user-select: none;
} }
#goods > g > use {
pointer-events: none;
}
.dontAsk { .dontAsk {
display: inline-block; display: inline-block;
margin: 0.9em 0 0 0.6em; margin: 0.9em 0 0 0.6em;

View file

@ -354,6 +354,7 @@
<option value="provs">Provinces</option> <option value="provs">Provinces</option>
<option value="terrain">Relief Icons</option> <option value="terrain">Relief Icons</option>
<option value="relig">Religions</option> <option value="relig">Religions</option>
<option value="goods">Resources</option>
<option value="rivers">Rivers</option> <option value="rivers">Rivers</option>
<option value="routes">Routes</option> <option value="routes">Routes</option>
<option value="ruler">Rulers</option> <option value="ruler">Rulers</option>
@ -4091,50 +4092,34 @@
</g> </g>
<g id="resource-icons"> <g id="resource-icons">
<symbol id="resource-wood" viewBox="0 0 90 112.5"> <symbol id="resource-wood" viewBox="0 -8 90 110">
<metadata description="Wood by Callum Taylor from the Noun Project" source="https://thenounproject.com/search/?q=Wood&i=53364" license="https://creativecommons.org/licenses/by/3.0"/> <metadata description="Wood by Callum Taylor from the Noun Project, redrawn by Azgaar" source="https://thenounproject.com/search/?q=Wood&i=53364" license="https://creativecommons.org/licenses/by/3.0"/>
<path d="M75.723,21.843c-0.774,0-1.534,0.077-2.284,0.196c0.382-1.301,0.584-2.663,0.584-4.057c0-7.911-6.436-14.347-14.346-14.347 c-3.836,0-7.427,1.495-10.135,4.202L33,21.233l-11.069,9.383c-3.431,3.027-5.611,7.443-5.611,12.367 c0,1.207,0.138,2.381,0.385,3.515L5.779,57.425c-0.047,0.046-0.093,0.092-0.138,0.138L5.484,57.72l0.007,0.007 c-2.858,2.969-4.626,6.994-4.626,11.431c0,9.103,7.405,16.508,16.508,16.508c6.142,0,11.5-3.378,14.343-8.367 c2.843,4.989,8.202,8.367,14.343,8.367c5.954,0,11.166-3.179,14.07-7.919l27.562-34.042l0.668-0.723 c1.437-2.282,1.709-4.085,1.709-6.794C90.069,28.278,83.634,21.843,75.723,21.843z M53.294,10.167 c1.797-1.475,4.024-2.28,6.384-2.28c2.943,0,5.587,1.274,7.434,3.29L52.128,27.288l3.113,2.896L69.33,15.036 c0.285,0.933,0.441,1.922,0.441,2.947c0,1.775-0.463,3.476-1.318,4.978l-1.096,1.269c-0.335,0.28-1.466,1.502-1.779,1.815 L49.153,45.304c0.108-0.76,0.183-1.531,0.183-2.321c0-8.958-7.176-16.256-16.08-16.486L53.294,10.167z M18.336,50.88 c0.372,0.68,0.804,1.321,1.265,1.939c-0.73-0.099-1.47-0.168-2.227-0.168c-0.287,0-0.568,0.029-0.852,0.043L18.336,50.88z M29.591,69.919c-0.396,6.403-5.716,11.495-12.217,11.495c-6.758,0-12.256-5.498-12.256-12.256c0-3.337,1.344-6.364,3.516-8.576 l0.164-0.164c2.212-2.171,5.239-3.516,8.576-3.516c6.501,0,11.821,5.092,12.217,11.495c-0.012,0.254-0.039,0.504-0.039,0.761 S29.58,69.665,29.591,69.919z M31.717,61.018c-0.336-0.59-0.712-1.153-1.116-1.695c0.693,0.094,1.394,0.157,2.111,0.162 C32.354,59.978,32.02,60.487,31.717,61.018z M20.572,42.983c0-6.758,5.498-12.256,12.256-12.256s12.256,5.498,12.256,12.256 s-5.498,12.256-12.256,12.256S20.572,49.741,20.572,42.983z M56.675,75.258L55.54,76.66l0.119,0.096 c-2.247,2.832-5.711,4.658-9.598,4.658c-6.501,0-11.821-5.092-12.217-11.495c0.012-0.254,0.039-0.504,0.039-0.761 s-0.027-0.507-0.039-0.761c0.396-6.403,5.716-11.495,12.217-11.495c6.758,0,12.256,5.498,12.256,12.256 C58.316,71.38,57.713,73.46,56.675,75.258z M84.882,40.42l-22.37,27.629c-0.107-1.596-0.441-3.128-0.971-4.569L76.132,46.69 l-3.209-2.789L59.395,59.467c-2.59-3.554-6.556-6.032-11.114-6.649l21.228-24.575c0.08-0.063,0.164-0.122,0.246-0.182 c0,0,0.278-0.169,0.386-0.284c1.641-1.093,3.566-1.681,5.582-1.681c5.566,0,10.095,4.528,10.095,10.095 C85.817,37.662,85.492,39.101,84.882,40.42z"/> <g fill="#fff" stroke="#000" stroke-width="3"><path d="M23 33L49.5 5.6S58-3 68.2 4.705c5.8 5.3 6.8 11.3-3.18 21.3-.714.929-17 19-18 20m-4 5l22-25s9.01-9.02 19-1.02c10 8 1.02 19 1.02 19l-29 35m-51-17l14-16 41 20m-6-38l17-19m-12 54l15-17"/><circle cx="33" cy="43" r="14"/><path d="M33 50c-3 0-7-2-7-7"/><circle cx="17" cy="69" r="14"/><circle cx="46" cy="69" r="14"/><path d="M17 76c-3 0-7-2-7-7m36 7c-3 0-7-2-7-7"/></g>
<path d="M17,73.821c-2,0-4.29-1.821-4.29-4.821H8.458c0,5,3.542,9.073,8.542,9.073v-2.145c0.124,0.007,0.247,0.019,0.374,0.019 L17,75.574V73.821z"/>
<path d="M46,73.821c-1.22,0-2.196-0.315-2.94-0.874l-0.699-0.699c-0.625-0.813-0.964-1.904-0.964-3.249h-4.252 c0,5,3.854,9.073,8.854,9.073v-2.129c0.02,0,0.04,0.003,0.061,0.003L46,75.887V73.821z"/>
<path d="M29.214,46.158c-0.667-0.773-1.048-1.823-1.048-3.158h-2.109L26,42.983c0,0.006,0,0.011,0,0.017h-2.087 c0,5,4.087,8.898,9.087,8.898v-4.252c-1.4,0-2.533-0.372-3.357-1.06L29.214,46.158z"/>
</symbol> </symbol>
<symbol id="resource-stone" viewBox="0 0 30 30"> <symbol id="resource-stone" viewBox="-2 -1 31 31">
<metadata description="Stone blocks by Azgaar" author="Azgaar" license="https://creativecommons.org/publicdomain/zero/1.0"/> <metadata description="Stone blocks by Azgaar" author="Azgaar" license="https://creativecommons.org/publicdomain/zero/1.0"/>
<g fill="none" stroke="#000" stroke-width="1"> <g fill="#fff" stroke="#000" stroke-width="1"><rect x="2.6" y="16.1" width="15" height="6.08"/><rect x="3.9" y="9.88" width="14.8" height="6.24"/><rect x="6.6" y="4" width="7.7" height="5.88"/><path d="m18.2 6.5 4.2-.7 2.4 15.9-4.21.646z"/></g>
<rect x="2.6" y="16.1" width="15" height="6.08"/>
<rect x="3.9" y="9.88" width="14.8" height="6.24"/>
<rect x="6.6" y="4" width="7.7" height="5.88"/>
<path d="m18.2 6.5 4.2-.7 2.4 15.9-4.21.646z"/>
</g>
</symbol> </symbol>
<symbol id="resource-marble" viewBox="0 0 100 125"> <symbol id="resource-marble" viewBox="1 -17 105 130">
<metadata description="Marble block by Azgaar" author="Azgaar" license="https://creativecommons.org/publicdomain/zero/1.0"/> <metadata description="Marble block by Azgaar" author="Azgaar" license="https://creativecommons.org/publicdomain/zero/1.0"/>
<g fill="none" stroke="#000" stroke-width="4"> <g fill="#fff" stroke="#000" stroke-width="4"><path d="m102 17.3-8.5 67.6-25.4 12-49.2-17.9-8.06-14.7-1.57-40.7 7.86-5.28 2.93-.0 1.63-2.8 17.3-10.6 61.4 10.9z"/><path d="m38.9 33.2 6.61-2.33 3.5-7.39h5.44l7.78-5.06 4.67-3.69"/><path d="m18.7 79.1 9.39-2.11 1.28-5.98.389-4.86 1.94-2.14.389-3.89 4.86-3.89.194-4.47 1.36-2.92 6.8 8.55v2.53l1.36 2.72-2.72 4.67-1.56 7.78 3.71 3.79 2.1 5.73 19.7 12.4"/><path d="m38.7 4.92-.245 43.9"/><path d="m28.1 76.9 5.13 1.25 1.66 3.21 6.93.194 6.41 2.97"/></g>
<path d="m102 17.3-8.5 67.6-25.4 12-49.2-17.9-8.06-14.7-1.57-40.7 7.86-5.28 2.93-.00601 1.63-2.8 17.3-10.6 61.4 10.9z"/>
<path d="m38.9 33.2 6.61-2.33 3.5-7.39h5.44l7.78-5.06 4.67-3.69"/>
<path d="m18.7 79.1 9.39-2.11 1.28-5.98.389-4.86 1.94-2.14.389-3.89 4.86-3.89.194-4.47 1.36-2.92 6.8 8.55v2.53l1.36 2.72-2.72 4.67-1.56 7.78 3.71 3.79 2.1 5.73 19.7 12.4"/>
<path d="m38.7 4.92-.245 43.9"/>
<path d="m28.1 76.9 5.13 1.25 1.66 3.21 6.93.194 6.41 2.97"/>
</g>
</symbol> </symbol>
<symbol id="resource-iron" viewBox="0 0 48 60"> <symbol id="resource-iron" viewBox="5 -1 50 62">
<metadata description="Mine by Vectorstall from the Noun Project" source="https://thenounproject.com/search/?q=mine&i=3663285" license="https://creativecommons.org/licenses/by/3.0"/> <metadata description="Mine by Vectorstall from the Noun Project, redrawn and amended by Azgaar" source="https://thenounproject.com/search/?q=mine&i=3663285" license="https://creativecommons.org/licenses/by/3.0"/>
<path d="m 28.570312,7.6855469 c -0.172499,0 -0.345,0.044766 -0.5,0.1347656 L 24.210938,10.080078 15.050781,8.5195312 c -0.27,-0.05 -0.541719,0.019687 -0.761719,0.1796876 -0.22,0.16 -0.358437,0.3999218 -0.398437,0.6699218 L 13.240234,13.949219 9.6992188,18.179688 C 9.6092188,18.289687 9.54,18.420313 9.5,18.570312 l -0.6601562,2.5 H 6 c -0.55,0 -1,0.45 -1,1 v 5.009766 c 0,0.55 0.45,1 1,1 h 2.75 l 2.109375,15.810547 c 0.07,0.5 0.490234,0.869141 0.990234,0.869141 h 2.960938 c -0.56,0.78 -0.910156,1.739297 -0.910156,2.779296 0,2.630001 2.139296,4.78125 4.779297,4.78125 2.629999,0 4.78125,-2.14125 4.78125,-4.78125 0,-1.039999 -0.340157,-1.989296 -0.910157,-2.779296 h 14.910157 c -0.560001,0.78 -0.910157,1.739297 -0.910157,2.779296 0,2.630001 2.139297,4.78125 4.779297,4.78125 2.63,0 4.779297,-2.14125 4.779297,-4.78125 0,-1.039999 -0.340156,-1.989296 -0.910156,-2.779296 h 2.960937 c 0.5,0 0.920235,-0.369141 0.990235,-0.869141 L 51.259766,28.080078 H 54 c 0.55,0 1,-0.45 1,-1 v -5.009766 c 0,-0.55 -0.45,-0.999999 -1,-1 h -2.089844 l 1.490235,-3.390624 c 0.11,-0.25 0.109765,-0.519532 0.0098,-0.769532 -0.1,-0.25 -0.291015,-0.450781 -0.541015,-0.550781 L 50.910156,15.529297 51.359375,13 c 0.05,-0.26 -0.0099,-0.53 -0.169922,-0.75 -0.15,-0.22 -0.380391,-0.370156 -0.650391,-0.410156 L 44.240234,10.730469 39.429688,7.8300781 c -0.3,-0.18 -0.65875,-0.1910156 -0.96875,-0.041016 l -5,2.5507819 -4.390626,-2.5195319 c -0.155,-0.09 -0.3275,-0.1347656 -0.5,-0.1347652 z m 10.298829,2.1542969 4.490234,2.7109372 c 0.11,0.06 0.219844,0.108906 0.339844,0.128907 l 5.5,0.960937 -0.410157,2.320313 c -0.08,0.46 0.171797,0.909609 0.591797,1.099609 l 1.759766,0.740234 -1.429687,3.269531 L 45.158203,21 44,23 l 9,0.07031 v 3.009766 H 50.380859 L 38.158204,26 37,28 49.240234,28.080078 47.279297,42.759766 H 12.720703 L 10.759766,28.080078 22,28 22.914063,26 9.6191406,26.080078 H 7 V 23.070312 L 30,23 l 0.914063,-2 -20.003907,0.07031 0.480469,-1.769531 3.580078,-4.28125 c 0.12,-0.14 0.19875,-0.32 0.21875,-0.5 l 0.541016,-3.839843 8.5,1.451171 c 0.23,0.04 0.469922,-0.0011 0.669922,-0.121093 l 3.669921,-2.150391 4.359376,2.5 c 0.289999,0.17 0.651171,0.181484 0.951171,0.02148 z M 18.669922,44.75 c 1.53,0.01 2.779297,1.249297 2.779297,2.779297 0,1.53 -1.249297,2.78125 -2.779297,2.78125 -1.53,0 -2.779297,-1.25125 -2.779297,-2.78125 0,-1.53 1.249297,-2.779297 2.779297,-2.779297 z m 22.65039,0 c 1.54,0.01 2.779297,1.249297 2.779297,2.779297 0,1.53 -1.249296,2.78125 -2.779297,2.78125 -1.53,0 -2.78125,-1.25125 -2.78125,-2.78125 0,-1.53 1.25125,-2.779297 2.78125,-2.779297 z"/> <g fill="#fff" stroke="#000" stroke-width="2"><circle cx="19" cy="48" r="4"/><circle cx="42" cy="48" r="4"/><path d="M12 44h36l3-17h3v-5h-4l2-4-2-2 1-3-7-1-5-3-5 3-5-3-5 3-9-2-1 4-3 4-1 4H6v5h3z"/><path d="M10 22h19"/><path d="M9 27h13M39 27h12M50 22h-5"/><path d="M40.1 15l1.28 8.33m-9.35 5.62l8.08-14-8.5 4.17m4.25 14.6a6.38 6.25 0 01-6.38 6.25 6.38 6.25 0 01-6.38-6.25 6.38 6.25 0 016.38-6.25 6.38 6.25 0 016.38 6.25z" stroke-linejoin="round"/></g>
<path fill="none" stroke="#000" stroke-width="3" stroke-linejoin="round" d="M 40.075,15.041667 41.35,23.375 M 32,29 l 8.075,-13.958333 -8.5,4.166667 m 4.25,14.583333 a 6.375,6.25 0 0 1 -6.375,6.25 6.375,6.25 0 0 1 -6.375,-6.25 6.375,6.25 0 0 1 6.375,-6.25 6.375,6.25 0 0 1 6.375,6.25 z">
</symbol> </symbol>
<symbol id="resource-copper" viewBox="0 0 48 60"> <symbol id="resource-copper" viewBox="5 -1 50 62">
<metadata description="Mine by Vectorstall from the Noun Project" source="https://thenounproject.com/search/?q=mine&i=3663285" license="https://creativecommons.org/licenses/by/3.0"/> <metadata description="Mine by Vectorstall from the Noun Project, redrawn and amended by Azgaar" source="https://thenounproject.com/search/?q=mine&i=3663285" license="https://creativecommons.org/licenses/by/3.0"/>
<path d="m 28.570312,7.6855469 c -0.172499,0 -0.345,0.044766 -0.5,0.1347656 L 24.210938,10.080078 15.050781,8.5195312 c -0.27,-0.05 -0.541719,0.019687 -0.761719,0.1796876 -0.22,0.16 -0.358437,0.3999218 -0.398437,0.6699218 L 13.240234,13.949219 9.6992188,18.179688 C 9.6092188,18.289687 9.54,18.420313 9.5,18.570312 l -0.6601562,2.5 H 6 c -0.55,0 -1,0.45 -1,1 v 5.009766 c 0,0.55 0.45,1 1,1 h 2.75 l 2.109375,15.810547 c 0.07,0.5 0.490234,0.869141 0.990234,0.869141 h 2.960938 c -0.56,0.78 -0.910156,1.739297 -0.910156,2.779296 0,2.630001 2.139296,4.78125 4.779297,4.78125 2.629999,0 4.78125,-2.14125 4.78125,-4.78125 0,-1.039999 -0.340157,-1.989296 -0.910157,-2.779296 h 14.910157 c -0.560001,0.78 -0.910157,1.739297 -0.910157,2.779296 0,2.630001 2.139297,4.78125 4.779297,4.78125 2.63,0 4.779297,-2.14125 4.779297,-4.78125 0,-1.039999 -0.340156,-1.989296 -0.910156,-2.779296 h 2.960937 c 0.5,0 0.920235,-0.369141 0.990235,-0.869141 L 51.259766,28.080078 H 54 c 0.55,0 1,-0.45 1,-1 v -5.009766 c 0,-0.55 -0.45,-0.999999 -1,-1 h -2.089844 l 1.490235,-3.390624 c 0.11,-0.25 0.109765,-0.519532 0.0098,-0.769532 -0.1,-0.25 -0.291015,-0.450781 -0.541015,-0.550781 L 50.910156,15.529297 51.359375,13 c 0.05,-0.26 -0.0099,-0.53 -0.169922,-0.75 -0.15,-0.22 -0.380391,-0.370156 -0.650391,-0.410156 L 44.240234,10.730469 39.429688,7.8300781 c -0.3,-0.18 -0.65875,-0.1910156 -0.96875,-0.041016 l -5,2.5507819 -4.390626,-2.5195319 c -0.155,-0.09 -0.3275,-0.1347656 -0.5,-0.1347652 z m 10.298829,2.1542969 4.490234,2.7109372 c 0.11,0.06 0.219844,0.108906 0.339844,0.128907 l 5.5,0.960937 -0.410157,2.320313 c -0.08,0.46 0.171797,0.909609 0.591797,1.099609 l 1.759766,0.740234 -1.429687,3.269531 L 39,21 v 2 l 14,0.07031 v 3.009766 H 50.380859 L 38,26 l -1,2 12.240234,0.08008 -1.960937,14.679688 H 12.720703 L 10.759766,28.080078 23,28 22,26 9.6191406,26.080078 H 7 V 23.070312 L 21,23 v -2 l -10.089844,0.07031 0.480469,-1.769531 3.580078,-4.28125 c 0.12,-0.14 0.19875,-0.32 0.21875,-0.5 l 0.541016,-3.839843 8.5,1.451171 c 0.23,0.04 0.469922,-0.0011 0.669922,-0.121093 l 3.669921,-2.150391 4.359376,2.5 c 0.289999,0.17 0.651171,0.181484 0.951171,0.02148 z M 18.669922,44.75 c 1.53,0.01 2.779297,1.249297 2.779297,2.779297 0,1.53 -1.249297,2.78125 -2.779297,2.78125 -1.53,0 -2.779297,-1.25125 -2.779297,-2.78125 0,-1.53 1.249297,-2.779297 2.779297,-2.779297 z m 22.65039,0 c 1.54,0.01 2.779297,1.249297 2.779297,2.779297 0,1.53 -1.249296,2.78125 -2.779297,2.78125 -1.53,0 -2.78125,-1.25125 -2.78125,-2.78125 0,-1.53 1.25125,-2.779297 2.78125,-2.779297 z"/> <g fill="#fff" stroke="#000" stroke-width="2"><circle cx="19" cy="48" r="4"/><circle cx="42" cy="48" r="4"/><path d="m12 44h36l3-17h3v-5h-4l2-4-2-2 1-3-7-1-5-3-5 3-5-3-5 3-9-2-1 4-3 4-1 4h-4v5h3z"/><path d="m10 22h10" stroke-width="1.95"/><path d="m9 27h12"/><path d="m39 27h12"/><path d="m50 22h-10"/><path d="m36 22a6 6 0 01-6 6 6 6 0 01-6-6 6 6 0 016-6 6 6 0 016 6zm-6 18v-12m-6 6h12" stroke-linejoin="round"/></g>
<path fill="none" stroke="#000" stroke-width="3" stroke-linejoin="round" d="m 36,22 a 6,6 0 0 1 -6,6 6,6 0 0 1 -6,-6 6,6 0 0 1 6,-6 6,6 0 0 1 6,6 z M 30,40 V 28 m -6,6 h 12"></path>
</symbol> </symbol>
<symbol id="resource-lead" viewBox="0 0 48 60"> <symbol id="resource-lead" viewBox="5 -1 50 62">
<path d="m 28.570312,7.6855469 c -0.172499,0 -0.345,0.044766 -0.5,0.1347656 L 24.210938,10.080078 15.050781,8.5195312 c -0.27,-0.05 -0.541719,0.019687 -0.761719,0.1796876 -0.22,0.16 -0.358437,0.3999218 -0.398437,0.6699218 L 13.240234,13.949219 9.6992188,18.179688 C 9.6092188,18.289687 9.54,18.420313 9.5,18.570312 l -0.6601562,2.5 H 6 c -0.55,0 -1,0.45 -1,1 v 5.009766 c 0,0.55 0.45,1 1,1 h 2.75 l 2.109375,15.810547 c 0.07,0.5 0.490234,0.869141 0.990234,0.869141 h 2.960938 c -0.56,0.78 -0.910156,1.739297 -0.910156,2.779296 0,2.630001 2.139296,4.78125 4.779297,4.78125 2.629999,0 4.78125,-2.14125 4.78125,-4.78125 0,-1.039999 -0.340157,-1.989296 -0.910157,-2.779296 h 14.910157 c -0.560001,0.78 -0.910157,1.739297 -0.910157,2.779296 0,2.630001 2.139297,4.78125 4.779297,4.78125 2.63,0 4.779297,-2.14125 4.779297,-4.78125 0,-1.039999 -0.340156,-1.989296 -0.910156,-2.779296 h 2.960937 c 0.5,0 0.920235,-0.369141 0.990235,-0.869141 L 51.259766,28.080078 H 54 c 0.55,0 1,-0.45 1,-1 v -5.009766 c 0,-0.55 -0.45,-0.999999 -1,-1 h -2.089844 l 1.490235,-3.390624 c 0.11,-0.25 0.109765,-0.519532 0.0098,-0.769532 -0.1,-0.25 -0.291015,-0.450781 -0.541015,-0.550781 L 50.910156,15.529297 51.359375,13 c 0.05,-0.26 -0.0099,-0.53 -0.169922,-0.75 -0.15,-0.22 -0.380391,-0.370156 -0.650391,-0.410156 L 44.240234,10.730469 39.429688,7.8300781 c -0.3,-0.18 -0.65875,-0.1910156 -0.96875,-0.041016 l -5,2.5507819 -4.390626,-2.5195319 c -0.155,-0.09 -0.3275,-0.1347656 -0.5,-0.1347652 z m 10.298829,2.1542969 4.490234,2.7109372 c 0.11,0.06 0.219844,0.108906 0.339844,0.128907 l 5.5,0.960937 -0.410157,2.320313 c -0.08,0.46 0.171797,0.909609 0.591797,1.099609 l 1.759766,0.740234 -1.429687,3.269531 L 36,21 l 1,2 16,0.07031 v 3.009766 H 50.380859 L 38.158204,26 38,28 49.240234,28.080078 47.279297,42.759766 H 12.720703 L 10.759766,28.080078 23,28 22.914063,26 9.6191406,26.080078 H 7 V 23.070312 L 23,23 l -1,-2 -11.089844,0.07031 0.480469,-1.769531 3.580078,-4.28125 c 0.12,-0.14 0.19875,-0.32 0.21875,-0.5 l 0.541016,-3.839843 8.5,1.451171 c 0.23,0.04 0.469922,-0.0011 0.669922,-0.121093 l 3.669921,-2.150391 4.359376,2.5 c 0.289999,0.17 0.651171,0.181484 0.951171,0.02148 z M 18.669922,44.75 c 1.53,0.01 2.779297,1.249297 2.779297,2.779297 0,1.53 -1.249297,2.78125 -2.779297,2.78125 -1.53,0 -2.779297,-1.25125 -2.779297,-2.78125 0,-1.53 1.249297,-2.779297 2.779297,-2.779297 z m 22.65039,0 c 1.54,0.01 2.779297,1.249297 2.779297,2.779297 0,1.53 -1.249296,2.78125 -2.779297,2.78125 -1.53,0 -2.78125,-1.25125 -2.78125,-2.78125 0,-1.53 1.25125,-2.779297 2.78125,-2.779297 z"/> <metadata description="Mine by Vectorstall from the Noun Project, redrawn and amended by Azgaar" source="https://thenounproject.com/search/?q=mine&i=3663285" license="https://creativecommons.org/licenses/by/3.0"/>
<path fill="none" stroke="#000" stroke-width="3" stroke-linejoin="round" d="m 26,15.675737 v 18.712725 m -3.002859,-15.64771 h 7.368978 m 4.231022,19.519309 c -0.614082,0.645266 -1.228163,1.290533 -1.842245,1.290533 -0.614082,0 -1.842244,-0.645267 -1.842244,-1.9358 0,-1.290532 0.614081,-2.581065 1.842244,-3.871598 1.228163,-1.290533 2.456326,-3.871598 2.456326,-6.452664 0,-2.581066 -1.228163,-5.162131 -3.684489,-5.162131 C 29.205505,22.128401 27.228163,23.418934 26,26"></path> <g fill="#fff" stroke="#000" stroke-width="2"><circle cx="19" cy="48" r="4"/><circle cx="42" cy="48" r="4"/><path d="m12 44h36l3-17h3v-5h-4l2-4-2-2 1-3-7-1-5-3-5 3-5-3-5 3-9-2-1 4-3 4-1 4h-4v5h3z"/><path d="m10 22h11" stroke-width="1.95"/><path d="m9 27h13"/<path d="m40 27h11"/><path d="m50 22h-11"/><path d="m26 15.7v18.7m-3-15.6h7.37m4.23 19.5c-.614.645-1.23 1.29-1.84 1.29s-1.84-.645-1.84-1.94c0-1.29.614-2.58 1.84-3.87s2.46-3.87 2.46-6.45-1.23-5.16-3.68-5.16c-2.32 0-4.3 1.29-5.53 3.87" stroke-linejoin="round"/>
</symbol> </symbol>
<symbol id="resource-silver" viewBox="0 0 160 160"> <symbol id="resource-silver" viewBox="0 0 160 160">

View file

@ -14,46 +14,46 @@
const getDefault = function() { const getDefault = function() {
// model: cells eligibility function; chance: chance to get rosource in model-eligible cell // model: cells eligibility function; chance: chance to get rosource in model-eligible cell
return [ return [
{i: 1, name: "Wood", icon: "resource-wood", value: 5, chance: 10, model: "forestAndTaiga", bonus: {fleet: 2, defence: 1}}, {i: 1, name: "Wood", icon: "resource-wood", color: "#966F33", value: 5, chance: 10, model: "forestAndTaiga", bonus: {fleet: 2, defence: 1}},
{i: 2, name: "Stone", icon: "resource-stone", value: 4, chance: 7, model: "hills", bonus: {prestige: 1, defence: 2}}, {i: 2, name: "Stone", icon: "resource-stone", color: "#979EA2", value: 4, chance: 7, model: "hills", bonus: {prestige: 1, defence: 2}},
{i: 3, name: "Marble", icon: "resource-marble", value: 15, chance: 1, model: "mountains", bonus: {prestige: 2}}, {i: 3, name: "Marble", icon: "resource-marble", color: "#d6d0bf", value: 15, chance: 1, model: "mountains", bonus: {prestige: 2}},
{i: 4, name: "Iron", icon: "resource-iron", value: 8, chance: 8, model: "mountainsAndRareWetland", bonus: {artillery: 1, infantry: 1, defence: 1}}, {i: 4, name: "Iron", icon: "resource-iron", color: "#5D686E", value: 8, chance: 8, model: "mountainsAndRareWetland", bonus: {artillery: 1, infantry: 1, defence: 1}},
{i: 5, name: "Copper", icon: "resource-copper", value: 10, chance: 3, model: "mountains", bonus: {artillery: 2, defence: 1, prestige: 1}}, {i: 5, name: "Copper", icon: "resource-copper", color: "#b87333", value: 10, chance: 3, model: "mountains", bonus: {artillery: 2, defence: 1, prestige: 1}},
{i: 6, name: "Lead", icon: "resource-lead", value: 8, chance: 3, model: "mountains", bonus: {artillery: 1, defence: 1}}, {i: 6, name: "Lead", icon: "resource-lead", color: "#454343", value: 8, chance: 3, model: "mountains", bonus: {artillery: 1, defence: 1}},
{i: 7, name: "Silver", icon: "resource-silver", value: 15, chance: 3, model: "mountains", bonus: {prestige: 2}}, {i: 7, name: "Silver", icon: "resource-silver", color: "#ffffff", value: 15, chance: 3, model: "mountains", bonus: {prestige: 2}},
{i: 8, name: "Gold", icon: "resource-gold", value: 30, chance: 1, model: "upperRivers", bonus: {prestige: 3}}, {i: 8, name: "Gold", icon: "resource-gold", color: "#ffffff", value: 30, chance: 1, model: "upperRivers", bonus: {prestige: 3}},
{i: 9, name: "Grain", icon: "resource-grain", value: 1, chance: 15, model: "habitability", bonus: {population: 4}}, {i: 9, name: "Grain", icon: "resource-grain", color: "#ffffff", value: 1, chance: 15, model: "habitability", bonus: {population: 4}},
{i: 10, name: "Сattle", icon: "resource-cattle", value: 2, chance: 10, model: "pasturesAndTemperateForest", bonus: {population: 2}}, {i: 10, name: "Сattle", icon: "resource-cattle", color: "#ffffff", value: 2, chance: 10, model: "pasturesAndTemperateForest", bonus: {population: 2}},
{i: 11, name: "Fish", icon: "resource-fish", value: 1, chance: 5, model: "waterAndRiver", bonus: {population: 2}}, {i: 11, name: "Fish", icon: "resource-fish", color: "#ffffff", value: 1, chance: 5, model: "waterAndRiver", bonus: {population: 2}},
{i: 12, name: "Game", icon: "resource-game", value: 2, chance: 3, model: "forestAndTaiga", bonus: {archers: 2, population: 1}}, {i: 12, name: "Game", icon: "resource-game", color: "#ffffff", value: 2, chance: 3, model: "forestAndTaiga", bonus: {archers: 2, population: 1}},
{i: 13, name: "Wine", icon: "resource-wine", value: 3, chance: 4, model: "tropics", bonus: {population: 1, prestige: 1}}, {i: 13, name: "Wine", icon: "resource-wine", color: "#ffffff", value: 3, chance: 4, model: "tropics", bonus: {population: 1, prestige: 1}},
{i: 14, name: "Olives", icon: "resource-olives", value: 3, chance: 4, model: "tropics", bonus: {population: 1}}, {i: 14, name: "Olives", icon: "resource-olives", color: "#ffffff", value: 3, chance: 4, model: "tropics", bonus: {population: 1}},
{i: 15, name: "Honey", icon: "resource-honey", value: 4, chance: 3, model: "deciduousForestAndTaiga", bonus: {population: 1}}, {i: 15, name: "Honey", icon: "resource-honey", color: "#ffffff", value: 4, chance: 3, model: "deciduousForestAndTaiga", bonus: {population: 1}},
{i: 16, name: "Salt", icon: "resource-salt", value: 5, chance: 4, model: "aridLandAndLakes", bonus: {population: 1, defence: 1}}, {i: 16, name: "Salt", icon: "resource-salt", color: "#ffffff", value: 5, chance: 4, model: "aridLandAndLakes", bonus: {population: 1, defence: 1}},
{i: 17, name: "Dates", icon: "resource-dates", value: 3, chance: 3, model: "desert", bonus: {population: 1}}, {i: 17, name: "Dates", icon: "resource-dates", color: "#ffffff", value: 3, chance: 3, model: "desert", bonus: {population: 1}},
{i: 18, name: "Horses", icon: "resource-horses", value: 10, chance: 6, model: "grasslandsAndColdDesert", bonus: {cavalry: 2}}, {i: 18, name: "Horses", icon: "resource-horses", color: "#ffffff", value: 10, chance: 6, model: "grasslandsAndColdDesert", bonus: {cavalry: 2}},
{i: 19, name: "Elephants", icon: "resource-elephants", value: 15, chance: 2, model: "savannaDesertTropicalForest", bonus: {cavalry: 1}}, {i: 19, name: "Elephants", icon: "resource-elephants", color: "#ffffff", value: 15, chance: 2, model: "savannaDesertTropicalForest", bonus: {cavalry: 1}},
{i: 20, name: "Camels", icon: "resource-camels", value: 13, chance: 4, model: "desert", bonus: {cavalry: 1}}, {i: 20, name: "Camels", icon: "resource-camels", color: "#ffffff", value: 13, chance: 4, model: "desert", bonus: {cavalry: 1}},
{i: 21, name: "Hemp", icon: "resource-hemp", value: 2, chance: 4, model: "forest", bonus: {fleet: 2}}, {i: 21, name: "Hemp", icon: "resource-hemp", color: "#ffffff", value: 2, chance: 4, model: "forest", bonus: {fleet: 2}},
{i: 22, name: "Pearls", icon: "resource-pearls", value: 35, chance: 3, model: "tropicalWater", bonus: {prestige: 1}}, {i: 22, name: "Pearls", icon: "resource-pearls", color: "#ffffff", value: 35, chance: 3, model: "tropicalWater", bonus: {prestige: 1}},
{i: 23, name: "Gemstones", icon: "resource-gemstones", value: 35, chance: 2, model: "mountains", bonus: {prestige: 1}}, {i: 23, name: "Gemstones", icon: "resource-gemstones", color: "#ffffff", value: 35, chance: 2, model: "mountains", bonus: {prestige: 1}},
{i: 24, name: "Dyes", icon: "resource-dyes", value: 15, chance: .5, model: "habitableOrWater", bonus: {prestige: 1}}, {i: 24, name: "Dyes", icon: "resource-dyes", color: "#ffffff", value: 15, chance: .5, model: "habitableOrWater", bonus: {prestige: 1}},
{i: 25, name: "Incense", icon: "resource-incense", value: 25, chance: 2, model: "desertAndTropicalForest", bonus: {prestige: 2}}, {i: 25, name: "Incense", icon: "resource-incense", color: "#ffffff", value: 25, chance: 2, model: "desertAndTropicalForest", bonus: {prestige: 2}},
{i: 26, name: "Silk", icon: "resource-silk", value: 30, chance: 1, model: "tropicalForest", bonus: {prestige: 2}}, {i: 26, name: "Silk", icon: "resource-silk", color: "#ffffff", value: 30, chance: 1, model: "tropicalForest", bonus: {prestige: 2}},
{i: 27, name: "Spices", icon: "resource-spices", value: 30, chance: 2, model: "tropicalForest", bonus: {prestige: 2}}, {i: 27, name: "Spices", icon: "resource-spices", color: "#ffffff", value: 30, chance: 2, model: "tropicalForest", bonus: {prestige: 2}},
{i: 28, name: "Amber", icon: "resource-amber", value: 15, chance: 2, model: "forestSeashore", bonus: {prestige: 1}}, {i: 28, name: "Amber", icon: "resource-amber", color: "#ffffff", value: 15, chance: 2, model: "forestSeashore", bonus: {prestige: 1}},
{i: 29, name: "Furs", icon: "resource-furs", value: 13, chance: 2, model: "borealForest", bonus: {prestige: 1}}, {i: 29, name: "Furs", icon: "resource-furs", color: "#ffffff", value: 13, chance: 2, model: "borealForest", bonus: {prestige: 1}},
{i: 30, name: "Sheeps", icon: "resource-sheeps", value: 2, chance: 5, model: "pasturesAndTemperateForest", bonus: {infantry: 1}}, {i: 30, name: "Sheeps", icon: "resource-sheeps", color: "#ffffff", value: 2, chance: 5, model: "pasturesAndTemperateForest", bonus: {infantry: 1}},
{i: 31, name: "Slaves", icon: "resource-slaves", value: 10, chance: 3, model: "lessHabitableSeashore", bonus: {population: 2}}, {i: 31, name: "Slaves", icon: "resource-slaves", color: "#ffffff", value: 10, chance: 3, model: "lessHabitableSeashore", bonus: {population: 2}},
{i: 32, name: "Tar", icon: "resource-tar", value: 3, chance: 3, model: "forestAndTaiga", bonus: {fleet: 1}}, {i: 32, name: "Tar", icon: "resource-tar", color: "#ffffff", value: 3, chance: 3, model: "forestAndTaiga", bonus: {fleet: 1}},
{i: 33, name: "Saltpeter", icon: "resource-saltpeter", value: 8, chance: 2, model: "habitability", bonus: {artillery: 3}}, {i: 33, name: "Saltpeter", icon: "resource-saltpeter", color: "#ffffff", value: 8, chance: 2, model: "habitability", bonus: {artillery: 3}},
{i: 34, name: "Coal", icon: "resource-coal", value: 2, chance: 7, model: "hills", bonus: {artillery: 2}}, {i: 34, name: "Coal", icon: "resource-coal", color: "#ffffff", value: 2, chance: 7, model: "hills", bonus: {artillery: 2}},
{i: 35, name: "Oil", icon: "resource-oil", value: 5, chance: 2, model: "lessHabitableOrWater", bonus: {artillery: 1}}, {i: 35, name: "Oil", icon: "resource-oil", color: "#ffffff", value: 5, chance: 2, model: "lessHabitableOrWater", bonus: {artillery: 1}},
{i: 36, name: "Tropical timber", icon: "resource-tropicalTimber", value: 20, chance: 2, model: "tropicalForest", bonus: {prestige: 1}}, {i: 36, name: "Tropical timber", icon: "resource-tropicalTimber", color: "#ffffff", value: 20, chance: 2, model: "tropicalForest", bonus: {prestige: 1}},
{i: 37, name: "Whales", icon: "resource-whales", value: 2, chance: 2, model: "colderWaters", bonus: {population: 1}}, {i: 37, name: "Whales", icon: "resource-whales", color: "#ffffff", value: 2, chance: 2, model: "colderWaters", bonus: {population: 1}},
{i: 38, name: "Sugar", icon: "resource-sugar", value: 3, chance: 3, model: "tropicalForest", bonus: {population: 1}}, {i: 38, name: "Sugar", icon: "resource-sugar", color: "#ffffff", value: 3, chance: 3, model: "tropicalForest", bonus: {population: 1}},
{i: 39, name: "Tea", icon: "resource-tea", value: 10, chance: 2, model: "tropicalForest", bonus: {prestige: 1}}, {i: 39, name: "Tea", icon: "resource-tea", color: "#ffffff", value: 10, chance: 2, model: "tropicalForest", bonus: {prestige: 1}},
{i: 40, name: "Tobacco", icon: "resource-tobacco", value: 10, chance: 2, model: "tropicalForest", bonus: {prestige: 1}}, {i: 40, name: "Tobacco", icon: "resource-tobacco", color: "#ffffff", value: 10, chance: 2, model: "tropicalForest", bonus: {prestige: 1}},
] ]
} }
@ -106,6 +106,7 @@
pack.resources = getDefault().map(resource => { pack.resources = getDefault().map(resource => {
resource.cells = 0; resource.cells = 0;
resource.stroke = d3.color(resource.color).darker(2).hex();
return resource; return resource;
}); });
@ -128,20 +129,24 @@
} }
console.timeEnd("generateResources"); console.timeEnd("generateResources");
console.table(pack.resources.sort((a, b) => a.i > b.i ? 1 : -1)); //console.table(pack.resources.sort((a, b) => a.i > b.i ? 1 : -1));
} }
const draw = function() { const draw = function() {
console.time("drawResources");
let resourcesHTML = ""; let resourcesHTML = "";
for (const i of cells.i) { for (const i of cells.i) {
if (!cells.resource[i]) continue; if (!cells.resource[i]) continue;
//if (cells.resource[i] !== 38) continue;
const resource = pack.resources.find(resource => resource.i === cells.resource[i]); const resource = pack.resources.find(resource => resource.i === cells.resource[i]);
const [x, y] = cells.p[i]; const [x, y] = cells.p[i];
resourcesHTML += `<use data-i="${resource.i}" href="#${resource.icon}" x="${x-3}" y="${y-3}" width="6" height="6"/>`; resourcesHTML += `<g>
<circle data-i="${resource.i}" cx=${x} cy=${y} r="3" fill="${resource.color}" stroke="${resource.stroke}" />
<use href="#${resource.icon}" x="${x-3}" y="${y-3}" width="6" height="6"/>
</g>`;
} }
goods.html(resourcesHTML); goods.html(resourcesHTML);
console.timeEnd("drawResources");
} }
return {generate, getDefault, draw}; return {generate, getDefault, draw};

View file

@ -62,7 +62,7 @@ function selectStyleElement() {
} }
// stroke color and width // stroke color and width
if (["armies", "routes", "lakes", "borders", "cults", "relig", "cells", "coastline", "prec", "ice", "icons", "coordinates", "zones", "gridOverlay"].includes(sel)) { if (["armies", "routes", "lakes", "borders", "cults", "relig", "cells", "coastline", "prec", "ice", "icons", "coordinates", "zones", "gridOverlay", "goods"].includes(sel)) {
styleStroke.style.display = "block"; styleStroke.style.display = "block";
styleStrokeInput.value = styleStrokeOutput.value = el.attr("stroke"); styleStrokeInput.value = styleStrokeOutput.value = el.attr("stroke");
styleStrokeWidth.style.display = "block"; styleStrokeWidth.style.display = "block";
@ -797,6 +797,8 @@ function applyDefaultStyle() {
fogging.attr("opacity", .98).attr("fill", "#30426f"); fogging.attr("opacity", .98).attr("fill", "#30426f");
emblems.attr("opacity", .9).attr("stroke-width", 1).attr("filter", null); emblems.attr("opacity", .9).attr("stroke-width", 1).attr("filter", null);
goods.attr("opacity", 1).attr("fill", "#000").attr("stroke", "#000").attr("stroke-width", .32).attr("filter", "url(#dropShadow01)");
} }
// apply style settings in JSON // apply style settings in JSON