diff --git a/app/images/bay-1920x1080.jpg b/app/images/bay-1920x1080.jpg new file mode 100644 index 00000000..1fd003db Binary files /dev/null and b/app/images/bay-1920x1080.jpg differ diff --git a/app/images/ed-logo-sm.png b/app/images/ed-logo-sm.png deleted file mode 100644 index 7e7068a7..00000000 Binary files a/app/images/ed-logo-sm.png and /dev/null differ diff --git a/app/index.html b/app/index.html index b3a828dc..6de2eb45 100644 --- a/app/index.html +++ b/app/index.html @@ -20,9 +20,9 @@ + - -
+
@@ -30,7 +30,7 @@
Version <%= version %> - <%= date %>
-
+
Coriolis Shipyard 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 and no employee of Frontier Developments was involved in the making of it.
diff --git a/app/js/config.js b/app/js/config.js index 21ed1b4d..c412f508 100644 --- a/app/js/config.js +++ b/app/js/config.js @@ -13,7 +13,7 @@ angular.module('app').config(['$provide','$stateProvider', '$urlRouterProvider', params: { // TODO: Squash:false not working due to UI-router issue shipId: { value: 'sidewinder', squash: false}, // Allow 'shipId' parameter to default to - code: { value: undefined, squash: true } // Allow 'code' parameter to be empty/optional + code: { value: null, squash: true } // Allow 'code' parameter to be empty/optional }, templateUrl: 'views/page-outfit.html', controller: 'OutfitController', diff --git a/app/js/controllers/controller-error.js b/app/js/controllers/controller-error.js index aabc4508..65619ab4 100644 --- a/app/js/controllers/controller-error.js +++ b/app/js/controllers/controller-error.js @@ -1,29 +1,32 @@ angular.module('app') -.controller('ErrorController', ['$rootScope','$scope','$stateParams', '$location', function ($rootScope, $scope, $p, $location) { +.controller('ErrorController', ['$window','$rootScope','$scope','$stateParams', '$location', function ($window, $rootScope, $scope, $p, $location) { $rootScope.title = 'Error'; $scope.path = $location.path(); $scope.type = $p.type || 'unknown'; + $scope.browser = $window.navigator.appVersion; switch ($scope.type) { case 404: $scope.msgPre = 'Page'; $scope.msgHighlight = $scope.path; $scope.msgPost = 'Not Found'; - $scope.image = 'deep-space'; + $rootScope.bodyClass = 'deep-space'; break; case 'no-ship': $scope.msgPre = 'Ship'; $scope.msgHighlight = $p.message; $scope.msgPost = 'does not exist'; - $scope.image = 'thargoid'; + $rootScope.bodyClass = 'docking-bay'; break; case 'build-fail': $scope.msgPre = 'Build Failure!'; $scope.image = 'ship-explode'; + $rootScope.bodyClass = 'docking-bay'; break; default: $scope.msgPre = "Uh, this is bad.."; $scope.image = 'thargoid'; + $rootScope.bodyClass = null; } }]); \ No newline at end of file diff --git a/app/js/controllers/controller-outfit.js b/app/js/controllers/controller-outfit.js index 2b9fba71..5dbfde67 100644 --- a/app/js/controllers/controller-outfit.js +++ b/app/js/controllers/controller-outfit.js @@ -11,7 +11,6 @@ angular.module('app').controller('OutfitController', ['$rootScope','$scope', '$s } $scope.buildName = $p.bn; - $rootScope.title = ship.name + ($scope.buildName? ' - ' + $scope.buildName: ''); $scope.ship = ship; $scope.pp = ship.common[0]; // Power Plant $scope.th = ship.common[1]; // Thruster @@ -25,6 +24,8 @@ angular.module('app').controller('OutfitController', ['$rootScope','$scope', '$s $scope.availCS = Components.forShip(ship.id); $scope.selectedSlot = null; $scope.savedCode = Persist.getBuild(ship.id, $scope.buildName); + $rootScope.title = ship.name + ($scope.buildName? ' - ' + $scope.buildName: ''); + $rootScope.bodyClass = 'docking-bay'; // for debugging window.myScope = $scope; @@ -62,7 +63,7 @@ angular.module('app').controller('OutfitController', ['$rootScope','$scope', '$s } else if (type == 'i') { ship.use(slot, e.srcElement.id, Components.internal(e.srcElement.id)); } else if (type == 'b') { - ship.useBulkhead(slot, e.srcElement.id); + ship.useBulkhead(e.srcElement.id); } else { ship.use(slot, null, null); } @@ -88,9 +89,11 @@ angular.module('app').controller('OutfitController', ['$rootScope','$scope', '$s * for this ship & with the exact name. */ $scope.saveBuild = function() { - if($scope.code != $scope.savedCode) { + if($scope.buildName && $scope.code != $scope.savedCode) { Persist.saveBuild(ship.id, $scope.buildName, $scope.code); $scope.savedCode = $scope.code; + // Edge case TODO: comment more + $state.go('outfit', {shipId: ship.id, code: $scope.savedCode, bn: $scope.buildName}, {location:'replace', notify:false}); } } @@ -104,6 +107,10 @@ angular.module('app').controller('OutfitController', ['$rootScope','$scope', '$s $state.go('outfit', {shipId: ship.id, code: null, bn: null}, {location:'replace', reload:true}); } + $scope.bnChange = function(){ + $scope.savedCode = Persist.getBuild(ship.id, $scope.buildName); + } + $rootScope.$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) { diff --git a/app/js/controllers/controller-shipyard.js b/app/js/controllers/controller-shipyard.js index 80f37441..0e8fad10 100644 --- a/app/js/controllers/controller-shipyard.js +++ b/app/js/controllers/controller-shipyard.js @@ -1,3 +1,4 @@ angular.module('app').controller('ShipyardController', ['$rootScope', function ($rootScope) { $rootScope.title = 'Coriolis - Shipyard'; + $rootScope.bodyClass = 'docking-bay'; }]); \ No newline at end of file diff --git a/app/js/directives/directive-meter.js b/app/js/directives/directive-meter.js deleted file mode 100644 index 395b59f6..00000000 --- a/app/js/directives/directive-meter.js +++ /dev/null @@ -1,77 +0,0 @@ -angular.module('app').directive('meter', function () { - return { - restrict: 'A', - scope: { - labels: '=', - keys: '=', - obj: '=', - max: '=' - }, - link: function (scope, element) { - var max = scope.max, - w = 90, - pLeft = 1, - pBottom = 2, - labelWidth = 45, - bHeight = 16, - bWidth = ((w - labelWidth) / max) - pLeft, - h = bHeight * scope.keys.length; - - var data = []; - - for(var i = 0; i < scope.keys.length; i++) { - data.push({name:scope.labels[i], val: scope.obj[scope.keys[i]]}); - } - - var svg = d3.select(element[0]) - .append('svg') - .attr('width', w) - .attr('height', h) - .attr('viewBox', '0 0 ' + w + ' ' + h) - .attr('class', 'meter') - .attr('preserveAspectRatio', 'xMinYMin'); - - svg.selectAll("g").data(data) - .enter() - .append("g") - .attr('transform', function(d, i) { - return 'translate(' + labelWidth + ' ' + (i * bHeight) + ')'; - }) - .each(function(d, k) { - var g = d3.select(this); - for (var i = 0; i < max; i++) { - g.append('rect') - .attr("x", i * (bWidth + pLeft)) - .attr("y", 0) - .attr("width", bWidth) - .attr("height", bHeight - pBottom); - } - }); - - svg.selectAll("text").data(data) - .enter() - .append('text') - .text(function(d) { - return d.name; - }) - .attr("text-anchor", "end") - .attr("x", labelWidth - 3) - .attr("y", function(d, i) { - return (i * bHeight) + (bHeight) / 2; - }); - - function update() { - for(var i = 0; i < data.length; i++) { - data[i].val = scope.obj[scope.keys[i]]; - } - - svg.selectAll("g").data(data) - .selectAll('rect').attr('class', function(d, i) { - return (i + 1 <= d.val) ? 'active' : ''; - }); - } - - scope.$watch('obj',update); - } - }; -}); \ No newline at end of file diff --git a/app/less/app.less b/app/less/app.less index ea952540..f0337710 100644 --- a/app/less/app.less +++ b/app/less/app.less @@ -9,7 +9,6 @@ @import 'outfit'; @import 'select'; @import 'charts'; -@import 'meters'; @import 'error'; @@ -24,24 +23,26 @@ body { padding: 0; font-family: @fStandard; overflow-x: hidden; -} - -#bg { - position: fixed; - top: 0; - left: 0; - width: 100%; - height: 100%; - z-index: -1; - opacity: 0.3; - background-image: url(images/docking-bay.jpg); + background-image: none; background-repeat: no-repeat; - background-position: center; + background-position: center center fixed; + -webkit-background-size: cover; + -moz-background-size: cover; + -o-background-size: cover; background-size: cover; + + &.deep-space { + background-image: url(images/deep-space.jpg); + } + + &.docking-bay { + background-image: url(images/bay-1920x1080.jpg); + } } #main { - margin: 10px; + margin: 0; + padding: 0.5em 0.25em; min-height: 800px; clear: both; } @@ -71,22 +72,14 @@ a, a:visited { } footer { + clear: both; font-size: 0.6em; color: #999; - padding: 10px 0; - width: 100%; + padding: 1em; overflow: hidden; -} -footer { .right { float: right; text-align: right; - margin-right: 10px; - } - .left { - float: left; - text-align: left; - margin-left: 10px; } } \ No newline at end of file diff --git a/app/less/colors.less b/app/less/colors.less index 372ea7a8..aed4968f 100644 --- a/app/less/colors.less +++ b/app/less/colors.less @@ -1,20 +1,21 @@ -@fg: #fff; -@bg: #333; -@primary: #FF8C0D; // Light Orange -@secondary: #32DBDB; // Light blue -@warning: #FF3B00; // Dark Orange - +// Constants for calculations @bgDarken: 40%; @disabledDarken: 15%; @bgTransparency: 10%; -@disabled: #888; +// Foreground colors +@fg: #fff; +@primary: #FF8C0D; // Light Orange +@secondary: #1FB0FF; // Light blue +@warning: #FF3B00; // Dark Orange +@disabled: #888; // Light grey @primary-disabled: darken(@primary, @disabledDarken); @secondary-disabled: darken(@secondary, @disabledDarken); @warning-disabled: darken(@warning, @disabledDarken); +// Background colors +@bg: rgba(70,70,70,0.95); @bgBlack: rgba(0,0,0,0.9); - -@primary-bg: fadeout(darken(@primary, 45%), 30%); +@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 diff --git a/app/less/header.less b/app/less/header.less index 47b27fde..23f8d35a 100644 --- a/app/less/header.less +++ b/app/less/header.less @@ -37,19 +37,19 @@ header { } .menu-list { - width: 200%; + width: 250%; font-family: @fStandard; position: absolute; - padding: 0 1em 1em 0; + margin-right: 1em; + padding: 0 0 1em 1em; overflow: hidden; background-color: @bgBlack; font-size: 0.8em; } ul { - margin: 0; + margin: 0.5em 1em 0 0; padding: 0; - margin-top: 0.5em; line-height: 2em; } @@ -76,6 +76,11 @@ header { } } + .block { + display: block; + line-height: 1.5em; + } + .title { font-size: 1.3em; display: inline-block; diff --git a/app/less/meters.less b/app/less/meters.less deleted file mode 100644 index f1da75af..00000000 --- a/app/less/meters.less +++ /dev/null @@ -1,18 +0,0 @@ - -svg.meter { - text { - fill: @warning; - font-size: 15px; - font-family: @fStandard; - text-transform:uppercase; - alignment-baseline: middle; - } - - rect { - fill: @disabled; - - &.active { - fill: @warning; - } - } -} diff --git a/app/less/outfit.less b/app/less/outfit.less index c4dfffa1..cb453150 100644 --- a/app/less/outfit.less +++ b/app/less/outfit.less @@ -1,8 +1,13 @@ +#outfit { + //width: 62em; + //margin: 0 auto; +} + #overview { h1 { font-family: @fTitle; - margin: 5px 0; + margin: 0.2em 0; color: @primary; float: left; } @@ -14,18 +19,22 @@ input { background: @primary-bg; - color: @fg; + color: @secondary; + outline: none; border: none; font-size: 0.8em; line-height: 2em; - text-transform: uppercase; + text-align: right; + &:hover, &:focus { + background-color: @secondary-bg; + } } } #hardpoints { .slot:nth-child(2n) { clear: left; - margin-right: 10px; + margin-right: 0.5em; } } @@ -41,34 +50,21 @@ } } +u { // Unit (Mj, Km, etc) + font-size: 0.8em; + text-decoration: none; +} + #summary { .user-select-none(); float: right; - width: 40%; + min-width: 40em; + margin: 0.25em; border-top: 2px solid @primary; border-bottom: 2px solid @primary; background-color: @primary-bg; } -legend { - text-transform: uppercase; - padding: 0 5px; - color: @warning; - font-family: @fTitle; -} - -fieldset { - user-select: none; - -moz-user-select: none; - -webkit-user-select: none; - -ms-user-select: none; - cursor: default; - border: 2px solid @warning-bg; - .border-radius(5px); - margin: 5px; - padding: 1px 5px 5px; -} - .toggle { cursor: pointer; } diff --git a/app/less/shipyard.less b/app/less/shipyard.less index a3dfec82..f77ad467 100644 --- a/app/less/shipyard.less +++ b/app/less/shipyard.less @@ -1,10 +1,12 @@ +#shipyard { + vertical-align: top; +} + a.ship { - display: block; - float: left; + display: inline-block; width: 22%; - height: 30%; - margin: 1% 1%; + margin: 1%; background-color: @bg; padding: 0.5%; text-decoration: none; diff --git a/app/less/slot.less b/app/less/slot.less index 3d6ed99b..2a3d1587 100644 --- a/app/less/slot.less +++ b/app/less/slot.less @@ -1,7 +1,7 @@ .slot-group { float: left; - margin: 0 5px; + margin: 0.25em; .user-select-none(); cursor: default; @@ -10,7 +10,7 @@ color: @bgBlack; background-color: @primary-disabled; text-transform: uppercase; - margin: 2px 0; + margin: 0.1em 0; font-size: 0.8em; padding-left: 0.5em; } @@ -18,9 +18,9 @@ .slot { float: left; - width: 230px; + width: 20.5em; font-size: 0.75em; - margin-top: 3px; + margin-top: 0.5em; position: relative; z-index: 0; padding-right: 0.4em; @@ -34,6 +34,7 @@ overflow: hidden; height: 100%; cursor: pointer; + text-transform: none; } .cb { diff --git a/app/less/utilities.less b/app/less/utilities.less index 647299e1..43767ddf 100644 --- a/app/less/utilities.less +++ b/app/less/utilities.less @@ -22,7 +22,7 @@ } .user-select-none (){ - -webkit-touch-callout: none; + -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; diff --git a/app/views/_header.html b/app/views/_header.html index cf800c81..508beb5b 100644 --- a/app/views/_header.html +++ b/app/views/_header.html @@ -1,10 +1,17 @@
+ + -
- - -
+
+ +
\ No newline at end of file diff --git a/app/views/costs.html b/app/views/costs.html index 421807f7..7011efde 100644 --- a/app/views/costs.html +++ b/app/views/costs.html @@ -10,7 +10,7 @@
{{c.c.class}}{{c.c.rating}} {{$r.CArr[$index]}}
{{$r.fCrd(c.c.cost)}}
-
{{c.c.class}}{{c.c.rating}} {{c.c.name}}
{{$r.fCrd(c.c.cost)}}
+
{{c.c.class}}{{c.c.rating}} {{c.c.name || $r.hgMap[c.c.grp]}}
{{$r.fCrd(c.c.cost)}}
{{c.c.class}}{{c.c.rating}} {{c.c.name || $r.igMap[c.c.group]}}
{{$r.fCrd(c.c.cost)}}
@@ -20,10 +20,10 @@
Total
-
{{$r.fCrd(ship.totalCost)}} CR
+
{{$r.fCrd(ship.totalCost)}} CR
Insurance
-
{{$r.fCrd(ship.totalCost * (1-insurance))}} CR
+
{{$r.fCrd(ship.totalCost * (1-insurance))}} CR
diff --git a/app/views/page-error.html b/app/views/page-error.html index 355e0577..99d58d9a 100644 --- a/app/views/page-error.html +++ b/app/views/page-error.html @@ -7,8 +7,10 @@ -

-

+

Path: {{path}}

+

Error: {{type}}

+

Details: {{details | json}}

+

Browser: {{browser}}

\ No newline at end of file diff --git a/app/views/page-outfit.html b/app/views/page-outfit.html index 3ba3092c..4748783b 100644 --- a/app/views/page-outfit.html +++ b/app/views/page-outfit.html @@ -1,179 +1,186 @@ - -
-

HardPoints

-
-
-
-
EMPTY
-
-
{{grp}}
-
+
+
+

HardPoints

+
+
+
+
EMPTY
+
+
{{grp}}
+
+
-
-
-

Standard

-
-
-
8
-
Bulkheads
{{ship.bulkheads.c.class}}{{ship.bulkheads.c.rating}}
-
{{ship.bulkheads.c.name}}
-
{{ship.bulkheads.c.mass}} T
+
+

Standard

+
+
+
8
+
Bulkheads
{{ship.bulkheads.c.class}}{{ship.bulkheads.c.rating}}
+
{{ship.bulkheads.c.name}}
+
{{ship.bulkheads.c.mass}} T
+
+
    +
  • Lightweight Alloy
  • +
  • Reinforced Alloy
  • +
  • Military Grade Composite
  • +
  • Mirrored Surface Composite
  • +
  • Reactive Surface Composite
  • +
-
    -
  • Lightweight Alloy
  • -
  • Reinforced Alloy
  • -
  • Military Grade Composite
  • -
  • Mirrored Surface Composite
  • -
  • Reactive Surface Composite
  • -
-
-
-
-
{{::pp.maxClass}}
-
Power Plant
-
{{pp.id}}
-
-
Eff: {{pp.c.eff}}
-
Power: {{pp.c.pGen}} MW
-
{{pp.c.mass}} T
+
+
+
{{::pp.maxClass}}
+
Power Plant
+
{{pp.id}}
+
+
Eff: {{pp.c.eff}}
+
Power: {{pp.c.pGen}} MW
+
{{pp.c.mass}} T
+
+
-
-
-
-
-
{{::th.maxClass}}
-
Thrusters
-
{{th.id}}
-
-
Opt: {{th.c.optmass}} T
-
Max: {{th.c.optmass}} T
-
{{th.c.mass}} T
+
+
+
{{::th.maxClass}}
+
Thrusters
+
{{th.id}}
+
+
Opt: {{th.c.optmass}} T
+
Max: {{th.c.maxmass}} T
+
{{th.c.mass}} T
+
+
-
-
-
-
-
{{::fsd.maxClass}}
-
Frame Shift Drive
-
{{fsd.id}}
-
-
Opt: {{fsd.c.optmass}} T
-
Max Fuel: {{fsd.c.maxfuel}} T
-
{{fsd.c.mass}} T
+
+
+
{{::fsd.maxClass}}
+
Frame Shift Drive
+
{{fsd.id}}
+
+
Opt: {{fsd.c.optmass}} T
+
Max Fuel: {{fsd.c.maxfuel}} T
+
{{fsd.c.mass}} T
+
+
-
-
-
-
-
{{::ls.maxClass}}
-
Life Support
-
{{ls.id}}
-
-
Time: {{fTime(ls.c.time)}}
-
{{ls.c.mass}} T
+
+
+
{{::ls.maxClass}}
+
Life Support
+
{{ls.id}}
+
+
Time: {{fTime(ls.c.time)}}
+
{{ls.c.mass}} T
+
+
-
-
-
-
-
{{::pd.maxClass}}
-
Power Distributor
-
{{pd.id}}
-
- -
{{pd.c.mass}} T
+
+
+
{{::pd.maxClass}}
+
Power Distributor
+
{{pd.id}}
+
+
Sys: {{pd.c.weaponcapacity}} Mj {{pd.c.weaponrecharge}} Mj/s
+
Wep: {{pd.c.systemcapacity}} Mj {{pd.c.systemrecharge}} Mj/s
+
Eng: {{pd.c.enginecapacity}} Mj {{pd.c.enginerecharge}}Mj/s
+
{{pd.c.mass}} T
+
+
-
-
-
-
-
{{::ss.maxClass}}
-
Sensors
-
{{ss.id}}
-
-
{{ss.c.range}} KM
-
{{ss.c.mass}} T
+
+
+
{{::ss.maxClass}}
+
Sensors
+
{{ss.id}}
+
+
{{ss.c.range}} KM
+
{{ss.c.mass}} T
+
+
-
-
-
-
-
{{::ft.maxClass}}
-
Fuel Tank
-
{{ft.id}}
-
{{ft.c.capacity}} T
+
+
+
{{::ft.maxClass}}
+
Fuel Tank
+
{{ft.id}}
+
{{ft.c.capacity}} T
+
+
-
-
-
-

Internal Compartments

-
-
-
-
EMPTY
-
-
{{grp}}
-
+
+

Internal Compartments

+
+
+
+
EMPTY
+
+
{{grp}}
+
+
-
-
-
-

-
- - - - +
+
+

+
+ + + + + +
-
-
-
Maneuverability
-
-
Boost
{{fRound(ship.boost)}} m/s
-
Speed
{{fRound(ship.speed)}} m/s
-
Agility
{{ship.agility}} / 10
-
-
-
-
Shields
-
-
Recharge Rate
{{fRound(0)}} Mj/s
-
Strength
{{fRound(ship.shieldStrength)}} Mj
-
Multiplier
{{fRPct(ship.shieldMultiplier)}}
-
-
-
-
Armor
-
-
Total
{{ship.armourTotal}}
-
Added
{{ship.armourAdded}}
-
Base
{{ship.armour}}
-
-
-
-
Mass
-
-
Max
{{fRound(ship.maxMass)}} T
-
Laden
{{fRound(ship.ladenMass)}} T
-
Unladen
{{fRound(ship.unladenMass)}} T
-
-
-
-
Capacity
+
Maneuverability
-
Cargo
{{fRound(ship.cargoCapacity)}} T
-
Fuel
{{fRound(ship.fuelCapacity)}} T
+
Boost
{{fRound(ship.boost)}} m/s
+
Speed
{{fRound(ship.speed)}} m/s
+
Agility
{{ship.agility}} / 10
+
+
+
Shields
+
+ +
Strength
{{fRound(ship.shieldStrength)}} Mj
+
Multiplier
{{fRPct(ship.shieldMultiplier)}}
+
+
+
+
Armor
+
+
Total
{{ship.armourTotal}}
+
Added
{{ship.armourAdded}}
+
Base
{{ship.armour}}
+
+
+
+
Mass
+
+
Max
{{fRound(ship.maxMass)}} T
+
Laden
{{fRound(ship.ladenMass)}} T
+
Unladen
{{fRound(ship.unladenMass)}} T
+
+
+
+
+
Capacity
+
+
Cargo
{{fRound(ship.cargoCapacity)}} T
+
Fuel
{{fRound(ship.fuelCapacity)}} T
+
+
+
+
-
-
+
diff --git a/app/views/page-shipyard.html b/app/views/page-shipyard.html index 2816e07c..b5c1bf89 100644 --- a/app/views/page-shipyard.html +++ b/app/views/page-shipyard.html @@ -1,4 +1,4 @@ - + {{fCrd(s.properties.cost)}} CR - \ No newline at end of file + +
\ No newline at end of file diff --git a/app/views/power.html b/app/views/power.html index 416ff013..8776eabe 100644 --- a/app/views/power.html +++ b/app/views/power.html @@ -14,7 +14,7 @@
-
{{c.c.class}}{{c.c.rating}} {{c.c.name}}
{{$r.fPwr(c.c.power)}}
+
{{c.c.class}}{{c.c.rating}} {{c.c.name || $r.hgMap[c.c.grp]}}
{{$r.fPwr(c.c.power)}}
@@ -24,14 +24,14 @@
Available
-
{{$r.fPwr(ship.powerAvailable)}} MW
+
{{$r.fPwr(ship.powerAvailable)}} MW
Deployed
-
{{$r.fPwr(ship.powerDeployed)}} MW ({{$r.fPct(ship.powerDeployed/ship.powerAvailable)}})
+
{{$r.fPwr(ship.powerDeployed)}} MW ({{$r.fPct(ship.powerDeployed/ship.powerAvailable)}})
Retracted
-
{{$r.fPwr(ship.powerRetracted)}} MW ({{$r.fPct(ship.powerRetracted/ship.powerAvailable)}})
+
{{$r.fPwr(ship.powerRetracted)}} MW ({{$r.fPct(ship.powerRetracted/ship.powerAvailable)}})
diff --git a/app/views/ship-range.html b/app/views/ship-range.html index b4533544..2b8215dd 100644 --- a/app/views/ship-range.html +++ b/app/views/ship-range.html @@ -6,10 +6,10 @@
Laden
-
{{$r.fRound(ship.ladenJumpRange)}} Ly
+
{{$r.fRound(ship.ladenJumpRange)}} LY
Unladen
-
{{$r.fRound(ship.unladenJumpRange)}} Ly
+
{{$r.fRound(ship.unladenJumpRange)}} LY
diff --git a/app/views/slot-hardpoint.html b/app/views/slot-hardpoint.html index d34d18a1..d8731ae6 100644 --- a/app/views/slot-hardpoint.html +++ b/app/views/slot-hardpoint.html @@ -3,14 +3,17 @@
{{hp.c.name || lbl}}
{{hp.c.class}}{{hp.c.rating}}/{{hp.c.mode}}{{hp.c.missile}}
-
-
-
+
+
Damage: {{hp.c.damage}}
+
DPS: {{hp.c.dps}}
+
T-Load: {{hp.c.thermload}}
Ammo: {{$r.fCrd(hp.c.clip)}}/{{$r.fCrd(hp.c.ammo)}}
-
ROF: {{hp.c.rof}}/s
+
ROF: {{hp.c.rof}}/s
+
Pen: {{hp.c.armourpen}}
+
Type: {{hp.c.type}}
+{{$r.fRPct(hp.c.shieldmul)}}
-
{{hp.c.range}} KM
-
{{hp.c.mass}} T
+
{{hp.c.range}} KM
+
{{hp.c.mass}} T
diff --git a/app/views/slot-internal.html b/app/views/slot-internal.html index 7e645986..6f1241fe 100644 --- a/app/views/slot-internal.html +++ b/app/views/slot-internal.html @@ -4,12 +4,14 @@
{{c.c.name || lbl}}
{{c.c.class}}{{c.c.rating}}
-
Opt: {{c.c.optmass}} T
-
Max: {{c.c.optmass}} T
-
{{c.c.bins}} Bins
-
{{c.c.range}} KM
-
+{{c.c.armouradd}} Armour
-
{{c.c.mass || c.c.capacity || '0'}} T
+
Opt: {{c.c.optmass}} T
+
Max: {{c.c.optmass}} T
+
{{c.c.bins}} Bins
+
Ammo: {{c.c.ammo}}
+
Repair: {{c.c.repair}}
+
{{c.c.range}} KM
+
+{{c.c.armouradd}} Armour
+
{{c.c.mass || c.c.capacity || '0'}} T
\ No newline at end of file diff --git a/data/components/common/frame_shift_drive.json b/data/components/common/frame_shift_drive.json index da4d3eba..895a6eb2 100644 --- a/data/components/common/frame_shift_drive.json +++ b/data/components/common/frame_shift_drive.json @@ -164,6 +164,17 @@ "fuelmul": 0.011, "fuelpower": 2.3 }, + "5A": { + "class": 5, + "rating": "A", + "cost": 5103953, + "mass": 20, + "power": 0.6, + "optmass": 1050, + "maxfuel": 5, + "fuelmul": 0.012, + "fuelpower": 2.45 + }, "5B": { "class": 5, "rating": "B", @@ -262,16 +273,5 @@ "maxfuel": 5.3, "fuelmul": 0.011, "fuelpower": 2.6 - }, - "5A": { - "class": 5, - "rating": "A", - "cost": 5103953, - "mass": 20, - "power": 0.6, - "optmass": 1050, - "maxfuel": 5, - "fuelmul": 0.012, - "fuelpower": 2.45 } } diff --git a/data/components/internal/scanners.json b/data/components/internal/scanners.json index a0c6dbd8..7dc44615 100644 --- a/data/components/internal/scanners.json +++ b/data/components/internal/scanners.json @@ -2,7 +2,7 @@ "Scanners": { "2f": { "group": "sc", - "name": "Advanced Discovery Scanner", + "name": "Adv. Discovery Scanner", "class": 1, "rating": "C", "cost": 1545000, @@ -12,7 +12,7 @@ }, "2g": { "group": "sc", - "name": "Intermediate Discovery Scanner", + "name": "Inter. Discovery Scanner", "class": 1, "rating": "D", "cost": 505000, diff --git a/gulpfile.js b/gulpfile.js index f7ef77af..4ae0adb8 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -11,7 +11,8 @@ var gulp = require('gulp'), mainBowerFiles = require('main-bower-files'), del = require('del'), runSequence = require('run-sequence'), - exec = require('child_process').exec + exec = require('child_process').exec, + RevAll = require('gulp-rev-all'), pkg = require('./package.json'); gulp.task('less', function() { @@ -148,8 +149,36 @@ gulp.task('watch', function() { gulp.watch('data/**/*.json', ['jsonToDB']); }); +gulp.task('cache-bust', function(done) { + var revAll = new RevAll({ dontRenameFile: ['.html','db.json'] }); + var stream = gulp.src('build/**') + .pipe(revAll.revision()) + .pipe(gulp.dest('build')) + .pipe(revAll.manifestFile()) + .pipe(gulp.dest('build')); + + stream.on('end', function() { + var manifest = require('./build/rev-manifest.json'); + var arr = []; + for(var origFileName in manifest) { + if(origFileName != manifest[origFileName]) { // For all files busted/renamed + arr.push('./build/' + origFileName); // Add the original filename to the list + } + } + del(arr, done); // Delete all originals files the were not busted/renamed + }); + stream.on('error', done); + +}); + +gulp.task('upload', function(done) { + // Does nothing yet :P + 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('deploy', function (done) { runSequence('build','cache-bust', 'upload', done); }); gulp.task('dev', function (done) { runSequence('build', 'serve','watch', done); }); gulp.task('default', ['dev']); diff --git a/package.json b/package.json index 1aca5fcf..25a9f8ed 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,7 @@ "gulp-jshint": "^1.10.0", "gulp-less": "^3.0.2", "gulp-minify-css": "^1.0.0", + "gulp-rev-all": "^0.8.18", "gulp-sourcemaps": "^1.5.1", "gulp-template": "^3.0.0", "gulp-uglify": "^1.2.0",