mirror of
https://github.com/EDCD/coriolis.git
synced 2025-12-08 22:33:24 +00:00
Add size map
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
angular.module('app', ['ui.router', 'ct.ui.router.extras.sticky', 'ui.sortable', 'shipyard', 'ngLodash', 'app.templates', 'pascalprecht.translate'])
|
angular.module('app', ['ui.router', 'ct.ui.router.extras.sticky', 'ui.sortable', 'shipyard', 'ngLodash', 'app.templates', 'pascalprecht.translate'])
|
||||||
.run(['$rootScope', '$location', '$window', '$document', '$state', '$translate', 'localeFormat', 'Persist', 'Discounts', 'Languages',
|
.run(['$rootScope', '$location', '$window', '$document', '$state', '$translate', 'localeFormat', 'Persist', 'Discounts', 'Languages', 'SizeMap',
|
||||||
function($rootScope, $location, $window, $doc, $state, $translate, localeFormat, Persist, Discounts, Languages) {
|
function($rootScope, $location, $window, $doc, $state, $translate, localeFormat, Persist, Discounts, Languages, SizeMap) {
|
||||||
// App is running as a standalone web app on tablet/mobile
|
// App is running as a standalone web app on tablet/mobile
|
||||||
var isStandAlone;
|
var isStandAlone;
|
||||||
// This was causing issues on Windows phones ($window.external was causing Angular js to throw an exception). Backup is to try this and set isStandAlone to false if this fails.
|
// This was causing issues on Windows phones ($window.external was causing Angular js to throw an exception). Backup is to try this and set isStandAlone to false if this fails.
|
||||||
@@ -43,6 +43,7 @@ function($rootScope, $location, $window, $doc, $state, $translate, localeFormat,
|
|||||||
$rootScope.insurance = { opts: [{ name: 'standard', pct: 0.05 }, { name: 'alpha', pct: 0.025 }, { name: 'beta', pct: 0.0375 }] };
|
$rootScope.insurance = { opts: [{ name: 'standard', pct: 0.05 }, { name: 'alpha', pct: 0.025 }, { name: 'beta', pct: 0.0375 }] };
|
||||||
$rootScope.discounts = { opts: Discounts };
|
$rootScope.discounts = { opts: Discounts };
|
||||||
$rootScope.sizeRatio = Persist.getSizeRatio();
|
$rootScope.sizeRatio = Persist.getSizeRatio();
|
||||||
|
$rootScope.SZM = SizeMap;
|
||||||
$rootScope.title = 'Coriolis';
|
$rootScope.title = 'Coriolis';
|
||||||
|
|
||||||
$rootScope.changeLanguage = function() {
|
$rootScope.changeLanguage = function() {
|
||||||
|
|||||||
@@ -10,15 +10,16 @@ angular.module('shipyard', ['ngLodash'])
|
|||||||
// Create 'angularized' references to DB. This will aid testing
|
// Create 'angularized' references to DB. This will aid testing
|
||||||
.constant('ShipsDB', DB.ships)
|
.constant('ShipsDB', DB.ships)
|
||||||
.constant('ComponentsDB', DB.components)
|
.constant('ComponentsDB', DB.components)
|
||||||
.value('ArmourMultiplier', [
|
.constant('ArmourMultiplier', [
|
||||||
1, // Lightweight
|
1, // Lightweight
|
||||||
1.4, // Reinforced
|
1.4, // Reinforced
|
||||||
1.945, // Military
|
1.945, // Military
|
||||||
1.945, // Mirrored
|
1.945, // Mirrored
|
||||||
1.945 // Reactive
|
1.945 // Reactive
|
||||||
])
|
])
|
||||||
|
.constant('SizeMap', ['', 'small', 'medium', 'large', 'capital'])
|
||||||
// Map to lookup group labels/names for component grp, used for JSON Serialization
|
// Map to lookup group labels/names for component grp, used for JSON Serialization
|
||||||
.value('GroupMap', {
|
.constant('GroupMap', {
|
||||||
// Common
|
// Common
|
||||||
pp: 'Power Plant',
|
pp: 'Power Plant',
|
||||||
t: 'Thrusters',
|
t: 'Thrusters',
|
||||||
@@ -64,7 +65,7 @@ angular.module('shipyard', ['ngLodash'])
|
|||||||
sb: 'Shield Booster',
|
sb: 'Shield Booster',
|
||||||
tp: 'Torpedo Pylon'
|
tp: 'Torpedo Pylon'
|
||||||
})
|
})
|
||||||
.value('MountMap', {
|
.constant('MountMap', {
|
||||||
'F': 'Fixed',
|
'F': 'Fixed',
|
||||||
'G': 'Gimballed',
|
'G': 'Gimballed',
|
||||||
'T': 'Turret',
|
'T': 'Turret',
|
||||||
@@ -78,7 +79,7 @@ angular.module('shipyard', ['ngLodash'])
|
|||||||
*
|
*
|
||||||
* @type {Array}
|
* @type {Array}
|
||||||
*/
|
*/
|
||||||
.value('ShipFacets', [
|
.constant('ShipFacets', [
|
||||||
{ // 0
|
{ // 0
|
||||||
title: 'agility',
|
title: 'agility',
|
||||||
props: ['agility'],
|
props: ['agility'],
|
||||||
@@ -161,7 +162,7 @@ angular.module('shipyard', ['ngLodash'])
|
|||||||
/**
|
/**
|
||||||
* Set of all available / theoretical discounts
|
* Set of all available / theoretical discounts
|
||||||
*/
|
*/
|
||||||
.value('Discounts', {
|
.constant('Discounts', {
|
||||||
'0%': 1,
|
'0%': 1,
|
||||||
'5%': 0.95,
|
'5%': 0.95,
|
||||||
'10%': 0.90,
|
'10%': 0.90,
|
||||||
|
|||||||
Reference in New Issue
Block a user