diff --git a/README-DEV.md b/README-DEV.md deleted file mode 100644 index e69de29b..00000000 diff --git a/README.md b/README.md index f200e749..769e1046 100644 --- a/README.md +++ b/README.md @@ -1,30 +1,49 @@ [![Stories in Ready](https://badge.waffle.io/cmmcleod/coriolis.png?label=ready&title=Ready)](https://waffle.io/cmmcleod/coriolis) -About +## About + +The Coriolis project was inspired by [E:D Shipyard](http://www.edshipyard.com/) and, of course, [Elite Dangerous](http://www.elitedangerous.com). The ultimate goal of Coriolis is to provide rich features to support in-game play and planning while engaging the E:D community to support its development. + +Coriolis was created for non-commercial purposes. It is not endorsed by nor reflects the views or opinions of Frontier Developments. + +## Contributing + +Please [submit issues](https://github.com/cmmcleod/coriolis/issues), or better yet [pull requests](http://www.elitedangerous.com) for any corrections or additions to the database or the code. + +### Feature Requests, Suggestions & Bugs + +All such requests are managed and tracked through [issues](https://github.com/cmmcleod/coriolis/issues). An overview of these can be found [here](https://waffle.io/cmmcleod/coriolis). + +## Development + +See the [Developer's Guide](https://github.com/cmmcleod/coriolis/issues) in the wiki. +### Ship and Component Database -Development +See [Data wiki](https://github.com/cmmcleod/coriolis/wiki/Database) for details on structure, etc. +## License -#Ship and Component Database +The MIT License -See Data Wiki for details on structure, etc. +Copyright (c) 2015 Coriolis.io, Colin McLeod -Please submit issues, or better yet pull requests for any corrections or additions to the database. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. - -#Feature Requests and To Do List - -#To Do - -#Data -#Internal Components - -## Frame Shift Drive Interdictors - - Get actual range for range rating in Light seconds - - -#License \ No newline at end of file +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/app/.htaccess b/app/.htaccess new file mode 100644 index 00000000..f74179f6 --- /dev/null +++ b/app/.htaccess @@ -0,0 +1,20 @@ + RewriteEngine on + RewriteCond %{REQUEST_FILENAME} -s [OR] + RewriteCond %{REQUEST_FILENAME} -l [OR] + RewriteCond %{REQUEST_FILENAME} -d + RewriteRule ^.*$ - [NC,L] + + RewriteRule ^(.*) /index.html [NC,L] + + + # Activate mod_expires for this directory + ExpiresActive on + + ExpiresDefault "access plus 365 days" + ExpiresByType text/html "access" + ExpiresByType application/json "access" + + + + Header add Access-Control-Allow-Origin "*" + diff --git a/app/images/icons/arrow-down-left.svg b/app/images/icons/arrow-down-left.svg new file mode 100755 index 00000000..7f4f2926 --- /dev/null +++ b/app/images/icons/arrow-down-left.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/app/images/icons/arrow-down-left2.svg b/app/images/icons/arrow-down-left2.svg new file mode 100755 index 00000000..516792b3 --- /dev/null +++ b/app/images/icons/arrow-down-left2.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/app/images/icons/arrow-down-right.svg b/app/images/icons/arrow-down-right.svg new file mode 100755 index 00000000..dd8353a0 --- /dev/null +++ b/app/images/icons/arrow-down-right.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/app/images/icons/arrow-down-right2.svg b/app/images/icons/arrow-down-right2.svg new file mode 100755 index 00000000..214a063a --- /dev/null +++ b/app/images/icons/arrow-down-right2.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/app/images/icons/arrow-down.svg b/app/images/icons/arrow-down.svg new file mode 100755 index 00000000..fafdb81c --- /dev/null +++ b/app/images/icons/arrow-down.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/app/images/icons/arrow-down2.svg b/app/images/icons/arrow-down2.svg new file mode 100755 index 00000000..c6f26a16 --- /dev/null +++ b/app/images/icons/arrow-down2.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/app/images/icons/arrow-left.svg b/app/images/icons/arrow-left.svg new file mode 100755 index 00000000..6eddf01a --- /dev/null +++ b/app/images/icons/arrow-left.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/app/images/icons/arrow-left2.svg b/app/images/icons/arrow-left2.svg new file mode 100755 index 00000000..b07eea54 --- /dev/null +++ b/app/images/icons/arrow-left2.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/app/images/icons/arrow-right.svg b/app/images/icons/arrow-right.svg new file mode 100755 index 00000000..c95cbdf4 --- /dev/null +++ b/app/images/icons/arrow-right.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/app/images/icons/arrow-right2.svg b/app/images/icons/arrow-right2.svg new file mode 100755 index 00000000..c69ae923 --- /dev/null +++ b/app/images/icons/arrow-right2.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/app/images/icons/arrow-up-left.svg b/app/images/icons/arrow-up-left.svg new file mode 100755 index 00000000..9fb3ec5b --- /dev/null +++ b/app/images/icons/arrow-up-left.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/app/images/icons/arrow-up-left2.svg b/app/images/icons/arrow-up-left2.svg new file mode 100755 index 00000000..0697ef97 --- /dev/null +++ b/app/images/icons/arrow-up-left2.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/app/images/icons/arrow-up-right.svg b/app/images/icons/arrow-up-right.svg new file mode 100755 index 00000000..07fa395e --- /dev/null +++ b/app/images/icons/arrow-up-right.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/app/images/icons/arrow-up-right2.svg b/app/images/icons/arrow-up-right2.svg new file mode 100755 index 00000000..e1d63292 --- /dev/null +++ b/app/images/icons/arrow-up-right2.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/app/images/icons/arrow-up.svg b/app/images/icons/arrow-up.svg new file mode 100755 index 00000000..2d6e8640 --- /dev/null +++ b/app/images/icons/arrow-up.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/app/images/icons/arrow-up2.svg b/app/images/icons/arrow-up2.svg new file mode 100755 index 00000000..106cd648 --- /dev/null +++ b/app/images/icons/arrow-up2.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/app/images/icons/bin.svg b/app/images/icons/bin.svg new file mode 100755 index 00000000..4b05b645 --- /dev/null +++ b/app/images/icons/bin.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/app/images/icons/blocked.svg b/app/images/icons/blocked.svg new file mode 100755 index 00000000..b5f0b4ac --- /dev/null +++ b/app/images/icons/blocked.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/app/images/icons/cancel-circle.svg b/app/images/icons/cancel-circle.svg new file mode 100755 index 00000000..dfb2f750 --- /dev/null +++ b/app/images/icons/cancel-circle.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/app/images/icons/checkbox-checked.svg b/app/images/icons/checkbox-checked.svg new file mode 100755 index 00000000..af03c18f --- /dev/null +++ b/app/images/icons/checkbox-checked.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/app/images/icons/checkbox-unchecked.svg b/app/images/icons/checkbox-unchecked.svg new file mode 100755 index 00000000..2168d9ee --- /dev/null +++ b/app/images/icons/checkbox-unchecked.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/app/images/icons/checkmark.svg b/app/images/icons/checkmark.svg new file mode 100755 index 00000000..2b716df1 --- /dev/null +++ b/app/images/icons/checkmark.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/app/images/icons/checkmark2.svg b/app/images/icons/checkmark2.svg new file mode 100755 index 00000000..01951762 --- /dev/null +++ b/app/images/icons/checkmark2.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/app/images/icons/circle-down.svg b/app/images/icons/circle-down.svg new file mode 100755 index 00000000..9652b85f --- /dev/null +++ b/app/images/icons/circle-down.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/app/images/icons/circle-left.svg b/app/images/icons/circle-left.svg new file mode 100755 index 00000000..2fac6fbe --- /dev/null +++ b/app/images/icons/circle-left.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/app/images/icons/circle-right.svg b/app/images/icons/circle-right.svg new file mode 100755 index 00000000..3ae9f1db --- /dev/null +++ b/app/images/icons/circle-right.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/app/images/icons/circle-up.svg b/app/images/icons/circle-up.svg new file mode 100755 index 00000000..2798916b --- /dev/null +++ b/app/images/icons/circle-up.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/app/images/icons/clipboard.svg b/app/images/icons/clipboard.svg new file mode 100755 index 00000000..cd6d7384 --- /dev/null +++ b/app/images/icons/clipboard.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/app/images/icons/cloud-check.svg b/app/images/icons/cloud-check.svg new file mode 100755 index 00000000..1e21a0fd --- /dev/null +++ b/app/images/icons/cloud-check.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/app/images/icons/cloud-download.svg b/app/images/icons/cloud-download.svg new file mode 100755 index 00000000..bcaeba24 --- /dev/null +++ b/app/images/icons/cloud-download.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/app/images/icons/cloud-upload.svg b/app/images/icons/cloud-upload.svg new file mode 100755 index 00000000..c2fd0f9d --- /dev/null +++ b/app/images/icons/cloud-upload.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/app/images/icons/cloud.svg b/app/images/icons/cloud.svg new file mode 100755 index 00000000..33e42cb1 --- /dev/null +++ b/app/images/icons/cloud.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/app/images/icons/cog.svg b/app/images/icons/cog.svg new file mode 100755 index 00000000..4b8fcbc0 --- /dev/null +++ b/app/images/icons/cog.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/app/images/icons/cogs.svg b/app/images/icons/cogs.svg new file mode 100755 index 00000000..f065a951 --- /dev/null +++ b/app/images/icons/cogs.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/app/images/icons/coin-dollar.svg b/app/images/icons/coin-dollar.svg new file mode 100755 index 00000000..3b159e58 --- /dev/null +++ b/app/images/icons/coin-dollar.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/app/images/icons/coriolis.svg b/app/images/icons/coriolis.svg new file mode 100644 index 00000000..9b2d1b00 --- /dev/null +++ b/app/images/icons/coriolis.svg @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/app/images/icons/cross.svg b/app/images/icons/cross.svg new file mode 100755 index 00000000..601c1582 --- /dev/null +++ b/app/images/icons/cross.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/app/images/icons/download.svg b/app/images/icons/download.svg new file mode 100755 index 00000000..10bc0a02 --- /dev/null +++ b/app/images/icons/download.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/app/images/icons/enlarge.svg b/app/images/icons/enlarge.svg new file mode 100755 index 00000000..ab9a5a23 --- /dev/null +++ b/app/images/icons/enlarge.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/app/images/icons/enlarge2.svg b/app/images/icons/enlarge2.svg new file mode 100755 index 00000000..f25f27bb --- /dev/null +++ b/app/images/icons/enlarge2.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/app/images/icons/equalizer.svg b/app/images/icons/equalizer.svg new file mode 100755 index 00000000..73db4cbf --- /dev/null +++ b/app/images/icons/equalizer.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/app/images/icons/equalizer2.svg b/app/images/icons/equalizer2.svg new file mode 100755 index 00000000..d1a55665 --- /dev/null +++ b/app/images/icons/equalizer2.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/app/images/icons/floppy-disk.svg b/app/images/icons/floppy-disk.svg new file mode 100755 index 00000000..93c715cf --- /dev/null +++ b/app/images/icons/floppy-disk.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/app/images/icons/github-mark.svg b/app/images/icons/github-mark.svg index e6a247f9..4aca53bf 100644 --- a/app/images/icons/github-mark.svg +++ b/app/images/icons/github-mark.svg @@ -1,3 +1,3 @@ - + diff --git a/app/images/icons/hammer.svg b/app/images/icons/hammer.svg new file mode 100755 index 00000000..3bac473c --- /dev/null +++ b/app/images/icons/hammer.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/app/images/icons/infinite.svg b/app/images/icons/infinite.svg new file mode 100755 index 00000000..b37c52f2 --- /dev/null +++ b/app/images/icons/infinite.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/app/images/icons/info.svg b/app/images/icons/info.svg new file mode 100755 index 00000000..7571aede --- /dev/null +++ b/app/images/icons/info.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/app/images/icons/link.svg b/app/images/icons/link.svg new file mode 100755 index 00000000..8b24b301 --- /dev/null +++ b/app/images/icons/link.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/app/images/icons/logo.svg b/app/images/icons/logo.svg deleted file mode 100644 index 891daf63..00000000 --- a/app/images/icons/logo.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - Layer 1 - - - - - - - - \ No newline at end of file diff --git a/app/images/icons/loop.svg b/app/images/icons/loop.svg new file mode 100755 index 00000000..d60df53c --- /dev/null +++ b/app/images/icons/loop.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/app/images/icons/loop2.svg b/app/images/icons/loop2.svg new file mode 100755 index 00000000..25f330c0 --- /dev/null +++ b/app/images/icons/loop2.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/app/images/icons/menu.svg b/app/images/icons/menu.svg new file mode 100755 index 00000000..0a5bf2db --- /dev/null +++ b/app/images/icons/menu.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/app/images/icons/menu2.svg b/app/images/icons/menu2.svg new file mode 100755 index 00000000..a251d0f9 --- /dev/null +++ b/app/images/icons/menu2.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/app/images/icons/menu3.svg b/app/images/icons/menu3.svg new file mode 100755 index 00000000..3ac19f6e --- /dev/null +++ b/app/images/icons/menu3.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/app/images/icons/menu4.svg b/app/images/icons/menu4.svg new file mode 100755 index 00000000..5b5ca2e4 --- /dev/null +++ b/app/images/icons/menu4.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/app/images/icons/meter.svg b/app/images/icons/meter.svg new file mode 100755 index 00000000..a71d3352 --- /dev/null +++ b/app/images/icons/meter.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/app/images/icons/meter2.svg b/app/images/icons/meter2.svg new file mode 100755 index 00000000..f4536a52 --- /dev/null +++ b/app/images/icons/meter2.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/app/images/icons/minus.svg b/app/images/icons/minus.svg new file mode 100755 index 00000000..e0aec824 --- /dev/null +++ b/app/images/icons/minus.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/app/images/icons/mount-f.svg b/app/images/icons/mount-f.svg index e0f58cf8..7e5fd98d 100644 --- a/app/images/icons/mount-f.svg +++ b/app/images/icons/mount-f.svg @@ -1,12 +1,7 @@ - - - - - Layer 1 - - - - - - + + + + + + \ No newline at end of file diff --git a/app/images/icons/mount-g.svg b/app/images/icons/mount-g.svg index d77e4129..f57ffd33 100644 --- a/app/images/icons/mount-g.svg +++ b/app/images/icons/mount-g.svg @@ -1,9 +1,4 @@ - - - - - Layer 1 - - - + + + \ No newline at end of file diff --git a/app/images/icons/mount-t.svg b/app/images/icons/mount-t.svg index 1daf2b89..bb301efe 100644 --- a/app/images/icons/mount-t.svg +++ b/app/images/icons/mount-t.svg @@ -1,10 +1,5 @@ - - - - - Layer 1 - - - - + + + + \ No newline at end of file diff --git a/app/images/icons/move-down.svg b/app/images/icons/move-down.svg new file mode 100755 index 00000000..645017be --- /dev/null +++ b/app/images/icons/move-down.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/app/images/icons/move-up.svg b/app/images/icons/move-up.svg new file mode 100755 index 00000000..5823d110 --- /dev/null +++ b/app/images/icons/move-up.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/app/images/icons/notification.svg b/app/images/icons/notification.svg new file mode 100755 index 00000000..2c9c22fd --- /dev/null +++ b/app/images/icons/notification.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/app/images/icons/pie-chart.svg b/app/images/icons/pie-chart.svg new file mode 100755 index 00000000..85bea4ca --- /dev/null +++ b/app/images/icons/pie-chart.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/app/images/icons/plus.svg b/app/images/icons/plus.svg new file mode 100755 index 00000000..e0cee422 --- /dev/null +++ b/app/images/icons/plus.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/app/images/icons/power-cord.svg b/app/images/icons/power-cord.svg new file mode 100755 index 00000000..d9c8da6f --- /dev/null +++ b/app/images/icons/power-cord.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/app/images/icons/power.svg b/app/images/icons/power.svg new file mode 100755 index 00000000..234d3097 --- /dev/null +++ b/app/images/icons/power.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/app/images/icons/question.svg b/app/images/icons/question.svg new file mode 100755 index 00000000..4eec41ab --- /dev/null +++ b/app/images/icons/question.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/app/images/icons/radio-checked.svg b/app/images/icons/radio-checked.svg new file mode 100755 index 00000000..c20ef3f8 --- /dev/null +++ b/app/images/icons/radio-checked.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/app/images/icons/radio-checked2.svg b/app/images/icons/radio-checked2.svg new file mode 100755 index 00000000..5fae3bac --- /dev/null +++ b/app/images/icons/radio-checked2.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/app/images/icons/radio-unchecked.svg b/app/images/icons/radio-unchecked.svg new file mode 100755 index 00000000..87d5defe --- /dev/null +++ b/app/images/icons/radio-unchecked.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/app/images/icons/rocket.svg b/app/images/icons/rocket.svg new file mode 100755 index 00000000..af2684f1 --- /dev/null +++ b/app/images/icons/rocket.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/app/images/icons/share.svg b/app/images/icons/share.svg new file mode 100755 index 00000000..5abb7bdf --- /dev/null +++ b/app/images/icons/share.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/app/images/icons/shield.svg b/app/images/icons/shield.svg new file mode 100755 index 00000000..324a72b7 --- /dev/null +++ b/app/images/icons/shield.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/app/images/icons/shrink.svg b/app/images/icons/shrink.svg new file mode 100755 index 00000000..bdd7f454 --- /dev/null +++ b/app/images/icons/shrink.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/app/images/icons/shrink2.svg b/app/images/icons/shrink2.svg new file mode 100755 index 00000000..abcad484 --- /dev/null +++ b/app/images/icons/shrink2.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/app/images/icons/shuffle.svg b/app/images/icons/shuffle.svg new file mode 100755 index 00000000..d77fc75b --- /dev/null +++ b/app/images/icons/shuffle.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/app/images/icons/sort-alpha-asc.svg b/app/images/icons/sort-alpha-asc.svg new file mode 100755 index 00000000..c7274dcd --- /dev/null +++ b/app/images/icons/sort-alpha-asc.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/app/images/icons/sort-alpha-desc.svg b/app/images/icons/sort-alpha-desc.svg new file mode 100755 index 00000000..0851d6e1 --- /dev/null +++ b/app/images/icons/sort-alpha-desc.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/app/images/icons/sort-amount-asc.svg b/app/images/icons/sort-amount-asc.svg new file mode 100755 index 00000000..bcd9e967 --- /dev/null +++ b/app/images/icons/sort-amount-asc.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/app/images/icons/sort-amount-desc.svg b/app/images/icons/sort-amount-desc.svg new file mode 100755 index 00000000..4fa65a92 --- /dev/null +++ b/app/images/icons/sort-amount-desc.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/app/images/icons/sort-numberic-desc.svg b/app/images/icons/sort-numberic-desc.svg new file mode 100755 index 00000000..a8d8594b --- /dev/null +++ b/app/images/icons/sort-numberic-desc.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/app/images/icons/sort-numeric-asc.svg b/app/images/icons/sort-numeric-asc.svg new file mode 100755 index 00000000..b7831aee --- /dev/null +++ b/app/images/icons/sort-numeric-asc.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/app/images/icons/sphere.svg b/app/images/icons/sphere.svg new file mode 100755 index 00000000..63e52897 --- /dev/null +++ b/app/images/icons/sphere.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/app/images/icons/spinner11.svg b/app/images/icons/spinner11.svg new file mode 100755 index 00000000..15cb4cdf --- /dev/null +++ b/app/images/icons/spinner11.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/app/images/icons/stats-bars.svg b/app/images/icons/stats-bars.svg new file mode 100755 index 00000000..5ff267a5 --- /dev/null +++ b/app/images/icons/stats-bars.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/app/images/icons/stats-bars2.svg b/app/images/icons/stats-bars2.svg new file mode 100755 index 00000000..9747e177 --- /dev/null +++ b/app/images/icons/stats-bars2.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/app/images/icons/stats-dots.svg b/app/images/icons/stats-dots.svg new file mode 100755 index 00000000..ecbc953e --- /dev/null +++ b/app/images/icons/stats-dots.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/app/images/icons/switch.svg b/app/images/icons/switch.svg new file mode 100755 index 00000000..4401f3f1 --- /dev/null +++ b/app/images/icons/switch.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/app/images/icons/table.svg b/app/images/icons/table.svg new file mode 100755 index 00000000..0322acb8 --- /dev/null +++ b/app/images/icons/table.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/app/images/icons/table2.svg b/app/images/icons/table2.svg new file mode 100755 index 00000000..46dd152c --- /dev/null +++ b/app/images/icons/table2.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/app/images/icons/target.svg b/app/images/icons/target.svg new file mode 100755 index 00000000..b78367c2 --- /dev/null +++ b/app/images/icons/target.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/app/images/icons/tree.svg b/app/images/icons/tree.svg new file mode 100755 index 00000000..03537e06 --- /dev/null +++ b/app/images/icons/tree.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/app/images/icons/upload.svg b/app/images/icons/upload.svg new file mode 100755 index 00000000..45e3ae6c --- /dev/null +++ b/app/images/icons/upload.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/app/images/icons/warning.svg b/app/images/icons/warning.svg new file mode 100755 index 00000000..d7e2c9f8 --- /dev/null +++ b/app/images/icons/warning.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/app/images/icons/wrench.svg b/app/images/icons/wrench.svg new file mode 100755 index 00000000..825b395f --- /dev/null +++ b/app/images/icons/wrench.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/app/index.html b/app/index.html index 81b04978..f85e53ba 100644 --- a/app/index.html +++ b/app/index.html @@ -23,17 +23,18 @@ +
<%= svgContent %>
-
+
diff --git a/app/js/app.js b/app/js/app.js index 4bce8a08..2a3712ce 100644 --- a/app/js/app.js +++ b/app/js/app.js @@ -1,4 +1,4 @@ -angular.module('app', ['ui.router', 'shipyard', 'ngLodash', 'app.templates']) +angular.module('app', ['ui.router', 'ct.ui.router.extras.sticky', 'shipyard', 'ngLodash', 'app.templates']) .run(['$rootScope', '$location', '$window', '$document','$state','commonArray','shipPurpose','shipSize','hardPointClass','internalGroupMap','hardpointsGroupMap', function ($rootScope, $location, $window, $doc, $state, CArr, shipPurpose, sz, hpc, igMap, hgMap) { // Redirect any state transition errors to the error controller/state $rootScope.$on('$stateChangeError', function(e, toState, toParams, fromState, fromParams, error){ @@ -7,8 +7,11 @@ angular.module('app', ['ui.router', 'shipyard', 'ngLodash', 'app.templates']) }); // Track on Google analytics if available - $rootScope.$on('$stateChangeSuccess', function() { - if ($window.ga) ga('send', 'pageview', {page: $location.path()}); + $rootScope.$on('$stateChangeSuccess', function(e, to, toParams, from, fromParams) { + $rootScope.prevState = { name: from.name, params: fromParams }; + if(to.url) { // Only track states that have a URL + if ($window.ga) ga('send', 'pageview', {page: $location.path()}); + } }); // Global Reference variables @@ -24,6 +27,7 @@ angular.module('app', ['ui.router', 'shipyard', 'ngLodash', 'app.templates']) $rootScope.fCrd = d3.format(',.0f'); $rootScope.fPwr = d3.format(',.2f'); $rootScope.fRound = function(d) { return d3.round(d, 2) }; + $rootScope.fRound4 = function(d) { return d3.round(d, 4) }; $rootScope.fPct = d3.format('.2%'); $rootScope.fRPct = d3.format('%'); $rootScope.fTime = function(d) { return Math.floor(d/60) + ":" + ("00" + (d%60)).substr(-2,2); }; diff --git a/app/js/config.js b/app/js/config.js index 90a3b6d6..c776effa 100644 --- a/app/js/config.js +++ b/app/js/config.js @@ -23,11 +23,20 @@ angular.module('app').config(['$provide','$stateProvider', '$urlRouterProvider', throw { type: 'no-ship', message: $p.shipId }; } }] - } + }, + sticky: true }) - .state('shipyard', { url: '/', templateUrl: 'views/page-shipyard.html', controller: 'ShipyardController' }) - .state('comparison', { url: '/comparison', templateUrl: 'views/page-comparison.html', controller: 'ComparisonController' }) - .state('error', { params: {type:null, message:null, details: null }, templateUrl: 'views/page-error.html', controller: 'ErrorController' }) + .state('shipyard', { url: '/', templateUrl: 'views/page-shipyard.html', controller: 'ShipyardController', sticky: true }) + .state('comparison', { url: '/comparison', templateUrl: 'views/page-comparison.html', controller: 'ComparisonController', sticky: true }) + .state('error', { params: {type:null, message:null, details: null }, templateUrl: 'views/page-error.html', controller: 'ErrorController', sticky: true }) + + // Modal States and views + .state('modal', { abstract: true, views:{ "modal": { templateUrl: "views/_modal.html", controller: 'ModalController' } } }) + .state('modal.about', { views: { "modal-content": { templateUrl: "views/modal-about.html" } } }) + .state('modal.export', { views: { "modal-content": { templateUrl: "views/modal-export.html", controller: 'ExportController' } } }) + .state('modal.import', { views: { "modal-content": { templateUrl: "views/modal-import.html", controller: 'ImportController' } } }) + .state('modal.delete', { views: { "modal-content": { templateUrl: "views/modal-delete.html", controller: 'DeleteController' } } }); + // Redirects $urlRouterProvider.when('/outfit','/outfit/sidewinder/'); diff --git a/app/js/controllers/controller-comparison.js b/app/js/controllers/controller-comparison.js index 90604a9b..3fc28d03 100644 --- a/app/js/controllers/controller-comparison.js +++ b/app/js/controllers/controller-comparison.js @@ -15,10 +15,20 @@ angular.module('app').controller('ComparisonController', ['$rootScope', '$scope' shipId: shipId, buildName: buildName, ship: ship, - code: code + code: code, + pctRetracted: ship.powerRetracted / ship.powerAvailable, + pctDeployed: ship.powerDeployed / ship.powerAvailable, }); } } + $scope.predicate = 'ship.name'; + $scope.desc = false; + + $scope.sort = function (key) { + $scope.desc = ($scope.predicate == key)? !$scope.desc : $scope.desc; + $scope.predicate = key; + } + }]); \ No newline at end of file diff --git a/app/js/controllers/controller-delete.js b/app/js/controllers/controller-delete.js new file mode 100644 index 00000000..2d500916 --- /dev/null +++ b/app/js/controllers/controller-delete.js @@ -0,0 +1,7 @@ +angular.module('app').controller('DeleteController', ['$scope', 'Persist', function ($scope, Persist) { + $scope.deleteAll = function () { + Persist.deleteAll(); + $scope.$parent.dismiss(); + }; + +}]); \ No newline at end of file diff --git a/app/js/controllers/controller-error.js b/app/js/controllers/controller-error.js index 01703696..82801f91 100644 --- a/app/js/controllers/controller-error.js +++ b/app/js/controllers/controller-error.js @@ -25,7 +25,7 @@ angular.module('app') break; default: $rootScope.bodyClass = 'thargoid'; // TODO: create background imag for this - $scope.msgPre = "Uh, this is bad.."; + $scope.msgPre = "Uh, Jameson, we have a problem.."; $scope.errorMessage = $p.message; $scope.details = $p.details; } diff --git a/app/js/controllers/controller-export.js b/app/js/controllers/controller-export.js new file mode 100644 index 00000000..d91954cc --- /dev/null +++ b/app/js/controllers/controller-export.js @@ -0,0 +1,7 @@ +angular.module('app').controller('ExportController', ['$scope', 'Persist', function ($scope, Persist) { + $scope.builds = { + builds: Persist.builds + // TODO: add comparisons + }; + +}]); \ No newline at end of file diff --git a/app/js/controllers/controller-import.js b/app/js/controllers/controller-import.js new file mode 100644 index 00000000..735179dc --- /dev/null +++ b/app/js/controllers/controller-import.js @@ -0,0 +1,96 @@ +angular.module('app').controller('ImportController', ['$scope', 'ShipsDB', 'Ship', 'Persist', 'Serializer', function ($scope, Ships, Ship, Persist, Serializer) { + $scope.jsonValid = false; + $scope.importData = null; + $scope.errorMsg = null; + + $scope.validateJson = function() { + var importObj = null; + $scope.jsonValid = false; + $scope.errorMsg = null; + $scope.builds = null; + $scope.ships = Ships; + + if(!$scope.importData) return; + + try { + importObj = angular.fromJson($scope.importData); + } catch (e) { + $scope.errorMsg = 'Cannot Parse JSON!'; + return; + } + + if(typeof importObj != 'object') { + $scope.errorMsg = 'Must be an object!'; + return; + } + + if ((!importObj.builds || !Object.keys(importObj.builds).length) && (!importObj.comparisons || !Object.keys(importObj.comparisons).length)) { + $scope.errorMsg = 'No builds or comparisons in data'; + return; + } + + for (var shipId in importObj.builds) { + var shipData = Ships[shipId]; + if (shipData) { + for (buildName in importObj.builds[shipId]) { + if (typeof importObj.builds[shipId][buildName] != 'string') { + $scope.errorMsg = shipData.properties.name + ' build "' + buildName + '" must be a string!'; + return; + } + try { + // Actually build the ship with the code to ensure it's valid + Serializer.toShip(new Ship(shipId, shipData.properties, shipData.slots), importObj.builds[shipId][buildName]); + } catch (e) { + console.log(e); + $scope.errorMsg = shipData.properties.name + ' build "' + buildName + '" is not valid!'; + return; + } + } + } else { + $scope.errorMsg = '"' + shipId + '" is not a valid Ship Id!'; + return; + } + $scope.builds = importObj.builds; + } + + // Check for comparison object + // if (importObj.comparisons) + + $scope.jsonValid = true; + }; + + $scope.hasBuild = function (shipId, name) { + return Persist.getBuild(shipId, name) != null; + } + + $scope.process = function() { + var builds = $scope.builds; + for (var shipId in builds) { + for (var buildName in builds[shipId]) { + var code = builds[shipId][buildName]; + // Update builds object such that orginal name retained, but can be renamed + builds[shipId][buildName] = { + code: code, + useName: buildName + }; + } + } + + $scope.processed = true; + }; + + $scope.import = function() { + var builds = $scope.builds; + for (var shipId in builds) { + for (var buildName in builds[shipId]) { + var build = builds[shipId][buildName]; + var name = build.useName.trim(); + if (name) { + Persist.saveBuild(shipId, name, build.code); + } + } + } + $scope.$parent.dismiss(); + }; + +}]); \ No newline at end of file diff --git a/app/js/controllers/controller-modal.js b/app/js/controllers/controller-modal.js new file mode 100644 index 00000000..614b2256 --- /dev/null +++ b/app/js/controllers/controller-modal.js @@ -0,0 +1,14 @@ +angular.module('app').controller('ModalController', ['$rootScope','$scope', '$state', function ($rootScope, $scope, $state) { + var dismissListener; + $scope.dismiss = function() { + if ($rootScope.prevState) { + var state = $rootScope.prevState; + $state.go(state.name, state.params, {location: 'replace', reload: false}); + } else { + $state.go('shipyard'); + } + } + + $scope.$on('close', $scope.dismiss); + +}]); \ No newline at end of file diff --git a/app/js/controllers/controller-outfit.js b/app/js/controllers/controller-outfit.js index 1f336f0f..c71150c8 100644 --- a/app/js/controllers/controller-outfit.js +++ b/app/js/controllers/controller-outfit.js @@ -135,7 +135,7 @@ angular.module('app').controller('OutfitController', ['$rootScope','$scope', '$s } // Event listeners - $rootScope.$on('keyup', function (e, keyEvent) { + $scope.$on('keyup', function (e, keyEvent) { // CTRL + S or CMD + S will override the default and save the build is possible if (keyEvent.keycode == 83 && keyEvent.ctrlKey) { e.preventDefault(); @@ -144,12 +144,12 @@ angular.module('app').controller('OutfitController', ['$rootScope','$scope', '$s }); // Hide any open menu/slot/etc if escape key is pressed - $rootScope.$on('escape', function (e, keyEvent) { + $scope.$on('escape', function (e, keyEvent) { $scope.selectedSlot = null; $scope.$apply(); }); // Hide any open menu/slot/etc if the background is clicked - $rootScope.$on('close', function (e, keyEvent) { + $scope.$on('close', function (e, keyEvent) { $scope.selectedSlot = null; }); diff --git a/app/js/directives/directive-component-select.js b/app/js/directives/directive-component-select.js index 4c54119d..2534c261 100644 --- a/app/js/directives/directive-component-select.js +++ b/app/js/directives/directive-component-select.js @@ -10,7 +10,11 @@ angular.module('app').directive('componentSelect', function() { list.push('
  • ', o.class, o.rating); + list.push((o.maxmass && mass > o.maxmass)? ' disabled"' : '" cpid="', id, '">'); + if(o.mode) { + list.push(' '); + } + list.push(o.class, o.rating); if(o.mode) { list.push('/' + o.mode); if(o.missile) { diff --git a/app/js/directives/directive-header.js b/app/js/directives/directive-header.js index 6218f1ed..4fe2b85d 100644 --- a/app/js/directives/directive-header.js +++ b/app/js/directives/directive-header.js @@ -43,7 +43,7 @@ angular.module('app').directive('shipyardHeader', ['lodash','$rootScope', 'Persi return; } - if (menu == 'b' && !scope.bs.hasBuilds) { + if ((menu == 'comp' || menu == 'b') && !scope.bs.hasBuilds) { scope.openedMenu = null; return; } diff --git a/app/js/service-persist.js b/app/js/service-persist.js index a1df0564..cba5cb47 100644 --- a/app/js/service-persist.js +++ b/app/js/service-persist.js @@ -2,12 +2,13 @@ * [description] */ angular.module('app').service('Persist', ['lodash', function (_) { - var LS_KEY = 'builds'; + var LS_KEY_BUILDS = 'builds'; + var LS_KEY_COMPARISONS = 'comparisons'; - var buildJson = localStorage.getItem(LS_KEY); + var buildJson = localStorage.getItem(LS_KEY_BUILDS); if (buildJson) { - this.builds = angular.fromJson(localStorage.getItem(LS_KEY)); + this.builds = angular.fromJson(localStorage.getItem(LS_KEY_BUILDS)); } else { this.builds = {}; } @@ -29,8 +30,8 @@ angular.module('app').service('Persist', ['lodash', function (_) { this.builds[shipId][name] = code; this.state.hasBuilds = true; - // Persist updated build collection to localstorage - localStorage.setItem(LS_KEY, angular.toJson(this.builds)); + // Persist updated build collection to localStorage + localStorage.setItem(LS_KEY_BUILDS, angular.toJson(this.builds)); } /** @@ -62,9 +63,20 @@ angular.module('app').service('Persist', ['lodash', function (_) { delete this.builds[shipId]; this.state.hasBuilds = Object.keys(this.builds).length > 0; } - // Persist updated build collection to localstorage - localStorage.setItem(LS_KEY, angular.toJson(this.builds)); + // Persist updated build collection to localStorage + localStorage.setItem(LS_KEY_BUILDS, angular.toJson(this.builds)); } } + /** + * Delete all builds and comparisons from localStorage + */ + this.deleteAll = function() { + angular.copy({}, this.builds); // Empty object but keep original instance + angular.copy({}, this.comparisons); + this.state.hasBuilds = false; + localStorage.removeItem(LS_KEY_BUILDS); + localStorage.removeItem(LS_KEY_COMPARISONS); + } + }]); diff --git a/app/js/shipyard/factory-ship.js b/app/js/shipyard/factory-ship.js index 20e96eca..bd77b191 100644 --- a/app/js/shipyard/factory-ship.js +++ b/app/js/shipyard/factory-ship.js @@ -12,7 +12,6 @@ angular.module('shipyard').factory('Ship', ['Components', 'calcShieldStrength', this.incCost = true; this.cargoScoop = { enabled: true, c: Components.cargoScoop() }; this.bulkheads = { incCost: true, maxClass: 8 }; - this.sgSI = null; // Shield Generator Index for (p in properties) { this[p] = properties[p]; } // Copy all base properties from shipData @@ -56,9 +55,6 @@ angular.module('shipyard').factory('Ship', ['Components', 'calcShieldStrength', if (comps.internal[i] !== 0) { internal[i].id = comps.internal[i]; internal[i].c = Components.internal(comps.internal[i]); - if (internal[i].c.grp == 'sg') { - this.sgSI = i; - } } else { internal[i].id = internal[i].c = null; } @@ -70,28 +66,30 @@ angular.module('shipyard').factory('Ship', ['Components', 'calcShieldStrength', * Updates the ship totals based on the components for every slot. */ Ship.prototype.updateTotals = function() { - var c = _.reduce(this.common, optsSum, {cost: 0, power: 0, mass: 0, capacity: 0}); + var c = _.reduce(this.common, optsSum, {cost: 0, power: 0, mass: 0}); var i = _.reduce(this.internal, optsSum, {cost: 0, power: 0, mass: 0, capacity: 0, armouradd: 0}); - var h = _.reduce(this.hardpoints, optsSum, {cost: 0, power: 0, mass: 0, shieldmul: 1}); - var fsd = this.common[2].c; // Frame Shift Drive; + var h = _.reduce(this.hardpoints, hpSum, {cost: 0, active: 0, passive: 0, mass: 0, shieldmul: 1}); + var fsd = this.common[2].c; // Frame Shift Drive; + var sgSI = this.findInternalByGroup('sg'); // Find Shield Generator slot Index if any this.totalCost = c.cost + i.cost + h.cost + (this.incCost? this.cost : 0) + (this.bulkheads.incCost? this.bulkheads.c.cost : 0); this.unladenMass = c.mass + i.mass + h.mass + this.mass + this.bulkheads.c.mass; - this.powerAvailable = this.common[0].c.pGen; + this.powerAvailable = this.common[0].c.pGen; // Power Plant this.fuelCapacity = this.common[6].c.capacity; - this.maxMass = this.common[1].c.maxmass; + this.maxMass = this.common[1].c.maxmass; // Thrusters Max Mass this.cargoCapacity = i.capacity; this.ladenMass = this.unladenMass + this.cargoCapacity + this.fuelCapacity; - this.powerRetracted = c.power + i.power + (this.cargoScoop.enabled? this.cargoScoop.c.power : 0); - this.powerDeployed = this.powerRetracted + h.power; + this.powerRetracted = c.power + i.power + h.passive + (this.cargoScoop.enabled? this.cargoScoop.c.power : 0); + this.powerDeployed = this.powerRetracted + h.active; this.armourAdded = i.armouradd; this.shieldMultiplier = h.shieldmul; this.unladenJumpRange = calcJumpRange(this.unladenMass + fsd.maxfuel, fsd); // Include fuel weight for jump this.ladenJumpRange = calcJumpRange(this.ladenMass, fsd); - this.shieldStrength = this.sgSI !== null? calcShieldStrength(this.mass, this.shields, this.internal[this.sgSI].c, this.shieldMultiplier) : 0; + this.shieldStrength = sgSI != -1? calcShieldStrength(this.mass, this.shields, this.internal[sgSI].c, this.shieldMultiplier) : 0; this.armourTotal = this.armourAdded + this.armour; - // TODO: shield recharge rate + // TODO: shield recharge rate based pips, shield generator, power distributor // TODO: armor bonus / damage reduction for bulkheads + // TODO: Damage / DPS total (for all weapons) }; /** @@ -104,17 +102,35 @@ angular.module('shipyard').factory('Ship', ['Components', 'calcShieldStrength', */ function optsSum(sum, slot) { var c = slot.c - if (c) { // The slot has a component mounted + if (c) { // The slot has a component installed sum.cost += (slot.incCost && c.cost)? c.cost : 0; sum.power += (slot.enabled && c.power)? c.power : 0; sum.mass += c.mass || 0; sum.capacity += c.capacity || 0; - sum.shieldmul += c.shieldmul || 0; sum.armouradd += c.armouradd || 0; } return sum; } + /** + * Utilify function for summing the hardpoint properties + * + * @private + * @param {object} sum Sum of cost, power, etc + * @param {object} slot Slot object + * @return {object} The mutated sum object + */ + function hpSum(sum, slot) { + var c = slot.c + if (c) { // The slot has a component installed + sum.cost += (slot.incCost && c.cost)? c.cost : 0; + sum[c.passive? 'passive': 'active'] += slot.enabled? c.power : 0; + sum.mass += c.mass || 0; + sum.shieldmul += c.shieldmul || 0; + } + return sum; + } + Ship.prototype.useBulkhead = function(index) { this.bulkheads.id = index; this.bulkheads.c = Components.bulkheads(this.id, index); @@ -123,40 +139,44 @@ angular.module('shipyard').factory('Ship', ['Components', 'calcShieldStrength', /** * Update a slot with a the component if the id is different from the current id for this slot. - * Frees the slot of the current component if the id matches the current id for the slot. + * Has logic handling components that you may only have 1 of (Shield Generator or Refinery). * * @param {object} slot The component slot * @param {string} id Unique ID for the selected component * @param {object} component Properties for the selected component */ Ship.prototype.use = function(slot, id, component) { - // TODO: only single refinery allowed if (slot.id != id) { // Selecting a different component - slot.id = id; - slot.c = component; var slotIndex = this.internal.indexOf(slot); - if(slot.id == null) { // Slot has been emptied - if(this.sgSI == slotIndex) { // The slot containing the shield generator was emptied - this.sgSI = null; - } - } else { - // Selected component is a Shield Generator - if(component.grp == 'sg') { - // You can only have one shield Generator - if (this.sgSI !== null && this.sgSI != slotIndex) { - // A shield generator is already selected in a different slot - this.internal[this.sgSI].id = null; - this.internal[this.sgSI].c = null; - } - this.sgSI = slotIndex; - // Replacing a shield generator with something else - } else if (this.sgSI == slotIndex) { - this.sgSI = null; + // Slot is an internal slot, is not being emptied, and the selected component group/type must be of unique + if(slotIndex != -1 && component && (component.grp == 'sg' || component.grp || 'rf')) { + // Find another internal slot that already has this type/group installed + var similarSlotIndex = this.findInternalByGroup(component.grp); + // If another slot has an installed component with of the same type + if (similarSlotIndex != -1 && similarSlotIndex != slotIndex) { + // Empty the slot + this.internal[similarSlotIndex].id = null; + this.internal[similarSlotIndex].c = null; } } + // Update slot with selected component (or empty) + slot.id = id; + slot.c = component; this.updateTotals(); } }; + /** + * Find an internal slot that has an installed component of the specific group. + * + * @param {string} group Component group/type + * @return {number} The index of the slot in ship.internal + */ + Ship.prototype.findInternalByGroup = function(group) { + return _.findIndex(this.internal, function (slot) { + return slot.c && slot.c.grp == group; + }); + }; + return Ship; }]); diff --git a/app/less/app.less b/app/less/app.less index 994cc333..e1af79c6 100644 --- a/app/less/app.less +++ b/app/less/app.less @@ -12,6 +12,7 @@ @import 'select'; @import 'modal'; @import 'charts'; +@import 'buttons'; @import 'error'; @@ -70,6 +71,10 @@ h2 { font-family: @fTitle; } +u { // Unit (Mj, Km, etc) + font-size: 0.8em; + text-decoration: none; +} a, a:visited { color: @fg; diff --git a/app/less/buttons.less b/app/less/buttons.less new file mode 100644 index 00000000..0ab5daf1 --- /dev/null +++ b/app/less/buttons.less @@ -0,0 +1,25 @@ +button { + .border-radius(0); + color: @primary; + fill: @primary; + border: 1px solid @primary; + font-family: @fStandard; + border: 1px solid; + padding: 0.5em; + cursor: pointer; + background: none; + outline: none; + + &.danger { + color: red; + fill: red; + border: 1px solid red; + } + + &:disabled { + cursor: not-allowed; + color: @disabled; + fill: @disabled; + border: 1px solid @disabled; + } +} \ No newline at end of file diff --git a/app/less/charts.less b/app/less/charts.less index e87a040f..fad71c2d 100644 --- a/app/less/charts.less +++ b/app/less/charts.less @@ -1,5 +1,5 @@ -svg { +svg.chart { .user-select-none(); display: block; width:100%; diff --git a/app/less/colors.less b/app/less/colors.less index aed4968f..557bcdf2 100644 --- a/app/less/colors.less +++ b/app/less/colors.less @@ -19,3 +19,23 @@ @primary-bg: fadeout(darken(@primary, 45%), 20%); @secondary-bg: fadeout(darken(@secondary, @bgDarken), @bgTransparency); // Brown background @warning-bg: fadeout(darken(@warning, @bgDarken), @bgTransparency); // Dark Red + +.disabled { + color: @disabled; + fill: @disabled; +} + +.primary { + color: @primary; + fill: @primary; +} + +.warning { + color: @warning; + fill: @warning; +} + +.warning-disabled { + color: @warning-disabled; + fill: @warning-disabled; +} diff --git a/app/less/fonts.less b/app/less/fonts.less index b738157d..fea76daf 100644 --- a/app/less/fonts.less +++ b/app/less/fonts.less @@ -70,17 +70,5 @@ font-style: normal; } -@font-face { - font-family: 'icons'; - src:url('fonts/icons.eot?-dwuzoa'); - src:url('fonts/icons.eot?#iefix-dwuzoa') format('embedded-opentype'), - url('fonts/icons.woff?-dwuzoa') format('woff'), - url('fonts/icons.ttf?-dwuzoa') format('truetype'), - url('fonts/icons.svg?-dwuzoa#icons') format('svg'); - font-weight: normal; - font-style: normal; -} - @fStandard: 'eurocaps', Helvetica, sans-serif; @fTitle: 'Orbitron-Regular', Arial, sans-serif; - diff --git a/app/less/header.less b/app/less/header.less index 5ca95642..6431028e 100644 --- a/app/less/header.less +++ b/app/less/header.less @@ -2,8 +2,8 @@ header { background-color: @bg; margin: 0; padding: 0 1em; - height: 4em; - line-height: 4em; + height: 3em; + line-height: 3em; font-family: @fTitle; vertical-align: middle; position: relative; @@ -43,7 +43,6 @@ header { } .menu-list { - width: 25em; font-family: @fStandard; position: absolute; padding: 1em 1em; @@ -51,8 +50,12 @@ header { background-color: @bgBlack; font-size: 0.8em; - &.sm { - width: auto; + &.dbl { + width: 22.5em; + ul { + float: left; + width: 10em; + } } hr { @@ -66,6 +69,7 @@ header { margin: 0.5em 1em 0 0; padding: 0; line-height: 2em; + white-space: nowrap; } li { @@ -80,6 +84,10 @@ header { text-decoration: none; white-space: nowrap; + &.build-name { + font-family: Helvetica, sans-serif; + } + &:visited { color: @warning; } diff --git a/app/less/icons.less b/app/less/icons.less index 4e55aa4e..a58f0e5e 100644 --- a/app/less/icons.less +++ b/app/less/icons.less @@ -4,434 +4,27 @@ background-repeat: no-repeat; background-position: center; background-size: contain; -} - -.icon { + vertical-align: middle; width: 1em; height: 1em; -} - -.icon-sm { - width: 0.75em; - height: 0.75em; -} - -.icon-tiny { - width: 0.5em; - height: 0.5em; -} - -.icon-l { - width: 1.5em; - height: 1.5em; -} - -.icon-xl { - width: 3em; - height: 3em; -} - -.shipyard { - background-image: url(images/icons/logo.svg); -} - -.reddit { - background-image: url(images/icons/reddit.svg); -} - - -.ico-l { - font-size: 2em; -} - -.ico-xl { - font-size: 3em; -} - -.ico { - font-family: 'icons'; - font-variant: normal; - text-transform: none; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} - -.ico-coin-dollar:before { - content: "\e93b"; -} - -.ico-download:before { - content: "\e960"; -} - -.ico-upload:before { - content: "\e961"; -} - -.ico-floppy-disk:before { - content: "\e962"; -} - -.ico-spinner4:before { - content: "\e97d"; -} - -.ico-spinner11:before { - content: "\e984"; -} - -.ico-enlarge:before { - content: "\e989"; -} - -.ico-shrink:before { - content: "\e98a"; -} - -.ico-enlarge2:before { - content: "\e98b"; -} - -.ico-shrink2:before { - content: "\e98c"; -} - -.ico-wrench:before { - content: "\e991"; -} - -.ico-equalizer:before { - content: "\e992"; -} - -.ico-equalizer2:before { - content: "\e993"; -} - -.ico-cog:before { - content: "\e994"; -} - -.ico-cogs:before { - content: "\e995"; -} - -.ico-hammer:before { - content: "\e996"; -} - -.ico-pie-chart:before { - content: "\e99a"; -} - -.ico-stats-dots:before { - content: "\e99b"; -} - -.ico-stats-bars:before { - content: "\e99c"; -} - -.ico-stats-bars2:before { - content: "\e99d"; -} - -.ico-rocket:before { - content: "\e9a5"; -} - -.ico-meter:before { - content: "\e9a6"; -} - -.ico-meter2:before { - content: "\e9a7"; -} - -.ico-bin:before { - content: "\e9ac"; -} - -.ico-target:before { - content: "\e9b3"; -} - -.ico-shield:before { - content: "\e9b4"; -} - -.ico-power:before { - content: "\e9b5"; -} - -.ico-switch:before { - content: "\e9b6"; -} - -.ico-power-cord:before { - content: "\e9b7"; -} - -.ico-clipboard:before { - content: "\e9b8"; -} - -.ico-tree:before { - content: "\e9bc"; -} - -.ico-menu:before { - content: "\e9bd"; -} - -.ico-menu2:before { - content: "\e9be"; -} - -.ico-menu3:before { - content: "\e9bf"; -} - -.ico-menu4:before { - content: "\e9c0"; -} - -.ico-cloud:before { - content: "\e9c1"; -} - -.ico-cloud-download:before { - content: "\e9c2"; -} - -.ico-cloud-upload:before { - content: "\e9c3"; -} - -.ico-cloud-check:before { - content: "\e9c4"; -} - -.ico-link:before { - content: "\e9cb"; -} - -.ico-warning:before { - content: "\ea07"; -} - -.ico-notification:before { - content: "\ea08"; -} - -.ico-question:before { - content: "\ea09"; -} - -.ico-plus:before { - content: "\ea0a"; -} - -.ico-minus:before { - content: "\ea0b"; -} - -.ico-info:before { - content: "\ea0c"; -} - -.ico-cancel-circle:before { - content: "\ea0d"; -} - -.ico-blocked:before { - content: "\ea0e"; -} - -.ico-cross:before { - content: "\ea0f"; -} - -.ico-checkmark:before { - content: "\ea10"; -} - -.ico-checkmark2:before { - content: "\ea11"; -} - -.ico-loop:before { - content: "\ea2d"; -} - -.ico-loop2:before { - content: "\ea2e"; -} - -.ico-infinite:before { - content: "\ea2f"; -} - -.ico-shuffle:before { - content: "\ea30"; -} - -.ico-arrow-up-left:before { - content: "\ea31"; -} - -.ico-arrow-up:before { - content: "\ea32"; -} - -.ico-arrow-up-right:before { - content: "\ea33"; -} - -.ico-arrow-right:before { - content: "\ea34"; -} - -.ico-arrow-down-right:before { - content: "\ea35"; -} - -.ico-arrow-down:before { - content: "\ea36"; -} - -.ico-arrow-down-left:before { - content: "\ea37"; -} - -.ico-arrow-left:before { - content: "\ea38"; -} - -.ico-arrow-up-left2:before { - content: "\ea39"; -} - -.ico-arrow-up2:before { - content: "\ea3a"; -} - -.ico-arrow-up-right2:before { - content: "\ea3b"; -} - -.ico-arrow-right2:before { - content: "\ea3c"; -} - -.ico-arrow-down-right2:before { - content: "\ea3d"; -} - -.ico-arrow-down2:before { - content: "\ea3e"; -} - -.ico-arrow-down-left2:before { - content: "\ea3f"; -} - -.ico-arrow-left2:before { - content: "\ea40"; -} - -.ico-circle-up:before { - content: "\ea41"; -} - -.ico-circle-right:before { - content: "\ea42"; -} - -.ico-circle-down:before { - content: "\ea43"; -} - -.ico-circle-left:before { - content: "\ea44"; -} - -.ico-tab:before { - content: "\ea45"; -} - -.ico-move-up:before { - content: "\ea46"; -} - -.ico-move-down:before { - content: "\ea47"; -} - -.ico-sort-alpha-asc:before { - content: "\ea48"; -} - -.ico-sort-alpha-desc:before { - content: "\ea49"; -} - -.ico-sort-numeric-asc:before { - content: "\ea4a"; -} - -.ico-sort-numberic-desc:before { - content: "\ea4b"; -} - -.ico-sort-amount-asc:before { - content: "\ea4c"; -} - -.ico-sort-amount-desc:before { - content: "\ea4d"; -} - -.ico-checkbox-checked:before { - content: "\ea52"; -} - -.ico-checkbox-unchecked:before { - content: "\ea53"; -} - -.ico-radio-checked:before { - content: "\ea54"; -} - -.ico-radio-checked2:before { - content: "\ea55"; -} - -.ico-radio-unchecked:before { - content: "\ea56"; -} - -.ico-table:before { - content: "\ea70"; -} - -.ico-table2:before { - content: "\ea71"; -} - -.ico-share:before { - content: "\ea7d"; -} - -.ico-share2:before { - content: "\ea82"; -} - -.ico-github:before { - content: "\eab1"; -} -.ico-github4:before { - content: "\eab4"; + &.sm { + width: 0.75em; + height: 0.75em; + } + + &.tn { + width: 0.5em; + height: 0.5em; + } + + &.lg { + width: 1.5em; + height: 1.5em; + } + + &.xl { + width: 2em; + height: 2em; + } } diff --git a/app/less/modal.less b/app/less/modal.less index 8ce841ac..4911ede4 100644 --- a/app/less/modal.less +++ b/app/less/modal.less @@ -8,12 +8,17 @@ left: 0; right: 0; background-color: rgba(0,0,0,0.5); + .user-select-none(); } .modal { - width: 50%; + position: absolute; + left:50%; top:50%; + transform:translate(-50%,-50%); + -webkit-transform:translate(-50%,-50%); + + max-width: 75%; padding: 3em; - margin: 10em auto 0; background-color: @bgBlack; border: 1px solid @primary; @@ -24,13 +29,34 @@ h2 { margin: 0; } + p { + text-align: justify; + } +} + +textarea { + background: @primary-bg; + border: none; + outline: none; + color: @primary-disabled; + + &.json { + display:block; + width:40em; + height: 10em; + resize: vertical; + margin:2em 0; + } +} + + +input { + background: @primary-bg; + border: 1px solid @primary-disabled; + color: @secondary-disabled; + outline: none; } .dismiss { - outline: none; background-color: @primary-bg; - font-family: @fStandard; - color: @primary; - line-height: 1.5em; - border: 1px solid @primary; } \ No newline at end of file diff --git a/app/less/outfit.less b/app/less/outfit.less index aafbd187..50017694 100644 --- a/app/less/outfit.less +++ b/app/less/outfit.less @@ -16,15 +16,20 @@ line-height: 2em; input { - background: @primary-bg; - color: @secondary; + background: none; + color: @secondary-disabled; outline: none; - border: none; font-size: 0.8em; line-height: 2em; - text-align: right; + text-align: center; + border: 1px solid @secondary-disabled; + box-sizing: border-box; + display: block; + width: 100%; + margin-bottom: 0.5em; &:hover, &:focus { - background-color: @secondary-bg; + border: 1px solid @secondary; + color: @secondary; } } } @@ -48,10 +53,6 @@ } } -u { // Unit (Mj, Km, etc) - font-size: 0.8em; - text-decoration: none; -} #summary { .user-select-none(); diff --git a/app/less/select.less b/app/less/select.less index d4374a39..09f7fd0a 100644 --- a/app/less/select.less +++ b/app/less/select.less @@ -23,16 +23,21 @@ cursor: pointer; color: @primary-disabled; + stroke-width: 1em; + stroke: @primary-disabled; &:hover { color: @warning; + stroke: @warning; } &.disabled { cursor: not-allowed; color: @disabled; + stroke: @disabled; } &.active { color: @secondary; + stroke: @secondary; } } @@ -48,17 +53,6 @@ text-align: center; } - &.hardpoint { - .c { - width: 4em; - /* &:nth-child(3n + 1) { - clear: left; - } - &:nth-child(5n +1) { - clear: none; - }*/ - } - } .c { border:1px solid @primary-disabled; @@ -74,10 +68,6 @@ border:1px solid @warning; } - /*&:nth-child(5n +1) { - clear: left; - }*/ - &.disabled { border:1px solid @disabled; } @@ -93,4 +83,15 @@ list-style: none; overflow: hidden; } + + &.hardpoint { + .c { + width: auto; + padding: 0.1em 0.5em; + } + ul { + margin-left: 1em; + } + } + } diff --git a/app/less/table.less b/app/less/table.less index 79a457f6..019869ed 100644 --- a/app/less/table.less +++ b/app/less/table.less @@ -4,8 +4,10 @@ table { background-color: @primary-bg; border-spacing: 0; font-size: 0.8em; + cursor: default; - a { + a, a:visited { + color: @primary; text-decoration: none; } } @@ -13,22 +15,61 @@ table { thead { color: @bgBlack; background-color: @primary-disabled; + .user-select-none(); + + .main th { + border-left: 1px solid @primary-bg; + + &:first-child { + border-left: none; + } + } + + th { + + padding: 0 0.75em; + + &[ng-click] { + cursor: pointer; + &:hover { + color: @primary; + } + } + + &.lft { + border-left: 1px solid @primary-bg; + } + } } tbody tr { - &:hover { - color: #000; - background-color: @secondary; - } -} + &.tr { + color: @disabled; + text-align: right; + + &:hover { + color: @fg; + background-color: @warning-bg; + } + + td { + padding: 0 0.7em; + } + } -th { - padding: 0.1em 0.5em; } td { - padding-left: 0.5em; font-size: 0.9em; -} \ No newline at end of file + + &.tl { + text-align: left; + padding-left: 0.7em; + } + + &.tc { + text-align: center; + } +} diff --git a/app/views/_header.html b/app/views/_header.html index d62ba354..0efe5007 100644 --- a/app/views/_header.html +++ b/app/views/_header.html @@ -1,59 +1,65 @@
    -
    +
    \ No newline at end of file diff --git a/app/views/_modal.html b/app/views/_modal.html new file mode 100644 index 00000000..946cf418 --- /dev/null +++ b/app/views/_modal.html @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/app/views/_slot-internal.html b/app/views/_slot-internal.html index 6f1241fe..15aeca70 100644 --- a/app/views/_slot-internal.html +++ b/app/views/_slot-internal.html @@ -7,6 +7,7 @@
    Opt: {{c.c.optmass}} T
    Max: {{c.c.optmass}} T
    {{c.c.bins}} Bins
    +
    Rate: {{$r.fRound4(c.c.rate/1000)}} T/s
    Ammo: {{c.c.ammo}}
    Repair: {{c.c.repair}}
    {{c.c.range}} KM
    diff --git a/app/views/about.html b/app/views/about.html deleted file mode 100644 index eff71299..00000000 --- a/app/views/about.html +++ /dev/null @@ -1,15 +0,0 @@ - \ No newline at end of file diff --git a/app/views/modal-about.html b/app/views/modal-about.html new file mode 100644 index 00000000..7027f6fe --- /dev/null +++ b/app/views/modal-about.html @@ -0,0 +1,13 @@ +

    Coriolis

    +

    The Coriolis project was inspired by E:D Shipyard and, of course, +Elite Dangerous. The ultimate goal of Coriolis is to provide rich features to support in-game play and planning while engaging the E:D community to support its development.

    + +

    Coriolis was created for non-commercial purposes. It is not endorsed by nor reflects the views or opinions of Frontier Developments.

    + +

    Github

    +github.com/cmmcleod/coriolis +

    + Coriolis is an open source project. Checkout the list of upcoming features and to-do list on github. + Any and all contributions and feedback are welcome. If you encounter any bugs please report them and provide as much detail as possible. +

    + \ No newline at end of file diff --git a/app/views/modal-delete.html b/app/views/modal-delete.html new file mode 100644 index 00000000..2e5c4680 --- /dev/null +++ b/app/views/modal-delete.html @@ -0,0 +1,4 @@ +

    Delete All

    +

    Are you sure?

    + + \ No newline at end of file diff --git a/app/views/modal-export.html b/app/views/modal-export.html new file mode 100644 index 00000000..92fdc4ff --- /dev/null +++ b/app/views/modal-export.html @@ -0,0 +1,5 @@ +

    Export

    +
    + +
    + \ No newline at end of file diff --git a/app/views/modal-import.html b/app/views/modal-import.html new file mode 100644 index 00000000..1f5af619 --- /dev/null +++ b/app/views/modal-import.html @@ -0,0 +1,26 @@ +

    Import

    +
    + + +
    {{errorMsg}}
    +
    + +
    + + + + + + + + + +
    ShipBuild NameAction
    {{ships[shipId].properties.name}} + {{ hasBuild(shipId, b.useName)? 'Overwrite' : 'Create' }} + Skip +
    + + +
    + + \ No newline at end of file diff --git a/app/views/page-comparison.html b/app/views/page-comparison.html index 6e27b7dd..4fdcb97d 100644 --- a/app/views/page-comparison.html +++ b/app/views/page-comparison.html @@ -3,44 +3,53 @@ - - - - - - - - + + + + + + + + - - - + + + - + - - - + + + + + + + + + + + + - - - - - - + + + + + + - + - + - + diff --git a/app/views/page-outfit.html b/app/views/page-outfit.html index 7314d7e3..af70fee7 100644 --- a/app/views/page-outfit.html +++ b/app/views/page-outfit.html @@ -124,10 +124,18 @@

    - - - - + + + +
    @@ -188,7 +196,7 @@
    {{c.c.class}}{{c.c.rating}} {{c.c.name || hgMap[c.c.grp]}}
    {{fPwr(c.c.power)}}
    -
    +
    {{c.c.class}}{{c.c.rating}} {{c.c.name || igMap[c.c.grp]}}
    {{fPwr(c.c.power)}}
    diff --git a/bower.json b/bower.json index eb2d5624..8de23128 100644 --- a/bower.json +++ b/bower.json @@ -1,14 +1,10 @@ { "name": "coriolis_shipyard", - "version": "0.2.0", "authors": [ "Colin McLeod " ], "description": "Coriolis Shipyard for Elite Dangerous", "main": "app/app.js", - "moduleType": [ - "amd" - ], "keywords": [ "elite", "shipyard" @@ -25,7 +21,15 @@ "dependencies": { "d3": "~3.5.5", "ng-lodash": "~0.2.0", + "ui-router-extras": "~0.0.13", "angular-ui-router": "^0.2.14" }, - "overrides": {} + "overrides": { + "ui-router-extras": { + "main": [ + "release/modular/ct-ui-router-extras.core.min.js", + "release/modular/ct-ui-router-extras.sticky.min.js" + ] + } + } } diff --git a/data/component_ids.md b/data/component_ids.md deleted file mode 100644 index 2120d4a9..00000000 --- a/data/component_ids.md +++ /dev/null @@ -1,21 +0,0 @@ - -2h - Basic Discovery scanner - -Shield Generator - 3v - 2E - 44 - 3E - 49 - 4E - 4e - 5E - 4j - 6E - 4o - 7E - 4t - 8E - -Cargo Hold - 00 - 1E - 01 - 2E - 02 - 3E - 03 - 4E - 04 - 5E - 05 - 6E - 06 - 7E - 07 - 8E \ No newline at end of file diff --git a/gulpfile.js b/gulpfile.js index a54d1d52..16d2ad42 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -15,6 +15,8 @@ var gulp = require('gulp'), RevAll = require('gulp-rev-all'), ftp = require( 'vinyl-ftp' ), gutil = require( 'gulp-util' ), + svgstore = require( 'gulp-svgstore' ), + svgmin = require( 'gulp-svgmin' ), pkg = require('./package.json'); gulp.task('less', function() { @@ -100,31 +102,40 @@ gulp.task('js', function() { }); gulp.task('copy', function() { - return gulp.src(['app/images/**','app/fonts/**'], {base: 'app/'}) + return gulp.src(['app/images/**','app/fonts/**','app/.htaccess'], {base: 'app/'}) .pipe(gulp.dest('build')); }); -gulp.task('generateIndexHTML', function() { - return gulp.src('app/index.html') - .pipe(template({ - version: pkg.version, - date : (new Date()).toLocaleDateString(), - uaTracking: process.env.CORIOLIS_UA_TRACKING || false - })) - .pipe(htmlmin({ - 'collapseBooleanAttributes': true, - 'collapseWhitespace': true, - 'removeAttributeQuotes': true, - 'removeComments': true, - 'removeEmptyAttributes': true, - 'removeRedundantAttributes': true, - 'removeScriptTypeAttributes': true, - 'removeStyleLinkTypeAttributes': true - }).on('error',function(e){ - console.log('File:', e.fileName); - console.log('Message:',e.message); - })) - .pipe(gulp.dest('build')); +gulp.task('generateIndexHTML', function(done) { + // Generate minified inline svg of all icons for svg spriting + gulp.src('app/images/icons/*.svg') + .pipe(svgmin()) + .pipe(svgstore({ inlineSvg: true })) + .pipe(gutil.buffer(function(err, files) { + var svgIconsContent = files[0].contents.toString(); + gulp.src('app/index.html') + .pipe(template({ + version: pkg.version, + date : (new Date()).toLocaleDateString(), + uaTracking: process.env.CORIOLIS_UA_TRACKING || false, + svgContent: svgIconsContent + })) + .pipe(htmlmin({ + 'collapseBooleanAttributes': true, + 'collapseWhitespace': true, + 'removeAttributeQuotes': true, + 'removeComments': true, + 'removeEmptyAttributes': true, + 'removeRedundantAttributes': true, + 'removeScriptTypeAttributes': true, + 'removeStyleLinkTypeAttributes': true + }).on('error',function(e){ + console.log('File:', e.fileName); + console.log('Message:',e.message); + })) + .pipe(gulp.dest('build')); + done(); + })); }); gulp.task('serve', function(cb) { @@ -144,8 +155,8 @@ gulp.task('serve-stop', function(cb) { }); gulp.task('watch', function() { - gulp.watch('app/index.html', ['generateIndexHTML']); - gulp.watch(['app/images/**','app/fonts/**'], ['copy']); + gulp.watch(['app/index.html','app/images/icons/*.svg'], ['generateIndexHTML']); + gulp.watch(['app/images/**','app/fonts/**', 'app/.htaccess'], ['copy']); gulp.watch('app/less/*.less', ['less']); gulp.watch('app/views/**/*', ['html2js']); gulp.watch('app/js/**/*.js', ['js']); diff --git a/package.json b/package.json index dd52dfa6..d112d279 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "coriolis_shipyard", - "version": "0.2.0", + "version": "0.3.0", "repository": { "type": "git", "url": "https://github.com/cmmcleod/coriolis" @@ -19,6 +19,8 @@ "gulp-minify-css": "^1.0.0", "gulp-rev-all": "^0.8.18", "gulp-sourcemaps": "^1.5.1", + "gulp-svgmin": "^1.1.2", + "gulp-svgstore": "^5.0.1", "gulp-template": "^3.0.0", "gulp-uglify": "^1.2.0", "gulp-util": "^3.0.4", @@ -26,7 +28,6 @@ "main-bower-files": "^2.6.2", "run-sequence": "^1.0.2", "uglify-js": "^2.4.19", - "vinyl": "^0.4.6", "vinyl-ftp": "^0.4.1" } }
    ShipBuildAgilitySpeedBoostShield
    Strength
    Armour
    ShipBuildShieldsArmour MassPowerFuelCargoPowerCargo Jump RangeCostCost
    UnladenLadenRetracted%Deployed%AvailableUnladenLadenUnladenLadenRetractedDeployedAvailableUnladenLaden
    {{b.ship.speed}} M/s{{b.ship.boost}} M/s
    {{fRound(b.ship.shieldStrength)}} Mj {{fRound(b.ship.unladenMass)}} T {{fRound(b.ship.ladenMass)}} T {{fPwr(b.ship.powerRetracted)}} MW{{fPct(b.ship.powerRetracted/b.ship.powerAvailable)}} {{fPwr(b.ship.powerDeployed)}} MW{{fPct(b.ship.powerDeployed/b.ship.powerAvailable)}} {{fPwr(b.ship.powerAvailable)}} MW{{fRound(b.ship.fuelCapacity)}} T {{fRound(b.ship.cargoCapacity)}} T {{fRound(b.ship.unladenJumpRange)}} LY {{fRound(b.ship.ladenJumpRange)}} LY