Compare commits

...

44 Commits

Author SHA1 Message Date
Colin McLeod
10bfaacb22 Linting fixes 2015-06-03 01:14:38 -07:00
Colin McLeod
799ff36ec4 Remove ticks on comparison page 2015-06-03 01:07:23 -07:00
Colin McLeod
9e4ce83784 Update charts on orientation change 2015-06-02 23:57:31 -07:00
Colin McLeod
08ee37b6b3 Bump version to 0.10.0 2015-06-02 23:52:49 -07:00
Colin McLeod
f0f947cad4 Added notification when appcache is updated 2015-06-02 23:52:23 -07:00
Colin McLeod
0ae4957976 Tweak colors, remove hover 2015-06-02 22:18:47 -07:00
Colin McLeod
b678b81d8d Tweak dmg/eps/dps formatting 2015-06-02 22:00:58 -07:00
Colin McLeod
5c02afdf89 Remove scp from package.json 2015-06-02 21:53:13 -07:00
Colin McLeod
57dc910bc5 Use column for builds menu 2015-06-02 21:52:44 -07:00
Colin McLeod
1ac9d30beb Sort buils menu by ship name 2015-06-02 21:52:44 -07:00
Colin McLeod
4040767427 Merge pull request #34 from spullara/master
Add the measured values in MJ for weapon damage and energy usage
2015-06-02 21:52:35 -07:00
Sam Pullara
d0bb8fbdba add the new damage and energy values to the UI 2015-06-02 21:38:51 -07:00
Sam Pullara
83c8d17f75 add actual MJ damage values to all weapons 2015-06-02 21:38:50 -07:00
Colin McLeod
97c6429ffc Update Jump Range chart, adding slider, more useful UI 2015-06-02 20:13:42 -07:00
Colin McLeod
adf4e64362 Add missing class 2 fragment cannons 2015-06-02 20:13:14 -07:00
Colin McLeod
8194a734bc Add Class 2 Burst Lasers 2015-06-02 20:12:52 -07:00
Colin McLeod
d9cecbdc17 Minor tweak to tablet outfit page css 2015-06-02 20:11:13 -07:00
Colin McLeod
d69fe3f687 Change min launcher damage type 2015-06-02 20:10:05 -07:00
Colin McLeod
180700b973 Fix shield cell bank capacities 2015-06-02 20:09:43 -07:00
Colin McLeod
8f52dd75f0 Fix rating for C1 gimballed pulse laser 2015-06-02 20:09:20 -07:00
Colin McLeod
4b74b125e1 Enhance ship jump range function 2015-06-02 20:07:08 -07:00
Colin McLeod
55986a64a5 Fix to jump range calculation / function 2015-06-02 20:06:30 -07:00
Colin McLeod
f26002df3d Updating disclaimer text 2015-06-02 20:06:01 -07:00
Colin McLeod
0cd78748f7 Sort ships by name 2015-06-02 20:05:34 -07:00
Colin McLeod
3cc76ba85e Rename to Diamondback Scout 2015-06-02 20:04:42 -07:00
Colin McLeod
4531afb198 Fix default shield for Cobra 2015-06-02 20:04:05 -07:00
Colin McLeod
f5ae2c3135 Remove unused dev dependencies 2015-06-02 20:03:38 -07:00
Colin McLeod
abec7e87d8 Optimize PNGs, reduce favicon size, less sillyness 2015-06-02 20:01:18 -07:00
Colin McLeod
bf1dcbdd5e Minor tweak to outfit page tablet layout 2015-06-02 20:01:18 -07:00
Colin McLeod
5c5740f13e Tweak build, add angular explicit dependency 2015-06-02 20:01:18 -07:00
Colin McLeod
ce9b6b75d3 Merge pull request #33 from spullara/patch-1
The weapon and system capacity for power distributors was reversed in…
2015-06-02 20:00:51 -07:00
Colin McLeod
2237529968 Merge pull request #31 from Qirion/dev
Added missing dependencies
2015-06-02 20:00:37 -07:00
Sam Pullara
da61f4dc76 The weapon and system capacity for power distributors was reversed in the UI
I've relabelled them.
2015-06-02 19:08:11 -07:00
Gabriel Correia
16e6853ab5 Added missing dependencies 2015-05-30 11:38:51 -03:00
Colin McLeod
6ed0c0be3f Linting fix 2015-05-28 02:27:42 -07:00
Colin McLeod
acbfaaa53f Bumping Version to 0.9.0 2015-05-28 02:21:30 -07:00
Colin McLeod
91b42372fb UI & UX improvements 2015-05-28 02:21:03 -07:00
Colin McLeod
d2c6f0cf8f Use absolute path for appcache manifest 2015-05-28 02:00:34 -07:00
Colin McLeod
384d420a7f Update area chart on window resize or orientation change 2015-05-28 02:00:05 -07:00
Colin McLeod
24e9afd3bf Add Ship Diamondback and Imperial Clipper using best data available 2015-05-28 00:52:52 -07:00
Colin McLeod
39c5c724e4 Remove unused images 2015-05-28 00:00:39 -07:00
Colin McLeod
97213a4682 Improve coriolis logo svg 2015-05-28 00:00:10 -07:00
Colin McLeod
280411f35c Add appcache support for offline standalone app 2015-05-27 23:59:54 -07:00
Colin McLeod
1796b0fb46 report useragent on error page 2015-05-27 23:56:06 -07:00
94 changed files with 933 additions and 235 deletions

View File

@@ -1,8 +1,8 @@
<svg width="400" height="400" viewBox="0 0 400 400" xmlns="http://www.w3.org/2000/svg"> <svg width="32" height="32" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg">
<rect transform="rotate(45 200,200) " height="266" width="266" y="67" x="67" stroke-width="10" stroke="#ff3b00" fill="#000000"/>
<rect height="26" width="83" y="187" x="158" fill-opacity="0" stroke-width="15" stroke="#ff3b00" fill="#000000"/> <g transform="translate(1,1)">
<path stroke="#ff3b00" transform="rotate(45 314,85)" d="m181,114l134,-58l134,59l-268,0z" stroke-width="10" fill="#000000"/> <path stroke="#ff3b00" transform="rotate(45 15 15)" d="m4,4 l 11,-4 l 11,4 l 4,11 l -4,11 l -11,4 l -11,-4 l -4,-11 l 4,-11 l 22,0 l 0,22 l -22,0 z" stroke-width="1" fill="#000000"/>
<path stroke="#ff3b00" transform="rotate(135 314,314) " d="m181,344l134,-59l134,59l-268,0z" stroke-width="10" fill="#000000"/> <rect height="3" width="10" y="13.5" x="10" stroke-width="1" stroke="#ff3b00" />
<path stroke="#ff3b00" transform="rotate(-45 85,85) " d="m-49,114l134-59l134,59l-268,0z" stroke-width="10" fill="#000000"/> </g>
<path stroke="#ff3b00" transform="rotate(-135 85,314) " d="m-49,344l134,-59l134,59l-268,0z" stroke-width="10" fill="#000000"/>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 852 B

After

Width:  |  Height:  |  Size: 404 B

3
app/icons/fuel.svg Executable file
View File

@@ -0,0 +1,3 @@
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
<path d="M16 0c-8.837 0-16 7.163-16 16s7.163 16 16 16 16-7.163 16-16-7.163-16-16-16zM9.464 26.067c0.347-0.957 0.536-1.99 0.536-3.067 0-3.886-2.463-7.197-5.913-8.456 0.319-2.654 1.508-5.109 3.427-7.029 2.267-2.266 5.28-3.515 8.485-3.515s6.219 1.248 8.485 3.515c1.92 1.92 3.108 4.375 3.428 7.029-3.45 1.26-5.913 4.57-5.913 8.456 0 1.077 0.189 2.11 0.536 3.067-1.928 1.258-4.18 1.933-6.536 1.933s-4.608-0.675-6.536-1.933zM17.242 20.031c0.434 0.109 0.758 0.503 0.758 0.969v2c0 0.55-0.45 1-1 1h-2c-0.55 0-1-0.45-1-1v-2c0-0.466 0.324-0.86 0.758-0.969l0.742-14.031h1l0.742 14.031z"></path>
</svg>

After

Width:  |  Height:  |  Size: 688 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 115 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 75 KiB

BIN
app/images/logo/144x144.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
app/images/logo/192x192.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

BIN
app/images/logo/72x72.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 876 B

BIN
app/images/logo/96x96.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.9 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.4 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@@ -6,7 +6,7 @@
<square150x150logo src="images/logo/mstile-150x150.png"/> <square150x150logo src="images/logo/mstile-150x150.png"/>
<square310x310logo src="images/logo/mstile-310x310.png"/> <square310x310logo src="images/logo/mstile-310x310.png"/>
<wide310x150logo src="images/logo/mstile-310x150.png"/> <wide310x150logo src="images/logo/mstile-310x150.png"/>
<TileColor>#da532c</TileColor> <TileColor>#000000</TileColor>
</tile> </tile>
</msapplication> </msapplication>
</browserconfig> </browserconfig>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 361 KiB

After

Width:  |  Height:  |  Size: 31 KiB

View File

@@ -1,38 +1,27 @@
{ {
"name": "Shipyard", "name": "Coriolis.io",
"short_name": "Coriolis",
"icons": [ "icons": [
{ {
"src": "images\/logo\/android-chrome-36x36.png", "src": "images\/logo\/72x72.png",
"sizes": "36x36",
"type": "image\/png",
"density": "0.75"
},
{
"src": "images\/logo\/android-chrome-48x48.png",
"sizes": "48x48",
"type": "image\/png",
"density": "1.0"
},
{
"src": "images\/logo\/android-chrome-72x72.png",
"sizes": "72x72", "sizes": "72x72",
"type": "image\/png", "type": "image\/png",
"density": "1.5" "density": "1.5"
}, },
{ {
"src": "images\/logo\/android-chrome-96x96.png", "src": "images\/logo\/96x96.png",
"sizes": "96x96", "sizes": "96x96",
"type": "image\/png", "type": "image\/png",
"density": "2.0" "density": "2.0"
}, },
{ {
"src": "images\/logo\/android-chrome-144x144.png", "src": "images\/logo\/144x144.png",
"sizes": "144x144", "sizes": "144x144",
"type": "image\/png", "type": "image\/png",
"density": "3.0" "density": "3.0"
}, },
{ {
"src": "images\/logo\/android-chrome-192x192.png", "src": "images\/logo\/192x192.png",
"sizes": "192x192", "sizes": "192x192",
"type": "image\/png", "type": "image\/png",
"density": "4.0" "density": "4.0"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
app/images/splash/1024x748.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

BIN
app/images/splash/1136x640.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

BIN
app/images/splash/1242x2148.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
app/images/splash/1280x720.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

BIN
app/images/splash/1334x750.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
app/images/splash/1536x2008.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

BIN
app/images/splash/200x320.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
app/images/splash/2048x1496.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

BIN
app/images/splash/2208x1242.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
app/images/splash/320x200.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
app/images/splash/320x460.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

BIN
app/images/splash/320x480.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

BIN
app/images/splash/480x320.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
app/images/splash/480x800.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

BIN
app/images/splash/640x1096.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

BIN
app/images/splash/640x920.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

BIN
app/images/splash/720x1280.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

BIN
app/images/splash/750x1294.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

BIN
app/images/splash/768x1004.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

BIN
app/images/splash/800x480.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

BIN
app/images/splash/960x640.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

View File

@@ -1,30 +1,64 @@
<!DOCTYPE html> <!DOCTYPE html>
<html ng-app="app" ng-strict-di="true"> <html ng-app="app" ng-strict-di="true" manifest="/coriolis.appcache">
<head> <head>
<title ng-bind="title">Coriolis</title> <title ng-bind="title">Coriolis</title>
<link rel="stylesheet" href="/app.css"> <link rel="stylesheet" href="/app.css">
<link rel="apple-touch-icon" sizes="76x76" href="/images/logo/apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="/images/logo/apple-touch-icon-114x114.png"> <!-- Standard headers -->
<link rel="apple-touch-icon" sizes="120x120" href="/images/logo/apple-touch-icon-120x120.png"> <meta name="mobile-web-app-capable" content="yes">
<link rel="apple-touch-icon" sizes="144x144" href="/images/logo/apple-touch-icon-144x144.png"> <meta name="viewport" content="width = device-width, initial-scale = 1.0">
<link rel="apple-touch-icon" sizes="152x152" href="/images/logo/apple-touch-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="/images/logo/apple-touch-icon-180x180.png">
<link rel="icon" sizes="96x96" type="image/png" href="/images/logo/favicon-96x96.png">
<link rel="icon" sizes="194x194" type="image/png" href="/images/logo/favicon-194x194.png">
<link rel="icon" sizes="192x192" type="image/png" href="/images/logo/android-chrome-192x192.png">
<link rel="manifest" href="/images/logo/manifest.json"> <link rel="manifest" href="/images/logo/manifest.json">
<link rel="icon" sizes="152x152 192x192" type="image/png" href="/images/logo/192x192.png">
<link rel="shortcut icon" href="/images/logo/favicon.ico"> <link rel="shortcut icon" href="/images/logo/favicon.ico">
<meta name="msapplication-TileColor" content="#da532c">
<!-- Apple/iOS headers -->
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-title" content="Coriolis">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<link rel="apple-touch-icon-precomposed" sizes="180x180" href="/images/logo/apple-touch-icon-precomposed.png">
<link rel="apple-touch-icon" href="/images/logo/apple-touch-icon.png">
<link rel="apple-touch-icon" sizes="180x180" href="/images/logo/apple-touch-icon-180x180.png">
<!-- iPhone, iPod Touch, portrait -->
<link href="/images/splash/320x460.png" media="(device-width: 320px) and (device-height: 480px) and (orientation: portrait) and (-webkit-device-pixel-ratio: 1)" rel="apple-touch-startup-image">
<!-- iPhone, iPod Touch, landscape -->
<link href="/images/splash/480x320.png" media="(device-width: 320px) and (device-height: 480px) and (orientation: landscape) and (-webkit-device-pixel-ratio: 1)" rel="apple-touch-startup-image">
<!-- iPhone 4, 4S, portrait -->
<link href="/images/splash/640x920.png" media="(device-width: 320px) and (device-height: 480px) and (orientation: portrait) and (-webkit-device-pixel-ratio: 2)" rel="apple-touch-startup-image">
<!-- iPhone 4, 4S, landscape -->
<link href="/images/splash/960x640.png" media="(device-width: 320px) and (device-height: 480px) and (orientation: landscape) and (-webkit-device-pixel-ratio: 2)" rel="apple-touch-startup-image">
<!-- iPhone 5, 5S, 5C, portrait -->
<link href="/images/splash/640x1096.png" media="(device-width: 320px) and (device-height: 568px) and (orientation: portrait) and (-webkit-device-pixel-ratio: 2)" rel="apple-touch-startup-image">
<!-- iPhone 5, 5S, 5C, landscape -->
<link href="/images/splash/1136x640.png" media="(device-width: 320px) and (device-height: 568px) and (orientation: landscape) and (-webkit-device-pixel-ratio: 2)" rel="apple-touch-startup-image">
<!-- iPhone 6, portrait -->
<link href="/images/splash/750x1294.png" media="(device-width: 375px) and (device-height: 667px) and (orientation: portrait) and (-webkit-device-pixel-ratio: 2)" rel="apple-touch-startup-image">
<!-- iPhone 6, landscape -->
<link href="/images/splash/1334x750.png" media="(device-width: 375px) and (device-height: 667px) and (orientation: landscape) and (-webkit-device-pixel-ratio: 2)" rel="apple-touch-startup-image">
<!-- iPhone 6+, portrait -->
<link href="/images/splash/1242x2148.png" media="(device-width: 414px) and (device-height: 736px) and (orientation: portrait) and (-webkit-device-pixel-ratio: 3)" rel="apple-touch-startup-image">
<!-- iPhone 6+, landscape -->
<link href="/images/splash/2208x1242.png" media="(device-width: 414px) and (device-height: 736px) and (orientation: landscape) and (-webkit-device-pixel-ratio: 3)" rel="apple-touch-startup-image">
<!-- iPad 1, 2, Mini, portrait -->
<link href="/images/splash/768x1004.png" media="(device-width: 768px) and (device-height: 1024px) and (orientation: portrait) and (-webkit-device-pixel-ratio: 1)" rel="apple-touch-startup-image">
<!-- iPad 1, 2, Mini, landscape -->
<link href="/images/splash/1024x748.png" media="(device-width: 768px) and (device-height: 1024px) and (orientation: landscape) and (-webkit-device-pixel-ratio: 1)" rel="apple-touch-startup-image">
<!-- iPad 3, 4, Air, Air 2, Mini 2, Mini 3, portrait -->
<link href="/images/splash/1536x2008.png" media="(device-width: 768px) and (device-height: 1024px) and (orientation: portrait) and (-webkit-device-pixel-ratio: 2)" rel="apple-touch-startup-image">
<!-- iPad 3, 4, Air, Air 2, Mini 2, Mini 3, landscape -->
<link href="/images/splash/2048x1496.png" media="(device-width: 768px) and (device-height: 1024px) and (orientation: landscape) and (-webkit-device-pixel-ratio: 2)" rel="apple-touch-startup-image">
<!-- Microsoft Windows Phone/Tablet headers -->
<meta name="msapplication-TileColor" content="#000000">
<meta name="msapplication-TileImage" content="/images/logo/mstile-144x144.png"> <meta name="msapplication-TileImage" content="/images/logo/mstile-144x144.png">
<meta name="msapplication-config" content="/images/logo/browserconfig.xml"> <meta name="msapplication-config" content="/images/logo/browserconfig.xml">
<meta name="theme-color" content="#000000"> <meta name="theme-color" content="#000000">
</head> </head>
<body> <body style="background-color:#000;">
<div style="height: 0; width: 0; overflow:hidden"><%= svgContent %></div> <div style="height: 0; width: 0; overflow:hidden"><%= svgContent %></div>
<shipyard-header></shipyard-header> <shipyard-header></shipyard-header>
<div id="main" ui-view ng-click="bgClicked($event)"></div> <div id="main" ui-view ng-click="bgClicked($event)"></div>
<div ui-view="modal"></div> <div ui-view="modal" ng-click="bgClicked($event)"></div>
<footer> <footer>
<div class="right"> <div class="right">

View File

@@ -47,4 +47,15 @@ angular.module('app', ['ui.router', 'ct.ui.router.extras.sticky', 'ui.sortable',
$rootScope.$broadcast('close', e); $rootScope.$broadcast('close', e);
}; };
if ($window.applicationCache) {
// Listen for appcache updated event, present refresh to update view
$window.applicationCache.addEventListener('updateready', function() {
if ($window.applicationCache.status == $window.applicationCache.UPDATEREADY) {
// Browser downloaded a new app cache.
$rootScope.appCacheUpdate = true;
$rootScope.$apply();
}
}, false);
}
}]); }]);

View File

@@ -3,7 +3,7 @@ angular.module('app')
$rootScope.title = 'Error'; $rootScope.title = 'Error';
$scope.path = $location.path(); $scope.path = $location.path();
$scope.type = $p.type || 'unknown'; $scope.type = $p.type || 'unknown';
$scope.browser = $window.navigator.appVersion; $scope.browser = $window.navigator.userAgent;
switch ($scope.type) { switch ($scope.type) {
case 404: case 404:

View File

@@ -1,4 +1,4 @@
angular.module('app').controller('OutfitController', ['$rootScope','$scope', '$state', '$stateParams', 'ShipsDB', 'Ship', 'Components', 'Serializer', 'Persist', function ($rootScope, $scope, $state, $p, Ships, Ship, Components, Serializer, Persist) { angular.module('app').controller('OutfitController', ['$window','$rootScope','$scope', '$state', '$stateParams', 'ShipsDB', 'Ship', 'Components', 'Serializer', 'Persist', function ($window, $rootScope, $scope, $state, $p, Ships, Ship, Components, Serializer, Persist) {
var data = Ships[$p.shipId]; // Retrieve the basic ship properties, slots and defaults var data = Ships[$p.shipId]; // Retrieve the basic ship properties, slots and defaults
var ship = new Ship($p.shipId, data.properties, data.slots); // Create a new Ship instance var ship = new Ship($p.shipId, data.properties, data.slots); // Create a new Ship instance
@@ -26,16 +26,22 @@ angular.module('app').controller('OutfitController', ['$rootScope','$scope', '$s
$scope.selectedSlot = null; $scope.selectedSlot = null;
$scope.savedCode = Persist.getBuild(ship.id, $scope.buildName); $scope.savedCode = Persist.getBuild(ship.id, $scope.buildName);
$scope.canSave = Persist.isEnabled(); $scope.canSave = Persist.isEnabled();
$scope.fuel = 0;
$scope.jrSeries = { $scope.jrSeries = {
xMin: ship.unladenMass, xMin: 0,
xMax: ship.ladenMass, xMax: ship.cargoCapacity,
func: ship.jumpRangeWithMass.bind(ship) // Slightly higher than actual based bacuse components are excluded
yMax: ship.jumpRangeWithMass(ship.unladenMass),
yMin: 0,
func: function(cargo) { // X Axis is Cargo
return ship.jumpRangeWithMass(ship.unladenMass + $scope.fuel + cargo, $scope.fuel);
}
}; };
$scope.jrChart = { $scope.jrChart = {
labels: { labels: {
xAxis: { xAxis: {
title:'Ship Mass', title:'Cargo',
unit: 'T' unit: 'T'
}, },
yAxis: { yAxis: {
@@ -156,11 +162,17 @@ angular.module('app').controller('OutfitController', ['$rootScope','$scope', '$s
ship.updateTotals(); ship.updateTotals();
}; };
$scope.fuelChange = function (fuel) {
$scope.fuel = fuel;
angular.element($window).triggerHandler('render');
};
// Utilify functions // Utilify functions
function updateState() { function updateState() {
$state.go('outfit', {shipId: ship.id, code: $scope.code, bn: $scope.buildName}, {location:'replace', notify:false}); $state.go('outfit', {shipId: ship.id, code: $scope.code, bn: $scope.buildName}, {location:'replace', notify:false});
$scope.jrSeries.xMin = ship.unladenMass; $scope.jrSeries.xMax = ship.cargoCapacity;
$scope.jrSeries.xMax = ship.ladenMass; $scope.jrSeries.yMax = ship.jumpRangeWithMass(ship.unladenMass);
$scope.jrSeries.mass = ship.unladenMass;
} }
// Hide any open menu/slot/etc if escape key is pressed // Hide any open menu/slot/etc if escape key is pressed

View File

@@ -1,42 +1,33 @@
angular.module('app').directive('areaChart', function () { angular.module('app').directive('areaChart', ['$window', function ($window) {
return { return {
restrict: 'A', restrict: 'A',
scope:{ scope:{
config: '=', config: '=',
series: '=', series: '='
height: '=',
width: '='
}, },
link: function(scope, element) { link: function(scope, element) {
var width = element[0].parentElement.offsetWidth, var series = scope.series,
height = width * 0.6,
series = scope.series,
config = scope.config, config = scope.config,
labels = config.labels, labels = config.labels,
margin = {top: 15, right: 15, bottom: 35, left: 50}, margin = {top: 15, right: 15, bottom: 35, left: 50},
w = width - margin.left - margin.right,
h = height - margin.top - margin.bottom,
fmt = d3.format('.3r'), fmt = d3.format('.3r'),
fmtLong = d3.format('.2f'); fmtLong = d3.format('.2f'),
// Define Axes
xAxis = d3.svg.axis().outerTickSize(0).orient("bottom").tickFormat(d3.format('.2r')),
yAxis = d3.svg.axis().outerTickSize(0).orient("left").tickFormat(fmt),
x = d3.scale.linear(),
y = d3.scale.linear();
// Create chart // Create chart
var svg = d3.select(element[0]).append("svg") var svg = d3.select(element[0]).append("svg");
.attr("width", width) var vis = svg.append("g").attr("transform", "translate(" + margin.left + "," + margin.top + ")");
.attr("height", height)
.append("g")
.attr("transform", "translate(" + margin.left + "," + margin.top + ")");
// Define Axes
var x = d3.scale.linear().range([0, w]);
var y = d3.scale.linear().range([h, 0]);
var xAxis = d3.svg.axis().outerTickSize(0).orient("bottom").tickFormat(fmt);
var yAxis = d3.svg.axis().outerTickSize(0).orient("left").tickFormat(fmt);
// Define Area // Define Area
var area = d3.svg.area().x(function(d) { return x(d[0]); }).y0(h).y1(function(d) { return y(d[1]); }); var area = d3.svg.area();
var gradient = svg.append("defs") var gradient = vis.append("defs")
.append("linearGradient") .append("linearGradient")
.attr("id", "gradient") .attr("id", "gradient")
.attr("x1", "0%").attr("y1", "0%") .attr("x1", "0%").attr("y1", "0%")
@@ -52,57 +43,73 @@ angular.module('app').directive('areaChart', function () {
.attr("stop-opacity", 1); .attr("stop-opacity", 1);
// Create Y Axis SVG Elements // Create Y Axis SVG Elements
svg.append("g").attr("class", "y axis") var yTxt = vis.append("g").attr("class", "y axis")
.append("text") .append("text")
.attr("transform", "rotate(-90)") .attr("transform", "rotate(-90)")
.attr("y", -40) .attr("y", -40)
.attr("x", -h/2)
.attr("dy", ".1em") .attr("dy", ".1em")
.style("text-anchor", "middle") .style("text-anchor", "middle")
.text(labels.yAxis.title + ' (' + labels.yAxis.unit + ')'); .text(labels.yAxis.title + ' (' + labels.yAxis.unit + ')');
// Create X Axis SVG Elements // Create X Axis SVG Elements
svg.append("g").attr("class", "x axis").attr("transform", "translate(0," + h + ")") var xLbl = vis.append("g").attr("class", "x axis");
.append("text") var xTxt = xLbl.append("text")
.attr("y", 30) .attr("y", 30)
.attr("x", w/2)
.attr("dy", ".1em") .attr("dy", ".1em")
.style("text-anchor", "middle") .style("text-anchor", "middle")
.text(labels.xAxis.title + ' (' + labels.xAxis.unit + ')'); .text(labels.xAxis.title + ' (' + labels.xAxis.unit + ')');
// Create and Add tooltip // Create and Add tooltip
var tip = svg.append("g").style("display", "none"); var tip = vis.append("g").style("display", "none");
tip.append("rect").attr("width","4em").attr("height", "2em").attr("x", "0.5em").attr("y","-1em").attr("class","tip");
tip.append("circle") tip.append("circle")
.attr("class", "marker") .attr("class", "marker")
.attr("r", 4); .attr("r", 4);
tip.append("text").attr("class", 'label x').attr("y", -2); tip.append("text").attr("class", 'label x').attr("y", "-0.1em");
tip.append("text").attr("class", 'label y').attr("y", '0.7em'); tip.append("text").attr("class", 'label y').attr("y", '0.7em');
/** /**
* Watch for changes in the series data (mass changes, etc) * Watch for changes in the series data (mass changes, etc)
*/ */
scope.$watchCollection('series', render); scope.$watchCollection('series', render);
scope.$watchCollection('config.watch', render); angular.element($window).bind('orientationchange resize render', render);
function render() { function render() {
var data = []; var width = element[0].parentElement.offsetWidth,
var func = series.func; height = width * 0.6,
for (var d = series.xMin; d <= series.xMax; d++) { w = width - margin.left - margin.right,
data.push([ d, func(d) ]); h = height - margin.top - margin.bottom,
data = [],
func = series.func;
if (series.xMax == series.xMin) {
var yVal = func(series.xMin);
data.push([ series.xMin, yVal ]);
data.push([ series.xMin, yVal ]);
area.x(function(d,i) { return i * w; }).y0(h).y1(function(d) { return y(d[1]); });
} else {
for (var d = series.xMin; d <= series.xMax; d += 1) {
data.push([ d, func(d) ]);
}
area.x(function(d) { return x(d[0]); }).y0(h).y1(function(d) { return y(d[1]); });
} }
// Update Chart Size
svg.attr("width", width).attr("height", height);
// Update domain and scale for axes; // Update domain and scale for axes;
x.domain([series.xMin, series.xMax]); x.range([0, w]).domain([series.xMin, series.xMax]);
xAxis.scale(x); xAxis.scale(x);
y.domain([data[data.length - 1][1], data[0][1]]); xLbl.attr("transform", "translate(0," + h + ")");
xTxt.attr("x", w/2);
y.range([h, 0]).domain([series.yMin, series.yMax]);
yAxis.scale(y); yAxis.scale(y);
svg.selectAll(".y.axis").call(yAxis); yTxt.attr("x", -h/2);
svg.selectAll(".x.axis").call(xAxis); vis.selectAll(".y.axis").call(yAxis);
vis.selectAll(".x.axis").call(xAxis);
// Remove existing elements // Remove existing elements
svg.selectAll('path.area').remove(); vis.selectAll('path.area').remove();
svg.insert("path",':first-child') // Area/Path to appear behind everything else vis.insert("path",':first-child') // Area/Path to appear behind everything else
.datum(data) .datum(data)
.attr("class", "area") .attr("class", "area")
.attr('fill', 'url(#gradient)') .attr('fill', 'url(#gradient)')
@@ -111,8 +118,9 @@ angular.module('app').directive('areaChart', function () {
.on("mouseout", function() { tip.style("display", "none"); }) .on("mouseout", function() { tip.style("display", "none"); })
.on('mousemove', function() { .on('mousemove', function() {
var xPos = d3.mouse(this)[0], x0 = x.invert(xPos), y0 = func(x0), flip = (xPos > w * 0.75); var xPos = d3.mouse(this)[0], x0 = x.invert(xPos), y0 = func(x0), flip = (xPos > w * 0.75);
tip.attr("transform", "translate(" + x(x0) + "," + y(y0) + ")"); tip.attr("transform", "translate(" + xPos + "," + y(y0) + ")");
tip.selectAll('text.label').attr("x", flip? -10 : 10).style("text-anchor", flip? 'end' : 'start'); tip.selectAll('rect').attr("x", flip? '-4.5em' : "0.5em").style("text-anchor", flip? 'end' : 'start');
tip.selectAll('text.label').attr("x", flip? "-1em" : "1em").style("text-anchor", flip? 'end' : 'start');
tip.select('text.label.x').text(fmtLong(x0) + ' ' + labels.xAxis.unit); tip.select('text.label.x').text(fmtLong(x0) + ' ' + labels.xAxis.unit);
tip.select('text.label.y').text(fmtLong(y0) + ' ' + labels.yAxis.unit); tip.select('text.label.y').text(fmtLong(y0) + ' ' + labels.yAxis.unit);
}); });
@@ -120,4 +128,4 @@ angular.module('app').directive('areaChart', function () {
} }
}; };
}); }]);

View File

@@ -8,6 +8,7 @@ angular.module('app').directive('shipyardHeader', ['lodash', '$rootScope', 'Pers
scope.openedMenu = null; scope.openedMenu = null;
scope.ships = ships; scope.ships = ships;
scope.allBuilds = Persist.builds; scope.allBuilds = Persist.builds;
scope.buildsList = Object.keys(scope.allBuilds).sort();
scope.allComparisons = Persist.comparisons; scope.allComparisons = Persist.comparisons;
scope.bs = Persist.state; scope.bs = Persist.state;
@@ -65,6 +66,10 @@ angular.module('app').directive('shipyardHeader', ['lodash', '$rootScope', 'Pers
$rootScope.hideAbout = function (){ $rootScope.hideAbout = function (){
$rootScope.showAbout = false; $rootScope.showAbout = false;
}; };
scope.$watchCollection('allBuilds', function() {
scope.buildsList = Object.keys(scope.allBuilds).sort();
});
} }
}; };
}]); }]);

View File

@@ -0,0 +1,74 @@
angular.module('app').directive('slider', ['$window', function ($window) {
return {
restrict: 'A',
scope:{
max: '=',
unit: '=',
change: '&onChange'
},
link: function(scope, element) {
var margin = {top: -10, right: 130, bottom: 0, left: 50},
height = 40, // Height is fixed
h = height - margin.top - margin.bottom,
fmt = d3.format('.2f'),
pct = d3.format('.1%'),
unit = scope.unit,
val = scope.max,
svg = d3.select(element[0]).append("svg"),
vis = svg.append("g").attr("transform", "translate(" + margin.left + "," + margin.top + ")"),
xAxis = vis.append("g").attr("class", "x slider-axis").attr("transform", "translate(0," + h / 2 + ")"),
x = d3.scale.linear(),
slider = vis.append("g").attr("class", "slider"),
filled = slider.append('path').attr('class', 'filled').attr("transform", "translate(0," + h/2 + ")"),
brush = d3.svg.brush().x(x).extent([scope.max, scope.max]).on("brush", brushed),
handle = slider.append("circle").attr("class", "handle").attr("r", '0.75em'),
lbl = slider.append("g").append("text").attr("y", h/2);
slider.call(brush);
slider.select(".background").attr("height", h);
handle.attr("transform", "translate(0," + h / 2 + ")");
/**
* Watch for changes in the max, window size
*/
scope.$watch('max', function(newMax, oldMax) {
val = newMax * (val / oldMax); // Retain percentage filled
render();
});
angular.element($window).bind('orientationchange resize', render);
function render() {
var width = element[0].offsetWidth, w = width - margin.left - margin.right;
svg.attr("width", width).attr("height", height);
x.domain([0, scope.max]).range([0, w]).clamp(true);
handle.attr("cx", x(val));
xAxis
.call(d3.svg.axis()
.scale(x)
.orient("bottom")
.tickFormat(function(d) { return d + unit; })
.tickSize(0)
.tickPadding(12))
.select(".domain");
lbl.attr('x', w + 20).text(fmt(val) + ' ' + unit + ' (' + pct(val / scope.max) + ')');
slider.call(brush.extent([val, val])).call(brush.event);
slider.selectAll(".extent,.resize").remove();
}
function brushed() {
val = brush.extent()[0];
if (d3.event.sourceEvent) { // not a programmatic event
val = x.invert(d3.mouse(this)[0]);
brush.extent([val, val]);
}
lbl.text(fmt(val) + ' ' + unit + ' (' + pct(val / scope.max) + ')');
scope.change({val: val});
handle.attr("cx", x(val));
filled.attr("d", "M0,0V0H" + x(val) + "V0");
}
}
};
}]);

View File

@@ -1,14 +1,18 @@
/** /**
* BBCode Generator functions for embedding in the Elite Dangerous Forums * BBCode Generator functions for embedding in the Elite Dangerous Forums
*/ */
angular.module('app').factory('Utils', ['$state','$http', function ($state, $http) { angular.module('app').factory('Utils', ['$window','$state','$http', '$q', function ($window, $state, $http, $q) {
var shortenAPI = 'https://www.googleapis.com/urlshortener/v1/url?key='; var shortenAPI = 'https://www.googleapis.com/urlshortener/v1/url?key=';
function shortenUrl(url) { function shortenUrl(url) {
return $http.post(shortenAPI + GAPI_KEY, {longUrl:url}).then(function(response) { if ($window.navigator.onLine) {
return response.data.id; return $http.post(shortenAPI + GAPI_KEY, {longUrl:url}).then(function(response) {
}); return response.data.id;
});
} else {
return $q.reject({statusText: 'Not Online'});
}
} }
function comparisonBBCode(facets, builds, link) { function comparisonBBCode(facets, builds, link) {

View File

@@ -167,12 +167,14 @@ angular.module('shipyard').factory('Ship', ['Components', 'calcShieldStrength',
}; };
/** /**
* [jumpRange description] * Calculate jump range using the installed FSD and the
* @param {number} mass [description] * specified mass which can be more or less than ships actual mass
* @param {number} mass Mass in tons
* @param {number} fuel Fuel available in tons
* @return {number} Jump range in Light Years * @return {number} Jump range in Light Years
*/ */
Ship.prototype.jumpRangeWithMass = function (mass) { Ship.prototype.jumpRangeWithMass = function (mass, fuel) {
return calcJumpRange(mass, this.common[2].c); return calcJumpRange(mass, this.common[2].c, fuel);
}; };
/** /**

View File

@@ -153,7 +153,7 @@ angular.module('shipyard', ['ngLodash'])
* @return {number} Distance in Light Years * @return {number} Distance in Light Years
*/ */
.value('calcJumpRange', function(mass, fsd, fuel) { .value('calcJumpRange', function(mass, fsd, fuel) {
return Math.pow(Math.min(fuel || Infinity, fsd.maxfuel) / fsd.fuelmul, 1 / fsd.fuelpower ) * fsd.optmass / mass; return Math.pow(Math.min(fuel === undefined? fsd.maxfuel : fuel, fsd.maxfuel) / fsd.fuelmul, 1 / fsd.fuelpower ) * fsd.optmass / mass;
}) })
/** /**
* Calculate the a ships shield strength based on mass, shield generator and shield boosters used. * Calculate the a ships shield strength based on mass, shield generator and shield boosters used.

View File

@@ -13,6 +13,7 @@
@import 'select'; @import 'select';
@import 'modal'; @import 'modal';
@import 'charts'; @import 'charts';
@import 'slider';
@import 'chart-tooltip'; @import 'chart-tooltip';
@import 'buttons'; @import 'buttons';
@import 'error'; @import 'error';

View File

@@ -12,37 +12,44 @@
cursor: pointer; cursor: pointer;
} }
} }
}
svg { svg {
.axis { .axis {
line, path {
fill: none;
stroke: @primary-disabled;
}
text {
font-size: 0.8em;
fill: @primary-disabled;
}
&.y {
text tspan:first-child {
fill: @primary;
}
}
line, path {
fill: none;
stroke: @primary-disabled;
} }
.marker { text {
fill: @secondary; font-size: 0.8em;
fill: @primary-disabled;
} }
.label { &.y {
font-size: 0.9em; text tspan:first-child {
fill: @fg; fill: @primary;
}
} }
}
.marker {
fill: @secondary;
}
.label {
font-size: 0.9em;
fill: @fg;
}
.tip {
fill: @bgBlack;
stroke: @secondary;
stroke-width: 1px;
} }
} }

View File

@@ -4,11 +4,11 @@
@bgTransparency: 10%; @bgTransparency: 10%;
// Foreground colors // Foreground colors
@fg: #DDD; @fg: #CCC;
@primary: #FF8C0D; // Light Orange @primary: #FF8C0D; // Light Orange
@secondary: #1FB0FF; // Light blue @secondary: #1FB0FF; // Light blue
@warning: #FF3B00; // Dark Orange @warning: #FF3B00; // Dark Orange
@disabled: #888; // Light grey @disabled: #555; // Light grey
@primary-disabled: darken(@primary, @disabledDarken); @primary-disabled: darken(@primary, @disabledDarken);
@secondary-disabled: darken(@secondary, @disabledDarken); @secondary-disabled: darken(@secondary, @disabledDarken);
@warning-disabled: darken(@warning, @disabledDarken); @warning-disabled: darken(@warning, @disabledDarken);

View File

@@ -104,6 +104,8 @@
display: block; display: block;
overflow-x: hidden; overflow-x: hidden;
overflow-y: auto; overflow-y: auto;
z-index: 0;
-webkit-overflow-scrolling: touch;
max-height: 8em; max-height: 8em;
} }
} }

View File

@@ -1,3 +1,20 @@
#app-update {
position: fixed;
top: 0;
left: 0;
right: 0;
height: 3em;
z-index: 3;
line-height: 3em;
text-align: center;
background-color: @bg;
a, a:visited {
text-decoration: none;
color: @warning;
}
}
header { header {
background-color: @bg; background-color: @bg;
margin: 0; margin: 0;
@@ -44,26 +61,29 @@ header {
.menu-list { .menu-list {
font-family: @fStandard; font-family: @fStandard;
position: absolute; position: absolute;
padding: 1em 1em; padding: 0.5em 1em;
box-sizing: border-box; box-sizing: border-box;
min-width: 100%; min-width: 100%;
overflow-x: hidden; overflow-x: hidden;
background-color: @bgBlack; background-color: @bgBlack;
font-size: 0.8em; font-size: 0.8em;
overflow-y: auto; overflow-y: auto;
z-index: 0;
-webkit-overflow-scrolling: touch;
max-height: 400px; max-height: 400px;
&.dbl { &.dbl {
width: 22em; -webkit-column-count: 2; /* Chrome, Safari, Opera */
-moz-column-count: 2; /* Firefox */
column-count: 2;
ul { ul {
float: left;
width: 10em; width: 10em;
} }
} }
} }
ul { ul {
margin: 0 0 0.5em 0; margin: 0 0 0.5em;
padding: 0; padding: 0;
line-height: 1.3em; line-height: 1.3em;
} }

View File

@@ -1,10 +1,11 @@
.list { .list {
overflow: hidden; margin: 1em 0;
cursor: default; cursor: default;
font-size: 0.8em; font-size: 0.8em;
min-width: 21em; min-width: 25%;
text-align: left; text-align: left;
.user-select-none(); .user-select-none();
box-sizing: border-box;
.header { .header {
width: 100%; width: 100%;

View File

@@ -1,17 +1,16 @@
#outfit { #outfit {
font-size: 1.1em; font-size: 1.1em;
max-width: 1200px;
// iPads Landscape
.tablet({
& {
font-size: 0.95em;
}
});
width: 64em;
margin: 0 auto; margin: 0 auto;
.user-select-none(); .user-select-none();
.tablet({
width: 100%;
min-width: 750px;
font-size: 0.8em;
});
} }
#overview { #overview {
@@ -25,7 +24,7 @@
#summary { #summary {
.user-select-none(); .user-select-none();
width: 100%; width: 100%;
margin-top: 1em; margin: 1em 0;
font-size: 0.8em; font-size: 0.8em;
border-collapse: collapse; border-collapse: collapse;
@@ -56,7 +55,7 @@
#hardpoints, #utility, #standard { #hardpoints, #utility, #standard {
margin-right: 0.3em; padding-right: 0.3em;
.slot { .slot {
clear: left; clear: left;
} }

View File

@@ -8,6 +8,8 @@
max-height: 300px; max-height: 300px;
overflow-y: auto; overflow-y: auto;
overflow-x: hidden; overflow-x: hidden;
z-index: 0;
-webkit-overflow-scrolling: touch;
background-color: @bg; background-color: @bg;
border: 1px solid @primary; border: 1px solid @primary;
white-space: nowrap; white-space: nowrap;

42
app/less/slider.less Normal file
View File

@@ -0,0 +1,42 @@
.slider-axis {
line, path {
fill: none;
stroke: @primary-disabled;
}
text {
font-size: 0.8em;
fill: @primary-disabled;
}
.domain {
fill: none;
stroke: @primary;
stroke-opacity: .3;
stroke-width: 0.7em;
stroke-linecap: round;
}
}
.slider {
text {
dominant-baseline: central;
fill: @primary;
}
.filled {
stroke-width: 0.3em;
stroke-linecap: round;
stroke: @primary-disabled;
}
.handle {
fill: @primary;
stroke-opacity: .5;
cursor: crosshair;
}
}

View File

@@ -1,6 +1,8 @@
.slot-group { .slot-group {
margin: 1em 0; width: 25%;
margin: 0;
box-sizing: border-box;
.user-select-none(); .user-select-none();
cursor: default; cursor: default;
@@ -19,7 +21,7 @@
.slot { .slot {
float: left; float: left;
text-align: left; text-align: left;
width: 21em; width: 100%;
font-size: 0.75em; font-size: 0.75em;
margin-top: 0.5em; margin-top: 0.5em;
position: relative; position: relative;
@@ -29,7 +31,7 @@
box-sizing: border-box; box-sizing: border-box;
background-color: @primary-bg; background-color: @primary-bg;
border: 1px solid @primary-disabled; border: 1px solid @primary-disabled;
color: @disabled; color: @fg;
fill: @disabled; fill: @disabled;
.details { .details {
@@ -45,7 +47,7 @@
} }
.l { .l {
margin-right: 1em; margin-right: 0.8em;
} }
.sz { .sz {
@@ -69,17 +71,6 @@
line-height: 1.7em; line-height: 1.7em;
} }
&:hover{
color: @fg;
fill: @fg;
border: 1px solid @primary;
.sz {
color: @primary;
border-right: 1px solid @primary;
}
}
&.selected { &.selected {
color: @primary-bg; color: @primary-bg;
background-color: @primary; background-color: @primary;

View File

@@ -44,8 +44,7 @@ thead {
tbody tr { tbody tr {
&.tr { &.tr {
color: @disabled; color: @fg;
fill: @disabled;
text-align: right; text-align: right;
&:hover { &:hover {

View File

@@ -1,3 +1,7 @@
<div id="app-update" ng-show="appCacheUpdate">
<a href="#" onclick="window.location.reload()">Update Available! Click to Refresh</a>
</div>
<header> <header>
<a class="l" ui-sref="shipyard" style="margin-right: 1em;" title="Ships"><svg class="icon xl"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#coriolis"></use></svg></a> <a class="l" ui-sref="shipyard" style="margin-right: 1em;" title="Ships"><svg class="icon xl"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#coriolis"></use></svg></a>
@@ -15,9 +19,9 @@
<svg class="icon warning" ng-class="{'warning-disabled': !bs.hasBuilds}"><use xlink:href="#hammer"></use></svg> Builds <svg class="icon warning" ng-class="{'warning-disabled': !bs.hasBuilds}"><use xlink:href="#hammer"></use></svg> Builds
</div> </div>
<div class="menu-list dbl" ng-if="openedMenu=='b'" ng-click="$event.stopPropagation();"> <div class="menu-list dbl" ng-if="openedMenu=='b'" ng-click="$event.stopPropagation();">
<ul class="l" ng-repeat="(shipId,builds) in allBuilds"> <ul ng-repeat="shipId in buildsList">
{{ships[shipId].properties.name}} {{ships[shipId].properties.name}}
<li ng-repeat="(name, build) in builds"> <li ng-repeat="(name, build) in allBuilds[shipId]">
<a ui-sref-active="active" class="name" ui-sref="outfit({shipId:shipId, code:build, bn:name})" ng-bind="name"></a> <a ui-sref-active="active" class="name" ui-sref="outfit({shipId:shipId, code:build, bn:name})" ng-bind="name"></a>
</li> </li>
</ul> </ul>

View File

@@ -4,9 +4,10 @@
<div class="l">{{hp.c.class}}{{hp.c.rating}}<span ng-if="hp.c.mode">/{{hp.c.mode}}{{hp.c.missile}}</span> {{hp.c.name || lbl}}</div> <div class="l">{{hp.c.class}}{{hp.c.rating}}<span ng-if="hp.c.mode">/{{hp.c.mode}}{{hp.c.missile}}</span> {{hp.c.name || lbl}}</div>
<div class="r">{{hp.c.mass}} <u>T</u></div> <div class="r">{{hp.c.mass}} <u>T</u></div>
<div class="cb"> <div class="cb">
<div class="l" ng-if="hp.c.damage">DMG: {{hp.c.damage}}</div> <div class="l" ng-if="hp.c.damage">DMG: {{hp.c.damage}} <span ng-if="hp.c.ssdam">({{$r.fCrd(hp.c.ssdam)}} <u>MJ</u>)</span></div>
<div class="l" ng-if="hp.c.dps">DPS: {{hp.c.dps}}</div> <div class="l" ng-if="hp.c.dps">DPS: {{hp.c.dps}} <span ng-if="hp.c.mjdps">({{$r.fCrd(hp.c.mjdps)}} <u>MJ</u>)</span></div>
<div class="l" ng-if="hp.c.thermload">T-Load: {{hp.c.thermload}}</div> <div class="l" ng-if="hp.c.mjeps">EPS: {{$r.fCrd(hp.c.mjeps)}} <u>MJ</u></div>
<div class="l" ng-if="hp.c.thermload">T-Load: {{hp.c.thermload}}</div>
<div class="l" ng-if="hp.c.type">Type: {{hp.c.type}}</div> <div class="l" ng-if="hp.c.type">Type: {{hp.c.type}}</div>
<div class="l" ng-if="hp.c.rof">ROF: {{hp.c.rof}}<u>/s</u></div> <div class="l" ng-if="hp.c.rof">ROF: {{hp.c.rof}}<u>/s</u></div>
<div class="l" ng-if="hp.c.armourpen">Pen: {{hp.c.armourpen}}</div> <div class="l" ng-if="hp.c.armourpen">Pen: {{hp.c.armourpen}}</div>

View File

@@ -2,7 +2,7 @@
<p>The Coriolis project was inspired by <a href="http://www.edshipyard.com/" target="_blank">E:D Shipyard</a> and, of course, <p>The Coriolis project was inspired by <a href="http://www.edshipyard.com/" target="_blank">E:D Shipyard</a> and, of course,
<a href="http://www.elitedangerous.com" target="_blank">Elite Dangerous</a>. 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.</p> <a href="http://www.elitedangerous.com" target="_blank">Elite Dangerous</a>. 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.</p>
<p>Coriolis was created for non-commercial purposes. It is not endorsed by nor reflects the views or opinions of Frontier Developments.</p> <p>Coriolis was created using assets and imagery from Elite: Dangerous, with the permission of Frontier Developments plc, for non-commercial purposes. It is not endorsed by nor reflects the views or opinions of Frontier Developments.</p>
<div> <div>
<a class="l" style="margin: 0.4em" href="https://github.com/cmmcleod/coriolis" target="_blank" title="Coriolis Github Project"> <a class="l" style="margin: 0.4em" href="https://github.com/cmmcleod/coriolis" target="_blank" title="Coriolis Github Project">

View File

@@ -25,10 +25,7 @@
<td colspan="2"> <td colspan="2">
<ul id="facet-container" as-sortable="facetSortOpts" ng-model="facets" class="sortable" update="tblUpdate"> <ul id="facet-container" as-sortable="facetSortOpts" ng-model="facets" class="sortable" update="tblUpdate">
<li ng-repeat="(i,f) in facets" as-sortable-item class="facet" ng-class="{active: f.active}" ng-click="toggleFacet(i)"> <li ng-repeat="(i,f) in facets" as-sortable-item class="facet" ng-class="{active: f.active}" ng-click="toggleFacet(i)">
<div as-sortable-item-handle> <div as-sortable-item-handle><span ng-bind="f.title"></span></div>
<svg class="icon move"><use xlink:href="{{f.active? '#checkmark' : '#checkmark2'}}"></use></svg>
<span ng-bind="f.title"></span>
</div>
</li> </li>
</ul> </ul>
</td> </td>

View File

@@ -125,8 +125,8 @@
<div class="l">{{pd.id}} Power Distributor</div> <div class="l">{{pd.id}} Power Distributor</div>
<div class="r">{{pd.c.mass}} <u>T</u></div> <div class="r">{{pd.c.mass}} <u>T</u></div>
<div class="cb"></div> <div class="cb"></div>
<div class="l">Sys: {{pd.c.weaponcapacity}} <u>Mj</u> / {{pd.c.weaponrecharge}} <u>MW</u></div> <div class="l">Wep: {{pd.c.weaponcapacity}} <u>Mj</u> / {{pd.c.weaponrecharge}} <u>MW</u></div>
<div class="l">Wep: {{pd.c.systemcapacity}} <u>Mj</u> / {{pd.c.systemrecharge}} <u>MW</u></div> <div class="l">Sys: {{pd.c.systemcapacity}} <u>Mj</u> / {{pd.c.systemrecharge}} <u>MW</u></div>
<div class="l">Eng: {{pd.c.enginecapacity}} <u>Mj</u> / {{pd.c.enginerecharge}} <u>MW</u></div> <div class="l">Eng: {{pd.c.enginecapacity}} <u>Mj</u> / {{pd.c.enginerecharge}} <u>MW</u></div>
</div> </div>
<div component-select class="select" s="pd" opts="availCS.common[4]" ng-if="selectedSlot==pd" ng-click="select('c',pd,$event)"></div> <div component-select class="select" s="pd" opts="availCS.common[4]" ng-if="selectedSlot==pd" ng-click="select('c',pd,$event)"></div>
@@ -216,10 +216,13 @@
</table> </table>
</div> </div>
<div class="list l" style="width: 37em; margin: 0 0.5em;"> <div class="list l" style="width: 50%;padding: 0 0.5em;">
<div class="header">Jump Range</div> <div class="header">Jump Range</div>
<div class="cen"> <div class="cen">
<div class="chart" area-chart config="jrChart" series="jrSeries"></div> <div class="chart" area-chart config="jrChart" series="jrSeries"></div>
<div slider max="ship.fuelCapacity" unit="'T'" on-change="::fuelChange(val)" style="position:relative; margin: 0 auto;">
<svg class="icon xl primary-disabled" style="position:absolute;height: 100%;"><use xlink:href="#fuel"></use></svg>
</div>
</div> </div>
</div> </div>

View File

@@ -25,9 +25,22 @@
"angular-ui-router": "^0.2.15", "angular-ui-router": "^0.2.15",
"d3-tip": "~0.6.7", "d3-tip": "~0.6.7",
"ng-sortable": "~1.2.1", "ng-sortable": "~1.2.1",
"lz-string": "~1.4.3" "lz-string": "~1.4.3",
"angular": "!~1.4.0"
}, },
"overrides": { "overrides": {
"angular": {
"main": "angular.min.js"
},
"angular-ui-router": {
"main": "release/angular-ui-router.min.js"
},
"d3": {
"main": "d3.min.js"
},
"ng-lodash": {
"main": "build/ng-lodash.min.js"
},
"ui-router-extras": { "ui-router-extras": {
"main": [ "main": [
"release/modular/ct-ui-router-extras.core.min.js", "release/modular/ct-ui-router-extras.core.min.js",
@@ -35,9 +48,7 @@
] ]
}, },
"ng-sortable": { "ng-sortable": {
"main": [ "main": "dist/ng-sortable.min.js"
"dist/ng-sortable.min.js"
]
} }
} }
} }

View File

@@ -36,6 +36,80 @@
"mass": 4 "mass": 4
} }
], ],
"diamondback": [
{
"name": "Lightweight Alloy",
"class": 1,
"rating": "I",
"cost": 0,
"mass": 0
},
{
"name": "Reinforced Alloy",
"class": 1,
"rating": "I",
"cost": 225700,
"mass": 13
},
{
"name": "Military Grade Composite",
"class": 1,
"rating": "I",
"cost": 507900,
"mass": 26
},
{
"name": "Mirrored Surface Composite",
"class": 1,
"rating": "I",
"cost": 1185100,
"mass": 26
},
{
"name": "Reactive Surface Composite",
"class": 1,
"rating": "I",
"cost": 1330100,
"mass": 26
}
],
"imperial_courier": [
{
"name": "Lightweight Alloy",
"class": 1,
"rating": "I",
"cost": 0,
"mass": 0
},
{
"name": "Reinforced Alloy",
"class": 1,
"rating": "I",
"cost": 1017200,
"mass": 4
},
{
"name": "Military Grade Composite",
"class": 1,
"rating": "I",
"cost": 2288600,
"mass": 8
},
{
"name": "Mirrored Surface Composite",
"class": 1,
"rating": "I",
"cost": 5408800,
"mass": 8
},
{
"name": "Reactive Surface Composite",
"class": 1,
"rating": "I",
"cost": 5993700,
"mass": 8
}
],
"cobra_mk_iii": [ "cobra_mk_iii": [
{ {
"name": "Lightweight Alloy", "name": "Lightweight Alloy",

View File

@@ -14,6 +14,8 @@
"armourpen": "A", "armourpen": "A",
"rof": null, "rof": null,
"dps": 5, "dps": 5,
"mjdps" : 30.33,
"mjeps" : 5.65,
"thermload": 5 "thermload": 5
}, },
{ {
@@ -30,6 +32,8 @@
"armourpen": "A", "armourpen": "A",
"rof": null, "rof": null,
"dps": 4, "dps": 4,
"mjdps" : 24.00,
"mjeps" : 5.59,
"thermload": 6 "thermload": 6
}, },
{ {
@@ -46,6 +50,8 @@
"armourpen": "A", "armourpen": "A",
"rof": null, "rof": null,
"dps": 4, "dps": 4,
"mjdps" : 14.44,
"mjeps" : 3.54,
"thermload": 4 "thermload": 4
}, },
{ {
@@ -62,6 +68,8 @@
"armourpen": "A", "armourpen": "A",
"rof": null, "rof": null,
"dps": 4, "dps": 4,
"mjdps" : 19.38,
"mjeps" : 3.42,
"thermload": 4 "thermload": 4
}, },
{ {
@@ -78,6 +86,8 @@
"armourpen": "A", "armourpen": "A",
"rof": null, "rof": null,
"dps": 4, "dps": 4,
"mjdps" : 13.85,
"mjeps" : 3.26,
"thermload": 4 "thermload": 4
}, },
{ {
@@ -94,6 +104,8 @@
"armourpen": "A", "armourpen": "A",
"rof": null, "rof": null,
"dps": 3, "dps": 3,
"mjdps" : 8.95,
"mjeps" : 2.10,
"thermload": 3 "thermload": 3
}, },
{ {
@@ -110,6 +122,8 @@
"armourpen": "A", "armourpen": "A",
"rof": null, "rof": null,
"dps": 3, "dps": 3,
"mjdps" : 11.61,
"mjeps" : 2.16,
"thermload": 3 "thermload": 3
}, },
{ {
@@ -126,6 +140,8 @@
"armourpen": "A", "armourpen": "A",
"rof": null, "rof": null,
"dps": 3, "dps": 3,
"mjdps" : 8.70,
"mjeps" : 2.05,
"thermload": 3 "thermload": 3
}, },
{ {
@@ -142,6 +158,8 @@
"armourpen": "A", "armourpen": "A",
"rof": null, "rof": null,
"dps": 3, "dps": 3,
"mjdps" : 5.49,
"mjeps" : 1.29,
"thermload": 2 "thermload": 2
} }
] ]

View File

@@ -14,6 +14,9 @@
"armourpen": "B", "armourpen": "B",
"rof": 1, "rof": 1,
"dps": 4, "dps": 4,
"mjdps" : 24.97,
"mjeps" : 3.52,
"ssdam" : 27.85,
"thermload": 1 "thermload": 1
}, },
{ {
@@ -30,6 +33,9 @@
"armourpen": "A", "armourpen": "A",
"rof": 1.2, "rof": 1.2,
"dps": 4, "dps": 4,
"mjdps" : 18.56,
"mjeps" : 3.27,
"ssdam" : 18.56,
"thermload": 1 "thermload": 1
}, },
{ {
@@ -46,6 +52,57 @@
"armourpen": "A", "armourpen": "A",
"rof": 0.9, "rof": 0.9,
"dps": 4, "dps": 4,
"mjdps" : 8.78,
"mjeps" : 1.69,
"ssdam" : 9.45,
"thermload": 1
},
{
"id": "7h",
"group": "ul",
"class":2,
"rating":"E",
"cost": 23000,
"mass": 4,
"power":1.05,
"mode":"F",
"type":"T",
"damage": 3,
"armourpen":"A",
"rof":1.3,
"dps": 4,
"thermload": 1
},
{
"id": "7i",
"group": "ul",
"class":2,
"rating":"F",
"cost": 48500,
"mass": 4,
"power":1.04,
"mode":"G",
"type":"T",
"damage": 3,
"armourpen":"A",
"rof":1.5,
"dps": 4,
"thermload": 1
},
{
"id": "7j",
"group": "ul",
"class":2,
"rating":"F",
"cost": 162800,
"mass": 4,
"power":0.98,
"mode":"T",
"type":"T",
"damage": 2,
"armourpen":"A",
"rof":1.1,
"dps": 3,
"thermload": 1 "thermload": 1
}, },
{ {
@@ -62,6 +119,9 @@
"armourpen": "A", "armourpen": "A",
"rof": 1.6, "rof": 1.6,
"dps": 3, "dps": 3,
"mjdps" : 9.94,
"mjeps" : 1.40,
"ssdam" : 6.45,
"thermload": 1 "thermload": 1
}, },
{ {
@@ -78,6 +138,9 @@
"armourpen": "A", "armourpen": "A",
"rof": 1.7, "rof": 1.7,
"dps": 3, "dps": 3,
"mjdps" : 7.95,
"mjeps" : 1.40,
"ssdam" : 4.53,
"thermload": 1 "thermload": 1
}, },
{ {
@@ -94,6 +157,9 @@
"armourpen": "B", "armourpen": "B",
"rof": 1.3, "rof": 1.3,
"dps": 2, "dps": 2,
"mjdps" : 2.98,
"mjeps" : 0.63,
"ssdam" : 2.24,
"thermload": 1 "thermload": 1
} }
] ]

View File

@@ -17,6 +17,8 @@
"thermload": 2, "thermload": 2,
"grp": "c", "grp": "c",
"clip": 5, "clip": 5,
"mjdps": 8.13,
"ssdam" : 37.13,
"ammo": 100 "ammo": 100
}, },
{ {
@@ -36,9 +38,11 @@
"thermload": 2, "thermload": 2,
"grp": "c", "grp": "c",
"clip": 5, "clip": 5,
"mjdps": 10.97,
"ssdam" : 30.94,
"ammo": 100 "ammo": 100
}, },
{ {
"id": "1n", "id": "1n",
"grp": "c", "grp": "c",
"class": 3, "class": 3,
@@ -55,6 +59,8 @@
"thermload": 2, "thermload": 2,
"grp": "c", "grp": "c",
"clip": 5, "clip": 5,
"mjdps": 8.13,
"ssdam" : 22.28,
"ammo": 100 "ammo": 100
}, },
{ {
@@ -74,6 +80,8 @@
"thermload": 1, "thermload": 1,
"grp": "c", "grp": "c",
"clip": 5, "clip": 5,
"mjdps" : 7.95,
"ssdam" : 21.04,
"ammo": 100 "ammo": 100
}, },
{ {
@@ -93,6 +101,8 @@
"thermload": 1, "thermload": 1,
"grp": "c", "grp": "c",
"clip": 5, "clip": 5,
"mjdps" : 3.58,
"ssdam" : 12.38,
"ammo": 100 "ammo": 100
}, },
{ {
@@ -112,6 +122,8 @@
"thermload": 1, "thermload": 1,
"grp": "c", "grp": "c",
"clip": 5, "clip": 5,
"mjdps" : 6.00,
"ssdam" : 15.47,
"ammo": 100 "ammo": 100
}, },
{ {
@@ -131,6 +143,8 @@
"thermload": 1, "thermload": 1,
"grp": "c", "grp": "c",
"clip": 5, "clip": 5,
"mjdps" : 6.24,
"ssdam" : 15.47,
"ammo": 100 "ammo": 100
}, },
{ {
@@ -150,6 +164,8 @@
"thermload": 1, "thermload": 1,
"grp": "c", "grp": "c",
"clip": 5, "clip": 5,
"mjdps" : 2.41,
"ssdam" : 7.74,
"ammo": 100 "ammo": 100
}, },
{ {
@@ -169,6 +185,8 @@
"thermload": 1, "thermload": 1,
"grp": "c", "grp": "c",
"clip": 5, "clip": 5,
"mjdps" : 4.00,
"ssdam" : 9.59,
"ammo": 100 "ammo": 100
}, },
{ {
@@ -188,6 +206,8 @@
"thermload": 1, "thermload": 1,
"grp": "c", "grp": "c",
"clip": 5, "clip": 5,
"mjdps" : 3.80,
"ssdam" : 8.97,
"ammo": 100 "ammo": 100
}, },
{ {
@@ -207,6 +227,8 @@
"thermload": 1, "thermload": 1,
"grp": "c", "grp": "c",
"clip": 5, "clip": 5,
"mjdps" : 1.35,
"ssdam" : 4.13,
"ammo": 100 "ammo": 100
} }
] ]

View File

@@ -1,6 +1,6 @@
{ {
"Fragment Cannons": [ "Fragment Cannons": [
{ {
"id": "1t", "id": "1t",
"grp": "fc", "grp": "fc",
"class": 3, "class": 3,
@@ -17,6 +17,8 @@
"thermload": 1, "thermload": 1,
"grp": "fc", "grp": "fc",
"clip": 3, "clip": 3,
"mjdps": 15.19,
"ssdam" : 28.36,
"ammo": 30 "ammo": 30
}, },
{ {
@@ -36,6 +38,8 @@
"thermload": 1, "thermload": 1,
"grp": "fc", "grp": "fc",
"clip": 3, "clip": 3,
"mjdps" : 12.77,
"ssdam" : 23.21,
"ammo": 30 "ammo": 30
}, },
{ {
@@ -55,6 +59,8 @@
"thermload": 1, "thermload": 1,
"grp": "fc", "grp": "fc",
"clip": 3, "clip": 3,
"mjdps" : 6.85,
"ssdam" : 12.89,
"ammo": 30 "ammo": 30
}, },
{ {
@@ -74,6 +80,47 @@
"thermload": 1, "thermload": 1,
"grp": "fc", "grp": "fc",
"clip": 3, "clip": 3,
"mjdps" : 9.50,
"ssdam" : 18.05,
"ammo": 30
},
{
"id": "7e",
"grp": "fc",
"class": 2,
"rating": "D",
"cost": 437800,
"mass": 4,
"power": 1.03,
"mode": "G",
"type": "K",
"damage": 2,
"armourpen": "A",
"rof": 5.3,
"dps": 9,
"thermload": 1,
"grp": "fc",
"clip": 3,
"ammo": 30
},
{
"id": "7f",
"grp": "fc",
"class": 2,
"rating": "D",
"cost": 1459200,
"mass": 4,
"power": 0.79,
"mode": "T",
"type": "K",
"damage": 2,
"armourpen": "A",
"rof": 3.7,
"dps": 9,
"thermload": 1,
"grp": "fc",
"clip": 3,
"ammo": 30 "ammo": 30
}, },
{ {
@@ -93,6 +140,8 @@
"thermload": 1, "thermload": 1,
"grp": "fc", "grp": "fc",
"clip": 3, "clip": 3,
"mjdps" : 5.53,
"ssdam" : 10.31,
"ammo": 30 "ammo": 30
}, },
{ {
@@ -112,6 +161,8 @@
"thermload": 1, "thermload": 1,
"grp": "fc", "grp": "fc",
"clip": 3, "clip": 3,
"mjdps" : 3.58,
"ssdam" : 6.45,
"ammo": 30 "ammo": 30
}, },
{ {
@@ -131,6 +182,8 @@
"thermload": 1, "thermload": 1,
"grp": "fc", "grp": "fc",
"clip": 3, "clip": 3,
"mjdps" : 2.11,
"ssdam" : 3.87,
"ammo": 30 "ammo": 30
} }
] ]

View File

@@ -9,7 +9,7 @@
"mass": 2, "mass": 2,
"power": 0.4, "power": 0.4,
"mode": "F", "mode": "F",
"type": "T", "type": "E",
"armourpen": "C", "armourpen": "C",
"thermload": 2, "thermload": 2,
"clip": 1, "clip": 1,
@@ -24,7 +24,7 @@
"mass": 4, "mass": 4,
"power": 0.4, "power": 0.4,
"mode": "F", "mode": "F",
"type": "T", "type": "E",
"armourpen": "C", "armourpen": "C",
"thermload": 3, "thermload": 3,
"clip": 3, "clip": 3,

View File

@@ -1,6 +1,6 @@
{ {
"Missile Racks": [ "Missile Racks": [
{ {
"id": "2f", "id": "2f",
"grp": "mr", "grp": "mr",
"class": 2, "class": 2,
@@ -18,6 +18,8 @@
"grp": "mr", "grp": "mr",
"clip": 12, "clip": 12,
"ammo": 24, "ammo": 24,
"mjdps": 1.72,
"ssdam" : 3.87,
"missile": "D" "missile": "D"
}, },
{ {
@@ -38,6 +40,8 @@
"grp": "mr", "grp": "mr",
"clip": 6, "clip": 6,
"ammo": 18, "ammo": 18,
"mjdps": 0.57,
"ssdam" : 2.58,
"missile": "S" "missile": "S"
}, },
{ {
@@ -58,6 +62,8 @@
"grp": "mr", "grp": "mr",
"clip": 8, "clip": 8,
"ammo": 16, "ammo": 16,
"mjdps": 1.63,
"ssdam" : 3.87,
"missile": "D" "missile": "D"
}, },
{ {
@@ -78,6 +84,8 @@
"grp": "mr", "grp": "mr",
"clip": 6, "clip": 6,
"ammo": 6, "ammo": 6,
"mjdps": 0.57,
"ssdam" : 2.58,
"missile": "S" "missile": "S"
} }
] ]

View File

@@ -17,6 +17,8 @@
"thermload": 1, "thermload": 1,
"grp": "mc", "grp": "mc",
"clip": 90, "clip": 90,
"mjdps" : 6.02,
"ssdam" : 1.20,
"ammo": 2100 "ammo": 2100
}, },
{ {
@@ -36,6 +38,8 @@
"thermload": 1, "thermload": 1,
"grp": "mc", "grp": "mc",
"clip": 90, "clip": 90,
"mjdps" : 5.59,
"ssdam" : 1.03,
"ammo": 2100 "ammo": 2100
}, },
{ {
@@ -55,6 +59,8 @@
"thermload": 1, "thermload": 1,
"grp": "mc", "grp": "mc",
"clip": 90, "clip": 90,
"mjdps" : 2.15,
"ssdam" : 0.52,
"ammo": 2100 "ammo": 2100
}, },
{ {
@@ -74,6 +80,8 @@
"thermload": 1, "thermload": 1,
"grp": "mc", "grp": "mc",
"clip": 90, "clip": 90,
"mjdps" : 3.75,
"ssdam" : 0.69,
"ammo": 2100 "ammo": 2100
}, },
{ {
@@ -93,6 +101,8 @@
"thermload": 1, "thermload": 1,
"grp": "mc", "grp": "mc",
"clip": 90, "clip": 90,
"mjdps" : 2.03,
"ssdam" : 0.34,
"ammo": 2100 "ammo": 2100
}, },
{ {
@@ -112,6 +122,8 @@
"thermload": 1, "thermload": 1,
"grp": "mc", "grp": "mc",
"clip": 90, "clip": 90,
"mjdps" : 1.54,
"ssdam" : 0.34,
"ammo": 2100 "ammo": 2100
} }
] ]

View File

@@ -17,6 +17,8 @@
"thermload": 10, "thermload": 10,
"grp": "pa", "grp": "pa",
"clip": 5, "clip": 5,
"mjdps" : 6.89,
"ssdam" : 27.85,
"ammo": 100 "ammo": 100
}, },
{ {
@@ -36,6 +38,8 @@
"thermload": 8, "thermload": 8,
"grp": "pa", "grp": "pa",
"clip": 5, "clip": 5,
"mjdps" : 20.98,
"ssdam" : 92.82,
"ammo": 100 "ammo": 100
}, },
{ {
@@ -55,6 +59,8 @@
"thermload": 10, "thermload": 10,
"grp": "pa", "grp": "pa",
"clip": 5, "clip": 5,
"mjdps" : 25.55,
"ssdam" : 123.76,
"ammo": 100 "ammo": 100
} }
] ]

View File

@@ -1,6 +1,6 @@
{ {
"Pulse Lasers": [ "Pulse Lasers": [
{ {
"id": "1d", "id": "1d",
"grp": "pl", "grp": "pl",
"class": 3, "class": 3,
@@ -14,6 +14,9 @@
"armourpen": "A", "armourpen": "A",
"rof": 3, "rof": 3,
"dps": 4, "dps": 4,
"mjdps" : 21.62,
"mjeps" : 2.86,
"ssdam" : 7.07,
"thermload": 1 "thermload": 1
}, },
{ {
@@ -30,6 +33,9 @@
"armourpen": "A", "armourpen": "A",
"rof": 3.2, "rof": 3.2,
"dps": 4, "dps": 4,
"mjdps" : 18.28,
"mjeps" : 2.98,
"ssdam" : 5.59,
"thermload": 1 "thermload": 1
}, },
{ {
@@ -46,6 +52,9 @@
"armourpen": "A", "armourpen": "A",
"rof": 2.3, "rof": 2.3,
"dps": 3, "dps": 3,
"mjdps" : 7.05,
"mjeps" : 1.24,
"ssdam" : 3.15,
"thermload": 1 "thermload": 1
}, },
{ {
@@ -62,6 +71,9 @@
"armourpen": "A", "armourpen": "A",
"rof": 3.4, "rof": 3.4,
"dps": 3, "dps": 3,
"mjdps" : 14.29,
"mjeps" : 1.89,
"ssdam" : 4.20,
"thermload": 1 "thermload": 1
}, },
{ {
@@ -78,6 +90,9 @@
"armourpen": "A", "armourpen": "A",
"rof": 3.6, "rof": 3.6,
"dps": 3, "dps": 3,
"mjdps" : 11.62,
"mjeps" : 1.89,
"ssdam" : 3.24,
"thermload": 1 "thermload": 1
}, },
{ {
@@ -94,6 +109,9 @@
"armourpen": "A", "armourpen": "A",
"rof": 2.5, "rof": 2.5,
"dps": 3, "dps": 3,
"mjdps" : 4.72,
"mjeps" : 0.83,
"ssdam" : 1.86,
"thermload": 1 "thermload": 1
}, },
{ {
@@ -110,13 +128,16 @@
"armourpen": "A", "armourpen": "A",
"rof": 3.8, "rof": 3.8,
"dps": 3, "dps": 3,
"mjdps" : 9.35,
"mjeps" : 1.24,
"ssdam" : 2.48,
"thermload": 1 "thermload": 1
}, },
{ {
"id": "18", "id": "18",
"grp": "pl", "grp": "pl",
"class": 1, "class": 1,
"rating": "F", "rating": "G",
"cost": 6600, "cost": 6600,
"mass": 2, "mass": 2,
"power": 0.39, "power": 0.39,
@@ -126,6 +147,9 @@
"armourpen": "A", "armourpen": "A",
"rof": 4, "rof": 4,
"dps": 3, "dps": 3,
"mjdps" : 7.30,
"mjeps" : 1.19,
"ssdam" : 1.88,
"thermload": 1 "thermload": 1
}, },
{ {
@@ -142,6 +166,9 @@
"armourpen": "A", "armourpen": "A",
"rof": 2.8, "rof": 2.8,
"dps": 2, "dps": 2,
"mjdps" : 2.90,
"mjeps" : 0.51,
"ssdam" : 1.07,
"thermload": 1 "thermload": 1
} }
] ]

View File

@@ -17,6 +17,8 @@
"thermload": 7, "thermload": 7,
"grp": "rg", "grp": "rg",
"clip": 1, "clip": 1,
"mjdps" : 13.75,
"ssdam" : 24.75,
"ammo": 30 "ammo": 30
}, },
{ {
@@ -36,6 +38,8 @@
"thermload": 10, "thermload": 10,
"grp": "rg", "grp": "rg",
"clip": 1, "clip": 1,
"mjdps" : 21.66,
"ssdam" : 43.32,
"ammo": 30 "ammo": 30
} }
] ]

View File

@@ -8,7 +8,7 @@
"cost": 697584, "cost": 697584,
"mass": 160, "mass": 160,
"power": 1.44, "power": 1.44,
"cells": 6, "cells": 5,
"rechargeRating": "C", "rechargeRating": "C",
"recharge": 0 "recharge": 0
}, },
@@ -20,7 +20,7 @@
"cost": 1743961, "cost": 1743961,
"mass": 64, "mass": 64,
"power": 1.92, "power": 1.92,
"cells": 4, "cells": 3,
"rechargeRating": "C", "rechargeRating": "C",
"recharge": 0 "recharge": 0
}, },
@@ -32,7 +32,7 @@
"cost": 4359903, "cost": 4359903,
"mass": 160, "mass": 160,
"power": 2.4, "power": 2.4,
"cells": 5, "cells": 4,
"rechargeRating": "B", "rechargeRating": "B",
"recharge": 0 "recharge": 0
}, },
@@ -44,7 +44,7 @@
"cost": 10899756, "cost": 10899756,
"mass": 256, "mass": 256,
"power": 2.88, "power": 2.88,
"cells": 6, "cells": 5,
"rechargeRating": "A", "rechargeRating": "A",
"recharge": 0 "recharge": 0
}, },
@@ -56,7 +56,7 @@
"cost": 27249391, "cost": 27249391,
"mass": 160, "mass": 160,
"power": 3.36, "power": 3.36,
"cells": 5, "cells": 4,
"rechargeRating": "A", "rechargeRating": "A",
"recharge": 0 "recharge": 0
}, },
@@ -68,7 +68,7 @@
"cost": 249137, "cost": 249137,
"mass": 80, "mass": 80,
"power": 1.24, "power": 1.24,
"cells": 6, "cells": 5,
"rechargeRating": "D", "rechargeRating": "D",
"recharge": 97 "recharge": 97
}, },
@@ -80,7 +80,7 @@
"cost": 622843, "cost": 622843,
"mass": 32, "mass": 32,
"power": 1.66, "power": 1.66,
"cells": 4, "cells": 3,
"rechargeRating": "C", "rechargeRating": "C",
"recharge": 130 "recharge": 130
}, },
@@ -92,7 +92,7 @@
"cost": 1557108, "cost": 1557108,
"mass": 80, "mass": 80,
"power": 2.07, "power": 2.07,
"cells": 5, "cells": 4,
"rechargeRating": "B", "rechargeRating": "B",
"recharge": 163 "recharge": 163
}, },
@@ -104,7 +104,7 @@
"cost": 3892770, "cost": 3892770,
"mass": 128, "mass": 128,
"power": 2.48, "power": 2.48,
"cells": 6, "cells": 5,
"rechargeRating": "B", "rechargeRating": "B",
"recharge": 197 "recharge": 197
}, },
@@ -116,7 +116,7 @@
"cost": 9731925, "cost": 9731925,
"mass": 80, "mass": 80,
"power": 2.9, "power": 2.9,
"cells": 5, "cells": 4,
"rechargeRating": "A", "rechargeRating": "A",
"recharge": 230 "recharge": 230
}, },
@@ -128,7 +128,7 @@
"cost": 88978, "cost": 88978,
"mass": 40, "mass": 40,
"power": 1.06, "power": 1.06,
"cells": 6, "cells": 5,
"rechargeRating": "D", "rechargeRating": "D",
"recharge": 92 "recharge": 92
}, },
@@ -140,7 +140,7 @@
"cost": 222444, "cost": 222444,
"mass": 16, "mass": 16,
"power": 1.42, "power": 1.42,
"cells": 4, "cells": 3,
"rechargeRating": "C", "rechargeRating": "C",
"recharge": 120 "recharge": 120
}, },
@@ -152,7 +152,7 @@
"cost": 556110, "cost": 556110,
"mass": 40, "mass": 40,
"power": 1.77, "power": 1.77,
"cells": 5, "cells": 4,
"rechargeRating": "C", "rechargeRating": "C",
"recharge": 148 "recharge": 148
}, },
@@ -164,7 +164,7 @@
"cost": 1390275, "cost": 1390275,
"mass": 64, "mass": 64,
"power": 2.12, "power": 2.12,
"cells": 6, "cells": 5,
"rechargeRating": "B", "rechargeRating": "B",
"recharge": 176 "recharge": 176
}, },
@@ -176,7 +176,7 @@
"cost": 3475688, "cost": 3475688,
"mass": 40, "mass": 40,
"power": 2.48, "power": 2.48,
"cells": 5, "cells": 4,
"rechargeRating": "A", "rechargeRating": "A",
"recharge": 204 "recharge": 204
}, },
@@ -188,7 +188,7 @@
"cost": 31778, "cost": 31778,
"mass": 20, "mass": 20,
"power": 0.9, "power": 0.9,
"cells": 5, "cells": 4,
"rechargeRating": "D", "rechargeRating": "D",
"recharge": 82 "recharge": 82
}, },
@@ -200,7 +200,7 @@
"cost": 79444, "cost": 79444,
"mass": 8, "mass": 8,
"power": 1.2, "power": 1.2,
"cells": 3, "cells": 2,
"rechargeRating": "C", "rechargeRating": "C",
"recharge": 109 "recharge": 109
}, },
@@ -212,7 +212,7 @@
"cost": 198611, "cost": 198611,
"mass": 20, "mass": 20,
"power": 1.5, "power": 1.5,
"cells": 4, "cells": 3,
"rechargeRating": "C", "rechargeRating": "C",
"recharge": 135 "recharge": 135
}, },
@@ -224,7 +224,7 @@
"cost": 496527, "cost": 496527,
"mass": 32, "mass": 32,
"power": 1.8, "power": 1.8,
"cells": 5, "cells": 4,
"rechargeRating": "B", "rechargeRating": "B",
"recharge": 162 "recharge": 162
}, },
@@ -236,7 +236,7 @@
"cost": 1241317, "cost": 1241317,
"mass": 20, "mass": 20,
"power": 2.1, "power": 2.1,
"cells": 4, "cells": 3,
"rechargeRating": "B", "rechargeRating": "B",
"recharge": 189 "recharge": 189
}, },
@@ -248,7 +248,7 @@
"cost": 11349, "cost": 11349,
"mass": 10, "mass": 10,
"power": 0.74, "power": 0.74,
"cells": 5, "cells": 4,
"rechargeRating": "D", "rechargeRating": "D",
"recharge": 72 "recharge": 72
}, },
@@ -260,7 +260,7 @@
"cost": 28373, "cost": 28373,
"mass": 4, "mass": 4,
"power": 0.98, "power": 0.98,
"cells": 3, "cells": 2,
"rechargeRating": "D", "rechargeRating": "D",
"recharge": 94 "recharge": 94
}, },
@@ -272,7 +272,7 @@
"cost": 70932, "cost": 70932,
"mass": 10, "mass": 10,
"power": 1.23, "power": 1.23,
"cells": 4, "cells": 3,
"rechargeRating": "C", "rechargeRating": "C",
"recharge": 117 "recharge": 117
}, },
@@ -284,7 +284,7 @@
"cost": 177331, "cost": 177331,
"mass": 16, "mass": 16,
"power": 1.48, "power": 1.48,
"cells": 5, "cells": 4,
"rechargeRating": "C", "rechargeRating": "C",
"recharge": 140 "recharge": 140
}, },
@@ -296,7 +296,7 @@
"cost": 443328, "cost": 443328,
"mass": 10, "mass": 10,
"power": 1.72, "power": 1.72,
"cells": 4, "cells": 3,
"rechargeRating": "B", "rechargeRating": "B",
"recharge": 163 "recharge": 163
}, },
@@ -308,7 +308,7 @@
"cost": 4053, "cost": 4053,
"mass": 5, "mass": 5,
"power": 0.61, "power": 0.61,
"cells": 5, "cells": 4,
"rechargeRating": "D", "rechargeRating": "D",
"recharge": 61 "recharge": 61
}, },
@@ -320,7 +320,7 @@
"cost": 10133, "cost": 10133,
"mass": 2, "mass": 2,
"power": 0.82, "power": 0.82,
"cells": 3, "cells": 2,
"rechargeRating": "D", "rechargeRating": "D",
"recharge": 80 "recharge": 80
}, },
@@ -332,7 +332,7 @@
"cost": 25333, "cost": 25333,
"mass": 5, "mass": 5,
"power": 1.02, "power": 1.02,
"cells": 4, "cells": 3,
"rechargeRating": "D", "rechargeRating": "D",
"recharge": 100 "recharge": 100
}, },
@@ -344,7 +344,7 @@
"cost": 63333, "cost": 63333,
"mass": 8, "mass": 8,
"power": 1.22, "power": 1.22,
"cells": 5, "cells": 4,
"rechargeRating": "C", "rechargeRating": "C",
"recharge": 119 "recharge": 119
}, },
@@ -356,7 +356,7 @@
"cost": 158331, "cost": 158331,
"mass": 5, "mass": 5,
"power": 1.43, "power": 1.43,
"cells": 4, "cells": 3,
"rechargeRating": "C", "rechargeRating": "C",
"recharge": 138 "recharge": 138
}, },
@@ -368,7 +368,7 @@
"cost": 1448, "cost": 1448,
"mass": 2.5, "mass": 2.5,
"power": 0.5, "power": 0.5,
"cells": 5, "cells": 4,
"rechargeRating": "E", "rechargeRating": "E",
"recharge": 46 "recharge": 46
}, },
@@ -380,7 +380,7 @@
"cost": 3619, "cost": 3619,
"mass": 1, "mass": 1,
"power": 0.67, "power": 0.67,
"cells": 3, "cells": 2,
"rechargeRating": "D", "rechargeRating": "D",
"recharge": 61 "recharge": 61
}, },
@@ -392,7 +392,7 @@
"cost": 9048, "cost": 9048,
"mass": 2.5, "mass": 2.5,
"power": 0.84, "power": 0.84,
"cells": 4, "cells": 3,
"rechargeRating": "D", "rechargeRating": "D",
"recharge": 77 "recharge": 77
}, },
@@ -404,7 +404,7 @@
"cost": 22619, "cost": 22619,
"mass": 4, "mass": 4,
"power": 1.01, "power": 1.01,
"cells": 5, "cells": 4,
"rechargeRating": "D", "rechargeRating": "D",
"recharge": 92 "recharge": 92
}, },
@@ -416,7 +416,7 @@
"cost": 56547, "cost": 56547,
"mass": 2.5, "mass": 2.5,
"power": 1.18, "power": 1.18,
"cells": 4, "cells": 3,
"rechargeRating": "C", "rechargeRating": "C",
"recharge": 107 "recharge": 107
}, },
@@ -428,7 +428,7 @@
"cost": 517, "cost": 517,
"mass": 1.3, "mass": 1.3,
"power": 0.41, "power": 0.41,
"cells": 4, "cells": 3,
"rechargeRating": "E", "rechargeRating": "E",
"recharge": 31 "recharge": 31
}, },
@@ -440,7 +440,7 @@
"cost": 1293, "cost": 1293,
"mass": 0.5, "mass": 0.5,
"power": 0.55, "power": 0.55,
"cells": 2, "cells": 1,
"rechargeRating": "E", "rechargeRating": "E",
"recharge": 41 "recharge": 41
}, },
@@ -452,7 +452,7 @@
"cost": 3231, "cost": 3231,
"mass": 1.3, "mass": 1.3,
"power": 0.69, "power": 0.69,
"cells": 3, "cells": 2,
"rechargeRating": "D", "rechargeRating": "D",
"recharge": 51 "recharge": 51
}, },
@@ -464,7 +464,7 @@
"cost": 8078, "cost": 8078,
"mass": 2, "mass": 2,
"power": 0.83, "power": 0.83,
"cells": 4, "cells": 3,
"rechargeRating": "D", "rechargeRating": "D",
"recharge": 61 "recharge": 61
}, },
@@ -476,7 +476,7 @@
"cost": 20195, "cost": 20195,
"mass": 1.3, "mass": 1.3,
"power": 0.97, "power": 0.97,
"cells": 3, "cells": 2,
"rechargeRating": "D", "rechargeRating": "D",
"recharge": 72 "recharge": 72
} }

View File

@@ -62,7 +62,7 @@
"internal": [ "internal": [
"02", "02",
"02", "02",
"4e", "49",
"00", "00",
0, 0,
"2h" "2h"

View File

@@ -0,0 +1,72 @@
{
"diamondback": {
"properties": {
"grp": "ex",
"name": "Diamondback Scout",
"manufacturer": "Lakon",
"class": 1,
"cost": 564300,
"speed": 283,
"boost": 384,
"agility": 3,
"shields": 93,
"armour": 216,
"fuelcost": 50,
"mass": 170
},
"slots": {
"common": [
4,
4,
4,
2,
3,
2,
4
],
"hardpoints": [
2,
2,
1,
1,
0,
0,
0,
0
],
"internal": [
3,
3,
3,
2
]
},
"defaults": {
"common": [
"4E",
"4E",
"4E",
"2E",
"3E",
"2E",
"4C"
],
"hardpoints": [
17,
17,
0,
0,
0,
0,
0,
0
],
"internal": [
"44",
0,
0,
"2h"
]
}
}
}

View File

@@ -0,0 +1,74 @@
{
"imperial_courier": {
"properties": {
"grp": "mp",
"name": "Imperial Courier",
"manufacturer": "Gutamaya",
"class": 1,
"cost": 2479400,
"speed": 277,
"boost": 380,
"agility": 6,
"shields": 230,
"armour": 144,
"fuelcost": 50,
"mass": 35
},
"slots": {
"common": [
4,
3,
3,
1,
3,
2,
3
],
"hardpoints": [
2,
2,
2,
0,
0,
0,
0
],
"internal": [
3,
3,
2,
2,
2,
1
]
},
"defaults": {
"common": [
"4E",
"3E",
"3E",
"1E",
"3E",
"2E",
"3C"
],
"hardpoints": [
17,
17,
0,
0,
0,
0,
0
],
"internal": [
"02",
"44",
"01",
0,
0,
"2h"
]
}
}
}

View File

@@ -1,5 +1,4 @@
var gulp = require('gulp'), var gulp = require('gulp'),
exec = require('gulp-exec'),
less = require('gulp-less'), less = require('gulp-less'),
jshint = require('gulp-jshint'), jshint = require('gulp-jshint'),
minifyCSS = require('gulp-minify-css'), minifyCSS = require('gulp-minify-css'),
@@ -14,11 +13,11 @@ var gulp = require('gulp'),
runSequence = require('run-sequence'), runSequence = require('run-sequence'),
exec = require('child_process').exec, exec = require('child_process').exec,
RevAll = require('gulp-rev-all'), RevAll = require('gulp-rev-all'),
scp = require( 'gulp-scp2' ),
gutil = require( 'gulp-util' ), gutil = require( 'gulp-util' ),
svgstore = require( 'gulp-svgstore' ), svgstore = require( 'gulp-svgstore' ),
svgmin = require( 'gulp-svgmin' ), svgmin = require( 'gulp-svgmin' ),
jsonlint = require("gulp-jsonlint"), jsonlint = require("gulp-jsonlint"),
appCache = require("gulp-manifest"),
pkg = require('./package.json'); pkg = require('./package.json');
var cdnHostStr = ''; var cdnHostStr = '';
@@ -54,7 +53,7 @@ gulp.task('json-lint', function() {
gulp.task('bower', function(){ gulp.task('bower', function(){
return gulp.src(mainBowerFiles()) return gulp.src(mainBowerFiles())
.pipe(uglify({mangle: false}).on('error',function(e){ .pipe(uglify({mangle: false, compress: false}).on('error',function(e){
console.log('Bower File:', e.fileName); console.log('Bower File:', e.fileName);
console.log('Line:', e.lineNumber); console.log('Line:', e.lineNumber);
console.log('Message:', e.message); console.log('Message:', e.message);
@@ -167,11 +166,12 @@ gulp.task('serve-stop', function(cb) {
gulp.task('watch', function() { gulp.task('watch', function() {
gulp.watch(['app/index.html','app/icons/*.svg'], ['generateIndexHTML']); gulp.watch(['app/index.html','app/icons/*.svg'], ['generateIndexHTML']);
gulp.watch(['app/images/**','app/fonts/**', 'app/.htaccess'], ['copy']); gulp.watch(['app/images/**','app/fonts/**'], ['copy']);
gulp.watch('app/less/*.less', ['less']); gulp.watch('app/less/*.less', ['less']);
gulp.watch('app/views/**/*', ['html2js']); gulp.watch('app/views/**/*', ['html2js']);
gulp.watch('app/js/**/*.js', ['js']); gulp.watch('app/js/**/*.js', ['js']);
gulp.watch('data/**/*.json', ['jsonToDB']); gulp.watch('data/**/*.json', ['jsonToDB']);
gulp.watch(['build/**', '!**/*.appcache'], ['appcache']);
}); });
gulp.task('cache-bust', function(done) { gulp.task('cache-bust', function(done) {
@@ -195,6 +195,29 @@ gulp.task('cache-bust', function(done) {
stream.on('error', done); stream.on('error', done);
}); });
gulp.task('appcache', function(done) {
// Since using a CDN manually build file list rather than using appCache mechanisms
gulp.src(['build/**', '!build/index.html', '!**/*.json', '!**/logo/*', '!**/*.map','!**/*.appcache'])
.pipe(gutil.buffer(function(err, stream) {
var files = [];
for (var i = 0; i < stream.length; i++) {
if (!stream[i].isNull()) {
files.push(cdnHostStr + '/' + stream[i].relative);
}
}
gulp.src([])
.pipe(appCache({
preferOnline: true,
cache: files,
filename: 'coriolis.appcache',
timestamp: true
}))
.pipe(gulp.dest('build'))
.on('end', done);
}));
});
gulp.task('upload', function(done) { gulp.task('upload', function(done) {
exec([ exec([
"rsync -e 'ssh -i ", process.env.CORIOLIS_PEM, "' -a --delete build/ ", process.env.CORIOLIS_USER, "@", process.env.CORIOLIS_HOST, ":~/www" "rsync -e 'ssh -i ", process.env.CORIOLIS_PEM, "' -a --delete build/ ", process.env.CORIOLIS_USER, "@", process.env.CORIOLIS_HOST, ":~/www"
@@ -206,11 +229,11 @@ gulp.task('upload', function(done) {
gulp.task('lint', ['js-lint', 'json-lint']); gulp.task('lint', ['js-lint', 'json-lint']);
gulp.task('clean', function (done) { del(['build'], done); }); gulp.task('clean', function (done) { del(['build'], done); });
gulp.task('build', function (done) { runSequence('clean', ['html2js','jsonToDB'], ['generateIndexHTML','bower','js','less','copy'], done); }); gulp.task('build', function (done) { runSequence('clean', ['html2js','jsonToDB'], ['generateIndexHTML','bower','js','less','copy'], done); });
gulp.task('build-cache', function (done) { runSequence('build', 'appcache', done); });
gulp.task('dev', function (done) { runSequence('build-cache', 'serve','watch', done); });
gulp.task('deploy', function (done) { gulp.task('deploy', function (done) {
cdnHostStr = '//cdn.' + process.env.CORIOLIS_HOST; cdnHostStr = '//cdn.' + process.env.CORIOLIS_HOST;
runSequence('lint', 'build','cache-bust', 'upload', done); runSequence('lint', 'build','cache-bust', 'appcache', 'upload', done);
}); });
gulp.task('dev', function (done) { runSequence('build', 'serve','watch', done); });
gulp.task('default', ['dev']); gulp.task('default', ['dev']);

View File

@@ -25,6 +25,7 @@ http {
image/svg+xml svg; image/svg+xml svg;
image/x-icon ico; image/x-icon ico;
application/pdf pdf; application/pdf pdf;
text/cache-manifest appcache;
} }
gzip on; gzip on;
@@ -41,6 +42,15 @@ http {
root ./build/; root ./build/;
index index.html; index index.html;
location ~* \.(?:manifest|appcache|html?|xml|json|css|js|map|jpg|jpeg|gif|png|ico|svg|eot|ttf|woff|woff2)$ {
expires -1;
add_header Access-Control-Allow-Origin *;
add_header Access-Control-Allow-Credentials true;
add_header Access-Control-Allow-Methods 'GET, POST, OPTIONS';
add_header Access-Control-Allow-Headers 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type';
access_log off;
}
location / { location / {
try_files $uri $uri/ /index.html =404; try_files $uri $uri/ /index.html =404;
} }

View File

@@ -1,6 +1,6 @@
{ {
"name": "coriolis_shipyard", "name": "coriolis_shipyard",
"version": "0.8.0", "version": "0.10.0",
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/cmmcleod/coriolis" "url": "https://github.com/cmmcleod/coriolis"
@@ -8,16 +8,18 @@
"private": true, "private": true,
"dependencies": {}, "dependencies": {},
"devDependencies": { "devDependencies": {
"gulp-manifest": "^0.0.6",
"angular": "^1.4.0",
"async": "^0.9.0", "async": "^0.9.0",
"del": "^1.1.1", "del": "^1.1.1",
"gulp": "^3.8.11", "gulp": "^3.8.11",
"gulp-angular-templatecache": "^1.6.0", "gulp-angular-templatecache": "^1.6.0",
"gulp-concat": "^2.5.2", "gulp-concat": "^2.5.2",
"gulp-exec": "^2.1.1",
"gulp-htmlmin": "^1.1.1", "gulp-htmlmin": "^1.1.1",
"gulp-jshint": "^1.10.0", "gulp-jshint": "^1.10.0",
"gulp-jsonlint": "^1.0.2", "gulp-jsonlint": "^1.0.2",
"gulp-less": "^3.0.2", "gulp-less": "^3.0.2",
"gulp-manifest": "0.0.6",
"gulp-minify-css": "^1.0.0", "gulp-minify-css": "^1.0.0",
"gulp-rev-all": "^0.8.18", "gulp-rev-all": "^0.8.18",
"gulp-sourcemaps": "^1.5.1", "gulp-sourcemaps": "^1.5.1",

View File

@@ -26,7 +26,8 @@ async.parallel([
function done(err, json) { this(err,json); } function done(err, json) { this(err,json); }
function writeDB(err, arr) { function writeDB(err, arr) {
var internal = {}, hardpoints = {}; var ships = {}, internal = {}, hardpoints = {};
var shipOrder = Object.keys(arr[0]).sort();
var internalOrder = Object.keys(arr[3]).sort(); var internalOrder = Object.keys(arr[3]).sort();
var hpOrder = [ var hpOrder = [
"Pulse Lasers", "Pulse Lasers",
@@ -56,9 +57,13 @@ function writeDB(err, arr) {
hardpoints[hpOrder[j]] = arr[2][hpOrder[j]]; hardpoints[hpOrder[j]] = arr[2][hpOrder[j]];
} }
for (var s = 0; s < shipOrder.length; s++) {
ships[shipOrder[s]] = arr[0][shipOrder[s]];
}
try { try {
var db = { var db = {
ships: arr[0], ships: ships,
components: { components: {
common: arr[1], common: arr[1],
hardpoints: hardpoints, hardpoints: hardpoints,