From 7ff1f01d4a029faecaeb32e29ac60d266464e662 Mon Sep 17 00:00:00 2001 From: Mark Friedrich Date: Sun, 1 Dec 2019 00:36:22 +0100 Subject: [PATCH] - Improved signature 'type' select options for Shattered C1-C6 WHs, closed #875 --- js/app/conf/signature_type.js | 850 ++++++++++-------- js/app/init.js | 169 +--- js/app/lib/prototypes.js | 95 ++ js/app/ui/module/system_signature.js | 64 +- js/app/util.js | 120 +-- public/js/v1.5.5/app/conf/signature_type.js | 850 ++++++++++-------- public/js/v1.5.5/app/init.js | 169 +--- public/js/v1.5.5/app/lib/prototypes.js | 95 ++ .../v1.5.5/app/ui/module/system_signature.js | 64 +- public/js/v1.5.5/app/util.js | 120 +-- 10 files changed, 1368 insertions(+), 1228 deletions(-) create mode 100644 js/app/lib/prototypes.js create mode 100644 public/js/v1.5.5/app/lib/prototypes.js diff --git a/js/app/conf/signature_type.js b/js/app/conf/signature_type.js index 108da68b..1279b8c9 100644 --- a/js/app/conf/signature_type.js +++ b/js/app/conf/signature_type.js @@ -1,21 +1,118 @@ /** - * Created by exodus4d on 06.07.2015. + * Created by exodus4d * static signature types * * (*) marked fields are in-game verified and * proofed, signature names (copy & paste from scanning window) */ -define(['jquery'], ($) => { - +define([], () => { 'use strict'; // signature sources // http://de.sistersprobe.wikia.com/wiki/EVE_Sister_Core_Scanner_Probe_Wiki + // Combat sites =================================================================================================== + + let c1Combat = { + 1: 'Perimeter Ambush Point', + 2: 'Perimeter Camp', + 3: 'Phase Catalyst Node', + 4: 'The Line' + }; + + let c2Combat = { + 1: 'Perimeter Checkpoint', + 2: 'Perimeter Hangar', + 3: 'The Ruins of Enclave Cohort 27', + 4: 'Sleeper Data Sanctuary' + }; + + let c3Combat = { + 1: 'Fortification Frontier Stronghold', + 2: 'Outpost Frontier Stronghold', + 3: 'Solar Cell', + 4: 'The Oruze Construct' + }; + + let c4Combat = { + 1: 'Frontier Barracks', + 2: 'Frontier Command Post', + 3: 'Integrated Terminus', + 4: 'Sleeper Information Sanctum' + }; + + let c5Combat = { + 1: 'Core Garrison', //* + 2: 'Core Stronghold', //* + 3: 'Oruze Osobnyk', //* + 4: 'Quarantine Area' + }; + + let c6Combat = { + 1: 'Core Citadel', //* + 2: 'Core Bastion', //* + 3: 'Strange Energy Readings', //* + 4: 'The Mirror' //* + }; + + // Thera WH + let c12Combat = { + 1: 'Epicenter', + 2: 'Expedition Command Outpost Wreck', + 3: 'Planetary Colonization Office Wreck', + 4: 'Testing Facilities' + }; + + // Drifter Sentinel WH + let c14Combat = { + 1: 'Monolith', + 2: 'Wormhole in Rock Circle', + 3: 'Opposing Spatial Rifts', + 4: 'Sleeper Enclave Debris', + 5: 'Crystal Resource' + }; + + // Drifter Barbican WH + let c15Combat = { + 1: 'Wrecked Ships', + 2: 'Unstable Wormhole', + 3: 'Spatial Rift', + 4: 'Heavily Guarded Spatial Rift', + 5: 'Crystals' + }; + + // Drifter Vidette WH + let c16Combat = { + 1: 'Ship Graveyard', + 2: 'Sleeper Engineering Station', + 3: 'Spatial Rift', + 4: 'Sleeper Enclave in Coral Rock', + 5: 'Crystals and Stone Circle' + }; + + // Drifter Conflux WH + let c17Combat = { + 1: 'Monolith', + 2: 'Caged Wormhole', + 3: 'Rock Formation and Wormhole', + 4: 'Particle Acceleration Array', + 5: 'Guarded Asteroid Station' + }; + + // Drifter Redoubt WH + let c18Combat = { + 1: 'Ship Graveyard', + 2: 'Caged Wormhole', + 3: 'Spatial Rift Generator', + 4: 'Sleeper Enclave', + 5: 'Hollow Asteroid' + }; + + // Relic sites ==================================================================================================== // NullSec Relic sites, which can also spawn in C1, C2, C3 wormholes - let nullSecRelicSites = { + let nullRelic = { 10: 'Ruined Angel Crystal Quarry', 11: 'Ruined Angel Monument Site', 12: 'Ruined Angel Science Outpost', @@ -38,8 +135,40 @@ define(['jquery'], ($) => { 29: 'Ruined Serpentis Temple Site' }; + let c1Relic = Object.assign({}, nullRelic, { + 1: 'Forgotten Perimeter Coronation Platform', //* + 2: 'Forgotten Perimeter Power Array' //* + }); + + let c2Relic = Object.assign({}, nullRelic, { + 1: 'Forgotten Perimeter Gateway', //* + 2: 'Forgotten Perimeter Habitation Coils' //* + }); + + let c3Relic = Object.assign({}, nullRelic, { + 1: 'Forgotten Frontier Quarantine Outpost', //* + 2: 'Forgotten Frontier Recursive Depot' //* + }); + + let c4Relic = { + 1: 'Forgotten Frontier Conversion Module', + 2: 'Forgotten Frontier Evacuation Center' + }; + + let c5Relic = { + 1: 'Forgotten Core Data Field', + 2: 'Forgotten Core Information Pen' + }; + + let c6Relic = { + 1: 'Forgotten Core Assembly Hall', //* + 2: 'Forgotten Core Circuitry Disassembler' //* + }; + + // Data sites ===================================================================================================== + // NulSec Data sites, which can also spawn in C1, C2, C3 wormholes - let nullSecDataSites = { + let nullData = { 10: 'Abandoned Research Complex DA005', 11: 'Abandoned Research Complex DA015', 12: 'Abandoned Research Complex DC007', @@ -68,413 +197,384 @@ define(['jquery'], ($) => { 35: 'Central Serpentis Survey Site' }; + let c1Data = Object.assign({}, nullData, { + 1: 'Unsecured Perimeter Amplifier', //* + 2: 'Unsecured Perimeter Information Center' //* + }); + let c2Data = Object.assign({}, nullData, { + 1: 'Unsecured Perimeter Comms Relay', //* + 2: 'Unsecured Perimeter Transponder Farm' //* + }); + + let c3Data = Object.assign({}, nullData, { + 1: 'Unsecured Frontier Database', //* + 2: 'Unsecured Frontier Receiver' //* + }); + + let c4Data = { + 1: 'Unsecured Frontier Digital Nexus', + 2: 'Unsecured Frontier Trinary Hub' + }; + + let c5Data = { + 1: 'Unsecured Frontier Enclave Relay', + 2: 'Unsecured Frontier Server Bank' + }; + + let c6Data = { + 1: 'Unsecured Core Backup Array', //* + 2: 'Unsecured Core Emergence' //* + }; + + // Gas sites ====================================================================================================== + + let c1Gas = { + 1: 'Barren Perimeter Reservoir', //* + 2: 'Token Perimeter Reservoir', //* + 3: 'Minor Perimeter Reservoir', //* + 4: 'Sizeable Perimeter Reservoir', //* + 5: 'Ordinary Perimeter Reservoir' //* + }; + + let c2Gas = { + 1: 'Barren Perimeter Reservoir', //* + 2: 'Token Perimeter Reservoir', //* + 3: 'Minor Perimeter Reservoir', //* + 4: 'Sizeable Perimeter Reservoir', //* + 5: 'Ordinary Perimeter Reservoir' //* + }; + + let c3Gas = { + 1: 'Barren Perimeter Reservoir', //* + 2: 'Token Perimeter Reservoir', //* + 3: 'Minor Perimeter Reservoir', //* + 4: 'Sizeable Perimeter Reservoir', //* + 5: 'Ordinary Perimeter Reservoir', //* + 6: 'Bountiful Frontier Reservoir', //* + 7: 'Vast Frontier Reservoir' //* + }; + + let c4Gas = { + 1: 'Barren Perimeter Reservoir', //* + 2: 'Token Perimeter Reservoir', //* + 3: 'Minor Perimeter Reservoir', //* + 4: 'Sizeable Perimeter Reservoir', //* + 5: 'Ordinary Perimeter Reservoir', //* + 6: 'Vast Frontier Reservoir', //* + 7: 'Bountiful Frontier Reservoir' //* + }; + + let c5Gas = { + 1: 'Barren Perimeter Reservoir', //* + 2: 'Minor Perimeter Reservoir', //* + 3: 'Ordinary Perimeter Reservoir', //* + 4: 'Sizeable Perimeter Reservoir', //* + 5: 'Token Perimeter Reservoir', //* + 6: 'Bountiful Frontier Reservoir', //* + 7: 'Vast Frontier Reservoir', //* + 8: 'Instrumental Core Reservoir', //* + 9: 'Vital Core Reservoir' //* + }; + + let c6Gas = { + 1: 'Barren Perimeter Reservoir', //* + 2: 'Minor Perimeter Reservoir', //* + 3: 'Ordinary Perimeter Reservoir', //* + 4: 'Sizeable Perimeter Reservoir', //* + 5: 'Token Perimeter Reservoir', //* + 6: 'Bountiful Frontier Reservoir', //* + 7: 'Vast Frontier Reservoir', //* + 8: 'Instrumental Core Reservoir', //* + 9: 'Vital Core Reservoir' //* + }; + + // Ore sites ====================================================================================================== + + let c1Ore = { + 1: 'Ordinary Perimeter Deposit', //* + 2: 'Common Perimeter Deposit', //* + 3: 'Unexceptional Frontier Deposit', //* + 4: 'Average Frontier Deposit', //* + 5: 'Isolated Core Deposit', //* + 6: 'Uncommon Core Deposit' //* + }; + + let c2Ore = { + 1: 'Ordinary Perimeter Deposit', //* + 2: 'Common Perimeter Deposit', //* + 3: 'Unexceptional Frontier Deposit', //* + 4: 'Average Frontier Deposit', //* + 5: 'Isolated Core Deposit', //* + 6: 'Uncommon Core Deposit' //* + }; + + let c3Ore = { + 1: 'Ordinary Perimeter Deposit', //* + 2: 'Common Perimeter Deposit', //* + 3: 'Unexceptional Frontier Deposit', //* + 4: 'Average Frontier Deposit', //* + 5: 'Infrequent Core Deposit', //* + 6: 'Unusual Core Deposit' //* + }; + + let c4Ore = { + 1: 'Ordinary Perimeter Deposit', //* + 2: 'Common Perimeter Deposit', //* + 3: 'Unexceptional Frontier Deposit', //* + 4: 'Average Frontier Deposit', //* + 5: 'Unusual Core Deposit', //* + 6: 'Infrequent Core Deposit' //* + }; + + let c5Ore = { + 1: 'Average Frontier Deposit', //* + 2: 'Unexceptional Frontier Deposit', //* + 3: 'Uncommon Core Deposit', //* + 4: 'Ordinary Perimeter Deposit', //* + 5: 'Common Perimeter Deposit', //* + 6: 'Exceptional Core Deposit', //* + 7: 'Infrequent Core Deposit', //* + 8: 'Unusual Core Deposit', //* + 9: 'Rarified Core Deposit', //* + 10: 'Isolated Core Deposit' //* + }; + + let c6Ore = { + 1: 'Ordinary Perimeter Deposit', //* + 2: 'Common Perimeter Deposit', //* + 3: 'Unexceptional Frontier Deposit', //* + 4: 'Average Frontier Deposit', //* + 5: 'Rarified Core Deposit' //* + }; + + // Wormholes ====================================================================================================== + + // all k-space exits are static or K162 + let c1WH = { + 1: 'H121 - C1', + 2: 'C125 - C2', + 3: 'O883 - C3', + 4: 'M609 - C4', + 5: 'L614 - C5', + 6: 'S804 - C6', + 7: 'F353 - C12 Thera' + }; + + // all w-space -> w-space are statics or K162 + let c2WH = { + 1: 'Z647 - C1', + 2: 'D382 - C2', + 3: 'O477 - C3', + 4: 'Y683 - C4', + 5: 'N062 - C5', + 6: 'R474 - C6', + 7: 'F135 - C12 Thera' + }; + + // all k-space exits are static or K162 + let c3WH = { + 1: 'V301 - C1', + 2: 'I182 - C2', + 3: 'N968 - C3', + 4: 'T405 - C4', + 5: 'N770 - C5', + 6: 'A982 - C6', + 7: 'F135 - C12 Thera' + }; + + // no *wandering* w-space -> w-space + // all holes are statics or K162 + let c4WH = { + 1: 'S047 - H', + 2: 'N290 - L', + 3: 'K329 - 0.0' + }; + + let c5WH = { + 1: 'D792 - H', + 2: 'C140 - L', + 3: 'Z142 - 0.0' + }; + + let c6WH = { + 1: 'B520 - H', + 2: 'D792 - H', + 3: 'C140 - L', + 4: 'C391 - L', + 5: 'C248 - 0.0', + 6: 'Z142 - 0.0' + }; + + // Shattered WH (some of them are static) + let c13WH = { + 1: 'P060 - C1', + 2: 'Z647 - C1', + 3: 'D382 - C2', + 4: 'L005 - C2', + 5: 'N766 - C2', + 6: 'C247 - C3', + 7: 'M267 - C3', + 8: 'O477 - C3', + 9: 'X877 - C4', + 10: 'Y683 - C4', + 11: 'H296 - C5', + 12: 'H900 - C5', + 13: 'H296 - C5', + 14: 'N062 - C5', // ?? + 15: 'V911 - C5', + 16: 'U574 - C6', + 17: 'V753 - C6', + 18: 'W237 - C6', + 19: 'B274 - H', + 20: 'D792 - H', + 21: 'D845 - H', + 22: 'N110 - H', + 23: 'A239 - L', + 24: 'C391 - L', + 25: 'J244 - L', + 26: 'U201 - L', // ?? + 27: 'U210 - L', + 28: 'C248 - 0.0', + 29: 'E545 - 0.0', + 30: 'K346 - 0.0', + 31: 'Z060 - 0.0' + }; + + let hsWH = { + 1: 'Z971 - C1', + 2: 'R943 - C2', + 3: 'X702 - C3', + 4: 'O128 - C4', + 5: 'M555 - C5', + 6: 'B041 - C6', + 7: 'A641 - H', + 8: 'R051 - L', + 9: 'V283 - 0.0', + 10: 'T458 - C12 Thera' + }; + + let lsWH = { + 1: 'Z971 - C1', + 2: 'R943 - C2', + 3: 'X702 - C3', + 4: 'O128 - C4', + 5: 'N432 - C5', + 6: 'U319 - C6', + 7: 'B449 - H', + 8: 'N944 - L', + 9: 'S199 - 0.0', + 10: 'M164 - C12 Thera' + }; + + let nullWH = { + 1: 'Z971 - C1', + 2: 'R943 - C2', + 3: 'X702 - C3', + 4: 'O128 - C4', + 5: 'N432 - C5', + 6: 'U319 - C6', + 7: 'B449 - H', + 8: 'N944 - L', + 9: 'S199 - 0.0', + 10: 'L031 - C12 Thera' + }; + + // ================================================================================================================ + // Signature types + // ================================================================================================================ + // signature types - let signatureTypes = { + return { 1: { // system type (wh) 1: { // C1 (area id) - 1: { // Combat - 1: 'Perimeter Ambush Point', - 2: 'Perimeter Camp', - 3: 'Phase Catalyst Node', - 4: 'The Line' - }, - 2: $.extend({}, nullSecRelicSites, { // Relic - 1: 'Forgotten Perimeter Coronation Platform', //* - 2: 'Forgotten Perimeter Power Array' //* - }), - 3: $.extend({}, nullSecDataSites, { // Data - 1: 'Unsecured Perimeter Amplifier', //* - 2: 'Unsecured Perimeter Information Center' //* - }), - 4: { // Gas - 1: 'Barren Perimeter Reservoir', //* - 2: 'Token Perimeter Reservoir', //* - 3: 'Minor Perimeter Reservoir', //* - 4: 'Sizeable Perimeter Reservoir', //* - 5: 'Ordinary Perimeter Reservoir' //* - }, - 5: { // Wormhole - // all k-space exits are static or K162 - 1: 'H121 - C1', - 2: 'C125 - C2', - 3: 'O883 - C3', - 4: 'M609 - C4', - 5: 'L614 - C5', - 6: 'S804 - C6', - 7: 'F353 - C12 Thera' - }, - 6: { // ORE - 1: 'Ordinary Perimeter Deposit', //* - 2: 'Common Perimeter Deposit', //* - 3: 'Unexceptional Frontier Deposit', //* - 4: 'Average Frontier Deposit', //* - 5: 'Isolated Core Deposit', //* - 6: 'Uncommon Core Deposit' //* - }, - 7: { // Ghost - - } + 1: c1Combat, + 2: c1Relic, + 3: c1Data, + 4: c1Gas, + 5: c1WH, + 6: c1Ore, + 7: {} // Ghost }, 2: { // C2 - 1: { // Combat - 1: 'Perimeter Checkpoint', - 2: 'Perimeter Hangar', - 3: 'The Ruins of Enclave Cohort 27', - 4: 'Sleeper Data Sanctuary' - }, - 2: $.extend({}, nullSecRelicSites, { // Relic - 1: 'Forgotten Perimeter Gateway', //* - 2: 'Forgotten Perimeter Habitation Coils' //* - }), - 3: $.extend({}, nullSecDataSites, { // Data - 1: 'Unsecured Perimeter Comms Relay', //* - 2: 'Unsecured Perimeter Transponder Farm' //* - }), - 4: { // Gas - 1: 'Barren Perimeter Reservoir', //* - 2: 'Token Perimeter Reservoir', //* - 3: 'Minor Perimeter Reservoir', //* - 4: 'Sizeable Perimeter Reservoir', //* - 5: 'Ordinary Perimeter Reservoir' //* - }, - 5: { // Wormhole - // all w-space -> w-space are statics or K162 - 1: 'Z647 - C1', - 2: 'D382 - C2', - 3: 'O477 - C3', - 4: 'Y683 - C4', - 5: 'N062 - C5', - 6: 'R474 - C6', - 7: 'F135 - C12 Thera' - }, - 6: { // ORE - 1: 'Ordinary Perimeter Deposit', //* - 2: 'Common Perimeter Deposit', //* - 3: 'Unexceptional Frontier Deposit', //* - 4: 'Average Frontier Deposit', //* - 5: 'Isolated Core Deposit', //* - 6: 'Uncommon Core Deposit' //* - }, - 7: { // Ghost - - } + 1: c2Combat, + 2: c2Relic, + 3: c2Data, + 4: c2Gas, + 5: c2WH, + 6: c2Ore, + 7: {} // Ghost }, 3: { // C3 - 1: { // Combat - 1: 'Fortification Frontier Stronghold', - 2: 'Outpost Frontier Stronghold', - 3: 'Solar Cell', - 4: 'The Oruze Construct' - }, - 2: $.extend({}, nullSecRelicSites, { // Relic - 1: 'Forgotten Frontier Quarantine Outpost', //* - 2: 'Forgotten Frontier Recursive Depot' //* - }), - 3: $.extend({}, nullSecDataSites, { // Data - 1: 'Unsecured Frontier Database', //* - 2: 'Unsecured Frontier Receiver' //* - }), - 4: { // Gas - 1: 'Barren Perimeter Reservoir', //* - 2: 'Token Perimeter Reservoir', //* - 3: 'Minor Perimeter Reservoir', //* - 4: 'Sizeable Perimeter Reservoir', //* - 5: 'Ordinary Perimeter Reservoir', //* - 6: 'Bountiful Frontier Reservoir', //* - 7: 'Vast Frontier Reservoir' //* - }, - 5: { // Wormhole - // all k-space exits are static or K162 - 1: 'V301 - C1', - 2: 'I182 - C2', - 3: 'N968 - C3', - 4: 'T405 - C4', - 5: 'N770 - C5', - 6: 'A982 - C6', - 7: 'F135 - C12 Thera' - }, - 6: { // ORE - 1: 'Ordinary Perimeter Deposit', //* - 2: 'Common Perimeter Deposit', //* - 3: 'Unexceptional Frontier Deposit', //* - 4: 'Average Frontier Deposit', //* - 5: 'Infrequent Core Deposit', //* - 6: 'Unusual Core Deposit' //* - }, - 7: { // Ghost - - } + 1: c3Combat, + 2: c3Relic, + 3: c3Data, + 4: c3Gas, + 5: c3WH, + 6: c3Ore, + 7: {} // Ghost }, 4: { // C4 - 1: { // Combat - 1: 'Frontier Barracks', - 2: 'Frontier Command Post', - 3: 'Integrated Terminus', - 4: 'Sleeper Information Sanctum' - }, - 2: { // Relic - 1: 'Forgotten Frontier Conversion Module', - 2: 'Forgotten Frontier Evacuation Center' - }, - 3: { // Data - 1: 'Unsecured Frontier Digital Nexus', - 2: 'Unsecured Frontier Trinary Hub' - }, - 4: { // Gas - 1: 'Barren Perimeter Reservoir', //* - 2: 'Token Perimeter Reservoir', //* - 3: 'Minor Perimeter Reservoir', //* - 4: 'Sizeable Perimeter Reservoir', //* - 5: 'Ordinary Perimeter Reservoir', //* - 6: 'Vast Frontier Reservoir', //* - 7: 'Bountiful Frontier Reservoir' //* - }, - 5: { // Wormhole - // no *wandering* w-space -> w-space - // all holes are statics or K162 - 1: 'S047 - H', - 2: 'N290 - L', - 3: 'K329 - 0.0' - }, - 6: { // ORE - 1: 'Ordinary Perimeter Deposit', //* - 2: 'Common Perimeter Deposit', //* - 3: 'Unexceptional Frontier Deposit', //* - 4: 'Average Frontier Deposit', //* - 5: 'Unusual Core Deposit', //* - 6: 'Infrequent Core Deposit' //* - }, - 7: { // Ghost - - } + 1: c4Combat, + 2: c4Relic, + 3: c4Data, + 4: c4Gas, + 5: c4WH, + 6: c4Ore, + 7: {} // Ghost }, 5: { // C5 - 1: { // Combat - 1: 'Core Garrison', //* - 2: 'Core Stronghold', //* - 3: 'Oruze Osobnyk', //* - 4: 'Quarantine Area' - }, - 2: { // Relic - 1: 'Forgotten Core Data Field', - 2: 'Forgotten Core Information Pen' - }, - 3: { // Data - 1: 'Unsecured Frontier Enclave Relay', - 2: 'Unsecured Frontier Server Bank' - }, - 4: { // Gas - 1: 'Barren Perimeter Reservoir', //* - 2: 'Minor Perimeter Reservoir', //* - 3: 'Ordinary Perimeter Reservoir', //* - 4: 'Sizeable Perimeter Reservoir', //* - 5: 'Token Perimeter Reservoir', //* - 6: 'Bountiful Frontier Reservoir', //* - 7: 'Vast Frontier Reservoir', //* - 8: 'Instrumental Core Reservoir', //* - 9: 'Vital Core Reservoir' //* - }, - 5: { // Wormhole - 1: 'D792 - H', - 2: 'C140 - L', - 3: 'Z142 - 0.0' - }, - 6: { // ORE - 1: 'Average Frontier Deposit', //* - 2: 'Unexceptional Frontier Deposit', //* - 3: 'Uncommon Core Deposit', //* - 4: 'Ordinary Perimeter Deposit', //* - 5: 'Common Perimeter Deposit', //* - 6: 'Exceptional Core Deposit', //* - 7: 'Infrequent Core Deposit', //* - 8: 'Unusual Core Deposit', //* - 9: 'Rarified Core Deposit', //* - 10: 'Isolated Core Deposit' //* - }, - 7: { // Ghost - - } + 1: c5Combat, + 2: c5Relic, + 3: c5Data, + 4: c5Gas, + 5: c5WH, + 6: c5Ore, + 7: {} // Ghost }, 6: { // C6 - 1: { // Combat - 1: 'Core Citadel', //* - 2: 'Core Bastion', //* - 3: 'Strange Energy Readings', //* - 4: 'The Mirror' //* - }, - 2: { // Relic - 1: 'Forgotten Core Assembly Hall', //* - 2: 'Forgotten Core Circuitry Disassembler' //* - }, - 3: { // Data - 1: 'Unsecured Core Backup Array', //* - 2: 'Unsecured Core Emergence' //* - }, - 4: { // Gas - 1: 'Barren Perimeter Reservoir', //* - 2: 'Minor Perimeter Reservoir', //* - 3: 'Ordinary Perimeter Reservoir', //* - 4: 'Sizeable Perimeter Reservoir', //* - 5: 'Token Perimeter Reservoir', //* - 6: 'Bountiful Frontier Reservoir', //* - 7: 'Vast Frontier Reservoir', //* - 8: 'Instrumental Core Reservoir', //* - 9: 'Vital Core Reservoir' //* - }, - 5: { // Wormhole - 1: 'B520 - H', - 2: 'D792 - H', - 3: 'C140 - L', - 4: 'C391 - L', - 5: 'C248 - 0.0', - 6: 'Z142 - 0.0' - }, - 6: { // ORE - 1: 'Ordinary Perimeter Deposit', //* - 2: 'Common Perimeter Deposit', //* - 3: 'Unexceptional Frontier Deposit', //* - 4: 'Average Frontier Deposit', //* - 5: 'Rarified Core Deposit' //* - }, + 1: c6Combat, + 2: c6Relic, + 3: c6Data, + 4: c6Gas, + 5: c6WH, + 6: c6Ore, 7: { // Ghost 1: 'Superior Blood Raider Covert Research Facility' //* } }, - 12: { // Thera wormhole - 1: { // Combat - 1: 'Epicenter', - 2: 'Expedition Command Outpost Wreck', - 3: 'Planetary Colonization Office Wreck', - 4: 'Testing Facilities' - } + 12: { // Thera WH + 1: c12Combat }, - 13: { // Shattered Wormholes - 5: { // Wormhole (some of them are static) - 1: 'P060 - C1', - 2: 'Z647 - C1', - 3: 'D382 - C2', - 4: 'L005 - C2', - 5: 'N766 - C2', - 6: 'C247 - C3', - 7: 'M267 - C3', - 8: 'O477 - C3', - 9: 'X877 - C4', - 10: 'Y683 - C4', - 11: 'H296 - C5', - 12: 'H900 - C5', - 13: 'H296 - C5', - 14: 'N062 - C5', // ?? - 15: 'V911 - C5', - 16: 'U574 - C6', - 17: 'V753 - C6', - 18: 'W237 - C6', - 19: 'B274 - H', - 20: 'D792 - H', - 21: 'D845 - H', - 22: 'N110 - H', - 23: 'A239 - L', - 24: 'C391 - L', - 25: 'J244 - L', - 26: 'U201 - L', // ?? - 27: 'U210 - L', - 28: 'C248 - 0.0', - 29: 'E545 - 0.0', - 30: 'K346 - 0.0', - 31: 'Z060 - 0.0' - } + 13: { // Shattered WH + 5: c13WH }, 14: { // Drifter Sentinel WH - 1: { // Combat - 1: 'Monolith', - 2: 'Wormhole in Rock Circle', - 3: 'Opposing Spatial Rifts', - 4: 'Sleeper Enclave Debris', - 5: 'Crystal Resource' - } + 1: c14Combat }, 15: { // Drifter Barbican WH - 1: { // Combat - 1: 'Wrecked Ships', - 2: 'Unstable Wormhole', - 3: 'Spatial Rift', - 4: 'Heavily Guarded Spatial Rift', - 5: 'Crystals' - } + 1: c15Combat }, 16: { // Drifter Vidette WH - 1: { // Combat - 1: 'Ship Graveyard', - 2: 'Sleeper Engineering Station', - 3: 'Spatial Rift', - 4: 'Sleeper Enclave in Coral Rock', - 5: 'Crystals and Stone Circle' - } + 1: c16Combat }, 17: { // Drifter Conflux WH - 1: { // Combat - 1: 'Monolith', - 2: 'Caged Wormhole', - 3: 'Rock Formation and Wormhole', - 4: 'Particle Acceleration Array', - 5: 'Guarded Asteroid Station' - } + 1: c17Combat }, 18: { // Drifter Redoubt WH - 1: { // Combat - 1: 'Ship Graveyard', - 2: 'Caged Wormhole', - 3: 'Spatial Rift Generator', - 4: 'Sleeper Enclave', - 5: 'Hollow Asteroid' - } + 1: c18Combat } }, // system type (k-space) - 2: { + 2: { 30: { // High Sec - 5: { // Wormhole - 1: 'Z971 - C1', - 2: 'R943 - C2', - 3: 'X702 - C3', - 4: 'O128 - C4', - 5: 'M555 - C5', - 6: 'B041 - C6', - 7: 'A641 - H', - 8: 'R051 - L', - 9: 'V283 - 0.0', - 10: 'T458 - C12 Thera' - } + 5: hsWH }, 31: { // Low Sec - 5: { // Wormhole - 1: 'Z971 - C1', - 2: 'R943 - C2', - 3: 'X702 - C3', - 4: 'O128 - C4', - 5: 'N432 - C5', - 6: 'U319 - C6', - 7: 'B449 - H', - 8: 'N944 - L', - 9: 'S199 - 0.0', - 10: 'M164 - C12 Thera' - } + 5: lsWH }, 32: { // 0.0 - 5: { // Wormhole - 1: 'Z971 - C1', - 2: 'R943 - C2', - 3: 'X702 - C3', - 4: 'O128 - C4', - 5: 'N432 - C5', - 6: 'U319 - C6', - 7: 'B449 - H', - 8: 'N944 - L', - 9: 'S199 - 0.0', - 10: 'L031 - C12 Thera' - } + 5: nullWH } } }; - - return signatureTypes; }); diff --git a/js/app/init.js b/js/app/init.js index 110d6111..5345b4dc 100644 --- a/js/app/init.js +++ b/js/app/init.js @@ -3,10 +3,20 @@ */ define([], () => { - 'use strict'; - let Config = { + let frigWH = { + 1: 'E004 - C1', + 2: 'L005 - C2', + 3: 'Z006 - C3', + 4: 'M001 - C4', + 5: 'C008 - C5', + 6: 'G008 - C6', + 7: 'Q003 - 0.0', + 8: 'A009 - C13' + }; + + return { path: { img: '/public/img/', // path for images api: '/api/rest', //ajax URL - REST API @@ -49,12 +59,12 @@ define([], () => { gitHubReleases: '/api/github/releases' // ajax URL - get release info from GitHub }, breakpoints: [ - { name: 'screen-xl', width: Infinity }, - { name: 'screen-l', width: 1600 }, - { name: 'screen-m', width: 1200 }, - { name: 'screen-d', width: 1000 }, - { name: 'screen-s', width: 780 }, - { name: 'screen-xs', width: 480 } + {name: 'screen-xl', width: Infinity}, + {name: 'screen-l', width: 1600}, + {name: 'screen-m', width: 1200}, + {name: 'screen-d', width: 1000}, + {name: 'screen-s', width: 780}, + {name: 'screen-xs', width: 480} ], animationSpeed: { splashOverlay: 300, // "splash" loading overlay @@ -95,63 +105,63 @@ define([], () => { class: 'fa-desktop', label: 'desktop', unicode: '' - },{ + }, { class: 'fa-space-shuttle', label: 'space shuttle', unicode: '' - },{ + }, { class: 'fa-anchor', label: 'anchor', unicode: '' - },{ + }, { class: 'fa-satellite', label: 'satellite', unicode: '' - },{ + }, { class: 'fa-skull-crossbones', label: 'skull crossbones', unicode: '' - },{ + }, { class: 'fa-fire', label: 'fire', unicode: '' - },{ + }, { class: 'fa-bookmark', label: 'bookmark', unicode: '' - },{ + }, { class: 'fa-cube', label: 'cube', unicode: '' - },{ + }, { class: 'fa-star', label: 'star', unicode: '' - },{ + }, { class: 'fa-hat-wizard', label: 'hat wizard', unicode: '' - },{ + }, { class: 'fa-plane', label: 'plane', unicode: '' - },{ + }, { class: 'fa-globe', label: 'globe', unicode: '' - },{ + }, { class: 'fa-rocket', label: 'rocket', unicode: '' - },{ + }, { class: 'fa-life-ring', label: 'life ring', unicode: '' - },{ + }, { class: 'fa-heart', label: 'heart', unicode: '' - },{ + }, { class: 'fa-poop', label: 'poop', unicode: '' @@ -541,106 +551,16 @@ define([], () => { }, // frigate wormholes frigateWormholes: { - 1: { // C1 - 1: 'E004 - C1', - 2: 'L005 - C2', - 3: 'Z006 - C3', - 4: 'M001 - C4', - 5: 'C008 - C5', - 6: 'G008 - C6', - 7: 'Q003 - 0.0', - 8: 'A009 - C13' - }, - 2: { // C2 - 1: 'E004 - C1', - 2: 'L005 - C2', - 3: 'Z006 - C3', - 4: 'M001 - C4', - 5: 'C008 - C5', - 6: 'G008 - C6', - 7: 'Q003 - 0.0', - 8: 'A009 - C13' - }, - 3: { // C3 - 1: 'E004 - C1', - 2: 'L005 - C2', - 3: 'Z006 - C3', - 4: 'M001 - C4', - 5: 'C008 - C5', - 6: 'G008 - C6', - 7: 'Q003 - 0.0', - 8: 'A009 - C13' - }, - 4: { // C4 - 1: 'E004 - C1', - 2: 'L005 - C2', - 3: 'Z006 - C3', - 4: 'M001 - C4', - 5: 'C008 - C5', - 6: 'G008 - C6', - 7: 'Q003 - 0.0', - 8: 'A009 - C13' - }, - 5: { // C5 - 1: 'E004 - C1', - 2: 'L005 - C2', - 3: 'Z006 - C3', - 4: 'M001 - C4', - 5: 'C008 - C5', - 6: 'G008 - C6', - 7: 'Q003 - 0.0', - 8: 'A009 - C13' - }, - 6: { // C6 - 1: 'E004 - C1', - 2: 'L005 - C2', - 3: 'Z006 - C3', - 4: 'M001 - C4', - 5: 'C008 - C5', - 6: 'G008 - C6', - 7: 'Q003 - 0.0', - 8: 'A009 - C13' - }, - 13: { // Shattered Wormholes (some of them are static) - 1: 'E004 - C1', - 2: 'L005 - C2', - 3: 'Z006 - C3', - 4: 'M001 - C4', - 5: 'C008 - C5', - 6: 'G008 - C6', - 7: 'Q003 - 0.0', - 8: 'A009 - C13' - }, - 30: { // High Sec - 1: 'E004 - C1', - 2: 'L005 - C2', - 3: 'Z006 - C3', - 4: 'M001 - C4', - 5: 'C008 - C5', - 6: 'G008 - C6', - 7: 'Q003 - 0.0', - 8: 'A009 - C13' - }, - 31: { // Low Sec - 1: 'E004 - C1', - 2: 'L005 - C2', - 3: 'Z006 - C3', - 4: 'M001 - C4', - 5: 'C008 - C5', - 6: 'G008 - C6', - 7: 'Q003 - 0.0', - 8: 'A009 - C13' - }, - 32: { // 0.0 - 1: 'E004 - C1', - 2: 'L005 - C2', - 3: 'Z006 - C3', - 4: 'M001 - C4', - 5: 'C008 - C5', - 6: 'G008 - C6', - 7: 'Q003 - 0.0', - 8: 'A009 - C13' - } + 1: frigWH, // C1 + 2: frigWH, // C2 + 3: frigWH, // C3 + 4: frigWH, // C4 + 5: frigWH, // C5 + 6: frigWH, // C6 + 13: frigWH, // Shattered Wormholes (some of them are static) + 30: frigWH, // High Sec + 31: frigWH, // Low Sec + 32: frigWH // 0.0 }, // Drifter wormholes (can only appear in k-space) drifterWormholes: { @@ -660,8 +580,5 @@ define([], () => { 6: 'K162 - 0.0', 7: 'K162 - C12 Thera' } - }; - - return Config; }); diff --git a/js/app/lib/prototypes.js b/js/app/lib/prototypes.js new file mode 100644 index 00000000..3ec05362 --- /dev/null +++ b/js/app/lib/prototypes.js @@ -0,0 +1,95 @@ +define([], () => { + 'use strict'; + + /** + * Array diff + * [1,2,3,4,5].diff([4,5,6]) => [1,2,3] + * @param a + * @returns {*[]} + */ + Array.prototype.diff = function(a){ + return this.filter(i => !a.includes(i)); + }; + + /** + * Array intersect + * [1,2,3,4,5].intersect([4,5,6]) => [4,5] + * @param a + * @returns {*[]} + */ + Array.prototype.intersect = function(a){ + return this.filter(i => a.includes(i)); + }; + + /** + * compares two arrays if all elements in a are also in b + * element order is ignored + * @param a + * @returns {boolean} + */ + Array.prototype.equalValues = function(a){ + return this.diff(a).concat(a.diff(this)).length === 0; + }; + + /** + * like Array.concat() + remove duplicate values + * @see https://stackoverflow.com/a/38940354/4329969 + * @param a + * @returns {*[]} + */ + Array.prototype.concatFilter = function(a){ + return [...new Set([...this,...a])]; + }; + + /** + * sort array of objects by property name + * @param p + * @returns {Array.} + */ + Array.prototype.sortBy = function(p){ + return this.slice(0).sort((a,b) => { + return (a[p] > b[p]) ? 1 : (a[p] < b[p]) ? -1 : 0; + }); + }; + + /** + * capitalize first letter + * @returns {string} + */ + String.prototype.capitalize = function(){ + return this.charAt(0).toUpperCase() + this.slice(1); + }; + + /** + * get hash from string + * @returns {number} + */ + String.prototype.hashCode = function(){ + let hash = 0, i, chr; + if(this.length === 0) return hash; + for(i = 0; i < this.length; i++){ + chr = this.charCodeAt(i); + hash = ((hash << 5) - hash) + chr; + hash |= 0; // Convert to 32bit integer + } + return hash; + }; + + String.prototype.trimLeftChars = function(charList){ + if(charList === undefined) + charList = '\\s'; + return this.replace(new RegExp('^[' + charList + ']+'), ''); + }; + + String.prototype.trimRightChars = function(charList){ + if(charList === undefined) + charList = '\\s'; + return this.replace(new RegExp('[' + charList + ']+$'), ''); + }; + + String.prototype.trimChars = function(charList){ + return this.trimLeftChars(charList).trimRightChars(charList); + }; + + return {}; +}); \ No newline at end of file diff --git a/js/app/ui/module/system_signature.js b/js/app/ui/module/system_signature.js index 6f4dad27..9f2d75ff 100644 --- a/js/app/ui/module/system_signature.js +++ b/js/app/ui/module/system_signature.js @@ -228,6 +228,30 @@ define([ return sum; }; + /** + * Some signatures types can spawn in more than one 'areaId' for a 'groupId' + * -> e.g. a 'shattered' C3 WHs have Combat/Relic/.. sites from C2, C3, c4! + * https://github.com/exodus4d/pathfinder/issues/875 + * @param systemTypeId + * @param areaId + * @param groupId + * @param shattered + * @returns {[*]} + */ + let getAreaIdsForSignatureTypeOptions = (systemTypeId, areaId, groupId, shattered = false) => { + let areaIds = [areaId]; + + if( + systemTypeId === 1 && shattered && + [1, 2, 3, 4, 5, 6].includes(areaId) && + [1, 2, 3, 4, 6].includes(groupId) + ){ + areaIds = [areaId - 1, areaId, areaId + 1].filter(areaId => areaId >= 1 && areaId <= 6); + } + + return areaIds; + }; + /** * get possible frig holes that could spawn in a system * filtered by "systemTypeId" @@ -245,13 +269,14 @@ define([ /** * get all signature types that can exist for a given system * -> result is partially cached - * @param systemData * @param systemTypeId * @param areaId * @param groupId - * @returns {Array} + * @param statics + * @param shattered + * @returns {[]|*} */ - let getSignatureTypeOptions = (systemData, systemTypeId, areaId, groupId) => { + let getSignatureTypeOptions = (systemTypeId, areaId, groupId, {statics = null, shattered = false} = {}) => { systemTypeId = parseInt(systemTypeId || 0); areaId = parseInt(areaId || 0); groupId = parseInt(groupId || 0); @@ -262,7 +287,10 @@ define([ return newSelectOptions; } - let cacheKey = [systemTypeId, areaId, groupId].join('_'); + // check if sig types require more than one 'areaId' to be checked + let areaIds = getAreaIdsForSignatureTypeOptions(systemTypeId, areaId, groupId, shattered); + + let cacheKey = [systemTypeId, ...areaIds, groupId].join('_'); newSelectOptions = sigTypeOptionsCache.getOrDefault(cacheKey, []); @@ -275,7 +303,7 @@ define([ }else{ // get new Options ---------- // get all possible "static" signature names by the selected groupId - let tempSelectOptions = Util.getSignatureTypeNames(systemTypeId, areaId, groupId); + let tempSelectOptions = Util.getSignatureTypeNames(systemTypeId, areaIds, groupId); // format options into array with objects advantages: keep order, add more options (whs), use optgroup if(tempSelectOptions){ @@ -312,7 +340,7 @@ define([ frigateHoles.hasOwnProperty(frigKey) ){ newSelectOptionsCount++; - frigateWHData.push( {value: newSelectOptionsCount, text: frigateHoles[frigKey]} ); + frigateWHData.push({value: newSelectOptionsCount, text: frigateHoles[frigKey]}); } } @@ -329,7 +357,7 @@ define([ Init.drifterWormholes.hasOwnProperty(drifterKey) ){ newSelectOptionsCount++; - drifterWHData.push( {value: newSelectOptionsCount, text: Init.drifterWormholes[drifterKey]} ); + drifterWHData.push({value: newSelectOptionsCount, text: Init.drifterWormholes[drifterKey]}); } } @@ -346,12 +374,12 @@ define([ Init.incomingWormholes.hasOwnProperty(incomingKey) ){ newSelectOptionsCount++; - incomingWHData.push( {value: newSelectOptionsCount, text: Init.incomingWormholes[incomingKey]} ); + incomingWHData.push({value: newSelectOptionsCount, text: Init.incomingWormholes[incomingKey]}); } } if(incomingWHData.length > 0){ - newSelectOptions.push({ text: 'Incoming', children: incomingWHData}); + newSelectOptions.push({text: 'Incoming', children: incomingWHData}); } }else{ // groups without "children" (optgroup) should be sorted by "value" @@ -363,17 +391,17 @@ define([ sigTypeOptionsCache.set(cacheKey, newSelectOptions.slice(0)); } - // static wormholes (DO NOT CACHE) (not all C2 WHs have the same statics,... + // static wormholes (DO NOT CACHE) (not all C2 WHs have the same statics..) if(groupId === 5){ // add static WH(s) for this system - if(systemData.statics){ + if(statics){ let staticWHData = []; - for(let wormholeName of systemData.statics){ + for(let wormholeName of statics){ let wormholeData = Object.assign({}, Init.wormholes[wormholeName]); let staticWHName = wormholeData.name + ' - ' + wormholeData.security; newSelectOptionsCount++; - staticWHData.push( {value: newSelectOptionsCount, text: staticWHName} ); + staticWHData.push({value: newSelectOptionsCount, text: staticWHName}); } if(staticWHData.length > 0){ @@ -395,7 +423,7 @@ define([ let systemTypeId = systemElement.data('typeId'); let areaId = Util.getAreaIdBySecurity(systemElement.data('security')); let systemData = {statics: systemElement.data('statics')}; - return getSignatureTypeOptions(systemData, systemTypeId, areaId, groupId); + return getSignatureTypeOptions(systemTypeId, areaId, groupId, systemData); }; /** @@ -892,10 +920,10 @@ define([ let sigDescriptionLowerCase = sigDescription.toLowerCase(); let typeOptions = getSignatureTypeOptions( - systemData, systemData.type.id, Util.getAreaIdBySecurity(systemData.security), - sigGroupId + sigGroupId, + systemData ); for(let [key, name] of Object.entries(Util.flattenXEditableSelectArray(typeOptions))){ @@ -1759,10 +1787,10 @@ define([ let rowData = tableApi.row($(cell).parents('tr')).data(); let typeOptions = getSignatureTypeOptions( - systemData, systemData.type.id, Util.getAreaIdBySecurity(systemData.security), - rowData.groupId + rowData.groupId, + systemData ); return typeOptions; }, diff --git a/js/app/util.js b/js/app/util.js index 5eac759b..f7f56346 100644 --- a/js/app/util.js +++ b/js/app/util.js @@ -4,6 +4,7 @@ define([ 'jquery', 'app/init', + 'app/lib/prototypes', 'app/lib/console', 'conf/system_effect', 'conf/signature_type', @@ -19,7 +20,7 @@ define([ 'bootstrapConfirmation', 'bootstrapToggle', 'select2' -], ($, Init, Con, SystemEffect, SignatureType, bootbox, localforage) => { +], ($, Init, Proto, Con, SystemEffect, SignatureType, bootbox, localforage) => { 'use strict'; @@ -973,85 +974,6 @@ define([ */ let initPrototypes = () => { - /** - * Array diff - * [1,2,3,4,5].diff([4,5,6]) => [1,2,3] - * @param a - * @returns {*[]} - */ - Array.prototype.diff = function(a){ - return this.filter(i => !a.includes(i)); - }; - - /** - * Array intersect - * [1,2,3,4,5].intersect([4,5,6]) => [4,5] - * @param a - * @returns {*[]} - */ - Array.prototype.intersect = function(a){ - return this.filter(i => a.includes(i)); - }; - - /** - * compares two arrays if all elements in a are also in b - * element order is ignored - * @param a - * @returns {boolean} - */ - Array.prototype.equalValues = function(a){ - return this.diff(a).concat(a.diff(this)).length === 0; - }; - - /** - * sort array of objects by property name - * @param p - * @returns {Array.} - */ - Array.prototype.sortBy = function(p){ - return this.slice(0).sort((a,b) => { - return (a[p] > b[p]) ? 1 : (a[p] < b[p]) ? -1 : 0; - }); - }; - - /** - * capitalize first letter - * @returns {string} - */ - String.prototype.capitalize = function(){ - return this.charAt(0).toUpperCase() + this.slice(1); - }; - - /** - * get hash from string - * @returns {number} - */ - String.prototype.hashCode = function(){ - let hash = 0, i, chr; - if(this.length === 0) return hash; - for(i = 0; i < this.length; i++){ - chr = this.charCodeAt(i); - hash = ((hash << 5) - hash) + chr; - hash |= 0; // Convert to 32bit integer - } - return hash; - }; - - String.prototype.trimLeftChars = function(charList){ - if(charList === undefined) - charList = '\\s'; - return this.replace(new RegExp('^[' + charList + ']+'), ''); - }; - - String.prototype.trimRightChars = function(charList){ - if(charList === undefined) - charList = '\\s'; - return this.replace(new RegExp('[' + charList + ']+$'), ''); - }; - - String.prototype.trimChars = function(charList){ - return this.trimLeftChars(charList).trimRightChars(charList); - }; initPassiveEvents(); }; @@ -2590,23 +2512,16 @@ define([ }; /** - * get Signature names out of global - * @param systemTypeId - * @param areaId - * @param sigGroupId + * get signature 'type' options for a systemTypeId + * -> areaIds is array! This is used for "Shattered WHs" where e.g.: + * Combat/Relic/.. sites from multiple areaIds (C1, C2, C3) can spawn in a C2,... + * @param systemTypeId 1 == w-space; 2 == k-space; 3 == a-space + * @param areaIds 1 == c1; 2 == c2; 12 == Thera; 13 == Shattered Frig;... + * @param sigGroupId 1 == Combat; 2 == Relic; 3 == Data; ... * @returns {{}} */ - let getSignatureTypeNames = (systemTypeId, areaId, sigGroupId) => { - let signatureNames = {}; - if( - SignatureType[systemTypeId] && - SignatureType[systemTypeId][areaId] && - SignatureType[systemTypeId][areaId][sigGroupId] - ){ - signatureNames = SignatureType[systemTypeId][areaId][sigGroupId]; - } - - return signatureNames; + let getSignatureTypeNames = (systemTypeId, areaIds, sigGroupId) => { + return objCombine(...areaIds.map(areaId => getObjVal(SignatureType, [systemTypeId, areaId, sigGroupId].join('.')) || {})); }; /** @@ -3396,6 +3311,21 @@ define([ return obj; }, {}); + /** + * combines multiple objects into one object + * -> removes duplicate values + * -> properties are indexed 1, 2,..n + * @param objects + * @returns {{[p: string]: *}} + */ + let objCombine = (...objects) => { + let combined = objects.reduce((acc, obj) => acc.concatFilter(Object.values(obj)), []); + combined.unshift(''); // properties should start at 1 (not 0) + combined = {...combined}; + delete combined[0]; + return combined; + }; + /** * get deep json object value if exists * -> e.g. key = 'first.last.third' string diff --git a/public/js/v1.5.5/app/conf/signature_type.js b/public/js/v1.5.5/app/conf/signature_type.js index 108da68b..1279b8c9 100644 --- a/public/js/v1.5.5/app/conf/signature_type.js +++ b/public/js/v1.5.5/app/conf/signature_type.js @@ -1,21 +1,118 @@ /** - * Created by exodus4d on 06.07.2015. + * Created by exodus4d * static signature types * * (*) marked fields are in-game verified and * proofed, signature names (copy & paste from scanning window) */ -define(['jquery'], ($) => { - +define([], () => { 'use strict'; // signature sources // http://de.sistersprobe.wikia.com/wiki/EVE_Sister_Core_Scanner_Probe_Wiki + // Combat sites =================================================================================================== + + let c1Combat = { + 1: 'Perimeter Ambush Point', + 2: 'Perimeter Camp', + 3: 'Phase Catalyst Node', + 4: 'The Line' + }; + + let c2Combat = { + 1: 'Perimeter Checkpoint', + 2: 'Perimeter Hangar', + 3: 'The Ruins of Enclave Cohort 27', + 4: 'Sleeper Data Sanctuary' + }; + + let c3Combat = { + 1: 'Fortification Frontier Stronghold', + 2: 'Outpost Frontier Stronghold', + 3: 'Solar Cell', + 4: 'The Oruze Construct' + }; + + let c4Combat = { + 1: 'Frontier Barracks', + 2: 'Frontier Command Post', + 3: 'Integrated Terminus', + 4: 'Sleeper Information Sanctum' + }; + + let c5Combat = { + 1: 'Core Garrison', //* + 2: 'Core Stronghold', //* + 3: 'Oruze Osobnyk', //* + 4: 'Quarantine Area' + }; + + let c6Combat = { + 1: 'Core Citadel', //* + 2: 'Core Bastion', //* + 3: 'Strange Energy Readings', //* + 4: 'The Mirror' //* + }; + + // Thera WH + let c12Combat = { + 1: 'Epicenter', + 2: 'Expedition Command Outpost Wreck', + 3: 'Planetary Colonization Office Wreck', + 4: 'Testing Facilities' + }; + + // Drifter Sentinel WH + let c14Combat = { + 1: 'Monolith', + 2: 'Wormhole in Rock Circle', + 3: 'Opposing Spatial Rifts', + 4: 'Sleeper Enclave Debris', + 5: 'Crystal Resource' + }; + + // Drifter Barbican WH + let c15Combat = { + 1: 'Wrecked Ships', + 2: 'Unstable Wormhole', + 3: 'Spatial Rift', + 4: 'Heavily Guarded Spatial Rift', + 5: 'Crystals' + }; + + // Drifter Vidette WH + let c16Combat = { + 1: 'Ship Graveyard', + 2: 'Sleeper Engineering Station', + 3: 'Spatial Rift', + 4: 'Sleeper Enclave in Coral Rock', + 5: 'Crystals and Stone Circle' + }; + + // Drifter Conflux WH + let c17Combat = { + 1: 'Monolith', + 2: 'Caged Wormhole', + 3: 'Rock Formation and Wormhole', + 4: 'Particle Acceleration Array', + 5: 'Guarded Asteroid Station' + }; + + // Drifter Redoubt WH + let c18Combat = { + 1: 'Ship Graveyard', + 2: 'Caged Wormhole', + 3: 'Spatial Rift Generator', + 4: 'Sleeper Enclave', + 5: 'Hollow Asteroid' + }; + + // Relic sites ==================================================================================================== // NullSec Relic sites, which can also spawn in C1, C2, C3 wormholes - let nullSecRelicSites = { + let nullRelic = { 10: 'Ruined Angel Crystal Quarry', 11: 'Ruined Angel Monument Site', 12: 'Ruined Angel Science Outpost', @@ -38,8 +135,40 @@ define(['jquery'], ($) => { 29: 'Ruined Serpentis Temple Site' }; + let c1Relic = Object.assign({}, nullRelic, { + 1: 'Forgotten Perimeter Coronation Platform', //* + 2: 'Forgotten Perimeter Power Array' //* + }); + + let c2Relic = Object.assign({}, nullRelic, { + 1: 'Forgotten Perimeter Gateway', //* + 2: 'Forgotten Perimeter Habitation Coils' //* + }); + + let c3Relic = Object.assign({}, nullRelic, { + 1: 'Forgotten Frontier Quarantine Outpost', //* + 2: 'Forgotten Frontier Recursive Depot' //* + }); + + let c4Relic = { + 1: 'Forgotten Frontier Conversion Module', + 2: 'Forgotten Frontier Evacuation Center' + }; + + let c5Relic = { + 1: 'Forgotten Core Data Field', + 2: 'Forgotten Core Information Pen' + }; + + let c6Relic = { + 1: 'Forgotten Core Assembly Hall', //* + 2: 'Forgotten Core Circuitry Disassembler' //* + }; + + // Data sites ===================================================================================================== + // NulSec Data sites, which can also spawn in C1, C2, C3 wormholes - let nullSecDataSites = { + let nullData = { 10: 'Abandoned Research Complex DA005', 11: 'Abandoned Research Complex DA015', 12: 'Abandoned Research Complex DC007', @@ -68,413 +197,384 @@ define(['jquery'], ($) => { 35: 'Central Serpentis Survey Site' }; + let c1Data = Object.assign({}, nullData, { + 1: 'Unsecured Perimeter Amplifier', //* + 2: 'Unsecured Perimeter Information Center' //* + }); + let c2Data = Object.assign({}, nullData, { + 1: 'Unsecured Perimeter Comms Relay', //* + 2: 'Unsecured Perimeter Transponder Farm' //* + }); + + let c3Data = Object.assign({}, nullData, { + 1: 'Unsecured Frontier Database', //* + 2: 'Unsecured Frontier Receiver' //* + }); + + let c4Data = { + 1: 'Unsecured Frontier Digital Nexus', + 2: 'Unsecured Frontier Trinary Hub' + }; + + let c5Data = { + 1: 'Unsecured Frontier Enclave Relay', + 2: 'Unsecured Frontier Server Bank' + }; + + let c6Data = { + 1: 'Unsecured Core Backup Array', //* + 2: 'Unsecured Core Emergence' //* + }; + + // Gas sites ====================================================================================================== + + let c1Gas = { + 1: 'Barren Perimeter Reservoir', //* + 2: 'Token Perimeter Reservoir', //* + 3: 'Minor Perimeter Reservoir', //* + 4: 'Sizeable Perimeter Reservoir', //* + 5: 'Ordinary Perimeter Reservoir' //* + }; + + let c2Gas = { + 1: 'Barren Perimeter Reservoir', //* + 2: 'Token Perimeter Reservoir', //* + 3: 'Minor Perimeter Reservoir', //* + 4: 'Sizeable Perimeter Reservoir', //* + 5: 'Ordinary Perimeter Reservoir' //* + }; + + let c3Gas = { + 1: 'Barren Perimeter Reservoir', //* + 2: 'Token Perimeter Reservoir', //* + 3: 'Minor Perimeter Reservoir', //* + 4: 'Sizeable Perimeter Reservoir', //* + 5: 'Ordinary Perimeter Reservoir', //* + 6: 'Bountiful Frontier Reservoir', //* + 7: 'Vast Frontier Reservoir' //* + }; + + let c4Gas = { + 1: 'Barren Perimeter Reservoir', //* + 2: 'Token Perimeter Reservoir', //* + 3: 'Minor Perimeter Reservoir', //* + 4: 'Sizeable Perimeter Reservoir', //* + 5: 'Ordinary Perimeter Reservoir', //* + 6: 'Vast Frontier Reservoir', //* + 7: 'Bountiful Frontier Reservoir' //* + }; + + let c5Gas = { + 1: 'Barren Perimeter Reservoir', //* + 2: 'Minor Perimeter Reservoir', //* + 3: 'Ordinary Perimeter Reservoir', //* + 4: 'Sizeable Perimeter Reservoir', //* + 5: 'Token Perimeter Reservoir', //* + 6: 'Bountiful Frontier Reservoir', //* + 7: 'Vast Frontier Reservoir', //* + 8: 'Instrumental Core Reservoir', //* + 9: 'Vital Core Reservoir' //* + }; + + let c6Gas = { + 1: 'Barren Perimeter Reservoir', //* + 2: 'Minor Perimeter Reservoir', //* + 3: 'Ordinary Perimeter Reservoir', //* + 4: 'Sizeable Perimeter Reservoir', //* + 5: 'Token Perimeter Reservoir', //* + 6: 'Bountiful Frontier Reservoir', //* + 7: 'Vast Frontier Reservoir', //* + 8: 'Instrumental Core Reservoir', //* + 9: 'Vital Core Reservoir' //* + }; + + // Ore sites ====================================================================================================== + + let c1Ore = { + 1: 'Ordinary Perimeter Deposit', //* + 2: 'Common Perimeter Deposit', //* + 3: 'Unexceptional Frontier Deposit', //* + 4: 'Average Frontier Deposit', //* + 5: 'Isolated Core Deposit', //* + 6: 'Uncommon Core Deposit' //* + }; + + let c2Ore = { + 1: 'Ordinary Perimeter Deposit', //* + 2: 'Common Perimeter Deposit', //* + 3: 'Unexceptional Frontier Deposit', //* + 4: 'Average Frontier Deposit', //* + 5: 'Isolated Core Deposit', //* + 6: 'Uncommon Core Deposit' //* + }; + + let c3Ore = { + 1: 'Ordinary Perimeter Deposit', //* + 2: 'Common Perimeter Deposit', //* + 3: 'Unexceptional Frontier Deposit', //* + 4: 'Average Frontier Deposit', //* + 5: 'Infrequent Core Deposit', //* + 6: 'Unusual Core Deposit' //* + }; + + let c4Ore = { + 1: 'Ordinary Perimeter Deposit', //* + 2: 'Common Perimeter Deposit', //* + 3: 'Unexceptional Frontier Deposit', //* + 4: 'Average Frontier Deposit', //* + 5: 'Unusual Core Deposit', //* + 6: 'Infrequent Core Deposit' //* + }; + + let c5Ore = { + 1: 'Average Frontier Deposit', //* + 2: 'Unexceptional Frontier Deposit', //* + 3: 'Uncommon Core Deposit', //* + 4: 'Ordinary Perimeter Deposit', //* + 5: 'Common Perimeter Deposit', //* + 6: 'Exceptional Core Deposit', //* + 7: 'Infrequent Core Deposit', //* + 8: 'Unusual Core Deposit', //* + 9: 'Rarified Core Deposit', //* + 10: 'Isolated Core Deposit' //* + }; + + let c6Ore = { + 1: 'Ordinary Perimeter Deposit', //* + 2: 'Common Perimeter Deposit', //* + 3: 'Unexceptional Frontier Deposit', //* + 4: 'Average Frontier Deposit', //* + 5: 'Rarified Core Deposit' //* + }; + + // Wormholes ====================================================================================================== + + // all k-space exits are static or K162 + let c1WH = { + 1: 'H121 - C1', + 2: 'C125 - C2', + 3: 'O883 - C3', + 4: 'M609 - C4', + 5: 'L614 - C5', + 6: 'S804 - C6', + 7: 'F353 - C12 Thera' + }; + + // all w-space -> w-space are statics or K162 + let c2WH = { + 1: 'Z647 - C1', + 2: 'D382 - C2', + 3: 'O477 - C3', + 4: 'Y683 - C4', + 5: 'N062 - C5', + 6: 'R474 - C6', + 7: 'F135 - C12 Thera' + }; + + // all k-space exits are static or K162 + let c3WH = { + 1: 'V301 - C1', + 2: 'I182 - C2', + 3: 'N968 - C3', + 4: 'T405 - C4', + 5: 'N770 - C5', + 6: 'A982 - C6', + 7: 'F135 - C12 Thera' + }; + + // no *wandering* w-space -> w-space + // all holes are statics or K162 + let c4WH = { + 1: 'S047 - H', + 2: 'N290 - L', + 3: 'K329 - 0.0' + }; + + let c5WH = { + 1: 'D792 - H', + 2: 'C140 - L', + 3: 'Z142 - 0.0' + }; + + let c6WH = { + 1: 'B520 - H', + 2: 'D792 - H', + 3: 'C140 - L', + 4: 'C391 - L', + 5: 'C248 - 0.0', + 6: 'Z142 - 0.0' + }; + + // Shattered WH (some of them are static) + let c13WH = { + 1: 'P060 - C1', + 2: 'Z647 - C1', + 3: 'D382 - C2', + 4: 'L005 - C2', + 5: 'N766 - C2', + 6: 'C247 - C3', + 7: 'M267 - C3', + 8: 'O477 - C3', + 9: 'X877 - C4', + 10: 'Y683 - C4', + 11: 'H296 - C5', + 12: 'H900 - C5', + 13: 'H296 - C5', + 14: 'N062 - C5', // ?? + 15: 'V911 - C5', + 16: 'U574 - C6', + 17: 'V753 - C6', + 18: 'W237 - C6', + 19: 'B274 - H', + 20: 'D792 - H', + 21: 'D845 - H', + 22: 'N110 - H', + 23: 'A239 - L', + 24: 'C391 - L', + 25: 'J244 - L', + 26: 'U201 - L', // ?? + 27: 'U210 - L', + 28: 'C248 - 0.0', + 29: 'E545 - 0.0', + 30: 'K346 - 0.0', + 31: 'Z060 - 0.0' + }; + + let hsWH = { + 1: 'Z971 - C1', + 2: 'R943 - C2', + 3: 'X702 - C3', + 4: 'O128 - C4', + 5: 'M555 - C5', + 6: 'B041 - C6', + 7: 'A641 - H', + 8: 'R051 - L', + 9: 'V283 - 0.0', + 10: 'T458 - C12 Thera' + }; + + let lsWH = { + 1: 'Z971 - C1', + 2: 'R943 - C2', + 3: 'X702 - C3', + 4: 'O128 - C4', + 5: 'N432 - C5', + 6: 'U319 - C6', + 7: 'B449 - H', + 8: 'N944 - L', + 9: 'S199 - 0.0', + 10: 'M164 - C12 Thera' + }; + + let nullWH = { + 1: 'Z971 - C1', + 2: 'R943 - C2', + 3: 'X702 - C3', + 4: 'O128 - C4', + 5: 'N432 - C5', + 6: 'U319 - C6', + 7: 'B449 - H', + 8: 'N944 - L', + 9: 'S199 - 0.0', + 10: 'L031 - C12 Thera' + }; + + // ================================================================================================================ + // Signature types + // ================================================================================================================ + // signature types - let signatureTypes = { + return { 1: { // system type (wh) 1: { // C1 (area id) - 1: { // Combat - 1: 'Perimeter Ambush Point', - 2: 'Perimeter Camp', - 3: 'Phase Catalyst Node', - 4: 'The Line' - }, - 2: $.extend({}, nullSecRelicSites, { // Relic - 1: 'Forgotten Perimeter Coronation Platform', //* - 2: 'Forgotten Perimeter Power Array' //* - }), - 3: $.extend({}, nullSecDataSites, { // Data - 1: 'Unsecured Perimeter Amplifier', //* - 2: 'Unsecured Perimeter Information Center' //* - }), - 4: { // Gas - 1: 'Barren Perimeter Reservoir', //* - 2: 'Token Perimeter Reservoir', //* - 3: 'Minor Perimeter Reservoir', //* - 4: 'Sizeable Perimeter Reservoir', //* - 5: 'Ordinary Perimeter Reservoir' //* - }, - 5: { // Wormhole - // all k-space exits are static or K162 - 1: 'H121 - C1', - 2: 'C125 - C2', - 3: 'O883 - C3', - 4: 'M609 - C4', - 5: 'L614 - C5', - 6: 'S804 - C6', - 7: 'F353 - C12 Thera' - }, - 6: { // ORE - 1: 'Ordinary Perimeter Deposit', //* - 2: 'Common Perimeter Deposit', //* - 3: 'Unexceptional Frontier Deposit', //* - 4: 'Average Frontier Deposit', //* - 5: 'Isolated Core Deposit', //* - 6: 'Uncommon Core Deposit' //* - }, - 7: { // Ghost - - } + 1: c1Combat, + 2: c1Relic, + 3: c1Data, + 4: c1Gas, + 5: c1WH, + 6: c1Ore, + 7: {} // Ghost }, 2: { // C2 - 1: { // Combat - 1: 'Perimeter Checkpoint', - 2: 'Perimeter Hangar', - 3: 'The Ruins of Enclave Cohort 27', - 4: 'Sleeper Data Sanctuary' - }, - 2: $.extend({}, nullSecRelicSites, { // Relic - 1: 'Forgotten Perimeter Gateway', //* - 2: 'Forgotten Perimeter Habitation Coils' //* - }), - 3: $.extend({}, nullSecDataSites, { // Data - 1: 'Unsecured Perimeter Comms Relay', //* - 2: 'Unsecured Perimeter Transponder Farm' //* - }), - 4: { // Gas - 1: 'Barren Perimeter Reservoir', //* - 2: 'Token Perimeter Reservoir', //* - 3: 'Minor Perimeter Reservoir', //* - 4: 'Sizeable Perimeter Reservoir', //* - 5: 'Ordinary Perimeter Reservoir' //* - }, - 5: { // Wormhole - // all w-space -> w-space are statics or K162 - 1: 'Z647 - C1', - 2: 'D382 - C2', - 3: 'O477 - C3', - 4: 'Y683 - C4', - 5: 'N062 - C5', - 6: 'R474 - C6', - 7: 'F135 - C12 Thera' - }, - 6: { // ORE - 1: 'Ordinary Perimeter Deposit', //* - 2: 'Common Perimeter Deposit', //* - 3: 'Unexceptional Frontier Deposit', //* - 4: 'Average Frontier Deposit', //* - 5: 'Isolated Core Deposit', //* - 6: 'Uncommon Core Deposit' //* - }, - 7: { // Ghost - - } + 1: c2Combat, + 2: c2Relic, + 3: c2Data, + 4: c2Gas, + 5: c2WH, + 6: c2Ore, + 7: {} // Ghost }, 3: { // C3 - 1: { // Combat - 1: 'Fortification Frontier Stronghold', - 2: 'Outpost Frontier Stronghold', - 3: 'Solar Cell', - 4: 'The Oruze Construct' - }, - 2: $.extend({}, nullSecRelicSites, { // Relic - 1: 'Forgotten Frontier Quarantine Outpost', //* - 2: 'Forgotten Frontier Recursive Depot' //* - }), - 3: $.extend({}, nullSecDataSites, { // Data - 1: 'Unsecured Frontier Database', //* - 2: 'Unsecured Frontier Receiver' //* - }), - 4: { // Gas - 1: 'Barren Perimeter Reservoir', //* - 2: 'Token Perimeter Reservoir', //* - 3: 'Minor Perimeter Reservoir', //* - 4: 'Sizeable Perimeter Reservoir', //* - 5: 'Ordinary Perimeter Reservoir', //* - 6: 'Bountiful Frontier Reservoir', //* - 7: 'Vast Frontier Reservoir' //* - }, - 5: { // Wormhole - // all k-space exits are static or K162 - 1: 'V301 - C1', - 2: 'I182 - C2', - 3: 'N968 - C3', - 4: 'T405 - C4', - 5: 'N770 - C5', - 6: 'A982 - C6', - 7: 'F135 - C12 Thera' - }, - 6: { // ORE - 1: 'Ordinary Perimeter Deposit', //* - 2: 'Common Perimeter Deposit', //* - 3: 'Unexceptional Frontier Deposit', //* - 4: 'Average Frontier Deposit', //* - 5: 'Infrequent Core Deposit', //* - 6: 'Unusual Core Deposit' //* - }, - 7: { // Ghost - - } + 1: c3Combat, + 2: c3Relic, + 3: c3Data, + 4: c3Gas, + 5: c3WH, + 6: c3Ore, + 7: {} // Ghost }, 4: { // C4 - 1: { // Combat - 1: 'Frontier Barracks', - 2: 'Frontier Command Post', - 3: 'Integrated Terminus', - 4: 'Sleeper Information Sanctum' - }, - 2: { // Relic - 1: 'Forgotten Frontier Conversion Module', - 2: 'Forgotten Frontier Evacuation Center' - }, - 3: { // Data - 1: 'Unsecured Frontier Digital Nexus', - 2: 'Unsecured Frontier Trinary Hub' - }, - 4: { // Gas - 1: 'Barren Perimeter Reservoir', //* - 2: 'Token Perimeter Reservoir', //* - 3: 'Minor Perimeter Reservoir', //* - 4: 'Sizeable Perimeter Reservoir', //* - 5: 'Ordinary Perimeter Reservoir', //* - 6: 'Vast Frontier Reservoir', //* - 7: 'Bountiful Frontier Reservoir' //* - }, - 5: { // Wormhole - // no *wandering* w-space -> w-space - // all holes are statics or K162 - 1: 'S047 - H', - 2: 'N290 - L', - 3: 'K329 - 0.0' - }, - 6: { // ORE - 1: 'Ordinary Perimeter Deposit', //* - 2: 'Common Perimeter Deposit', //* - 3: 'Unexceptional Frontier Deposit', //* - 4: 'Average Frontier Deposit', //* - 5: 'Unusual Core Deposit', //* - 6: 'Infrequent Core Deposit' //* - }, - 7: { // Ghost - - } + 1: c4Combat, + 2: c4Relic, + 3: c4Data, + 4: c4Gas, + 5: c4WH, + 6: c4Ore, + 7: {} // Ghost }, 5: { // C5 - 1: { // Combat - 1: 'Core Garrison', //* - 2: 'Core Stronghold', //* - 3: 'Oruze Osobnyk', //* - 4: 'Quarantine Area' - }, - 2: { // Relic - 1: 'Forgotten Core Data Field', - 2: 'Forgotten Core Information Pen' - }, - 3: { // Data - 1: 'Unsecured Frontier Enclave Relay', - 2: 'Unsecured Frontier Server Bank' - }, - 4: { // Gas - 1: 'Barren Perimeter Reservoir', //* - 2: 'Minor Perimeter Reservoir', //* - 3: 'Ordinary Perimeter Reservoir', //* - 4: 'Sizeable Perimeter Reservoir', //* - 5: 'Token Perimeter Reservoir', //* - 6: 'Bountiful Frontier Reservoir', //* - 7: 'Vast Frontier Reservoir', //* - 8: 'Instrumental Core Reservoir', //* - 9: 'Vital Core Reservoir' //* - }, - 5: { // Wormhole - 1: 'D792 - H', - 2: 'C140 - L', - 3: 'Z142 - 0.0' - }, - 6: { // ORE - 1: 'Average Frontier Deposit', //* - 2: 'Unexceptional Frontier Deposit', //* - 3: 'Uncommon Core Deposit', //* - 4: 'Ordinary Perimeter Deposit', //* - 5: 'Common Perimeter Deposit', //* - 6: 'Exceptional Core Deposit', //* - 7: 'Infrequent Core Deposit', //* - 8: 'Unusual Core Deposit', //* - 9: 'Rarified Core Deposit', //* - 10: 'Isolated Core Deposit' //* - }, - 7: { // Ghost - - } + 1: c5Combat, + 2: c5Relic, + 3: c5Data, + 4: c5Gas, + 5: c5WH, + 6: c5Ore, + 7: {} // Ghost }, 6: { // C6 - 1: { // Combat - 1: 'Core Citadel', //* - 2: 'Core Bastion', //* - 3: 'Strange Energy Readings', //* - 4: 'The Mirror' //* - }, - 2: { // Relic - 1: 'Forgotten Core Assembly Hall', //* - 2: 'Forgotten Core Circuitry Disassembler' //* - }, - 3: { // Data - 1: 'Unsecured Core Backup Array', //* - 2: 'Unsecured Core Emergence' //* - }, - 4: { // Gas - 1: 'Barren Perimeter Reservoir', //* - 2: 'Minor Perimeter Reservoir', //* - 3: 'Ordinary Perimeter Reservoir', //* - 4: 'Sizeable Perimeter Reservoir', //* - 5: 'Token Perimeter Reservoir', //* - 6: 'Bountiful Frontier Reservoir', //* - 7: 'Vast Frontier Reservoir', //* - 8: 'Instrumental Core Reservoir', //* - 9: 'Vital Core Reservoir' //* - }, - 5: { // Wormhole - 1: 'B520 - H', - 2: 'D792 - H', - 3: 'C140 - L', - 4: 'C391 - L', - 5: 'C248 - 0.0', - 6: 'Z142 - 0.0' - }, - 6: { // ORE - 1: 'Ordinary Perimeter Deposit', //* - 2: 'Common Perimeter Deposit', //* - 3: 'Unexceptional Frontier Deposit', //* - 4: 'Average Frontier Deposit', //* - 5: 'Rarified Core Deposit' //* - }, + 1: c6Combat, + 2: c6Relic, + 3: c6Data, + 4: c6Gas, + 5: c6WH, + 6: c6Ore, 7: { // Ghost 1: 'Superior Blood Raider Covert Research Facility' //* } }, - 12: { // Thera wormhole - 1: { // Combat - 1: 'Epicenter', - 2: 'Expedition Command Outpost Wreck', - 3: 'Planetary Colonization Office Wreck', - 4: 'Testing Facilities' - } + 12: { // Thera WH + 1: c12Combat }, - 13: { // Shattered Wormholes - 5: { // Wormhole (some of them are static) - 1: 'P060 - C1', - 2: 'Z647 - C1', - 3: 'D382 - C2', - 4: 'L005 - C2', - 5: 'N766 - C2', - 6: 'C247 - C3', - 7: 'M267 - C3', - 8: 'O477 - C3', - 9: 'X877 - C4', - 10: 'Y683 - C4', - 11: 'H296 - C5', - 12: 'H900 - C5', - 13: 'H296 - C5', - 14: 'N062 - C5', // ?? - 15: 'V911 - C5', - 16: 'U574 - C6', - 17: 'V753 - C6', - 18: 'W237 - C6', - 19: 'B274 - H', - 20: 'D792 - H', - 21: 'D845 - H', - 22: 'N110 - H', - 23: 'A239 - L', - 24: 'C391 - L', - 25: 'J244 - L', - 26: 'U201 - L', // ?? - 27: 'U210 - L', - 28: 'C248 - 0.0', - 29: 'E545 - 0.0', - 30: 'K346 - 0.0', - 31: 'Z060 - 0.0' - } + 13: { // Shattered WH + 5: c13WH }, 14: { // Drifter Sentinel WH - 1: { // Combat - 1: 'Monolith', - 2: 'Wormhole in Rock Circle', - 3: 'Opposing Spatial Rifts', - 4: 'Sleeper Enclave Debris', - 5: 'Crystal Resource' - } + 1: c14Combat }, 15: { // Drifter Barbican WH - 1: { // Combat - 1: 'Wrecked Ships', - 2: 'Unstable Wormhole', - 3: 'Spatial Rift', - 4: 'Heavily Guarded Spatial Rift', - 5: 'Crystals' - } + 1: c15Combat }, 16: { // Drifter Vidette WH - 1: { // Combat - 1: 'Ship Graveyard', - 2: 'Sleeper Engineering Station', - 3: 'Spatial Rift', - 4: 'Sleeper Enclave in Coral Rock', - 5: 'Crystals and Stone Circle' - } + 1: c16Combat }, 17: { // Drifter Conflux WH - 1: { // Combat - 1: 'Monolith', - 2: 'Caged Wormhole', - 3: 'Rock Formation and Wormhole', - 4: 'Particle Acceleration Array', - 5: 'Guarded Asteroid Station' - } + 1: c17Combat }, 18: { // Drifter Redoubt WH - 1: { // Combat - 1: 'Ship Graveyard', - 2: 'Caged Wormhole', - 3: 'Spatial Rift Generator', - 4: 'Sleeper Enclave', - 5: 'Hollow Asteroid' - } + 1: c18Combat } }, // system type (k-space) - 2: { + 2: { 30: { // High Sec - 5: { // Wormhole - 1: 'Z971 - C1', - 2: 'R943 - C2', - 3: 'X702 - C3', - 4: 'O128 - C4', - 5: 'M555 - C5', - 6: 'B041 - C6', - 7: 'A641 - H', - 8: 'R051 - L', - 9: 'V283 - 0.0', - 10: 'T458 - C12 Thera' - } + 5: hsWH }, 31: { // Low Sec - 5: { // Wormhole - 1: 'Z971 - C1', - 2: 'R943 - C2', - 3: 'X702 - C3', - 4: 'O128 - C4', - 5: 'N432 - C5', - 6: 'U319 - C6', - 7: 'B449 - H', - 8: 'N944 - L', - 9: 'S199 - 0.0', - 10: 'M164 - C12 Thera' - } + 5: lsWH }, 32: { // 0.0 - 5: { // Wormhole - 1: 'Z971 - C1', - 2: 'R943 - C2', - 3: 'X702 - C3', - 4: 'O128 - C4', - 5: 'N432 - C5', - 6: 'U319 - C6', - 7: 'B449 - H', - 8: 'N944 - L', - 9: 'S199 - 0.0', - 10: 'L031 - C12 Thera' - } + 5: nullWH } } }; - - return signatureTypes; }); diff --git a/public/js/v1.5.5/app/init.js b/public/js/v1.5.5/app/init.js index 110d6111..5345b4dc 100644 --- a/public/js/v1.5.5/app/init.js +++ b/public/js/v1.5.5/app/init.js @@ -3,10 +3,20 @@ */ define([], () => { - 'use strict'; - let Config = { + let frigWH = { + 1: 'E004 - C1', + 2: 'L005 - C2', + 3: 'Z006 - C3', + 4: 'M001 - C4', + 5: 'C008 - C5', + 6: 'G008 - C6', + 7: 'Q003 - 0.0', + 8: 'A009 - C13' + }; + + return { path: { img: '/public/img/', // path for images api: '/api/rest', //ajax URL - REST API @@ -49,12 +59,12 @@ define([], () => { gitHubReleases: '/api/github/releases' // ajax URL - get release info from GitHub }, breakpoints: [ - { name: 'screen-xl', width: Infinity }, - { name: 'screen-l', width: 1600 }, - { name: 'screen-m', width: 1200 }, - { name: 'screen-d', width: 1000 }, - { name: 'screen-s', width: 780 }, - { name: 'screen-xs', width: 480 } + {name: 'screen-xl', width: Infinity}, + {name: 'screen-l', width: 1600}, + {name: 'screen-m', width: 1200}, + {name: 'screen-d', width: 1000}, + {name: 'screen-s', width: 780}, + {name: 'screen-xs', width: 480} ], animationSpeed: { splashOverlay: 300, // "splash" loading overlay @@ -95,63 +105,63 @@ define([], () => { class: 'fa-desktop', label: 'desktop', unicode: '' - },{ + }, { class: 'fa-space-shuttle', label: 'space shuttle', unicode: '' - },{ + }, { class: 'fa-anchor', label: 'anchor', unicode: '' - },{ + }, { class: 'fa-satellite', label: 'satellite', unicode: '' - },{ + }, { class: 'fa-skull-crossbones', label: 'skull crossbones', unicode: '' - },{ + }, { class: 'fa-fire', label: 'fire', unicode: '' - },{ + }, { class: 'fa-bookmark', label: 'bookmark', unicode: '' - },{ + }, { class: 'fa-cube', label: 'cube', unicode: '' - },{ + }, { class: 'fa-star', label: 'star', unicode: '' - },{ + }, { class: 'fa-hat-wizard', label: 'hat wizard', unicode: '' - },{ + }, { class: 'fa-plane', label: 'plane', unicode: '' - },{ + }, { class: 'fa-globe', label: 'globe', unicode: '' - },{ + }, { class: 'fa-rocket', label: 'rocket', unicode: '' - },{ + }, { class: 'fa-life-ring', label: 'life ring', unicode: '' - },{ + }, { class: 'fa-heart', label: 'heart', unicode: '' - },{ + }, { class: 'fa-poop', label: 'poop', unicode: '' @@ -541,106 +551,16 @@ define([], () => { }, // frigate wormholes frigateWormholes: { - 1: { // C1 - 1: 'E004 - C1', - 2: 'L005 - C2', - 3: 'Z006 - C3', - 4: 'M001 - C4', - 5: 'C008 - C5', - 6: 'G008 - C6', - 7: 'Q003 - 0.0', - 8: 'A009 - C13' - }, - 2: { // C2 - 1: 'E004 - C1', - 2: 'L005 - C2', - 3: 'Z006 - C3', - 4: 'M001 - C4', - 5: 'C008 - C5', - 6: 'G008 - C6', - 7: 'Q003 - 0.0', - 8: 'A009 - C13' - }, - 3: { // C3 - 1: 'E004 - C1', - 2: 'L005 - C2', - 3: 'Z006 - C3', - 4: 'M001 - C4', - 5: 'C008 - C5', - 6: 'G008 - C6', - 7: 'Q003 - 0.0', - 8: 'A009 - C13' - }, - 4: { // C4 - 1: 'E004 - C1', - 2: 'L005 - C2', - 3: 'Z006 - C3', - 4: 'M001 - C4', - 5: 'C008 - C5', - 6: 'G008 - C6', - 7: 'Q003 - 0.0', - 8: 'A009 - C13' - }, - 5: { // C5 - 1: 'E004 - C1', - 2: 'L005 - C2', - 3: 'Z006 - C3', - 4: 'M001 - C4', - 5: 'C008 - C5', - 6: 'G008 - C6', - 7: 'Q003 - 0.0', - 8: 'A009 - C13' - }, - 6: { // C6 - 1: 'E004 - C1', - 2: 'L005 - C2', - 3: 'Z006 - C3', - 4: 'M001 - C4', - 5: 'C008 - C5', - 6: 'G008 - C6', - 7: 'Q003 - 0.0', - 8: 'A009 - C13' - }, - 13: { // Shattered Wormholes (some of them are static) - 1: 'E004 - C1', - 2: 'L005 - C2', - 3: 'Z006 - C3', - 4: 'M001 - C4', - 5: 'C008 - C5', - 6: 'G008 - C6', - 7: 'Q003 - 0.0', - 8: 'A009 - C13' - }, - 30: { // High Sec - 1: 'E004 - C1', - 2: 'L005 - C2', - 3: 'Z006 - C3', - 4: 'M001 - C4', - 5: 'C008 - C5', - 6: 'G008 - C6', - 7: 'Q003 - 0.0', - 8: 'A009 - C13' - }, - 31: { // Low Sec - 1: 'E004 - C1', - 2: 'L005 - C2', - 3: 'Z006 - C3', - 4: 'M001 - C4', - 5: 'C008 - C5', - 6: 'G008 - C6', - 7: 'Q003 - 0.0', - 8: 'A009 - C13' - }, - 32: { // 0.0 - 1: 'E004 - C1', - 2: 'L005 - C2', - 3: 'Z006 - C3', - 4: 'M001 - C4', - 5: 'C008 - C5', - 6: 'G008 - C6', - 7: 'Q003 - 0.0', - 8: 'A009 - C13' - } + 1: frigWH, // C1 + 2: frigWH, // C2 + 3: frigWH, // C3 + 4: frigWH, // C4 + 5: frigWH, // C5 + 6: frigWH, // C6 + 13: frigWH, // Shattered Wormholes (some of them are static) + 30: frigWH, // High Sec + 31: frigWH, // Low Sec + 32: frigWH // 0.0 }, // Drifter wormholes (can only appear in k-space) drifterWormholes: { @@ -660,8 +580,5 @@ define([], () => { 6: 'K162 - 0.0', 7: 'K162 - C12 Thera' } - }; - - return Config; }); diff --git a/public/js/v1.5.5/app/lib/prototypes.js b/public/js/v1.5.5/app/lib/prototypes.js new file mode 100644 index 00000000..3ec05362 --- /dev/null +++ b/public/js/v1.5.5/app/lib/prototypes.js @@ -0,0 +1,95 @@ +define([], () => { + 'use strict'; + + /** + * Array diff + * [1,2,3,4,5].diff([4,5,6]) => [1,2,3] + * @param a + * @returns {*[]} + */ + Array.prototype.diff = function(a){ + return this.filter(i => !a.includes(i)); + }; + + /** + * Array intersect + * [1,2,3,4,5].intersect([4,5,6]) => [4,5] + * @param a + * @returns {*[]} + */ + Array.prototype.intersect = function(a){ + return this.filter(i => a.includes(i)); + }; + + /** + * compares two arrays if all elements in a are also in b + * element order is ignored + * @param a + * @returns {boolean} + */ + Array.prototype.equalValues = function(a){ + return this.diff(a).concat(a.diff(this)).length === 0; + }; + + /** + * like Array.concat() + remove duplicate values + * @see https://stackoverflow.com/a/38940354/4329969 + * @param a + * @returns {*[]} + */ + Array.prototype.concatFilter = function(a){ + return [...new Set([...this,...a])]; + }; + + /** + * sort array of objects by property name + * @param p + * @returns {Array.} + */ + Array.prototype.sortBy = function(p){ + return this.slice(0).sort((a,b) => { + return (a[p] > b[p]) ? 1 : (a[p] < b[p]) ? -1 : 0; + }); + }; + + /** + * capitalize first letter + * @returns {string} + */ + String.prototype.capitalize = function(){ + return this.charAt(0).toUpperCase() + this.slice(1); + }; + + /** + * get hash from string + * @returns {number} + */ + String.prototype.hashCode = function(){ + let hash = 0, i, chr; + if(this.length === 0) return hash; + for(i = 0; i < this.length; i++){ + chr = this.charCodeAt(i); + hash = ((hash << 5) - hash) + chr; + hash |= 0; // Convert to 32bit integer + } + return hash; + }; + + String.prototype.trimLeftChars = function(charList){ + if(charList === undefined) + charList = '\\s'; + return this.replace(new RegExp('^[' + charList + ']+'), ''); + }; + + String.prototype.trimRightChars = function(charList){ + if(charList === undefined) + charList = '\\s'; + return this.replace(new RegExp('[' + charList + ']+$'), ''); + }; + + String.prototype.trimChars = function(charList){ + return this.trimLeftChars(charList).trimRightChars(charList); + }; + + return {}; +}); \ No newline at end of file diff --git a/public/js/v1.5.5/app/ui/module/system_signature.js b/public/js/v1.5.5/app/ui/module/system_signature.js index 6f4dad27..9f2d75ff 100644 --- a/public/js/v1.5.5/app/ui/module/system_signature.js +++ b/public/js/v1.5.5/app/ui/module/system_signature.js @@ -228,6 +228,30 @@ define([ return sum; }; + /** + * Some signatures types can spawn in more than one 'areaId' for a 'groupId' + * -> e.g. a 'shattered' C3 WHs have Combat/Relic/.. sites from C2, C3, c4! + * https://github.com/exodus4d/pathfinder/issues/875 + * @param systemTypeId + * @param areaId + * @param groupId + * @param shattered + * @returns {[*]} + */ + let getAreaIdsForSignatureTypeOptions = (systemTypeId, areaId, groupId, shattered = false) => { + let areaIds = [areaId]; + + if( + systemTypeId === 1 && shattered && + [1, 2, 3, 4, 5, 6].includes(areaId) && + [1, 2, 3, 4, 6].includes(groupId) + ){ + areaIds = [areaId - 1, areaId, areaId + 1].filter(areaId => areaId >= 1 && areaId <= 6); + } + + return areaIds; + }; + /** * get possible frig holes that could spawn in a system * filtered by "systemTypeId" @@ -245,13 +269,14 @@ define([ /** * get all signature types that can exist for a given system * -> result is partially cached - * @param systemData * @param systemTypeId * @param areaId * @param groupId - * @returns {Array} + * @param statics + * @param shattered + * @returns {[]|*} */ - let getSignatureTypeOptions = (systemData, systemTypeId, areaId, groupId) => { + let getSignatureTypeOptions = (systemTypeId, areaId, groupId, {statics = null, shattered = false} = {}) => { systemTypeId = parseInt(systemTypeId || 0); areaId = parseInt(areaId || 0); groupId = parseInt(groupId || 0); @@ -262,7 +287,10 @@ define([ return newSelectOptions; } - let cacheKey = [systemTypeId, areaId, groupId].join('_'); + // check if sig types require more than one 'areaId' to be checked + let areaIds = getAreaIdsForSignatureTypeOptions(systemTypeId, areaId, groupId, shattered); + + let cacheKey = [systemTypeId, ...areaIds, groupId].join('_'); newSelectOptions = sigTypeOptionsCache.getOrDefault(cacheKey, []); @@ -275,7 +303,7 @@ define([ }else{ // get new Options ---------- // get all possible "static" signature names by the selected groupId - let tempSelectOptions = Util.getSignatureTypeNames(systemTypeId, areaId, groupId); + let tempSelectOptions = Util.getSignatureTypeNames(systemTypeId, areaIds, groupId); // format options into array with objects advantages: keep order, add more options (whs), use optgroup if(tempSelectOptions){ @@ -312,7 +340,7 @@ define([ frigateHoles.hasOwnProperty(frigKey) ){ newSelectOptionsCount++; - frigateWHData.push( {value: newSelectOptionsCount, text: frigateHoles[frigKey]} ); + frigateWHData.push({value: newSelectOptionsCount, text: frigateHoles[frigKey]}); } } @@ -329,7 +357,7 @@ define([ Init.drifterWormholes.hasOwnProperty(drifterKey) ){ newSelectOptionsCount++; - drifterWHData.push( {value: newSelectOptionsCount, text: Init.drifterWormholes[drifterKey]} ); + drifterWHData.push({value: newSelectOptionsCount, text: Init.drifterWormholes[drifterKey]}); } } @@ -346,12 +374,12 @@ define([ Init.incomingWormholes.hasOwnProperty(incomingKey) ){ newSelectOptionsCount++; - incomingWHData.push( {value: newSelectOptionsCount, text: Init.incomingWormholes[incomingKey]} ); + incomingWHData.push({value: newSelectOptionsCount, text: Init.incomingWormholes[incomingKey]}); } } if(incomingWHData.length > 0){ - newSelectOptions.push({ text: 'Incoming', children: incomingWHData}); + newSelectOptions.push({text: 'Incoming', children: incomingWHData}); } }else{ // groups without "children" (optgroup) should be sorted by "value" @@ -363,17 +391,17 @@ define([ sigTypeOptionsCache.set(cacheKey, newSelectOptions.slice(0)); } - // static wormholes (DO NOT CACHE) (not all C2 WHs have the same statics,... + // static wormholes (DO NOT CACHE) (not all C2 WHs have the same statics..) if(groupId === 5){ // add static WH(s) for this system - if(systemData.statics){ + if(statics){ let staticWHData = []; - for(let wormholeName of systemData.statics){ + for(let wormholeName of statics){ let wormholeData = Object.assign({}, Init.wormholes[wormholeName]); let staticWHName = wormholeData.name + ' - ' + wormholeData.security; newSelectOptionsCount++; - staticWHData.push( {value: newSelectOptionsCount, text: staticWHName} ); + staticWHData.push({value: newSelectOptionsCount, text: staticWHName}); } if(staticWHData.length > 0){ @@ -395,7 +423,7 @@ define([ let systemTypeId = systemElement.data('typeId'); let areaId = Util.getAreaIdBySecurity(systemElement.data('security')); let systemData = {statics: systemElement.data('statics')}; - return getSignatureTypeOptions(systemData, systemTypeId, areaId, groupId); + return getSignatureTypeOptions(systemTypeId, areaId, groupId, systemData); }; /** @@ -892,10 +920,10 @@ define([ let sigDescriptionLowerCase = sigDescription.toLowerCase(); let typeOptions = getSignatureTypeOptions( - systemData, systemData.type.id, Util.getAreaIdBySecurity(systemData.security), - sigGroupId + sigGroupId, + systemData ); for(let [key, name] of Object.entries(Util.flattenXEditableSelectArray(typeOptions))){ @@ -1759,10 +1787,10 @@ define([ let rowData = tableApi.row($(cell).parents('tr')).data(); let typeOptions = getSignatureTypeOptions( - systemData, systemData.type.id, Util.getAreaIdBySecurity(systemData.security), - rowData.groupId + rowData.groupId, + systemData ); return typeOptions; }, diff --git a/public/js/v1.5.5/app/util.js b/public/js/v1.5.5/app/util.js index 5eac759b..f7f56346 100644 --- a/public/js/v1.5.5/app/util.js +++ b/public/js/v1.5.5/app/util.js @@ -4,6 +4,7 @@ define([ 'jquery', 'app/init', + 'app/lib/prototypes', 'app/lib/console', 'conf/system_effect', 'conf/signature_type', @@ -19,7 +20,7 @@ define([ 'bootstrapConfirmation', 'bootstrapToggle', 'select2' -], ($, Init, Con, SystemEffect, SignatureType, bootbox, localforage) => { +], ($, Init, Proto, Con, SystemEffect, SignatureType, bootbox, localforage) => { 'use strict'; @@ -973,85 +974,6 @@ define([ */ let initPrototypes = () => { - /** - * Array diff - * [1,2,3,4,5].diff([4,5,6]) => [1,2,3] - * @param a - * @returns {*[]} - */ - Array.prototype.diff = function(a){ - return this.filter(i => !a.includes(i)); - }; - - /** - * Array intersect - * [1,2,3,4,5].intersect([4,5,6]) => [4,5] - * @param a - * @returns {*[]} - */ - Array.prototype.intersect = function(a){ - return this.filter(i => a.includes(i)); - }; - - /** - * compares two arrays if all elements in a are also in b - * element order is ignored - * @param a - * @returns {boolean} - */ - Array.prototype.equalValues = function(a){ - return this.diff(a).concat(a.diff(this)).length === 0; - }; - - /** - * sort array of objects by property name - * @param p - * @returns {Array.} - */ - Array.prototype.sortBy = function(p){ - return this.slice(0).sort((a,b) => { - return (a[p] > b[p]) ? 1 : (a[p] < b[p]) ? -1 : 0; - }); - }; - - /** - * capitalize first letter - * @returns {string} - */ - String.prototype.capitalize = function(){ - return this.charAt(0).toUpperCase() + this.slice(1); - }; - - /** - * get hash from string - * @returns {number} - */ - String.prototype.hashCode = function(){ - let hash = 0, i, chr; - if(this.length === 0) return hash; - for(i = 0; i < this.length; i++){ - chr = this.charCodeAt(i); - hash = ((hash << 5) - hash) + chr; - hash |= 0; // Convert to 32bit integer - } - return hash; - }; - - String.prototype.trimLeftChars = function(charList){ - if(charList === undefined) - charList = '\\s'; - return this.replace(new RegExp('^[' + charList + ']+'), ''); - }; - - String.prototype.trimRightChars = function(charList){ - if(charList === undefined) - charList = '\\s'; - return this.replace(new RegExp('[' + charList + ']+$'), ''); - }; - - String.prototype.trimChars = function(charList){ - return this.trimLeftChars(charList).trimRightChars(charList); - }; initPassiveEvents(); }; @@ -2590,23 +2512,16 @@ define([ }; /** - * get Signature names out of global - * @param systemTypeId - * @param areaId - * @param sigGroupId + * get signature 'type' options for a systemTypeId + * -> areaIds is array! This is used for "Shattered WHs" where e.g.: + * Combat/Relic/.. sites from multiple areaIds (C1, C2, C3) can spawn in a C2,... + * @param systemTypeId 1 == w-space; 2 == k-space; 3 == a-space + * @param areaIds 1 == c1; 2 == c2; 12 == Thera; 13 == Shattered Frig;... + * @param sigGroupId 1 == Combat; 2 == Relic; 3 == Data; ... * @returns {{}} */ - let getSignatureTypeNames = (systemTypeId, areaId, sigGroupId) => { - let signatureNames = {}; - if( - SignatureType[systemTypeId] && - SignatureType[systemTypeId][areaId] && - SignatureType[systemTypeId][areaId][sigGroupId] - ){ - signatureNames = SignatureType[systemTypeId][areaId][sigGroupId]; - } - - return signatureNames; + let getSignatureTypeNames = (systemTypeId, areaIds, sigGroupId) => { + return objCombine(...areaIds.map(areaId => getObjVal(SignatureType, [systemTypeId, areaId, sigGroupId].join('.')) || {})); }; /** @@ -3396,6 +3311,21 @@ define([ return obj; }, {}); + /** + * combines multiple objects into one object + * -> removes duplicate values + * -> properties are indexed 1, 2,..n + * @param objects + * @returns {{[p: string]: *}} + */ + let objCombine = (...objects) => { + let combined = objects.reduce((acc, obj) => acc.concatFilter(Object.values(obj)), []); + combined.unshift(''); // properties should start at 1 (not 0) + combined = {...combined}; + delete combined[0]; + return combined; + }; + /** * get deep json object value if exists * -> e.g. key = 'first.last.third' string