//settings. //base image URL for facility images. imageURL = "https://dev-images.swcombine.com//facilities/"; //base image URL for terrain backgrounds terrainURL = "https://dev-images.swcombine.com//galaxy/terrains/"; //straight image URL to use for tiles/background slab (that facilities are built onto: empty city tiles.) backgroundImageURL = "https://dev-images.swcombine.com//facilities/basement_25_1.gif"; //return freighter data function getMaterialData() { var mats = new Array(); mats['quantum'] = 12; mats['meleenium'] = 11; mats['ardanium'] = 8; mats['rudic'] = 1; mats['ryll'] = 1; mats['duracrete'] = 9; mats['alazhi'] = 2; mats['laboi'] = 4; mats['adegan'] = 3; mats['rockivory'] = 12; mats['tibannagas'] = 0.16; mats['nova'] = 2; mats['varium'] = 10; mats['varmigio'] = 9; mats['lommite'] = 6; mats['hibridium'] = 14; mats['durelium'] = 8; mats['lowickan'] = 4; mats['vertex'] = 4; mats['berubian'] = 3; mats['bacta'] = 0.8; return mats; } //return freighter data function getBuildingData() { return new Array( 0, 1, 1, 1, 'Personal Residence', -1, 0, 1, 81, 17, 0, 14, 0, 0, 0, 11, 0, 0, 1, 3, 1, 2, 'Office', -3, 15, 0, 101, 30, 0, 40, 0, 0, 0, 13, 0, 0, 2, 3, 1, 3, 'Hotel', -3, 10, 5, 100, 30, 0, 56, 0, 0, 0, 13, 0, 0, 3, 3, 1, 4, 'Tavern', -2, 5, 0, 100, 30, 0, 48, 0, 0, 0, 13, 0, 0, 4, 3, 3, 5, 'Semi-detached House', -2, 0, 6, 150, 68, 0, 24, 0, 0, 0, 17, 0, 0, 5, 3, 3, 6, 'Warehouse', -3, 5, 0, 300, 83, 0, 40, 0, 0, 0, 31, 0, 0, 6, 7, 7, 7, 'Palace', -10, 100, 10, 1000, 373, 15, 233, 0, 0, 0, 98, 0, 0, 7, 1, 1, 9, 'Golan Laser Battery', -2, 0, 0, 100, 21, 180, 12, 0, 0, 3, 14, 0, 0, 8, 1, 1, 10, 'Anti-Air Battery', -2, 0, 0, 101, 27, 180, 12, 0, 0, 11, 20, 0, 0, 9, 1, 1, 11, 'Park', 0, 0.2, 0, 8, 7, 0, 12, 0, 0, 0, 1, 0, 0, 10, 1, 1, 12, 'Statue', 0, 0, 0, 30, 12, 0, 7, 0, 0, 0, 6, 0, 0, 11, 1, 1, 13, 'Fountain', 0, 0, 0, 29, 11, 0, 7, 0, 0, 0, 5, 0, 0, 12, 1, 1, 14, 'Foxhole', -1, 0, 0, 51, 96, 0, 24, 0, 0, 0, 86, 0, 0, 13, 1, 1, 15, 'Atgar 1.4 FD P-Tower', -2, 0, 0, 101, 19, 180, 9, 0, 0, 3, 13, 0, 0, 14, 1, 1, 16, 'Wall', 0, 0, 0, 150, 36, 0, 7, 0, 0, 0, 29, 0, 0, 15, 1, 1, 17, 'Trench', 0, 0, 0, 150, 36, 0, 7, 0, 0, 0, 29, 0, 0, 16, 1, 1, 19, 'ATM', -1, 0, 0, 8, 21, 0, 13, 0, 0, 0, 14, 0, 0, 17, 3, 1, 20, 'Power Generator', 30, 6, 0, 266, 46, 0, 24, 0, 0, 0, 28, 0, 0, 18, 3, 3, 21, 'Library', -2, 4, 0, 150, 68, 0, 56, 0, 0, 0, 17, 0, 0, 19, 3, 3, 22, 'Museum', -2, 4, 0, 150, 68, 0, 56, 0, 0, 0, 17, 0, 0, 20, 3, 3, 23, 'Civic Centre', -1, 6, 0, 176, 70, 30, 56, 0, 0, 0, 20, 0, 0, 21, 3, 3, 24, 'Church', -2, 3, 2, 126, 65, 0, 56, 0, 0, 0, 15, 0, 0, 22, 3, 3, 25, 'KDY v-150 Planet Defender', -20, 4, 0, 300, 83, 315, 18, 0, 0, 15, 31, 0, 0, 23, 3, 3, 26, 'LNR I Series Turbo Laser Cannon', -12, 4, 0, 276, 80, 315, 13, 0, 0, 15, 29, 0, 0, 24, 3, 3, 27, 'LNR II Series Turbo Laser Cannon', -20, 5, 0, 326, 85, 315, 19, 0, 0, 30, 34, 0, 0, 25, 3, 3, 28, 'Shield Generator', -25, 4, 0, 300, 83, 694, 12, 50, 0, 0, 31, 0, 0, 26, 5, 3, 29, 'Hangar', -3, 6, 0, 300, 116, 15, 373, 0, 0, 0, 31, 0, 0, 27, 5, 3, 30, 'Landing Pad', -4, 7, 0, 300, 116, 15, 373, 0, 0, 0, 31, 0, 0, 28, 5, 3, 31, 'Barracks', -2, 15, 8, 300, 116, 0, 105, 0, 0, 0, 31, 0, 0, 29, 5, 5, 32, 'Training Academy', -2, 15, 2, 300, 171, 0, 124, 0, 0, 0, 31, 0, 0, 30, 5, 5, 33, 'Hospital', -6, 40, 0, 201, 161, 15, 197, 0, 0, 0, 22, 0, 10, 31, 5, 5, 34, 'Factory', -8, 40, 0, 480, 189, 0, 160, 64, 0, 0, 49, 0, 0, 32, 5, 5, 35, 'Prison', -6, 20, 5, 285, 168, 15, 105, 0, 0, 0, 29, 0, 0, 33, 5, 5, 36, 'Mine', -6, 15, 0, 276, 168, 0, 160, 104, 0, 0, 29, 0, 0, 34, 5, 5, 37, 'High Rise Building 10 flats', -3, 1, 10, 100, 151, 45, 40, 0, 0, 0, 13, 0, 0, 35, 5, 5, 38, 'High Rise Building 20 flats', -3, 2, 20, 200, 162, 60, 71, 0, 0, 0, 23, 0, 0, 36, 5, 5, 39, 'High Rise Building 30 flats', -4, 3, 30, 300, 177, 75, 101, 0, 0, 0, 37, 0, 0, 37, 5, 5, 40, 'High Rise Building 40 flats', -4, 4, 40, 401, 192, 90, 131, 0, 0, 0, 51, 0, 0, 38, 5, 5, 41, 'Temple', -3, 4, 3, 250, 166, 0, 373, 0, 0, 0, 27, 0, 0, 39, 7, 7, 42, 'Shield Projector', -50, 15, 0, 701, 343, 1074, 20, 100, 0, 0, 70, 0, 0, 40, 20, 20, 43, 'Imperial Palace', 0, 400, 80, 0, 2410, 315, 373, 0, 0, 238, 200, 0, 0, 41, 5, 5, 44, 'High Rise Building 50 flats', -5, 5, 50, 500, 189, 105, 160, 0, 0, 0, 49, 0, 0, 42, 7, 7, 45, 'Skyscraper 60 flats', -5, 6, 60, 600, 336, 120, 189, 0, 0, 0, 63, 0, 0, 43, 7, 7, 46, 'Skyscraper 70 flats', -6, 7, 70, 701, 351, 135, 218, 0, 0, 0, 77, 0, 0, 44, 7, 7, 47, 'Skyscraper 80 flats', -6, 8, 80, 800, 366, 150, 247, 0, 0, 0, 91, 0, 0, 45, 7, 7, 48, 'Skyscraper 90 flats', -7, 9, 90, 901, 381, 165, 275, 0, 0, 0, 106, 0, 0, 46, 7, 7, 49, 'Skyscraper 100 flats', -7, 10, 100, 1001, 396, 180, 303, 0, 0, 0, 120, 0, 0, 47, 3, 1, 50, 'Slave Market', -4, 30, 0, 75, 27, 0, 233, 0, 0, 0, 10, 0, 0, 48, 7, 7, 51, 'Labour Camp', -8, 60, 0, 501, 323, 0, 580, 0, 0, 0, 51, 0, 0, 49, 5, 5, 52, 'Recycling Plant', -5, 40, 0, 300, 171, 0, 16, 42, 0, 0, 31, 0, 0, 50, 20, 20, 54, 'Sith Temple', 0, 5, 0, 0, 3138, 0, 1375, 0, 0, 0, 2857, 0, 0, 51, 20, 20, 55, 'Jedi Praxeum', -4, 5, 0, 0, 3138, 0, 1375, 0, 0, 0, 2857, 0, 0, 52, 10, 10, 56, 'Royal Hapan Palace', -13, 300, 30, 0, 1150, 120, 303, 0, 0, 77, 571, 0, 0, 53, 5, 5, 57, 'Asylum', -6, 15, 10, 100, 168, 75, 373, 0, 0, 0, 29, 0, 0, 54, 7, 7, 58, 'Conference Centre', -10, 100, 8, 501, 600, 120, 268, 0, 0, 0, 314, 0, 0, 55, 7, 7, 59, 'Command Centre', -10, 100, 8, 500, 720, 120, 250, 0, 0, 39, 429, 0, 0, 56, 7, 7, 60, 'Government House', -10, 100, 8, 501, 795, 120, 303, 0, 0, 45, 500, 0, 0, 57, 1, 1, 61, 'Silo', -1, 1, 0, 51, 14, 0, 16, 0, 0, 0, 8, 0, 0, 58, 6, 6, 62, 'Holonet Communication Centre', -20, 50, 0, 750, 276, 415, 24, 0, 0, 0, 74, 0, 0, 59, 3, 1, 64, 'Bank', -2, 10, 0, 158, 47, 0, 40, 0, 0, 0, 29, 0, 0, 60, 5, 5, 65, 'Alazhi Farm', -4, 15, 0, 100, 151, 0, 24, 111, 0, 0, 13, 0, 0, 61, 7, 7, 66, 'Bacta Refinement Facility', -15, 40, 0, 400, 313, 0, 24, 104, 0, 0, 41, 0, 0, 62, 1, 1, 67, 'Gate', -1, 2, 0, 41, 13, 15, 11, 0, 0, 0, 7, 0, 0, 63, 1, 1, 68, 'SAM Launcher', -2, 0, 0, 101, 24, 180, 11, 0, 0, 9, 17, 0, 0, 64, 1, 1, 69, 'Chapel', -1, 1, 1, 51, 14, 0, 24, 0, 0, 0, 8, 0, 0, 65, 3, 1, 70, 'Garage', -2, 4, 0, 81, 28, 0, 48, 0, 0, 0, 11, 0, 0, 66, 5, 1, 71, 'Dry Dock', -5, 20, 0, 100, 41, 0, 86, 0, 0, 0, 13, 0, 0, 67, 5, 5, 73, 'Naval Shipyard', -8, 40, 0, 600, 201, 0, 86, 118, 0, 0, 60, 0, 0, 68, 5, 5, 74, 'Port', -6, 25, 0, 600, 201, 0, 715, 0, 0, 0, 60, 0, 0, 69, 5, 5, 75, 'Computer Control Centre', -25, 30, 0, 300, 174, 315, 86, 0, 0, 13, 34, 0, 0, 70, 7, 7, 76, 'Cathedral', -5, 5, 5, 501, 600, 0, 303, 0, 0, 0, 314, 0, 0, 71, 9, 9, 77, 'Research Centre', -30, 120, 0, 1750, 701, 0, 268, 645, 0, 0, 243, 0, 0, 72, 8, 4, 78, 'Starport', -12, 50, 0, 750, 254, 30, 715, 0, 0, 0, 74, 0, 0, 73, 5, 5, 79, 'Chemical Processing Facility', -9, 40, 0, 300, 171, 0, 20, 0, 0, 0, 31, 0, 0, 74, 3, 3, 80, 'Casino', -6, 25, 0, 162, 70, 30, 64, 0, 0, 0, 20, 0, 0, 75, 3, 3, 81, 'Workers Compound', -3, 1, 6, 176, 70, 0, 20, 0, 0, 0, 20, 0, 0, 76, 3, 3, 82, 'Council Flats', -2, 1, 7, 201, 73, 0, 24, 0, 0, 0, 22, 0, 0, 77, 5, 3, 83, 'Crew Quarters', -2, 14, 7, 276, 113, 0, 105, 0, 0, 0, 29, 0, 0, 78, 3, 3, 84, 'Shop', -2, 10, 0, 201, 73, 0, 52, 0, 0, 0, 22, 0, 0, 79, 5, 1, 85, 'Wall', 0, 0, 0, 750, 178, 0, 7, 0, 0, 0, 143, 0, 0, 80, 10, 1, 86, 'Wall', 0, 0, 0, 1500, 355, 0, 7, 0, 0, 0, 286, 0, 0, 81, 19, 1, 87, 'Wall', 0, 0, 0, 3000, 705, 0, 7, 0, 0, 0, 571, 0, 0, 82, 3, 1, 88, 'Commerce Centre', -3, 15, 0, 101, 30, 0, 40, 0, 0, 0, 13, 0, 0, 83, 20, 20, 89, 'B`omarr monastery', 0, 0, 0, 0, 2290, 0, 1375, 0, 0, 0, 86, 0, 0, 84, 5, 5, 90, 'Lab', -8, 40, 0, 450, 186, 0, 160, 64, 0, 0, 46, 0, 0, 85, 20, 20, 91, 'Wildlife Preserve', 0, 30, 0, 0, 2290, 15, 1375, 0, 0, 0, 86, 0, 0, 86, 7, 7, 92, 'Zoo', -13, 30, 0, 501, 600, 15, 303, 0, 0, 0, 314, 0, 0, 87, 5, 5, 93, 'Ranch', -3, 10, 5, 100, 151, 0, 24, 0, 0, 0, 13, 0, 0, 88, 10, 10, 94, 'Fountain of the Ancients', 0, 0, 0, 0, 300550, 0, 373, 0, 0, 0, 285714, 0, 0, 89, 10, 10, 95, 'Floating Rock Garden', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 90, 7, 4, 96, 'Stadium', -12, 50, 0, 575, 214, 0, 1375, 0, 0, 0, 57, 0, 0, 91, 10, 10, 99, 'Oracle of Pelgrin', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 92, 10, 10, 100, 'Brass Soldiers of Axum', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 93, 10, 10, 101, 'Cathedral of Winds', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 94, 10, 10, 102, 'Forbidden Gardens of Nuswatta', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 95, 20, 20, 105, 'Crystal Caves', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 96, 8, 8, 106, 'Large Palace', -12, 110, 12, 1143, 426, 19, 255, 0, 0, 0, 112, 0, 0, 97, 8, 8, 107, 'Distribution Center', -15, 100, 0, 40091, 4852, 1515, 86, 0, 0, 0, 4286, 0, 0, 98, 1, 1, 9999, 'Stalagmite', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ); } //function returns freighter data. function getFreighterData() { return new Array( 'Xanadu-class Superyacht',5000,10000, 'W-23 Star Hauler',12000,15000, 'Verpine-class Heavy Cruiser',50000,20000, 'Veltraa-class Cruiser',13000,2100, 'Valor-class Cruiser',30000,10500, 'Strike-class Medium Cruiser',20000,3500, 'Star Galleon-class Frigate',90000,60000, 'Sphyrna-class Corvette',8000,2500, 'Space Master Medium Transport',28000,19000, 'Prometheus-class Star Craft',21000,4500, 'PB-950 Patrol Boat',4200,2400, 'Namana-class Light Cruiser',17000,3500, 'Modular Conveyor',120000,80000, 'Mobquet Medium Transport',90000,70000, 'M-class Luxury Liner',23000,2400, 'Lucrehulk-class Battleship',5000000,425000, 'KRS-1 Ore Hauler',100000,85000, 'Ithullan Ore Hauler',200000,150000, 'Hardcell-class Transport',400000,200000, 'Hammerhead-class Cruiser',10000,4000, 'GR-75 Medium Transport',97500,70000, 'Goji-DF Turtle Tanker',30000,33333, 'Empress-class Super Freighter',67500,50000, 'Defender-class Light Corvette',6000,2500, 'Crusader-class Corvette',5000,2000, 'CR-90 Assassin-class Corvette',15000,2500, 'Class VI Bulk Freighter',20000,45000, 'Carrack/S-class Light Cruiser',50000,2250, 'Carrack/I-class Light Cruiser',50000,2250, 'C-9979 Landing Craft',30000,6000, 'Brayl-class Bulk Freighter',100000,75000, 'Braha\'tok-class Gunship',2800,3300, 'BFF-1 Bulk Freighter',135000,100000, 'Bayonet-class Light Cruiser',8500,3500, 'Ardent-class Fast Frigate',20000,8000, 'Action VI Transport',50000,20000, 'Acclamator-class Assault Ship',300000,15000, 'AA-9 Coruscant Freighter',80000,75000 ); } //this function is used to find the image designation for the given terrain name. function resolveTerrainImage(terrainName) { terrainName = terrainName.toLowerCase(); switch(terrainName) { case 'cave' : return 'n' case 'crater' : return 'i' case 'desert' : return 'b' case 'forest' : return 'c' case 'gas giant' : return 'o' case 'glacier' : return 'k' case 'grassland' : return 'f' case 'jungle' : return 'd' case 'mountain' : return 'l' case 'ocean' : return 'g' case 'river' : return 'h' case 'rock' : return 'j' case 'swamp' : return 'e' default : return ''; //error! } } //list of the names of the terrains. var terrainTypes = new Array(); terrainTypes[13] = "Cave"; terrainTypes[8] = "Crater"; terrainTypes[1] = "Desert"; terrainTypes[2] = "Forest"; terrainTypes[15] = "Gas Giant"; terrainTypes[10] = "Glacier"; terrainTypes[5] = "Grassland"; terrainTypes[3] = "Jungle"; terrainTypes[11] = "Mountain"; terrainTypes[6] = "Ocean"; terrainTypes[7] = "River"; terrainTypes[9] = "Rock"; terrainTypes[4] = "Swamp"; //list of facilities that don't need roads. var noRoadFacilities = new Array(16,17,43,67,85,86,87,89,91,9999);