diff --git a/SCANassets/Icons/DropDownTex.dds b/SCANassets/Icons/DropDownTex.dds deleted file mode 100644 index 8fbbaa79d..000000000 Binary files a/SCANassets/Icons/DropDownTex.dds and /dev/null differ diff --git a/SCANassets/Icons/SCAN_Asteroid_Icon.dds b/SCANassets/Icons/SCAN_Asteroid_Icon.dds deleted file mode 100644 index e28558d6a..000000000 Binary files a/SCANassets/Icons/SCAN_Asteroid_Icon.dds and /dev/null differ diff --git a/SCANassets/Icons/SCAN_BigColorWheel_Tex.png b/SCANassets/Icons/SCAN_BigColorWheel_Tex.png deleted file mode 100644 index 0d3cf5e8d..000000000 Binary files a/SCANassets/Icons/SCAN_BigColorWheel_Tex.png and /dev/null differ diff --git a/SCANassets/Icons/SCAN_ColorToggle_Icon.dds b/SCANassets/Icons/SCAN_ColorToggle_Icon.dds deleted file mode 100644 index 1df7213ca..000000000 Binary files a/SCANassets/Icons/SCAN_ColorToggle_Icon.dds and /dev/null differ diff --git a/SCANassets/Icons/SCAN_Color_Icon.dds b/SCANassets/Icons/SCAN_Color_Icon.dds deleted file mode 100644 index 5c8f0dbde..000000000 Binary files a/SCANassets/Icons/SCAN_Color_Icon.dds and /dev/null differ diff --git a/SCANassets/Icons/SCAN_Flag_Icon.dds b/SCANassets/Icons/SCAN_Flag_Icon.dds deleted file mode 100644 index 926cb0c68..000000000 Binary files a/SCANassets/Icons/SCAN_Flag_Icon.dds and /dev/null differ diff --git a/SCANassets/Icons/SCAN_Grid_Icon.dds b/SCANassets/Icons/SCAN_Grid_Icon.dds deleted file mode 100644 index 5c9e451a8..000000000 Binary files a/SCANassets/Icons/SCAN_Grid_Icon.dds and /dev/null differ diff --git a/SCANassets/Icons/SCAN_Instrument_Icon.dds b/SCANassets/Icons/SCAN_Instrument_Icon.dds deleted file mode 100644 index a39a66a14..000000000 Binary files a/SCANassets/Icons/SCAN_Instrument_Icon.dds and /dev/null differ diff --git a/SCANassets/Icons/SCAN_Legend_Icon.dds b/SCANassets/Icons/SCAN_Legend_Icon.dds deleted file mode 100644 index 6740d79aa..000000000 Binary files a/SCANassets/Icons/SCAN_Legend_Icon.dds and /dev/null differ diff --git a/SCANassets/Icons/SCAN_MechJebIcon.dds b/SCANassets/Icons/SCAN_MechJebIcon.dds deleted file mode 100644 index 3392e3dcd..000000000 Binary files a/SCANassets/Icons/SCAN_MechJebIcon.dds and /dev/null differ diff --git a/SCANassets/Icons/SCAN_Orbit_Icon.dds b/SCANassets/Icons/SCAN_Orbit_Icon.dds deleted file mode 100644 index 444c91c0c..000000000 Binary files a/SCANassets/Icons/SCAN_Orbit_Icon.dds and /dev/null differ diff --git a/SCANassets/Icons/SCAN_Overlay_Icon.dds b/SCANassets/Icons/SCAN_Overlay_Icon.dds deleted file mode 100644 index 78ab017f0..000000000 Binary files a/SCANassets/Icons/SCAN_Overlay_Icon.dds and /dev/null differ diff --git a/SCANassets/Icons/SCAN_Refresh_Icon.dds b/SCANassets/Icons/SCAN_Refresh_Icon.dds deleted file mode 100644 index 002504b4a..000000000 Binary files a/SCANassets/Icons/SCAN_Refresh_Icon.dds and /dev/null differ diff --git a/SCANassets/Icons/SCAN_Resize_Icon.dds b/SCANassets/Icons/SCAN_Resize_Icon.dds deleted file mode 100644 index 6de7b42c8..000000000 Binary files a/SCANassets/Icons/SCAN_Resize_Icon.dds and /dev/null differ diff --git a/SCANassets/Icons/SCAN_Resource_Icon.dds b/SCANassets/Icons/SCAN_Resource_Icon.dds deleted file mode 100644 index d849b970c..000000000 Binary files a/SCANassets/Icons/SCAN_Resource_Icon.dds and /dev/null differ diff --git a/SCANassets/Icons/SCAN_Screenshot_Icon.dds b/SCANassets/Icons/SCAN_Screenshot_Icon.dds deleted file mode 100644 index b7190af73..000000000 Binary files a/SCANassets/Icons/SCAN_Screenshot_Icon.dds and /dev/null differ diff --git a/SCANassets/Icons/SCAN_Settings_Icon.dds b/SCANassets/Icons/SCAN_Settings_Icon.dds deleted file mode 100644 index fed086da6..000000000 Binary files a/SCANassets/Icons/SCAN_Settings_Icon.dds and /dev/null differ diff --git a/SCANassets/Icons/SCAN_TargetIcon.dds b/SCANassets/Icons/SCAN_TargetIcon.dds deleted file mode 100644 index 97a4cfeb4..000000000 Binary files a/SCANassets/Icons/SCAN_TargetIcon.dds and /dev/null differ diff --git a/SCANassets/Icons/SCAN_WayPointIcon.dds b/SCANassets/Icons/SCAN_WayPointIcon.dds deleted file mode 100644 index a7c668fe3..000000000 Binary files a/SCANassets/Icons/SCAN_WayPointIcon.dds and /dev/null differ diff --git a/SCANassets/Icons/SCAN_ZoomInIcon.dds b/SCANassets/Icons/SCAN_ZoomInIcon.dds deleted file mode 100644 index f813096cd..000000000 Binary files a/SCANassets/Icons/SCAN_ZoomInIcon.dds and /dev/null differ diff --git a/SCANassets/Icons/SCAN_ZoomOutIcon.dds b/SCANassets/Icons/SCAN_ZoomOutIcon.dds deleted file mode 100644 index 4a0b385d9..000000000 Binary files a/SCANassets/Icons/SCAN_ZoomOutIcon.dds and /dev/null differ diff --git a/SCANassets/Icons/SCAN_Zoom_Map_Icon.dds b/SCANassets/Icons/SCAN_Zoom_Map_Icon.dds deleted file mode 100644 index 0b6830983..000000000 Binary files a/SCANassets/Icons/SCAN_Zoom_Map_Icon.dds and /dev/null differ diff --git a/SCANassets/MM_Parts/SCANsat_Resource_Scanner.cfg b/SCANassets/MM_Parts/SCANsat_Resource_Scanner.cfg index 215f58f51..5809c1c6c 100644 --- a/SCANassets/MM_Parts/SCANsat_Resource_Scanner.cfg +++ b/SCANassets/MM_Parts/SCANsat_Resource_Scanner.cfg @@ -71,6 +71,12 @@ rate = 0.5 } } + + MODULE + { + name = SCANexperiment + experimentType = SCANsatResources + } } @PART[Magnetometer]:FOR[SCANsat]:NEEDS[Launchpad] @@ -125,11 +131,11 @@ } } -@PART[OrbitalScanner]:FOR[SCANsat]:NEEDS[KolonyTools] +@PART[OrbitalScanner]:FOR[SCANsat]:NEEDS[KolonyTools,CommunityResourcePack] { @MODULE[ModuleSCANresourceScanner] { - @sensorType += 32613504 + @sensorType += 301048960 @scanName = Resource Scan } @@ -175,6 +181,13 @@ ResourceName = Hydrates } + MODULE + { + name = SCANresourceDisplay + sensorType = 268435456 + ResourceName = Silicates + } + MODULE { name = SCANresourceDisplay @@ -204,7 +217,7 @@ } } -@PART[SurfaceScanner]:FOR[SCANsat]:NEEDS[KolonyTools] +@PART[SurfaceScanner]:FOR[SCANsat]:NEEDS[KolonyTools,CommunityResourcePack] { MODULE @@ -249,6 +262,13 @@ ResourceName = Hydrates } + MODULE + { + name = SCANresourceDisplay + sensorType = 268435456 + ResourceName = Silicates + } + MODULE { name = SCANresourceDisplay @@ -278,7 +298,7 @@ } } -@PART[KA_DetectionArray_01]:FOR[SCANsat]:NEEDS[Karbonite] +@PART[KA_DetectionArray_01]:FOR[SCANsat]:NEEDS[Karbonite,CommunityResourcePack] { MODULE { @@ -304,7 +324,7 @@ } } -@PART[OrbitalScanner]:FOR[SCANsat]:NEEDS[WarpPlugin,!KolonyTools] +@PART[OrbitalScanner]:FOR[SCANsat]:NEEDS[WarpPlugin,CommunityResourcePack,!KolonyTools] { @MODULE[ModuleSCANresourceScanner] { @@ -376,11 +396,11 @@ } } -@PART[OrbitalScanner]:FOR[SCANsat]:NEEDS[WarpPlugin,KolonyTools] +@PART[OrbitalScanner]:FOR[SCANsat]:NEEDS[WarpPlugin,KolonyTools,CommunityResourcePack] { @MODULE[ModuleSCANresourceScanner] { - @sensorType += 436214272 + @sensorType += 437272064 } MODULE @@ -411,13 +431,6 @@ ResourceName = SaltWater } - MODULE - { - name = SCANresourceDisplay - sensorType = 268435456 - ResourceName = Silicates - } - MODULE { name = SCANresourceDisplay diff --git a/SCANassets/Parts/BTDT/BTDT.cfg b/SCANassets/Parts/BTDT/BTDT.cfg index fece1ffee..ae6912161 100644 --- a/SCANassets/Parts/BTDT/BTDT.cfg +++ b/SCANassets/Parts/BTDT/BTDT.cfg @@ -21,8 +21,7 @@ category = Science subcategory = 0 title = SCAN Been There Done That® manufacturer = SCAN: Scientific Committee on Advanced Navigation -description = This small sensor can automatically identify nearby anomalies. Since it only works over very short distances and at very low altitudes, it's primarily useful to track identified anomalies that have been visited. - +description = #autoLOC_SCANsat_BTDT mass = 0.03 dragModelType = default @@ -41,7 +40,7 @@ MODULE min_alt = 0 max_alt = 2000 best_alt = 0 - scanName = BTDT Scan + scanName = BTDT RESOURCE { name = ElectricCharge diff --git a/SCANassets/Parts/MULTI/MULTI.cfg b/SCANassets/Parts/MULTI/MULTI.cfg index bf0401e06..923df9933 100644 --- a/SCANassets/Parts/MULTI/MULTI.cfg +++ b/SCANassets/Parts/MULTI/MULTI.cfg @@ -21,7 +21,7 @@ category = Science subcategory = 0 title = SCAN Multispectral Sensor manufacturer = SCAN: Scientific Committee on Advanced Navigation -description = This multichannel sensor detects radiation across several infrared, visible light, and RADAR bands. This gives it the capability to differentiate between terrain types and biomes. It can also detect anomalies such as structures on the ground. +description = #autoLOC_SCANsat_Multi mass = 0.03 dragModelType = default @@ -32,20 +32,26 @@ maxTemp = 1200 emissiveConstant = 0.95 thermalMassModifier = 4.0 -MODULE -{ - name = SCANsat - sensorType = 24 //2^3 + 2^4 - fov = 4 - min_alt = 5000 - max_alt = 500000 - best_alt = 250000 - scanName = Multispectral Scan - animationName = Multi_Antenna - RESOURCE - { - name = ElectricCharge - rate = 1 - } -} + MODULE + { + name = SCANsat + sensorType = 24 //2^3 + 2^4 + fov = 4 + min_alt = 5000 + max_alt = 500000 + best_alt = 250000 + scanName = Multispectral + animationName = Multi_Antenna + RESOURCE + { + name = ElectricCharge + rate = 1 + } + } + + MODULE + { + name = SCANexperiment + experimentType = SCANsatBiomeAnomaly + } } diff --git a/SCANassets/Parts/RADAR/RADAR.cfg b/SCANassets/Parts/RADAR/RADAR.cfg index 8fcc3f5ed..2204db9c1 100644 --- a/SCANassets/Parts/RADAR/RADAR.cfg +++ b/SCANassets/Parts/RADAR/RADAR.cfg @@ -23,7 +23,7 @@ category = Science subcategory = 0 title = SCAN RADAR Altimetry Sensor manufacturer = SCAN: Scientific Committee on Advanced Navigation -description = SCAN brings you this high performance RADAR altimetry sensor. This is the entry-level model in this sensor family, and commonly sold in a bundle with toy rockets and remote-controlled model planes. After focus group testing revealed that 95% of the target audience tried to duct tape it to the exhaust pipe of their rocket engines, this new and improved model has been made even easier to use. +description = #autoLOC_SCANsat_Radar mass = 0.03 dragModelType = default @@ -34,20 +34,26 @@ maxTemp = 1200 emissiveConstant = 0.95 thermalMassModifier = 4.0 -MODULE -{ - name = SCANsat - sensorType = 1 //2^0 - fov = 5 - min_alt = 5000 - max_alt = 500000 - best_alt = 5000 - scanName = RADAR Scan - animationName = Collapse_Antenna - RESOURCE - { - name = ElectricCharge - rate = 0.1 - } -} + MODULE + { + name = SCANsat + sensorType = 1 //2^0 + fov = 5 + min_alt = 5000 + max_alt = 500000 + best_alt = 5000 + scanName = RADAR + animationName = Collapse_Antenna + RESOURCE + { + name = ElectricCharge + rate = 0.1 + } + } + + MODULE + { + name = SCANexperiment + experimentType = SCANsatAltimetryLoRes + } } diff --git a/SCANassets/Parts/SAR/SAR.cfg b/SCANassets/Parts/SAR/SAR.cfg index eee07e3a7..25692c319 100644 --- a/SCANassets/Parts/SAR/SAR.cfg +++ b/SCANassets/Parts/SAR/SAR.cfg @@ -21,7 +21,7 @@ category = Science subcategory = 0 title = SCAN SAR Altimetry Sensor manufacturer = SCAN: Scientific Committee on Advanced Navigation -description = This Synthetic Aperture RADAR sensor uses its flight path to simulate a much larger antenna. This makes it possible to detect terrain elevation at much higher resolution. The downside is that its field of view is comparatively small, and it works better at higher altitudes. +description = #autoLOC_SCANsat_SAR mass = 0.03 dragModelType = default @@ -32,20 +32,26 @@ maxTemp = 1200 emissiveConstant = 0.95 thermalMassModifier = 4.0 -MODULE -{ - name = SCANsat - sensorType = 2 //2^1 - fov = 2 - min_alt = 5000 - max_alt = 800000 - best_alt = 750000 - scanName = SAR Scan - animationName = Antenna - RESOURCE - { - name = ElectricCharge - rate = 1.5 - } -} + MODULE + { + name = SCANsat + sensorType = 2 //2^1 + fov = 2 + min_alt = 5000 + max_alt = 800000 + best_alt = 750000 + scanName = SAR + animationName = Antenna + RESOURCE + { + name = ElectricCharge + rate = 1.5 + } + } + + MODULE + { + name = SCANexperiment + experimentType = SCANsatAltimetryHiRes + } } diff --git a/SCANassets/PluginData/Settings.cfg b/SCANassets/PluginData/Settings.cfg new file mode 100644 index 000000000..2e53bd0e1 --- /dev/null +++ b/SCANassets/PluginData/Settings.cfg @@ -0,0 +1,50 @@ +SCAN_Settings_Config +{ + BackgroundScanning = True + TimeWarpResolution = 15 + ShowGroundTracks = True + GroundTracksActiveOnly = True + MechJebTarget = False + MechJebTargetLoad = False + OverlayTooltips = True + WindowTooltips = True + LegendTooltips = True + StockToolbar = True + ToolbarMenu = True + StockUIStyle = False + MapGenerationSpeed = 2 + UIScale = 1 + BiomeLock = True + RequireNarrowBand = True + DisableStockResource = False + InstantScan = True + UseStockTreshold = True + StockTreshold = 0.899999976 + Interpolation = 8 + ResourceMapHeight = 256 + BiomeMapHeight = 512 + CoverageTransparency = 0.200000003 + TrueGreyScale = False + ExportCSV = False + BiomeTransparency = 0.400000006 + BigMapBiomeBorder = False + BigMapStockBiomes = True + ZoomMapBiomeBorder = True + SmallMapBiomeBorder = False + SmallMapStockBiomes = True + LowBiomeColor = 0.321568608,0.396078408,0.145098001,1 + HighBiomeColor = 0.988235295,0.752941191,0.0235294104,1 + SlopeCutoff = 1 + BottomLowSlopeColor = 0.603921592,0.68235302,0.0274509806,1 + BottomHighSlopeColor = 0.992156923,1,0.321568608,1 + TopLowSlopeColor = 0.992156923,1,0.321568608,1 + TopHighSlopeColor = 0.992156923,0.254902005,0.117647097,1 + CheatMapFill = False + BigMapWidth = 720 + ZoomMapWidth = 240 + BigMapPosition = 400,-400 + MainMapPosition = 100,-200 + ZoomMapPosition = 400,-400 + InstrumentsPosition = 100,-500 + OverlayPosition = 600,-200 +} diff --git a/SCANassets/Resources/KSPedia/Adv Scanning.png b/SCANassets/Resources/KSPedia/Adv Scanning.png new file mode 100644 index 000000000..bcc22148d Binary files /dev/null and b/SCANassets/Resources/KSPedia/Adv Scanning.png differ diff --git a/SCANassets/Resources/KSPedia/Advanced image.png b/SCANassets/Resources/KSPedia/Advanced image.png deleted file mode 100644 index 47446391e..000000000 Binary files a/SCANassets/Resources/KSPedia/Advanced image.png and /dev/null differ diff --git a/SCANassets/Resources/KSPedia/Basic image_2.png b/SCANassets/Resources/KSPedia/Basic image_2.png deleted file mode 100644 index 08648a5d4..000000000 Binary files a/SCANassets/Resources/KSPedia/Basic image_2.png and /dev/null differ diff --git a/SCANassets/Resources/KSPedia/Basic.png b/SCANassets/Resources/KSPedia/Basic.png new file mode 100644 index 000000000..a340e2251 Binary files /dev/null and b/SCANassets/Resources/KSPedia/Basic.png differ diff --git a/SCANassets/Resources/KSPedia/Big Map Legend.png b/SCANassets/Resources/KSPedia/Big Map Legend.png new file mode 100644 index 000000000..a9ce848c1 Binary files /dev/null and b/SCANassets/Resources/KSPedia/Big Map Legend.png differ diff --git a/SCANassets/Resources/KSPedia/Biome Color Full.png b/SCANassets/Resources/KSPedia/Biome Color Full.png new file mode 100644 index 000000000..d59b0fabd Binary files /dev/null and b/SCANassets/Resources/KSPedia/Biome Color Full.png differ diff --git a/SCANassets/Resources/KSPedia/Biome Color Image.png b/SCANassets/Resources/KSPedia/Biome Color Image.png deleted file mode 100644 index 04c843a6d..000000000 Binary files a/SCANassets/Resources/KSPedia/Biome Color Image.png and /dev/null differ diff --git a/SCANassets/Resources/KSPedia/Colors Image Full.png b/SCANassets/Resources/KSPedia/Colors Image Full.png new file mode 100644 index 000000000..f9e6b349a Binary files /dev/null and b/SCANassets/Resources/KSPedia/Colors Image Full.png differ diff --git a/SCANassets/Resources/KSPedia/Colors Image.png b/SCANassets/Resources/KSPedia/Colors Image.png deleted file mode 100644 index e2c12c184..000000000 Binary files a/SCANassets/Resources/KSPedia/Colors Image.png and /dev/null differ diff --git a/SCANassets/Resources/KSPedia/Features Image_2.png b/SCANassets/Resources/KSPedia/Features Image_2.png deleted file mode 100644 index f8b65adfd..000000000 Binary files a/SCANassets/Resources/KSPedia/Features Image_2.png and /dev/null differ diff --git a/SCANassets/Resources/KSPedia/Features.png b/SCANassets/Resources/KSPedia/Features.png new file mode 100644 index 000000000..8bc9df89a Binary files /dev/null and b/SCANassets/Resources/KSPedia/Features.png differ diff --git a/SCANassets/Resources/KSPedia/Header.png b/SCANassets/Resources/KSPedia/Header.png new file mode 100644 index 000000000..14d12fc0e Binary files /dev/null and b/SCANassets/Resources/KSPedia/Header.png differ diff --git a/SCANassets/Resources/KSPedia/Intro.png b/SCANassets/Resources/KSPedia/Intro.png new file mode 100644 index 000000000..063cee48c Binary files /dev/null and b/SCANassets/Resources/KSPedia/Intro.png differ diff --git a/SCANassets/Resources/KSPedia/Main Map Legend.png b/SCANassets/Resources/KSPedia/Main Map Legend.png new file mode 100644 index 000000000..7b408d73e Binary files /dev/null and b/SCANassets/Resources/KSPedia/Main Map Legend.png differ diff --git a/SCANassets/Resources/KSPedia/Parts Image_4.png b/SCANassets/Resources/KSPedia/Parts.png similarity index 99% rename from SCANassets/Resources/KSPedia/Parts Image_4.png rename to SCANassets/Resources/KSPedia/Parts.png index 604425095..127053913 100644 Binary files a/SCANassets/Resources/KSPedia/Parts Image_4.png and b/SCANassets/Resources/KSPedia/Parts.png differ diff --git a/SCANassets/Resources/KSPedia/RPM Image.png b/SCANassets/Resources/KSPedia/RPM Image.png new file mode 100644 index 000000000..8e5530633 Binary files /dev/null and b/SCANassets/Resources/KSPedia/RPM Image.png differ diff --git a/SCANassets/Resources/KSPedia/RPM Image_2.png b/SCANassets/Resources/KSPedia/RPM Image_2.png deleted file mode 100644 index b8e87049e..000000000 Binary files a/SCANassets/Resources/KSPedia/RPM Image_2.png and /dev/null differ diff --git a/SCANassets/Resources/KSPedia/Resource Color Full.png b/SCANassets/Resources/KSPedia/Resource Color Full.png new file mode 100644 index 000000000..d5a57ee83 Binary files /dev/null and b/SCANassets/Resources/KSPedia/Resource Color Full.png differ diff --git a/SCANassets/Resources/KSPedia/Resource Color Image.png b/SCANassets/Resources/KSPedia/Resource Color Image.png deleted file mode 100644 index bd3a1af96..000000000 Binary files a/SCANassets/Resources/KSPedia/Resource Color Image.png and /dev/null differ diff --git a/SCANassets/Resources/KSPedia/Resource Header Image.png b/SCANassets/Resources/KSPedia/Resource Header Image.png deleted file mode 100644 index 35722b847..000000000 Binary files a/SCANassets/Resources/KSPedia/Resource Header Image.png and /dev/null differ diff --git a/SCANassets/Resources/KSPedia/Resource Header.png b/SCANassets/Resources/KSPedia/Resource Header.png new file mode 100644 index 000000000..d9e633fa6 Binary files /dev/null and b/SCANassets/Resources/KSPedia/Resource Header.png differ diff --git a/SCANassets/Resources/KSPedia/Resource Overlay Image.png b/SCANassets/Resources/KSPedia/Resource Overlay Image.png deleted file mode 100644 index 4ffb79455..000000000 Binary files a/SCANassets/Resources/KSPedia/Resource Overlay Image.png and /dev/null differ diff --git a/SCANassets/Resources/KSPedia/Resource Overlay.png b/SCANassets/Resources/KSPedia/Resource Overlay.png new file mode 100644 index 000000000..8d566d471 Binary files /dev/null and b/SCANassets/Resources/KSPedia/Resource Overlay.png differ diff --git a/SCANassets/Resources/KSPedia/Resource Parts Image_2.png b/SCANassets/Resources/KSPedia/Resource Parts Image_2.png deleted file mode 100644 index f914c9008..000000000 Binary files a/SCANassets/Resources/KSPedia/Resource Parts Image_2.png and /dev/null differ diff --git a/SCANassets/Resources/KSPedia/Resource Parts.png b/SCANassets/Resources/KSPedia/Resource Parts.png new file mode 100644 index 000000000..99e05f963 Binary files /dev/null and b/SCANassets/Resources/KSPedia/Resource Parts.png differ diff --git a/SCANassets/Resources/KSPedia/Resource Settings Image.png b/SCANassets/Resources/KSPedia/Resource Settings Image.png deleted file mode 100644 index 120d82c03..000000000 Binary files a/SCANassets/Resources/KSPedia/Resource Settings Image.png and /dev/null differ diff --git a/SCANassets/Resources/KSPedia/Resource Settings.png b/SCANassets/Resources/KSPedia/Resource Settings.png new file mode 100644 index 000000000..94ecfedb9 Binary files /dev/null and b/SCANassets/Resources/KSPedia/Resource Settings.png differ diff --git a/SCANassets/Resources/KSPedia/Resource Tools image_2.png b/SCANassets/Resources/KSPedia/Resource Tools image_2.png deleted file mode 100644 index c1a663256..000000000 Binary files a/SCANassets/Resources/KSPedia/Resource Tools image_2.png and /dev/null differ diff --git a/SCANassets/Resources/KSPedia/Resource Tools.png b/SCANassets/Resources/KSPedia/Resource Tools.png new file mode 100644 index 000000000..d834d2bb1 Binary files /dev/null and b/SCANassets/Resources/KSPedia/Resource Tools.png differ diff --git a/SCANassets/Resources/KSPedia/SCANsat_Advanced.prefab b/SCANassets/Resources/KSPedia/SCANsat_Advanced.prefab index efaf485ba..2fc45bb90 100644 Binary files a/SCANassets/Resources/KSPedia/SCANsat_Advanced.prefab and b/SCANassets/Resources/KSPedia/SCANsat_Advanced.prefab differ diff --git a/SCANassets/Resources/KSPedia/SCANsat_Basic.prefab b/SCANassets/Resources/KSPedia/SCANsat_Basic.prefab index 6c8231913..3f1797cab 100644 Binary files a/SCANassets/Resources/KSPedia/SCANsat_Basic.prefab and b/SCANassets/Resources/KSPedia/SCANsat_Basic.prefab differ diff --git a/SCANassets/Resources/KSPedia/SCANsat_Big_Map.prefab b/SCANassets/Resources/KSPedia/SCANsat_Big_Map.prefab new file mode 100644 index 000000000..c9662bdc3 Binary files /dev/null and b/SCANassets/Resources/KSPedia/SCANsat_Big_Map.prefab differ diff --git a/SCANassets/Resources/KSPedia/SCANsat_Colors.prefab b/SCANassets/Resources/KSPedia/SCANsat_Colors.prefab index 1356ac584..ccda9a38b 100644 Binary files a/SCANassets/Resources/KSPedia/SCANsat_Colors.prefab and b/SCANassets/Resources/KSPedia/SCANsat_Colors.prefab differ diff --git a/SCANassets/Resources/KSPedia/SCANsat_Colors_Biome.prefab b/SCANassets/Resources/KSPedia/SCANsat_Colors_Biome.prefab index 607477688..c4ae2253a 100644 Binary files a/SCANassets/Resources/KSPedia/SCANsat_Colors_Biome.prefab and b/SCANassets/Resources/KSPedia/SCANsat_Colors_Biome.prefab differ diff --git a/SCANassets/Resources/KSPedia/SCANsat_Colors_Resources.prefab b/SCANassets/Resources/KSPedia/SCANsat_Colors_Resources.prefab index 93be64001..070ef3786 100644 Binary files a/SCANassets/Resources/KSPedia/SCANsat_Colors_Resources.prefab and b/SCANassets/Resources/KSPedia/SCANsat_Colors_Resources.prefab differ diff --git a/SCANassets/Resources/KSPedia/SCANsat_Colors_Slope.prefab b/SCANassets/Resources/KSPedia/SCANsat_Colors_Slope.prefab index e2ad44677..fb472af45 100644 Binary files a/SCANassets/Resources/KSPedia/SCANsat_Colors_Slope.prefab and b/SCANassets/Resources/KSPedia/SCANsat_Colors_Slope.prefab differ diff --git a/SCANassets/Resources/KSPedia/SCANsat_Colors_Terrain.prefab b/SCANassets/Resources/KSPedia/SCANsat_Colors_Terrain.prefab index edafe1710..fab03b233 100644 Binary files a/SCANassets/Resources/KSPedia/SCANsat_Colors_Terrain.prefab and b/SCANassets/Resources/KSPedia/SCANsat_Colors_Terrain.prefab differ diff --git a/SCANassets/Resources/KSPedia/SCANsat_Features.prefab b/SCANassets/Resources/KSPedia/SCANsat_Features.prefab index 111ba777d..53061cce7 100644 Binary files a/SCANassets/Resources/KSPedia/SCANsat_Features.prefab and b/SCANassets/Resources/KSPedia/SCANsat_Features.prefab differ diff --git a/SCANassets/Resources/KSPedia/SCANsat_Header.prefab b/SCANassets/Resources/KSPedia/SCANsat_Header.prefab index 841f5318d..bd0cb6627 100644 Binary files a/SCANassets/Resources/KSPedia/SCANsat_Header.prefab and b/SCANassets/Resources/KSPedia/SCANsat_Header.prefab differ diff --git a/SCANassets/Resources/KSPedia/SCANsat_Intro.prefab b/SCANassets/Resources/KSPedia/SCANsat_Intro.prefab index 7510b3671..983adf05e 100644 Binary files a/SCANassets/Resources/KSPedia/SCANsat_Intro.prefab and b/SCANassets/Resources/KSPedia/SCANsat_Intro.prefab differ diff --git a/SCANassets/Resources/KSPedia/SCANsat_Main_Map.prefab b/SCANassets/Resources/KSPedia/SCANsat_Main_Map.prefab new file mode 100644 index 000000000..3fb732a58 Binary files /dev/null and b/SCANassets/Resources/KSPedia/SCANsat_Main_Map.prefab differ diff --git a/SCANassets/Resources/KSPedia/SCANsat_Parts.prefab b/SCANassets/Resources/KSPedia/SCANsat_Parts.prefab index 427ce59f9..53fc265a8 100644 Binary files a/SCANassets/Resources/KSPedia/SCANsat_Parts.prefab and b/SCANassets/Resources/KSPedia/SCANsat_Parts.prefab differ diff --git a/SCANassets/Resources/KSPedia/SCANsat_RPM.prefab b/SCANassets/Resources/KSPedia/SCANsat_RPM.prefab index 394e3c713..3ddc327ce 100644 Binary files a/SCANassets/Resources/KSPedia/SCANsat_RPM.prefab and b/SCANassets/Resources/KSPedia/SCANsat_RPM.prefab differ diff --git a/SCANassets/Resources/KSPedia/SCANsat_Resource_Overlay.prefab b/SCANassets/Resources/KSPedia/SCANsat_Resource_Overlay.prefab index a32f8df2b..d07f62fe0 100644 Binary files a/SCANassets/Resources/KSPedia/SCANsat_Resource_Overlay.prefab and b/SCANassets/Resources/KSPedia/SCANsat_Resource_Overlay.prefab differ diff --git a/SCANassets/Resources/KSPedia/SCANsat_Resource_Parts.prefab b/SCANassets/Resources/KSPedia/SCANsat_Resource_Parts.prefab index 18e8bd1ed..954ca2ad4 100644 Binary files a/SCANassets/Resources/KSPedia/SCANsat_Resource_Parts.prefab and b/SCANassets/Resources/KSPedia/SCANsat_Resource_Parts.prefab differ diff --git a/SCANassets/Resources/KSPedia/SCANsat_Resource_Settings.prefab b/SCANassets/Resources/KSPedia/SCANsat_Resource_Settings.prefab index 98f9af461..f2488da07 100644 Binary files a/SCANassets/Resources/KSPedia/SCANsat_Resource_Settings.prefab and b/SCANassets/Resources/KSPedia/SCANsat_Resource_Settings.prefab differ diff --git a/SCANassets/Resources/KSPedia/SCANsat_Resource_Tools.prefab b/SCANassets/Resources/KSPedia/SCANsat_Resource_Tools.prefab index 2e276c10d..abef29502 100644 Binary files a/SCANassets/Resources/KSPedia/SCANsat_Resource_Tools.prefab and b/SCANassets/Resources/KSPedia/SCANsat_Resource_Tools.prefab differ diff --git a/SCANassets/Resources/KSPedia/SCANsat_Resources.prefab b/SCANassets/Resources/KSPedia/SCANsat_Resources.prefab index cf94d0590..e47da38f4 100644 Binary files a/SCANassets/Resources/KSPedia/SCANsat_Resources.prefab and b/SCANassets/Resources/KSPedia/SCANsat_Resources.prefab differ diff --git a/SCANassets/Resources/KSPedia/SCANsat_Zoom_Map.prefab b/SCANassets/Resources/KSPedia/SCANsat_Zoom_Map.prefab new file mode 100644 index 000000000..f3e0ec7fd Binary files /dev/null and b/SCANassets/Resources/KSPedia/SCANsat_Zoom_Map.prefab differ diff --git a/SCANassets/Resources/KSPedia/Slope Color Full.png b/SCANassets/Resources/KSPedia/Slope Color Full.png new file mode 100644 index 000000000..f920ec56a Binary files /dev/null and b/SCANassets/Resources/KSPedia/Slope Color Full.png differ diff --git a/SCANassets/Resources/KSPedia/Slope Color Image.png b/SCANassets/Resources/KSPedia/Slope Color Image.png deleted file mode 100644 index 2896bc049..000000000 Binary files a/SCANassets/Resources/KSPedia/Slope Color Image.png and /dev/null differ diff --git a/SCANassets/Resources/KSPedia/Terrain Color Full.png b/SCANassets/Resources/KSPedia/Terrain Color Full.png new file mode 100644 index 000000000..526d5057a Binary files /dev/null and b/SCANassets/Resources/KSPedia/Terrain Color Full.png differ diff --git a/SCANassets/Resources/KSPedia/Terrain Color Image.png b/SCANassets/Resources/KSPedia/Terrain Color Image.png deleted file mode 100644 index 75aa6ebde..000000000 Binary files a/SCANassets/Resources/KSPedia/Terrain Color Image.png and /dev/null differ diff --git a/SCANassets/Resources/KSPedia/Zoom map.png b/SCANassets/Resources/KSPedia/Zoom map.png new file mode 100644 index 000000000..673fc1dd3 Binary files /dev/null and b/SCANassets/Resources/KSPedia/Zoom map.png differ diff --git a/SCANassets/Resources/KSPedia/header image.png b/SCANassets/Resources/KSPedia/header image.png deleted file mode 100644 index 257f38cd8..000000000 Binary files a/SCANassets/Resources/KSPedia/header image.png and /dev/null differ diff --git a/SCANassets/Resources/KSPedia/intro image.png b/SCANassets/Resources/KSPedia/intro image.png deleted file mode 100644 index 353e8c872..000000000 Binary files a/SCANassets/Resources/KSPedia/intro image.png and /dev/null differ diff --git a/SCANassets/Resources/KSPedia/scansat.ksp b/SCANassets/Resources/KSPedia/scansat.ksp index 01dd8cb73..cb8cf5696 100644 Binary files a/SCANassets/Resources/KSPedia/scansat.ksp and b/SCANassets/Resources/KSPedia/scansat.ksp differ diff --git a/SCANassets/Resources/Localization/Helptips.cfg b/SCANassets/Resources/Localization/Helptips.cfg new file mode 100644 index 000000000..2e9f106ff --- /dev/null +++ b/SCANassets/Resources/Localization/Helptips.cfg @@ -0,0 +1,298 @@ +Localization +{ + en-us + { + #autoLOC_SCANsat_settingsHelpScanningToggle = Toggle all SCANsat scanning. + #autoLOC_SCANsat_settingsHelpBackground = Toggle background scanning on\nselected celestial bodies. + #autoLOC_SCANsat_settingsHelpTimeWarp = Adjust the scanning frequency during TimeWarp.\nHigher settings result in fewer gaps in the maps\nbut may have a performance impact at high TimeWarp. + #autoLOC_SCANsat_settingsHelpGroundTracks = Display a visible indicator of\nscanning activity in map mode. + #autoLOC_SCANsat_settingsHelpGroundTracksActive = The ground track indicator can be limited\nto only be displayed for the active vessel. + #autoLOC_SCANsat_settingsHelpStockUIStyle = Switch between stock KSP-style UI elements and Unity-style elements. + #autoLOC_SCANsat_settingsHelpOverlayTooltips = Displays tooltips for the current mouse position when a planetary overlay map is activated.\nThese tooltips include The cursor coordinates, terrain height, slope, biome name,\nand resource abundance, depending on scanning coverage. + #autoLOC_SCANsat_settingsHelpWindowTooltips = Display tooltips on some map window buttons.\nThese are primarily used to identify icon buttons. + #autoLOC_SCANsat_settingsHelpLegendTooltips = Display tooltips on the map legend.\nDisabling will also disable biome map legends. + #autoLOC_SCANsat_settingsHelpStockToolbar = Use the stock toolbar.\nCan be used concurrently with the Blizzy78 Toolbar. + #autoLOC_SCANsat_settingsHelpToolbarMenu = Use a pop-out menu for the stock toolbar to show all available windows. + #autoLOC_SCANsat_settingsHelpMechJeb = The SCANsat zoom map and big map waypoint selection modes\ncan be used to select a MechJeb landing site. + #autoLOC_SCANsat_settingsHelpMechJebLoad = Load a saved MechJeb landing target.\nThis only works while in the flight scene with a valid MechJeb vessel. + #autoLOC_SCANsat_settingsHelpMapGenSpeed = Adjust all SCANsat map generation speeds.\nLower values will save CPU resources and may reduce the\nperformance impact of generating maps. + #autoLOC_SCANsat_settingsHelpResetWindows = Reset all window positions and scale.\nUse this in case a window has been dragged completely\noff screen or if any windows are not visible. + #autoLOC_SCANsat_settingsHelpResetPlanetData = Resets the selected SCANsat data for the current celestial body.\nA confirmation window will open before activating.\nCannot be reversed. + #autoLOC_SCANsat_settingsHelpResetAllData = Resets the selected SCANsat data for all celestial bodies.\nA confirmation window will open before activating.\nCannot be reversed. + #autoLOC_SCANsat_settingsHelpVesselsSensorsPasses = Information about the currently active SCANsat sensors.\nVessels indicates the number of vessels with active sensors.\nSensors indicates the total number of sensors;\ninstruments with multiple sensor types count each individual sensor.\nPasses indicates the number of sensor updates performed per second.\nThis value is affected by the TimeWarp Resolution setting. + #autoLOC_SCANsat_settingsHelpGreyScale = Use a true grey-scale color spectrum for black-and-white SCANsat maps.\nPixels on the altitude map will interpolate between black and white;\nthe min and max terrain heights for each celestial body define the limits. + #autoLOC_SCANsat_settingsHelpExportCSV = Export a .csv file along with map texture when using the Export button on the big map.\nThe file contains coordinates and the terrain height for each pixel.\nPixels are labeled from left to right and from top to bottom. + #autoLOC_SCANsat_settingsHelpSetMapWidth = Enter an exact value for the SCANsat big map texture width.\nValues are limited to 550 - 8192 pixels wide.\nPress the Set button to apply the value. + #autoLOC_SCANsat_settingsHelpWindowScale = Adjust all SCANsat window scales. + #autoLOC_SCANsat_settingsHelpFillPlanet = Fill in the selected SCANsat data for the current celestial body. + #autoLOC_SCANsat_settingsHelpFillAll = Fill in the selected SCANsat data for all celestial bodies. + #autoLOC_SCANsat_resourceSettingsHelpBiomeLock = Circumvents the requirement for stock surface biome scans.\nSCANsat displays will show the full accuracy for resource\nabundance with or without any surface biome scans. + #autoLOC_SCANsat_resourceSettingsHelpInstant = By default, the stock M700 resource scanner's orbital survey will fill in all SCANsat resource maps.\nThis can be disabled, requiring standard SCANsat methods for all resource scanning.\nDisabled automatically when stock resource scanning is disabled. + #autoLOC_SCANsat_resourceSettingsHelpNarrowBand = Numerous SCANsat functions require a Narrow-Band resource scanner on-board\nthe current vessel or in orbit of a celestial body for fully accurate resource abundance data.\nDisable this to circumvent these restrictions. + #autoLOC_SCANsat_resourceSettingsHelpDisableStock = Disables all stock resource scanning functions.\nSCANsat scanning methods will be required for all resource data.\nReplaces several stock resource functions with SCANsat tools.\nThese include The right-click readouts, and the planetary overlay maps. + #autoLOC_SCANsat_resourceSettingsHelpResetStockResource = Resets the stock resource scanning coverage for the current celestial body.\nA reload or scene change may be required for all changes to take effect.\nA confirmation window will open before activating.\nCannot be reversed. + #autoLOC_SCANsat_resourceSettingsHelpResetAllStockResource = Resets the stock resource scanning coverage for all celestial bodies.\nA reload or scene change may be required for all changes to take effect.\nA confirmation window will open before activating.\nCannot be reversed. + #autoLOC_SCANsat_resourceSettingsHelpOverlayInterpolation = Change the number of resource abundance measurements used in constructing\nthe planetary overlay and big map resource overlay.\nDecrease the value to increase the accuracy of the map.\nLower values will result in slower map generation. + #autoLOC_SCANsat_resourceSettingsHelpOverlayHeight = Change the texture size (map width is 2XHeight) used in constructing\nthe planetary overlay and big map resource overlay.\nIncrease the value to increase the quality and accuracy of the map.\nHigher values will result in slower map generation. + #autoLOC_SCANsat_resourceSettingsHelpOverlayBiomeHeight = Change the texture size (map width is 2XHeight) used in constructing\nthe planetary overlay biome map. Increase the value to increase\nthe quality and accuracy of the map.\nHigher values will result in slower map generation. + #autoLOC_SCANsat_resourceSettingsHelpOverlayTransparency = Create a grey background for planetary overlay resource maps.\nUsed to make clear which sections of the celestial body\nhave been scanned but contain no resources. + #autoLOC_SCANsat_resourceSettingsHelpScanThreshold = A threshold level used to apply the stock resource scan to a celestial body after scanning with SCANsat sensors.\nThis is useful when contracts or other addons require that a stock resource scan be performed.\nSet a value from 0-100 in the text box and click on the Set button.\nAll celestial bodies will be checked immediately;\ncelestial bodies will also be checked upon loading or a scene change.\nA reload may be required for the changes to take effect. + #autoLOC_SCANsat_colorTerrainHelpMin = Defines the low altitude cutoff for the terrain color palette.\nAnything below this altitude will be shown with the lowest color. + #autoLOC_SCANsat_colorTerrainHelpMax = Defines the high altitude cutoff for the terrain color palette.\nAnything above this altitude will be shown with the highest color. + #autoLOC_SCANsat_colorTerrainHelpClampToggle = Used to define a cutoff between the low and high altitude values.\nThis is particularly useful for ocean planets where it helps to\ndefine a sharp distinction between land and ocean. + #autoLOC_SCANsat_colorTerrainHelpClamp = Defines the clamp altitude cutoff.\nAnything below the cutoff will be represented by the first two colors in the selected color palette.\nAnything above the cutoff will be represented with the remaining colors. + #autoLOC_SCANsat_colorTerrainHelpReverse = Reverses the order of the currently\nselected color palette. + #autoLOC_SCANsat_colorTerrainHelpDiscrete = Draws the map using only the specific colors defined by each palette,\ninstead of smoothly interpolating between them. + #autoLOC_SCANsat_colorTerrainHelpPaletteSize = Adjust the number of colors available\nin the currently selected color palette. + #autoLOC_SCANsat_colorBiomeHelpStock = Use the stock biome color scheme for\nSCANsat biome maps. + #autoLOC_SCANsat_colorBiomeHelpWhiteBorder = Draw a white border between biomes.\nDoes not apply to the planetary overlay biome maps. + #autoLOC_SCANsat_colorBiomeHelpTransparency = Adjust the transparency of biome maps.\nTerrain elevation is shown behind the biome maps.\nSet to 0% to disable terrain drawing. + #autoLOC_SCANsat_colorPickerHelpLow = The top color swatch shows the updated\ncolor selection for the low end of this color spectrum.\nThe bottom color swatch shows the currently active color. + #autoLOC_SCANsat_colorPickerHelpHigh = The top color swatch shows the updated\ncolor selection for the high end of this color spectrum.\nThe bottom color swatch shows the currently active color. + #autoLOC_SCANsat_colorResourceHelpMin = The low cutoff for resource concentration on the selected celestial body.\nResource deposits at this level will be displayed\nusing the low end of the current resource overlay color spectrum.\nResource deposits below this value will not be shown. + #autoLOC_SCANsat_colorResourceHelpMax = The high cutoff for resource concentration on the selected celestial body.\nResource deposits above this value will be displayed\nusing the high end of the current resource overlay color spectrum. + #autoLOC_SCANsat_colorResourceHelpTransparency = Defines the level of transparency for resource overlays.\nIncrease to allow more of the underlying terrain, slope, or biome map to be visible.\nThis also affect the transparency of resource deposits on the planetary overlay resource map. + #autoLOC_SCANsat_colorResourceHelpApply = Applies the current values for the\nselected resource and celestial body only. + #autoLOC_SCANsat_colorResourceHelpApplyAll = Applies the current values for the\nselected resource for all celestial bodies. + #autoLOC_SCANsat_colorResourceHelpDefault = Reverts to the default values for the\nselected resource and celestial body only. + #autoLOC_SCANsat_colorResourceHelpDefaultAll = Reverts to the default values for the\nselected resource for all celestial bodies. + #autoLOC_SCANsat_colorHelpSaveToConfig = Save all color configuration values to\nthe config file found in your SCANsat/Resources folder.\nThese values serve as the defaults for new saves\nand for all Revert To Default buttons.\nValues do not need to be saved to the config file to be applied for this save file. + #autoLOC_SCANsat_colorSlopeHelpCutoff = Adjust the cutoff level between\nthe two selected slope color pairs. + } + ru + { + #autoLOC_SCANsat_settingsHelpScanningToggle = Включить/выключить сканирование. + #autoLOC_SCANsat_settingsHelpBackground = Включить/выключить фоновое\nсканирование выбранных тел. + #autoLOC_SCANsat_settingsHelpTimeWarp = Изменить частоту сканирования при ускорении\nвремени. Большие значения создают меньше пропусков\nна карте, однако могут повлиять на быстродействие. + #autoLOC_SCANsat_settingsHelpGroundTracks = Отображать индикатор процесса\nсканирования в режиме карты. + #autoLOC_SCANsat_settingsHelpGroundTracksActive = Показывать поверхностную траекторию\nтолько для активного корабля. + #autoLOC_SCANsat_settingsHelpStockUIStyle = Переключить вид интерфейса между обычным KSP и стилем Unity. + #autoLOC_SCANsat_settingsHelpOverlayTooltips = Отображать подсказки для текущего положения мыши при включенной карте планетарного оверлея.\nЭти подсказки содержат координаты курсора, высоту и наклон поверхности, название биома и количество ресурсов в зависимости от покрытия. + #autoLOC_SCANsat_settingsHelpWindowTooltips = Отображать подсказки на некоторых кнопках.\nИспользуется в основном для определения назначения кнопок. + #autoLOC_SCANsat_settingsHelpLegendTooltips = Отображать подсказки для легенды\nкарты. Отключаются вместе с легендой карты биомов. + #autoLOC_SCANsat_settingsHelpStockToolbar = Использовать панель\nинструментов игры. Также может быть использована панель Blizzy78. + #autoLOC_SCANsat_settingsHelpToolbarMenu = Использовать раскрывающееся меню для стоковой панели инструментов, показывающее все доступные окна. + #autoLOC_SCANsat_settingsHelpMechJeb = Использовать режим выбора вэйпоинтов Детальной и Большой\nкарт SCANsat для выбора зон посадки MechJeb. + #autoLOC_SCANsat_settingsHelpMechJebLoad = Загрузить зону посадки, сохранённую\nиз MechJeb. Работает только для полётной сцены и корабля с MechJeb. + #autoLOC_SCANsat_settingsHelpMapGenSpeed = Изменить все скорости генерации карт.\nМеньшие значения экономят ресурсы процессора\nи помогают улучшить производительность. + #autoLOC_SCANsat_settingsHelpResetWindows = Восстановить позиции и масштаб всех\nокон. Используйте в случае, если окно было скрыто за\nпределами экрана или какие-то окна не видны. + #autoLOC_SCANsat_settingsHelpResetPlanetData = Восстановить по-умолчанию все значения для текущего тела.\nПеред выполнением будет запрошено подтверждение.\nДействие необратимо. + #autoLOC_SCANsat_settingsHelpResetAllData = Восстановить по-умолчанию значения для всех тел.\nПеред выполнением будет запрошено подтверждение.\nДействие необратимо. + #autoLOC_SCANsat_settingsHelpVesselsSensorsPasses = Информация обо всех активных сенсорах SCANsat.\n"Vessels" - количество кораблей с активными сенсорами.\n"Sensors" - общее количество сенсоров;\nдля инструментов с несколькими сенсорами учитывается каждый отдельный сенсор.\n"Passes" - число обновлений сенсора, производимое за секунду.\nНа это значение влияет настройка "Разрешение ускорения времени". + #autoLOC_SCANsat_settingsHelpGreyScale = Использовать спектр оттенков серого для чёрно-белых карт SCANsat.\nПиксели на карте высот будут интерполированы между чёрным и белым;\nПределы определяются минимальными и максимальными значениями высот для каждого тела. + #autoLOC_SCANsat_settingsHelpExportCSV = Экспортировать файл .csv вместе с текстурой карты при нажатии на кнопку "Export"\nБольшой карты. Файл будет содержать координаты и высоты для каждого\nпикселя. Пиксели обозначаются слева направо и сверху вниз. + #autoLOC_SCANsat_settingsHelpSetMapWidth = Введите точное значение для ширины текстуры Большой карты.\nЗначения ограничены от 550 до 8192 пикселей.\nНажмите кнопку "Set", чтобы применить. + #autoLOC_SCANsat_settingsHelpWindowScale = Изменить масштаб всех окон SCANsat. + #autoLOC_SCANsat_settingsHelpFillPlanet = Заполнить все данные SCANsat для текущего небесного тела. + #autoLOC_SCANsat_settingsHelpFillAll = Заполнить все данные SCANsat для всех небесных тел. + #autoLOC_SCANsat_resourceSettingsHelpBiomeLock = Обойти требования поверхностного сканирования биомов в игре.\nSCANsat будет использовать максимальную точность отображения\nдоступности ресурсов независимо от поверхностного сканирования. + #autoLOC_SCANsat_resourceSettingsHelpInstant = По-умолчанию орбитальная съёмка стокового сканера M700 будет заполнять все карты ресурсов SCANsat.\nПри отключении, любое сканирование ресурсов потребует использования методов SCANsat.\nОтключается автоматически при отключении сканирования ресурсов в игре. + #autoLOC_SCANsat_resourceSettingsHelpNarrowBand = Многие функции SCANsat требуют наличия узкополосного сканера ресурсов\nна борту активного корабля или на орбите тела для максимально точных данных доступности ресурсов.\nОтключите, чтобы обойти это ограничение. + #autoLOC_SCANsat_resourceSettingsHelpDisableStock = Выключить все стоковые функции сканирования\nресурсов. Методы сканирования SCANsat потребуются для всех данных\nо ресурсах. Заменяет некоторые стоковые функции для ресурсов,\nвключая показания по нажатию правой кнопки мыши и платенарных оверлеев. + #autoLOC_SCANsat_resourceSettingsHelpResetStockResource = Восстановить стоковое покрытие сканирования ресурсов для текущего тела.\nДля применения всех изменений может потребоваться перезагрузка или смена сцены.\nПеред выполнением будет запрошено подтверждение.\nДействие необратимо. + #autoLOC_SCANsat_resourceSettingsHelpResetAllStockResource = Resets the stock resource scanning coverage for all celestial bodies.\nA reload or scene change may be required for all changes to take effect.\nA confirmation window will open before activating.\nCannot be reversed. + #autoLOC_SCANsat_resourceSettingsHelpOverlayInterpolation = Изменить количество измерений доступности ресурсов, используемых при\nпостроении оверлея ресурсов Большой карты и планетарного.\nУменьшите значение, чтобы повысить точность карты.\nЧем меньше, тем медленнее генерация карты. + #autoLOC_SCANsat_resourceSettingsHelpOverlayHeight = Изменить размер текстуры (ширина карты=высотаX2), использумой при\nпостроении оверлея Большой карты и планетарного.\nУвеличьте значение, чтобы повысить качество и точность карты.\nЧем больше, тем медленнее генерация карты. + #autoLOC_SCANsat_resourceSettingsHelpOverlayBiomeHeight = Изменить размер текстуры (ширина карты=высотаX2), использумой при\nпостроении планетарного оверлея карты биомов.\nУвеличьте значение, чтобы повысить качество и точность карты.\nЧем больше, тем медленнее генерация карты. + #autoLOC_SCANsat_resourceSettingsHelpOverlayTransparency = Использовать серый фон для карт планетарного оверлея ресурсов.\nИспользуется, чтобы определить, какие участки неб. тела\nбыли просканированы, но не содержат ресурсов. + #autoLOC_SCANsat_resourceSettingsHelpScanThreshold = Пороговый уровень применения стокового сканирования ресурсов после сканирования небесного тела сенсорами SCANsat.\nПолезно, если контракты или стороние аддоны требуют осуществления стокового сканирования.\nУстановите значение от 0 до 100 и нажмите кнопку "Set".\nБудет немедленно применено для всех небесных тел;\nНебесные тела также будут обновлены при загрузке или смены сцены.\nДля применения всех изменений может протребоваться перезагрузка. + #autoLOC_SCANsat_colorTerrainHelpMin = Задать нижний порог высоты для цветой схемы уровней высот.\nВсё, что ниже этого значения, будет показано цветом самой нижней высоты. + #autoLOC_SCANsat_colorTerrainHelpMax = Задать верхний порог высоты для цветой схемы уровней высот.\nВсё, что выше этого значения, будет показано цветом максимальной высоты. + #autoLOC_SCANsat_colorTerrainHelpClampToggle = Используется для задания порога между значениями малой и большой\nвысоты. В частности, это помогает различить границу между водой\nи сушей на планетах с океанами. + #autoLOC_SCANsat_colorTerrainHelpClamp = Задать предельные высоты.\nВсё, что ниже, будет представлено двумя первыми цветами выбранной цветовой схемы.\nВсё, что выше, будет представлено остальными цветами. + #autoLOC_SCANsat_colorTerrainHelpReverse = Изменить порядок выбранной цветовой\nсхемы на обратный. + #autoLOC_SCANsat_colorTerrainHelpDiscrete = Отобразить карту, используя вместо плавной интерполяции только цвета,\nзаданные заданные цветовой схемой. + #autoLOC_SCANsat_colorTerrainHelpPaletteSize = Изменить количество цветов, доступных\nдля выбранной цветовой схемы. + #autoLOC_SCANsat_colorBiomeHelpStock = Использовать стоковую цветовую схему\nдля карт биомов SCANsat. + #autoLOC_SCANsat_colorBiomeHelpWhiteBorder = Отображать белым границу между биомами.\nНе влияет на карту биомов планетарного оверлея. + #autoLOC_SCANsat_colorBiomeHelpTransparency = Изменить прозрачность карт биомов.\nПревышение поверхности показывается под картами биомов.\nЗадайте 0%, чтобы скрыть ландшафт. + #autoLOC_SCANsat_colorPickerHelpLow = Верхний образец показывает выбранный\nцвет для нижней границы данного цветового спектра.\nНижний образец показывает текущий цвет. + #autoLOC_SCANsat_colorPickerHelpHigh = Верхний образец показывает выбранный\nцвет для верхней границы данного цветового спектра.\nНижний образец показывает текущий цвет. + #autoLOC_SCANsat_colorResourceHelpMin = Нижний порог концентрации ресурсов выбранного небесного тела.\nНа этом уровне залежи ресурсов будут показаны с использованием\nнижней границы текущего цветового спектра оверлея ресурсов.\nЗалежи ресурсов ниже этого значения показаны не будут. + #autoLOC_SCANsat_colorResourceHelpMax = Верхний порог концентрации ресурсов выбранного небесного тела.\nВыше этого значения залежи ресурсов будут показаны с использованием\nнверхней границы текущего цветового спектра оверлея ресурсов. + #autoLOC_SCANsat_colorResourceHelpTransparency = Задаёт прозрачность оверлеев ресурсов.\nУвеличьте, чтобы повысить видимость высоты, наклона поверхности и карты биомов.\nТакже влияет на прозрачность отображения залежей ресурсов на карте планетарного оверлея ресурсов. + #autoLOC_SCANsat_colorResourceHelpApply = Применить текущие значения только\nдля выбранных ресурсов и небесных тел. + #autoLOC_SCANsat_colorResourceHelpApplyAll = Применить текущие значения для\nвыбранных ресурсов всех небесных тел. + #autoLOC_SCANsat_colorResourceHelpDefault = Восстановить значения по-умолчанию\nтолько для выбранных ресурсов и небесных тел. + #autoLOC_SCANsat_colorResourceHelpDefaultAll = Восстановить значения по-умолчанию\nдля выбранных ресурсов всех небесных тел. + #autoLOC_SCANsat_colorHelpSaveToConfig = Сохранить все значения цветов\nв файл настроек в папке SCANsat/Resources.\nЭти значения будут использованы по-умолчанию при создании новой игры\nи при нажатии кнопок "Восстановление по-умолчанию".\nДля применения в текущей игре сохранение в файл не требуется. + #autoLOC_SCANsat_colorSlopeHelpCutoff = Изменить пороговый уровень между\nдвумя выбранными парами цветов наклона поверхности. + } + es-es + { + #autoLOC_SCANsat_settingsHelpScanningToggle = Activa/Desactiva todos los escaneos de SCANsat. + #autoLOC_SCANsat_settingsHelpBackground = Activa/Desactiva escaneo en segundo plano en\ncuerpos celestes seleccionados. + #autoLOC_SCANsat_settingsHelpTimeWarp = Ajustar la frecuencia de escaneo durante acelaración del tiempo.\nMayor valor resulta en menos brechas en el mapa\npero puede impactar la performancia a gmayor acelarión del tiempo. + #autoLOC_SCANsat_settingsHelpGroundTracks = Mostrar un indicador visual de\nla actividad de escaneo durante la vista de mapa. + #autoLOC_SCANsat_settingsHelpGroundTracksActive = El indicador del seguimiento desde base\npuede ser limitado a solo mostrar la nave activa. + #autoLOC_SCANsat_settingsHelpStockUIStyle = Cambiar elementos de la UI entre el estilo de KSP base y el estilo de Unity. + #autoLOC_SCANsat_settingsHelpOverlayTooltips = Mostrar tooltips para la posición actual del mouse cuando la sobreposición planetaria está activada.\nEstos tooltips incluyen las coordenadas del cursor, Altura del terreno, pendiente, nombre de bioma,\ny abundancia de recurso, dependiendo de la cobertura del escaneo. + #autoLOC_SCANsat_settingsHelpWindowTooltips = Mostrar tooltips en algunos botones de la vista de mapa.\nEstos son principalmente usados para identificar íconos de botones + #autoLOC_SCANsat_settingsHelpLegendTooltips = Mostrar tooltips en la leyenda del mapa.\nInhabilitar esto tambien ocultara la leyenda del mapa de bioma. + #autoLOC_SCANsat_settingsHelpStockToolbar = Usar la barra de herramientas base.\nPuede usarse al mismo tiempo con la barra de herramientas de Blizzy78. + #autoLOC_SCANsat_settingsHelpToolbarMenu = Usa un menú emergente para la barra de herramietnas base para mostrar todas las ventanas disponibles. + #autoLOC_SCANsat_settingsHelpMechJeb =El modo de selección de los mapa con zoom de SCANsat y le mapa grande de waypoints\npueden ser usados para seleccionar una zona de aterrizaje para MechJeb. + #autoLOC_SCANsat_settingsHelpMechJebLoad = Cargar un punto de aterrizaje guardado de MechJeb.\nEsto solo funciona en la escena de vuelo con una nave válida con Mechjeb. + #autoLOC_SCANsat_settingsHelpMapGenSpeed = Ajustar todas las velocidades de generacion de mapa de SCANsat\nReducir valores ahorrara recursos del CPU y quizá reduzca\nla calidad en la generacion de mapa. + #autoLOC_SCANsat_settingsHelpResetWindows = Reiniciar la escala y posición de todas las ventanas.\nUsa esto si una ventana se movió fuera\ncompletamente o si no son visibles. + #autoLOC_SCANsat_settingsHelpResetPlanetData = Reinicia los datos de SCANsat para el cuerpo celeste actual.\nUna ventana de confirmación se abrira antes de\nactivarse. No puede revertirse. + #autoLOC_SCANsat_settingsHelpResetAllData = Reinicia los datos de SCANsat para todos los cuerpos celestes.\nUna ventana de confirmación se abrira antes de activarse.\nNo puede revertirse. + #autoLOC_SCANsat_settingsHelpVesselsSensorsPasses = Información acerca del sensor activo de SCANsat.\nNaves indica el número de naves con el sensor activo.\nSensores indica el número total de sensores\nInstrumentos cuenta cada sensor individual.\nPasadas indica el número de actualizaciones por segundo del sensor\nEste valor es afectado por el ajuste de Resolución de acelaración del Tiempo. + #autoLOC_SCANsat_settingsHelpGreyScale = Usar una verdadera escala de grises para los mapas de blanco y negro de SCANsat.\nPíxeles en el mapa de altitud se van a sobreponer entre negro y blanco\nla altura mínima y máxima del terreno de cada cuerpo celeste define los límites + #autoLOC_SCANsat_settingsHelpExportCSV = Exporta un archivo .csv junto con la textura del mapa cuando se usa el botón de Exportar en el Mapa Grande.\nEl archuvo contiene coordeenas y altura del terreno de cada píxel.\nPixeles están nombrados de izquierda a derecha y de arriba a abajo. + #autoLOC_SCANsat_settingsHelpSetMapWidth = Ingresa un valor exacto para el ancho de textura del mapa grande de SCANsat.\nValores están limitados a 550 - 8192 píxeles de ancho.\nPresiona el botón establecer para aplicar el valor. + #autoLOC_SCANsat_settingsHelpWindowScale =Ajusta todas las escalas de las ventanas de SCANsat. + #autoLOC_SCANsat_settingsHelpFillPlanet = Llena los datos de SCANsat para el cuerpo celeste actual. + #autoLOC_SCANsat_settingsHelpFillAll = Llena los datos de SCANsat para todos los cuerpos celestes. + #autoLOC_SCANsat_resourceSettingsHelpBiomeLock = Evita el requerimiento para el escaneo base de biomas.\nSCANsat mostrará precisión total para la abundancia\ndel recurso con o sin ningun scaneo de biomas. + #autoLOC_SCANsat_resourceSettingsHelpInstant = Por defecto, el escaner de inspección orbital de recursos M700 base llenara todos los mapas de recursos de SCANsat.\nEsto se puede inhabilitar, requiriendo metodos de SCANsat para todos los escaneos de recursos.\nInhabilitado automáticamente cuando el escaneo de recursos base está inactivo. + #autoLOC_SCANsat_resourceSettingsHelpNarrowBand = Numerosas funciones de SCANsat requieren un escáner de recursos Narrow-Band a bordo\nde la nave activa o en órbita del cuerpo celestial para informacion de recursos totalmente precisa.\nDesactiva esto para evitar estas restricciones. + #autoLOC_SCANsat_resourceSettingsHelpDisableStock = Inhabilita todas las funciones base de escaneo de recursos.\nMétodos de escaneo de SCANsat serán requeridos para toda la informacion de recursos.\nRemplaza varias funciones base de recursos con herramietnas de SCANsat.\nIncluye las lecturas del Click-Derecho, y los mapas de sobreposición. + #autoLOC_SCANsat_resourceSettingsHelpResetStockResource = Reinicia la cobertura de escaneo de recursos base para el cuerpo celeste actual.\nVolver a cargar o cambiar de escena quizás sea nescesario para que los cambios tengas efecto.\nUna ventana de confirmación se abrira antes de activarse.\nNo puede revertirse. + #autoLOC_SCANsat_resourceSettingsHelpResetAllStockResource = Reinicia la cobertura de escaneo de recursos base para todos los cuerpos celestes.\nVolver a cargar o cambiar de escena quizás sea nescesario para que los cambios tengas efecto.\nUna ventana de confirmación se abrira antes de activarse.\nNo puede revertirse. + #autoLOC_SCANsat_resourceSettingsHelpOverlayInterpolation = Cambia el número de la abundancia de recursos medida en la creación del mapa\nde la sobreposición planetaria y del mapa grande.\nDisminuir el valor para aumentar la calidad y precisión del mapa.\nValores bajos resultaran en generacion de mapa relentizada. + #autoLOC_SCANsat_resourceSettingsHelpOverlayHeight = Cambia el tamaño de textura (anchura del mapa es 2XAltura) usado en la construcctión\ndel mapa de sobreposición de recursos.\nAumenta el valor para aumentar la calidad y precisión del mapa.\nValores altos resultaran en generacion de mapa relentizada. + #autoLOC_SCANsat_resourceSettingsHelpOverlayBiomeHeight = Cambia el tamaño de textura (anchura del mapa es 2XAltura) usado en la construcctión\ndel mapa de sobreposición de bioma. Aumenta el valor para aumentar\nla calidad y precisión del mapa.\nValores altos resultaran en generacion de mapa relentizada. + #autoLOC_SCANsat_resourceSettingsHelpOverlayTransparency = Crea un fondo gris para la sobreposición del mapa de recursos.\nUsado para dejar claro que secciones del cuerpo celeste\nhan sido escaneadas pero no tienen recursos. + #autoLOC_SCANsat_resourceSettingsHelpScanThreshold = Nivel límite usado para aplicar el escáner base a todos los cuerpos celestes después de escanear con los sensores de SCANsat.\nÚtil cuando contratos u otros requiere que un scáner base de recursos sea realizado.\nEstablece un valor entre 0-100 en la caja de texto y has cñocl en el botón Establecer.\nATodos los cuerpos celestes serán chequeados inmediatamente;\ncuerpos celestes tambien seran chequeados al cargar o al cambiar de escena.\nVolver a cargar quizás sea nescesario para que los cambios tengan efecto. + #autoLOC_SCANsat_colorTerrainHelpMin = Define la mínima altitud de corte para la paleta de color del terreno.\nCualquier valor debajo de esta altitud se mostrará con el mínimo color. + #autoLOC_SCANsat_colorTerrainHelpMax = Define la máxima altitud de corte para la paleta de color del terreno.\nCualquier valor encima de esta altitud se mostrará con el máximo color. + #autoLOC_SCANsat_colorTerrainHelpClampToggle = Used to define a cutoff between the low and high altitude values.\nThis is particularly useful for ocean planets where it helps to\ndefine a sharp distinction between land and ocean. + #autoLOC_SCANsat_colorTerrainHelpClamp = Define el límite grupal de corte.\nCualquier cosa menor será representado por los 2 primeros colores en la paleta de colores seleccionada.\nCualquier valor mayor será representado por el resto de colores. + #autoLOC_SCANsat_colorTerrainHelpReverse = Revierte el orden de la paleta\nde colores actualmente seleccionada. + #autoLOC_SCANsat_colorTerrainHelpDiscrete = Dibuja el mapa usando solo los colores especificados en la paleta,\nen vez de interpolarlos gradualmente. + #autoLOC_SCANsat_colorTerrainHelpPaletteSize = Ajusta el número de colores disponible\nen la paleta de colores actuales. + #autoLOC_SCANsat_colorBiomeHelpStock = Usa el esquema de colores base para\nlos mapas de bioma de SCANsat. + #autoLOC_SCANsat_colorBiomeHelpWhiteBorder = Dibuja una frontera blanca entre biomas.\nNo aplica a la sobreposición de mapas de biomas. + #autoLOC_SCANsat_colorBiomeHelpTransparency = Ajusta la transparencia de los mapas de biomas.\nElevacion del terreno se muestra detrás del bioma.\nEstabler a 0% para inhabilitar el trazo del terreno. + #autoLOC_SCANsat_colorPickerHelpLow = La muestra de color superior muestra la selección\nactualizada para el mínimo color para este espectro.\nLa muestra de color inferior muestra el color activo. + #autoLOC_SCANsat_colorPickerHelpHigh = La muestra de color superior muestra la selección\nactualizada para el máximo color para este espectro.\nLa muestra de color inferior muestra el color activo. + #autoLOC_SCANsat_colorResourceHelpMin = El corte mínimo para la concentración de recursos en el cuerpo celeste seleccionado.\nDepósitos de recursos a este nivel seran mostrados\nusando el valor mínimo del espectro de color actual.\nDepósitos de recursos inferior a este valor no serán mostrados. + #autoLOC_SCANsat_colorResourceHelpMax = El corte máximo para la concentración de recursos en el cuerpo celeste seleccionado.\nDepósitos de recursos por encima de este nivel seran mostrados\nusando el valor máximo del espectro de color actual. + #autoLOC_SCANsat_colorResourceHelpTransparency = Define el nivel de transparencia para la sobreposición de recursos.\nAumentar para permitir ver mas del terreno, pendiente o bioma.\nEsto tambien afecta la transparencia de la sobreposiciñon de recursos en el mapa. + #autoLOC_SCANsat_colorResourceHelpApply = Aplica los valores actuales para el\nrecurso y cuerpo celeste seleccionado. + #autoLOC_SCANsat_colorResourceHelpApplyAll = Aplica los valores actuales para todos\nlos recursos y cuerpos celestes. + #autoLOC_SCANsat_colorResourceHelpDefault = Revierte los valores de fábrica para el\nrecurso y cuerpo celeste seleccionado. + #autoLOC_SCANsat_colorResourceHelpDefaultAll = Revierte los valores de fábrica para el\nrecurso seleccionado para todos los cuerpos celestes. + #autoLOC_SCANsat_colorHelpSaveToConfig = Guarda toda la configuracion de colores en\nel archivo de configuracion encontrado en el folder SCANsat/Resources.\nEstos valores sirven como base para nuevas partidas\ny para todos los botones de Revertir a Defecto.\nLos valores no necesitan guardarse al archivo de configuración para ser aplicados en esta partida. + #autoLOC_SCANsat_colorSlopeHelpCutoff = Ajusta el nivel de corte entre\nentre los 2 pares de colores seleccionados. + } + zh-cn + { + #autoLOC_SCANsat_settingsHelpScanningToggle = 开关所有SCANsat扫描。 + #autoLOC_SCANsat_settingsHelpBackground = 开关选中天体的\n后台扫描。 + #autoLOC_SCANsat_settingsHelpTimeWarp = 调整时间加速时的扫描频率。\n值越高扫描越精确,\n但在高时间加速倍率下可能导致性能问题。 + #autoLOC_SCANsat_settingsHelpGroundTracks = 在星图模式显示一个可见的\n扫描活动标识。 + #autoLOC_SCANsat_settingsHelpGroundTracksActive = 地面追踪标识可被限制为\n仅显示活动中的载具。 + #autoLOC_SCANsat_settingsHelpStockUIStyle = 在默认KSP风格界面和Unity风格界面之间切换。 + #autoLOC_SCANsat_settingsHelpOverlayTooltips = 当星球标识可用时,在鼠标当前位置显示一个提示框,\n内容包括坐标,地形高度,坡度,生物群系名称\n和资源储量。仅对已扫描地区有效。 + #autoLOC_SCANsat_settingsHelpWindowTooltips = 显示地图窗口按钮的提示框,\n主要用来识别图标按钮。 + #autoLOC_SCANsat_settingsHelpLegendTooltips = 在图例上显示提示框,\n关闭的同时也会关闭生物群系图例。 + #autoLOC_SCANsat_settingsHelpStockToolbar = 使用原版工具栏,\n可以和Blizzy78的工具栏一起使用。 + #autoLOC_SCANsat_settingsHelpToolbarMenu = 使用原版工具栏的弹出式菜单显示所有可用窗口。 + #autoLOC_SCANsat_settingsHelpMechJeb = SCANsat缩放地图和大地图的导航点选择模式\n可以用来选择MJ自动着陆地点。 + #autoLOC_SCANsat_settingsHelpMechJebLoad = 载入一个已保存的MJ自动着陆目标,\n这仅在飞行界面且载具MJ有效时可用。 + #autoLOC_SCANsat_settingsHelpMapGenSpeed = 调整所有SCANsat地图的生成速度,\n数值调低可以节约CPU资源并减小生成\n地图对性能的影响。 + #autoLOC_SCANsat_settingsHelpResetWindows = 重置所有窗口的位置和缩放,\n当窗口完全覆盖屏幕或者\n某些窗口不可见时使用。 + #autoLOC_SCANsat_settingsHelpResetPlanetData = 重置当前天体选中的SCANsat数据,\n执行前会弹出一个确认窗口。\n本操作无法撤销。 + #autoLOC_SCANsat_settingsHelpResetAllData = 重置所有天体选中的SCANsat数据,\n执行前会弹出一个确认窗口。\n本操作无法撤销。 + #autoLOC_SCANsat_settingsHelpVesselsSensorsPasses = 当前激活的SCANsat传感器信息。\n载具表示配备已激活传感器的载具数量;\n传感器表示传感器总数,\n拥有多个传感器的仪器将对每一个传感器分别计数;\n帧率表示每秒钟传感器刷新次数,\n这个数值受时间加速倍率设置的影响。 + #autoLOC_SCANsat_settingsHelpGreyScale = 为黑白SCANsat地图启用灰度图模式。\n高度图的每一个像素均介于黑色与白色之间,\n最大和最小值将由天体的最高和最低地形高度定义。 + #autoLOC_SCANsat_settingsHelpExportCSV = 大地图模式下使用这个导出按钮将和地图贴图一起导出一个后缀为.csv的文件,\n该文件包含每个像素的坐标和地形高度,\n像素排列方式为先左后右,先上后下。 + #autoLOC_SCANsat_settingsHelpSetMapWidth = 为SCANsat大地图贴图指定一个宽度,\n数值必须在550 - 8192之间,\n按设置键应用这个数值。 + #autoLOC_SCANsat_settingsHelpWindowScale = 调整所有SCANsat窗口的缩放。 + #autoLOC_SCANsat_settingsHelpFillPlanet = 为当前天体填入选中的SCANsat数据。 + #autoLOC_SCANsat_settingsHelpFillAll = 为所有天体填入选中的SCANsat数据。 + #autoLOC_SCANsat_resourceSettingsHelpBiomeLock = 避免对原版地表生物群系扫描的需求,\nSCANsat视图会显示完整精确的附带或不附带\n地表生物群系的资源储量图。 + #autoLOC_SCANsat_resourceSettingsHelpInstant = 默认情况下,原版M700资源扫描仪的轨道观察会填满整个SCANsat资源地图,\n禁用后就需要标准SCANsat方法来扫描资源地图。\n当原版资源扫描仪不可用时自动禁用。 + #autoLOC_SCANsat_resourceSettingsHelpNarrowBand = 大量的SCANsat功能需要载具或轨道上有一个\n窄带资源扫描仪,以此获得完整精确的资源储藏数据,\n禁用此项以避免这些制约。 + #autoLOC_SCANsat_resourceSettingsHelpDisableStock = 禁用所有原版资源扫描仪的功能。\n所有资源数据必须使用SCANsat扫描方法来扫描,\n用SCANsat的工具替代许多原版的功能,\n包括右键读数以及行星总览资源图。 + #autoLOC_SCANsat_resourceSettingsHelpResetStockResource = 重置当前天体原版资源扫描信息,\n需要重新载入或者切换场景才可生效,\n执行前将弹出确认窗口,\n本操作无法撤销。 + #autoLOC_SCANsat_resourceSettingsHelpResetAllStockResource = 重置所有天体原版资源扫描信息,\n需要重新载入或者切换场景才可生效,\n执行前将弹出确认窗口,\n本操作无法撤销。 + #autoLOC_SCANsat_resourceSettingsHelpOverlayInterpolation = 改变生成行星视图和大地图资源地图时的\n资源储量单位度量范围,\n降低该数值可以提高地图的质量和精度,\n越低的数值生成地图越慢。 + #autoLOC_SCANsat_resourceSettingsHelpOverlayHeight = 改变生成行星视图和大地图资源地图\n时的贴图尺寸(地图宽高比2比1),\n提高该数值可以提高地图的质量和精度,\n越高的数值生成地图越慢。 + #autoLOC_SCANsat_resourceSettingsHelpOverlayBiomeHeight = 改变生成行星视图生物群系地图\n时的贴图尺寸(地图宽高比2比1),\n提高该数值可以提高地图的质量和精度,\n越高的数值生成地图越慢。 + #autoLOC_SCANsat_resourceSettingsHelpOverlayTransparency = 为行星视图资源地图创建一个灰色背景,\n用来辨识天体的哪些部分\n已经被扫描出没有资源储量而不是未扫描。 + #autoLOC_SCANsat_resourceSettingsHelpScanThreshold = 当使用SCANsat传感器扫描到一个临界水平时对一个天体启用原版资源扫描,\n这对某些需要原版资源扫描可用的合同或其他mod而言很有用。\n填入一个0-100之间的数值并点击设置按钮。\n所有天体将被立刻检查,\n当载入或场景切换时也会执行检查。\n可能需要重新载入来生效。 + #autoLOC_SCANsat_colorTerrainHelpMin = 定义地形图颜色板的高度下限,\n所有低于这一下限的高度都被显示为最低高度的颜色。 + #autoLOC_SCANsat_colorTerrainHelpMax = 定义地形图颜色板的高度上限,\n所有低于这一上限的高度都被显示为最高高度的颜色。 + #autoLOC_SCANsat_colorTerrainHelpClampToggle = 定义一个最低和最高高度之间的分界线,类似海平面高度线,\n这在明确区分有海洋星球的海洋\n和陆地时尤其有用。 + #autoLOC_SCANsat_colorTerrainHelpClamp = 定义高度截止线,\n所有低于这一高度的地方将用地形图颜色板的前两个颜色标识,\n高于这一高度的则使用剩余的颜色。 + #autoLOC_SCANsat_colorTerrainHelpReverse = 反转当前颜色板\n的颜色排列顺序。 + #autoLOC_SCANsat_colorTerrainHelpDiscrete = 只使用每个颜色版定义的特殊颜色绘制地图,\n而不使用其中的渐变色。 + #autoLOC_SCANsat_colorTerrainHelpPaletteSize = 调整当前选中颜色板\n的可用颜色数目。 + #autoLOC_SCANsat_colorBiomeHelpStock = 为SCANsat生物群系图使用\n原版生物群系上色模式。 + #autoLOC_SCANsat_colorBiomeHelpWhiteBorder = 不同生物群系之间绘制白色边界,\n在行星视图的生物群系图中无效。 + #autoLOC_SCANsat_colorBiomeHelpTransparency = 调整生物群系图的透明度,\n地形高度在生物群系图下方显示,\n设为0%可禁用地形图绘制。 + #autoLOC_SCANsat_colorPickerHelpLow = 上方颜色表示更新后的\n颜色板最低一端的颜色,\n下方的颜色表示当前使用中的颜色。 + #autoLOC_SCANsat_colorPickerHelpHigh = 上方颜色表示更新后的\n颜色板最高一端的颜色,\n下方的颜色表示当前使用中的颜色。 + #autoLOC_SCANsat_colorResourceHelpMin = 选中天体的资源丰富度下限,\n这一水平下的资源储量将\n显示为当前资源视图颜色板最低一端的颜色,\n低于此水平的资源储量将不被显示。 + #autoLOC_SCANsat_colorResourceHelpMax = 选中天体的资源丰富度上限,\n不低于这一水平的资源储量将\n显示为当前资源视图颜色板最高一端的颜色。 + #autoLOC_SCANsat_colorResourceHelpTransparency = 定义资源视图的透明度水平,\n升高数值可使背景的地形、坡度或生物群系图更清晰,\n这一设置同时也影响行星视图的资源地图。 + #autoLOC_SCANsat_colorResourceHelpApply = 仅应用当前设定数值到\n选中的资源和天体。 + #autoLOC_SCANsat_colorResourceHelpApplyAll = 为所有天体选中的\n资源应用当前设定数值。 + #autoLOC_SCANsat_colorResourceHelpDefault = 仅将当前选中的资源和天体\n设定数值恢复为默认值。 + #autoLOC_SCANsat_colorResourceHelpDefaultAll = 将所有天体选中的\n资源的设定数值恢复为默认值。 + #autoLOC_SCANsat_colorHelpSaveToConfig = 保存所有颜色设置到\nSCANsat/Resources文件夹里的配置文件中,\n这些数值将默认给新存档\n和所有“重置为默认值”按钮使用,\n仅本存档使用的设定不必保存到配置文件。 + #autoLOC_SCANsat_colorSlopeHelpCutoff = 调整两个选中坡度\n颜色组的分割线。 + } + de + { + #autoLOC_SCANsat_settingsHelpScanningToggle = Gesamtes SCANsat-Scanning umschalten. + #autoLOC_SCANsat_settingsHelpBackground = Hintergrund-Scanning auf gewählten\nHimmelskörpern umschalten. + #autoLOC_SCANsat_settingsHelpTimeWarp = Einstellung der Scan-Frequenz während Zeitbeschleunigung.\nHöhere Werte reduzieren das Auftreten von Lücken im Scan, können jedoch die Performance bei\nhoher Zeitbeschleunigung beeinträchtigen. + #autoLOC_SCANsat_settingsHelpGroundTracks = Zeigt in der Kartenansicht den Scan-Bereich. + #autoLOC_SCANsat_settingsHelpGroundTracksActive = Der Scan-Bereich kann nur auf das\nAktive Vehikel oder alle angewandt werden. + #autoLOC_SCANsat_settingsHelpStockUIStyle = Schaltet das UI zwischen\nStandard-KSP-Style und Unity-Style um. + #autoLOC_SCANsat_settingsHelpOverlayTooltips = Zeigt Tooltips zur Mausposition auf der Overlay-Karte an.\nDiese Tooltips beinhalten Cursor-Koordinaten, Geländehöhe, Geländeneigung, Biomname und Ressourcen-Verfügbarkeit. + #autoLOC_SCANsat_settingsHelpWindowTooltips = Zeigt Tooltips zu Fensterkarten-Buttons an.\nDiese dienen hauptsächlich dem Identifizieren von Buttons mit Icons. + #autoLOC_SCANsat_settingsHelpLegendTooltips = Zeigt Tooltips zur Kartenlegende.\nAusschalten deaktiviert ebenso die Biomkartenlegende. + #autoLOC_SCANsat_settingsHelpStockToolbar = Nutze die Standard-Toolbar.\nKann gleichzeitig mit Blizzy78's Toolbar angewandt werden. + #autoLOC_SCANsat_settingsHelpToolbarMenu = Nutze ein Pop-Out-Menü, an Stelle der Standard-Toolbar um alle verfügbaren Fenster an zu zeigen. + #autoLOC_SCANsat_settingsHelpMechJeb = Die SCANsat Zoom-Karte nutzen, um Wegpunkte zu wählen und MechJeb-Landeplätze aus zu suchen. + #autoLOC_SCANsat_settingsHelpMechJebLoad = Lädt einen gespeicherten MechJeb-Landeplatz.\nDies funktioniert nur in aktiven Vehikeln mit einem gültigen MechJeb-Modul. + #autoLOC_SCANsat_settingsHelpMapGenSpeed = Einstellung der Kartengenerierungsgeschwindigkeit aller SCANsat-Karten.\nNiedrigere Werte reduzieren CPU-Auslastung und möglicherweise Leistungseinbrüche beim Generieren von Karten. + #autoLOC_SCANsat_settingsHelpResetWindows = Zurücksetzen aller Fensterpositionen und deren Skalierung.\nNutze dies, falls etwaige Fenster aus dem sichtbaren Bereich verschoben wurden oder gänzlich fehlen. + #autoLOC_SCANsat_settingsHelpResetPlanetData = Zurücksetzen der gewählten SCANsat-Daten des aktuellen Himmelskörper.\nEin Bestätigungsfenster wird sich vor Durchführung öffnen.\nKann nicht rückgängig gemacht werden! + #autoLOC_SCANsat_settingsHelpResetAllData = Zurücksetzen der gewählten SCANsat-Daten ALLER Himmelskörper.\nEin Bestätigungsfenster wird sich vor Durchführung öffnen.\nKann nicht rückgängig gemacht werden! + #autoLOC_SCANsat_settingsHelpVesselsSensorsPasses = Informationen über momentan aktive SCANsat-Sensoren.\n'Vehikel' zeigt die Anzahl aller Vehikel mit aktiven Sensoren.\n'Sensoren' zeigt die Gesamtzahl aller Sensoren;\nInstrumente mit mehreren Sensoren werden als individuelle Sensoren gezählt.\n'Durchgänge' zeigt die Anzahl an Sensor-Auffrischungen pro sekunde.\nDieser Wert wird vom Zeitbeschleunigungsfaktor beeinflusst. + #autoLOC_SCANsat_settingsHelpGreyScale = Nutze ein echtes Graustufenfarbspektrum an Stelle der schwarz/weiß SCANsat-Karten.\nPixel auf der Höhenkarte werden zwischen schwarz und weiß interpoliert;\n die min/max Geländehöhe für jeden einzelnen Himmelkörper definieren das Limit. + #autoLOC_SCANsat_settingsHelpExportCSV = Exportiert eine .CSV-Datei, zusammen mit einer Kartentextur, falls die Exportfunktion auf der großen Karte verwendet wird.\nDie Datei enthält Koordinaten und die Geländehöhe für jedes Pixel.\nPixel werden von links nach rechts und von oben nach unten beschrieben. + #autoLOC_SCANsat_settingsHelpSetMapWidth = Gebe einen exakten Wert für die Breite der großen SCANsat-Kartentextur an.\nWerte sind auf 550 - 8192 pixel beschränkt.\nKlicke den 'Setzen'-Button um die Werte an zu wenden. + #autoLOC_SCANsat_settingsHelpWindowScale = Stellt alle SCANsat Fensterskalierungen ein. + #autoLOC_SCANsat_settingsHelpFillPlanet = Füllt die gewälten SCANsat-Daten des momentan Himmelskörpers auf. + #autoLOC_SCANsat_settingsHelpFillAll = Füllt die gewälten SCANsat-Daten ALLER Himmelskörpers auf. + #autoLOC_SCANsat_resourceSettingsHelpBiomeLock = Umgeht die Notwendigkeit vorhergehender Standard-Oberflächen-Biom-Scans.\nDie SCANsat-Anzeigen werden die Ressourcen mit voller Präzision anzeigen, ohne vorhergehende Biom-Scans. + #autoLOC_SCANsat_resourceSettingsHelpInstant = Als Standard füllt der M700-Scanner die gesamte Ressourcenkarte.\nDies kann deaktiviert werden. In diesem Falle werden SCANsat-Scanner für alle Ressourcen-Scans benötigt.\nWird automatisch deaktiviert, sollte das Standard-Ressourcen-Scan-System deaktiviert sein. + #autoLOC_SCANsat_resourceSettingsHelpNarrowBand = Viele SCANsat-Funktionen benötigen einen Schmalband-Ressourcen-Scanner an Bord\ndes momentanen Vehikels oder innerhalb des Orbit eines Himmelskörper, für maximale Genauigkeit der Ressourcen-Daten.\nDeaktiviere dies um diese Einschränkungen zu umgehen. + #autoLOC_SCANsat_resourceSettingsHelpDisableStock = Deaktiviert alle Standard-Resourcen-Scan-Funktionen.\nSCANsat-Scan-Methoden werden für alle Resourcen-Scans benötigt.\nErsetzt mehrere Standardfunktionen mit SCANsat-funktionen.\nDies schließt ebenso das Rechtsklickmenü und alle Overlay-Karten mit ein. + #autoLOC_SCANsat_resourceSettingsHelpResetStockResource = Setzt die Standard-Resourcen-Abdeckung für den momentanen Himmelskörper zurück.\nNeuladen oder ein Szenenwechsel könnten nötig sein um die Änderungen zu übernehmen.\nEin Bestätigungsfenster wird sich vor Durchführung öffnen.\nKann nicht rückgängig gemacht werden! + #autoLOC_SCANsat_resourceSettingsHelpResetAllStockResource = Setzt die Standard-Resourcen-Abdeckung für ALLE Himmelskörper zurück.\nNeuladen oder ein Szenenwechsel könnten nötig sein um die Änderungen zu übernehmen.\nEin Bestätigungsfenster wird sich vor Durchführung öffnen.\nKann nicht rückgängig gemacht werden! + #autoLOC_SCANsat_resourceSettingsHelpOverlayInterpolation = Ändert die Anzahl an Resourcen-Messungen welche beim generieren\n des planetaren Overlays und der großen Resourcenkarte verwendet werden.\nVerringere den Wert um die Genauigkeit der Karte zu erhöhen.\nNiedrigere Werte verringern die Geschwindigkeit der Kartengenerierung. + #autoLOC_SCANsat_resourceSettingsHelpOverlayHeight = Ändert die Texturgröße (Kartenbreite = 2x Höhe) welche beim konstruieren\n des planetaren Overlays und der großen Ressourcenkarte verwendet wird.\nHöhere Werte verringern die Geschwindigkeit der Kartengenerierung. + #autoLOC_SCANsat_resourceSettingsHelpOverlayBiomeHeight = Ändert die Texturgröße (Kartenbreite = 2x Höhe) welche beim konstruieren\n des planetaren Overlays und der großen Biomkarte verwendet wird.\nHöhere Werte erhöhen die Genauigkeit und Qualität der Karte.\nHöhere Werte verringern die Geschwindigkeit der Kartengenerierung. + #autoLOC_SCANsat_resourceSettingsHelpOverlayTransparency = Generiert einen grauen Hintergrund für die planetare Resourcen-Overlay-Karte\nWird verwendet um Bereiche zu verdeutlichen, welche gescannt \nwurden, jedoch keine Resourcen enthalten. + #autoLOC_SCANsat_resourceSettingsHelpScanThreshold = Ein Schwellwert, welcher angibt, ab wann das Standard-Ressourcen-Scan-System nach vorherigem SCANsat-scannen angewendet wird. Notwendig bei Verträgen, welche einen Standard-Scan zur Erfüllung benötigen\nSetze einen Wert zwischen 0 und 100 und klicke den 'Setzen'-button.\nAlles Himmelskörper werden sofort überprüft;\nHimmelskörper werden ebenso bei einer Landung oder einem Szenenwechsel geprüft.\nNeuladen könnte notwendig sein, um die Einstellung zu übernehmen. + #autoLOC_SCANsat_colorTerrainHelpMin = Definiert die untere Höhenbegrenzung der Geländefarbpalette.\nAlles unterhalb dieser Höhe wird mit dem niedrigsten Farbwert dargestellt. + #autoLOC_SCANsat_colorTerrainHelpMax = Definiert die obere Höhenbegrenzung der Geländefarbpalette.\nAlles oberhalb dieser Höhe wird mit dem höchsten Farbwert dargestellt. + #autoLOC_SCANsat_colorTerrainHelpClampToggle = Definiert eine Abgranzung zwischen oberer und unterer Höhenbegrenzung.\nDies ist besonders bei Ozeanplaneten nützlich, um den Ozean scharf von den Landmassen ab zu grenzen. + #autoLOC_SCANsat_colorTerrainHelpClamp = Definiert die Höhe der Höhenbegrenzung.\n Alles unterhalb diese Begrenzung wird durch die ersten zwei Farben der momentan gewählten Palette dargestellt.\nAlles Oberhalb dieser Grenze wird mit den übrigen Farben dargestellt. + #autoLOC_SCANsat_colorTerrainHelpReverse = Invertiert die Reihenfolge der\nmomentan gewählten Palette. + #autoLOC_SCANsat_colorTerrainHelpDiscrete = Zeichnet die Karte nur an Hand der Farben der gewählten Palette,\nohne diese weich zu interpolieren. + #autoLOC_SCANsat_colorTerrainHelpPaletteSize = Ändert die Anzahl an Farben,\nin der momentan gewählten Palette. + #autoLOC_SCANsat_colorBiomeHelpStock = Nutze das Standardfarbschema auf\nSCANsat-Biomkarten. + #autoLOC_SCANsat_colorBiomeHelpWhiteBorder = Zeichnet eine weiße Grenzlinie zwischen den Biomen.\nDies gilt jedoch nicht für die planetare Overlay-Biomkarte. + #autoLOC_SCANsat_colorBiomeHelpTransparency = Ändert die Transparenz an Biomkarten.\nGeländerhöhungen werden unterhalb der Biomkarte angezeigt.\nSetze auf 0%, um das Zeichnen des Geländes ab zu schalten. + #autoLOC_SCANsat_colorPickerHelpLow = Der obere Farbraum zeigt die aktualisierte Auswahl an Farben des unteren Farbspektrums an.\nDer untere Farbraum zeigt die momentan aktive Farbe. + #autoLOC_SCANsat_colorPickerHelpHigh = Der obere Farbraum zeigt die aktualisierte Auswahl an Farben des oberen Farbspektrums an.\nDer untere Farbraum zeigt die momentan aktive Farbe. + #autoLOC_SCANsat_colorResourceHelpMin = Die Untergrenze der Resourcenkonzentration des momentan gewählten Himmelskörper.\nRessourcen-Lagerstätten auf diesem Level werden mit dem unteren Ende des Farbraumes der Momentan gewählten Farbpalette angezeigt.\nResourcenlagerstätten unterhalb dieses Levels werden nicht angezeigt. + #autoLOC_SCANsat_colorResourceHelpMax = Die Obergrenze der Resourcenkonzentration des momentan gewählten Himmelskörper.\nRessourcen-Lagerstätten auf diesem Level werden mit dem oberend ende des Farbraumes der momentan gewählten Farbpalette angezeigt. + #autoLOC_SCANsat_colorResourceHelpTransparency = Definiert den Transparenzgrad der Recourcen-Overlays.\nErhöhe diesen Wert um mehr von den Unterlagerten Gelände-/Bodenwinkel- oder Biomkarte darzustellen.\nDies beeinflußt ebenso die Transparenz der Ressourcen-Lagerstätten auf der planetaren Overlay-Karte. + #autoLOC_SCANsat_colorResourceHelpApply = Bestätigt die eingegebenen Werte nur für den momentan gewählten Himmelskörper. + #autoLOC_SCANsat_colorResourceHelpApplyAll = Bestätigt die eingegebenen Werte der gewählten Resource für alle Himmelskörper. + #autoLOC_SCANsat_colorResourceHelpDefault = Setzt nur ausgewählte Resourcen und Himmelskörper auf Standardwerte zurück. + #autoLOC_SCANsat_colorResourceHelpDefaultAll = Setzt ausgewählte Resourcen auf ALLEN Himmelskörpern zurück. + #autoLOC_SCANsat_colorHelpSaveToConfig = Speichert alle Farbeinstellungen in die config-Datei innerhalb des SCANsat/Resources-Verzeichnis.\nDiese Werte dienen als Standardwerte für neu erstellte Spielstände und alle Rücksetzfunktionen.\nDie Werte müssen nicht in die config-Datei gespeichert werden, um Diese auf diesen Spielstand an zu wenden. + #autoLOC_SCANsat_colorSlopeHelpCutoff = Ändert den Grenzwert zwischen den beiden ausgewählten Farbpaaren für Geländeneigung. + } +} diff --git a/SCANassets/Resources/Localization/OtherText.cfg b/SCANassets/Resources/Localization/OtherText.cfg new file mode 100644 index 000000000..fe67e937a --- /dev/null +++ b/SCANassets/Resources/Localization/OtherText.cfg @@ -0,0 +1,145 @@ +Localization +{ + en-us + { + #autoLOC_SCANsat_Analyze = Analyze Data + #autoLOC_SCANsat_StartScan = Start Scan + #autoLOC_SCANsat_StopScan = Stop Scan + #autoLOC_SCANsat_ToggleScan = Toggle Scan + #autoLOC_SCANsat_Extend = Extend + #autoLOC_SCANsat_Retract = Retract + #autoLOC_SCANsat_Unknown = Unknown + #autoLOC_SCANsat_All_Disabled = All Scanning Disabled + #autoLOC_SCANsat_Disabled = Scanning Disabled + #autoLOC_SCANsat_TooLow = Too Low + #autoLOC_SCANsat_SubOptimal = Sub-Optimal + #autoLOC_SCANsat_Ideal = Ideal + #autoLOC_SCANsat_TooHigh = Too High + #autoLOC_SCANsat_NoData = No Data + #autoLOC_SCANsat_Abundance = Abundance + #autoLOC_SCANsat_Surface = Surf + #autoLOC_SCANsat_AltitudeMin = Altitude ( min): <<1>>km\n + #autoLOC_SCANsat_AltitudeBest = Altitude (best): <<1>>km\n + #autoLOC_SCANsat_AltitudeMax = Altitude ( max): <<1>>km\n + #autoLOC_SCANsat_FOV = FOV: <<1>> + #autoLOC_SCANsat_MapProjection = Projection + #autoLOC_SCANsat_MapType = Map Type + #autoLOC_SCANsat_MapResource = Resource + #autoLOC_SCANsat_MapBody = Celestial Body + #autoLOC_SCANsat_GeneralSettings = General Settings + #autoLOC_SCANsat_BackgroundSettings = Background Settings + #autoLOC_SCANsat_ResourceSettings = Resource Settings + #autoLOC_SCANsat_DataManagement = Data Management + #autoLOC_SCANsat_ColorManagement = Color Management + } + ru + { + #autoLOC_SCANsat_Analyze = Анализировать данные + #autoLOC_SCANsat_StartScan = Запустить сканирование + #autoLOC_SCANsat_StopScan = Остановить сканирование + #autoLOC_SCANsat_ToggleScan = Переключить сканирование + #autoLOC_SCANsat_Extend = Расширить + #autoLOC_SCANsat_Retract = Свернуть + #autoLOC_SCANsat_Unknown = Неизвестно + #autoLOC_SCANsat_All_Disabled = Все сканирование отключено + #autoLOC_SCANsat_Disabled = Сканирование отключено + #autoLOC_SCANsat_TooLow = Слишком низко + #autoLOC_SCANsat_SubOptimal = Полуоптимально + #autoLOC_SCANsat_Ideal = Идеально + #autoLOC_SCANsat_TooHigh = Слишком высоко + #autoLOC_SCANsat_NoData = Нет данных + #autoLOC_SCANsat_Abundance = Богатство + #autoLOC_SCANsat_Surface = Поверхность + #autoLOC_SCANsat_AltitudeMin = Высота (мин): <<1>>km\n + #autoLOC_SCANsat_AltitudeBest = Высота (лучшая): <<1>>km\n + #autoLOC_SCANsat_AltitudeMax = Высота (макс): <<1>>km\n + #autoLOC_SCANsat_FOV = Угол обзора: <<1>> + #autoLOC_SCANsat_MapProjection = Проекция + #autoLOC_SCANsat_MapType = Тип карты + #autoLOC_SCANsat_MapResource = Ресурс(ы) + #autoLOC_SCANsat_MapBody = Небесное тело + #autoLOC_SCANsat_GeneralSettings = Общие настройки + #autoLOC_SCANsat_BackgroundSettings = Настройки фона + #autoLOC_SCANsat_ResourceSettings = Настройки ресурсов + #autoLOC_SCANsat_DataManagement = Управление данными + #autoLOC_SCANsat_ColorManagement = Управление цветом + } + es-es + { + #autoLOC_SCANsat_Analyze = Analizar datos + #autoLOC_SCANsat_StartScan = Empezar Escaneo + #autoLOC_SCANsat_StopScan = Terminar Escaneo + #autoLOC_SCANsat_ToggleScan = Cambiar Escaneo + #autoLOC_SCANsat_Extend = Extender + #autoLOC_SCANsat_Retract = Retractar + #autoLOC_SCANsat_Unknown = Desconocido + #autoLOC_SCANsat_All_Disabled = Todo el Escaneo Desabilitado + #autoLOC_SCANsat_Disabled = Escaneo Desabilitado + #autoLOC_SCANsat_TooLow = Muy Bajo + #autoLOC_SCANsat_SubOptimal = Sub-Óptimo + #autoLOC_SCANsat_Ideal = Ideal + #autoLOC_SCANsat_TooHigh = Muy Alto + #autoLOC_SCANsat_NoData = Sin datos + #autoLOC_SCANsat_Abundance = Abundancia + #autoLOC_SCANsat_Surface = Superf + #autoLOC_SCANsat_AltitudeMin = Altitud ( mín): <<1>>km\n + #autoLOC_SCANsat_AltitudeBest = Altitud (ideal): <<1>>km\n + #autoLOC_SCANsat_AltitudeMax = Altitud ( máx): <<1>>km\n + #autoLOC_SCANsat_FOV = FOV: <<1>> + } + zh-cn + { + #autoLOC_SCANsat_Analyze = 分析数据 + #autoLOC_SCANsat_StartScan = 开始扫描 + #autoLOC_SCANsat_StopScan = 停止扫描 + #autoLOC_SCANsat_ToggleScan = 开关扫描器 + #autoLOC_SCANsat_Extend = 展开 + #autoLOC_SCANsat_Retract = 收起 + #autoLOC_SCANsat_Unknown = 未知 + #autoLOC_SCANsat_All_Disabled = 所有扫描器已禁用 + #autoLOC_SCANsat_Disabled = 扫描器禁用 + #autoLOC_SCANsat_TooLow = 高度过低 + #autoLOC_SCANsat_SubOptimal = 欠佳 + #autoLOC_SCANsat_Ideal = 理想 + #autoLOC_SCANsat_TooHigh = 高度过高 + #autoLOC_SCANsat_NoData = 无数据 + #autoLOC_SCANsat_Abundance = 丰富 + #autoLOC_SCANsat_Surface = 表面 + #autoLOC_SCANsat_AltitudeMin = 最低高度: <<1>>km\n + #autoLOC_SCANsat_AltitudeBest = 最佳高度: <<1>>km\n + #autoLOC_SCANsat_AltitudeMax = 最大高度: <<1>>km\n + #autoLOC_SCANsat_FOV = 扫描锥角: <<1>> + #autoLOC_SCANsat_MapProjection = 地图设计 + #autoLOC_SCANsat_MapType = 地图类型 + #autoLOC_SCANsat_MapResource = 资源 + #autoLOC_SCANsat_MapBody = 天体 + #autoLOC_SCANsat_GeneralSettings = 全局设置 + #autoLOC_SCANsat_BackgroundSettings = 背景设置 + #autoLOC_SCANsat_ResourceSettings = 资源设置 + #autoLOC_SCANsat_DataManagement = 数据管理 + #autoLOC_SCANsat_ColorManagement = 颜色管理 + } + de + { + #autoLOC_SCANsat_Analyze = Daten Analysieren + #autoLOC_SCANsat_StartScan = Scan Starten + #autoLOC_SCANsat_StopScan = Scan Stoppen + #autoLOC_SCANsat_ToggleScan = Scan Ein/Aus + #autoLOC_SCANsat_Extend = Ausfahren + #autoLOC_SCANsat_Retract = Einfahren + #autoLOC_SCANsat_Unknown = Unbekannt + #autoLOC_SCANsat_All_Disabled = Alle Scans Deaktiviert + #autoLOC_SCANsat_Disabled = Scans Deaktiviert + #autoLOC_SCANsat_TooLow = Zu Niedrig + #autoLOC_SCANsat_SubOptimal = Sub-Optimal + #autoLOC_SCANsat_Ideal = Ideal + #autoLOC_SCANsat_TooHigh = Zu Hoch + #autoLOC_SCANsat_NoData = Keine Daten + #autoLOC_SCANsat_Abundance = Ausbeute + #autoLOC_SCANsat_Surface = Oberfläche + #autoLOC_SCANsat_AltitudeMin = Höhe (min): <<1>>km\n + #autoLOC_SCANsat_AltitudeBest = Höhe (ideal): <<1>>km\n + #autoLOC_SCANsat_AltitudeMax = Höhe (max): <<1>>km\n + #autoLOC_SCANsat_FOV = Sichtwinkel: <<1>> + } +} diff --git a/SCANassets/Resources/Localization/Parts.cfg b/SCANassets/Resources/Localization/Parts.cfg new file mode 100644 index 000000000..2df962e43 --- /dev/null +++ b/SCANassets/Resources/Localization/Parts.cfg @@ -0,0 +1,38 @@ +Localization +{ + en-us + { + #autoLOC_SCANsat_Radar = SCAN brings you this high performance RADAR altimetry sensor. This is the entry-level model in this sensor family, and commonly sold in a bundle with toy rockets and remote-controlled model planes. After focus group testing revealed that 95% of the target audience tried to duct tape it to the exhaust pipe of their rocket engines, this new and improved model has been made even easier to use. + #autoLOC_SCANsat_Multi = This multichannel sensor detects radiation across several infrared, visible light, and RADAR bands. This gives it the capability to differentiate between terrain types and biomes. It can also detect anomalies such as structures on the ground. + #autoLOC_SCANsat_SAR = This Synthetic Aperture RADAR sensor uses its flight path to simulate a much larger antenna. This makes it possible to detect terrain elevation at much higher resolution. The downside is that its field of view is comparatively small, and it works better at higher altitudes. + #autoLOC_SCANsat_BTDT = This small sensor can automatically identify nearby anomalies. Since it only works over very short distances and at very low altitudes, it's primarily useful to track identified anomalies that have been visited. + } + ru + { + #autoLOC_SCANsat_Radar = SCAN представляет высокопроизводительный РАДАРный сенсор высоты! Это модель начального уровня в данном семействе датчиков, и она обычно продается в комплекте с игрушечными ракетами и радиоуправляемыми самолетиками. После того, как тестирование на потребителях показало, что 95% целевой аудитории пытались примотать датчик скотчем к выхлопной трубе своих ракетных двигателей, эта новая и улучшенная модель стала еще проще в использовании! + #autoLOC_SCANsat_Multi = Этот многоканальный датчик детектирует излучение на инфракрасном, световом и радио диапазонах. Это позволяет различать при сканировании типы ландшафтов и биомы небесного тела, а так же обнаруживать аномалии, такие как структуры на поверхности. + #autoLOC_SCANsat_SAR = Этот РАДАР с синтезированной апертурой требует своеобразную траекторию полета для имитации гораздо большей антенны. Это позволяет распознавать параметры местности при гораздо большем разрешении. Узким местом является то, что поле зрения датчика сравнительно невелико, и он лучше работает на больших высотах. + #autoLOC_SCANsat_BTDT = Этот небольшой датчик может автоматически идентифицировать близлежащие аномалии. Поскольку он работает только на очень коротких расстояниях и на очень малых высотах, в первую очередь рекомендуется распознать уже выявленные аномалии. + } + es-es + { + #autoLOC_SCANsat_Radar = SCAN te brinda este sensor de altimetría RADAR de alto rendimiento. Este es el modelo de entrada en esta familia de sensores, y comúnmente vendido en conjunto con cohetes de juguete y modelos de aviones a control remoto. Después de que una prueba grupal revelara que el 95% de la audiencia determinada tratase de pegarlo con cinta adhesiva al tubo de escape de sus motores de cohetes, este nuevo y mejorado modelo ah sido hecho más fácil de usar. + #autoLOC_SCANsat_Multi = Este sensor multicanal detecta radiación a través de bandas de infrarojo, luz visible y RADAR. Esto le da la capacidad de diferenciar entre diferentes tipos de terrenos y biomas. También puesde detectar anomalias tales como estructuras en el suelo. + #autoLOC_SCANsat_SAR = Este sensor de Apertura Sintética RADAR usa su trayectoria de vuelo para simular una antena mas larga. Haciendo esto posible detectar la elevacion del terreno a una mayor resolución. El inconveniente es que su campo de vision es comparativamente pequeño, y funciona mejor a mayores altitudes. + #autoLOC_SCANsat_BTDT = Este pequeño sensor puede detectar automáticamente anomalias cercanas. Ya que solo trabaja a muy corta distancia y a muy baja altitud, es principalmente útil para tener un historial de las anomalias identificadas que han sido visitadas. + } + zh-cn + { + #autoLOC_SCANsat_Radar = SCAN给你带来高性能雷达测高传感器。它是这个传感器家族的入门型,通常和玩具火箭、遥控飞机模型捆绑销售。研究小组经研究得知95%的目标受众尝试用胶带把它粘到火箭排气口上,这种改进似乎使之更容易使用。 + #autoLOC_SCANsat_Multi = 这个多谱段传感器检测到的辐射包括了红外波段,可见光波段与雷达波段,这给了它区分地形类型和生物群系的能力。它也可以用于扫描异常点,比如地表特殊结构。 + #autoLOC_SCANsat_SAR = 这种合成孔径雷达测高传感器使用它的飞行路径来模拟一个更大的天线,这使得其可以使用更高的分辨率扫描地形,缺点是视野比较小,并且它在更高的地方才能获得最佳工作状态。 + #autoLOC_SCANsat_BTDT = 这个小的传感器能自动识别附近的异常,就算它只在非常短的距离内和非常低的高度上工作,可用于跟踪已识别的异常点,非常有用。 + } + de + { + #autoLOC_SCANsat_Radar = SCAN bringt Euch diesen Hochleistungs-RADAR-altimetrie-Sensor. Dies ist das Einstiegsmodell dieser Sensorfamilie und wird üblicherweise zusammen mit Spielzeugraketen und ferngesteuerten Modellflugzeugen ausgeliefert. Als nach gezieltem Gruppentesten herausgefunden wurde, daß 95% des Zielklientels einfach versuchen das Gerät mit Panzer-Tape an das Auspuffrohr einer Raketenturbopumpe zu befestigen, wurde dieses verbesserte Modell in seiner Handhabung deutlich vereinfacht. + #autoLOC_SCANsat_Multi = Dieser Multispektrale Mehrkanalsensor detektiert Strahlung über mehrere Infrarot, visuelle und Radar-Frequenzbänder. Dies gibt ihm die Fähigkeit zwischen verschiedenen Biomen und Geländearten zu unterscheiden. Ebenso kann er Anomalien und Strukturen auf dem Boden detektieren. + #autoLOC_SCANsat_SAR = Dieses Radar mit synthetischer Apertur (SAR) nutzt seinen Orbit um eine deutlich größere Antenne zu simulieren. Dies ermöglicht es äußerst hoch auflösende Terrain-Elevationsdaten zu erhalten. Die Kehrseite jedoch ist der relativ kleine Sichtwinkel und die Anforderung an größere Orbitale höhen. + #autoLOC_SCANsat_BTDT = Dieser kleine Sensor kann automatisch Anomalien in geringer Entfernung identifizieren. Da er nur auf sehr kurzen Reichweiten arbeitet, ist er hauptsächlich zum detaillierten scannen bereits aufgespürter Anomalien nützlich. + } +} diff --git a/SCANassets/Resources/Localization/Science.cfg b/SCANassets/Resources/Localization/Science.cfg new file mode 100644 index 000000000..d08c5d422 --- /dev/null +++ b/SCANassets/Resources/Localization/Science.cfg @@ -0,0 +1,429 @@ +Localization +{ + en-us + { + #autoLOC_SCANsat_Science_Lo_Title = Low Resolution Altimetry Scan + #autoLOC_SCANsat_Science_Lo_Default1 = Analyzed low resolution altimetry data. + #autoLOC_SCANsat_Science_Lo_Defualt2 = "RADAR Altimetry Sensor is reporting in. I don't know how, but we have a strong signal and are getting data. This calls for a celebratory round of snacks!" + #autoLOC_SCANsat_Science_Lo_Sun = You wonder if the sensor is malfunctioning. + #autoLOC_SCANsat_Science_Lo_Moho = Well, at least this low resolution data makes Moho look kind of cool. Not quite giant lakes of lava, but still cool. + #autoLOC_SCANsat_Science_Lo_Eve = You contemplate the grainy, rough altitude estimates returned by the scanner and wish that you had sent the high resolution scanner instead. Oh well, it's a great reason to launch more rockets! (As if we really needed a reason anyway.) + #autoLOC_SCANsat_Science_Lo_Gilly = Your low resolution scanning confirms what you already knew: Gilly is just a lumpy rock floating in space. At least you don't have to strain your eyes looking at the report. + #autoLOC_SCANsat_Science_Lo_Kerbin = Even this low resolution data of the planets surface is amazingly useful. You can't wait to deploy this technology on the Mun or beyond. + #autoLOC_SCANsat_Science_Lo_Mun = The data shows broad, sweeping strokes of the landscape below. A high resolution scan would be more helpful, but you can probably find a suitable landing site using this data. + #autoLOC_SCANsat_Science_Lo_Minmus = You grudgingly acknowledge that the guys over at the Kerbal Astronomical Society were right: Minmus really is a moon. You wouldn't have believed it if you hadn't seen the altimetry scan with your own eyes. + #autoLOC_SCANsat_Science_Lo_Duna = This low resolution data is a bit grainy and distorted, but it will still be invaluable in searching for a proper landing site on Duna. Suddenly a long-term Duna mission just became a real prospect. + #autoLOC_SCANsat_Science_Lo_Ike = As you pore over the data you are struck by how similar Ike appears to the Mun. You wonder about their comparative surface geology. + #autoLOC_SCANsat_Science_Lo_Dres = Even with the low resolution scanner it is quite apparent that Dres has some prominent mountains. You can't wait for the resource scan results because you're sure "there's gold in them their hills". + #autoLOC_SCANsat_Science_Lo_Jool = Altimetry, what altimetry? It's a gas giant for Kerbal's sake. Let's just pick a number at random and call it good. + #autoLOC_SCANsat_Science_Lo_Laythe = The sensor seems unable to penetrate the water. + #autoLOC_SCANsat_Science_Lo_Vall = Well, here it is: "The data you Vall been waiting for! Hahahahaha! Hahaha. Ha. Ha? What, SOMEONE has to find that funny." + #autoLOC_SCANsat_Science_Lo_Tylo = You're still not sure what the view from the surface with Laythe, Vall, and Jool overhead would be like, but this data will sure help you find a landing site so that you can find out. + #autoLOC_SCANsat_Science_Lo_Bop = Well, the low resolution altimetry data is in, and you decide to package it up and send it back to KSC. You just hope that there is enough juice left in the batteries to get it all sent and keep basic systems running at the same time. + #autoLOC_SCANsat_Science_Lo_Pol = The low resolution scan confirms that Pol does indeed look like a giant pollen grain. Until you upgrade to a high resolution scan, and advance the field of electron microscopy, you will still be left with the question of how strong this resemblance truly is. + #autoLOC_SCANsat_Science_Lo_Eeloo = The scientists back on Kerbin have been waiting for this data for a long time. No doubt there will be celebrations and snacks for all when it gets there. + #autoLOC_SCANsat_Science_Hi_Title = High Resolution Altimetry Scan + #autoLOC_SCANsat_Science_Hi_Default1 = Analyzed high resolution altimetry data. + #autoLOC_SCANsat_Science_Hi_Default2 = "The High Resolution Altimetry Scan definitely is better then the low resolution one. SCAN has once again proven their scanning skills." + #autoLOC_SCANsat_Science_Hi_Sun = You realize that you could have saved some money if you had trusted the low resolution sensor in the first place. + #autoLOC_SCANsat_Science_Hi_Moho = Finally, the awesomeness has returned to Moho! It may not be giant flowing rivers of lava, but this data is spectacular! + #autoLOC_SCANsat_Science_Hi_Eve = The high resolution sensor cut through the hazy purple atmosphere well, and you are able to distinguish minute details on the surface. The scientists back at KSC will be relieved. + #autoLOC_SCANsat_Science_Hi_Gilly = Even in super-high resolution Gilly somehow seems to be in low resolution. That is one seriously lumpy surface. + #autoLOC_SCANsat_Science_Hi_Kerbin = You become mesmerised by all the colors in the data that the new high resolution technology provides. Suddenly Mission Control awakes you from your stupor, and you quickly wipe the drool from the corner of your mouth. + #autoLOC_SCANsat_Science_Hi_Mun = "Hah! No more boring grey moon. Just look at all the colors in that scan! Now we can really pinpoint a prime landing site." + #autoLOC_SCANsat_Science_Hi_Minmus = Wow, not only is Minmus real, it has some amazing topography! You can't wait to land in one of those flat areas. + #autoLOC_SCANsat_Science_Hi_Duna = This high resolution data is amazing. You begin analyzing the hills and valleys, searching for the perfect landing spot. + #autoLOC_SCANsat_Science_Hi_Ike = The data confirms the presence of large sloping hills and craters. Hopefully the analysts back at KSC can use this to find a suitable landing place. + #autoLOC_SCANsat_Science_Hi_Dres = Those... are some serious mountains. You are glad to be analysing this data, rather than trying to climb up some of those hills. + #autoLOC_SCANsat_Science_Hi_Jool = Even in high resolution there does not appear to be a surface on Jool. So much for that theory. At least we still have the grant money! + #autoLOC_SCANsat_Science_Hi_Laythe = The map shows mostly negative heights. You consider draining Laythe just so you can climb its mountains. + #autoLOC_SCANsat_Science_Hi_Vall = The data from the high resolution scanner confirms that the surface of Vall is, indeed, "crinkly". Guess Gene owes you fifty funds. + #autoLOC_SCANsat_Science_Hi_Tylo = Tylo may have been the first of Jool's moons to be discovered, but this data makes it feel like you are discovering the moon for the first time. + #autoLOC_SCANsat_Science_Hi_Bop = Wow, look at all those colors. You have no idea what all that data means, but you're sure that this high resolution data will impress everyone back at KSC. + #autoLOC_SCANsat_Science_Hi_Pol = Even with this amount of high-quality data it is still difficult to find a suitable landing site. How the heck was this moon made, anyway? + #autoLOC_SCANsat_Science_Hi_Eeloo = The cracks and fissures on the surface stand out in striking detail as you examine the data from the SAR Altimetry Sensor. Just look at all those potential landing sites. + #autoLOC_SCANsat_Science_Multi_Title = Multispectral Analysis + #autoLOC_SCANsat_Science_Multi_Default1 = Analyzed multispectral sensor data. + #autoLOC_SCANsat_Science_Multi_Default2 = "Wow, how are we even receiving this data right now? Those SCAN engineers really know what they are doing. Either that or they have not the slightest idea what they are doing. Either way, it's time for some snacks!" + #autoLOC_SCANsat_Science_Multi_Sun1 = You are surprised by the lack of biometric data. + #autoLOC_SCANsat_Science_Multi_Sun2 = you wonder why there are no poles visible on the biome map. + #autoLOC_SCANsat_Science_Multi_Moho = As you pore through the data you wonder if you will find the elusive lava lake biome that so many scientists had speculated about. + #autoLOC_SCANsat_Science_Multi_Eve = The intricately swirled lines of Eve's biome map remind you of lava lamps and tie dyed shirts. Man those were the days. Next spacecraft to Eve will have a mandatory disco ball! + #autoLOC_SCANsat_Science_Multi_Gilly = Even with all that squinting those astronomers couldn't see the biomes here. Hah! Dumb astronomers! That's 1 point for science and 0 points for uhhhh... science. + #autoLOC_SCANsat_Science_Multi_Kerbin = This biome data is truly astounding. You just hope that it is crumb-resistant, as you remember eating a particularly messy box of snacks the day that the sensor was installed. + #autoLOC_SCANsat_Science_Multi_Mun = Huh, never knew the moon had biomes. Wonder which one the cheese is in. And if there are any other snacks there as well. + #autoLOC_SCANsat_Science_Multi_Minmus = You contemplate how fitting the name "Greater Flats" is as you pore over the data. Whoever thinks up these names is one smart Kerbal, unlike the engineers we have around here. + #autoLOC_SCANsat_Science_Multi_Duna = You comb through the biome data looking for just the right spot to gather all that sweet, sweet science data from. Mmmmm, science... and snacks. + #autoLOC_SCANsat_Science_Multi_Ike = As you pore over the data coming back from Ike you are surprised at the biome diversity. After all it's just a moon. You can't wait to get your hands on some of the scientific data locked up down there. + #autoLOC_SCANsat_Science_Multi_Dres = Poles, check. Highlands, check. Midlands, check. Lowlands, check. Ridges, check. Impact Ejecta, check. Impact Craters, check. Canyons, check. I think we got it all. Time to shut down the scanner and have some snacks! + #autoLOC_SCANsat_Science_Multi_Jool1 = You are surprised by the lack of biometric data. + #autoLOC_SCANsat_Science_Multi_Jool2 = you wonder why there are no poles visible on the biome map. + #autoLOC_SCANsat_Science_Multi_Laythe = You want to throw a party every time the sensor detects a land biome. + #autoLOC_SCANsat_Science_Multi_Vall = Pretty straightforward data: Poles, Highlands, Midlands, and Lowlands. That's a wrap. Now let's have some snacks! + #autoLOC_SCANsat_Science_Multi_Tylo = You are struck by the diversity of the biomes in the report. Not only is Tylo cool to look up from, it's cool to look down at too. + #autoLOC_SCANsat_Science_Multi_Bop = This detailed analysis of Bop's biomes will advance our understanding of the little moon beyond anything we could have hoped. It's been a great day. Snacks all around! + #autoLOC_SCANsat_Science_Multi_Pol = As you take in the biome data coming from Pol you begin to contemplate the possibility that pollen grains have biomes too. Then you quickly squash the thought, knowing what the activists would be like if they got a hold of that idea. + #autoLOC_SCANsat_Science_Multi_Eeloo = It is astounding to have such detailed biome data on a planet so far from Kerbin. You gaze in awe at the report as the data comes in. + #autoLOC_SCANsat_Science_Resource_Title = Resources Scan + #autoLOC_SCANsat_Science_Resource_Default1 = Analyzed low resolution resource data. + #autoLOC_SCANsat_Science_Resource_Default2 = "We are receiving resource sensor data now; this information looks way better than what we were getting from that other group..." + #autoLOC_SCANsat_Science_Resource_Sun = Perhaps the sun is not the best place to find surface resources. + #autoLOC_SCANsat_Science_Resource_Moho = We finally have some information about resources on Moho's surface, now we just need to figure out why anyone would want to land there. + #autoLOC_SCANsat_Science_Resource_Eve = We're getting lots of good data on Eve's surface resources, this will be great when we need to figure out how to get off of the planet. + #autoLOC_SCANsat_Science_Resource_Gilly = Initial resource scans of Gilly look interesting; it's almost like asteroid mining. + #autoLOC_SCANsat_Science_Resource_Kerbin = We finally have some data about resources on Kerbin, because, as everyone knows, if you want basic information about your own planet nothing beats sending an expensive, complicated satellite into orbit. + #autoLOC_SCANsat_Science_Resource_Mun = This resource data gives us our first good look at how suitable the Mun may be for mining purposes. + #autoLOC_SCANsat_Science_Resource_Minmus = At last, we have some resource data on Minmus, every Kerbonaut's first choice for a starter mining facility. + #autoLOC_SCANsat_Science_Resource_Duna = This resource data brings us one step closer to reliving all of our favorite lines from that recent hit Kerbal movie. + #autoLOC_SCANsat_Science_Resource_Ike = Ike may not be the solar system's most interesting celestial body, but that doesn't make this resource data any less useful. + #autoLOC_SCANsat_Science_Resource_Dres = We might as well just search some of the nearby asteroids for resources; who would ever want to bother with Dres. + #autoLOC_SCANsat_Science_Resource_Jool = Hmm, maybe a gas giant isn't the best place to go looking for surface resources... + #autoLOC_SCANsat_Science_Resource_Laythe = Well, there's lots of good data here, but precious little area on the surface where we might actually be able to land and take advantage of the resources. + #autoLOC_SCANsat_Science_Resource_Vall = Resource scans of icy Vall provide lots of interesting data. + #autoLOC_SCANsat_Science_Resource_Tylo = We'll take any resource information we can get on scary looking Tylo. + #autoLOC_SCANsat_Science_Resource_Bop = Bop may not be anyone's first choice for deciding where to look for resources, but this data may still come in handy some day. + #autoLOC_SCANsat_Science_Resource_Pol = In addition to pollen grains and strange lumpy things, Pol appears to have some interesting resource deposits. + #autoLOC_SCANsat_Science_Resource_Eeloo = Now that we've made it all the way out to Eeloo, we might as strip mine the place and move on to whatever is beyond. + } + ru + { + #autoLOC_SCANsat_Science_Lo_Title = Сканирование высоты низкого разрешения + #autoLOC_SCANsat_Science_Lo_Default1 = Обработынные карты высот низкого разрешения + #autoLOC_SCANsat_Science_Lo_Defualt2 = "РАДАРный сканер высоты докладывает. Я не знаю, как, но мы имеем сильный сигнал и получаем данные. Это требует праздничных закусок!" + #autoLOC_SCANsat_Science_Lo_Sun = Вы задаетесь вопросом, работает ли датчик? + #autoLOC_SCANsat_Science_Lo_Moho = Ну, по крайней мере, данные с низким разрешением заставляют Мохо выглядеть классно. Это не совсем гигантские озера лавы, но все выглядит круто! + #autoLOC_SCANsat_Science_Lo_Eve = Вы рассматриваете зернистые, грубые расчеты высоты, возвращаемые сканером, и хотите отправить сканер с высоким разрешением. Ну, это отличная причина для запуска большего количества ракет! (Как будто нам действительно нужна причина) + #autoLOC_SCANsat_Science_Lo_Gilly = Сканирование с низким разрешением подтверждает то, что вы уже знали: Джилли - это просто кусок камня, плавающий в космосе. По крайней мере, вам не нужно напрягать глаза, глядя на отчет. + #autoLOC_SCANsat_Science_Lo_Kerbin = Даже данные с низким разрешением поверхности планет удивительно полезны. Вы ждете не дождетесь, чтобы применить эту технологию на Мун или за ее пределами. + #autoLOC_SCANsat_Science_Lo_Mun = Данные показывают широкие, расчерченные штрихи ландшафта ниже. Сканирование с высоким разрешением было бы более полезным, но даже сейчас вы, вероятно, найдете подходящую площадку для посадки, используя эти данные. + #autoLOC_SCANsat_Science_Lo_Minmus = Вы неохотно признаете, что ребята в Кербальском астрономическом обществе были правы: Минмус действительно луна. Вы бы не поверили, если бы не видели сканирование альтиметрии собственными глазами. + #autoLOC_SCANsat_Science_Lo_Duna = Данные с низким разрешением немного зернистые и искаженные, но все равно будет иметь неоценимое значение для поиска подходящего посадочного места на Дюне. Внезапно долгосрочная миссия Дюны стала настоящей перспективой. + #autoLOC_SCANsat_Science_Lo_Ike = По мере того, как вы порываете данные, вы поражаетесь тому, как подобное Ик проявляется в Муне. Вы интересуетесь их сравнительной поверхностной геологией. + #autoLOC_SCANsat_Science_Lo_Dres = Даже с помощью сканера с низким разрешением вполне очевидно, что у Дреса есть некоторые выдающиеся горы. Вы ждете не дождетесь результатов сканирования ресурсов, потому что уверены: «в них есть золото на холмах». + #autoLOC_SCANsat_Science_Lo_Jool = Альтиметрия, какая альтиметрия? Это газовый гигант Кербола. Давайте просто выберите номер наугад и назовите это хорошо. + #autoLOC_SCANsat_Science_Lo_Laythe = Датчик кажется неспособным проникнуть в воду. + #autoLOC_SCANsat_Science_Lo_Vall = Ну, вот он: «Данные, которые вы ожидали, Валл! Ха-ха-ха-ха! Ха-ха-ха. Ха-ха. Что, КТО-ТО нужно найти это смешно». + #autoLOC_SCANsat_Science_Lo_Tylo = Вы по-прежнему не уверены в том, что будет выглядеть вид сверху с помощью тотализатора Лейт, шара Дреса и Джула, но эти данные обязательно помогут вам найти место для посадки, чтобы вы могли это выяснить. + #autoLOC_SCANsat_Science_Lo_Bop = Ну, данные с низкой разрешающей способностью имеются, и вы решили их упаковать и отправить в ККЦ. Вы просто надеетесь, что в батареях осталось достаточное количество энергии, чтобы получить все это, и одновременно поддерживать базовые системы. + #autoLOC_SCANsat_Science_Lo_Pol = Сканирование с низким разрешением подтверждает, что Пол действительно выглядит как гигантское зерно пыльцы. Пока вы не перейдете на сканирование с высоким разрешением и не продвинетесь в область электронной микроскопии, вам все равно останется вопрос о том, насколько сильно это сходство действительно. + #autoLOC_SCANsat_Science_Lo_Eeloo = Ученые, вернувшиеся на Кербин, долгое время ждали этих данных. Без сомнения, там будут празднования и закуски для всех, когда данные туда попадут. + #autoLOC_SCANsat_Science_Hi_Title = Сканирование высоты Высокого разрешения + #autoLOC_SCANsat_Science_Hi_Default1 = Обработанная карта Высокого разрешения. + #autoLOC_SCANsat_Science_Hi_Default2 = «Высокое разрешение определенно лучше, чем низкое. СКАН еще раз доказал свои навыки сканирования». + #autoLOC_SCANsat_Science_Hi_Sun = Вы понимаете, что могли бы сэкономить деньги, если бы вы доверяли датчику низкого разрешения. + #autoLOC_SCANsat_Science_Hi_Moho = Наконец, удивительность вернулась в Мохо! Это могут быть не гигантские текучие реки лавы, но эти данные впечатляют! + #autoLOC_SCANsat_Science_Hi_Eve = Датчик высокого разрешения пробивается сквозь туманную фиолетовую атмосферу, и вы можете отличить мельчайшие детали на поверхности. Ученые в ККЦ будут спокойны. + #autoLOC_SCANsat_Science_Hi_Gilly = Даже в сверхвысоком разрешении Джилли каким-то образом кажется в низком разрешении. Это одна серьезная кусковая поверхность. + #autoLOC_SCANsat_Science_Hi_Kerbin = Вы становитесь загипнотизированными всеми цветами в данных, которые предоставляет новая технология высокого разрешения. Внезапно Звонок на обед пробуждает вас от вашего оцепенения, и вы быстро вытираете слюну из угла рта. + #autoLOC_SCANsat_Science_Hi_Mun = «Нет, теперь это не скучная серая луна, просто посмотри на все цвета в этом сканировании! Теперь мы можем точно определить место посадки». + #autoLOC_SCANsat_Science_Hi_Minmus = Вау, это не только Минмуские площадки, но и потрясающая топография! Вы не можете дождаться приземления в одной из этих плоских областей. + #autoLOC_SCANsat_Science_Hi_Duna = Это данные с высоким разрешением потрясающие. Вы начинаете анализировать холмы и долины, ища идеальное место для посадки. + #autoLOC_SCANsat_Science_Hi_Ike = Данные подтверждают наличие больших наклонных холмов и кратеров. Надеюсь, аналитики в ККЦ могут использовать это, чтобы найти подходящее место для посадки. + #autoLOC_SCANsat_Science_Hi_Dres = Это ... серьезные горы. Вы думаете как бы обработать эти данные вместо того, чтобы пытаться подняться на некоторые из этих пиков. + #autoLOC_SCANsat_Science_Hi_Jool = Даже в высоком разрешении, похоже, нет поверхности на Джул. Так много для этой теории. По крайней мере, у нас все еще есть деньги с гранта! + #autoLOC_SCANsat_Science_Hi_Laythe = На карте показаны преимущественно отрицательные высоты. Вы считаете, что вы сглаживаете Лайт, чтобы вы могли подняться на горы. + #autoLOC_SCANsat_Science_Hi_Vall = Данные из сканера с высоким разрешением подтверждают, что поверхность Волл, действительно, "измятая". Угадайте, Джин должен вам пятьдесят фондов. + #autoLOC_SCANsat_Science_Hi_Tylo = Тило, возможно, был первым из лун Джула, который должен быть обнаружен, но эти данные заставляют чувствовать, что вы впервые открываете луну. + #autoLOC_SCANsat_Science_Hi_Bop = Ничего себе, посмотри на все эти цвета. Вы не представляете, что означают все эти данные, но вы уверены, что данные с высоким разрешением поражают всех в ККЦ. + #autoLOC_SCANsat_Science_Hi_Pol = Даже при таком количестве высококачественных данных по-прежнему сложно найти подходящую площадку для посадки. Как все-таки эта луна сделалась? + #autoLOC_SCANsat_Science_Hi_Eeloo = Трещины и трещины на поверхности выделяются поразительной деталью, когда вы изучаете данные датчика. Просто посмотрите на все эти потенциальные площадки для посадки. + #autoLOC_SCANsat_Science_Multi_Title = Мультиспектральный анализ + #autoLOC_SCANsat_Science_Multi_Default1 = Обработанные данные датчика мультиспектрального анализа. + #autoLOC_SCANsat_Science_Multi_Default2 = «Вау, как мы получаем данные прямо сейчас? Эти инженеры SCAN действительно знают, что они делают. Либо это, либо они не имеют ни малейшего представления о том, что они делают. В любом случае, пришло время для некоторых закусок!» + #autoLOC_SCANsat_Science_Multi_Sun1 = Вы удивлены отсутствием биометрических данных. + #autoLOC_SCANsat_Science_Multi_Sun2 = Вы удивляетесь, почему на карте биома нет видимых полюсов. + #autoLOC_SCANsat_Science_Multi_Moho = По мере того, как вы просматриваете данные, вам интересно, обнаружите ли вы неуловимый биом озера лавы, о котором столько размышляли многие ученые. + #autoLOC_SCANsat_Science_Multi_Eve = Затейливо закрученные линии карты биомов Ив напоминают вам о ламповых лампах и галстуках, окрашенных в рубашки. Хорошо было тем временем. На следующем космическом корабле Еве будет обязательный бал. + #autoLOC_SCANsat_Science_Multi_Gilly = Даже при том, что эти косички эти астрономы не могли видеть здесь биомы. Хах! Тупые астрономы! Это 1 очко для науки и 0 баллов за уххх ... науку. + #autoLOC_SCANsat_Science_Multi_Kerbin = Данные биома действительно поразительны. Вы просто надеетесь, что он устойчив к крошке, поскольку вы помните, что в день, когда был установлен датчик, брали особенно крошашуюся коробку с печеньками. + #autoLOC_SCANsat_Science_Multi_Mun = Да, никогда не знал, что у луны есть биомы. Интересно, в какой из них сыр. И есть ли и другие закуски. + #autoLOC_SCANsat_Science_Multi_Minmus = Вы размышляете над тем, как подгонять название "Большие плоскости", как вы лениво смотрите данные. Кто бы ни думал об этих именах, тот умный Кербал, в отличие от инженеров, которых мы имеем здесь. + #autoLOC_SCANsat_Science_Multi_Duna = Вы расчесываете данные биома, ища только подходящее место, чтобы собрать все эти сладкие, сладкие научные данные. Ммммм, наука ... и закуски. + #autoLOC_SCANsat_Science_Multi_Ike = По мере того, как вы перебираете данные, возвращаемые с Айка, вы удивляетесь разнообразию биомов. В конце концов, это просто луна. Вы ждете не дождетесь, когда получите какие-то научные данные. + #autoLOC_SCANsat_Science_Multi_Dres = Поляки, проверка. Нагорье, проверьте. Мидлендс, проверьте. Низменность, проверка. Риджес, чек. Воздействие выброса, проверьте. Кратеры воздействия, проверка. Каньоны, проверьте. Думаю, у нас все получилось. Время выключить сканер и взять закуски! + #autoLOC_SCANsat_Science_Multi_Jool1 = Вы удивлены отсутствием биометрических данных. + #autoLOC_SCANsat_Science_Multi_Jool2 = Вы удивляетесь, почему на карте биома нет видимых полюсов. + #autoLOC_SCANsat_Science_Multi_Laythe = Вы хотите бросить вечеринку каждый раз, когда датчик обнаруживает наземный биом. + #autoLOC_SCANsat_Science_Multi_Vall = Довольно простые данные: поляки, нагорья, Мидлендс и Низменность. Это обертка. Теперь давай закуски! + #autoLOC_SCANsat_Science_Multi_Tylo = Вы поражены разнообразием биомов в отчете. Мало того, что Тило круто смотреть, здорово смотреть вниз. + #autoLOC_SCANsat_Science_Multi_Bop = Этот подробный анализ биомов Бопа будет способствовать нашему пониманию маленькой луны за пределами того, что мы могли бы надеяться. Это был отличный день. Закуски вокруг! + #autoLOC_SCANsat_Science_Multi_Pol = Когда вы берете данные биома, поступающие от Пол, вы начинаете рассматривать возможность того, что пыльцевые зерна также имеют биомы. Затем вы быстро давите эту мысль, зная, как будут выглядеть активисты зеленых, если они поймут эту идею. + #autoLOC_SCANsat_Science_Multi_Eeloo = Удивительно иметь такие подробные данные о биоме на планете, которая находится далеко от Кербина. Вы в восторге смотрите отчет, когда поступают данные. + #autoLOC_SCANsat_Science_Resource_Title = Сканирование ресурсов + #autoLOC_SCANsat_Science_Resource_Default1 = Обработанные данные о ресурсах низкого разрешения. + #autoLOC_SCANsat_Science_Resource_Default2 = «Сейчас мы получаем данные датчика ресурсов, эта информация выглядит лучше, чем то, что мы получали от другой группы ...» + #autoLOC_SCANsat_Science_Resource_Sun = Возможно, звезда не лучшее место для поиска ресурсов. + #autoLOC_SCANsat_Science_Resource_Moho = Наконец, у нас есть информация о ресурсах на поверхности Мохо, теперь же нам просто нужно выяснить, почему кто-то хочет туда приземляться. + #autoLOC_SCANsat_Science_Resource_Eve = Мы получаем много хороших данных о поверхностных ресурсах Ив, это будет здорово, когда нам нужно выяснить, как сойти с планеты. + #autoLOC_SCANsat_Science_Resource_Gilly = Первоначальные исследования ресурсов Гилли выглядят интересными; Это почти похоже на добычу астероидов. + #autoLOC_SCANsat_Science_Resource_Kerbin = Наконец, у нас есть некоторые данные о ресурсах на Кербине, потому что, как известно, если вы хотите, чтобы основная информация о вашей собственной планете ничего не делала, отправляя на орбиту дорогостоящий сложный спутник. + #autoLOC_SCANsat_Science_Resource_Mun = Эти данные о ресурсах дают нам наш первый хороший взгляд на то, насколько подходящим может быть Мун для целей добычи. + #autoLOC_SCANsat_Science_Resource_Minmus = Наконец, у нас есть некоторые данные о ресурсах на Минмусе, являющемся каждым первым выбором для начала добычи. + #autoLOC_SCANsat_Science_Resource_Duna = Эти данные о ресурсах приближают нас к тому, чтобы пережить все наши любимые строки из недавнего фильма «Кербал». + #autoLOC_SCANsat_Science_Resource_Ike = Айк может быть не самым интересным небесным телом Солнечной системы, но это не делает данные ресурса менее полезными. + #autoLOC_SCANsat_Science_Resource_Dres = Мы могли бы также просто найти некоторые из близлежащих астероидов для ресурсов; Который когда-нибудь захочет побеспокоиться с Дресом. + #autoLOC_SCANsat_Science_Resource_Jool = Хм, может быть, газовый гигант - не лучшее место для поиска поверхностных ресурсов ... + #autoLOC_SCANsat_Science_Resource_Laythe = Ну, здесь есть много хороших данных, но здесь очень мало места на поверхности, где мы могли бы реально приземлиться и воспользоваться ресурсами. + #autoLOC_SCANsat_Science_Resource_Vall = Сканирование ресурсов ледяного Валл предоставляет множество интересных данных. + #autoLOC_SCANsat_Science_Resource_Tylo = Мы возьмем любую информацию о ресурсах, которую мы можем получить от страшного Тило. + #autoLOC_SCANsat_Science_Resource_Bop = Bop не может быть первым выбором для решения, где искать ресурсы, но эти данные могут когда-нибудь пригодиться. + #autoLOC_SCANsat_Science_Resource_Pol = В дополнение к пыльцевым зернам и странным кусковым вещам у Пола, похоже, есть интересные вклады в ресурсы. + #autoLOC_SCANsat_Science_Resource_Eeloo = Теперь, когда мы добрались до Иилу, мы могли бы добыть все что нужно и перейти к тому, что за его пределами. + + } + es-es + { + #autoLOC_SCANsat_Science_Lo_Title = Scáner de Altimetría de Baja Resolucion + #autoLOC_SCANsat_Science_Lo_Default1 = Se analizaron los datos de altimetría de baja resolución. + #autoLOC_SCANsat_Science_Lo_Defualt2 = "Sensor de altimetría RADAR está reportando. No se como, pero tenemos una señal fuerte y esta obteniendo datos. Esto amerita una ronda de celebracion de Snacks!" + #autoLOC_SCANsat_Science_Lo_Sun = Te pregutnas si el sensor está funcionando mal. + #autoLOC_SCANsat_Science_Lo_Moho = Bueno, al menos estos datos de baja resolucion hacen parecer genial a Moho. No son lagos gigantes de lava, pero genial sin duda. + #autoLOC_SCANsat_Science_Lo_Eve = Contemplas los borrosos, y ásperos estimados de altitud regresados por el scáner y deseas haber enviado el escáner de alta resolucion. Oh bueno, ¡Es una gran razón para lanzar mas cohetes! (Como si necesitaramos una razon de todos modos) + #autoLOC_SCANsat_Science_Lo_Gilly = Tu scaneo de baja resolución confirma lo que ya sabías: Gilly solo es una roca grumosa flotando en el espacio. Al menos no tienes que esforzar tus ojos al ver el reporte. + #autoLOC_SCANsat_Science_Lo_Kerbin = Incluso estos datos de baja resolución de la superficie del planeta son sorprendentemente útiles. No puedes esperar para desplegar esta tecnología hacia Mun o más allá. + #autoLOC_SCANsat_Science_Lo_Mun = Los datos se muestran extensos, recorriendo trazos del terreno debajo. Un scaneo de alta resolucion ayudaria más, pero probablemente puedes usar estos datos para encontrar un punto de aterrizaje adecuado. + #autoLOC_SCANsat_Science_Lo_Minmus = Reconoces a regañadientes que los chicos en la Sociedad Astronómica de Kerbal tenian rezón: Minmus es realmente una luna. No lo hubieses creido si no hubieras visto el escáner de altimetría con tus propios ojos. + #autoLOC_SCANsat_Science_Lo_Duna = Estos datos de baja resolución son un poco borrosos y distorsionados, pero aun será invaluable en la busqueda de un punto de aterrizaje adecuado en Duna. De repente, una misión de largo plazo a Duna se vuelve una perspectiva real. + #autoLOC_SCANsat_Science_Lo_Ike = Mientras revisas los datos te sorprendes por los similar que es Ike con Mun . Te preguntas sobre la comparación entre la geología de sus superficies. + #autoLOC_SCANsat_Science_Lo_Dres = Incluso con este escáner de baja resolución es bastante aparente que Dres tiene algunas prominentes montañas. No puedes esperar por los resultados del escáner de recursos por que estás seguro que "¡Hay oro en esas montañas!". + #autoLOC_SCANsat_Science_Lo_Jool = ¿Altimetría, que altimetría? Es un gigante gaseoso por el amor de Kerbal. Solo escojamos un número aleatorio y listo. + #autoLOC_SCANsat_Science_Lo_Laythe = El sensor parece incapaz de penetrar el agua. + #autoLOC_SCANsat_Science_Lo_Vall = Bueno, aquí está: "Los Vall-iosos datos que todos estaban esperando. JAJAJAJA. Jajaja. Ja. Ja? ¿Qué? Al menos ALGUIEN tiene que pensar que fue chistoso." + #autoLOC_SCANsat_Science_Lo_Tylo = Aún no estás seguro como la vista desde arriba va a ser en Laythe, Vall y Jool; pero estos datos de seguro te van a ayudar a encontrar un punto de aterrizaje para poder averiguarlo. + #autoLOC_SCANsat_Science_Lo_Bop = Bueno, los datos de altimetría de baja resolucion están aqui, y decides empacarlo y enviarlo de vuelta al CSK. Solo esperas que haya suficiente jugo en las baterías para enviar todo y matener los sistemas basicos funcionando al mismo tiempo. + #autoLOC_SCANsat_Science_Lo_Pol = El scaneo de baja resolución confirma que Pol luce como un grano gigante de polen. Hasta que mejores a un escáner de alta resolución, y avances en el campo de los microscopios de electrones, te quedaras con la duda de que tan fuerte es está similitud realmente. + #autoLOC_SCANsat_Science_Lo_Eeloo = Los científicos en Kerbin han estado esperando por estos datos por mucho tiempo. No hay duda de que habra una celebración y muchos snacks para todos cuando lleguen los datos. + #autoLOC_SCANsat_Science_Hi_Title = Scáner de Altimetría de Alta Resolución + #autoLOC_SCANsat_Science_Hi_Default1 = Se analizaron los datos de altimetría de alta resolución. + #autoLOC_SCANsat_Science_Hi_Default2 = "El Scáner de Altimetría de Alta Resolución se definitivamente mejor que el de baja resolución. SCAN una vez mas ah demostrado sus habilidades de escaneo." + #autoLOC_SCANsat_Science_Hi_Sun = Te das cuenta que hubieras ahorrado dinero si le hubieses creido al escáner de baja resolución en primer lugar. + #autoLOC_SCANsat_Science_Hi_Moho = ¡Finalmente, lo asombroso ah regresado a Moho! Quizás no sean ríos gigantes de lava, pero estos datos son espectaculares! + #autoLOC_SCANsat_Science_Hi_Eve = El sensor de alta definición atravesó bien la brumosa atmósfera morada,y eres capaz de distinguir detalles minusiosos en la superficie. Los científicos en el CSK estaran alividados. + #autoLOC_SCANsat_Science_Hi_Gilly = Incluso en super alta resolución parece que Gilly estuviera en baja resolución. Esa es una superficie realmente grumosa. + #autoLOC_SCANsat_Science_Hi_Kerbin = Te quedas hipnotizado por todos los colores en los datos que la nueva tecnología de alta resolución provee. De rependete,Control de Misión te despierta de tu trance, rapidamente te quitas la baba de la comisura de tu boca. + #autoLOC_SCANsat_Science_Hi_Mun = "¡Ajá! No mas aburrida luna gris. ¡Solo mira todos elos colores en el escáner! Ahora podemos escoger un punto de aterrizaje de primera calidad." + #autoLOC_SCANsat_Science_Hi_Minmus = Wow, no solo Minmus es real, ¡Tiene una toporafía sorprendente! No puedes esperar para aterrizar en una de esas grandes llanuras. + #autoLOC_SCANsat_Science_Hi_Duna = Estos datos de alta resolución son asombrosos. Empiezas a analirzar las colinas y valles, buscando por el punto de aterrizaje perfecto. + #autoLOC_SCANsat_Science_Hi_Ike = Los datos confirman la prescencia de crateres y colinas con grandes pendientes. Ojalá los analistas en el CSK pueden encontrar un punto de aterrizaje adecuado. + #autoLOC_SCANsat_Science_Hi_Dres = Esas... son unas montañas algo misteriosas. Estás contento de estar analizando estos datos, en vez de tratar de colinas. + #autoLOC_SCANsat_Science_Hi_Jool = Incluso en alta definición parece no haber una superficie en Jool. Tanto por esa teoría. ¡Al menos aun tenemos el dinero del contrato! + #autoLOC_SCANsat_Science_Hi_Laythe = El mapa muestra mayormente alturas negativas. consideras drenar Laythe para poder escalar una de esas montañas. + #autoLOC_SCANsat_Science_Hi_Vall = Los datos del escáner de alta resolucion muestra que la superficie de Vall es, en efecto, "crujiente". Supongo que Gene te debe dinero. + #autoLOC_SCANsat_Science_Hi_Tylo = Tylo quizás haya sido una de las priemras lunas de Jool en ser descubiertas, pero estos datos te hacen sentir como si estuvieras descubriendo esta luna por la primera vez. + #autoLOC_SCANsat_Science_Hi_Bop = Wow, mira todos esos colores. No tienes idea que significan todos estos datos, pero estás seguro que estos datos de alta resolución impresionaran a todos de regreso en el CSP. + #autoLOC_SCANsat_Science_Hi_Pol = Incluso con estos datos de alta resolucion, aun es difícil encontrar un bueno punto de aterrizaje. ¿De todas formas, como rayos se formo esta luna? + #autoLOC_SCANsat_Science_Hi_Eeloo = Las gritas y fisuras en la superficie sobresalen con sorprendente definición mientras examinas los datos del sensor. Solo mira todos esos posible puntos de aterrizaje. + #autoLOC_SCANsat_Science_Multi_Title = Análisis de Multiespectro + #autoLOC_SCANsat_Science_Multi_Default1 = Se analizaron los datos del sensor de Multiespectro. + #autoLOC_SCANsat_Science_Multi_Default2 = "¿Wow, como es que siquiera estamos reciviendo estos datos? Esos ingenieros de SCAN realmente saben lo que hacen. O es eso, o no tienen la mas mínima idea de lo que hacen. De cualquier forma. es tiempo de unos Snacks!" + #autoLOC_SCANsat_Science_Multi_Sun1 = Te sorprende la falta de datos biométricos. + #autoLOC_SCANsat_Science_Multi_Sun2 = Te preguntas por que los polos no son visibles en el mapa. + #autoLOC_SCANsat_Science_Multi_Moho = Mientras revisas los datos, te preguntas si encontrarás el elusivo bioma de el "Lago de Lava" el cual muchos científicos han especualado. + #autoLOC_SCANsat_Science_Multi_Eve = Las intrincadas lineas curveadas del mapa de biomas de Eve te recuerdan lámparas de lava y camisetas teñidas. ¡Esos eran los días!. ¡La siguiente nave espacial hacia Eve tendra una bola disco obligatoria! + #autoLOC_SCANsat_Science_Multi_Gilly = Incluso poniendo los ojos bizcos, los astrónomos no podian ver los biomas. ¡Ja! ¡Astrónomos tontos! 1 punto para la ciencia y 0 puntos para, este.... sciencia. + #autoLOC_SCANsat_Science_Multi_Kerbin = Estos datos de bioma son sorprendentes. Solo esperas de que sea resistente a las migajas, ya que recuerdas haber comido una bolsas de Snacks el dia que instalaron los sensores. + #autoLOC_SCANsat_Science_Multi_Mun = Ja, nunca supe que la luna Mun tenia biomas. Me pregunto en cual de ellos estará el queso. Y si hay otros Snacks por ahí tambien. + #autoLOC_SCANsat_Science_Multi_Minmus = Contemplas que acertado es el nombre "Grandes Planicies" mientras revisas los datos. Quien sea que piensa estos nombres es un Kerbal inteligente, a diferencia de los ingenieros que tenemos por aquí. + #autoLOC_SCANsat_Science_Multi_Duna = Peinas todos los datos de bioma solo para encontrar el punto corrector para recolectar todos los dulces, dulces datos científicos. Mmmmm, ciencia... y snacks. + #autoLOC_SCANsat_Science_Multi_Ike = Mientras revisas los datos que regresan de Ika, te sorprendes con la diversidad de biomas. Despues de todo, es solo una luna. No puedes esperar por poner tus manos en uno de los datos científicos atrapados ahí abajo. + #autoLOC_SCANsat_Science_Multi_Dres = Polos, listo. Tierras altas, listo. Tierras medias, listo. Tierras bajas, listo. Crestas, listo. Impact Ejecta, clisto. Impact Cráteres, listo. Cañones, listo. Creo que los tenemos a todos. Hora de apagar el escáner y tener unos snacks! + #autoLOC_SCANsat_Science_Multi_Jool1 = Te sorprende la falta de datos biométricos. + #autoLOC_SCANsat_Science_Multi_Jool2 = Te preguntas por que no se ven los polos en el mapa. + #autoLOC_SCANsat_Science_Multi_Laythe = Quieres lanzar una fiesta cada vez que el sensor detecta un bioma de tierra. + #autoLOC_SCANsat_Science_Multi_Vall = Datos muy sencillos: Polos, Tierras altas, Tierras medias, y Tierras bajas. Listo, ahora vamos a por unos snacks. + #autoLOC_SCANsat_Science_Multi_Tylo = Te sorprende la diversidad de biomas en el reporte. No solomente es genial mirar hacia arriba desde Tylo, tambien es genial mirar hacia abajo. + #autoLOC_SCANsat_Science_Multi_Bop = Este detalaldo análisis De los biomas de Bob aumentaran nuestro entendimientos más allá de lo que cualquiera hubiera esperado. Ah sido un gran día. Snacks para todos! + #autoLOC_SCANsat_Science_Multi_Pol = Mientras recibes los datos de biomas provinientes de Pol empiezas a contemplat la posibilidad de que los granos de polen tambien tengan biomas. Pero inmediatametne destruyes esa ídea, sabiendo lo que los activistas harian si se enterasen de esta. + #autoLOC_SCANsat_Science_Multi_Eeloo = Es sorprendente tener datos de biomas de un planeta tan lejos de Kerbin. Te quedas mirando sorprendido al reporte mientras los datos van llegando. + #autoLOC_SCANsat_Science_Resource_Title = Scáner de Recursos + #autoLOC_SCANsat_Science_Resource_Default1 = Se analizaron los datos de baja resolucion de recursos. + #autoLOC_SCANsat_Science_Resource_Default2 = "Estamos recibiendo ahora los datos de recursos; esta informacion luce mucho mejor de lo que estábamos recibiendo del otro grupo..." + #autoLOC_SCANsat_Science_Resource_Sun = Quizás el sol no es el mejor lugar para buscar recursos en la superficie. + #autoLOC_SCANsat_Science_Resource_Moho = Finalmente tenemos algo de informacion sobre los recursos de la superficie de Moho, ahora solo tenemos que saber por que alguien quisiera aterrizar ahí. + #autoLOC_SCANsat_Science_Resource_Eve = Estamos obteniendo montones de excelentes datos sobre los recursos en la superficie de Eve, esto será genial para cuando tengamos que buscar uan manera de dejar el planeta. + #autoLOC_SCANsat_Science_Resource_Gilly = El escáner de recursos inicial de Gilly luce bien; es casi como minar asteroides. + #autoLOC_SCANsat_Science_Resource_Kerbin = Finalmente tenemos datos sobre los recursos de Kerbin, por que como todo el mundo sabe, si quieres informacionbásica sobre tu propio planeta nada supera mandar un costoso, complicado satélite a orbita. + #autoLOC_SCANsat_Science_Resource_Mun = Estos datos de recursos nos dan nuestra primera mirada a que tan apropiada es Mun para minar. + #autoLOC_SCANsat_Science_Resource_Minmus = Al menos, tenemos algunos datos de recursos en Minmus, primera opción de todo Kerbonauta para empezar sus instalaciones mineras. + #autoLOC_SCANsat_Science_Resource_Duna = Estos datos de recursos nos traen un paso mas cerca a revivir todas nuestras lineas favoritas en la última película Kerbalexitosa del año. + #autoLOC_SCANsat_Science_Resource_Ike = Quizas Ike no sea el cuerpo celeste más interesante del sistema solar, pero eso no hace estos datos de recursos menos útiles. + #autoLOC_SCANsat_Science_Resource_Dres =Podriamos mejor buscar recursos en los asteroides próximos; quien si quiera se molestaría con Dres. + #autoLOC_SCANsat_Science_Resource_Jool = Hmm, quizás un gigante gaseoso no sea el mejor lugar para ir a buscar recursos en la superficie... + #autoLOC_SCANsat_Science_Resource_Laythe = Bueno, hay un monton de buenos datos, pero muy poca area de preciada tierra donde podamos aterrizar y tomar ventaja de los recursos. + #autoLOC_SCANsat_Science_Resource_Vall = Escáner de recursos de la helada Vall provee datos interesantes. + #autoLOC_SCANsat_Science_Resource_Tylo = Tomaremos cualquier informacion de recursos que podamos del aterrador Tylo. + #autoLOC_SCANsat_Science_Resource_Bop = Quizas Bob no sea la primera opcion de nadie al decidir donde ir en busca de recursos, pero estos datos quizas sean útiles algún día. + #autoLOC_SCANsat_Science_Resource_Pol = Ademas de granos de polen y cosas muy grumosas, parece que Pol tiene unos depósitos de recursos interesantes. + #autoLOC_SCANsat_Science_Resource_Eeloo = Ahora que hicimos todo el camino hasta Eeloo, podríamos minar hasta vaciar el lugar y movernos a lo que sea que esté más allá. + } + zh-cn + { + #autoLOC_SCANsat_Science_Lo_Title = 低精度高度扫描 + #autoLOC_SCANsat_Science_Lo_Default1 = 分析低精度高度数据。 + #autoLOC_SCANsat_Science_Lo_Defualt2 = “雷达高度传感器正在报告数据,我不知道它是怎么做到的,但信号很强,数据也拿到了。是时候摆庆功宴了!” + #autoLOC_SCANsat_Science_Lo_Sun = 你想搞清楚传感器是不是出故障了。 + #autoLOC_SCANsat_Science_Lo_Moho = 好吧,至少这份低精度高度图让Moho看起来有那么一点酷,虽然并没有什么巨大的熔岩湖。 + #autoLOC_SCANsat_Science_Lo_Eve = 你注视着这份扫描仪传回的粗略地图,心想当初送去的是高精度的扫描仪就好了。哦好吧,这或许也是个发射更多火箭的好理由!(说得好像你需要理由一样。) + #autoLOC_SCANsat_Science_Lo_Gilly = 这份低精度地图证实了你的想法:Gilly仅仅是一块飘在太空中凹凸不平的石头,你不用盯着这份报告看上老半天了。 + #autoLOC_SCANsat_Science_Lo_Kerbin = 即使是这份低精度地图也惊人地有用,你已经迫不及待要把这项科技用在Mun或者更远的地方。 + #autoLOC_SCANsat_Science_Lo_Mun = 这份数据显示了Mun表面遭受了重创,一次高精度扫描可能会更有用,不过也许你可以用这份数据寻找合适的登陆点。 + #autoLOC_SCANsat_Science_Lo_Minmus = 你很不情愿地承认坎巴拉天文协会那帮家伙是对的:Minmus真的只是一个卫星而不是什么好吃的。如果你没有亲眼看到这份扫描数据的话你根本不会相信他们。 + #autoLOC_SCANsat_Science_Lo_Duna = 这份低精度地图有些模糊而扭曲,但它仍然能帮助你在Duna上寻找一个合适的着陆点,长期的Duna任务成为未来可展望的前景。 + #autoLOC_SCANsat_Science_Lo_Ike = 当你收到这份数据时,你被Ike和Mun惊人的相似度震惊了,你想比较它们的地表地质。 + #autoLOC_SCANsat_Science_Lo_Dres = 即使在这份低精度地图上也能清楚看到Dres上有着高耸的山峰,你等不及要看资源扫描结果了,因为你确信“这些山里有金子!” + #autoLOC_SCANsat_Science_Lo_Jool = 高度图,什么是高度图?Jool是个气态行星,随机取些数据放上去就当是弄好了吧。 + #autoLOC_SCANsat_Science_Lo_Laythe = 传感器似乎不能穿透水面看到水底。 + #autoLOC_SCANsat_Science_Lo_Vall = 喏,这就是数据,“你们希Vall拿到的数据!哈哈哈哈!哈哈哈,哈,蛤?喂,应该有人觉得好笑才对!” + #autoLOC_SCANsat_Science_Lo_Tylo = 你仍然不确定在这里抬头看Laythe,Vall和Jool是什么样子,但这份数据能帮你找到合适的着陆点,然后你就可以亲自去看看了。 + #autoLOC_SCANsat_Science_Lo_Bop = 低精度数据收到了,你准备打包后发回给KSC,你只希望电池里的电量还足够发送数据和支撑系统运转用。 + #autoLOC_SCANsat_Science_Lo_Pol = 低精度扫描证实了Pol的确看起来像一个巨大的花粉粒,在你更新了高精度扫描仪和电子显微镜之前,你永远不会知道它们两个到底有多像。 + #autoLOC_SCANsat_Science_Lo_Eeloo = Kerbin上的科学家们已经等着这份数据很久了,当数据传回之后,无疑将会有一个全员的庆祝会。 + #autoLOC_SCANsat_Science_Hi_Title = 高精度高度扫描 + #autoLOC_SCANsat_Science_Hi_Default1 = 分析高精度高度数据。 + #autoLOC_SCANsat_Science_Hi_Default2 = “高精度扫描确实比低精度好多了,SCAN再次证明了他们的扫描技能。” + #autoLOC_SCANsat_Science_Hi_Sun = 你现在意识到如果相信低精度扫描结果的话或许能省下这笔钱。 + #autoLOC_SCANsat_Science_Hi_Moho = Moho真酷!也许这里没有流动的岩浆河流,但数据真的引人注意! + #autoLOC_SCANsat_Science_Hi_Eve = 高精度传感器很好地穿透了浓厚的紫色大气,你能够分析识别表面细节了,KSC的科学家们会收到结果的。 + #autoLOC_SCANsat_Science_Hi_Gilly = 即使是超高精度扫描看起来也像是低精度的一样,真是崎岖不平的表面。 + #autoLOC_SCANsat_Science_Hi_Kerbin = 你快被高精度扫描提供的各种各样的数据催眠了,突然任务控制中心的人把你从昏睡中叫醒,你赶紧擦去了嘴角的口水。 + #autoLOC_SCANsat_Science_Hi_Mun = “啊哈!灰色的卫星不再那么无聊了,赶紧看看扫描仪上那些颜色!现在我们可以定下一个最棒的着陆场了。” + #autoLOC_SCANsat_Science_Hi_Minmus = 哇哦!Minmus不仅是真实的,它还有一些惊人的地貌!你迫不及待地想在其中一块平坦的地方着陆了。 + #autoLOC_SCANsat_Science_Hi_Duna = 这份高精度数据非常惊人,你开始分析这些山脉和峡谷,并寻找完美的着陆场。 + #autoLOC_SCANsat_Science_Hi_Ike = 这份数据证实了陡峭的山峰和火山口的存在,希望KSC的分析员能找到一个合适的地方着陆。 + #autoLOC_SCANsat_Science_Hi_Dres = 这里...有一些险峻的山峰,你很高兴能分析这份数据而不用尝试爬这些山。 + #autoLOC_SCANsat_Science_Hi_Jool = 即使是高精度也没法扫出Jool的表面,理论意义重大,至少我们还有大笔的拨款! + #autoLOC_SCANsat_Science_Hi_Laythe = 地图显示有很多负高度,你想抽干Laythe,这样你就可以爬山了。 + #autoLOC_SCANsat_Science_Hi_Vall = 高精度扫描仪的数据证明Vall的确“起伏不平”,猜想基因欠你五十块。 + #autoLOC_SCANsat_Science_Hi_Tylo = Tylo或许是第一个被发现的Jool卫星,但这份数据让你感觉你是第一次发现它。 + #autoLOC_SCANsat_Science_Hi_Bop = 哇哦!看看这些颜色,你不知道这些数据都是什么意思,但你确信这份高精度数据会给KSC的每个人留下深刻印象。 + #autoLOC_SCANsat_Science_Hi_Pol = 即使有这么多高质量的数据也难以找到一个合适的着陆点,这颗卫星TM是怎么做出来的? + #autoLOC_SCANsat_Science_Hi_Eeloo = 你在分析高精度扫描仪的数据时,表面的裂隙是最引人注意的细节,那些都可能是潜在的着陆点。 + #autoLOC_SCANsat_Science_Multi_Title = 多频段分析 + #autoLOC_SCANsat_Science_Multi_Default1 = 分析多频段传感器数据。 + #autoLOC_SCANsat_Science_Multi_Default2 = “哇哦!为什么我们现在才收到这份数据?那些SCAN工程师个个都是人才!也许他们并不知道自己在做什么。不管怎样,是时候享用一些零食了!” + #autoLOC_SCANsat_Science_Multi_Sun1 = 你惊奇于生物群系数据的匮乏。 + #autoLOC_SCANsat_Science_Multi_Sun2 = 你想知道为什么生物群系图上什么都没有。 + #autoLOC_SCANsat_Science_Multi_Moho = 你在研究这些数据时想知道能不能找到很多科学家推测存在的隐藏的岩浆湖。 + #autoLOC_SCANsat_Science_Multi_Eve = Eve那漩涡纹状的生物群系图让你想到了熔岩灯和扎染衬衫,下一艘去Eve的宇宙飞船可以装一个舞厅迪斯科球灯! + #autoLOC_SCANsat_Science_Multi_Gilly = 天文学家们眯着眼睛也看不清这里的生物群系,啊哈!沉默的天文学家们!现在比分是1比0,科学对...嗯...科学。 + #autoLOC_SCANsat_Science_Multi_Kerbin = 这份生物群系数据多得令人震惊,你希望这是安装传感器时吃零食留下来的碎屑造成的。 + #autoLOC_SCANsat_Science_Multi_Mun = 嗯,从没想到这颗卫星还有生物群系,你想知道奶酪在哪里,以及有没有其他零食碎屑在里面。 + #autoLOC_SCANsat_Science_Multi_Minmus = 你注视着这些数据,觉得“大平原”这个名字实在太棒了,想出这个名字的一定是个聪明的坎巴拉人,不像周围的这些工程师。 + #autoLOC_SCANsat_Science_Multi_Duna = 你扫视着这份数据,试图寻找收集所有香甜美味的科技点的地方,嗯...科技点...以及零食。 + #autoLOC_SCANsat_Science_Multi_Ike = 查看从Ike发回的生物群系数据时,你惊叹于那里的生物群系多样性,别忘了它仅仅是一颗卫星,你等不及要获取一些它表面的科学数据了。 + #autoLOC_SCANsat_Science_Multi_Dres = 极地,已检查;高原,已检查;内陆,已检查;低底,已检查;山脊,已检查;撞击喷出物,已检查;陨石坑,已检查;峡谷,已检查。我认为所有数据都得到了,是时候关闭扫描仪并来点零食了! + #autoLOC_SCANsat_Science_Multi_Jool1 = 你惊奇于生物群系数据的匮乏。 + #autoLOC_SCANsat_Science_Multi_Jool2 = 你想知道为什么生物群系图上什么都没有。 + #autoLOC_SCANsat_Science_Multi_Laythe = 每当传感器扫出一块陆地时你都想办一个派对来庆祝一下。 + #autoLOC_SCANsat_Science_Multi_Vall = 直接了当的数据:极地,高原,内陆和低地,缠绕在星球上。现在来吃零食吧! + #autoLOC_SCANsat_Science_Multi_Tylo = 报告中显示出生物群系惊人的多样性,Tylo不仅在高处看很酷,在表面看也同样地令人赞叹。 + #autoLOC_SCANsat_Science_Multi_Bop = 这份Bop生物群系的详细数据使我们对这颗小卫星的理解大大超出了预期,真是美好的一天,来食香香鸡! + #autoLOC_SCANsat_Science_Multi_Pol = 当你拿到这份Pol的生物群系数据之后,你开始沉思花粉粒拥有生物群系的可能性,很快你平复思绪,你明白抱有那种思想的人会是什么样。 + #autoLOC_SCANsat_Science_Multi_Eeloo = 你对于除了Kerbin之外还能找到生物群系如此丰富的行星感到震惊,你抱着敬畏的心情凝视着数据报告。 + #autoLOC_SCANsat_Science_Resource_Title = 资源扫描 + #autoLOC_SCANsat_Science_Resource_Default1 = 分析低精度资源数据。 + #autoLOC_SCANsat_Science_Resource_Default2 = “我们正在接收资源传感器的数据,这项信息看起来比其他的那些信息好多了...” + #autoLOC_SCANsat_Science_Resource_Sun = 也许太阳不是一个寻找地表资源的好地方。 + #autoLOC_SCANsat_Science_Resource_Moho = 我们终于获取了一些Moho表面的资源数据,现在我们只需要搞清楚为什么任何人都想在那里着陆。 + #autoLOC_SCANsat_Science_Resource_Eve = 我们获取了许多关于Eve表面资源的优质数据,当我们寻找离开这颗星球的办法时这些数据很有用。 + #autoLOC_SCANsat_Science_Resource_Gilly = Gilly的初次资源扫描结果很有趣,他几乎就是个小行星矿场。 + #autoLOC_SCANsat_Science_Resource_Kerbin = 我们最终拥有了Kerbin的资源数据,众所周知,如果我们想了解自己母星的基本信息,没什么比发射一颗昂贵而又复杂的卫星更好的方法了。 + #autoLOC_SCANsat_Science_Resource_Mun = 资源数据告诉我们Mun是多么适合开发资源。 + #autoLOC_SCANsat_Science_Resource_Minmus = 最后,我们拥有了Minmus的资源数据,每一个坎巴拉宇航员建立初级采矿建筑的首选地。 + #autoLOC_SCANsat_Science_Resource_Duna = 这份资源数据让我们离实现最近风靡坎巴拉的电影里的情节更近了一步。 + #autoLOC_SCANsat_Science_Resource_Ike = Ike也许不是星系中最有趣的天体,但这并不会影响其资源数据的实用性。 + #autoLOC_SCANsat_Science_Resource_Dres = 也许我们会去搜寻周边小行星上的资源,谁会想去打扰Dres呢? + #autoLOC_SCANsat_Science_Resource_Jool = 嗯...也许气态行星不是一个寻找地表资源的好地方... + #autoLOC_SCANsat_Science_Resource_Laythe = 很好,这里有很多很棒的数据,但其表面只有很少的地方适合着陆并享受其资源带来的好处。 + #autoLOC_SCANsat_Science_Resource_Vall = 对冰冻的Vall进行的资源扫描提供了很多有趣的数据。 + #autoLOC_SCANsat_Science_Resource_Tylo = 我们将带走所有在看起来很可怕的Tylo获取的资源数据。 + #autoLOC_SCANsat_Science_Resource_Bop = Bop也许不是人们搜寻资源的首选之地,但这份数据早晚会带来方便。 + #autoLOC_SCANsat_Science_Resource_Pol = 除了花粉粒和奇怪的块状物之外,Pol还有一些有趣的资源存储。 + #autoLOC_SCANsat_Science_Resource_Eeloo = 至此我们已经完全探索了Eeloo,我们也需要开始清除这里的矿产,并探索其外还有什么。 + } + de + { + #autoLOC_SCANsat_Science_Lo_Title = Altimetrie-Scan mir geringer Auflösung + #autoLOC_SCANsat_Science_Lo_Default1 = Niedrigauflösende Altimetrie-Daten analysiert. + #autoLOC_SCANsat_Science_Lo_Defualt2 = "RADAR-Altimetrie-Sensor erstattet Bericht. Keine Ahnung warum, aber wir haben ein gutes Signal und bekommen Daten. Das schreit geradezu nach einer ordentlichen Runde Kekse!" + #autoLOC_SCANsat_Science_Lo_Sun = Du wunderst Dich, ob der Sensor möglicherweise eine Fehlfunktion hat. + #autoLOC_SCANsat_Science_Lo_Moho = Nun, wenigstens lassen diese niedrig auflösenden Daten Moho halbwegs cool aussehen. Nicht gerade gigantische Lavaseen, aber trotzdem irgendwie cool. + #autoLOC_SCANsat_Science_Lo_Eve = Du betrachtests die grieseligen und ungenauen Höhendaten, welche vom Scanner angezeigt werden und wünschst insgeheim den hochauflösenden Sensor losgeschickt zu haben. Nur ein weiterer Grund noch mehr Raketen zu starten! (Als ob wir dafür irgendwelche Gründe bräuchten.) + #autoLOC_SCANsat_Science_Lo_Gilly = Der niederauflösende Scan bestätigt was bereits bekannt war: Gilly ist nur ein unförmiger Fels der mitten durchs nirgendwo treibt. Wenigstens muss man seine Augen nicht anstrengen, um den Bericht zu lesen. + #autoLOC_SCANsat_Science_Lo_Kerbin = Selbst diese niedrig auflösenden Scan-Daten der Planetenoberfläche sind aufregend nützlich. Du kannst es kaum erwarten diese Technologie auf dem Mun oder sogar weiter entfernt anzuwenden. + #autoLOC_SCANsat_Science_Lo_Mun = Die daten zeigen breite Streifen der Landschaft darunter. Ein hochauflösender Scan wäre hilfreicher, aber mit diesen Daten kannst Du wahrscheinlich trotzdem einen Landeplatz ausfindig machen. + #autoLOC_SCANsat_Science_Lo_Minmus = Widerwillig akzeptierst Du, daß die Jungs an der Kerbal Astronomical Society recht hatten: Minmus ist tatsächlich ein Mond. Du hättest es nicht geglaubt, hättest Du die Altimetriedaten nicht mit Deinen eigenen Augen gesehen. + #autoLOC_SCANsat_Science_Lo_Duna = Diese Niedrig Auflösenden Scan-Daten sind etwas verrauscht und verzerrt, sind aber nichts desto trotz unschätzbar beim ausfindigmachen eines Landeplatzes auf Duna. Plötzliche Aussichten auf eine echte Duna-Mission. + #autoLOC_SCANsat_Science_Lo_Ike = Beim Grübeln über die Daten fällt Dir schlagartig die Ähnlichkeit zwischen Ike und dem Mun auf. Du wunderst die über eine möglicherweise vergleichbare Geologie. + #autoLOC_SCANsat_Science_Lo_Dres = Selbt mit den niedrig auflösenden Daten ist es glasklar, das Dres einige recht prominente Gebirge hat. Du kannst die Ressourcen-Scan-Resultate kaum abwarten, weil Du davon überzeugt bist, daß "Dort seie Gold in den Euren Hügeln!" + #autoLOC_SCANsat_Science_Lo_Jool = Altimetrie, welche Altimetrie? Es ist ein Gasriese, Kerbalskinder! Lasst uns einfach irgendeine zufällige nummer auswählen und es gut sein lassen. + #autoLOC_SCANsat_Science_Lo_Laythe = Der Sensor scheint nicht in der Lage zu sein das Wasser zu penetrieren. + #autoLOC_SCANsat_Science_Lo_Vall = Nun, hier ist er: "Ein Präzedenz-Vall für alle Volgefälle! Hahahahaha! Hahaha. Ha. Ha? Was jetzt, irgendwer muss das doch lustig finden. + #autoLOC_SCANsat_Science_Lo_Tylo = Du bist Dir immer noch nicht Sicher, welche eine Aussicht es wäre, von der Oberfläche von Laythe aus Vall und Jool im Hintergrund darüber zu sehen, aber diese Scan-Daten sollten beim finden eines Landeplatzes helfen, um es heraus zu finden. + #autoLOC_SCANsat_Science_Lo_Bop = Nun, die niedrig auflösenden Scan-Daten sind drin und Du entscheidest Dich diese zu packen und an das KSC zu senden. Du hoffst daß noch genug Saft in den Batterien ist, um die Daten los zu schicken und gleichzeitig die Hauptsysteme aufrecht zu erhalten. + #autoLOC_SCANsat_Science_Lo_Pol = Der niedrig auflösenden Scan zeigt, daß Pol in der Tat wie ein großer Pollen aussieht. Bis zur Modernisierung zu einem hochauflösenden Scan und Fortschritte in Elektronenmikroskopie wirst Du trotzdem mit der Frage zurück gelassen, wie stark die Ähnlichkeiten wirklich sind. + #autoLOC_SCANsat_Science_Lo_Eeloo = Die Wissenschaftler auf Kerbin haben lange Zeit auf diese Daten gewartet. Zweifelsohne wird es jede Menge Partys und Kekse für alle geben. + #autoLOC_SCANsat_Science_Hi_Title = Hochauflösender Altimetrie-Scan + #autoLOC_SCANsat_Science_Hi_Default1 = Hochauflösende Altimetriedaten analysiert. + #autoLOC_SCANsat_Science_Hi_Default2 = "Der Hochauflösende Altimetrie-Scan ist definitiv besser als der niedrigauflösende. SCAN hat wieder einmal seine Scan-Künste unter Beweis gestellt." + #autoLOC_SCANsat_Science_Hi_Sun = Dir wird klar, daß Du einen Haufen Geld hättest sparen können, wenn Du dem niedrig auflösenden Scanner vertraut hättest. + #autoLOC_SCANsat_Science_Hi_Moho = Na Endlich! Die Abgefahrenheit kehrt nach Moho zurück! Es mögen zwar nicht gerade gigantische Lavaflüsse sein, aber diese Daten sind einfach spektakulär! + #autoLOC_SCANsat_Science_Hi_Eve = Der hochauflösende Scanner hat die Purpur nebulöse Atmosphäre recht gut durchdrungen und Du bist nun in der Lage winzige Details in der Oberfläche aus zu machen. Die Wissenschaftler am KSC werden erleichtert sein. + #autoLOC_SCANsat_Science_Hi_Gilly = Gilly erscheint selbst in hoher Auflösung irgendwie mit geringer Auflösung. Dies ist eine ernsthaft deformierte Oberfläche. + #autoLOC_SCANsat_Science_Hi_Kerbin = All die bunten Farben der neuen hochauflösenden Scan-Technologie hypnotisieren Dich geradezu. Die Missionsleitung weckt Dich aus Deiner Benommenheit und Du wischst Dir schnell einigen Sabber aus Deinen Mundwinkeln. + #autoLOC_SCANsat_Science_Hi_Mun = "Ha! Kein langweilig grauer Mond mehr. Seht Euch einfach all die bunten Farben des Scans an! Nun können wir wirklich einen Hauptlandeplatz bestimmen. + #autoLOC_SCANsat_Science_Hi_Minmus = Wow, Minmus ist nicht nur echt, er hat eine recht aufregende Topographie! Du kannst es kaum erwarten in einer der flachen Gebiete zu landen. + #autoLOC_SCANsat_Science_Hi_Duna = Diese hochauflösenden Daten sind atemberaubend. Du beginnst damit, die Hügel und Täler zu analysieren, ausschau haltend nach einem guten Landeplatz. + #autoLOC_SCANsat_Science_Hi_Ike = Die Daten bestätigen die Anwesenheit abschüssiger Hügel und Krater. Hoffentlich nutzen die Analysten im KSC diese Daten um einen vernünftigen Landeplatz aus zu machen. + #autoLOC_SCANsat_Science_Hi_Dres = Dies... sind einige wirklich ernst zu nehmende Gebirge. Du bist froh darüber diese Daten zu analysieren, an Stelle einen dieser Berge zu erklimmen. + #autoLOC_SCANsat_Science_Hi_Jool = Jool scheint trotz hochauflösendem Scan keine Oberfläche zu haben. Soviel zu dieser Theorie. Wenigstens haben wir noch die Zuschussgelder. + #autoLOC_SCANsat_Science_Hi_Laythe = Die Karte zeigt hauptsächlich negative höhenangaben. Du ziehst es in Betracht Laythe trocken zu legen, um seine Gebirge erklimmen zu können. + #autoLOC_SCANsat_Science_Hi_Vall = Die Daten des hochauflösenden Scanners zeigen, daß die Oberfläche, in der Tat, "knitterig" ist. Ich denke Gene schuldet Dir fünfzig Mäuse. + #autoLOC_SCANsat_Science_Hi_Tylo = Tylo mag zwar der erste entdeckte Mond um Jool gewesen sein, aber diese Daten fühlen sich an, als würde man ihn völlig neu entdecken. + #autoLOC_SCANsat_Science_Hi_Bop = Wow, schaut Euch all die Farben an. Du hast keine Ahnung was diese Daten bedeuten, Du bist Dir jedoch sicher, daß diese hochauflösenden Daten jeden am KSC beeindrucken werden. + #autoLOC_SCANsat_Science_Hi_Pol = Selbst bei dieser Menge an hochauflösenden Daten ist es immer noch schwierig einen brauchbaren Landeplatz aus zu machen. Wie zum Geier ist der Mond überhaupt entstanden? + #autoLOC_SCANsat_Science_Hi_Eeloo = Die Risse und Spalten heben sich mit schlagfesten Details von der Oberfläche ab, während Du die daten des SAR Altimetrie-Sensors untersuchst. Sieh Dir all die Landeplätze an! + #autoLOC_SCANsat_Science_Multi_Title = Multispektrale Analyse + #autoLOC_SCANsat_Science_Multi_Default1 = Multispektrale Sensordaten analysiert. + #autoLOC_SCANsat_Science_Multi_Default2 = "Wow, wie empfangen wir diese Daten überhaupt? Diese SCAN-Ingenieure wissen wirklich was sie tun. Entweder das, oder sie haben absolut überhaupt keine Ahnung. Wie auch immer, Zeit für ein paar Kekse!" + #autoLOC_SCANsat_Science_Multi_Sun1 = Das abhandensein biometrischer Daten überrascht Dich. + #autoLOC_SCANsat_Science_Multi_Sun2 = Du wunderst Dich, warum keine Pole auf der Biomkarte sichbar sind. + #autoLOC_SCANsat_Science_Multi_Moho = Beim Grübeln über die Daten wunderst Du Dich, ob das schwer erfassbare und Sagenumwobene Lavaseebiom auffindbar ist. + #autoLOC_SCANsat_Science_Multi_Eve = Die kompliziert verwobenen Linien auf Eve's Biomkarte erinnern Dich stark an Lavalampen und Batik-Shirts. Mann das waren Zeiten. Das nächste Raumschiff richtung Eve wird auf jeden Fall eine Diskokugel bekommen! + #autoLOC_SCANsat_Science_Multi_Gilly = Selbst bei all dem Geschiele und Geblinzel konnten die Astronomen keine Biome ausmachen. Hah! Dämliche Astronomen! Ein Punkt für die Wissenschaft und null punkte für die, äh... Wissenschaft. + #autoLOC_SCANsat_Science_Multi_Kerbin = Diese Biomdaten sind wahrhaftig erstaunlich. Du hoffst nur, daß sie Krümelfest sind, da Du an dem, Tag an welchem der Sensor installiert wurde eine Schachtel extra krümeliger Kekse verspeist hast. + #autoLOC_SCANsat_Science_Multi_Mun = Tja, hätte nicht gedacht daß der Mond auch biome hat. Ich wundere mich auf welchem sich all der Käse befindet. Und ob es dort eventuell auch andere Köstlichkeiten gibt. + #autoLOC_SCANsat_Science_Multi_Minmus = Du siehst, wie passend die Bezeichnung "Größeres Flachland" ist, während Du Dir die Daten ansiehst. Wer auch immer sich diese Namen ausdenkt muss schon ein sehr schlauer Kerbal sein, im Gegensatz zu den Ingenieuren die wir hier haben. + #autoLOC_SCANsat_Science_Multi_Duna = Du durchkämmst die Biomdaten, Ausschau haltend nach genau dem richtigen Plätzchen um all die Wissenschaft zu betreiben. Plätzchen... Klingt wie Kekse, hmmm... + #autoLOC_SCANsat_Science_Multi_Ike = Beim stöbern in den Daten, welche uns von Ike erreichen überrascht Dich die hohe diversität an unterschiedlichen Biomen. Immerhin ist es bloß ein Mond. Du kannst es kaum erwarten an die Daten zu kommen, welche dort unten verborgen liegen. + #autoLOC_SCANsat_Science_Multi_Dres = Pole, check. Hochland, check. Mittelebene, check. Tiefebene, check. Gebirgsrücken, check. Impaktauswurf, check. Impaktkrater, check. Schluchten, check. Ich denke wir haben alles. Zeit den Scanner herunter zu fahren und sich ein paar Kekse zu gönnen. + #autoLOC_SCANsat_Science_Multi_Jool1 = Das Abhandensein biometrischer Daten überrascht Dich. + #autoLOC_SCANsat_Science_Multi_Jool2 = Du wunderst Dich, warum auf der Biomkarte keine Pole zu sehen sind. + #autoLOC_SCANsat_Science_Multi_Laythe = Du möchtest jedes mal, wenn der Biom-Scanner eine Landmasse entdeckt, eine kleine Party feiern. + #autoLOC_SCANsat_Science_Multi_Vall = Recht eindeutige Daten: Pole, Hochland, Mittelebene und Tiefebene. Mal was anderes. Nun lasset uns Kekse verspeisen! + #autoLOC_SCANsat_Science_Multi_Tylo = Die Diversität der unterschiedlichen Biome trifft Dich wie der Schlag. Tylo sieht nicht nur nett aus, es ist ebenso nett ihn an zu schauen. + #autoLOC_SCANsat_Science_Multi_Bop = Diese detaillierte Analyse von Bop's Biomen wird unser Verständnis über diesen Mond über alles erwartete hinaus erhöhen. Es war ein guter Tag. Kekse für alle! + #autoLOC_SCANsat_Science_Multi_Pol = Beim Aufnehmen der Biomdaten von Pol ziehst Du die Möglichkeit in Betracht, daß Pollen ebenso Biome aufweisen. Schnell verdrängst Du diesen Gedanken unter dem Bewusstsein, was all die Aktivisten tun würden, wenn die Wind davon bekommen. + #autoLOC_SCANsat_Science_Multi_Eeloo = Es ist erstaunlich auf einem Planet so fern von Kerbin detaillierte Biomdaten zu erhalten. In Ehrfurcht starrst Du auf den Bericht, während die Daten hereinkommen. + #autoLOC_SCANsat_Science_Resource_Title = Resourcen-Scan + #autoLOC_SCANsat_Science_Resource_Default1 = Niederauflösende Ressourcen-Daten analysiert. + #autoLOC_SCANsat_Science_Resource_Default2 = "Wir empfangen nun Resourcen-Daten; diese Informationen sehen deutlich besser aus als die von den Vorgängern..." + #autoLOC_SCANsat_Science_Resource_Sun = Die Sonne mag möglicherweise nicht der idealste Ort sein, um nach Ressourcen zu scannen. + #autoLOC_SCANsat_Science_Resource_Moho = Endlich haben wir einige Informationen über die Ressource-Verfügbarkeit auf Moho's Oberfläche. Wir müssen nur noch herausfinden, warum dort jemand landen würde. + #autoLOC_SCANsat_Science_Resource_Eve = Wir bekommen jede Menge guter Daten über die Oberflächenresourcenverfügbarkeit auf Eve. Dies sollte sich beim wieder Verlassen des Planeten als äußerst nützlich erweisen. + #autoLOC_SCANsat_Science_Resource_Gilly = Die ersten Ressourcen-Scans von Gilly sehen interessant aus; es ist beinahe wie Asteroidenbergbau. + #autoLOC_SCANsat_Science_Resource_Kerbin = Endlich haben wir einige Ressourcen-Daten über Kerbin, weil, wie jeder weiß, geht nichts darüber hinaus, eine sauteuere und hochkomplizierte Sonde in den Orbit zu befördern, nur um etwas über seinen eigenen Planeten heraus zu finden. + #autoLOC_SCANsat_Science_Resource_Mun = Diese Ressourcen-Daten geben uns den ersten guten Blick darauf, wie brauchbar der Mond für Bergbauzwecke sein könnte. + #autoLOC_SCANsat_Science_Resource_Minmus = Endlich haben wir ein paar Resourcen-Daten über Minmus, eines jeden Kerbonauten erste Wahl in Sachen Bergbau. + #autoLOC_SCANsat_Science_Resource_Duna = This resource data brings us one step closer to reliving all of our favorite lines from that recent hit Kerbal movie. + #autoLOC_SCANsat_Science_Resource_Ike = Ike mag zwar nicht gerade der Interessanteste aller planetarer Kandidaten sein, das macht die Ressourcen-Daten allerdings nicht weniger brauchbar. + #autoLOC_SCANsat_Science_Resource_Dres = Wir könnten genau so gut einige der näheren Asteroiden auf Ressourcen untersuchen; wer würde sich schon gerne mit Dres abgeben. + #autoLOC_SCANsat_Science_Resource_Jool = Hmm, vielleicht ist ja ein Gasriese nicht gerade der idealste Ort um nach Ressourcen zu suchen. + #autoLOC_SCANsat_Science_Resource_Laythe = Nun, jede Menge guter Daten, jedoch recht wenig wertvoller Orte auf der Oberfläche wo man halbwegs vernünftig landen und von den Ressourcen gebrauch machen kann. + #autoLOC_SCANsat_Science_Resource_Vall = Ressourcen-Scans vom eisigen Vall ergeben jede Menge guter Daten. + #autoLOC_SCANsat_Science_Resource_Tylo = Wir wollen beim unheimlich aussehenden Tylo nicht unsere Nase rümpfen, wir nehmen alle Ressourcen-Daten die wir kriegen können. + #autoLOC_SCANsat_Science_Resource_Bop = Bop mag zwar nicht gerade die erste wahl in Sachen Ressourcen-Förderung sein, aber die Daten könnten sich eines Tages doch als nützlich erweisen. + #autoLOC_SCANsat_Science_Resource_Pol = Zusätzlich zu Pollen und klumpigen Dingen scheint Pol einige recht interessante Ressourcen zu enthalten. + #autoLOC_SCANsat_Science_Resource_Eeloo = Nun, da wir es den ganzen Weg raus bis zum Eeloo geschafft haben, können wir das Örtchen getrost Leergraben und dann einfach irgendwo anders weiter machen, mit was auch immer sich dahinter befinden mag. + } +} diff --git a/SCANassets/Resources/Localization/Tooltips.cfg b/SCANassets/Resources/Localization/Tooltips.cfg new file mode 100644 index 000000000..a1b5c4e5f --- /dev/null +++ b/SCANassets/Resources/Localization/Tooltips.cfg @@ -0,0 +1,228 @@ +Localization +{ + en-us + { + #autoLOC_SCANsat_mainMapToggle = Main Map + #autoLOC_SCANsat_bigMapToggle = Big Map + #autoLOC_SCANsat_zoomMapToggle = Zoom Map + #autoLOC_SCANsat_overlayToggle = Planetary Overlay + #autoLOC_SCANsat_instrumentsToggle = Instruments Readout + #autoLOC_SCANsat_settingsToggle = Settings + #autoLOC_SCANsat_mainMapColor = Map Color + #autoLOC_SCANsat_mainMapTerminator = Map Day/Night Terminator + #autoLOC_SCANsat_mainMapType = Terrain/Biome Toggle + #autoLOC_SCANsat_mainMapMinimize = Show/Hide Vessel Info + #autoLOC_SCANsat_mainMapStatus = Scanner Status Indicators + #autoLOC_SCANsat_mainMapPercentage = Active Scanner Completion Percentage + #autoLOC_SCANsat_bigMapRefresh = Map Refresh + #autoLOC_SCANsat_bigMapColor = Map Color + #autoLOC_SCANsat_bigMapTerminator = Map Day/Night Terminator + #autoLOC_SCANsat_bigMapGrid = Grid Overlay + #autoLOC_SCANsat_bigMapOrbit = Orbit Overlay + #autoLOC_SCANsat_bigMapWaypoints = Waypoints + #autoLOC_SCANsat_bigMapAnomaly = Anomalies + #autoLOC_SCANsat_bigMapFlags = Flags + #autoLOC_SCANsat_bigMapLegend = Map Legend + #autoLOC_SCANsat_bigMapResource = Resource Overlay + #autoLOC_SCANsat_bigMapExport = Export Map To Disk + #autoLOC_SCANsat_overlayRefresh = Map Refresh + #autoLOC_SCANsat_insNextResource = Next Resource + #autoLOC_SCANsat_insPreviousResource = Previous Resource + #autoLOC_SCANsat_zoomVesselSync = Sync Current Vessel + #autoLOC_SCANsat_zoomVesselLock = Lock Position To Vessel + #autoLOC_SCANsat_zoomMapRefresh = Map Refresh + #autoLOC_SCANsat_zoomMapWindowState = Toggle Window Size + #autoLOC_SCANsat_zoomMapIn = Zoom In + #autoLOC_SCANsat_zoomMapOut = Zoom Out + #autoLOC_SCANsat_zoomMapLeft = Shift Left + #autoLOC_SCANsat_zoomMapRight = Shift Right + #autoLOC_SCANsat_zoomMapUp = Shift Up + #autoLOC_SCANsat_zoomMapDown = Shift Down + #autoLOC_SCANsat_zoomMapIcons = Map Icons + #autoLOC_SCANsat_waypointToggle = Waypoint Selector + #autoLOC_SCANsat_waypointSet = Create Waypoint + #autoLOC_SCANsat_waypointCancel = Cancel Waypoint + #autoLOC_SCANsat_waypointMechJeb = Set MechJeb Landing Target + #autoLOC_SCANsat_waypointNameRefresh = Reset Waypoint + } + ru + { + #autoLOC_SCANsat_mainMapToggle = Основная Карта + #autoLOC_SCANsat_bigMapToggle = Большая Карта + #autoLOC_SCANsat_zoomMapToggle = Детальная Карта + #autoLOC_SCANsat_overlayToggle = Планетарный Оверлей + #autoLOC_SCANsat_instrumentsToggle = Инструментальные Показания + #autoLOC_SCANsat_settingsToggle = Настройки + #autoLOC_SCANsat_mainMapColor = Цвета Карты + #autoLOC_SCANsat_mainMapTerminator = Терминатор (День/Ночь) + #autoLOC_SCANsat_mainMapType = Ландшафт/Биомы + #autoLOC_SCANsat_mainMapMinimize = Вкл/Выкл Данные Корабля + #autoLOC_SCANsat_mainMapStatus = Индикаторы Статуса Сканера + #autoLOC_SCANsat_mainMapPercentage = Процент Завершения Активного Сканирования + #autoLOC_SCANsat_bigMapRefresh = Обновить Карту + #autoLOC_SCANsat_bigMapColor = Цвета Карты + #autoLOC_SCANsat_bigMapTerminator = Терминатор (День/Ночь) + #autoLOC_SCANsat_bigMapGrid = Сетка + #autoLOC_SCANsat_bigMapOrbit = Орбиты + #autoLOC_SCANsat_bigMapWaypoints = Вэйпоинты + #autoLOC_SCANsat_bigMapAnomaly = Аномалии + #autoLOC_SCANsat_bigMapFlags = Флаги + #autoLOC_SCANsat_bigMapLegend = Легенда Карты + #autoLOC_SCANsat_bigMapResource = Оверлей Ресурсов + #autoLOC_SCANsat_bigMapExport = Экспорт Карты на Диск + #autoLOC_SCANsat_overlayRefresh = Обновить Карту + #autoLOC_SCANsat_insNextResource = След. Ресурс + #autoLOC_SCANsat_insPreviousResource = Пред. Ресурс + #autoLOC_SCANsat_zoomVesselSync = Синх. Текущего Корабля + #autoLOC_SCANsat_zoomVesselLock = Закрепить Поз. Корабля + #autoLOC_SCANsat_zoomMapRefresh = Обновить Карту + #autoLOC_SCANsat_zoomMapWindowState = Размер Окна + #autoLOC_SCANsat_zoomMapIn = Увеличить + #autoLOC_SCANsat_zoomMapOut = Уменьшить + #autoLOC_SCANsat_zoomMapLeft = Влево + #autoLOC_SCANsat_zoomMapRight = Вправо + #autoLOC_SCANsat_zoomMapUp = Вверх + #autoLOC_SCANsat_zoomMapDown = Вниз + #autoLOC_SCANsat_zoomMapIcons = Символы Карты + #autoLOC_SCANsat_waypointToggle = Выбор Вэйпоинта + #autoLOC_SCANsat_waypointSet = Создать Вэйпоинт + #autoLOC_SCANsat_waypointCancel = Отменить Вэйпоинт + #autoLOC_SCANsat_waypointMechJeb = Зона Посадки MechJeb + #autoLOC_SCANsat_waypointNameRefresh = Обновить Вэйпоинт + } + es-es + { + #autoLOC_SCANsat_mainMapToggle = Mapa Principal + #autoLOC_SCANsat_bigMapToggle = Mapa Grande + #autoLOC_SCANsat_zoomMapToggle = Mapa con Zoom + #autoLOC_SCANsat_overlayToggle = Sobreposición Planetaria + #autoLOC_SCANsat_instrumentsToggle = Instrumentos de Lectura + #autoLOC_SCANsat_settingsToggle = Ajustes + #autoLOC_SCANsat_mainMapColor = Color de Mapa + #autoLOC_SCANsat_mainMapTerminator = Terminador de Día/Noche del Mapa + #autoLOC_SCANsat_mainMapType = Cambiar Terreno/Bioma + #autoLOC_SCANsat_mainMapMinimize = Mostrar/ocultar informacion de la nave + #autoLOC_SCANsat_mainMapStatus = Indicadores del Estado del Scáner + #autoLOC_SCANsat_mainMapPercentage = Porcentaje de Terminación del Escáner Activo + #autoLOC_SCANsat_bigMapRefresh = Refrescar Mapa + #autoLOC_SCANsat_bigMapColor = Color de Mapa + #autoLOC_SCANsat_bigMapTerminator = Terminador de Día/Noche del Mapa + #autoLOC_SCANsat_bigMapGrid = Sobreposición de Cuadrícula + #autoLOC_SCANsat_bigMapOrbit = Sobreposición de Órbita + #autoLOC_SCANsat_bigMapWaypoints = Waypoints + #autoLOC_SCANsat_bigMapAnomaly = Anomalias + #autoLOC_SCANsat_bigMapFlags = Banderas + #autoLOC_SCANsat_bigMapLegend = Map Leyenda + #autoLOC_SCANsat_bigMapResource = Sobreposición de Recursos + #autoLOC_SCANsat_bigMapExport = Exporta Mapa al Disco + #autoLOC_SCANsat_overlayRefresh = Refrescar Mapa + #autoLOC_SCANsat_insNextResource = Siguiente Recurso + #autoLOC_SCANsat_insPreviousResource = Anterior Recurso + #autoLOC_SCANsat_zoomVesselSync = Sincronizar Nave Actual + #autoLOC_SCANsat_zoomVesselLock = Mantener Posición en la Nave + #autoLOC_SCANsat_zoomMapRefresh = Refrescar Mapa + #autoLOC_SCANsat_zoomMapWindowState = Cambiar Camaño de Mapa + #autoLOC_SCANsat_zoomMapIn = Aumentar Zoom + #autoLOC_SCANsat_zoomMapOut = Reducir Zoom + #autoLOC_SCANsat_zoomMapLeft = Cambiar a la Izquierda + #autoLOC_SCANsat_zoomMapRight = Cambiar a la Derecha + #autoLOC_SCANsat_zoomMapUp = Cambiar Arriba + #autoLOC_SCANsat_zoomMapDown = Cambiar Abajo + #autoLOC_SCANsat_zoomMapIcons = Íconos del Mapa + #autoLOC_SCANsat_waypointToggle = Seleccionador de Waypoints + #autoLOC_SCANsat_waypointSet = Crear Waypoint + #autoLOC_SCANsat_waypointCancel = Cancelar Waypoint + #autoLOC_SCANsat_waypointMechJeb = Establer MechJeb Aterrizaje en Objetivo + #autoLOC_SCANsat_waypointNameRefresh = Reiniciar Waypoint + } + zh-cn + { + #autoLOC_SCANsat_mainMapToggle = 主地图 + #autoLOC_SCANsat_bigMapToggle = 大地图 + #autoLOC_SCANsat_zoomMapToggle = 缩放地图 + #autoLOC_SCANsat_overlayToggle = 行星显示 + #autoLOC_SCANsat_instrumentsToggle = 仪器读数 + #autoLOC_SCANsat_settingsToggle = 设置 + #autoLOC_SCANsat_mainMapColor = 地图颜色 + #autoLOC_SCANsat_mainMapTerminator = 地图晨昏线 + #autoLOC_SCANsat_mainMapType = 开关地形/生物群系 + #autoLOC_SCANsat_mainMapMinimize = 显示/隐藏载具信息 + #autoLOC_SCANsat_mainMapStatus = 扫描器状态标识 + #autoLOC_SCANsat_mainMapPercentage = 显示扫描完成度 + #autoLOC_SCANsat_bigMapRefresh = 刷新地图 + #autoLOC_SCANsat_bigMapColor = 地图颜色 + #autoLOC_SCANsat_bigMapTerminator = 地图晨昏线 + #autoLOC_SCANsat_bigMapGrid = 网格显示 + #autoLOC_SCANsat_bigMapOrbit = 轨道显示 + #autoLOC_SCANsat_bigMapWaypoints = 导航点 + #autoLOC_SCANsat_bigMapAnomaly = 异常点 + #autoLOC_SCANsat_bigMapFlags = 旗帜 + #autoLOC_SCANsat_bigMapLegend = 图例 + #autoLOC_SCANsat_bigMapResource = 资源显示 + #autoLOC_SCANsat_bigMapExport = 导出地图到硬盘 + #autoLOC_SCANsat_overlayRefresh = 刷新地图 + #autoLOC_SCANsat_insNextResource = 下一资源 + #autoLOC_SCANsat_insPreviousResource = 上一资源 + #autoLOC_SCANsat_zoomVesselSync = 同步当前载具 + #autoLOC_SCANsat_zoomVesselLock = 锁定视角到载具位置 + #autoLOC_SCANsat_zoomMapRefresh = 刷新地图 + #autoLOC_SCANsat_zoomMapWindowState = 切换窗口大小 + #autoLOC_SCANsat_zoomMapIn = 放大 + #autoLOC_SCANsat_zoomMapOut = 缩小 + #autoLOC_SCANsat_zoomMapLeft = 左移 + #autoLOC_SCANsat_zoomMapRight = 右移 + #autoLOC_SCANsat_zoomMapUp = 上移 + #autoLOC_SCANsat_zoomMapDown = 下移 + #autoLOC_SCANsat_zoomMapIcons = 地图图标 + #autoLOC_SCANsat_waypointToggle = 导航点选择器 + #autoLOC_SCANsat_waypointSet = 创建导航点 + #autoLOC_SCANsat_waypointCancel = 取消导航点 + #autoLOC_SCANsat_waypointMechJeb = 设定MJ着陆目标 + #autoLOC_SCANsat_waypointNameRefresh = 重置导航点 + } + de + { + #autoLOC_SCANsat_mainMapToggle = Karte + #autoLOC_SCANsat_bigMapToggle = Große Karte + #autoLOC_SCANsat_zoomMapToggle = Zoom Karte + #autoLOC_SCANsat_overlayToggle = Planetares Overlay + #autoLOC_SCANsat_instrumentsToggle = Instrumentenanzeige + #autoLOC_SCANsat_settingsToggle = Einstellungen + #autoLOC_SCANsat_mainMapColor = Kartenfarbe + #autoLOC_SCANsat_mainMapTerminator = Tag/Nacht Terminator + #autoLOC_SCANsat_mainMapType = Umschalten Gelände/Biom + #autoLOC_SCANsat_mainMapMinimize = Ein-/Ausblenden Fahrzeuginfo + #autoLOC_SCANsat_mainMapStatus = Scanner-Statusanzeige + #autoLOC_SCANsat_mainMapPercentage = Vollständigkeit des aktuellen Scans + #autoLOC_SCANsat_bigMapRefresh = Karte Auffrischen + #autoLOC_SCANsat_bigMapColor = Kartenfarbe + #autoLOC_SCANsat_bigMapTerminator = Tag/Nacht Terminator + #autoLOC_SCANsat_bigMapGrid = Gitternetz Overlay + #autoLOC_SCANsat_bigMapOrbit = Orbit Overlay + #autoLOC_SCANsat_bigMapWaypoints = Wegpunkte + #autoLOC_SCANsat_bigMapAnomaly = Anomalien + #autoLOC_SCANsat_bigMapFlags = Flaggen + #autoLOC_SCANsat_bigMapLegend = Kartenlegende + #autoLOC_SCANsat_bigMapResource = Resourcen-Overlay + #autoLOC_SCANsat_bigMapExport = Karte auf Festplatte exportieren + #autoLOC_SCANsat_overlayRefresh = Karte Auffrischen + #autoLOC_SCANsat_insNextResource = Nächste Resource + #autoLOC_SCANsat_insPreviousResource = Vorherige Resource + #autoLOC_SCANsat_zoomVesselSync = Auf Vehikel Synchronisieren + #autoLOC_SCANsat_zoomVesselLock = Position auf Vehikel Einrasten + #autoLOC_SCANsat_zoomMapRefresh = Karte Auffrischen + #autoLOC_SCANsat_zoomMapWindowState = Fenstergröße Umschalten + #autoLOC_SCANsat_zoomMapIn = Vergrößern + #autoLOC_SCANsat_zoomMapOut = Verkleinern + #autoLOC_SCANsat_zoomMapLeft = Nach Links Verschieben + #autoLOC_SCANsat_zoomMapRight = Nach Rechts Verschieben + #autoLOC_SCANsat_zoomMapUp = Nach Oben Verschieben + #autoLOC_SCANsat_zoomMapDown = Nach Unten Verschieben + #autoLOC_SCANsat_zoomMapIcons = Karten-Icons + #autoLOC_SCANsat_waypointToggle = Wegpunkt Auswählen + #autoLOC_SCANsat_waypointSet = Wegpunkt Erstellen + #autoLOC_SCANsat_waypointCancel = Wegpunkt Abbrechen + #autoLOC_SCANsat_waypointMechJeb = MechJeb Landezieleingabe + #autoLOC_SCANsat_waypointNameRefresh = Wegpunkt Zurücksetzen + } +} diff --git a/SCANassets/Resources/Localization/Warnings.cfg b/SCANassets/Resources/Localization/Warnings.cfg new file mode 100644 index 000000000..581ff0d73 --- /dev/null +++ b/SCANassets/Resources/Localization/Warnings.cfg @@ -0,0 +1,58 @@ +Localization +{ + en-us + { + #autoLOC_SCANsat_Warning_DataResetCurrent = Erase <<1>> map for <<2>>? + #autoLOC_SCANsat_Warning_DataResetAll = Erase <<1>> for all celestial bodies? + #autoLOC_SCANsat_Warning_StockResourceResetCurrent = Erase stock resource data for <<1>>? + #autoLOC_SCANsat_Warning_StockResourceResetAll = Erase stock resource data for all celestial bodies? + #autoLOC_SCANsat_Warning_MapFillCurrent = Fill in <<1>> map for <<2>>? + #autoLOC_SCANsat_Warning_MapFillAll = Fill in <<1>> for all celestial bodies? + #autoLOC_SCANsat_Warning_ModuleManagerResource = Warning\nModule Manager is required for all SCANsat resource scanning functions. + #autoLOC_SCANsat_Warning_SaveToConfig = Overwrite existing config file on disk? + } + ru + { + #autoLOC_SCANsat_Warning_DataResetCurrent = Удалить карту <<1>> для <<2>>? + #autoLOC_SCANsat_Warning_DataResetAll = Удалить <<1>> для всех небесных тел? + #autoLOC_SCANsat_Warning_StockResourceResetCurrent = Удалить стоковые данные ресурсов для <<1>>? + #autoLOC_SCANsat_Warning_StockResourceResetAll = Удалить стоковые данные ресурсов для всех небесных тел? + #autoLOC_SCANsat_Warning_MapFillCurrent = Заполнить карту <<1>> для <<2>>? + #autoLOC_SCANsat_Warning_MapFillAll = Заполнить <<1>> для всех небесных тел? + #autoLOC_SCANsat_Warning_ModuleManagerResource = Внимание\nДля всех функций сканирования ресурсов SCANsat необходим Module Manager. + #autoLOC_SCANsat_Warning_SaveToConfig = Перезаписать существующий файл настроек? + } + es-es + { + #autoLOC_SCANsat_Warning_DataResetCurrent = ¿Borrar <<1>> para mapa <<2>>? + #autoLOC_SCANsat_Warning_DataResetAll = ¿Borrar <<1>> para todos los cuerpos celestes? + #autoLOC_SCANsat_Warning_StockResourceResetCurrent = ¿Borrar datos de recursos del juego base para <<1>>? + #autoLOC_SCANsat_Warning_StockResourceResetAll = ¿Borrar datos de recursos del juego base para todos los cuerpos celestes? + #autoLOC_SCANsat_Warning_MapFillCurrent = ¿Llenar <<1>> para mapa <<2>>? + #autoLOC_SCANsat_Warning_MapFillAll = ¿Llenar <<1>> para todos los cuerpos celestes? + #autoLOC_SCANsat_Warning_ModuleManagerResource = Advertencia\nModule Manager es requerido para todas las funciones de escaneo de recursos de SCANsat. + #autoLOC_SCANsat_Warning_SaveToConfig = ¿Sobrescribir archivo de configuración existente en el disco? + } + zh-cn + { + #autoLOC_SCANsat_Warning_DataResetCurrent = 确认删除<<2>>的<<1>>图? + #autoLOC_SCANsat_Warning_DataResetAll = 确认删除所有天体的<<1>>? + #autoLOC_SCANsat_Warning_StockResourceResetCurrent = 确认删除<<1>>的资源储藏数据? + #autoLOC_SCANsat_Warning_StockResourceResetAll = 确认删除所有天体的资源储藏数据? + #autoLOC_SCANsat_Warning_MapFillCurrent = 确认填充<<2>>的<<1>>图? + #autoLOC_SCANsat_Warning_MapFillAll = 确认填充所有天体的<<1>>? + #autoLOC_SCANsat_Warning_ModuleManagerResource = 警告\nSCANsat所有的资源扫描功能都需要Module Manager。 + #autoLOC_SCANsat_Warning_SaveToConfig = 确认覆盖现有的设置文件? + } + de + { + #autoLOC_SCANsat_Warning_DataResetCurrent = Lösche die <<1>>-Karte von <<2>>? + #autoLOC_SCANsat_Warning_DataResetAll = Lösche <<1>> von ALLEN Himmelskörpern? + #autoLOC_SCANsat_Warning_StockResourceResetCurrent = Lösche Standard-Ressourcen-Daten von <<1>>? + #autoLOC_SCANsat_Warning_StockResourceResetAll = Lösche Standard-Ressourcen-Daten ALLER Himmelskörper? + #autoLOC_SCANsat_Warning_MapFillCurrent = Fülle die <<1>>-Karte von <<2>> auf? + #autoLOC_SCANsat_Warning_MapFillAll = Fülle die <<1>>-Karte aller Himmelskörper auf? + #autoLOC_SCANsat_Warning_ModuleManagerResource = Warnung!\nModule Manager wird für SCANsat-Funktionalität benötigt. + #autoLOC_SCANsat_Warning_SaveToConfig = Bereits existierende Datei überschreiben? + } +} diff --git a/SCANassets/Resources/SCANcolors.cfg b/SCANassets/Resources/SCANcolors.cfg index 9270d3dd9..482952849 100644 --- a/SCANassets/Resources/SCANcolors.cfg +++ b/SCANassets/Resources/SCANcolors.cfg @@ -5,17 +5,6 @@ SCAN_Color_Config rangeAboveMaxHeight = 10000 rangeBelowMinHeight = 10000 defaultPalette = Default - lowBiomeColor = 0,0.46,0.02345098,1 - highBiomeColor = 0.7,0.2388235,0,1 - biomeTransparency = 40 - stockBiomeMap = False - biomeBorder = True - slopeCutoff = 1 - bottomLowSlopeColor = 0.004705883,0.6,0.3788235,1 - bottemHighSlopeColor = 0.9764706,1,0.4627451,1 - topLowSlopeColor = 0.9764706,1,0.4627451,1 - topHighSlopeColor = 0.94,0.2727843,0.007372549,1 - windowScale = 1 SCANsat_Altimetry { Item @@ -279,8 +268,8 @@ SCAN_Color_Config Item { name = Ore - lowResourceColor = 0.2414545,0.1207273,0.83,1 - highResourceColor = 0.7888628,0,0.94,1 + lowResourceColor = 0.241454497,0.120727301,0.829999983,1 + highResourceColor = 0.788862824,0,0.939999998,1 resourceTransparency = 20 defaultMinValue = 1 defaultMaxValue = 15 @@ -427,8 +416,8 @@ SCAN_Color_Config Item { name = Karbonite - lowResourceColor = 0,0.3192157,0.74,1 - highResourceColor = 0.75,0.3823529,0,1 + lowResourceColor = 0,0.319215685,0.74000001,1 + highResourceColor = 0.75,0.382352889,0,1 resourceTransparency = 20 defaultMinValue = 1 defaultMaxValue = 6.5 @@ -447,8 +436,8 @@ SCAN_Color_Config resourceName = Karbonite bodyName = Kerbin index = 1 - lowResourceCutoff = 1.8 - highResourceCutoff = 2.2 + lowResourceCutoff = 1.79999995 + highResourceCutoff = 2.20000005 } Item { @@ -575,8 +564,8 @@ SCAN_Color_Config Item { name = Minerals - lowResourceColor = 0.4762353,0.04329412,0.92,1 - highResourceColor = 0,0.576471,0.07451,1 + lowResourceColor = 0.4762353,0.0432941206,0.920000017,1 + highResourceColor = 0,0.576470971,0.0745100006,1 resourceTransparency = 20 defaultMinValue = 1 defaultMaxValue = 6.5 @@ -723,8 +712,8 @@ SCAN_Color_Config Item { name = Substrate - lowResourceColor = 0.6418824,0.01380392,0.88,1 - highResourceColor = 0.7428235,0.82,0,1 + lowResourceColor = 0.64188242,0.0138039198,0.879999995,1 + highResourceColor = 0.742823482,0.819999993,0,1 resourceTransparency = 20 defaultMinValue = 1 defaultMaxValue = 6.5 @@ -871,8 +860,8 @@ SCAN_Color_Config Item { name = Uraninite - lowResourceColor = 0,0.839216,0.760784,1 - highResourceColor = 1,0.2352941,0.03137255,1 + lowResourceColor = 0,0.839215994,0.76078397,1 + highResourceColor = 1,0.235294104,0.0313725509,1 resourceTransparency = 20 defaultMinValue = 1 defaultMaxValue = 6.5 @@ -1019,8 +1008,8 @@ SCAN_Color_Config Item { name = Water - lowResourceColor = 0.76,0,0.5722353,1 - highResourceColor = 0,0.5687844,0.98,1 + lowResourceColor = 0.75999999,0,0.572235286,1 + highResourceColor = 0,0.568784416,0.980000019,1 resourceTransparency = 20 defaultMinValue = 0.5 defaultMaxValue = 6.5 @@ -1167,8 +1156,8 @@ SCAN_Color_Config Item { name = MetallicOre - lowResourceColor = 0.72,0.5054118,0,1 - highResourceColor = 0,0.6302745,0.98,1 + lowResourceColor = 0.720000029,0.505411804,0,1 + highResourceColor = 0,0.630274475,0.980000019,1 resourceTransparency = 20 defaultMinValue = 1 defaultMaxValue = 6.5 @@ -1315,8 +1304,8 @@ SCAN_Color_Config Item { name = MetalOre - lowResourceColor = 0.1827843,0.59,0,1 - highResourceColor = 0.08658824,0.8947451,0.92,1 + lowResourceColor = 0.182784304,0.589999974,0,1 + highResourceColor = 0.0865882412,0.894745111,0.920000017,1 resourceTransparency = 20 defaultMinValue = 1 defaultMaxValue = 7.5 @@ -1463,8 +1452,8 @@ SCAN_Color_Config Item { name = Dirt - lowResourceColor = 1,0.2196078,0.772549,1 - highResourceColor = 0.3221961,0.79,0,1 + lowResourceColor = 1,0.2196078,0.772548974,1 + highResourceColor = 0.322196096,0.790000021,0,1 resourceTransparency = 20 defaultMinValue = 15 defaultMaxValue = 35 @@ -1611,8 +1600,8 @@ SCAN_Color_Config Item { name = ExoticMinerals - lowResourceColor = 0.9395686,0.97,0,1 - highResourceColor = 0.4678824,0,0.97,1 + lowResourceColor = 0.939568579,0.970000029,0,1 + highResourceColor = 0.467882395,0,0.970000029,1 resourceTransparency = 20 defaultMinValue = 1 defaultMaxValue = 6.5 @@ -1759,8 +1748,8 @@ SCAN_Color_Config Item { name = Gypsum - lowResourceColor = 0.78,0.2905882,0,1 - highResourceColor = 0,1,0.8078431,1 + lowResourceColor = 0.779999971,0.2905882,0,1 + highResourceColor = 0,1,0.807843089,1 resourceTransparency = 20 defaultMinValue = 1 defaultMaxValue = 6.5 @@ -1907,8 +1896,8 @@ SCAN_Color_Config Item { name = Hydrates - lowResourceColor = 0.1721177,0.77,0.3985882,1 - highResourceColor = 0.93,0.4522353,0,1 + lowResourceColor = 0.172117695,0.769999981,0.39858821,1 + highResourceColor = 0.930000007,0.452235311,0,1 resourceTransparency = 20 defaultMinValue = 1 defaultMaxValue = 6.5 @@ -2055,8 +2044,8 @@ SCAN_Color_Config Item { name = RareMetals - lowResourceColor = 0,0.49,0.3516471,1 - highResourceColor = 1,0,0.2235294,1 + lowResourceColor = 0,0.49000001,0.351647109,1 + highResourceColor = 1,0,0.223529398,1 resourceTransparency = 20 defaultMinValue = 1 defaultMaxValue = 6.5 @@ -2203,8 +2192,8 @@ SCAN_Color_Config Item { name = GeoEnergy - lowResourceColor = 0,0.79,0.4925883,1 - highResourceColor = 1,0.7254902,0,1 + lowResourceColor = 0,0.790000021,0.492588311,1 + highResourceColor = 1,0.725490212,0,1 resourceTransparency = 20 defaultMinValue = 1 defaultMaxValue = 6.5 @@ -2351,10 +2340,10 @@ SCAN_Color_Config Item { name = Alumina - lowResourceColor = 0.4464706,0,0.69,1 - highResourceColor = 0.07058824,1,0,1 + lowResourceColor = 0.446470588,0,0.689999998,1 + highResourceColor = 0.0705882385,1,0,1 resourceTransparency = 20 - defaultMinValue = 0.7 + defaultMinValue = 0.699999988 defaultMaxValue = 10 Resource_Planetary_Config { @@ -2363,7 +2352,7 @@ SCAN_Color_Config resourceName = Alumina bodyName = Sun index = 0 - lowResourceCutoff = 0.7 + lowResourceCutoff = 0.699999988 highResourceCutoff = 10 } Item @@ -2371,7 +2360,7 @@ SCAN_Color_Config resourceName = Alumina bodyName = Kerbin index = 1 - lowResourceCutoff = 0.7 + lowResourceCutoff = 0.699999988 highResourceCutoff = 14 } Item @@ -2387,7 +2376,7 @@ SCAN_Color_Config resourceName = Alumina bodyName = Minmus index = 3 - lowResourceCutoff = 0.7 + lowResourceCutoff = 0.699999988 highResourceCutoff = 10 } Item @@ -2403,7 +2392,7 @@ SCAN_Color_Config resourceName = Alumina bodyName = Eve index = 5 - lowResourceCutoff = 0.7 + lowResourceCutoff = 0.699999988 highResourceCutoff = 10 } Item @@ -2419,7 +2408,7 @@ SCAN_Color_Config resourceName = Alumina bodyName = Ike index = 7 - lowResourceCutoff = 0.7 + lowResourceCutoff = 0.699999988 highResourceCutoff = 10 } Item @@ -2427,7 +2416,7 @@ SCAN_Color_Config resourceName = Alumina bodyName = Jool index = 8 - lowResourceCutoff = 0.7 + lowResourceCutoff = 0.699999988 highResourceCutoff = 10 } Item @@ -2435,7 +2424,7 @@ SCAN_Color_Config resourceName = Alumina bodyName = Laythe index = 9 - lowResourceCutoff = 0.7 + lowResourceCutoff = 0.699999988 highResourceCutoff = 10 } Item @@ -2443,7 +2432,7 @@ SCAN_Color_Config resourceName = Alumina bodyName = Vall index = 10 - lowResourceCutoff = 0.7 + lowResourceCutoff = 0.699999988 highResourceCutoff = 10 } Item @@ -2451,7 +2440,7 @@ SCAN_Color_Config resourceName = Alumina bodyName = Bop index = 11 - lowResourceCutoff = 0.7 + lowResourceCutoff = 0.699999988 highResourceCutoff = 10 } Item @@ -2459,7 +2448,7 @@ SCAN_Color_Config resourceName = Alumina bodyName = Tylo index = 12 - lowResourceCutoff = 0.7 + lowResourceCutoff = 0.699999988 highResourceCutoff = 10 } Item @@ -2467,7 +2456,7 @@ SCAN_Color_Config resourceName = Alumina bodyName = Gilly index = 13 - lowResourceCutoff = 0.7 + lowResourceCutoff = 0.699999988 highResourceCutoff = 10 } Item @@ -2475,7 +2464,7 @@ SCAN_Color_Config resourceName = Alumina bodyName = Pol index = 14 - lowResourceCutoff = 0.7 + lowResourceCutoff = 0.699999988 highResourceCutoff = 10 } Item @@ -2483,7 +2472,7 @@ SCAN_Color_Config resourceName = Alumina bodyName = Dres index = 15 - lowResourceCutoff = 0.7 + lowResourceCutoff = 0.699999988 highResourceCutoff = 90 } Item @@ -2491,7 +2480,7 @@ SCAN_Color_Config resourceName = Alumina bodyName = Eeloo index = 16 - lowResourceCutoff = 0.7 + lowResourceCutoff = 0.699999988 highResourceCutoff = 10 } } @@ -2499,7 +2488,7 @@ SCAN_Color_Config Item { name = Borate - lowResourceColor = 0.01705883,0.8631765,0.87,1 + lowResourceColor = 0.0170588307,0.863176525,0.870000005,1 highResourceColor = 1,0,0,1 resourceTransparency = 20 defaultMinValue = 1 @@ -2647,8 +2636,8 @@ SCAN_Color_Config Item { name = Monazite - lowResourceColor = 0.1461176,0.04329412,0.69,1 - highResourceColor = 0,1,0.6784314,1 + lowResourceColor = 0.146117598,0.0432941206,0.689999998,1 + highResourceColor = 0,1,0.678431392,1 resourceTransparency = 20 defaultMinValue = 1 defaultMaxValue = 7.5 @@ -2795,10 +2784,10 @@ SCAN_Color_Config Item { name = SaltWater - lowResourceColor = 0,0.78,0.3334118,1 - highResourceColor = 0.3882353,0.9215686,1,1 + lowResourceColor = 0,0.779999971,0.333411813,1 + highResourceColor = 0.388235301,0.921568573,1,1 resourceTransparency = 20 - defaultMinValue = 0.1 + defaultMinValue = 0.100000001 defaultMaxValue = 1 Resource_Planetary_Config { @@ -2807,7 +2796,7 @@ SCAN_Color_Config resourceName = SaltWater bodyName = Sun index = 0 - lowResourceCutoff = 0.1 + lowResourceCutoff = 0.100000001 highResourceCutoff = 1 } Item @@ -2815,7 +2804,7 @@ SCAN_Color_Config resourceName = SaltWater bodyName = Kerbin index = 1 - lowResourceCutoff = 0.1 + lowResourceCutoff = 0.100000001 highResourceCutoff = 40 } Item @@ -2823,7 +2812,7 @@ SCAN_Color_Config resourceName = SaltWater bodyName = Mun index = 2 - lowResourceCutoff = 0.1 + lowResourceCutoff = 0.100000001 highResourceCutoff = 1 } Item @@ -2831,7 +2820,7 @@ SCAN_Color_Config resourceName = SaltWater bodyName = Minmus index = 3 - lowResourceCutoff = 0.1 + lowResourceCutoff = 0.100000001 highResourceCutoff = 1 } Item @@ -2839,7 +2828,7 @@ SCAN_Color_Config resourceName = SaltWater bodyName = Moho index = 4 - lowResourceCutoff = 0.1 + lowResourceCutoff = 0.100000001 highResourceCutoff = 1 } Item @@ -2847,7 +2836,7 @@ SCAN_Color_Config resourceName = SaltWater bodyName = Eve index = 5 - lowResourceCutoff = 0.1 + lowResourceCutoff = 0.100000001 highResourceCutoff = 1 } Item @@ -2855,7 +2844,7 @@ SCAN_Color_Config resourceName = SaltWater bodyName = Duna index = 6 - lowResourceCutoff = 0.1 + lowResourceCutoff = 0.100000001 highResourceCutoff = 1 } Item @@ -2863,7 +2852,7 @@ SCAN_Color_Config resourceName = SaltWater bodyName = Ike index = 7 - lowResourceCutoff = 0.1 + lowResourceCutoff = 0.100000001 highResourceCutoff = 1 } Item @@ -2871,7 +2860,7 @@ SCAN_Color_Config resourceName = SaltWater bodyName = Jool index = 8 - lowResourceCutoff = 0.1 + lowResourceCutoff = 0.100000001 highResourceCutoff = 1 } Item @@ -2879,7 +2868,7 @@ SCAN_Color_Config resourceName = SaltWater bodyName = Laythe index = 9 - lowResourceCutoff = 0.1 + lowResourceCutoff = 0.100000001 highResourceCutoff = 1 } Item @@ -2887,7 +2876,7 @@ SCAN_Color_Config resourceName = SaltWater bodyName = Vall index = 10 - lowResourceCutoff = 0.1 + lowResourceCutoff = 0.100000001 highResourceCutoff = 1 } Item @@ -2895,7 +2884,7 @@ SCAN_Color_Config resourceName = SaltWater bodyName = Bop index = 11 - lowResourceCutoff = 0.1 + lowResourceCutoff = 0.100000001 highResourceCutoff = 1 } Item @@ -2903,7 +2892,7 @@ SCAN_Color_Config resourceName = SaltWater bodyName = Tylo index = 12 - lowResourceCutoff = 0.1 + lowResourceCutoff = 0.100000001 highResourceCutoff = 1 } Item @@ -2911,7 +2900,7 @@ SCAN_Color_Config resourceName = SaltWater bodyName = Gilly index = 13 - lowResourceCutoff = 0.1 + lowResourceCutoff = 0.100000001 highResourceCutoff = 1 } Item @@ -2919,7 +2908,7 @@ SCAN_Color_Config resourceName = SaltWater bodyName = Pol index = 14 - lowResourceCutoff = 0.1 + lowResourceCutoff = 0.100000001 highResourceCutoff = 1 } Item @@ -2927,7 +2916,7 @@ SCAN_Color_Config resourceName = SaltWater bodyName = Dres index = 15 - lowResourceCutoff = 0.1 + lowResourceCutoff = 0.100000001 highResourceCutoff = 1 } Item @@ -2935,7 +2924,7 @@ SCAN_Color_Config resourceName = SaltWater bodyName = Eeloo index = 16 - lowResourceCutoff = 0.1 + lowResourceCutoff = 0.100000001 highResourceCutoff = 1 } } @@ -2943,8 +2932,8 @@ SCAN_Color_Config Item { name = Silicates - lowResourceColor = 0.77,0.7216862,0.2627059,1 - highResourceColor = 0.8823529,0.4588235,1,1 + lowResourceColor = 0.769999981,0.721686184,0.262705892,1 + highResourceColor = 0.882352889,0.458823502,1,1 resourceTransparency = 20 defaultMinValue = 1 defaultMaxValue = 7.5 @@ -3091,10 +3080,10 @@ SCAN_Color_Config Item { name = SolarWind - lowResourceColor = 0.1298824,0.3501177,0.72,1 + lowResourceColor = 0.129882395,0.350117713,0.720000029,1 highResourceColor = 1,1,0,1 resourceTransparency = 20 - defaultMinValue = 0.1 + defaultMinValue = 0.100000001 defaultMaxValue = 1 Resource_Planetary_Config { @@ -3103,7 +3092,7 @@ SCAN_Color_Config resourceName = SolarWind bodyName = Sun index = 0 - lowResourceCutoff = 0.1 + lowResourceCutoff = 0.100000001 highResourceCutoff = 1 } Item @@ -3111,7 +3100,7 @@ SCAN_Color_Config resourceName = SolarWind bodyName = Kerbin index = 1 - lowResourceCutoff = 0.1 + lowResourceCutoff = 0.100000001 highResourceCutoff = 1 } Item @@ -3119,7 +3108,7 @@ SCAN_Color_Config resourceName = SolarWind bodyName = Mun index = 2 - lowResourceCutoff = 0.1 + lowResourceCutoff = 0.100000001 highResourceCutoff = 1 } Item @@ -3127,7 +3116,7 @@ SCAN_Color_Config resourceName = SolarWind bodyName = Minmus index = 3 - lowResourceCutoff = 0.1 + lowResourceCutoff = 0.100000001 highResourceCutoff = 1 } Item @@ -3143,7 +3132,7 @@ SCAN_Color_Config resourceName = SolarWind bodyName = Eve index = 5 - lowResourceCutoff = 0.1 + lowResourceCutoff = 0.100000001 highResourceCutoff = 1 } Item @@ -3151,7 +3140,7 @@ SCAN_Color_Config resourceName = SolarWind bodyName = Duna index = 6 - lowResourceCutoff = 0.1 + lowResourceCutoff = 0.100000001 highResourceCutoff = 1 } Item @@ -3159,7 +3148,7 @@ SCAN_Color_Config resourceName = SolarWind bodyName = Ike index = 7 - lowResourceCutoff = 0.1 + lowResourceCutoff = 0.100000001 highResourceCutoff = 1 } Item @@ -3167,7 +3156,7 @@ SCAN_Color_Config resourceName = SolarWind bodyName = Jool index = 8 - lowResourceCutoff = 0.1 + lowResourceCutoff = 0.100000001 highResourceCutoff = 1 } Item @@ -3175,7 +3164,7 @@ SCAN_Color_Config resourceName = SolarWind bodyName = Laythe index = 9 - lowResourceCutoff = 0.1 + lowResourceCutoff = 0.100000001 highResourceCutoff = 1 } Item @@ -3183,7 +3172,7 @@ SCAN_Color_Config resourceName = SolarWind bodyName = Vall index = 10 - lowResourceCutoff = 0.1 + lowResourceCutoff = 0.100000001 highResourceCutoff = 1 } Item @@ -3191,7 +3180,7 @@ SCAN_Color_Config resourceName = SolarWind bodyName = Bop index = 11 - lowResourceCutoff = 0.1 + lowResourceCutoff = 0.100000001 highResourceCutoff = 1 } Item @@ -3199,7 +3188,7 @@ SCAN_Color_Config resourceName = SolarWind bodyName = Tylo index = 12 - lowResourceCutoff = 0.1 + lowResourceCutoff = 0.100000001 highResourceCutoff = 1 } Item @@ -3207,7 +3196,7 @@ SCAN_Color_Config resourceName = SolarWind bodyName = Gilly index = 13 - lowResourceCutoff = 0.1 + lowResourceCutoff = 0.100000001 highResourceCutoff = 1 } Item @@ -3215,7 +3204,7 @@ SCAN_Color_Config resourceName = SolarWind bodyName = Pol index = 14 - lowResourceCutoff = 0.1 + lowResourceCutoff = 0.100000001 highResourceCutoff = 1 } Item @@ -3223,7 +3212,7 @@ SCAN_Color_Config resourceName = SolarWind bodyName = Dres index = 15 - lowResourceCutoff = 0.1 + lowResourceCutoff = 0.100000001 highResourceCutoff = 1 } Item @@ -3231,7 +3220,7 @@ SCAN_Color_Config resourceName = SolarWind bodyName = Eeloo index = 16 - lowResourceCutoff = 0.1 + lowResourceCutoff = 0.100000001 highResourceCutoff = 1 } } diff --git a/SCANassets/Resources/SCANlocalization.cfg b/SCANassets/Resources/SCANlocalization.cfg index 7a520098f..f9e1382b2 100644 --- a/SCANassets/Resources/SCANlocalization.cfg +++ b/SCANassets/Resources/SCANlocalization.cfg @@ -9,57 +9,111 @@ SCAN_Localization settingsHelpAnomalies = Select the marker used to display\nanomalies on the map. settingsHelpScanningToggle = Toggle all SCANsat scanning. settingsHelpBackground = Toggle background scanning on\nselected celestial bodies. - settingsHelpTimeWarp = Adjust the scanning frequency during TimeWarp.\nHigher settings result in fewer gaps in the maps but may have a performance impact at high TimeWarp. + settingsHelpTimeWarp = Adjust the scanning frequency during TimeWarp.\nHigher settings result in fewer gaps in the maps\nbut may have a performance impact at high TimeWarp. settingsHelpGroundTracks = Display a visible indicator of\nscanning activity in map mode. - settingsHelpGroundTracksActive = The ground track indicator can be limited to only be displayed for the active vessel. - settingsHelpOverlayTooltips = Displays tooltips for the current mouse position when a planetary overlay map is activated. These tooltips include The cursor coordinates, terrain height, slope, biome name, and resource abundance, depending on scanning coverage. - settingsHelpWindowTooltips = Display tooltips on some map window buttons. These are primarily used to identify icon buttons. - settingsHelpStockToolbar = Use the stock toolbar.\nOnly one stock button is available. Can be used concurrently with the Blizzy78 Toolbar. - settingsHelpMechJeb = The SCANsat zoom map target selection mode can be used to select a MechJeb landing site. - settingsHelpResetWindows = Reset all window positions and scale. Use this in case a window has been dragged completely off screen or if any windows are not visible. + settingsHelpGroundTracksActive = The ground track indicator can be limited\nto only be displayed for the active vessel. + settingsHelpStockUIStyle = Switch between stock KSP-style UI elements and Unity-style elements. + settingsHelpOverlayTooltips = Displays tooltips for the current mouse position when a planetary overlay map is activated.\nThese tooltips include The cursor coordinates, terrain height, slope, biome name,\nand resource abundance, depending on scanning coverage. + settingsHelpWindowTooltips = Display tooltips on some map window buttons.\nThese are primarily used to identify icon buttons. + settingsHelpLegendTooltips = Display tooltips on the map legend.\nDisabling will also disable biome map legends. + settingsHelpStockToolbar = Use the stock toolbar.\nCan be used concurrently with the Blizzy78 Toolbar. + settingsHelpToolbarMenu = Use a pop-out menu for the stock toolbar to show all available windows. + settingsHelpMechJeb = The SCANsat zoom map and big map waypoint selection modes\ncan be used to select a MechJeb landing site. + settingsHelpMechJebLoad = Load a saved MechJeb landing target.\nThis only works while in the flight scene with a valid MechJeb vessel. + settingsHelpMapGenSpeed = Adjust all SCANsat map generation speeds.\nLower values will save CPU resources and may reduce the\nperformance impact of generating maps. + settingsHelpResetWindows = Reset all window positions and scale.\nUse this in case a window has been dragged completely\noff screen or if any windows are not visible. settingsHelpResetPlanetData = Resets all SCANsat data for the current celestial body.\nA confirmation window will open before activating.\nCannot be reversed. - settingsHelpResetAllData = Resets all SCANsat data for all celestial bodies. \nA confirmation window will open before activating.\nCannot be reversed. - settingsHelpVesselsSensorsPasses = Information about the currently active SCANsat sensors. Vessels indicates the number of vessels with active sensors. Sensors indicates the total number of sensors; instruments with multiple sensor types count each individual sensor. Passes indicates the number of sensor updates performed per second.\nThis value is affected by the\nTimeWarp Resolution setting. - settingsHelpGreyScale = Use a true grey-scale color spectrum for black-and-white SCANsat maps. Pixels on the altitude map will interpolate between black and white; the min and max terrain heights for each celestial body\ndefine the limits. - settingsHelpExportCSV = Export a .csv file along with map texture when using the Export button on the big map. The file contains coordinates and the terrain height for each pixel. Pixels are labeled from left to right\nand from top to bottom. - settingsHelpSetMapWidth = Enter an exact value for the SCANsat big map texture width. Values are limited to 550 - 8192 pixels wide. Press the Set button to apply the value. - settingsHelpWindowScale = Adjust all SCANsat window scales; buttons adjust scale in increments of 5%. - resourceSettingsHelpOverlayWindow = Open the planetary overlay map control window. - resourceSettingsHelpBiomeLock = Circumvents the requirement for stock surface biome scans. SCANsat displays will show the full accuracy for resource abundance with or without any surface biome scans. - resourceSettingsHelpInstant = By default, the stock M700 resource scanner's orbital survey will fill in all SCANsat resource maps. This can be disabled, requiring standard SCANsat methods for all resource scanning. Disabled automatically when stock resource scanning is disabled. - resourceSettingsHelpNarrowBand = Numerous SCANsat functions require a Narrow-Band resource scanner on-board the current vessel or in orbit of a celestial body for fully accurate resource abundance data.\nDisable this to circumvent these restrictions. - resourceSettingsHelpDisableStock = Disables all stock resource scanning functions. SCANsat scanning methods will be required for all resource data. Replaces several stock resource functions with SCANsat tools. These include The right-click readouts, the high resolution narrow-band scanner map, and the planetary overlay maps. - resourceSettingsHelpResetSCANsatResource = Resets all SCANsat resource data for the current celestial body. Other SCANsat data is not affected.\nA confirmation window will open before activating.\nCannot be reversed. - resourceSettingsHelpResetStockResource = Resets the stock resource scanning coverage for the current celestial body. A reload or scene change may be required for all changes to take effect.\nA confirmation window will open before activating.\nCannot be reversed. - resourceSettingsHelpOverlayInterpolation = Change the number of resource abundance measurements used in constructing the planetary overlay and big map resource overlay. Decrease the value to increase the accuracy of the map. Lower values will result in slower map generation. - resourceSettingsHelpOverlayHeight = Change the texture size (map width is 2XHeight) used in constructing the planetary overlay and big map resource overlay. Increase the value to increase the quality and accuracy of the map. Higher values will result in slower map generation. - resourceSettingsHelpOverlayBiomeHeight = Change the texture size (map width is 2XHeight) used in constructing the planetary overlay biome map. Increase the value to increase the quality and accuracy of the map. Higher values will result in slower map generation. - resourceSettingsHelpOverlayTransparency = Create a grey background for planetary overlay resource maps. Used to make clear which sections of the celestial body have been\nscanned but contain no resources. - resourceSettingsHelpScanThreshold = A threshold level used to apply the stock resource scan to a celestial body after scanning with SCANsat sensors. This is useful when contracts or other addons require that a stock resource scan be performed. Set a value from 0-100 in the text box and click on the Set button. All celestial bodies will be checked immediately; celestial bodies will also be checked upon loading or a scene change. A reload may be required for the changes to take effect. - resourceSettingsModuleManagerWarning = Warning:\nModule Manager is required for all SCANsat resource scanning - colorTerrainHelpMin = Defines the low altitude cutoff for the terrain color palette. Anything below this altitude will be shown with the lowest color. - colorTerrainHelpMax = Defines the high altitude cutoff for the terrain color palette. Anything above this altitude will be shown with the highest color. - colorTerrainHelpClampToggle = Used to define a cutoff between the low and high altitude values. This is particularly useful for ocean planets where it helps to define a sharp distinction between land and ocean. - colorTerrainHelpClamp = Defines the clamp altitude cutoff. Anything below the cutoff will be represented by the first two colors in the selected color palette. Anything above the cutoff will be represented with the remaining colors. + settingsHelpResetAllData = Resets all SCANsat data for all celestial bodies.\nA confirmation window will open before activating.\nCannot be reversed. + settingsHelpVesselsSensorsPasses = Information about the currently active SCANsat sensors.\nVessels indicates the number of vessels with active sensors.\nSensors indicates the total number of sensors;\ninstruments with multiple sensor types count each individual sensor.\nPasses indicates the number of sensor updates performed per second.\nThis value is affected by the TimeWarp Resolution setting. + settingsHelpGreyScale = Use a true grey-scale color spectrum for black-and-white SCANsat maps.\nPixels on the altitude map will interpolate between black and white;\nthe min and max terrain heights for each celestial body define the limits. + settingsHelpExportCSV = Export a .csv file along with map texture when using the Export button on the big map.\nThe file contains coordinates and the terrain height for each pixel.\nPixels are labeled from left to right and from top to bottom. + settingsHelpSetMapWidth = Enter an exact value for the SCANsat big map texture width.\nValues are limited to 550 - 8192 pixels wide.\nPress the Set button to apply the value. + settingsHelpWindowScale = Adjust all SCANsat window scales. + settingsHelpFillPlanet = Fill in all SCANsat data for the current celestial body. + settingsHelpFillAll = Fill in all SCANsat data for all celestial bodies. + resourceSettingsHelpBiomeLock = Circumvents the requirement for stock surface biome scans.\nSCANsat displays will show the full accuracy for resource\nabundance with or without any surface biome scans. + resourceSettingsHelpInstant = By default, the stock M700 resource scanner's orbital survey will fill in all SCANsat resource maps.\nThis can be disabled, requiring standard SCANsat methods for all resource scanning.\nDisabled automatically when stock resource scanning is disabled. + resourceSettingsHelpNarrowBand = Numerous SCANsat functions require a Narrow-Band resource scanner on-board\nthe current vessel or in orbit of a celestial body for fully accurate resource abundance data.\nDisable this to circumvent these restrictions. + resourceSettingsHelpDisableStock = Disables all stock resource scanning functions.\nSCANsat scanning methods will be required for all resource data.\nReplaces several stock resource functions with SCANsat tools.\nThese include The right-click readouts, and the planetary overlay maps. + resourceSettingsHelpResetSCANsatResource = Resets all SCANsat resource data for the current celestial body.\nOther SCANsat data is not affected.\nA confirmation window will open before activating.\nCannot be reversed. + resourceSettingsHelpResetStockResource = Resets the stock resource scanning coverage for the current celestial body.\nA reload or scene change may be required for all changes to take effect.\nA confirmation window will open before activating.\nCannot be reversed. + resourceSettingsHelpOverlayInterpolation = Change the number of resource abundance measurements used in constructing\nthe planetary overlay and big map resource overlay.\nDecrease the value to increase the accuracy of the map.\nLower values will result in slower map generation. + resourceSettingsHelpOverlayHeight = Change the texture size (map width is 2XHeight) used in constructing\nthe planetary overlay and big map resource overlay.\nIncrease the value to increase the quality and accuracy of the map.\nHigher values will result in slower map generation. + resourceSettingsHelpOverlayBiomeHeight = Change the texture size (map width is 2XHeight) used in constructing\nthe planetary overlay biome map. Increase the value to increase\nthe quality and accuracy of the map.\nHigher values will result in slower map generation. + resourceSettingsHelpOverlayTransparency = Create a grey background for planetary overlay resource maps.\nUsed to make clear which sections of the celestial body\nhave been scanned but contain no resources. + resourceSettingsHelpScanThreshold = A threshold level used to apply the stock resource scan to a celestial body after scanning with SCANsat sensors.\nThis is useful when contracts or other addons require that a stock resource scan be performed.\nSet a value from 0-100 in the text box and click on the Set button.\nAll celestial bodies will be checked immediately;\ncelestial bodies will also be checked upon loading or a scene change.\nA reload may be required for the changes to take effect. + colorTerrainHelpMin = Defines the low altitude cutoff for the terrain color palette.\nAnything below this altitude will be shown with the lowest color. + colorTerrainHelpMax = Defines the high altitude cutoff for the terrain color palette.\nAnything above this altitude will be shown with the highest color. + colorTerrainHelpClampToggle = Used to define a cutoff between the low and high altitude values.\nThis is particularly useful for ocean planets where it helps to\ndefine a sharp distinction between land and ocean. + colorTerrainHelpClamp = Defines the clamp altitude cutoff.\nAnything below the cutoff will be represented by the first two colors in the selected color palette.\nAnything above the cutoff will be represented with the remaining colors. colorTerrainHelpReverse = Reverses the order of the currently\nselected color palette. - colorTerrainHelpDiscrete = Draws the map using only the specific colors defined by each palette, instead of smoothly interpolating between them. - colorTerrainHelpPaletteSize = Adjust the number of colors available in the currently selected color palette. + colorTerrainHelpDiscrete = Draws the map using only the specific colors defined by each palette,\ninstead of smoothly interpolating between them. + colorTerrainHelpPaletteSize = Adjust the number of colors available\nin the currently selected color palette. colorBiomeHelpStock = Use the stock biome color scheme for\nSCANsat biome maps. - colorBiomeHelpWhiteBorder = Draw a white border between biomes. Does not apply to the planetary overlay biome maps. - colorBiomeHelpTransparency = Adjust the transparency of biome maps. Terrain elevation is shown behind the biome maps. Set to 0% to disable terrain drawing. - colorPickerHelpLow = The top color swatch shows the updated color selection for the low end of this color spectrum. The bottom color swatch shows the currently active color. - colorPickerHelpHigh = The top color swatch shows the updated color selection for the high end of this color spectrum. The bottom color swatch shows the currently active color. - colorPickerHelpValue = This slider adjusts the Value (in HSV color terms) or Brightness for the currently selected color. - colorResourceHelpFineControl = Activates Fine Control Mode where the sliders will only show values within 5% of the current selection. - colorResourceHelpMin = The low cutoff for resource concentration on the selected celestial body. Resource deposits at this level will be displayed using the low end of the current resource overlay color spectrum. Resource deposits below this value will not be shown. - colorResourceHelpMax = The high cutoff for resource concentration on the selected celestial body. Resource deposits above this value will be shown using the high end of the current resource overlay color spectrum. - colorResourceHelpTransparency = Defines the level of transparency for resource overlays. Increase to allow more of the underlying terrain, slope, or biome map to be visible. This also affect the transparency of resource deposits on the planetary overlay resource map. - colorResourceHelpApply = Applies the current values for the selected resource and celestial body only. - colorResourceHelpApplyAll = Applies the current values for the selected resource for all celestial bodies. - colorResourceHelpDefault = Reverts to the default values for the selected resource and celestial body only. - colorResourceHelpDefaultAll = Reverts to the default values for the selected resource for all celestial bodies. - colorHelpSaveToConfig = Save all color configuration values to the config file found in your SCANsat/Resources folder. These values serve as the defaults for new saves and for all Revert To Default buttons. Values do not need to be saved to the config file to be applied for this save file. - colorSlopeHelpCutoff = Adjust the cutoff level between the two selected slope color pairs. + colorBiomeHelpWhiteBorder = Draw a white border between biomes.\nDoes not apply to the planetary overlay biome maps. + colorBiomeHelpTransparency = Adjust the transparency of biome maps.\nTerrain elevation is shown behind the biome maps.\nSet to 0% to disable terrain drawing. + colorPickerHelpLow = The top color swatch shows the updated\ncolor selection for the low end of this color spectrum.\nThe bottom color swatch shows the currently active color. + colorPickerHelpHigh = The top color swatch shows the updated\ncolor selection for the high end of this color spectrum.\nThe bottom color swatch shows the currently active color. + colorResourceHelpMin = The low cutoff for resource concentration on the selected celestial body.\nResource deposits at this level will be displayed\nusing the low end of the current resource overlay color spectrum.\nResource deposits below this value will not be shown. + colorResourceHelpMax = The high cutoff for resource concentration on the selected celestial body.\nResource deposits above this value will be displayed\nusing the high end of the current resource overlay color spectrum. + colorResourceHelpTransparency = Defines the level of transparency for resource overlays.\nIncrease to allow more of the underlying terrain, slope, or biome map to be visible.\nThis also affect the transparency of resource deposits on the planetary overlay resource map. + colorResourceHelpApply = Applies the current values for the\nselected resource and celestial body only. + colorResourceHelpApplyAll = Applies the current values for the\nselected resource for all celestial bodies. + colorResourceHelpDefault = Reverts to the default values for the\nselected resource and celestial body only. + colorResourceHelpDefaultAll = Reverts to the default values for the\nselected resource for all celestial bodies. + colorHelpSaveToConfig = Save all color configuration values to\nthe config file found in your SCANsat/Resources folder.\nThese values serve as the defaults for new saves\nand for all Revert To Default buttons.\nValues do not need to be saved to the config file to be applied for this save file. + colorSlopeHelpCutoff = Adjust the cutoff level between\nthe two selected slope color pairs. + mainMapToggle = Main Map + bigMapToggle = Big Map + zoomMapToggle = Zoom Map + overlayToggle = Planetary Overlay + instrumentsToggle = Instruments Readout + settingsToggle = Settings + mainMapColor = Map Color + mainMapTerminator = Map Day/Night Terminator + mainMapType = Terrain/Biome Toggle + mainMapMinimize = Show/Hide Vessel Info + mainMapStatus = Scanner Status Indicators + mainMapPercentage = Active Scanner Completion Percentage + bigMapRefresh = Map Refresh + bigMapColor = Map Color + bigMapTerminator = Map Day/Night Terminator + bigMapGrid = Grid Overlay + bigMapOrbit = Orbit Overlay + bigMapWaypoints = Waypoints + bigMapAnomaly = Anomalies + bigMapFlags = Flags + bigMapLegend = Map Legend + bigMapResource = Resource Overlay + bigMapExport = Export Map To Disk + overlayRefresh = Map Refresh + insNextResource = Next Resource + insPreviousResource = Previous Resource + zoomVesselSync = Sync Current Vessel + zoomVesselLock = Lock Position To Vessel + zoomMapRefresh = Map Refresh + zoomMapWindowState = Toggle Window Size + zoomMapIn = Zoom In + zoomMapOut = Zoom Out + zoomMapLeft = Shift Left + zoomMapRight = Shift Right + zoomMapUp = Shift Up + zoomMapDown = Shift Down + zoomMapIcons = Map Icons + waypointToggle = Waypoint Selector + waypointSet = Create Waypoint + waypointCancel = Cancel Waypoint + waypointMechJeb = Set MechJeb Landing Target + waypointNameRefresh = Reset Waypoint + warningDataResetCurrent = Erase [0] map for [1]? + warningDataResetAll = Erase [0] for all celestial bodies? + warningStockResourceResetCurrent = Erase stock resource data for [0]? + warningStockResourceResetAll = Erase stock resource data for all celestial bodies? + warningStockResourceResetAll = Erase stock resource data for all celestial bodies? + warningMapFillCurrent = Fill in [0] map for [1]? + warningMapFillAll = Fill in [0] for all celestial bodies? + warningModuleManagerResource = Warning\nModule Manager is required for all SCANsat resource scanning functions. + warningSaveToConfig = Overwrite existing config file on disk? } } } diff --git a/SCANassets/Resources/scan_icons.scan b/SCANassets/Resources/scan_icons.scan new file mode 100644 index 000000000..483f8e55b Binary files /dev/null and b/SCANassets/Resources/scan_icons.scan differ diff --git a/SCANassets/Resources/scan_prefabs.scan b/SCANassets/Resources/scan_prefabs.scan new file mode 100644 index 000000000..adfadaa73 Binary files /dev/null and b/SCANassets/Resources/scan_prefabs.scan differ diff --git a/SCANassets/Resources/scan_shaders-linux.scan b/SCANassets/Resources/scan_shaders-linux.scan new file mode 100644 index 000000000..5449fd974 Binary files /dev/null and b/SCANassets/Resources/scan_shaders-linux.scan differ diff --git a/SCANassets/Resources/scan_shaders-macosx.scan b/SCANassets/Resources/scan_shaders-macosx.scan new file mode 100644 index 000000000..40d698b67 Binary files /dev/null and b/SCANassets/Resources/scan_shaders-macosx.scan differ diff --git a/SCANassets/Resources/scan_shaders-windows.scan b/SCANassets/Resources/scan_shaders-windows.scan new file mode 100644 index 000000000..74d26ff8b Binary files /dev/null and b/SCANassets/Resources/scan_shaders-windows.scan differ diff --git a/SCANassets/Resources/scan_unity_skin.scan b/SCANassets/Resources/scan_unity_skin.scan new file mode 100644 index 000000000..bb92ddaf7 Binary files /dev/null and b/SCANassets/Resources/scan_unity_skin.scan differ diff --git a/SCANassets/SCANsat.version b/SCANassets/SCANsat.version index ced1ed4a3..1c1328f8d 100644 --- a/SCANassets/SCANsat.version +++ b/SCANassets/SCANsat.version @@ -10,22 +10,22 @@ "VERSION":{ "MAJOR":1, "MINOR":1, - "PATCH":6, - "BUILD":11 + "PATCH":8, + "BUILD":0 }, "KSP_VERSION":{ "MAJOR":1, - "MINOR":2, - "PATCH":1 + "MINOR":3, + "PATCH":0 }, "KSP_VERSION_MIN":{ "MAJOR":1, - "MINOR":2, - "PATCH":1 + "MINOR":3, + "PATCH":0 }, "KSP_VERSION_MAX":{ "MAJOR":1, - "MINOR":2, - "PATCH":1 + "MINOR":3, + "PATCH":8 } } diff --git a/SCANmechjeb/Properties/AssemblyInfo.cs b/SCANmechjeb/Properties/AssemblyInfo.cs index b47d7c372..6bc449e68 100644 --- a/SCANmechjeb/Properties/AssemblyInfo.cs +++ b/SCANmechjeb/Properties/AssemblyInfo.cs @@ -32,10 +32,10 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.6.0.11")] -[assembly: AssemblyFileVersion("1.6.0.11")] -[assembly: AssemblyInformationalVersion ("v16.11")] +[assembly: AssemblyVersion("1.8.0.0")] +[assembly: AssemblyFileVersion("1.8.0.0")] +[assembly: AssemblyInformationalVersion ("v18.0")] -[assembly: KSPAssembly ("SCANmechjeb", 0, 4)] -[assembly: KSPAssemblyDependency ("SCANsat", 1, 6)] +[assembly: KSPAssembly ("SCANmechjeb", 0, 5)] +[assembly: KSPAssemblyDependency ("SCANsat", 1, 8)] [assembly: KSPAssemblyDependency("MechJeb2", 2, 5)] diff --git a/SCANmechjeb/SCANmechStarter.cs b/SCANmechjeb/SCANmechStarter.cs index 061997991..8f5990f7a 100644 --- a/SCANmechjeb/SCANmechStarter.cs +++ b/SCANmechjeb/SCANmechStarter.cs @@ -27,6 +27,8 @@ private void Start() print("[SCANsatMechJeb] Starting SCANsat - MechJeb Interface..."); SCANmechjebInt = gameObject.AddComponent(); } + else + Destroy(gameObject); } } } diff --git a/SCANmechjeb/SCANmechjeb.cs b/SCANmechjeb/SCANmechjeb.cs index 0974330e4..2ad780d4d 100644 --- a/SCANmechjeb/SCANmechjeb.cs +++ b/SCANmechjeb/SCANmechjeb.cs @@ -11,176 +11,107 @@ */ #endregion +using System.Collections; using SCANsat; using SCANsat.SCAN_Data; -using SCANsat.SCAN_Platform; using log = SCANsat.SCAN_Platform.Logging.ConsoleLogger; using palette = SCANsat.SCAN_UI.UI_Framework.SCANpalette; using MuMech; using UnityEngine; +using UnityEngine.Events; namespace SCANmechjeb { - class SCANmechjeb : SCAN_MBE + class SCANmechjeb : MonoBehaviour { private const string siteName = "MechJeb Landing Target"; - private Vessel v; + private Vessel vessel; + private CelestialBody body; private MechJebCore mjCore; private MechJebModuleTargetController target; private DisplayModule guidanceModule; private SCANwaypoint way; private SCANdata data; private Vector2d coords = new Vector2d(); - private bool selectingTarget, selectingInMap, shutdown; + private bool shutdown, mjOnboard, mjTechTreeLocked; - protected override void LateUpdate() + private void Start() { - if (shutdown) - return; + GameEvents.onVesselWasModified.Add(VesselChange); + GameEvents.onVesselChange.Add(VesselChange); + GameEvents.onVesselSOIChanged.Add(SOIChange); + SCANcontroller.controller.MJTargetSet.AddListener(new UnityAction(OnTargetSet)); - if (!HighLogic.LoadedSceneIsFlight || !FlightGlobals.ready) - return; + StartCoroutine(WaitForReady()); + } - if (SCANcontroller.controller == null) - { - way = null; - return; - } + private IEnumerator WaitForReady() + { + shutdown = true; - if (!SCANcontroller.controller.mechJebTargetSelection) - { - way = null; - return; - } + while (!FlightGlobals.ready || FlightGlobals.ActiveVessel == null) + yield return null; - v = FlightGlobals.ActiveVessel; + vessel = FlightGlobals.ActiveVessel; - if (v == null) - { - SCANcontroller.controller.MechJebLoaded = false; - way = null; - return; - } + if (vessel == null) + yield break; - if (v.mainBody != SCANcontroller.controller.LandingTargetBody) - SCANcontroller.controller.LandingTargetBody = v.mainBody; + VesselChange(vessel); - data = SCANUtil.getData(v.mainBody); + body = vessel.mainBody; - if (data == null) - { - SCANcontroller.controller.MechJebLoaded = false; - way = null; - return; - } + data = SCANUtil.getData(body); - if (v.FindPartModulesImplementing().Count <= 0) - { - SCANcontroller.controller.MechJebLoaded = false; - way = null; - return; - } + if (data == null) + shutdown = true; + else + shutdown = false; + } - mjCore = v.GetMasterMechJeb(); + private void OnDestroy() + { + GameEvents.onVesselChange.Remove(VesselChange); + GameEvents.onVesselWasModified.Remove(VesselChange); + GameEvents.onVesselSOIChanged.Remove(SOIChange); + SCANcontroller.controller.MJTargetSet.RemoveListener(OnTargetSet); + } - if (mjCore == null) - { - SCANcontroller.controller.MechJebLoaded = false; - way = null; + private void LateUpdate() + { + if (shutdown || !mjOnboard || mjTechTreeLocked || body == null || vessel == null || data == null) return; - } - if (HighLogic.CurrentGame.Mode != Game.Modes.SANDBOX) - { - if (guidanceModule == null) - guidanceModule = (DisplayModule)mjCore.GetComputerModule("MechJebModuleLandingGuidance"); - - if (guidanceModule == null) - { - SCANcontroller.controller.MechJebLoaded = false; - way = null; - return; - } - - if (!guidanceModule.unlockChecked) - return; + if (!HighLogic.LoadedSceneIsFlight || !FlightGlobals.ready) + return; - if (guidanceModule.hidden) - { - SCANcontroller.controller.MechJebLoaded = false; - shutdown = true; - way = null; - return; - } - } + way = null; - target = mjCore.target; + if (!SCAN_Settings_Config.Instance.MechJebTarget) + return; - if (target == null) - { - SCANcontroller.controller.MechJebLoaded = false; - way = null; + if (SCANcontroller.controller == null) return; - } if (!SCANcontroller.controller.MechJebLoaded) - { SCANcontroller.controller.MechJebLoaded = true; - } - - if (SCANcontroller.controller.LandingTarget != null) - { - way = SCANcontroller.controller.LandingTarget; - } - - if (SCANcontroller.controller.TargetSelecting) - { - way = null; - selectingTarget = true; - if (SCANcontroller.controller.TargetSelectingActive) - selectingInMap = true; - else - selectingInMap = false; - coords = SCANcontroller.controller.LandingTargetCoords; - return; - } - else if (selectingTarget) - { - selectingTarget = false; - if (selectingInMap) - { - selectingInMap = false; - coords = SCANcontroller.controller.LandingTargetCoords; - way = new SCANwaypoint(coords.y, coords.x, siteName); - target.SetPositionTarget(SCANcontroller.controller.LandingTargetBody, way.Latitude, way.Longitude); - } - } - - selectingInMap = false; - selectingTarget = false; if (target.Target == null) - { - way = null; return; - } - if (target.targetBody != v.mainBody) - { - way = null; + if (target.targetBody != body) return; - } if ((target.Target is DirectionTarget)) - { - way = null; return; - } coords.x = target.targetLongitude; coords.y = target.targetLatitude; + if (SCANcontroller.controller.LandingTarget != null) + way = SCANcontroller.controller.LandingTarget; + if (way != null) { if (!SCANUtil.ApproxEq(coords.x, way.Longitude) || !SCANUtil.ApproxEq(coords.y, way.Latitude)) @@ -198,34 +129,94 @@ protected override void LateUpdate() } } - protected override void OnGUIEvery() + private void OnTargetSet(Vector2d pos, CelestialBody b) { - if (SCANcontroller.controller == null) + if (!mjOnboard || target == null) return; - if (!SCANcontroller.controller.MechJebLoaded) + target.SetPositionTarget(b, pos.y, pos.x); + } + + private void SOIChange(GameEvents.HostedFromToAction action) + { + if (vessel == null) return; - if (!selectingInMap) + if (vessel != action.host) return; - drawTarget(); + body = action.to; + + data = SCANUtil.getData(body); + + if (data == null) + shutdown = true; } - //Draw the mapview MechJeb target arrows - private void drawTarget() + private void VesselChange(Vessel v) { - if (!selectingInMap) + if (vessel != v) + return; + + body = v.mainBody; + + if (vessel.FindPartModulesImplementing().Count <= 0) + { + SCANcontroller.controller.MechJebLoaded = false; + mjOnboard = false; + mjCore = null; return; + } - target.pickingPositionTarget = false; + mjCore = vessel.GetMasterMechJeb(); - if (!MapView.MapIsEnabled) + if (mjCore == null) + { + SCANcontroller.controller.MechJebLoaded = false; + mjOnboard = false; + target = null; return; - if (!v.isActiveVessel || v.GetMasterMechJeb() != mjCore) + } + + target = mjCore.target; + + if (target == null) + { + SCANcontroller.controller.MechJebLoaded = false; + mjOnboard = false; return; + } + + mjOnboard = true; + + if (HighLogic.CurrentGame.Mode != Game.Modes.SANDBOX) + { + if (guidanceModule == null) + guidanceModule = (DisplayModule)mjCore.GetComputerModule("MechJebModuleLandingGuidance"); + + if (guidanceModule == null) + { + SCANcontroller.controller.MechJebLoaded = false; + way = null; + mjOnboard = false; + mjTechTreeLocked = true; + return; + } + + guidanceModule.UnlockCheck(); + + if (guidanceModule.hidden) + { + SCANcontroller.controller.MechJebLoaded = false; + way = null; + mjOnboard = false; + mjTechTreeLocked = true; + return; + } + } - GLUtils.DrawGroundMarker(SCANcontroller.controller.LandingTargetBody, coords.y, coords.x, palette.mechjebYellow, true); + SCANcontroller.controller.MechJebLoaded = true; + mjTechTreeLocked = false; } } } diff --git a/SCANmechjeb/SCANmechjeb.csproj b/SCANmechjeb/SCANmechjeb.csproj index 1132eb863..54daf508b 100644 --- a/SCANmechjeb/SCANmechjeb.csproj +++ b/SCANmechjeb/SCANmechjeb.csproj @@ -43,11 +43,13 @@ False - + + False ..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Kerbal Space Program\KSP_x64_Data\Managed\UnityEngine.dll False - + + False ..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Kerbal Space Program\KSP_x64_Data\Managed\UnityEngine.UI.dll False diff --git a/SCANmechjeb/SCANmechjebMainMenu.cs b/SCANmechjeb/SCANmechjebMainMenu.cs index e21b190b8..b93dd8a8a 100644 --- a/SCANmechjeb/SCANmechjebMainMenu.cs +++ b/SCANmechjeb/SCANmechjebMainMenu.cs @@ -32,6 +32,8 @@ private void Awake() loaded = checkLoaded(); print(loaded ? "[SCANsatMechJeb] SCANsat and MechJeb Assemblies Detected" : "[SCANsatMechJeb] SCANsat or MechJeb Assembly Not Detected; Shutting Down..."); + + Destroy(gameObject); } public static bool Loaded diff --git a/SCANsat.Unity/CanvasFader.cs b/SCANsat.Unity/CanvasFader.cs new file mode 100644 index 000000000..a094c6efe --- /dev/null +++ b/SCANsat.Unity/CanvasFader.cs @@ -0,0 +1,91 @@ +#region license +/* [Scientific Committee on Advanced Navigation] + * S.C.A.N. Satellite + * + * CanvasFader - Monobehaviour for making smooth fade in and fade out for UI windows + * + * Copyright (c)2013 damny; + * Copyright (c)2014 technogeeky ; + * Copyright (c)2014 DMagic + * Copyright (c)2014 (Your Name Here) ; see LICENSE.txt for licensing details. + */ +#endregion + +using System; +using System.Collections; +using UnityEngine; +using UnityEngine.UI; + +namespace SCANsat.Unity +{ + [RequireComponent(typeof(CanvasGroup), typeof(RectTransform))] + public class CanvasFader : MonoBehaviour + { + [SerializeField] + private float SlowRate = 0.9f; + [SerializeField] + private float FastRate = 0.3f; + + private CanvasGroup canvas; + private IEnumerator fader; + private bool allowInterrupt = true; + + protected virtual void Awake() + { + canvas = GetComponent(); + } + + protected void Fade(float to, bool fast, Action call = null, bool interrupt = true, bool overrule = false) + { + if (canvas == null) + return; + + Fade(canvas.alpha, to, fast ? FastRate : SlowRate, call, interrupt, overrule); + } + + protected void Alpha(float to) + { + if (canvas == null) + return; + + to = Mathf.Clamp01(to); + canvas.alpha = to; + } + + private void Fade(float from, float to, float duration, Action call, bool interrupt, bool overrule) + { + if (!allowInterrupt && !overrule) + return; + + if (fader != null) + StopCoroutine(fader); + + fader = FadeRoutine(from, to, duration, call, interrupt); + StartCoroutine(fader); + } + + private IEnumerator FadeRoutine(float from, float to, float duration, Action call, bool interrupt) + { + allowInterrupt = interrupt; + + yield return new WaitForEndOfFrame(); + + float f = 0; + + while (f <= 1) + { + f += Time.deltaTime / duration; + Alpha(Mathf.Lerp(from, to, f)); + yield return null; + } + + if (call != null) + call.Invoke(); + + allowInterrupt = true; + + fader = null; + } + + } +} diff --git a/SCANsat.Unity/HSVPicker/Enums/ColorValues.cs b/SCANsat.Unity/HSVPicker/Enums/ColorValues.cs new file mode 100644 index 000000000..9414ad8ef --- /dev/null +++ b/SCANsat.Unity/HSVPicker/Enums/ColorValues.cs @@ -0,0 +1,18 @@ +using UnityEngine; + +namespace SCANsat.Unity.HSVPicker.Enum +{ + public enum ColorValues + { + R, + G, + B, + A, + + Hue, + Saturation, + Value, + + Hex + } +} diff --git a/SCANsat.Unity/HSVPicker/Events/ColorChangedEvent.cs b/SCANsat.Unity/HSVPicker/Events/ColorChangedEvent.cs new file mode 100644 index 000000000..dc55bab40 --- /dev/null +++ b/SCANsat.Unity/HSVPicker/Events/ColorChangedEvent.cs @@ -0,0 +1,12 @@ +using UnityEngine; +using System; +using UnityEngine.Events; + +namespace SCANsat.Unity.HSVPicker.Events +{ + [Serializable] + public class ColorChangedEvent : UnityEvent + { + + } +} diff --git a/SCANsat.Unity/HSVPicker/Events/HSVChangedEvent.cs b/SCANsat.Unity/HSVPicker/Events/HSVChangedEvent.cs new file mode 100644 index 000000000..c8e99ed48 --- /dev/null +++ b/SCANsat.Unity/HSVPicker/Events/HSVChangedEvent.cs @@ -0,0 +1,10 @@ +using UnityEngine; +using UnityEngine.Events; + +namespace SCANsat.Unity.HSVPicker.Events +{ + public class HSVChangedEvent : UnityEvent + { + + } +} diff --git a/SCANsat.Unity/HSVPicker/UI/ColorImage.cs b/SCANsat.Unity/HSVPicker/UI/ColorImage.cs new file mode 100644 index 000000000..ea4cc5bf0 --- /dev/null +++ b/SCANsat.Unity/HSVPicker/UI/ColorImage.cs @@ -0,0 +1,48 @@ +using UnityEngine; +using UnityEngine.UI; +using System.Collections; + +namespace SCANsat.Unity.HSVPicker.UI +{ + [RequireComponent(typeof(Image))] + public class ColorImage : MonoBehaviour + { + public ColorPicker picker; + private bool _isActive; + + private Image image; + + public bool IsActive + { + get { return _isActive; } + set { _isActive = value; } + } + + public Color CurrentColor + { + get { return image.color; } + } + + private void Awake() + { + image = GetComponent(); + picker.onValueChanged.AddListener(ColorChanged); + } + + private void OnDestroy() + { + picker.onValueChanged.RemoveListener(ColorChanged); + } + + private void ColorChanged(Color newColor) + { + if (_isActive) + image.color = newColor; + } + + public void SetColor(Color newColor) + { + image.color = newColor; + } + } +} diff --git a/SCANsat.Unity/HSVPicker/UI/ColorInput.cs b/SCANsat.Unity/HSVPicker/UI/ColorInput.cs new file mode 100644 index 000000000..1ba924686 --- /dev/null +++ b/SCANsat.Unity/HSVPicker/UI/ColorInput.cs @@ -0,0 +1,75 @@ +using UnityEngine; +using UnityEngine.UI; +using System; +using SCANsat.Unity.HSVPicker.Enum; + +namespace SCANsat.Unity.HSVPicker.UI +{ + /// + /// Displays one of the color values of aColorPicker + /// + public class ColorInput : MonoBehaviour + { + public ColorPicker hsvpicker; + + /// + /// Which value this slider can edit. + /// + public ColorValues type; + + private InputHandler inputField; + + private void Awake() + { + inputField = GetComponent(); + + inputField.OnValueChange.AddListener(InputChanged); + } + + private void OnDestroy() + { + inputField.OnValueChange.RemoveListener(InputChanged); + } + + private void InputChanged(string input) + { + if (string.IsNullOrEmpty(input)) + return; + + float original = 0; + + switch(type) + { + case ColorValues.R: + original = hsvpicker.R; + break; + case ColorValues.G: + original = hsvpicker.G; + break; + case ColorValues.B: + original = hsvpicker.B; + break; + } + + float f = original; + + if (!float.TryParse(input, out f)) + return; + + if (f < 0) + return; + else if (input.StartsWith("1.")) + f = 1; + else if (f >= 1 && f <= 255) + { + f = Mathf.RoundToInt(f); + + f /= 255; + } + else if (f > 255) + return; + + hsvpicker.AssignColor(type, f); + } + } +} diff --git a/SCANsat.Unity/HSVPicker/UI/ColorLabel.cs b/SCANsat.Unity/HSVPicker/UI/ColorLabel.cs new file mode 100644 index 000000000..0c61607c6 --- /dev/null +++ b/SCANsat.Unity/HSVPicker/UI/ColorLabel.cs @@ -0,0 +1,89 @@ +using UnityEngine; +using UnityEngine.UI; +using System; +using SCANsat.Unity.HSVPicker.Enum; + +namespace SCANsat.Unity.HSVPicker.UI +{ + [RequireComponent(typeof(TextHandler))] + public class ColorLabel : MonoBehaviour + { + public ColorPicker picker; + public ColorValues type; + + private TextHandler label; + + private void Awake() + { + label = GetComponent(); + } + + private void OnEnable() + { + if (Application.isPlaying && picker != null) + { + picker.onValueChanged.AddListener(ColorChanged); + picker.onHSVChanged.AddListener(HSVChanged); + } + } + + private void OnDestroy() + { + if (picker != null) + { + picker.onValueChanged.RemoveListener(ColorChanged); + picker.onHSVChanged.RemoveListener(HSVChanged); + } + } + + private void ColorChanged(Color color) + { + UpdateValue(); + } + + private void HSVChanged(float hue, float sateration, float value) + { + UpdateValue(); + } + + private void UpdateValue() + { + if (picker == null) + { + label.OnTextUpdate.Invoke("-"); + } + else + { + float valueOne = 0; + float valueTwo = 0; + float valueThree = 0; + + + if (type == ColorValues.R) + { + valueOne = picker.GetValue(ColorValues.R) * 255; + valueTwo = picker.GetValue(ColorValues.G) * 255; + valueThree = picker.GetValue(ColorValues.B) * 255; + + label.OnTextUpdate.Invoke(string.Format("{0:N0},{1:N0},{2:N0}", Mathf.FloorToInt(valueOne), Mathf.FloorToInt(valueTwo), Mathf.FloorToInt(valueThree))); + } + else if (type == ColorValues.Hue) + { + valueOne = picker.GetValue(ColorValues.Hue) * 360; + valueTwo = picker.GetValue(ColorValues.Saturation) * 255; + valueThree = picker.GetValue(ColorValues.Value) * 255; + + label.OnTextUpdate.Invoke(string.Format("{0:N0},{1:N0},{2:N0}", Mathf.FloorToInt(valueOne), Mathf.FloorToInt(valueTwo), Mathf.FloorToInt(valueThree))); + } + else if (type == ColorValues.Hex) + { + valueOne = picker.GetValue(ColorValues.R) * 255; + valueTwo = picker.GetValue(ColorValues.G) * 255; + valueThree = picker.GetValue(ColorValues.B) * 255; + + label.OnTextUpdate.Invoke(string.Format("#{0:X2}{1:X2}{2:X2}", Mathf.FloorToInt(valueOne), Mathf.FloorToInt(valueTwo), Mathf.FloorToInt(valueThree))); + } + } + } + } +} diff --git a/SCANsat.Unity/HSVPicker/UI/ColorPicker.cs b/SCANsat.Unity/HSVPicker/UI/ColorPicker.cs new file mode 100644 index 000000000..a98759771 --- /dev/null +++ b/SCANsat.Unity/HSVPicker/UI/ColorPicker.cs @@ -0,0 +1,261 @@ +using UnityEngine; +using System.Collections; +using UnityEngine.UI; +using UnityEngine.Events; +using SCANsat.Unity.HSVPicker.Utility; +using SCANsat.Unity.HSVPicker.Enum; +using SCANsat.Unity.HSVPicker.Events; + +namespace SCANsat.Unity.HSVPicker.UI +{ + public class ColorPicker : MonoBehaviour + { + private float _hue = 0; + private float _saturation = 0; + private float _brightness = 0; + + private float _red = 0; + private float _green = 0; + private float _blue = 0; + + private float _alpha = 1; + + public ColorChangedEvent onValueChanged = new ColorChangedEvent(); + public HSVChangedEvent onHSVChanged = new HSVChangedEvent(); + + public Color CurrentColor + { + get + { + return new Color(_red, _green, _blue, _alpha); + } + set + { + if (CurrentColor == value) + return; + + _red = value.r; + _green = value.g; + _blue = value.b; + _alpha = value.a; + + RGBChanged(); + + SendChangedEvent(); + } + } + + private void Start() + { + SendChangedEvent(); + } + + public float H + { + get + { + return _hue; + } + set + { + if (_hue == value) + return; + + _hue = value; + + HSVChanged(); + + SendChangedEvent(); + } + } + + public float S + { + get + { + return _saturation; + } + set + { + if (_saturation == value) + return; + + _saturation = value; + + HSVChanged(); + + SendChangedEvent(); + } + } + + public float V + { + get + { + return _brightness; + } + set + { + if (_brightness == value) + return; + + _brightness = value; + + HSVChanged(); + + SendChangedEvent(); + } + } + + public float R + { + get + { + return _red; + } + set + { + if (_red == value) + return; + + _red = value; + + RGBChanged(); + + SendChangedEvent(); + } + } + + public float G + { + get + { + return _green; + } + set + { + if (_green == value) + return; + + _green = value; + + RGBChanged(); + + SendChangedEvent(); + } + } + + public float B + { + get + { + return _blue; + } + set + { + if (_blue == value) + return; + + _blue = value; + + RGBChanged(); + + SendChangedEvent(); + } + } + + private float A + { + get + { + return _alpha; + } + set + { + if (_alpha == value) + return; + + _alpha = value; + + SendChangedEvent(); + } + } + + private void RGBChanged() + { + HsvColor color = HSVUtil.ConvertRgbToHsv(CurrentColor); + + _hue = color.normalizedH; + _saturation = color.normalizedS; + _brightness = color.normalizedV; + } + + private void HSVChanged() + { + Color color = HSVUtil.ConvertHsvToRgb(_hue * 360, _saturation, _brightness, _alpha); + + _red = color.r; + _green = color.g; + _blue = color.b; + } + + private void SendChangedEvent() + { + onValueChanged.Invoke(CurrentColor); + onHSVChanged.Invoke(_hue, _saturation, _brightness); + } + + public void AssignColor(ColorValues type, float value) + { + switch (type) + { + case ColorValues.R: + R = value; + break; + case ColorValues.G: + G = value; + break; + case ColorValues.B: + B = value; + break; + case ColorValues.A: + A = value; + break; + case ColorValues.Hue: + H = value; + break; + case ColorValues.Saturation: + S = value; + break; + case ColorValues.Value: + V = value; + break; + default: + break; + } + } + + public float GetValue(ColorValues type) + { + switch (type) + { + case ColorValues.R: + return R; + case ColorValues.G: + return G; + case ColorValues.B: + return B; + case ColorValues.A: + return A; + case ColorValues.Hue: + return H; + case ColorValues.Saturation: + return S; + case ColorValues.Value: + return V; + default: + throw new System.NotImplementedException(""); + } + } + } +} diff --git a/SCANsat.Unity/HSVPicker/UI/ColorSlider.cs b/SCANsat.Unity/HSVPicker/UI/ColorSlider.cs new file mode 100644 index 000000000..031014852 --- /dev/null +++ b/SCANsat.Unity/HSVPicker/UI/ColorSlider.cs @@ -0,0 +1,95 @@ +using UnityEngine; +using UnityEngine.UI; +using System; +using SCANsat.Unity.HSVPicker.Enum; + +namespace SCANsat.Unity.HSVPicker.UI +{ + /// + /// Displays one of the color values of aColorPicker + /// + [RequireComponent(typeof(Slider))] + public class ColorSlider : MonoBehaviour + { + public ColorPicker hsvpicker; + + /// + /// Which value this slider can edit. + /// + public ColorValues type; + + private Slider slider; + + private bool listen = true; + + private void Awake() + { + slider = GetComponent(); + + hsvpicker.onValueChanged.AddListener(ColorChanged); + hsvpicker.onHSVChanged.AddListener(HSVChanged); + slider.onValueChanged.AddListener(SliderChanged); + } + + private void OnDestroy() + { + hsvpicker.onValueChanged.RemoveListener(ColorChanged); + hsvpicker.onHSVChanged.RemoveListener(HSVChanged); + slider.onValueChanged.RemoveListener(SliderChanged); + } + + private void ColorChanged(Color newColor) + { + listen = false; + switch (type) + { + case ColorValues.R: + slider.normalizedValue = newColor.r; + break; + case ColorValues.G: + slider.normalizedValue = newColor.g; + break; + case ColorValues.B: + slider.normalizedValue = newColor.b; + break; + case ColorValues.A: + slider.normalizedValue = newColor.a; + break; + default: + break; + } + } + + private void HSVChanged(float hue, float saturation, float value) + { + listen = false; + switch (type) + { + case ColorValues.Hue: + slider.normalizedValue = hue; //1 - hue; + break; + case ColorValues.Saturation: + slider.normalizedValue = saturation; + break; + case ColorValues.Value: + slider.normalizedValue = value; + break; + default: + break; + } + } + + private void SliderChanged(float newValue) + { + if (listen) + { + newValue = slider.normalizedValue; + //if (type == ColorValues.Hue) + // newValue = 1 - newValue; + + hsvpicker.AssignColor(type, newValue); + } + listen = true; + } + } +} diff --git a/SCANsat.Unity/HSVPicker/UI/ColorSliderImage.cs b/SCANsat.Unity/HSVPicker/UI/ColorSliderImage.cs new file mode 100644 index 000000000..a058f02d1 --- /dev/null +++ b/SCANsat.Unity/HSVPicker/UI/ColorSliderImage.cs @@ -0,0 +1,217 @@ +using UnityEngine; +using UnityEngine.UI; +using System.Collections; +using SCANsat.Unity.HSVPicker.Enum; +using SCANsat.Unity.HSVPicker.Utility; + +namespace SCANsat.Unity.HSVPicker.UI +{ + [RequireComponent(typeof(RawImage)), ExecuteInEditMode()] + public class ColorSliderImage : MonoBehaviour + { + public ColorPicker picker; + + /// + /// Which value this slider can edit. + /// + public ColorValues type; + + public Slider.Direction direction; + + private RawImage image; + + private RectTransform rectTransform + { + get + { + return transform as RectTransform; + } + } + + private void Awake() + { + image = GetComponent(); + + RegenerateTexture(); + } + + private void OnEnable() + { + if (picker != null && Application.isPlaying) + { + picker.onValueChanged.AddListener(ColorChanged); + picker.onHSVChanged.AddListener(HSVChanged); + } + } + + private void OnDisable() + { + if (picker != null) + { + picker.onValueChanged.RemoveListener(ColorChanged); + picker.onHSVChanged.RemoveListener(HSVChanged); + } + } + + private void OnDestroy() + { + if (image.texture != null) + DestroyImmediate(image.texture); + } + +#if UNITY_EDITOR + private void OnValidate() + { + image = GetComponent(); + RegenerateTexture(); + } +#endif + + private void ColorChanged(Color newColor) + { + switch (type) + { + case ColorValues.R: + case ColorValues.G: + case ColorValues.B: + case ColorValues.Saturation: + case ColorValues.Value: + RegenerateTexture(); + break; + case ColorValues.A: + case ColorValues.Hue: + default: + break; + } + } + + private void HSVChanged(float hue, float saturation, float value) + { + switch (type) + { + case ColorValues.R: + case ColorValues.G: + case ColorValues.B: + case ColorValues.Saturation: + case ColorValues.Value: + RegenerateTexture(); + break; + case ColorValues.A: + case ColorValues.Hue: + default: + break; + } + } + + private void RegenerateTexture() + { + Color32 baseColor = picker != null ? picker.CurrentColor : Color.black; + + float h = picker != null ? picker.H : 0; + float s = picker != null ? picker.S : 0; + float v = picker != null ? picker.V : 0; + + Texture2D texture; + Color32[] colors; + + bool vertical = direction == Slider.Direction.BottomToTop || direction == Slider.Direction.TopToBottom; + bool inverted = direction == Slider.Direction.TopToBottom || direction == Slider.Direction.RightToLeft; + + int size; + switch (type) + { + case ColorValues.R: + case ColorValues.G: + case ColorValues.B: + case ColorValues.A: + size = 255; + break; + case ColorValues.Hue: + size = 360; + break; + case ColorValues.Saturation: + case ColorValues.Value: + size = 100; + break; + default: + throw new System.NotImplementedException(""); + } + if (vertical) + texture = new Texture2D(1, size); + else + texture = new Texture2D(size, 1); + + texture.hideFlags = HideFlags.DontSave; + colors = new Color32[size]; + + switch (type) + { + case ColorValues.R: + for (byte i = 0; i < size; i++) + { + colors[inverted ? size - 1 - i : i] = new Color32(i, baseColor.g, baseColor.b, 255); + } + break; + case ColorValues.G: + for (byte i = 0; i < size; i++) + { + colors[inverted ? size - 1 - i : i] = new Color32(baseColor.r, i, baseColor.b, 255); + } + break; + case ColorValues.B: + for (byte i = 0; i < size; i++) + { + colors[inverted ? size - 1 - i : i] = new Color32(baseColor.r, baseColor.g, i, 255); + } + break; + case ColorValues.A: + for (byte i = 0; i < size; i++) + { + colors[inverted ? size - 1 - i : i] = new Color32(i, i, i, 255); + } + break; + case ColorValues.Hue: + for (int i = 0; i < size; i++) + { + colors[inverted ? size - 1 - i : i] = HSVUtil.ConvertHsvToRgb(i, 1, 1, 1); + } + break; + case ColorValues.Saturation: + for (int i = 0; i < size; i++) + { + colors[inverted ? size - 1 - i : i] = HSVUtil.ConvertHsvToRgb(h * 360, (float)i / size, v, 1); + } + break; + case ColorValues.Value: + for (int i = 0; i < size; i++) + { + colors[inverted ? size - 1 - i : i] = HSVUtil.ConvertHsvToRgb(h * 360, s, (float)i / size, 1); + } + break; + default: + throw new System.NotImplementedException(""); + } + texture.SetPixels32(colors); + texture.Apply(); + + if (image.texture != null) + DestroyImmediate(image.texture); + image.texture = texture; + + switch (direction) + { + case Slider.Direction.BottomToTop: + case Slider.Direction.TopToBottom: + image.uvRect = new Rect(0, 0, 2, 1); + break; + case Slider.Direction.LeftToRight: + case Slider.Direction.RightToLeft: + image.uvRect = new Rect(0, 0, 1, 2); + break; + default: + break; + } + } + + } +} diff --git a/SCANsat.Unity/HSVPicker/UI/SVBoxSlider.cs b/SCANsat.Unity/HSVPicker/UI/SVBoxSlider.cs new file mode 100644 index 000000000..caa8b19f3 --- /dev/null +++ b/SCANsat.Unity/HSVPicker/UI/SVBoxSlider.cs @@ -0,0 +1,123 @@ +using UnityEngine; +using UnityEngine.UI; +using System.Collections; +using SCANsat.Unity.HSVPicker.Utility; +using SCANsat.Unity.HSVPicker.Enum; + +namespace SCANsat.Unity.HSVPicker.UI +{ + [RequireComponent(typeof(BoxSlider), typeof(RawImage)), ExecuteInEditMode()] + public class SVBoxSlider : MonoBehaviour + { + public ColorPicker picker; + + private BoxSlider slider; + private RawImage image; + + private float lastH = -1; + private bool listen = true; + + public RectTransform rectTransform + { + get + { + return transform as RectTransform; + } + } + + private void Awake() + { + slider = GetComponent(); + image = GetComponent(); + + RegenerateSVTexture(); + } + + private void OnEnable() + { + if (Application.isPlaying && picker != null) + { + slider.onValueChanged.AddListener(SliderChanged); + picker.onHSVChanged.AddListener(HSVChanged); + } + } + + private void OnDisable() + { + if (picker != null) + { + slider.onValueChanged.RemoveListener(SliderChanged); + picker.onHSVChanged.RemoveListener(HSVChanged); + } + } + + private void OnDestroy() + { + if (image.texture != null) + DestroyImmediate(image.texture); + } + +#if UNITY_EDITOR + private void OnValidate() + { + image = GetComponent(); + RegenerateSVTexture(); + } +#endif + + private void SliderChanged(float saturation, float value) + { + if (listen) + { + picker.AssignColor(ColorValues.Saturation, saturation); + picker.AssignColor(ColorValues.Value, value); + } + listen = true; + } + + private void HSVChanged(float h, float s, float v) + { + if (lastH != h) + { + lastH = h; + RegenerateSVTexture(); + } + + if (s != slider.normalizedValue) + { + listen = false; + slider.normalizedValue = s; + } + + if (v != slider.normalizedValueY) + { + listen = false; + slider.normalizedValueY = v; + } + } + + private void RegenerateSVTexture() + { + double h = picker != null ? picker.H * 360 : 0; + + if (image.texture != null) + DestroyImmediate(image.texture); + + Texture2D texture = new Texture2D(100, 100); + texture.hideFlags = HideFlags.DontSave; + + for (int s = 0; s < 100; s++) + { + Color32[] colors = new Color32[100]; + for (int v = 0; v < 100; v++) + { + colors[v] = HSVUtil.ConvertHsvToRgb(h, (float)s / 100, (float)v / 100, 1); + } + texture.SetPixels32(s, 0, 1, 100, colors); + } + texture.Apply(); + + image.texture = texture; + } + } +} diff --git a/SCANsat.Unity/HSVPicker/UtilityScripts/BoxSlider.cs b/SCANsat.Unity/HSVPicker/UtilityScripts/BoxSlider.cs new file mode 100644 index 000000000..f04465181 --- /dev/null +++ b/SCANsat.Unity/HSVPicker/UtilityScripts/BoxSlider.cs @@ -0,0 +1,436 @@ +using System; +using UnityEngine; +using UnityEngine.UI; +using UnityEngine.Events; +using UnityEngine.EventSystems; + +namespace SCANsat.Unity.HSVPicker.Utility +{ + [AddComponentMenu("UI/BoxSlider", 35)] + [RequireComponent(typeof(RectTransform))] + public class BoxSlider : Selectable, IDragHandler, IInitializePotentialDragHandler, ICanvasElement + { + public enum Direction + { + LeftToRight, + RightToLeft, + BottomToTop, + TopToBottom, + } + + [Serializable] + public class BoxSliderEvent : UnityEvent { } + + [SerializeField] + private RectTransform m_HandleRect; + public RectTransform handleRect { get { return m_HandleRect; } set { if (SetClass(ref m_HandleRect, value)) { UpdateCachedReferences(); UpdateVisuals(); } } } + + [Space(6)] + + [SerializeField] + private float m_MinValue = 0; + public float minValue { get { return m_MinValue; } set { if (SetStruct(ref m_MinValue, value)) { Set(m_Value); SetY (m_ValueY); UpdateVisuals(); } } } + + [SerializeField] + private float m_MaxValue = 1; + public float maxValue { get { return m_MaxValue; } set { if (SetStruct(ref m_MaxValue, value)) { Set(m_Value); SetY (m_ValueY); UpdateVisuals(); } } } + + [SerializeField] + private bool m_WholeNumbers = false; + public bool wholeNumbers { get { return m_WholeNumbers; } set { if (SetStruct(ref m_WholeNumbers, value)) { Set(m_Value); SetY (m_ValueY); UpdateVisuals(); } } } + + [SerializeField] + private float m_Value = 1f; + public float value + { + get + { + if (wholeNumbers) + return Mathf.Round(m_Value); + return m_Value; + } + set + { + Set(value); + } + } + + public float normalizedValue + { + get + { + if (Mathf.Approximately(minValue, maxValue)) + return 0; + return Mathf.InverseLerp(minValue, maxValue, value); + } + set + { + this.value = Mathf.Lerp(minValue, maxValue, value); + } + } + + [SerializeField] + private float m_ValueY = 1f; + public float valueY + { + get + { + if (wholeNumbers) + return Mathf.Round(m_ValueY); + return m_ValueY; + } + set + { + SetY(value); + } + } + + public float normalizedValueY + { + get + { + if (Mathf.Approximately(minValue, maxValue)) + return 0; + return Mathf.InverseLerp(minValue, maxValue, valueY); + } + set + { + this.valueY = Mathf.Lerp(minValue, maxValue, value); + } + } + + [Space(6)] + + // Allow for delegate-based subscriptions for faster events than 'eventReceiver', and allowing for multiple receivers. + [SerializeField] + private BoxSliderEvent m_OnValueChanged = new BoxSliderEvent(); + public BoxSliderEvent onValueChanged { get { return m_OnValueChanged; } set { m_OnValueChanged = value; } } + + // Private fields + + //private Image m_FillImage; + //private Transform m_FillTransform; + //private RectTransform m_FillContainerRect; + private Transform m_HandleTransform; + private RectTransform m_HandleContainerRect; + + // The offset from handle position to mouse down position + private Vector2 m_Offset = Vector2.zero; + + private DrivenRectTransformTracker m_Tracker; + + // Size of each step. + float stepSize { get { return wholeNumbers ? 1 : (maxValue - minValue) * 0.1f; } } + + protected BoxSlider() + { } + + #if UNITY_EDITOR + protected override void OnValidate() + { + base.OnValidate(); + + if (wholeNumbers) + { + m_MinValue = Mathf.Round(m_MinValue); + m_MaxValue = Mathf.Round(m_MaxValue); + } + UpdateCachedReferences(); + Set(m_Value, false); + SetY(m_ValueY, false); + // Update rects since other things might affect them even if value didn't change. + UpdateVisuals(); + + var prefabType = UnityEditor.PrefabUtility.GetPrefabType(this); + if (prefabType != UnityEditor.PrefabType.Prefab && !Application.isPlaying) + CanvasUpdateRegistry.RegisterCanvasElementForLayoutRebuild(this); + } + + #endif // if UNITY_EDITOR + + public virtual void Rebuild(CanvasUpdate executing) + { + #if UNITY_EDITOR + if (executing == CanvasUpdate.Prelayout) + onValueChanged.Invoke(value, valueY); + #endif + } + + public void LayoutComplete() + { + + } + + public void GraphicUpdateComplete() + { + + } + + public static bool SetClass(ref T currentValue, T newValue) where T: class + { + if ((currentValue == null && newValue == null) || (currentValue != null && currentValue.Equals(newValue))) + return false; + + currentValue = newValue; + return true; + } + + public static bool SetStruct(ref T currentValue, T newValue) where T: struct + { + if (currentValue.Equals(newValue)) + return false; + + currentValue = newValue; + return true; + } + + protected override void OnEnable() + { + base.OnEnable(); + UpdateCachedReferences(); + Set(m_Value, false); + SetY(m_ValueY, false); + // Update rects since they need to be initialized correctly. + UpdateVisuals(); + } + + protected override void OnDisable() + { + m_Tracker.Clear(); + base.OnDisable(); + } + + void UpdateCachedReferences() + { + + if (m_HandleRect) + { + m_HandleTransform = m_HandleRect.transform; + if (m_HandleTransform.parent != null) + m_HandleContainerRect = m_HandleTransform.parent.GetComponent(); + } + else + { + m_HandleContainerRect = null; + } + } + + // Set the valueUpdate the visible Image. + void Set(float input) + { + Set(input, true); + } + + void Set(float input, bool sendCallback) + { + // Clamp the input + float newValue = Mathf.Clamp(input, minValue, maxValue); + if (wholeNumbers) + newValue = Mathf.Round(newValue); + + // If the stepped value doesn't match the last one, it's time to update + if (m_Value == newValue) + return; + + m_Value = newValue; + UpdateVisuals(); + if (sendCallback) + m_OnValueChanged.Invoke(newValue, valueY); + } + + void SetY(float input) + { + SetY(input, true); + } + + void SetY(float input, bool sendCallback) + { + // Clamp the input + float newValue = Mathf.Clamp(input, minValue, maxValue); + if (wholeNumbers) + newValue = Mathf.Round(newValue); + + // If the stepped value doesn't match the last one, it's time to update + if (m_ValueY == newValue) + return; + + m_ValueY = newValue; + UpdateVisuals(); + if (sendCallback) + m_OnValueChanged.Invoke(value, newValue); + } + + + protected override void OnRectTransformDimensionsChange() + { + base.OnRectTransformDimensionsChange(); + UpdateVisuals(); + } + + enum Axis + { + Horizontal = 0, + Vertical = 1 + } + + + // Force-update the slider. Useful if you've changed the properties and want it to update visually. + private void UpdateVisuals() + { + #if UNITY_EDITOR + if (!Application.isPlaying) + UpdateCachedReferences(); + #endif + + m_Tracker.Clear(); + + + //to business! + if (m_HandleContainerRect != null) + { + m_Tracker.Add(this, m_HandleRect, DrivenTransformProperties.Anchors); + Vector2 anchorMin = Vector2.zero; + Vector2 anchorMax = Vector2.one; + anchorMin[0] = anchorMax[0] = (normalizedValue); + anchorMin[1] = anchorMax[1] = ( normalizedValueY); + + m_HandleRect.anchorMin = anchorMin; + m_HandleRect.anchorMax = anchorMax; + } + } + + // Update the slider's position based on the mouse. + void UpdateDrag(PointerEventData eventData, Camera cam) + { + RectTransform clickRect = m_HandleContainerRect; + if (clickRect != null && clickRect.rect.size[0] > 0) + { + Vector2 localCursor; + if (!RectTransformUtility.ScreenPointToLocalPointInRectangle(clickRect, eventData.position, cam, out localCursor)) + return; + localCursor -= clickRect.rect.position; + + float val = Mathf.Clamp01((localCursor - m_Offset)[0] / clickRect.rect.size[0]); + normalizedValue = (val); + + float valY = Mathf.Clamp01((localCursor - m_Offset)[1] / clickRect.rect.size[1]); + normalizedValueY = ( valY); + + } + } + + private bool MayDrag(PointerEventData eventData) + { + return IsActive() && IsInteractable() && eventData.button == PointerEventData.InputButton.Left; + } + + public override void OnPointerDown(PointerEventData eventData) + { + if (!MayDrag(eventData)) + return; + + base.OnPointerDown(eventData); + + m_Offset = Vector2.zero; + if (m_HandleContainerRect != null && RectTransformUtility.RectangleContainsScreenPoint(m_HandleRect, eventData.position, eventData.enterEventCamera)) + { + Vector2 localMousePos; + if (RectTransformUtility.ScreenPointToLocalPointInRectangle(m_HandleRect, eventData.position, eventData.pressEventCamera, out localMousePos)) + m_Offset = localMousePos; + m_Offset.y = -m_Offset.y; + } + else + { + // Outside the slider handle - jump to this point instead + UpdateDrag(eventData, eventData.pressEventCamera); + } + } + + public virtual void OnDrag(PointerEventData eventData) + { + if (!MayDrag(eventData)) + return; + + UpdateDrag(eventData, eventData.pressEventCamera); + } + + //public override void OnMove(AxisEventData eventData) + //{ + // if (!IsActive() || !IsInteractable()) + // { + // base.OnMove(eventData); + // return; + // } + + // switch (eventData.moveDir) + // { + // case MoveDirection.Left: + // if (axis == Axis.Horizontal && FindSelectableOnLeft() == null) { + // Set(reverseValue ? value + stepSize : value - stepSize); + // SetY (reverseValue ? valueY + stepSize : valueY - stepSize); + // } + // else + // base.OnMove(eventData); + // break; + // case MoveDirection.Right: + // if (axis == Axis.Horizontal && FindSelectableOnRight() == null) { + // Set(reverseValue ? value - stepSize : value + stepSize); + // SetY(reverseValue ? valueY - stepSize : valueY + stepSize); + // } + // else + // base.OnMove(eventData); + // break; + // case MoveDirection.Up: + // if (axis == Axis.Vertical && FindSelectableOnUp() == null) { + // Set(reverseValue ? value - stepSize : value + stepSize); + // SetY(reverseValue ? valueY - stepSize : valueY + stepSize); + // } + // else + // base.OnMove(eventData); + // break; + // case MoveDirection.Down: + // if (axis == Axis.Vertical && FindSelectableOnDown() == null) { + // Set(reverseValue ? value + stepSize : value - stepSize); + // SetY(reverseValue ? valueY + stepSize : valueY - stepSize); + // } + // else + // base.OnMove(eventData); + // break; + // } + //} + + //public override Selectable FindSelectableOnLeft() + //{ + // if (navigation.mode == Navigation.Mode.Automatic && axis == Axis.Horizontal) + // return null; + // return base.FindSelectableOnLeft(); + //} + + //public override Selectable FindSelectableOnRight() + //{ + // if (navigation.mode == Navigation.Mode.Automatic && axis == Axis.Horizontal) + // return null; + // return base.FindSelectableOnRight(); + //} + + //public override Selectable FindSelectableOnUp() + //{ + // if (navigation.mode == Navigation.Mode.Automatic && axis == Axis.Vertical) + // return null; + // return base.FindSelectableOnUp(); + //} + + //public override Selectable FindSelectableOnDown() + //{ + // if (navigation.mode == Navigation.Mode.Automatic && axis == Axis.Vertical) + // return null; + // return base.FindSelectableOnDown(); + //} + + public virtual void OnInitializePotentialDrag(PointerEventData eventData) + { + eventData.useDragThreshold = false; + } + + } +} diff --git a/SCANsat.Unity/HSVPicker/UtilityScripts/HSVUtil.cs b/SCANsat.Unity/HSVPicker/UtilityScripts/HSVUtil.cs new file mode 100644 index 000000000..1b758e71b --- /dev/null +++ b/SCANsat.Unity/HSVPicker/UtilityScripts/HSVUtil.cs @@ -0,0 +1,211 @@ +using UnityEngine; +using System.Collections; +using System.Collections.Generic; +using System; + +namespace SCANsat.Unity.HSVPicker.Utility +{ + #region ColorUtilities + + public static class HSVUtil + { + + public static HsvColor ConvertRgbToHsv(Color color) + { + return ConvertRgbToHsv((int)(color.r * 255), (int)(color.g * 255), (int)(color.b * 255)); + } + + //Converts an RGB color to an HSV color. + public static HsvColor ConvertRgbToHsv(double r, double b, double g) + { + double delta, min; + double h = 0, s, v; + + min = Math.Min(Math.Min(r, g), b); + v = Math.Max(Math.Max(r, g), b); + delta = v - min; + + if (v == 0.0) + s = 0; + else + s = delta / v; + + if (s == 0) + h = 360; + else + { + if (r == v) + h = (g - b) / delta; + else if (g == v) + h = 2 + (b - r) / delta; + else if (b == v) + h = 4 + (r - g) / delta; + + h *= 60; + if (h <= 0.0) + h += 360; + } + + HsvColor hsvColor = new HsvColor(); + hsvColor.H = 360 - h; + hsvColor.S = s; + hsvColor.V = v / 255; + + return hsvColor; + + } + + // Converts an HSV color to an RGB color. + public static Color ConvertHsvToRgb(double h, double s, double v, float alpha) + { + + double r = 0, g = 0, b = 0; + + if (s == 0) + { + r = v; + g = v; + b = v; + } + + else + { + int i; + double f, p, q, t; + + + if (h == 360) + h = 0; + else + h = h / 60; + + i = (int)(h); + f = h - i; + + p = v * (1.0 - s); + q = v * (1.0 - (s * f)); + t = v * (1.0 - (s * (1.0f - f))); + + + switch (i) + { + case 0: + r = v; + g = t; + b = p; + break; + + case 1: + r = q; + g = v; + b = p; + break; + + case 2: + r = p; + g = v; + b = t; + break; + + case 3: + r = p; + g = q; + b = v; + break; + + case 4: + r = t; + g = p; + b = v; + break; + + default: + r = v; + g = p; + b = q; + break; + } + + } + + return new Color((float)r, (float)g, (float)b, alpha); + + } + } + + + #endregion ColorUtilities + + + // Describes a color in terms of + // Hue, Saturation, and Value (brightness) + #region HsvColor + public struct HsvColor + { + /// + /// The Hue, ranges between 0 and 360 + /// + public double H; + + /// + /// The saturation, ranges between 0 and 1 + /// + public double S; + + // The value (brightness), ranges between 0 and 1 + public double V; + + public float normalizedH + { + get + { + return (float)H / 360f; + } + + set + { + H = (double)value * 360; + } + } + + public float normalizedS + { + get + { + return (float)S; + } + set + { + S = (double)value; + } + } + + public float normalizedV + { + get + { + return (float)V; + } + set + { + V = (double)value; + } + } + + public HsvColor(double h, double s, double v) + { + this.H = h; + this.S = s; + this.V = v; + } + + public override string ToString() + { + return "{" + H.ToString("f2") + "," + S.ToString("f2") + "," + V.ToString("f2") + "}"; + } + } + #endregion HsvColor +} + + + diff --git a/SCANsat.Unity/InputHandler.cs b/SCANsat.Unity/InputHandler.cs new file mode 100644 index 000000000..ad4d96b1e --- /dev/null +++ b/SCANsat.Unity/InputHandler.cs @@ -0,0 +1,56 @@ +#region license +/* [Scientific Committee on Advanced Navigation] + * S.C.A.N. Satellite + * + * InputHandler - Script for handling Input object replacement with Text Mesh Pro + * + * Copyright (c)2013 damny; + * Copyright (c)2014 technogeeky ; + * Copyright (c)2014 DMagic + * Copyright (c)2014 (Your Name Here) ; see LICENSE.txt for licensing details. + */ +#endregion + +using System; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.UI; +using UnityEngine.Events; +using UnityEngine.EventSystems; + +namespace SCANsat.Unity +{ + public class InputHandler : MonoBehaviour + { + private string _text; + private bool _isFocused; + + public class OnTextEvent : UnityEvent { } + public class OnValueChanged: UnityEvent { } + + private OnTextEvent _onTextUpdate = new OnTextEvent(); + private OnValueChanged _onValueChanged = new OnValueChanged(); + + public string Text + { + get { return _text; } + set { _text = value; } + } + + public bool IsFocused + { + get { return _isFocused; } + set { _isFocused = value; } + } + + public UnityEvent OnTextUpdate + { + get { return _onTextUpdate; } + } + + public UnityEvent OnValueChange + { + get { return _onValueChanged; } + } + } +} diff --git a/SCANsat.Unity/Interfaces/ISCAN_BigMap.cs b/SCANsat.Unity/Interfaces/ISCAN_BigMap.cs new file mode 100644 index 000000000..49d574cb2 --- /dev/null +++ b/SCANsat.Unity/Interfaces/ISCAN_BigMap.cs @@ -0,0 +1,142 @@ +#region license +/* [Scientific Committee on Advanced Navigation] + * S.C.A.N. Satellite + * + * ISCAN_BigMap - Interface for transfer of big map information + * + * Copyright (c)2013 damny; + * Copyright (c)2014 technogeeky ; + * Copyright (c)2014 DMagic + * Copyright (c)2014 (Your Name Here) ; see LICENSE.txt for licensing details. + */ +#endregion + +using System; +using System.Collections.Generic; +using UnityEngine; + +namespace SCANsat.Unity.Interfaces +{ + public interface ISCAN_BigMap + { + string Version { get; } + + string CurrentProjection { get; set; } + + string CurrentMapType { get; set; } + + string CurrentResource { get; set; } + + string CurrentCelestialBody { get; set; } + + string RandomWaypoint { get; } + + bool IsVisible { get; set; } + + bool ColorToggle { get; set; } + + bool TerminatorToggle { get; set; } + + bool GridToggle { get; set; } + + bool OrbitToggle { get; set; } + + bool WaypointToggle { get; set; } + + bool AnomalyToggle { get; set; } + + bool FlagToggle { get; set; } + + bool LegendToggle { get; set; } + + bool LegendAvailable { get; } + + bool ResourceToggle { get; set; } + + bool OrbitAvailable { get; } + + bool ShowOrbit { get; } + + bool ShowWaypoint { get; } + + bool ShowResource { get; } + + bool MechJebAvailable { get; } + + bool TooltipsOn { get; } + + bool LegendTooltips { get; } + + bool LockInput { get; set; } + + int OrbitSteps { get; } + + int CurrentScene { get; } + + float Scale { get; } + + Sprite WaypointSprite { get; } + + Canvas MainCanvas { get; } + + Canvas TooltipCanvas { get; } + + Vector2 Position { get; set; } + + Vector2 Size { get; set; } + + Texture2D LegendImage { get; } + + IList Projections { get; } + + IList MapTypes { get; } + + IList Resources { get; } + + IList CelestialBodies { get; } + + IList LegendLabels { get; } + + Dictionary OrbitLabelList { get; } + + Dictionary FlagInfoList { get; } + + Dictionary AnomalyInfoList { get; } + + Dictionary WaypointInfoList { get; } + + KeyValuePair VesselInfo { get; } + + string MapInfo(Vector2 rectPosition); + + string TooltipText(float xPos); + + void RefreshMap(); + + void OpenMainMap(); + + void OpenInstruments(); + + void OpenZoomMap(); + + void OpenSettings(); + + void OpenOverlay(); + + void ExportMap(); + + void Update(); + + void SetWaypoint(string id, Vector2 pos); + + void SetMJWaypoint(Vector2 pos); + + void ClickMap(Vector2 pos); + + SimpleLabelInfo OrbitInfo(int index); + + MapLabelInfo OrbitIconInfo(string id); + + Vector2 VesselPosition(); + } +} diff --git a/SCANsat.Unity/Interfaces/ISCAN_Color.cs b/SCANsat.Unity/Interfaces/ISCAN_Color.cs new file mode 100644 index 000000000..bd3d1fde4 --- /dev/null +++ b/SCANsat.Unity/Interfaces/ISCAN_Color.cs @@ -0,0 +1,130 @@ +#region license +/* [Scientific Committee on Advanced Navigation] + * S.C.A.N. Satellite + * + * ISCAN_Color - Interface for transfer of color management information + * + * Copyright (c)2013 damny; + * Copyright (c)2014 technogeeky ; + * Copyright (c)2014 DMagic + * Copyright (c)2014 (Your Name Here) ; see LICENSE.txt for licensing details. + */ +#endregion + +using System; +using System.Collections.Generic; +using UnityEngine; + +namespace SCANsat.Unity.Interfaces +{ + public interface ISCAN_Color + { + string ResourcePlanet { get; set; } + + string ResourceCurrent { get; set; } + + string TerrainPlanet { get; set; } + + string TerrainPalette { get; set; } + + string TerrainPaletteStyle { get; set; } + + bool BiomeBigMapStockColor { get; set; } + + bool BiomeBigMapWhiteBorder { get; set; } + + bool BiomeSmallMapStockColor { get; set; } + + bool BiomeSmallMapWhiteBorder { get; set; } + + bool BiomeZoomMapWhiteBorder { get; set; } + + bool TerrainClampOn { get; set; } + + bool TerrainReverse { get; set; } + + bool TerrainDiscrete { get; set; } + + bool TerrainHasSize { get; } + + float BiomeTransparency { get; set; } + + float SlopeCutoff { get; set; } + + float ResourceMin { get; set; } + + float ResourceMax { get; set; } + + float ResourceTransparency { get; set; } + + float TerrainCurrentMin { get; set; } + + float TerrainGlobalMin { get; } + + float TerrainCurrentMax { get; set; } + + float TerrainGlobalMax { get; } + + float TerrainClamp { get; set; } + + int TerrainSize { get; set; } + + int TerrainSizeMin { get; } + + int TerrainSizeMax { get; } + + Color BiomeColorOne { get; } + + Color BiomeColorTwo { get; } + + Color SlopeColorOneLo { get; } + + Color SlopeColorOneHi { get; } + + Color SlopeColorTwoLo { get; } + + Color SlopeColorTwoHi { get; } + + Color ResourceColorOne { get; } + + Color ResourceColorTwo { get; } + + Texture2D TerrainPaletteOld { get; } + + Texture2D TerrainPaletteNew { get; } + + IList> TerrainPalettes { get; } + + IList Resources { get; } + + IList CelestialBodies { get; } + + IList PaletteStyleNames { get; } + + void BiomeApply(Color one, Color two); + + void BiomeDefault(); + + void SlopeApply(Color oneLow, Color oneHigh, Color twoLow, Color twoHigh); + + void SlopeDefault(); + + void ResourceApply(Color one, Color two); + + void ResourceApplyToAll(Color one, Color two); + + void ResourceDefault(); + + void ResourceDefaultToAll(); + + void ResourceSaveToConfig(Color one, Color two); + + void TerrainApply(); + + void TerrainDefault(); + + void TerrainSaveToConfig(); + + void Refresh(); + } +} diff --git a/SCANsat.Unity/Interfaces/ISCAN_Instruments.cs b/SCANsat.Unity/Interfaces/ISCAN_Instruments.cs new file mode 100644 index 000000000..6f5d56f3c --- /dev/null +++ b/SCANsat.Unity/Interfaces/ISCAN_Instruments.cs @@ -0,0 +1,55 @@ +#region license +/* [Scientific Committee on Advanced Navigation] + * S.C.A.N. Satellite + * + * ISCAN_Instruments - Interface for transfer of instruments window information + * + * Copyright (c)2013 damny; + * Copyright (c)2014 technogeeky ; + * Copyright (c)2014 DMagic + * Copyright (c)2014 (Your Name Here) ; see LICENSE.txt for licensing details. + */ +#endregion + +using System; +using UnityEngine; + +namespace SCANsat.Unity.Interfaces +{ + public interface ISCAN_Instruments + { + string Version { get; } + + string Readout { get; } + + string ResourceName { get; } + + string TypingText { get; } + + string AnomalyText { get; } + + bool IsVisible { get; set; } + + bool ResourceButtons { get; } + + bool MouseAnomaly { get; set; } + + bool TooltipsOn { get; } + + float Scale { get; } + + Canvas TooltipCanvas { get; } + + Texture AnomalyCamera { get; } + + Vector2 Position { get; set; } + + void ClampToScreen(RectTransform rect); + + void NextResource(); + + void PreviousResource(); + + void Update(); + } +} diff --git a/SCANsat.Unity/Interfaces/ISCAN_MainMap.cs b/SCANsat.Unity/Interfaces/ISCAN_MainMap.cs new file mode 100644 index 000000000..677e23487 --- /dev/null +++ b/SCANsat.Unity/Interfaces/ISCAN_MainMap.cs @@ -0,0 +1,70 @@ +#region license +/* [Scientific Committee on Advanced Navigation] + * S.C.A.N. Satellite + * + * ISCAN_MainMap - Interface for transfer of main map information + * + * Copyright (c)2013 damny; + * Copyright (c)2014 technogeeky ; + * Copyright (c)2014 DMagic + * Copyright (c)2014 (Your Name Here) ; see LICENSE.txt for licensing details. + */ +#endregion + +using System; +using System.Collections.Generic; +using UnityEngine; + +namespace SCANsat.Unity.Interfaces +{ + public interface ISCAN_MainMap + { + string Version { get; } + + bool IsVisible { get; set; } + + bool Color { get; set; } + + bool TerminatorToggle { get; set; } + + bool MapType { get; set; } + + bool Minimized { get; set; } + + bool TooltipsOn { get; } + + bool MapGenerating { get; } + + bool ResourcesOn { get; } + + float Scale { get; } + + Canvas TooltipCanvas { get; } + + Vector2 Position { get; set; } + + Dictionary VesselInfoList { get; } + + void ClampToScreen(RectTransform rect); + + void OpenBigMap(); + + void OpenInstruments(); + + void OpenZoomMap(); + + void OpenSettings(); + + void OpenOverlay(); + + void ChangeToVessel(Guid id); + + string VesselInfo(Guid id); + + Sprite VesselType(Guid id); + + Vector2 VesselPosition(Guid id); + + void Update(); + } +} diff --git a/SCANsat.Unity/Interfaces/ISCAN_Overlay.cs b/SCANsat.Unity/Interfaces/ISCAN_Overlay.cs new file mode 100644 index 000000000..ac4dffde4 --- /dev/null +++ b/SCANsat.Unity/Interfaces/ISCAN_Overlay.cs @@ -0,0 +1,60 @@ +#region license +/* [Scientific Committee on Advanced Navigation] + * S.C.A.N. Satellite + * + * ISCAN_Overlay - Interface for transfer of overlay window information + * + * Copyright (c)2013 damny; + * Copyright (c)2014 technogeeky ; + * Copyright (c)2014 DMagic + * Copyright (c)2014 (Your Name Here) ; see LICENSE.txt for licensing details. + */ +#endregion + +using System; +using System.Collections.Generic; +using UnityEngine; + +namespace SCANsat.Unity.Interfaces +{ + public interface ISCAN_Overlay + { + string Version { get; } + + string CurrentResource { get; } + + string TooltipText { get; } + + bool IsVisible { get; set; } + + bool OverlayTooltip { get; } + + bool DrawOverlay { get; set; } + + bool DrawBiome { get; set; } + + bool DrawTerrain { get; set; } + + bool DrawResource { get; } + + bool WindowTooltips { get; } + + float Scale { get; } + + Canvas TooltipCanvas { get; } + + IList Resources { get; } + + Vector2 Position { get; set; } + + void ClampToScreen(RectTransform rect); + + void SetResource(string resource, bool isOn); + + void Refresh(); + + void OpenSettings(); + + void Update(); + } +} diff --git a/SCANsat.Unity/Interfaces/ISCAN_Settings.cs b/SCANsat.Unity/Interfaces/ISCAN_Settings.cs new file mode 100644 index 000000000..088259452 --- /dev/null +++ b/SCANsat.Unity/Interfaces/ISCAN_Settings.cs @@ -0,0 +1,146 @@ +#region license +/* [Scientific Committee on Advanced Navigation] + * S.C.A.N. Satellite + * + * ISCAN_Settings - Interface for transfer of settings information + * + * Copyright (c)2013 damny; + * Copyright (c)2014 technogeeky ; + * Copyright (c)2014 DMagic + * Copyright (c)2014 (Your Name Here) ; see LICENSE.txt for licensing details. + */ +#endregion + +using System; +using System.Collections.Generic; +using UnityEngine; + +namespace SCANsat.Unity.Interfaces +{ + public interface ISCAN_Settings + { + string Version { get; } + + string SensorCount { get; } + + string DataResetCurrent { get; } + + string DataResetAll { get; } + + string StockResourceResetCurrent { get; } + + string StockResourceResetAll { get; } + + string WarningMapFillCurrent { get; } + + string WarningMapFillAll { get; } + + string ModuleManagerWarning { get; } + + string SaveToConfig { get; } + + string CurrentBody { get; } + + string CurrentMapData { get; set; } + + int MapGenSpeed { get; set; } + + int TimeWarp { get; set; } + + int MapWidth { get; set; } + + int Interpolation { get; set; } + + int MapHeight { get; set; } + + int BiomeMapHeight { get; set; } + + float Transparency { get; set; } + + float StockThresholdValue { get; set; } + + float UIScale { get; set; } + + bool IsVisible { get; set; } + + bool BackgroundScanning { get; set; } + + bool GroundTracks { get; set; } + + bool ActiveGround { get; set; } + + bool OverlayTooltips { get; set; } + + bool WindowTooltips { get; set; } + + bool LegendTooltips { get; set; } + + bool StockToolbar { get; set; } + + bool ToolbarMenu { get; set; } + + bool StockUIStyle { get; set; } + + bool MechJebTarget { get; set; } + + bool MechJebLoad { get; set; } + + bool MechJebAvailable { get; } + + bool BiomeLock { get; set; } + + bool NarrowBand { get; set; } + + bool InstantScan { get; set; } + + bool DisableStock { get; set; } + + bool StockThreshold { get; set; } + + bool GreyScale { get; set; } + + bool ExportCSV { get; set; } + + bool ShowStockReset { get; } + + bool ShowMapFill { get; } + + bool LockInput { get; set; } + + bool ModuleManager { get; } + + Canvas TooltipCanvas { get; } + + Vector2 Position { set; } + + IList BackgroundBodies { get; } + + IList MapDataTypes { get; } + + ISCAN_Color ColorInterface { get; } + + void ClampToScreen(RectTransform rect); + + void ResetCurrent(); + + void ResetAll(); + + void ResetStockResourceCurrent(); + + void ResetStockResourceAll(); + + void FillCurrent(); + + void FillAll(); + + void ResetWindows(); + + void Update(); + + void ToggleBody(string bodyName); + + bool ToggleBodyActive(string bodyName); + + double BodyPercentage(string bodyName); + } +} diff --git a/SCANsat.Unity/Interfaces/ISCAN_Toolbar.cs b/SCANsat.Unity/Interfaces/ISCAN_Toolbar.cs new file mode 100644 index 000000000..ca425fadd --- /dev/null +++ b/SCANsat.Unity/Interfaces/ISCAN_Toolbar.cs @@ -0,0 +1,40 @@ +#region license +/* [Scientific Committee on Advanced Navigation] + * S.C.A.N. Satellite + * + * ISCAN_Toolbar - Interface for transfer of toolbar menu information + * + * Copyright (c)2013 damny; + * Copyright (c)2014 technogeeky ; + * Copyright (c)2014 DMagic + * Copyright (c)2014 (Your Name Here) ; see LICENSE.txt for licensing details. + */ +#endregion + +using UnityEngine; + +namespace SCANsat.Unity.Interfaces +{ + public interface ISCAN_Toolbar + { + Canvas TooltipCanvas { get; } + + bool TooltipsOn { get; } + + bool MainMap { get; set; } + + bool BigMap { get; set; } + + bool ZoomMap { get; set; } + + bool Overlay { get; set; } + + bool Instruments { get; set; } + + bool Settings { get; set; } + + bool InMenu { get; set; } + + float Scale { get; } + } +} diff --git a/SCANsat.Unity/Interfaces/ISCAN_ZoomMap.cs b/SCANsat.Unity/Interfaces/ISCAN_ZoomMap.cs new file mode 100644 index 000000000..3601fb6c4 --- /dev/null +++ b/SCANsat.Unity/Interfaces/ISCAN_ZoomMap.cs @@ -0,0 +1,134 @@ +#region license +/* [Scientific Committee on Advanced Navigation] + * S.C.A.N. Satellite + * + * ISCAN_ZoomMap - Interface for transfer of zoom map information + * + * Copyright (c)2013 damny; + * Copyright (c)2014 technogeeky ; + * Copyright (c)2014 DMagic + * Copyright (c)2014 (Your Name Here) ; see LICENSE.txt for licensing details. + */ +#endregion + +using System; +using System.Collections.Generic; +using UnityEngine; + +namespace SCANsat.Unity.Interfaces +{ + public interface ISCAN_ZoomMap + { + string Version { get; } + + string CurrentMapType { get; set; } + + string CurrentResource { get; set; } + + string ZoomLevelText { get; } + + string MapCenterText { get; } + + string RandomWaypoint { get; } + + bool IsVisible { get; set; } + + bool VesselLock { get; set; } + + bool ColorToggle { get; set; } + + bool TerminatorToggle { get; set; } + + bool OrbitToggle { get; set; } + + bool IconsToggle { get; set; } + + bool LegendToggle { get; set; } + + bool LegendAvailable { get; } + + bool ResourceToggle { get; set; } + + bool OrbitAvailable { get; } + + bool ShowOrbit { get; } + + bool ShowWaypoint { get; } + + bool ShowResource { get; } + + bool ShowVessel { get; } + + bool MechJebAvailable { get; } + + bool TooltipsOn { get; } + + bool LegendTooltips { get; } + + bool LockInput { get; set; } + + int OrbitSteps { get; } + + int CurrentScene { get; } + + int WindowState { get; set; } + + float Scale { get; } + + Sprite WaypointSprite { get; } + + Canvas MainCanvas { get; } + + Canvas TooltipCanvas { get; } + + Vector2 Position { get; set; } + + Vector2 Size { get; set; } + + Texture2D LegendImage { get; } + + IList MapTypes { get; } + + IList Resources { get; } + + IList LegendLabels { get; } + + Dictionary OrbitLabelList { get; } + + Dictionary FlagInfoList { get; } + + Dictionary AnomalyInfoList { get; } + + Dictionary WaypointInfoList { get; } + + KeyValuePair VesselInfo { get; } + + string MapInfo(Vector2 rectPosition); + + string TooltipText(float xPos); + + void ClampToScreen(RectTransform rect); + + void RefreshMap(); + + void Update(); + + void VesselSync(); + + void MoveMap(int i); + + void ZoomMap(bool zoom); + + void SetWaypoint(string id, Vector2 pos); + + void SetMJWaypoint(Vector2 pos); + + void ClickMap(int button, Vector2 pos); + + SimpleLabelInfo OrbitInfo(int index); + + MapLabelInfo OrbitIconInfo(string id); + + Vector2 VesselPosition(); + } +} diff --git a/SCANsat.Unity/MapLabelInfo.cs b/SCANsat.Unity/MapLabelInfo.cs new file mode 100644 index 000000000..8ceed0901 --- /dev/null +++ b/SCANsat.Unity/MapLabelInfo.cs @@ -0,0 +1,31 @@ +#region license +/* [Scientific Committee on Advanced Navigation] + * S.C.A.N. Satellite + * + * MapLabelInfo - Data object for map icon and labels + * + * Copyright (c)2013 damny; + * Copyright (c)2014 technogeeky ; + * Copyright (c)2014 DMagic + * Copyright (c)2014 (Your Name Here) ; see LICENSE.txt for licensing details. + */ +#endregion + +using UnityEngine; + +namespace SCANsat.Unity +{ + public struct MapLabelInfo + { + public string label; + public string name; + public Sprite image; + public Vector2 pos; + public Color baseColor; + public Color flashColor; + public bool flash; + public int width; + public int alignBottom; + public bool show; + } +} diff --git a/SCANsat.Unity/Properties/AssemblyInfo.cs b/SCANsat.Unity/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..308065b85 --- /dev/null +++ b/SCANsat.Unity/Properties/AssemblyInfo.cs @@ -0,0 +1,26 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("SCANsat.Unity")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("SCANsat.Unity")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("0c523d04-a52e-48bb-85b6-d75e8b7a63b9")] + +[assembly: AssemblyVersion("1.8.0.0")] +[assembly: AssemblyFileVersion("1.8.0.0")] diff --git a/SCANsat.Unity/SCAN_ColorPicker.cs b/SCANsat.Unity/SCAN_ColorPicker.cs new file mode 100644 index 000000000..fd9310b97 --- /dev/null +++ b/SCANsat.Unity/SCAN_ColorPicker.cs @@ -0,0 +1,145 @@ +#region license +/* [Scientific Committee on Advanced Navigation] + * S.C.A.N. Satellite + * + * CanvasFader - Monobehaviour for making smooth fade in and fade out for UI windows + * + * Copyright (c)2013 damny; + * Copyright (c)2014 technogeeky ; + * Copyright (c)2014 DMagic + * Copyright (c)2014 (Your Name Here) ; see LICENSE.txt for licensing details. + */ +#endregion + +using System; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.UI; +using SCANsat.Unity.HSVPicker.UI; + +namespace SCANsat.Unity +{ + public class SCAN_ColorPicker : MonoBehaviour + { + [SerializeField] + private ColorImage m_ColorOne = null; + [SerializeField] + private ColorImage m_ColorTwo = null; + [SerializeField] + private Image m_OldColorOne = null; + [SerializeField] + private Image m_OldColorTwo = null; + [SerializeField] + private InputHandler m_RInputField = null; + [SerializeField] + private InputHandler m_GInputField = null; + [SerializeField] + private InputHandler m_BInputField = null; + + private ColorPicker picker; + + private bool anyInputActive; + + public Color GetColorOne + { + get { return m_ColorOne.CurrentColor; } + } + + public Color GetColorTwo + { + get { return m_ColorTwo.CurrentColor; } + } + + public bool AnyInputActive + { + get { return anyInputActive; } + } + + private void Awake() + { + picker = GetComponent(); + } + + private void Update() + { + anyInputActive = m_RInputField.IsFocused || m_GInputField.IsFocused || m_RInputField.IsFocused; + } + + public void Setup(Color one, Color two, bool reset) + { + if (picker != null && reset) + picker.CurrentColor = one; + + if (m_ColorOne != null) + { + m_ColorOne.SetColor(one); + + if (reset) + m_ColorOne.IsActive = true; + } + + if (m_ColorTwo != null) + m_ColorTwo.SetColor(two); + + if (m_OldColorOne != null) + m_OldColorOne.color = one; + + if (m_OldColorTwo != null) + m_OldColorTwo.color = two; + + if (m_RInputField != null) + m_RInputField.OnTextUpdate.Invoke(""); + + if (m_GInputField != null) + m_GInputField.OnTextUpdate.Invoke(""); + + if (m_BInputField != null) + m_BInputField.OnTextUpdate.Invoke(""); + } + + public void ColorOne(bool isOn) + { + if (m_ColorOne == null) + return; + + m_ColorOne.IsActive = isOn; + + if (isOn) + { + picker.CurrentColor = m_ColorOne.CurrentColor; + + if (m_RInputField != null) + m_RInputField.OnTextUpdate.Invoke(""); + + if (m_GInputField != null) + m_GInputField.OnTextUpdate.Invoke(""); + + if (m_BInputField != null) + m_BInputField.OnTextUpdate.Invoke(""); + } + } + + public void ColorTwo(bool isOn) + { + if (m_ColorTwo == null) + return; + + m_ColorTwo.IsActive = isOn; + + if (isOn) + { + picker.CurrentColor = m_ColorTwo.CurrentColor; + + if (m_RInputField != null) + m_RInputField.OnTextUpdate.Invoke(""); + + if (m_GInputField != null) + m_GInputField.OnTextUpdate.Invoke(""); + + if (m_BInputField != null) + m_BInputField.OnTextUpdate.Invoke(""); + } + } + + } +} diff --git a/SCANsat.Unity/SCAN_DoubleButton.cs b/SCANsat.Unity/SCAN_DoubleButton.cs new file mode 100644 index 000000000..9ec61b99e --- /dev/null +++ b/SCANsat.Unity/SCAN_DoubleButton.cs @@ -0,0 +1,60 @@ +#region license +/* [Scientific Committee on Advanced Navigation] + * S.C.A.N. Satellite + * + * SCAN_DoubleButton - Script for handling double click buttons + * + * Copyright (c)2013 damny; + * Copyright (c)2014 technogeeky ; + * Copyright (c)2014 DMagic + * Copyright (c)2014 (Your Name Here) ; see LICENSE.txt for licensing details. + */ +#endregion + +using System; +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.UI; +using UnityEngine.EventSystems; + +namespace SCANsat.Unity +{ + public class SCAN_DoubleButton : Button, IPointerClickHandler + { + private int clickCount; + + new public void OnPointerClick(PointerEventData eventData) + { + if (eventData.button != PointerEventData.InputButton.Left) + return; + + if (clickCount > 0) + clickCount++; + else + { + clickCount = 1; + StartCoroutine(clickWait()); + } + } + + private IEnumerator clickWait() + { + yield return new WaitForSeconds(0.4f); + + if (clickCount > 1) + doubleClick(); + + clickCount = 0; + } + + private void doubleClick() + { + if (!IsActive() || !IsInteractable()) + return; + + onClick.Invoke(); + } + + } +} diff --git a/SCANsat.Unity/SCAN_Toggle.cs b/SCANsat.Unity/SCAN_Toggle.cs new file mode 100644 index 000000000..7982dd995 --- /dev/null +++ b/SCANsat.Unity/SCAN_Toggle.cs @@ -0,0 +1,70 @@ +#region license +/* [Scientific Committee on Advanced Navigation] + * S.C.A.N. Satellite + * + * SCAN_Toggle - Script to replace the hover sprite for the active toggle state + * + * Copyright (c)2013 damny; + * Copyright (c)2014 technogeeky ; + * Copyright (c)2014 DMagic + * Copyright (c)2014 (Your Name Here) ; see LICENSE.txt for licensing details. + */ +#endregion + +using System; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.UI; +using UnityEngine.EventSystems; + +namespace SCANsat.Unity +{ + public class SCAN_Toggle : Toggle, IPointerEnterHandler, IPointerExitHandler, IPointerClickHandler + { + private Sprite normalImage; + public Sprite HoverCheckmark; + private bool inToggle; + + protected override void Awake() + { + base.Awake(); + + normalImage = ((Image)graphic).sprite; + } + + new public void OnPointerClick(PointerEventData eventData) + { + base.OnPointerClick(eventData); + + if (!isOn) + return; + + if (inToggle) + ((Image)graphic).sprite = HoverCheckmark; + } + + new public void OnPointerEnter(PointerEventData eventData) + { + base.OnPointerEnter(eventData); + + inToggle = true; + + if (!isOn) + return; + + ((Image)graphic).sprite = HoverCheckmark; + } + + new public void OnPointerExit(PointerEventData eventData) + { + base.OnPointerExit(eventData); + + inToggle = false; + + if (!isOn) + return; + + ((Image)graphic).sprite = normalImage; + } + } +} diff --git a/SCANsat.Unity/SCANsat.Unity.csproj b/SCANsat.Unity/SCANsat.Unity.csproj new file mode 100644 index 000000000..e4606f41a --- /dev/null +++ b/SCANsat.Unity/SCANsat.Unity.csproj @@ -0,0 +1,119 @@ + + + + + Debug + AnyCPU + {4ED5E40D-273A-4643-9009-04C1DD02F3E2} + Library + Properties + SCANsat.Unity + SCANsat.Unity + v3.5 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + ..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Kerbal Space Program\KSP_x64_Data\Managed\UnityEngine.dll + False + + + ..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Kerbal Space Program\KSP_x64_Data\Managed\UnityEngine.UI.dll + False + + + + + + + + + + + + Code + + + + Code + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + copy /y "$(TargetPath)" "C:\Users\DMagic\Documents\KSP\SCANsat\Unity\SCANsat\Assets\Plugins\" + + + \ No newline at end of file diff --git a/SCANsat.Unity/SettingsPage.cs b/SCANsat.Unity/SettingsPage.cs new file mode 100644 index 000000000..09dd42980 --- /dev/null +++ b/SCANsat.Unity/SettingsPage.cs @@ -0,0 +1,24 @@ +#region license +/* [Scientific Committee on Advanced Navigation] + * S.C.A.N. Satellite + * + * SettingsPage - Base behaviour for all settings window pages + * + * Copyright (c)2013 damny; + * Copyright (c)2014 technogeeky ; + * Copyright (c)2014 DMagic + * Copyright (c)2014 (Your Name Here) ; see LICENSE.txt for licensing details. + */ +#endregion + +using System; +using UnityEngine; +using UnityEngine.EventSystems; + +namespace SCANsat.Unity +{ + public class SettingsPage : MonoBehaviour + { + public virtual void OnPointerDown(PointerEventData eventData) { } + } +} diff --git a/SCANsat.Unity/SimpleLabelInfo.cs b/SCANsat.Unity/SimpleLabelInfo.cs new file mode 100644 index 000000000..b1d324cc6 --- /dev/null +++ b/SCANsat.Unity/SimpleLabelInfo.cs @@ -0,0 +1,32 @@ +#region license +/* [Scientific Committee on Advanced Navigation] + * S.C.A.N. Satellite + * + * SimpleLabelInfo - Data object for simple map icon + * + * Copyright (c)2013 damny; + * Copyright (c)2014 technogeeky ; + * Copyright (c)2014 DMagic + * Copyright (c)2014 (Your Name Here) ; see LICENSE.txt for licensing details. + */ +#endregion + +using UnityEngine; + +namespace SCANsat.Unity +{ + public class SimpleLabelInfo + { + public Sprite image; + public int width; + public Vector2 pos; + public Color color; + public bool show; + + public SimpleLabelInfo(int w, Sprite img) + { + image = img; + width = w; + } + } +} diff --git a/SCANsat.Unity/TextHandler.cs b/SCANsat.Unity/TextHandler.cs new file mode 100644 index 000000000..ace9bce22 --- /dev/null +++ b/SCANsat.Unity/TextHandler.cs @@ -0,0 +1,135 @@ +#region license +/* [Scientific Committee on Advanced Navigation] + * S.C.A.N. Satellite + * + * TextHandler - Script for handling Text object replacement with Text Mesh Pro + * + * Copyright (c)2013 damny; + * Copyright (c)2014 technogeeky ; + * Copyright (c)2014 DMagic + * Copyright (c)2014 (Your Name Here) ; see LICENSE.txt for licensing details. + */ +#endregion + +using System; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.UI; +using UnityEngine.Events; +using UnityEngine.EventSystems; + +namespace SCANsat.Unity +{ + public class TextHandler : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler, IScrollHandler + { + [SerializeField] + private bool m_Outline = false; + [SerializeField] + private float m_OutlineWidth = 0; + [SerializeField] + private bool m_Highlighter = false; + [SerializeField] + private Color m_HighlightColor = Color.white; + [SerializeField] + private bool m_LocalizedText = false; + [SerializeField] + private string m_LocalizeName = ""; + + public class OnTextEvent : UnityEvent { } + + public class OnColorEvent : UnityEvent { } + + public class OnFontEvent : UnityEvent { } + + private OnTextEvent _onTextUpdate = new OnTextEvent(); + private OnColorEvent _onColorUpdate = new OnColorEvent(); + private OnFontEvent _onFontChange = new OnFontEvent(); + + private Vector2 _preferredSize = new Vector2(); + private Color _normalColor = Color.white; + private ScrollRect scroller; + + public void SetNormalColor(Color c) + { + _normalColor = c; + } + + public void SetScroller(ScrollRect s) + { + scroller = s; + } + + public bool Outline + { + get { return m_Outline; } + } + + public float OutlineWidth + { + get { return m_OutlineWidth; } + } + + public bool LocalizedText + { + get { return m_LocalizedText; } + } + + public string LocalizeName + { + get { return m_LocalizeName; } + } + + public void SetLocalText(string text) + { + Text t = GetComponent(); + + if (t != null) + t.text = text; + } + + public Vector2 PreferredSize + { + get { return _preferredSize; } + set { _preferredSize = value; } + } + + public UnityEvent OnTextUpdate + { + get { return _onTextUpdate; } + } + + public UnityEvent OnColorUpdate + { + get { return _onColorUpdate; } + } + + public UnityEvent OnFontChange + { + get { return _onFontChange; } + } + + public void OnPointerEnter(PointerEventData eventData) + { + if (!m_Highlighter) + return; + + OnColorUpdate.Invoke(m_HighlightColor); + } + + public void OnPointerExit(PointerEventData eventData) + { + if (!m_Highlighter) + return; + + OnColorUpdate.Invoke(_normalColor); + } + + public void OnScroll(PointerEventData eventData) + { + if (scroller == null) + return; + + scroller.OnScroll(eventData); + } + } +} diff --git a/SCANsat.Unity/TooltipHandler.cs b/SCANsat.Unity/TooltipHandler.cs new file mode 100644 index 000000000..4f149f9ed --- /dev/null +++ b/SCANsat.Unity/TooltipHandler.cs @@ -0,0 +1,125 @@ +#region license +/* [Scientific Committee on Advanced Navigation] + * S.C.A.N. Satellite + * + * TooltipHandler - Script to control tooltip activation + * + * Copyright (c)2013 damny; + * Copyright (c)2014 technogeeky ; + * Copyright (c)2014 DMagic + * Copyright (c)2014 (Your Name Here) ; see LICENSE.txt for licensing details. + */ +#endregion + +using System; +using System.Collections.Generic; +using SCANsat.Unity.Unity; +using UnityEngine; +using UnityEngine.UI; +using UnityEngine.EventSystems; + +namespace SCANsat.Unity +{ + + public class TooltipHandler : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler, IPointerClickHandler + { + [SerializeField, TextArea(2, 10)] + private string m_TooltipName = ""; + [SerializeField] + private bool m_IsActive = true; + [SerializeField] + private bool m_HelpTip = false; + [SerializeField] + private GameObject _prefab = null; + [SerializeField] + private string _tooltipText = ""; + + private Canvas _canvas; + private SCAN_Tooltip _tooltip; + private float _scale; + + public string TooltipName + { + get { return m_TooltipName; } + } + + public Canvas _Canvas + { + set { _canvas = value; } + } + + public GameObject Prefab + { + set { _prefab = value; } + } + + public float Scale + { + set { _scale = value; } + } + + public bool IsActive + { + set { m_IsActive = value; } + } + + public bool HelpTip + { + get { return m_HelpTip; } + } + + public string TooltipText + { + set { _tooltipText = value; } + } + + public void OnPointerEnter(PointerEventData eventData) + { + if (!m_IsActive) + return; + + OpenTooltip(); + } + + public void OnPointerExit(PointerEventData eventData) + { + if (!m_IsActive) + return; + + CloseTooltip(); + } + + public void OnPointerClick(PointerEventData eventData) + { + if (!m_IsActive) + return; + + CloseTooltip(); + } + + private void OpenTooltip() + { + if (_prefab == null || _canvas == null) + return; + + _tooltip = Instantiate(_prefab).GetComponent(); + + if (_tooltip == null) + return; + + _tooltip.transform.SetParent(_canvas.transform, false); + _tooltip.transform.SetAsLastSibling(); + + _tooltip.Setup(_canvas, _tooltipText, _scale); + } + + private void CloseTooltip() + { + if (_tooltip == null) + return; + + _tooltip.gameObject.SetActive(false); + Destroy(_tooltip.gameObject); + } + } +} diff --git a/SCANsat.Unity/Unity/SCAN_BackgroundElement.cs b/SCANsat.Unity/Unity/SCAN_BackgroundElement.cs new file mode 100644 index 000000000..de226c973 --- /dev/null +++ b/SCANsat.Unity/Unity/SCAN_BackgroundElement.cs @@ -0,0 +1,71 @@ +#region license +/* + * [Scientific Committee on Advanced Navigation] + * S.C.A.N. Satellite + * + * SCAN_BackgroundElement - Script for controlling background scanning toggle elements + * + * Copyright (c)2014 David Grandy ; + * Copyright (c)2014 technogeeky ; + * Copyright (c)2014 (Your Name Here) ; see LICENSE.txt for licensing details. + */ +#endregion + +using System; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.UI; +using SCANsat.Unity.Interfaces; + +namespace SCANsat.Unity.Unity +{ + public class SCAN_BackgroundElement : MonoBehaviour + { + [SerializeField] + private TextHandler m_BodyText = null; + [SerializeField] + private SCAN_Toggle m_BodyToggle = null; + + private bool loaded; + private string bodyName; + private ISCAN_Settings settingsInterface; + + public string BodyName + { + get { return bodyName; } + } + + public void Setup(string body, bool active, ISCAN_Settings settings) + { + if (settings == null) + return; + + bodyName = body; + settingsInterface = settings; + + if (m_BodyToggle != null) + m_BodyToggle.isOn = active; + + if (m_BodyText != null) + m_BodyText.OnTextUpdate.Invoke(string.Format("{0} (0%)", body)); + + loaded = true; + } + + public void UpdateText(double amount) + { + if (m_BodyText == null) + return; + + m_BodyText.OnTextUpdate.Invoke(string.Format("{0} ({1:P0})", bodyName, amount)); + } + + public void ToggleBody(bool isOn) + { + if (!loaded || settingsInterface == null) + return; + + settingsInterface.ToggleBody(bodyName); + } + } +} diff --git a/SCANsat.Unity/Unity/SCAN_BigMap.cs b/SCANsat.Unity/Unity/SCAN_BigMap.cs new file mode 100644 index 000000000..9f0c4929e --- /dev/null +++ b/SCANsat.Unity/Unity/SCAN_BigMap.cs @@ -0,0 +1,1474 @@ +#region license +/* + * [Scientific Committee on Advanced Navigation] + * S.C.A.N. Satellite + * + * SCAN_BigMap - Script for controlling the big map UI + * + * Copyright (c)2014 David Grandy ; + * Copyright (c)2014 technogeeky ; + * Copyright (c)2014 (Your Name Here) ; see LICENSE.txt for licensing details. + */ +#endregion + +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEngine; +using UnityEngine.UI; +using UnityEngine.EventSystems; +using SCANsat.Unity.Interfaces; + +namespace SCANsat.Unity.Unity +{ + public class SCAN_BigMap : CanvasFader, IDragHandler, IBeginDragHandler, IEndDragHandler, IPointerDownHandler + { + [SerializeField] + private TextHandler m_Version = null; + [SerializeField] + private TextHandler m_Title = null; + [SerializeField] + private Transform m_Projection = null; + [SerializeField] + private Transform m_MapType = null; + [SerializeField] + private Transform m_Resources = null; + [SerializeField] + private Transform m_CelestialBody = null; + [SerializeField] + private ToggleGroup m_DropDownToggles = null; + [SerializeField] + private GameObject m_DropDownPrefab = null; + [SerializeField] + private GameObject m_OrbitObject = null; + [SerializeField] + private GameObject m_WaypointObject = null; + [SerializeField] + private SCAN_Toggle m_ColorToggle = null; + [SerializeField] + private SCAN_Toggle m_TerminatorToggle = null; + [SerializeField] + private SCAN_Toggle m_GridToggle = null; + [SerializeField] + private SCAN_Toggle m_OrbitToggle = null; + [SerializeField] + private SCAN_Toggle m_WaypointToggle = null; + [SerializeField] + private SCAN_Toggle m_AnomalyToggle = null; + [SerializeField] + private SCAN_Toggle m_FlagToggle = null; + [SerializeField] + private SCAN_Toggle m_LegendToggle = null; + [SerializeField] + private SCAN_Toggle m_ResourcesToggle = null; + [SerializeField] + private TextHandler m_ReadoutText = null; + [SerializeField] + private RawImage m_MapImage = null; + [SerializeField] + private RawImage m_GridMap = null; + [SerializeField] + private RawImage m_EQMap = null; + [SerializeField] + private LayoutElement m_MapLayout = null; + [SerializeField] + private GameObject m_MapLabelPrefab = null; + [SerializeField] + private GameObject m_LegendObject = null; + [SerializeField] + private RawImage m_LegendImage = null; + [SerializeField] + private TextHandler m_LegendLabelOne = null; + [SerializeField] + private TextHandler m_LegendLabelTwo = null; + [SerializeField] + private TextHandler m_LegendLabelThree = null; + [SerializeField] + private GameObject m_WaypointBar = null; + [SerializeField] + private GameObject m_MechJebButton = null; + [SerializeField] + private InputHandler m_WaypointInput = null; + [SerializeField] + private GameObject m_SmallMapButton = null; + [SerializeField] + private GameObject m_ZoomMapButton = null; + [SerializeField] + private GameObject m_OverlayButton = null; + [SerializeField] + private GameObject m_InstrumentsButton = null; + [SerializeField] + private GameObject m_SettingsButton = null; + [SerializeField] + private GameObject m_NorthSouthMarkers = null; + [SerializeField] + private GameObject m_TooltipPrefab = null; + + + private ISCAN_BigMap bigInterface; + private bool loaded; + private RectTransform rect; + private Vector2 mouseStart; + private Vector3 windowStart; + private bool inMap; + private Vector2 rectPos = new Vector2(); + + private bool waypointSelecting; + private string waypoint; + + private List orbitLabels = new List(); + private List orbitIconLabels = new List(); + private List anomalyLabels = new List(); + private List waypointLabels = new List(); + private List flagLabels = new List(); + private SCAN_MapLabel vesselLabel; + private SCAN_MapLabel tempWaypointLabel; + private SCAN_MapLabel hoverWaypointLabel; + + private SCAN_DropDown dropDown; + + private bool tooltipOn; + private SCAN_Tooltip _tooltip; + + protected override void Awake() + { + base.Awake(); + + rect = GetComponent(); + + Alpha(0); + } + + private void Update() + { + if (bigInterface == null || !bigInterface.IsVisible) + return; + + if (bigInterface.LockInput) + { + if (m_WaypointInput != null && !m_WaypointInput.IsFocused) + bigInterface.LockInput = false; + } + + bigInterface.Update(); + + if (vesselLabel != null) + vesselLabel.UpdatePosition(bigInterface.VesselPosition()); + + if (inMap && m_MapImage != null && m_ReadoutText != null) + { + RectTransformUtility.ScreenPointToLocalPointInRectangle(m_MapImage.rectTransform, Input.mousePosition, bigInterface.MainCanvas.worldCamera, out rectPos); + + m_ReadoutText.OnTextUpdate.Invoke(bigInterface.MapInfo(rectPos)); + + if (waypointSelecting) + { + if (hoverWaypointLabel != null) + { + Vector2 mapPos = new Vector2(rectPos.x, rectPos.y + bigInterface.Size.y); + + hoverWaypointLabel.UpdateActive(true); + + hoverWaypointLabel.UpdatePosition(mapPos); + } + } + } + else if (waypointSelecting) + { + if (hoverWaypointLabel != null) + hoverWaypointLabel.UpdateActive(false); + } + + if (tooltipOn) + { + RectTransformUtility.ScreenPointToLocalPointInRectangle(m_LegendImage.rectTransform, Input.mousePosition, bigInterface.MainCanvas.worldCamera, out rectPos); + + float halfWidth = m_LegendImage.rectTransform.rect.width / 2; + + float legendXPos = (rectPos.x + halfWidth) / m_LegendImage.rectTransform.rect.width; + + if (_tooltip != null) + _tooltip.UpdateText(bigInterface.TooltipText(legendXPos)); + } + + if (bigInterface.OrbitToggle && bigInterface.ShowOrbit) + { + for (int i = orbitLabels.Count - 1; i >= 0; i--) + { + SCAN_SimpleLabel label = orbitLabels[i]; + + label.UpdateIcon(bigInterface.OrbitInfo(i)); + } + + for (int i = orbitIconLabels.Count - 1; i >= 0; i--) + { + SCAN_MapLabel label = orbitIconLabels[i]; + + label.UpdatePositionActivation(bigInterface.OrbitIconInfo(label.StringID)); + } + } + } + + private Vector2 ScreenPosition(RectTransform r, Canvas canvas) + { + Vector3[] corners = new Vector3[4]; + Vector2 pos = new Vector2(); + + r.GetWorldCorners(corners); + + if (canvas.renderMode == RenderMode.ScreenSpaceOverlay) + { + pos = RectTransformUtility.WorldToScreenPoint(null, corners[0]); + } + else + { + pos = RectTransformUtility.WorldToScreenPoint(canvas.worldCamera, corners[0]); + } + + pos.y = Screen.height - pos.y - r.sizeDelta.y; + + return pos; + } + + public void setMap(ISCAN_BigMap map) + { + if (map == null) + return; + + bigInterface = map; + + if (m_Version != null) + m_Version.OnTextUpdate.Invoke(map.Version); + + if (m_ColorToggle != null) + m_ColorToggle.isOn = map.ColorToggle; + + if (m_TerminatorToggle != null) + m_TerminatorToggle.isOn = map.TerminatorToggle; + + if (m_GridToggle != null) + m_GridToggle.isOn = map.GridToggle; + + if (m_OrbitToggle != null) + m_OrbitToggle.isOn = map.OrbitToggle; + + if (m_WaypointToggle != null) + m_WaypointToggle.isOn = map.WaypointToggle; + + if (m_AnomalyToggle != null) + m_AnomalyToggle.isOn = map.AnomalyToggle; + + if (m_FlagToggle != null) + m_FlagToggle.isOn = map.FlagToggle; + + if (m_LegendToggle != null) + m_LegendToggle.isOn = map.LegendToggle; + + if (m_ResourcesToggle != null) + m_ResourcesToggle.isOn = map.ResourceToggle; + + if (!map.OrbitAvailable && m_OrbitObject != null) + m_OrbitObject.SetActive(false); + + if (!map.ShowWaypoint && m_WaypointObject != null) + m_WaypointObject.SetActive(false); + + if (!map.ShowResource && m_Resources != null) + m_Resources.gameObject.SetActive(false); + + SetLegend(map.LegendToggle); + + SetButtons(map.CurrentScene); + + SetScale(map.Scale); + + SetPosition(map.Position); + + SetSize(map.Size); + + SetIcons(); + + SetNorthSouth(); + + ProcessTooltips(); + + FadeIn(); + + loaded = true; + } + + public void FadeIn() + { + Fade(1, true); + } + + public void FadeOut() + { + Fade(0, false, Kill, false); + } + + private void Kill() + { + gameObject.SetActive(false); + Destroy(gameObject); + } + + public void Close() + { + if (bigInterface != null) + bigInterface.IsVisible = false; + } + + public void ProcessTooltips() + { + if (bigInterface == null) + return; + + TooltipHandler[] handlers = gameObject.GetComponentsInChildren(true); + + if (handlers == null) + return; + + for (int j = 0; j < handlers.Length; j++) + ProcessTooltip(handlers[j], bigInterface.TooltipsOn, bigInterface.TooltipCanvas, bigInterface.Scale); + } + + private void ProcessTooltip(TooltipHandler handler, bool isOn, Canvas c, float scale) + { + if (handler == null) + return; + + handler.IsActive = isOn && !handler.HelpTip; + handler._Canvas = c; + handler.Scale = scale; + } + + private void SetNorthSouth() + { + if (bigInterface == null || m_NorthSouthMarkers == null) + return; + + if (bigInterface.CurrentProjection == "Polar") + m_NorthSouthMarkers.SetActive(true); + else + m_NorthSouthMarkers.SetActive(false); + } + + private void SetButtons(int i) + { + switch(i) + { + case -1: + if (m_SmallMapButton != null) + m_SmallMapButton.SetActive(false); + if (m_ZoomMapButton != null) + m_ZoomMapButton.SetActive(false); + if (m_OverlayButton != null) + m_OverlayButton.SetActive(false); + if (m_InstrumentsButton != null) + m_InstrumentsButton.SetActive(false); + if (m_SettingsButton != null) + m_SettingsButton.SetActive(false); + break; + case 1: + if (m_SmallMapButton != null) + m_SmallMapButton.SetActive(false); + if (m_InstrumentsButton != null) + m_InstrumentsButton.SetActive(false); + if (m_ZoomMapButton != null) + m_ZoomMapButton.SetActive(false); + break; + case 2: + if (m_SmallMapButton != null) + m_SmallMapButton.SetActive(false); + if (m_OverlayButton != null) + m_OverlayButton.SetActive(false); + if (m_InstrumentsButton != null) + m_InstrumentsButton.SetActive(false); + if (m_ZoomMapButton != null) + m_ZoomMapButton.SetActive(false); + break; + } + } + + public void SetScale(float scale) + { + rect.localScale = Vector3.one * scale; + } + + public void SetPosition(Vector2 pos) + { + if (rect == null) + return; + + rect.anchoredPosition = new Vector3(pos.x, pos.y, 0); + } + + public void SetSize(Vector2 size) + { + if (m_MapLayout == null) + return; + + if (size.x + 8 < m_MapLayout.minWidth) + size.x = m_MapLayout.minWidth - 8; + else if (size.x > 8192) + size.x = 8192; + + if (size.x % 2 != 0) + size.x += 1; + + m_MapLayout.preferredWidth = size.x + 8; + m_MapLayout.preferredHeight = m_MapLayout.preferredWidth / 2 + 8; + } + + public void SetLegend(bool isOn) + { + if (m_LegendObject == null) + return; + + if (bigInterface.LegendAvailable) + m_LegendObject.SetActive(isOn); + else + { + m_LegendObject.SetActive(false); + return; + } + + if (!isOn) + return; + + if (m_LegendImage != null) + m_LegendImage.texture = bigInterface.LegendImage; + + if (bigInterface.CurrentMapType == "Biome") + { + if (m_LegendLabelOne != null) + m_LegendLabelOne.gameObject.SetActive(false); + + if (m_LegendLabelTwo != null) + m_LegendLabelTwo.gameObject.SetActive(false); + + if (m_LegendLabelThree != null) + m_LegendLabelThree.gameObject.SetActive(false); + } + else + { + IList labels = bigInterface.LegendLabels; + + if (labels == null || labels.Count != 3) + return; + + if (m_LegendLabelOne != null) + { + m_LegendLabelOne.gameObject.SetActive(true); + m_LegendLabelOne.OnTextUpdate.Invoke(labels[0]); + } + + if (m_LegendLabelTwo != null) + { + m_LegendLabelTwo.gameObject.SetActive(true); + m_LegendLabelTwo.OnTextUpdate.Invoke(labels[1]); + } + + if (m_LegendLabelThree != null) + { + m_LegendLabelThree.gameObject.SetActive(true); + m_LegendLabelThree.OnTextUpdate.Invoke(labels[2]); + } + } + } + + private void SetFlagIcons(Dictionary flags) + { + if (flags == null) + return; + + if (bigInterface == null || m_MapLabelPrefab == null || m_MapImage == null) + return; + + for (int i = 0; i < flags.Count; i++) + { + Guid id = flags.ElementAt(i).Key; + + MapLabelInfo info; + + if (!flags.TryGetValue(id, out info)) + continue; + + createFlag(id, info); + } + } + + private void createFlag(Guid id, MapLabelInfo info) + { + SCAN_MapLabel mapLabel = Instantiate(m_MapLabelPrefab).GetComponent(); + + if (mapLabel == null) + return; + + mapLabel.transform.SetParent(m_MapImage.transform, false); + + mapLabel.Setup(id, info); + + flagLabels.Add(mapLabel); + } + + private void SetAnomalyIcons(Dictionary anomalies) + { + if (anomalies == null) + return; + + if (bigInterface == null || m_MapLabelPrefab == null || m_MapImage == null) + return; + + for (int i = 0; i < anomalies.Count; i++) + { + string id = anomalies.ElementAt(i).Key; + + MapLabelInfo info; + + if (!anomalies.TryGetValue(id, out info)) + continue; + + createAnomaly(id, info); + } + } + + private void createAnomaly(string id, MapLabelInfo info) + { + SCAN_MapLabel mapLabel = Instantiate(m_MapLabelPrefab).GetComponent(); + + if (mapLabel == null) + return; + + mapLabel.transform.SetParent(m_MapImage.transform, false); + + mapLabel.Setup(id, info); + + anomalyLabels.Add(mapLabel); + } + + private void SetWaypointIcons(Dictionary waypoints) + { + if (waypoints == null) + return; + + if (bigInterface == null || m_MapLabelPrefab == null || m_MapImage == null) + return; + + for (int i = 0; i < waypoints.Count; i++) + { + int id = waypoints.ElementAt(i).Key; + + MapLabelInfo info; + + if (!waypoints.TryGetValue(id, out info)) + continue; + + createWaypoint(id, info); + } + } + + private SCAN_MapLabel createWaypoint(int id, MapLabelInfo info, bool temp = false) + { + SCAN_MapLabel mapLabel = Instantiate(m_MapLabelPrefab).GetComponent(); + + if (mapLabel == null) + return null; + + mapLabel.transform.SetParent(m_MapImage.transform, false); + + mapLabel.Setup(id, info); + + if (!temp) + waypointLabels.Add(mapLabel); + + return mapLabel; + } + + private void SetVesselIcon(KeyValuePair vessel) + { + if (vessel.Value.label == "null") + return; + + if (bigInterface == null || m_MapLabelPrefab == null || m_MapImage == null) + return; + + SCAN_MapLabel mapLabel = Instantiate(m_MapLabelPrefab).GetComponent(); + + if (mapLabel == null) + return; + + mapLabel.transform.SetParent(m_MapImage.transform, false); + + mapLabel.Setup(vessel.Key, vessel.Value); + + vesselLabel = mapLabel; + } + + private void SetOrbitIcons(int count) + { + if (bigInterface == null || m_MapImage == null) + return; + + for (int i = 0; i < count; i++) + { + SimpleLabelInfo info = bigInterface.OrbitInfo(i); + + CreateOrbitIcon(info); + } + } + + private void CreateOrbitIcon(SimpleLabelInfo info) + { + GameObject labelObj = new GameObject("SCAN_SimpleLabel"); + + SCAN_SimpleLabel label = labelObj.AddComponent(); + + if (label == null) + return; + + label.transform.SetParent(m_MapImage.transform, false); + + label.Setup(info); + + orbitLabels.Add(label); + } + + private void SetOrbitMapIcons(Dictionary orbitLabels) + { + if (orbitLabels == null) + return; + + if (bigInterface == null || m_MapLabelPrefab == null || m_MapImage == null) + return; + + for (int i = 0; i < orbitLabels.Count; i++) + { + string id = orbitLabels.ElementAt(i).Key; + + MapLabelInfo info; + + if (!orbitLabels.TryGetValue(id, out info)) + continue; + + CreateOrbitMapIcon(id, info); + } + } + + private void CreateOrbitMapIcon(string id, MapLabelInfo info) + { + SCAN_MapLabel mapLabel = Instantiate(m_MapLabelPrefab).GetComponent(); + + if (mapLabel == null) + return; + + mapLabel.transform.SetParent(m_MapImage.transform, false); + + mapLabel.Setup(id, info); + + orbitIconLabels.Add(mapLabel); + } + + private void ClearIcons() + { + for (int i = waypointLabels.Count - 1; i >= 0; i--) + { + SCAN_MapLabel m = waypointLabels[i]; + + m.gameObject.SetActive(false); + Destroy(m.gameObject); + } + + for (int i = anomalyLabels.Count - 1; i >= 0; i--) + { + SCAN_MapLabel m = anomalyLabels[i]; + + m.gameObject.SetActive(false); + Destroy(m.gameObject); + } + + for (int i = flagLabels.Count - 1; i >= 0; i--) + { + SCAN_MapLabel m = flagLabels[i]; + + m.gameObject.SetActive(false); + Destroy(m.gameObject); + } + + for (int i = orbitLabels.Count - 1; i >= 0; i--) + { + SCAN_SimpleLabel s = orbitLabels[i]; + + s.gameObject.SetActive(false); + Destroy(s.gameObject); + } + + for (int i = orbitIconLabels.Count - 1; i >= 0; i--) + { + SCAN_MapLabel m = orbitIconLabels[i]; + + m.gameObject.SetActive(false); + Destroy(m.gameObject); + } + + if (vesselLabel != null) + { + vesselLabel.gameObject.SetActive(false); + Destroy(vesselLabel.gameObject); + } + + DestroyWaypoint(tempWaypointLabel); + + flagLabels.Clear(); + anomalyLabels.Clear(); + waypointLabels.Clear(); + orbitLabels.Clear(); + orbitIconLabels.Clear(); + vesselLabel = null; + } + + public void RefreshIcons() + { + ClearIcons(); + + SetIcons(); + } + + private void SetIcons() + { + if (bigInterface == null) + return; + + if (bigInterface.FlagToggle) + SetFlagIcons(bigInterface.FlagInfoList); + + if (bigInterface.AnomalyToggle) + SetAnomalyIcons(bigInterface.AnomalyInfoList); + + if (bigInterface.WaypointToggle && bigInterface.ShowWaypoint) + SetWaypointIcons(bigInterface.WaypointInfoList); + + if (bigInterface.OrbitToggle && bigInterface.ShowOrbit) + { + SetOrbitIcons(bigInterface.OrbitSteps); + SetOrbitMapIcons(bigInterface.OrbitLabelList); + } + + SetVesselIcon(bigInterface.VesselInfo); + } + + public void OnEnterLegend(BaseEventData eventData) + { + if (bigInterface == null || !bigInterface.LegendToggle || !bigInterface.LegendTooltips) + return; + + if (_tooltip != null) + CloseTooltip(); + + tooltipOn = true; + OpenTooltip(); + } + + public void OnExitLegend(BaseEventData eventData) + { + if (bigInterface == null || !bigInterface.LegendToggle || !bigInterface.LegendTooltips) + return; + + tooltipOn = false; + CloseTooltip(); + } + + private void OpenTooltip() + { + if (m_TooltipPrefab == null || bigInterface.TooltipCanvas == null) + return; + + _tooltip = Instantiate(m_TooltipPrefab).GetComponent(); + + if (_tooltip == null) + return; + + _tooltip.transform.SetParent(bigInterface.TooltipCanvas.transform, false); + _tooltip.transform.SetAsLastSibling(); + + _tooltip.Setup(bigInterface.TooltipCanvas, "_", bigInterface.Scale); + } + + private void CloseTooltip() + { + if (_tooltip == null) + return; + + _tooltip.gameObject.SetActive(false); + Destroy(_tooltip.gameObject); + _tooltip = null; + } + + public void OnEnterMap(BaseEventData eventData) + { + inMap = true; + } + + public void OnExitMap(BaseEventData eventData) + { + inMap = false; + + if (m_ReadoutText != null) + m_ReadoutText.OnTextUpdate.Invoke(""); + } + + public void OnBeginDrag(PointerEventData eventData) + { + if (rect == null) + return; + + mouseStart = eventData.position; + windowStart = rect.position; + } + + public void OnDrag(PointerEventData eventData) + { + if (rect == null) + return; + + rect.position = windowStart + (Vector3)(eventData.position - mouseStart); + } + + public void OnEndDrag(PointerEventData eventData) + { + if (rect == null || bigInterface == null) + return; + + bigInterface.Position = new Vector2(rect.anchoredPosition.x, rect.anchoredPosition.y); + } + + public void OnStartResize(BaseEventData eventData) + { + if (!(eventData is PointerEventData)) + return; + + ClearIcons(); + } + + public void OnResize(BaseEventData eventData) + { + if (m_MapLayout == null) + return; + + if (!(eventData is PointerEventData)) + return; + + m_MapLayout.preferredWidth += ((PointerEventData)eventData).delta.x; + + if (m_MapLayout.preferredWidth < m_MapLayout.minWidth) + m_MapLayout.preferredWidth = m_MapLayout.minWidth; + else if (m_MapLayout.preferredWidth > 8200) + m_MapLayout.preferredWidth = 8200; + + if (m_MapLayout.preferredWidth % 2 != 0) + m_MapLayout.preferredWidth += 1; + + m_MapLayout.preferredHeight = m_MapLayout.preferredWidth / 2; + } + + public void OnEndResize(BaseEventData eventData) + { + if (m_MapLayout == null || bigInterface == null) + return; + + bigInterface.Size = new Vector2(m_MapLayout.preferredWidth - 8, m_MapLayout.preferredHeight - 8); + + SetIcons(); + } + + public void OnPointerDown(PointerEventData eventData) + { + transform.SetAsLastSibling(); + + if (dropDown == null) + return; + + RectTransform r = dropDown.GetComponent(); + + if (r == null) + return; + + if (RectTransformUtility.RectangleContainsScreenPoint(r, eventData.position, eventData.pressEventCamera)) + return; + + dropDown.FadeOut(); + dropDown = null; + + if (m_DropDownToggles != null) + m_DropDownToggles.SetAllTogglesOff(); + } + + public void OnClickMap(BaseEventData eventData) + { + if (!inMap || bigInterface == null || m_MapImage == null || !(eventData is PointerEventData)) + return; + + OnPointerDown((PointerEventData)eventData); + + Vector2 pos; + + RectTransformUtility.ScreenPointToLocalPointInRectangle(m_MapImage.rectTransform, Input.mousePosition, bigInterface.MainCanvas.worldCamera, out pos); + + if (waypointSelecting) + { + DestroyWaypoint(tempWaypointLabel); + + SetWaypoint(pos); + } + else if (((PointerEventData)eventData).button == PointerEventData.InputButton.Right) + bigInterface.ClickMap(pos); + } + + private void SetWaypoint(Vector2 p) + { + Vector2 mapPos = new Vector2(p.x, p.y + bigInterface.Size.y); + + MapLabelInfo info = new MapLabelInfo() + { + label = "", + image = bigInterface.WaypointSprite, + pos = mapPos, + baseColor = Color.white, + flash = false, + width = 20, + alignBottom = 10, + show = true + }; + + tempWaypointLabel = createWaypoint(0, info, true); + } + + public void UpdateTitle(string text) + { + if (m_Title == null) + return; + + m_Title.OnTextUpdate.Invoke(text); + } + + public void UpdateMapTexture(Texture2D map) + { + if (m_MapImage == null) + return; + + m_MapImage.texture = map; + } + + public void UpdateGridTexture(Texture2D grid) + { + if (m_GridMap == null) + return; + + m_GridMap.texture = grid; + } + + public void UpdateEQMapTexture(Texture2D eq) + { + if (m_EQMap != null) + m_EQMap.texture = eq; + } + + public void ToggleProjectionSelection(bool isOn) + { + if (dropDown != null) + { + dropDown.FadeOut(true); + dropDown = null; + } + + if (!isOn) + return; + + if (bigInterface == null || m_DropDownPrefab == null || m_Projection == null) + return; + + dropDown = Instantiate(m_DropDownPrefab).GetComponent(); + + if (dropDown == null) + return; + + dropDown.transform.SetParent(m_Projection, false); + + dropDown.Setup(bigInterface.Projections, bigInterface.CurrentProjection); + + dropDown.OnSelectUpdate.AddListener(new UnityEngine.Events.UnityAction(SetProjection)); + } + + private void SetProjection(string selection) + { + if (bigInterface == null) + return; + + bigInterface.CurrentProjection = selection; + + dropDown.FadeOut(); + dropDown = null; + + if (m_DropDownToggles != null) + m_DropDownToggles.SetAllTogglesOff(); + + RefreshIcons(); + + SetNorthSouth(); + } + + public void ToggleTypeSelection(bool isOn) + { + if (dropDown != null) + { + dropDown.FadeOut(true); + dropDown = null; + } + + if (!isOn) + return; + + if (bigInterface == null || m_DropDownPrefab == null || m_MapType == null) + return; + + dropDown = Instantiate(m_DropDownPrefab).GetComponent(); + + if (dropDown == null) + return; + + dropDown.transform.SetParent(m_MapType, false); + + dropDown.Setup(bigInterface.MapTypes, bigInterface.CurrentMapType); + + dropDown.OnSelectUpdate.AddListener(new UnityEngine.Events.UnityAction(SetType)); + } + + private void SetType(string selection) + { + if (bigInterface == null) + return; + + bigInterface.CurrentMapType = selection; + + dropDown.FadeOut(); + dropDown = null; + + if (m_DropDownToggles != null) + m_DropDownToggles.SetAllTogglesOff(); + + RefreshIcons(); + + SetLegend(bigInterface.LegendToggle); + } + + public void ToggleResourceSelection(bool isOn) + { + if (dropDown != null) + { + dropDown.FadeOut(true); + dropDown = null; + } + + if (!isOn) + return; + + if (bigInterface == null || m_DropDownPrefab == null || m_Resources == null) + return; + + dropDown = Instantiate(m_DropDownPrefab).GetComponent(); + + if (dropDown == null) + return; + + dropDown.transform.SetParent(m_Resources, false); + + dropDown.Setup(bigInterface.Resources, bigInterface.CurrentResource); + + dropDown.OnSelectUpdate.AddListener(new UnityEngine.Events.UnityAction(SetResource)); + } + + private void SetResource(string selection) + { + if (bigInterface == null) + return; + + bigInterface.CurrentResource = selection; + + loaded = false; + if (m_ResourcesToggle != null) + m_ResourcesToggle.isOn = true; + loaded = true; + + bigInterface.ResourceToggle = true; + + dropDown.FadeOut(); + dropDown = null; + + if (m_DropDownToggles != null) + m_DropDownToggles.SetAllTogglesOff(); + } + + public void ToggleCelestialBodySelection(bool isOn) + { + if (dropDown != null) + { + dropDown.FadeOut(true); + dropDown = null; + } + + if (!isOn) + return; + + if (bigInterface == null || m_DropDownPrefab == null || m_CelestialBody == null) + return; + + dropDown = Instantiate(m_DropDownPrefab).GetComponent(); + + if (dropDown == null) + return; + + dropDown.transform.SetParent(m_CelestialBody, false); + + dropDown.Setup(bigInterface.CelestialBodies, bigInterface.CurrentCelestialBody); + + dropDown.OnSelectUpdate.AddListener(new UnityEngine.Events.UnityAction(SetCelestialBody)); + } + + private void SetCelestialBody(string selection) + { + if (bigInterface == null) + return; + + bigInterface.CurrentCelestialBody = selection; + + SetLegend(bigInterface.LegendToggle); + + dropDown.FadeOut(); + dropDown = null; + + if (m_DropDownToggles != null) + m_DropDownToggles.SetAllTogglesOff(); + + RefreshIcons(); + } + + public void RefreshMap() + { + if (bigInterface == null) + return; + + bigInterface.RefreshMap(); + + RefreshIcons(); + } + + public void ToggleColor(bool isOn) + { + if (!loaded || bigInterface == null) + return; + + bigInterface.ColorToggle = isOn; + + RefreshIcons(); + + SetLegend(bigInterface.LegendToggle); + } + + public void ToggleTerminator(bool isOn) + { + if (!loaded || bigInterface == null) + return; + + bigInterface.TerminatorToggle = isOn; + + RefreshIcons(); + } + + public void ToggleGrid(bool isOn) + { + if (!loaded || bigInterface == null) + return; + + bigInterface.GridToggle = isOn; + } + + public void ToggleOrbit(bool isOn) + { + if (!loaded || bigInterface == null) + return; + + bigInterface.OrbitToggle = isOn; + + RefreshIcons(); + } + + public void ToggleWaypoint(bool isOn) + { + if (!loaded || bigInterface == null) + return; + + bigInterface.WaypointToggle = isOn; + + if (isOn && bigInterface.ShowWaypoint) + SetWaypointIcons(bigInterface.WaypointInfoList); + else + { + for (int i = waypointLabels.Count - 1; i >= 0; i--) + { + SCAN_MapLabel m = waypointLabels[i]; + + m.gameObject.SetActive(false); + Destroy(m.gameObject); + } + + waypointLabels.Clear(); + } + } + + public void ToggleAnomaly(bool isOn) + { + if (!loaded || bigInterface == null) + return; + + bigInterface.AnomalyToggle = isOn; + + if (isOn) + SetAnomalyIcons(bigInterface.AnomalyInfoList); + else + { + for (int i = anomalyLabels.Count - 1; i >= 0; i--) + { + SCAN_MapLabel m = anomalyLabels[i]; + + m.gameObject.SetActive(false); + Destroy(m.gameObject); + } + + anomalyLabels.Clear(); + } + } + + public void ToggleFlag(bool isOn) + { + if (!loaded || bigInterface == null) + return; + + bigInterface.FlagToggle = isOn; + + if (isOn) + SetFlagIcons(bigInterface.FlagInfoList); + else + { + for (int i = flagLabels.Count - 1; i >= 0; i--) + { + SCAN_MapLabel m = flagLabels[i]; + + m.gameObject.SetActive(false); + Destroy(m.gameObject); + } + + flagLabels.Clear(); + } + } + + public void ToggleLegend(bool isOn) + { + if (!loaded || bigInterface == null) + return; + + bigInterface.LegendToggle = isOn; + + SetLegend(isOn); + } + + public void ToggleResource(bool isOn) + { + if (!loaded || bigInterface == null) + return; + + bigInterface.ResourceToggle = isOn; + + RefreshIcons(); + } + + public void OpenSmallMap() + { + if (bigInterface == null) + return; + + bigInterface.OpenMainMap(); + } + + public void OpenInstruments() + { + if (bigInterface == null) + return; + + bigInterface.OpenInstruments(); + } + + public void OpenSettings() + { + if (bigInterface == null) + return; + + bigInterface.OpenSettings(); + } + + public void OpenZoomMap() + { + if (bigInterface == null) + return; + + bigInterface.OpenZoomMap(); + } + + public void OpenOverlay() + { + if (bigInterface == null) + return; + + bigInterface.OpenOverlay(); + } + + public void ExportMap() + { + if (bigInterface == null) + return; + + bigInterface.ExportMap(); + } + + public void GenerateWaypoint() + { + waypointSelecting = !waypointSelecting; + + DestroyWaypoint(tempWaypointLabel); + DestroyWaypoint(hoverWaypointLabel); + + if (bigInterface == null) + return; + + bigInterface.LockInput = false; + + if (m_WaypointBar != null) + m_WaypointBar.SetActive(waypointSelecting); + + if (waypointSelecting) + { + HoverWaypoint(); + + if (m_MechJebButton != null) + m_MechJebButton.SetActive(bigInterface.MechJebAvailable); + + if (m_WaypointInput != null) + { + if (string.IsNullOrEmpty(waypoint)) + m_WaypointInput.OnTextUpdate.Invoke(bigInterface.RandomWaypoint); + else + m_WaypointInput.OnTextUpdate.Invoke(waypoint); + } + } + } + + private void HoverWaypoint() + { + MapLabelInfo info = new MapLabelInfo() + { + label = "", + image = bigInterface.WaypointSprite, + pos = new Vector2(), + baseColor = Color.white, + flashColor = Color.red, + flash = true, + width = 20, + alignBottom = 10, + show = false + }; + + hoverWaypointLabel = createWaypoint(0, info, true); + } + + public void OnInputClick(BaseEventData eventData) + { + if (!(eventData is PointerEventData) || bigInterface == null) + return; + + if (((PointerEventData)eventData).button != PointerEventData.InputButton.Left) + return; + + bigInterface.LockInput = true; + } + + public void RefreshWaypoint() + { + DestroyWaypoint(tempWaypointLabel); + + if (bigInterface == null || m_WaypointInput == null) + return; + + m_WaypointInput.OnTextUpdate.Invoke(bigInterface.RandomWaypoint); + + waypoint = ""; + } + + public void SetWaypoint() + { + if (bigInterface == null || m_WaypointInput == null) + return; + + bigInterface.LockInput = false; + + waypoint = ""; + + if (tempWaypointLabel != null) + bigInterface.SetWaypoint(m_WaypointInput.Text, tempWaypointLabel.Info.pos); + + GenerateWaypoint(); + + RefreshIcons(); + + waypointSelecting = false; + } + + public void CancelWaypoint() + { + if (bigInterface != null) + bigInterface.LockInput = false; + + GenerateWaypoint(); + + RefreshIcons(); + + waypointSelecting = false; + } + + public void MechJebLanding() + { + if (bigInterface != null) + bigInterface.LockInput = false; + + waypoint = ""; + + if (tempWaypointLabel != null) + bigInterface.SetMJWaypoint(tempWaypointLabel.Info.pos); + + GenerateWaypoint(); + + RefreshIcons(); + + waypointSelecting = false; + } + + private void DestroyWaypoint(SCAN_MapLabel waypoint) + { + if (waypoint != null) + { + waypoint.gameObject.SetActive(false); + Destroy(waypoint.gameObject); + waypoint = null; + } + } + } +} diff --git a/SCANsat.Unity/Unity/SCAN_ColorAltimetry.cs b/SCANsat.Unity/Unity/SCAN_ColorAltimetry.cs new file mode 100644 index 000000000..add599976 --- /dev/null +++ b/SCANsat.Unity/Unity/SCAN_ColorAltimetry.cs @@ -0,0 +1,709 @@ +#region license +/* + * [Scientific Committee on Advanced Navigation] + * S.C.A.N. Satellite + * + * SCAN_ColorAltimetry - Script for controlling the altimetry color management UI + * + * Copyright (c)2014 David Grandy ; + * Copyright (c)2014 technogeeky ; + * Copyright (c)2014 (Your Name Here) ; see LICENSE.txt for licensing details. + */ +#endregion + +using System; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.UI; +using UnityEngine.Events; +using UnityEngine.EventSystems; +using SCANsat.Unity.Interfaces; +using SCANsat.Unity.HSVPicker.UI; + +namespace SCANsat.Unity.Unity +{ + public class SCAN_ColorAltimetry : SettingsPage + { + [SerializeField] + private ToggleGroup m_DropDownToggles = null; + [SerializeField] + private GameObject m_PalettePrefab = null; + [SerializeField] + private Transform m_PaletteGrid = null; + [SerializeField] + private Transform m_PaletteSelection = null; + [SerializeField] + private TextHandler m_PaletteName = null; + [SerializeField] + private RawImage m_PaletteOld = null; + [SerializeField] + private RawImage m_PalettePreview = null; + [SerializeField] + private Transform m_PlanetSelection = null; + [SerializeField] + private TextHandler m_PlanetName = null; + [SerializeField] + private Slider m_MinSlider = null; + [SerializeField] + private Slider m_MaxSlider = null; + [SerializeField] + private Slider m_ClampSlider = null; + [SerializeField] + private Slider m_SizeSlider = null; + [SerializeField] + private GameObject m_ClampObject = null; + [SerializeField] + private GameObject m_SizeObject = null; + [SerializeField] + private TextHandler m_MinSliderLabelOne = null; + [SerializeField] + private TextHandler m_MinSliderLabelTwo = null; + [SerializeField] + private TextHandler m_MaxSliderLabelOne = null; + [SerializeField] + private TextHandler m_MaxSliderLabelTwo = null; + [SerializeField] + private TextHandler m_ClampSliderLabelOne = null; + [SerializeField] + private TextHandler m_ClampSliderLabelTwo = null; + [SerializeField] + private TextHandler m_SizeSliderLabelOne = null; + [SerializeField] + private TextHandler m_SizeSliderLabelTwo = null; + [SerializeField] + private TextHandler m_MinText = null; + [SerializeField] + private TextHandler m_MaxText = null; + [SerializeField] + private TextHandler m_ClampText = null; + [SerializeField] + private TextHandler m_SizeText = null; + [SerializeField] + private InputHandler m_MinInputField = null; + [SerializeField] + private InputHandler m_MaxInputField = null; + [SerializeField] + private InputHandler m_ClampInputField = null; + [SerializeField] + private Toggle m_ClampToggle = null; + [SerializeField] + private Toggle m_ReverseToggle = null; + [SerializeField] + private Toggle m_DiscreteToggle = null; + + private bool loaded; + + private ISCAN_Color colorInterface; + private ISCAN_Settings settingsInterface; + + private List paletteButtons = new List(); + + private void Awake() + { + if (m_MinInputField != null) + m_MinInputField.OnValueChange.AddListener(new UnityAction(OnMinInputChange)); + + if (m_MaxInputField != null) + m_MaxInputField.OnValueChange.AddListener(new UnityAction(OnMaxInputChange)); + + if (m_ClampInputField != null) + m_ClampInputField.OnValueChange.AddListener(new UnityAction(OnClampInputChange)); + } + + private void Update() + { + if (settingsInterface == null) + return; + + if (settingsInterface.LockInput) + { + if (m_MinInputField != null && !m_MinInputField.IsFocused + && m_MaxInputField != null && !m_MaxInputField.IsFocused + && m_ClampInputField != null && !m_ClampInputField.IsFocused) + settingsInterface.LockInput = false; + } + } + + public void SetTerrain(ISCAN_Color color, ISCAN_Settings settings) + { + if (color == null || settings == null) + return; + + colorInterface = color; + settingsInterface = settings; + + color.Refresh(); + + SetUI(); + } + + private void SetUI() + { + if (colorInterface == null) + return; + + SetMinSlider(); + + SetMaxSlider(); + + if (m_MinSlider != null) + m_MinSlider.value = colorInterface.TerrainCurrentMin; + + if (m_MaxSlider != null) + m_MaxSlider.value = colorInterface.TerrainCurrentMax; + + if (colorInterface.TerrainClampOn && m_ClampSlider != null) + m_ClampSlider.value = colorInterface.TerrainClamp; + + if (m_ClampToggle != null) + m_ClampToggle.isOn = colorInterface.TerrainClampOn; + + if (m_ReverseToggle != null) + m_ReverseToggle.isOn = colorInterface.TerrainReverse; + + if (m_DiscreteToggle != null) + m_DiscreteToggle.isOn = colorInterface.TerrainDiscrete; + + if (m_PaletteName != null) + m_PaletteName.OnTextUpdate.Invoke(colorInterface.TerrainPaletteStyle); + + if (m_PlanetName != null) + m_PlanetName.OnTextUpdate.Invoke(colorInterface.TerrainPlanet); + + if (m_PaletteName != null) + m_PaletteName.OnTextUpdate.Invoke(colorInterface.TerrainPaletteStyle); + + CreatePalettes(colorInterface.TerrainPalettes); + + SetPalettePreviews(); + + SetSizeSlider(); + + loaded = true; + } + + public void OnInputClick(BaseEventData eventData) + { + if (!(eventData is PointerEventData) || settingsInterface == null) + return; + + if (((PointerEventData)eventData).button != PointerEventData.InputButton.Left) + return; + + settingsInterface.LockInput = true; + } + + public override void OnPointerDown(PointerEventData eventData) + { + if (SCAN_Settings.Instance == null) + return; + + if (SCAN_Settings.Instance.DropDown != null) + { + RectTransform r = SCAN_Settings.Instance.DropDown.GetComponent(); + + if (r != null) + { + if (!RectTransformUtility.RectangleContainsScreenPoint(r, eventData.position, eventData.pressEventCamera)) + { + SCAN_Settings.Instance.DropDown.FadeOut(); + SCAN_Settings.Instance.DropDown = null; + + if (m_DropDownToggles != null) + m_DropDownToggles.SetAllTogglesOff(); + } + } + } + + if (SCAN_Settings.Instance.WarningPopup != null) + { + RectTransform r = SCAN_Settings.Instance.WarningPopup.GetComponent(); + + if (r != null) + { + if (!RectTransformUtility.RectangleContainsScreenPoint(r, eventData.position, eventData.pressEventCamera)) + { + SCAN_Settings.Instance.WarningPopup.FadeOut(); + SCAN_Settings.Instance.WarningPopup = null; + } + } + } + } + + public void PaletteStyleDropDown(bool isOn) + { + if (SCAN_Settings.Instance.DropDown != null) + { + SCAN_Settings.Instance.DropDown.FadeOut(true); + SCAN_Settings.Instance.DropDown = null; + } + + if (!isOn) + return; + + if (m_PaletteSelection == null || SCAN_Settings.Instance.DropDownPrefab == null || colorInterface == null) + return; + + SCAN_Settings.Instance.DropDown = Instantiate(SCAN_Settings.Instance.DropDownPrefab).GetComponent(); + + if (SCAN_Settings.Instance.DropDown == null) + return; + + SCAN_Settings.Instance.DropDown.transform.SetParent(m_PaletteSelection, false); + + SCAN_Settings.Instance.DropDown.Setup(colorInterface.PaletteStyleNames, colorInterface.TerrainPaletteStyle); + + SCAN_Settings.Instance.DropDown.OnSelectUpdate.AddListener(new UnityEngine.Events.UnityAction(PaletteStyle)); + } + + public void PaletteStyle(string style) + { + if (m_PaletteName != null) + m_PaletteName.OnTextUpdate.Invoke(style); + + SCAN_Settings.Instance.DropDown.FadeOut(true); + SCAN_Settings.Instance.DropDown = null; + + if (m_DropDownToggles != null) + m_DropDownToggles.SetAllTogglesOff(); + + if (colorInterface == null) + return; + + colorInterface.TerrainPaletteStyle = style; + + ClearPalettes(); + + CreatePalettes(colorInterface.TerrainPalettes); + + SetPalettePreviews(); + + SetSizeSlider(); + } + + private void ClearPalettes() + { + for (int i = paletteButtons.Count - 1; i >= 0; i--) + { + SCAN_PaletteButton button = paletteButtons[i]; + + button.gameObject.SetActive(false); + DestroyImmediate(button.gameObject); + } + + paletteButtons.Clear(); + } + + private void CreatePalettes(IList> palettes) + { + if (colorInterface == null || m_PaletteGrid == null || m_PalettePrefab == null || palettes == null) + return; + + for (int i = 0; i < palettes.Count; i++) + { + KeyValuePair palette = palettes[i]; + + CreatePalette(palette); + } + } + + private void CreatePalette(KeyValuePair palette) + { + SCAN_PaletteButton button = Instantiate(m_PalettePrefab).GetComponent(); + + if (button == null) + return; + + button.transform.SetParent(m_PaletteGrid, false); + + button.setup(palette.Value, palette.Key, this); + + paletteButtons.Add(button); + } + + public void SetPalette(string palette) + { + if (string.IsNullOrEmpty(palette) || colorInterface == null) + return; + + colorInterface.TerrainPalette = palette; + + SetPalettePreviews(); + + SetSizeSlider(); + } + + private void SetPalettePreviews() + { + if (colorInterface == null) + return; + + if (m_PaletteOld != null) + m_PaletteOld.texture = colorInterface.TerrainPaletteOld; + + if (m_PalettePreview != null) + m_PalettePreview.texture = colorInterface.TerrainPaletteNew; + } + + public void PlanetDropDown(bool isOn) + { + if (SCAN_Settings.Instance.DropDown != null) + { + SCAN_Settings.Instance.DropDown.FadeOut(true); + SCAN_Settings.Instance.DropDown = null; + } + + if (!isOn) + return; + + if (m_PlanetSelection == null || SCAN_Settings.Instance.DropDownPrefab == null || colorInterface == null) + return; + + SCAN_Settings.Instance.DropDown = Instantiate(SCAN_Settings.Instance.DropDownPrefab).GetComponent(); + + if (SCAN_Settings.Instance.DropDown == null) + return; + + SCAN_Settings.Instance.DropDown.transform.SetParent(m_PlanetSelection, false); + + SCAN_Settings.Instance.DropDown.Setup(colorInterface.CelestialBodies, colorInterface.TerrainPlanet); + + SCAN_Settings.Instance.DropDown.OnSelectUpdate.AddListener(new UnityEngine.Events.UnityAction(Planet)); + } + + public void Planet(string planet) + { + SCAN_Settings.Instance.DropDown.FadeOut(true); + SCAN_Settings.Instance.DropDown = null; + + if (m_DropDownToggles != null) + m_DropDownToggles.SetAllTogglesOff(); + + if (colorInterface == null) + return; + + colorInterface.TerrainPlanet = planet; + + loaded = false; + + ClearPalettes(); + + SetUI(); + } + + public void OnMinChange(float value) + { + if (colorInterface == null) + return; + + float max = (((int)(colorInterface.TerrainCurrentMax * 100)) / 100) - 200; + + if (value > max) + value = max; + else if (value < colorInterface.TerrainGlobalMin) + value = colorInterface.TerrainGlobalMin; + + colorInterface.TerrainCurrentMin = value; + + SetMaxSlider(); + + if (m_MinText != null) + m_MinText.OnTextUpdate.Invoke(string.Format("Min: {0:N0}m", value)); + + if (colorInterface.TerrainClampOn) + SetClamp(); + } + + public void OnMinInputChange(string input) + { + if (m_MinSlider == null) + return; + + float min = SCAN_ColorControl.ParseInput(input, m_MinSlider.value, m_MinSlider.minValue, m_MinSlider.maxValue, 0); + + if (min != m_MinSlider.value) + m_MinSlider.value = min; + } + + public void OnMaxChange(float value) + { + if (colorInterface == null) + return; + + float min = (((int)(colorInterface.TerrainCurrentMin * 100)) / 100) + 200; + + if (value < min) + value = min; + else if (value > colorInterface.TerrainGlobalMax) + value = colorInterface.TerrainGlobalMax; + + colorInterface.TerrainCurrentMax = value; + + SetMinSlider(); + + if (m_MaxText != null) + m_MaxText.OnTextUpdate.Invoke(string.Format("Max: {0:N0}m", value)); + + if (colorInterface.TerrainClampOn) + SetClamp(); + } + + public void OnMaxInputChange(string input) + { + if (m_MaxSlider == null) + return; + + float max = SCAN_ColorControl.ParseInput(input, m_MaxSlider.value, m_MaxSlider.minValue, m_MaxSlider.maxValue, 0); + + if (max != m_MaxSlider.value) + m_MaxSlider.value = max; + } + + public void OnClampChange(float value) + { + if (colorInterface == null) + return; + + if (m_ClampText != null) + m_ClampText.OnTextUpdate.Invoke(string.Format("Clamp: {0:N0}m", value)); + + if (!loaded) + return; + + colorInterface.TerrainClamp = value; + } + + public void OnClampInputChange(string input) + { + if (m_ClampSlider == null) + return; + + float clamp = SCAN_ColorControl.ParseInput(input, m_ClampSlider.value, m_ClampSlider.minValue, m_ClampSlider.maxValue, 0); + + if (clamp != m_ClampSlider.value) + m_ClampSlider.value = clamp; + } + + public void ClampToggle(bool isOn) + { + if (m_ClampObject != null) + m_ClampObject.SetActive(isOn); + + if (isOn) + SetClamp(); + + if (!loaded || colorInterface == null) + return; + + colorInterface.TerrainClampOn = isOn; + + SetPalettePreviews(); + } + + private void SetMinSlider() + { + if (colorInterface == null || m_MinSlider == null) + return; + + float min = (((int)(colorInterface.TerrainGlobalMin * 100)) / 100); + + float max = (((int)(colorInterface.TerrainCurrentMax * 100)) / 100) - 200; + + m_MinSlider.minValue = min; + m_MinSlider.maxValue = max; + + if (m_MinSliderLabelOne != null) + m_MinSliderLabelOne.OnTextUpdate.Invoke(string.Format("|\n{0:N0}m", min)); + + if (m_MinSliderLabelTwo != null) + m_MinSliderLabelTwo.OnTextUpdate.Invoke(string.Format("|\n{0:N0}m", max)); + } + + private void SetMaxSlider() + { + if (colorInterface == null || m_MaxSlider == null) + return; + + float min = (((int)(colorInterface.TerrainCurrentMin * 100)) / 100) + 200; + + float max = (((int)(colorInterface.TerrainGlobalMax * 100)) / 100); + + m_MaxSlider.minValue = min; + m_MaxSlider.maxValue = max; + + if (m_MaxSliderLabelOne != null) + m_MaxSliderLabelOne.OnTextUpdate.Invoke(string.Format("|\n{0:N0}m", min)); + + if (m_MaxSliderLabelTwo != null) + m_MaxSliderLabelTwo.OnTextUpdate.Invoke(string.Format("|\n{0:N0}m", max)); + } + + private void SetClamp() + { + if (colorInterface == null || m_ClampSlider == null) + return; + + float min = (((int)(colorInterface.TerrainCurrentMin * 100)) / 100) + 100; + + float max = (((int)(colorInterface.TerrainCurrentMax * 100)) / 100) - 100; + + m_ClampSlider.minValue = min; + m_ClampSlider.maxValue = max; + + if (m_ClampSliderLabelOne != null) + m_ClampSliderLabelOne.OnTextUpdate.Invoke(string.Format("|\n{0:N0}m", min)); + + if (m_ClampSliderLabelTwo != null) + m_ClampSliderLabelTwo.OnTextUpdate.Invoke(string.Format("|\n{0:N0}m", max)); + + float clamp = colorInterface.TerrainClamp; + + if (clamp <= min) + clamp = min; + else if (clamp >= max) + clamp = max; + + m_ClampSlider.value = clamp; + } + + private void SetSizeSlider() + { + if (colorInterface == null || m_SizeSlider == null) + return; + + if (m_SizeObject != null) + m_SizeObject.SetActive(colorInterface.TerrainHasSize); + + if (!colorInterface.TerrainHasSize) + return; + + int min = colorInterface.TerrainSizeMin; + int max = colorInterface.TerrainSizeMax; + + m_SizeSlider.minValue = min; + m_SizeSlider.maxValue = max; + + if (m_SizeSliderLabelOne != null) + m_SizeSliderLabelOne.OnTextUpdate.Invoke(string.Format("|\n{0}", min)); + + if (m_SizeSliderLabelTwo != null) + m_SizeSliderLabelTwo.OnTextUpdate.Invoke(string.Format("|\n{0}", max)); + + int size = colorInterface.TerrainSize; + + if (size < min) + size = min; + else if (size > max) + size = max; + + m_SizeSlider.value = size; + } + + public void OnSizeChange(float value) + { + if (m_SizeText != null) + m_SizeText.OnTextUpdate.Invoke(string.Format("Size: {0}", (int)value)); + + if (!loaded || colorInterface == null) + return; + + colorInterface.TerrainSize = (int)value; + + ClearPalettes(); + + CreatePalettes(colorInterface.TerrainPalettes); + + SetPalettePreviews(); + + SetSizeSlider(); + } + + public void ReverseToggle(bool isOn) + { + if (!loaded || colorInterface == null) + return; + + colorInterface.TerrainReverse = isOn; + + SetPalettePreviews(); + } + + public void DiscreteToggle(bool isOn) + { + if (!loaded || colorInterface == null) + return; + + colorInterface.TerrainDiscrete = isOn; + + SetPalettePreviews(); + } + + public void Apply() + { + if (colorInterface == null) + return; + + if (settingsInterface != null) + settingsInterface.LockInput = false; + + colorInterface.TerrainApply(); + } + + public void Default() + { + if (colorInterface == null) + return; + + if (settingsInterface != null) + settingsInterface.LockInput = false; + + colorInterface.TerrainDefault(); + + loaded = false; + + ClearPalettes(); + + SetUI(); + } + + public void SaveToConfig() + { + if (SCAN_Settings.Instance == null) + return; + + if (SCAN_Settings.Instance.WarningPopup != null) + { + SCAN_Settings.Instance.WarningPopup.FadeOut(true); + SCAN_Settings.Instance.WarningPopup = null; + } + + if (SCAN_Settings.Instance.PopupPrefab == null) + return; + + SCAN_Settings.Instance.WarningPopup = Instantiate(SCAN_Settings.Instance.PopupPrefab).GetComponent(); + + if (SCAN_Settings.Instance.WarningPopup == null) + return; + + SCAN_Settings.Instance.WarningPopup.transform.SetParent(transform, false); + + SCAN_Settings.Instance.WarningPopup.Setup(settingsInterface.SaveToConfig); + + SCAN_Settings.Instance.WarningPopup.OnSelectUpdate.AddListener(ConfirmSaveToConfig); + } + + private void ConfirmSaveToConfig() + { + SCAN_Settings.Instance.WarningPopup.FadeOut(true); + SCAN_Settings.Instance.WarningPopup = null; + + if (colorInterface == null) + return; + + if (settingsInterface != null) + settingsInterface.LockInput = false; + + colorInterface.TerrainSaveToConfig(); + } + } +} diff --git a/SCANsat.Unity/Unity/SCAN_ColorBiome.cs b/SCANsat.Unity/Unity/SCAN_ColorBiome.cs new file mode 100644 index 000000000..1d6c6ab87 --- /dev/null +++ b/SCANsat.Unity/Unity/SCAN_ColorBiome.cs @@ -0,0 +1,218 @@ +#region license +/* + * [Scientific Committee on Advanced Navigation] + * S.C.A.N. Satellite + * + * SCAN_ColorBiome - Script for controlling the biome color management UI + * + * Copyright (c)2014 David Grandy ; + * Copyright (c)2014 technogeeky ; + * Copyright (c)2014 (Your Name Here) ; see LICENSE.txt for licensing details. + */ +#endregion + +using System; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.UI; +using UnityEngine.Events; +using UnityEngine.EventSystems; +using SCANsat.Unity.Interfaces; +using SCANsat.Unity.HSVPicker.UI; + +namespace SCANsat.Unity.Unity +{ + public class SCAN_ColorBiome : SettingsPage + { + [SerializeField] + private SCAN_ColorPicker m_ColorPicker = null; + [SerializeField] + private Toggle m_BigMapColor = null; + [SerializeField] + private Toggle m_BigMapBorder = null; + [SerializeField] + private Toggle m_ZoomMapBorder = null; + [SerializeField] + private Toggle m_SmallMapColor = null; + [SerializeField] + private Toggle m_SmallMapBorder = null; + [SerializeField] + private Slider m_TransparencySlider = null; + [SerializeField] + private TextHandler m_TransparencyText = null; + [SerializeField] + private InputHandler m_TransInputField = null; + + private bool loaded; + + private ISCAN_Color colorInterface; + private ISCAN_Settings settingsInterface; + + private void Awake() + { + if (m_TransInputField != null) + m_TransInputField.OnValueChange.AddListener(new UnityAction(OnTransparencyInputChange)); + } + + private void Update() + { + if (settingsInterface == null) + return; + + if (settingsInterface.LockInput) + { + if (m_TransInputField != null && !m_TransInputField.IsFocused + && m_ColorPicker != null && !m_ColorPicker.AnyInputActive) + settingsInterface.LockInput = false; + } + } + + public void SetBiome(ISCAN_Color color, ISCAN_Settings settings) + { + if (color == null) + return; + + colorInterface = color; + settingsInterface = settings; + + color.Refresh(); + + if (m_BigMapColor != null) + m_BigMapColor.isOn = color.BiomeBigMapStockColor; + + if (m_BigMapBorder != null) + m_BigMapBorder.isOn = color.BiomeBigMapWhiteBorder; + + if (m_ZoomMapBorder != null) + m_ZoomMapBorder.isOn = color.BiomeZoomMapWhiteBorder; + + if (m_SmallMapColor != null) + m_SmallMapColor.isOn = color.BiomeSmallMapStockColor; + + if (m_SmallMapBorder != null) + m_SmallMapBorder.isOn = color.BiomeSmallMapWhiteBorder; + + if (m_TransparencySlider != null) + m_TransparencySlider.value = color.BiomeTransparency; + + if (m_ColorPicker != null) + m_ColorPicker.Setup(color.BiomeColorOne, color.BiomeColorTwo, true); + + loaded = true; + } + + public void OnInputClick(BaseEventData eventData) + { + if (!(eventData is PointerEventData) || settingsInterface == null) + return; + + if (((PointerEventData)eventData).button != PointerEventData.InputButton.Left) + return; + + settingsInterface.LockInput = true; + } + + public void BigMapColor(bool isOn) + { + if (!loaded || colorInterface == null) + return; + + colorInterface.BiomeBigMapStockColor = isOn; + } + + public void BigMapBorder(bool isOn) + { + if (!loaded || colorInterface == null) + return; + + colorInterface.BiomeBigMapWhiteBorder = isOn; + } + + public void ZoomMapBorder(bool isOn) + { + if (!loaded || colorInterface == null) + return; + + colorInterface.BiomeZoomMapWhiteBorder = isOn; + } + + public void SmallMapColor(bool isOn) + { + if (!loaded || colorInterface == null) + return; + + colorInterface.BiomeSmallMapStockColor = isOn; + } + + public void SmallMapBorder(bool isOn) + { + if (!loaded || colorInterface == null) + return; + + colorInterface.BiomeSmallMapWhiteBorder = isOn; + } + + public void Transparency(float value) + { + if (m_TransparencyText != null) + m_TransparencyText.OnTextUpdate.Invoke(string.Format("Terrain Transparency: {0:N0}%", value)); + + if (!loaded || colorInterface == null) + return; + + colorInterface.BiomeTransparency = value; + } + + public void OnTransparencyInputChange(string input) + { + if (m_TransparencySlider == null) + return; + + float tran = SCAN_ColorControl.ParseInput(input, m_TransparencySlider.value, m_TransparencySlider.minValue, m_TransparencySlider.maxValue, 0); + + if (tran != m_TransparencySlider.value) + m_TransparencySlider.value = tran; + } + + public void Apply() + { + if (colorInterface == null || m_ColorPicker == null) + return; + + colorInterface.BiomeApply(m_ColorPicker.GetColorOne, m_ColorPicker.GetColorTwo); + + if (m_ColorPicker != null) + m_ColorPicker.Setup(m_ColorPicker.GetColorOne, m_ColorPicker.GetColorTwo, false); + } + + public void Default() + { + if (colorInterface == null) + return; + + colorInterface.BiomeDefault(); + + if (m_ColorPicker != null) + m_ColorPicker.Setup(colorInterface.BiomeColorOne, colorInterface.BiomeColorTwo, false); + + loaded = false; + + if (m_BigMapColor != null) + m_BigMapColor.isOn = colorInterface.BiomeBigMapStockColor; + + if (m_BigMapBorder != null) + m_BigMapBorder.isOn = colorInterface.BiomeBigMapWhiteBorder; + + if (m_SmallMapColor != null) + m_SmallMapColor.isOn = colorInterface.BiomeSmallMapStockColor; + + if (m_SmallMapBorder != null) + m_SmallMapBorder.isOn = colorInterface.BiomeSmallMapWhiteBorder; + + if (m_TransparencySlider != null) + m_TransparencySlider.value = colorInterface.BiomeTransparency; + + loaded = true; + } + } +} diff --git a/SCANsat.Unity/Unity/SCAN_ColorControl.cs b/SCANsat.Unity/Unity/SCAN_ColorControl.cs new file mode 100644 index 000000000..ca1dcd86f --- /dev/null +++ b/SCANsat.Unity/Unity/SCAN_ColorControl.cs @@ -0,0 +1,208 @@ +#region license +/* + * [Scientific Committee on Advanced Navigation] + * S.C.A.N. Satellite + * + * SCAN_ColorControl - Script for controlling the color management settings tab + * + * Copyright (c)2014 David Grandy ; + * Copyright (c)2014 technogeeky ; + * Copyright (c)2014 (Your Name Here) ; see LICENSE.txt for licensing details. + */ +#endregion + +using System; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.UI; +using UnityEngine.EventSystems; +using SCANsat.Unity.Interfaces; + +namespace SCANsat.Unity.Unity +{ + public class SCAN_ColorControl : SettingsPage + { + [SerializeField] + private GameObject m_AltimetryPrefab = null; + [SerializeField] + private GameObject m_SlopePrefab = null; + [SerializeField] + private GameObject m_BiomePrefab = null; + [SerializeField] + private GameObject m_ResourcePrefab = null; + [SerializeField] + private Transform m_ContentTransform = null; + + private ISCAN_Settings settingsInterface; + private ISCAN_Color colorInterface; + + private SettingsPage currentPage; + + public void setup(ISCAN_Settings settings, ISCAN_Color color) + { + if (settings == null || color == null) + return; + + settingsInterface = settings; + colorInterface = color; + + AltimetrySettings(true); + } + + public override void OnPointerDown(PointerEventData eventData) + { + if (currentPage != null) + currentPage.OnPointerDown(eventData); + } + + public void AltimetrySettings(bool isOn) + { + if (!isOn) + return; + + if (currentPage != null) + { + currentPage.gameObject.SetActive(false); + DestroyImmediate(currentPage.gameObject); + } + + if (m_ContentTransform == null || m_AltimetryPrefab == null || settingsInterface == null) + return; + + if (settingsInterface.LockInput) + settingsInterface.LockInput = false; + + currentPage = Instantiate(m_AltimetryPrefab).GetComponent(); + + if (currentPage == null) + return; + + currentPage.transform.SetParent(m_ContentTransform, false); + + ((SCAN_ColorAltimetry)currentPage).SetTerrain(colorInterface, settingsInterface); + + if (SCAN_Settings.Instance != null) + SCAN_Settings.Instance.ProcessTooltips(); + + if (SCAN_Settings.Instance != null) + SCAN_Settings.Instance.ClearWarningsAndDropDown(); + } + + public void SlopeSettings(bool isOn) + { + if (!isOn) + return; + + if (currentPage != null) + { + currentPage.gameObject.SetActive(false); + DestroyImmediate(currentPage.gameObject); + } + + if (m_ContentTransform == null || m_SlopePrefab == null || settingsInterface == null) + return; + + if (settingsInterface.LockInput) + settingsInterface.LockInput = false; + + currentPage = Instantiate(m_SlopePrefab).GetComponent(); + + if (currentPage == null) + return; + + currentPage.transform.SetParent(m_ContentTransform, false); + + ((SCAN_ColorSlope)currentPage).SetSlope(colorInterface, settingsInterface); + + if (SCAN_Settings.Instance != null) + SCAN_Settings.Instance.ProcessTooltips(); + + if (SCAN_Settings.Instance != null) + SCAN_Settings.Instance.ClearWarningsAndDropDown(); + } + + public void BiomeSettings(bool isOn) + { + if (!isOn) + return; + + if (currentPage != null) + { + currentPage.gameObject.SetActive(false); + DestroyImmediate(currentPage.gameObject); + } + + if (m_ContentTransform == null || m_BiomePrefab == null || settingsInterface == null) + return; + + if (settingsInterface.LockInput) + settingsInterface.LockInput = false; + + currentPage = Instantiate(m_BiomePrefab).GetComponent(); + + if (currentPage == null) + return; + + currentPage.transform.SetParent(m_ContentTransform, false); + + ((SCAN_ColorBiome)currentPage).SetBiome(colorInterface, settingsInterface); + + if (SCAN_Settings.Instance != null) + SCAN_Settings.Instance.ProcessTooltips(); + + if (SCAN_Settings.Instance != null) + SCAN_Settings.Instance.ClearWarningsAndDropDown(); + } + + public void ResourceSettings(bool isOn) + { + if (!isOn) + return; + + if (currentPage != null) + { + currentPage.gameObject.SetActive(false); + DestroyImmediate(currentPage.gameObject); + } + + if (m_ContentTransform == null || m_ResourcePrefab == null || settingsInterface == null) + return; + + if (settingsInterface.LockInput) + settingsInterface.LockInput = false; + + currentPage = Instantiate(m_ResourcePrefab).GetComponent(); + + if (currentPage == null) + return; + + currentPage.transform.SetParent(m_ContentTransform, false); + + ((SCAN_ColorResource)currentPage).SetResource(colorInterface, settingsInterface); + + if (SCAN_Settings.Instance != null) + SCAN_Settings.Instance.ProcessTooltips(); + + if (SCAN_Settings.Instance != null) + SCAN_Settings.Instance.ClearWarningsAndDropDown(); + } + + public static float ParseInput(string input, float original, float min, float max, int digits) + { + float f = original; + + if (!float.TryParse(input, out f)) + return f; + + if (f < min) + return original; + else if (f > max) + return original; + + f = (float)Math.Round(f, digits); + + return f; + } + + } +} diff --git a/SCANsat.Unity/Unity/SCAN_ColorResource.cs b/SCANsat.Unity/Unity/SCAN_ColorResource.cs new file mode 100644 index 000000000..2ffb5c37f --- /dev/null +++ b/SCANsat.Unity/Unity/SCAN_ColorResource.cs @@ -0,0 +1,486 @@ +#region license +/* + * [Scientific Committee on Advanced Navigation] + * S.C.A.N. Satellite + * + * SCAN_ColorResource - Script for controlling the resource color management UI + * + * Copyright (c)2014 David Grandy ; + * Copyright (c)2014 technogeeky ; + * Copyright (c)2014 (Your Name Here) ; see LICENSE.txt for licensing details. + */ +#endregion + +using System; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.UI; +using UnityEngine.Events; +using UnityEngine.EventSystems; +using SCANsat.Unity.Interfaces; +using SCANsat.Unity.HSVPicker.UI; + +namespace SCANsat.Unity.Unity +{ + public class SCAN_ColorResource : SettingsPage + { + [SerializeField] + private SCAN_ColorPicker m_ColorPicker = null; + [SerializeField] + private Transform m_PlanetSelection = null; + [SerializeField] + private Transform m_ResourceSelection = null; + [SerializeField] + private ToggleGroup m_DropDownToggles = null; + [SerializeField] + private TextHandler m_PlanetName = null; + [SerializeField] + private TextHandler m_ResourceName = null; + [SerializeField] + private Slider m_MinSlider = null; + [SerializeField] + private Slider m_MaxSlider = null; + [SerializeField] + private Slider m_TransSlider = null; + [SerializeField] + private TextHandler m_MinSliderLabelTwo = null; + [SerializeField] + private TextHandler m_MaxSliderLabelOne = null; + [SerializeField] + private TextHandler m_MinText = null; + [SerializeField] + private TextHandler m_MaxText = null; + [SerializeField] + private TextHandler m_TransText = null; + [SerializeField] + private InputHandler m_MinInputField = null; + [SerializeField] + private InputHandler m_MaxInputField = null; + [SerializeField] + private InputHandler m_TransInputField = null; + + private ISCAN_Color colorInterface; + private ISCAN_Settings settingsInterface; + + private void Awake() + { + if (m_MinInputField != null) + m_MinInputField.OnValueChange.AddListener(new UnityAction(OnMinInputChange)); + + if (m_MaxInputField != null) + m_MaxInputField.OnValueChange.AddListener(new UnityAction(OnMaxInputChange)); + + if (m_TransInputField != null) + m_TransInputField.OnValueChange.AddListener(new UnityAction(OnTransparencyInputChange)); + } + + private void Update() + { + if (settingsInterface == null) + return; + + if (settingsInterface.LockInput) + { + if (m_MinInputField != null && !m_MinInputField.IsFocused + && m_MaxInputField != null && !m_MaxInputField.IsFocused + && m_TransInputField != null && !m_TransInputField.IsFocused + && m_ColorPicker != null && !m_ColorPicker.AnyInputActive) + settingsInterface.LockInput = false; + } + } + + public void SetResource(ISCAN_Color color, ISCAN_Settings settings) + { + if (color == null || settings == null) + return; + + colorInterface = color; + settingsInterface = settings; + + color.Refresh(); + + SetUI(); + } + + private void SetUI(bool color = true) + { + if (colorInterface == null) + return; + + SetMinSlider(); + + SetMaxSlider(); + + if (m_MinSlider != null) + m_MinSlider.value = colorInterface.ResourceMin; + + if (m_MaxSlider != null) + m_MaxSlider.value = colorInterface.ResourceMax; + + if (m_TransSlider != null) + m_TransSlider.value = colorInterface.ResourceTransparency; + + if (m_ColorPicker != null && color) + m_ColorPicker.Setup(colorInterface.ResourceColorOne, colorInterface.ResourceColorTwo, true); + + if (m_PlanetName != null) + m_PlanetName.OnTextUpdate.Invoke(colorInterface.ResourcePlanet); + + if (m_ResourceName != null) + m_ResourceName.OnTextUpdate.Invoke(colorInterface.ResourceCurrent); + } + + public override void OnPointerDown(PointerEventData eventData) + { + if (SCAN_Settings.Instance == null) + return; + + if (SCAN_Settings.Instance.DropDown != null) + { + RectTransform r = SCAN_Settings.Instance.DropDown.GetComponent(); + + if (r != null) + { + if (!RectTransformUtility.RectangleContainsScreenPoint(r, eventData.position, eventData.pressEventCamera)) + { + SCAN_Settings.Instance.DropDown.FadeOut(); + SCAN_Settings.Instance.DropDown = null; + + if (m_DropDownToggles != null) + m_DropDownToggles.SetAllTogglesOff(); + } + } + } + + if (SCAN_Settings.Instance.WarningPopup != null) + { + RectTransform r = SCAN_Settings.Instance.WarningPopup.GetComponent(); + + if (r != null) + { + if (!RectTransformUtility.RectangleContainsScreenPoint(r, eventData.position, eventData.pressEventCamera)) + { + SCAN_Settings.Instance.WarningPopup.FadeOut(); + SCAN_Settings.Instance.WarningPopup = null; + } + } + } + } + + public void PlanetDropDown(bool isOn) + { + if (SCAN_Settings.Instance.DropDown != null) + { + SCAN_Settings.Instance.DropDown.FadeOut(true); + SCAN_Settings.Instance.DropDown = null; + } + + if (!isOn) + return; + + if (m_PlanetSelection == null || SCAN_Settings.Instance.DropDownPrefab == null || colorInterface == null) + return; + + SCAN_Settings.Instance.DropDown = Instantiate(SCAN_Settings.Instance.DropDownPrefab).GetComponent(); + + if (SCAN_Settings.Instance.DropDown == null) + return; + + SCAN_Settings.Instance.DropDown.transform.SetParent(m_PlanetSelection, false); + + SCAN_Settings.Instance.DropDown.Setup(colorInterface.CelestialBodies, colorInterface.ResourcePlanet); + + SCAN_Settings.Instance.DropDown.OnSelectUpdate.AddListener(new UnityEngine.Events.UnityAction(Planet)); + } + + public void Planet(string planet) + { + if (m_PlanetName != null) + m_PlanetName.OnTextUpdate.Invoke(planet); + + SCAN_Settings.Instance.DropDown.FadeOut(true); + SCAN_Settings.Instance.DropDown = null; + + if (m_DropDownToggles != null) + m_DropDownToggles.SetAllTogglesOff(); + + if (colorInterface == null) + return; + + colorInterface.ResourcePlanet = planet; + + SetUI(false); + } + + public void ResourceDropDown(bool isOn) + { + if (SCAN_Settings.Instance.DropDown != null) + { + SCAN_Settings.Instance.DropDown.FadeOut(true); + SCAN_Settings.Instance.DropDown = null; + } + + if (!isOn) + return; + + if (m_ResourceSelection == null || SCAN_Settings.Instance.DropDownPrefab == null || colorInterface == null) + return; + + SCAN_Settings.Instance.DropDown = Instantiate(SCAN_Settings.Instance.DropDownPrefab).GetComponent(); + + if (SCAN_Settings.Instance.DropDown == null) + return; + + SCAN_Settings.Instance.DropDown.transform.SetParent(m_ResourceSelection, false); + + SCAN_Settings.Instance.DropDown.Setup(colorInterface.Resources, colorInterface.ResourceCurrent); + + SCAN_Settings.Instance.DropDown.OnSelectUpdate.AddListener(new UnityEngine.Events.UnityAction(Resource)); + } + + public void Resource(string resource) + { + if (m_ResourceName != null) + m_ResourceName.OnTextUpdate.Invoke(resource); + + SCAN_Settings.Instance.DropDown.FadeOut(true); + SCAN_Settings.Instance.DropDown = null; + + if (m_DropDownToggles != null) + m_DropDownToggles.SetAllTogglesOff(); + + if (colorInterface == null) + return; + + colorInterface.ResourceCurrent = resource; + + SetUI(); + } + + public void OnInputClick(BaseEventData eventData) + { + if (!(eventData is PointerEventData) || settingsInterface == null) + return; + + if (((PointerEventData)eventData).button != PointerEventData.InputButton.Left) + return; + + settingsInterface.LockInput = true; + } + + public void OnMinChange(float value) + { + if (colorInterface == null) + return; + + float max = colorInterface.ResourceMax - 1; + + if (value > max) + value = max; + else if (value < 0) + value = 0; + + colorInterface.ResourceMin = value; + + SetMaxSlider(); + + if (m_MinText != null) + m_MinText.OnTextUpdate.Invoke(string.Format("Min: {0:N2}%", value)); + } + + public void OnMinInputChange(string input) + { + if (m_MinSlider == null) + return; + + float min = SCAN_ColorControl.ParseInput(input, m_MinSlider.value, m_MinSlider.minValue, m_MinSlider.maxValue, 2); + + if (min != m_MinSlider.value) + m_MinSlider.value = min; + } + + public void OnMaxChange(float value) + { + if (colorInterface == null) + return; + + float min = colorInterface.ResourceMin + 1; + + if (value < min) + value = min; + else if (value > 100) + value = 100; + + colorInterface.ResourceMax = value; + + SetMinSlider(); + + if (m_MaxText != null) + m_MaxText.OnTextUpdate.Invoke(string.Format("Max: {0:N2}%", value)); + } + + public void OnMaxInputChange(string input) + { + if (m_MaxSlider == null) + return; + + float max = SCAN_ColorControl.ParseInput(input, m_MaxSlider.value, m_MaxSlider.minValue, m_MaxSlider.maxValue, 2); + + if (max != m_MaxSlider.value) + m_MaxSlider.value = max; + } + + private void SetMinSlider() + { + if (colorInterface == null || m_MinSlider == null) + return; + + float max = colorInterface.ResourceMax - 1; + + m_MinSlider.minValue = 0; + m_MinSlider.maxValue = max; + + if (m_MinSliderLabelTwo != null) + m_MinSliderLabelTwo.OnTextUpdate.Invoke(string.Format("|\n{0:N1}%", max)); + } + + private void SetMaxSlider() + { + if (colorInterface == null || m_MaxSlider == null) + return; + + float min = colorInterface.ResourceMin + 1; + + m_MaxSlider.minValue = min; + m_MaxSlider.maxValue = 100; + + if (m_MaxSliderLabelOne != null) + m_MaxSliderLabelOne.OnTextUpdate.Invoke(string.Format("|\n{0:N1}%", min)); + } + + public void OnTransparencyChange(float value) + { + if (m_TransText != null) + m_TransText.OnTextUpdate.Invoke(string.Format("Trans: {0:N0}%", value)); + + if (colorInterface == null) + return; + + colorInterface.ResourceTransparency = value; + } + + public void OnTransparencyInputChange(string input) + { + if (m_TransSlider == null) + return; + + float tran = SCAN_ColorControl.ParseInput(input, m_TransSlider.value, m_TransSlider.minValue, m_TransSlider.maxValue, 0); + + if (tran != m_TransSlider.value) + m_TransSlider.value = tran; + } + + public void Apply() + { + if (colorInterface == null || m_ColorPicker == null) + return; + + if (settingsInterface != null) + settingsInterface.LockInput = false; + + colorInterface.ResourceApply(m_ColorPicker.GetColorOne, m_ColorPicker.GetColorTwo); + + if (m_ColorPicker != null) + m_ColorPicker.Setup(m_ColorPicker.GetColorOne, m_ColorPicker.GetColorTwo, false); + } + + public void ApplyToAll() + { + if (colorInterface == null || m_ColorPicker == null) + return; + + if (settingsInterface != null) + settingsInterface.LockInput = false; + + colorInterface.ResourceApplyToAll(m_ColorPicker.GetColorOne, m_ColorPicker.GetColorTwo); + + if (m_ColorPicker != null) + m_ColorPicker.Setup(m_ColorPicker.GetColorOne, m_ColorPicker.GetColorTwo, false); + } + + public void Default() + { + if (colorInterface == null) + return; + + if (settingsInterface != null) + settingsInterface.LockInput = false; + + colorInterface.ResourceDefault(); + + if (m_ColorPicker != null) + m_ColorPicker.Setup(colorInterface.ResourceColorOne, colorInterface.ResourceColorTwo, false); + + SetUI(); + } + + public void DefaultToAll() + { + if (colorInterface == null) + return; + + if (settingsInterface != null) + settingsInterface.LockInput = false; + + colorInterface.ResourceDefaultToAll(); + + if (m_ColorPicker != null) + m_ColorPicker.Setup(colorInterface.ResourceColorOne, colorInterface.ResourceColorTwo, false); + + SetUI(); + } + + public void SaveToConfig() + { + if (SCAN_Settings.Instance == null) + return; + + if (SCAN_Settings.Instance.WarningPopup != null) + { + SCAN_Settings.Instance.WarningPopup.FadeOut(true); + SCAN_Settings.Instance.WarningPopup = null; + } + + if (SCAN_Settings.Instance.PopupPrefab == null) + return; + + SCAN_Settings.Instance.WarningPopup = Instantiate(SCAN_Settings.Instance.PopupPrefab).GetComponent(); + + if (SCAN_Settings.Instance.WarningPopup == null) + return; + + SCAN_Settings.Instance.WarningPopup.transform.SetParent(transform, false); + + SCAN_Settings.Instance.WarningPopup.Setup(settingsInterface.SaveToConfig); + + SCAN_Settings.Instance.WarningPopup.OnSelectUpdate.AddListener(ConfirmSaveToConfig); + } + + private void ConfirmSaveToConfig() + { + SCAN_Settings.Instance.WarningPopup.FadeOut(true); + SCAN_Settings.Instance.WarningPopup = null; + + if (colorInterface == null || m_ColorPicker == null) + return; + + if (settingsInterface != null) + settingsInterface.LockInput = false; + + colorInterface.ResourceSaveToConfig(m_ColorPicker.GetColorOne, m_ColorPicker.GetColorTwo); + + if (m_ColorPicker != null) + m_ColorPicker.Setup(m_ColorPicker.GetColorOne, m_ColorPicker.GetColorTwo, false); + } + } +} diff --git a/SCANsat.Unity/Unity/SCAN_ColorSlope.cs b/SCANsat.Unity/Unity/SCAN_ColorSlope.cs new file mode 100644 index 000000000..9e98b01d4 --- /dev/null +++ b/SCANsat.Unity/Unity/SCAN_ColorSlope.cs @@ -0,0 +1,146 @@ +#region license +/* + * [Scientific Committee on Advanced Navigation] + * S.C.A.N. Satellite + * + * SCAN_ColorSlope - Script for controlling the slope color management UI + * + * Copyright (c)2014 David Grandy ; + * Copyright (c)2014 technogeeky ; + * Copyright (c)2014 (Your Name Here) ; see LICENSE.txt for licensing details. + */ +#endregion + +using System; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.UI; +using UnityEngine.Events; +using UnityEngine.EventSystems; +using SCANsat.Unity.Interfaces; +using SCANsat.Unity.HSVPicker.UI; + +namespace SCANsat.Unity.Unity +{ + public class SCAN_ColorSlope : SettingsPage + { + [SerializeField] + private SCAN_ColorPicker m_ColorPickerOne = null; + [SerializeField] + private SCAN_ColorPicker m_ColorPickerTwo = null; + [SerializeField] + private Slider m_CutoffSlider = null; + [SerializeField] + private TextHandler m_CutoffText = null; + [SerializeField] + private InputHandler m_CutoffInputField = null; + + private bool loaded; + + private ISCAN_Color colorInterface; + private ISCAN_Settings settingsInterface; + + private void Awake() + { + if (m_CutoffInputField != null) + m_CutoffInputField.OnValueChange.AddListener(new UnityAction(OnCutoffInputChange)); + } + + private void Update() + { + if (settingsInterface == null) + return; + + if (settingsInterface.LockInput) + { + if (m_CutoffInputField != null && !m_CutoffInputField.IsFocused + && m_ColorPickerOne != null && !m_ColorPickerOne.AnyInputActive + && m_ColorPickerTwo != null && !m_ColorPickerTwo.AnyInputActive) + settingsInterface.LockInput = false; + } + } + + public void SetSlope(ISCAN_Color color, ISCAN_Settings settings) + { + if (color == null) + return; + + colorInterface = color; + settingsInterface = settings; + + color.Refresh(); + + if (m_CutoffSlider != null) + m_CutoffSlider.value = color.SlopeCutoff; + + if (m_ColorPickerOne != null) + m_ColorPickerOne.Setup(color.SlopeColorOneLo, color.SlopeColorOneHi, true); + + if (m_ColorPickerTwo != null) + m_ColorPickerTwo.Setup(color.SlopeColorTwoLo, color.SlopeColorTwoHi, true); + + loaded = true; + } + + public void OnInputClick(BaseEventData eventData) + { + if (!(eventData is PointerEventData) || settingsInterface == null) + return; + + if (((PointerEventData)eventData).button != PointerEventData.InputButton.Left) + return; + + settingsInterface.LockInput = true; + } + + public void Cutoff(float value) + { + if (m_CutoffText != null) + m_CutoffText.OnTextUpdate.Invoke(string.Format("Slope Cutoff: {0:N1}", value)); + + if (!loaded || colorInterface == null) + return; + + colorInterface.SlopeCutoff = value; + } + + public void OnCutoffInputChange(string input) + { + if (m_CutoffSlider == null) + return; + + float cutoff = SCAN_ColorControl.ParseInput(input, m_CutoffSlider.value, m_CutoffSlider.minValue, m_CutoffSlider.maxValue, 1); + + if (cutoff != m_CutoffSlider.value) + m_CutoffSlider.value = cutoff; + } + + public void Apply() + { + if (colorInterface == null || m_ColorPickerOne == null || m_ColorPickerTwo == null) + return; + + colorInterface.SlopeApply(m_ColorPickerOne.GetColorOne, m_ColorPickerOne.GetColorTwo, m_ColorPickerTwo.GetColorOne, m_ColorPickerTwo.GetColorTwo); + + if (m_ColorPickerOne != null) + m_ColorPickerOne.Setup(m_ColorPickerOne.GetColorOne, m_ColorPickerOne.GetColorTwo, false); + + if (m_ColorPickerTwo != null) + m_ColorPickerTwo.Setup(m_ColorPickerTwo.GetColorOne, m_ColorPickerTwo.GetColorTwo, false); + } + + public void Default() + { + if (colorInterface == null) + return; + + colorInterface.SlopeDefault(); + + if (m_ColorPickerOne != null) + m_ColorPickerOne.Setup(colorInterface.SlopeColorOneLo, colorInterface.SlopeColorOneHi, false); + + if (m_ColorPickerTwo != null) + m_ColorPickerTwo.Setup(colorInterface.SlopeColorTwoLo, colorInterface.SlopeColorTwoHi, false); + } + } +} diff --git a/SCANsat.Unity/Unity/SCAN_DropDown.cs b/SCANsat.Unity/Unity/SCAN_DropDown.cs new file mode 100644 index 000000000..cf46a8e34 --- /dev/null +++ b/SCANsat.Unity/Unity/SCAN_DropDown.cs @@ -0,0 +1,123 @@ +#region license +/* + * [Scientific Committee on Advanced Navigation] + * S.C.A.N. Satellite + * + * SCAN_DropDown - Script for controlling drop down menus + * + * Copyright (c)2014 David Grandy ; + * Copyright (c)2014 technogeeky ; + * Copyright (c)2014 (Your Name Here) ; see LICENSE.txt for licensing details. + */ +#endregion + +using System; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.UI; +using UnityEngine.Events; + +namespace SCANsat.Unity.Unity +{ + public class SCAN_DropDown : CanvasFader + { + public class OnSelectEvent : UnityEvent { } + + [SerializeField] + private Transform m_ContentTransform = null; + [SerializeField] + private GameObject m_ContentPrefab = null; + [SerializeField] + private ScrollRect m_Scrollbar = null; + [SerializeField] + private LayoutElement m_Layout = null; + + private string currentElement; + private OnSelectEvent _onSelectUpdate = new OnSelectEvent(); + private int fontsize = 14; + + protected override void Awake() + { + base.Awake(); + + Alpha(0); + } + + public OnSelectEvent OnSelectUpdate + { + get { return _onSelectUpdate; } + } + + public void Setup(IList elements, string current, int font = 14) + { + if (elements == null) + return; + + if (m_Layout != null) + { + float height = elements.Count * 25; + + height += 5; + + if (height > 155) + height = 155; + + m_Layout.preferredHeight = height; + } + + fontsize = font; + + currentElement = current; + + AddElements(elements); + + FadeIn(); + } + + public void FadeIn() + { + Fade(1, true); + } + + public void FadeOut(bool fast = false) + { + Fade(0, fast, Close, false); + } + + private void Close() + { + gameObject.SetActive(false); + DestroyImmediate(gameObject); + } + + public void SetElement(string element) + { + _onSelectUpdate.Invoke(element); + } + + private void AddElements(IList elements) + { + if (m_ContentPrefab == null || m_ContentTransform == null) + return; + + for (int i = 0; i < elements.Count; i++) + { + string element = elements[i]; + + AddElement(element); + } + } + + private void AddElement(string element) + { + SCAN_DropDownElement dropDown = Instantiate(m_ContentPrefab).GetComponent(); + + if (dropDown == null) + return; + + dropDown.transform.SetParent(m_ContentTransform, false); + + dropDown.Setup(element, element == currentElement, this, m_Scrollbar, fontsize); + } + } +} diff --git a/SCANsat.Unity/Unity/SCAN_DropDownElement.cs b/SCANsat.Unity/Unity/SCAN_DropDownElement.cs new file mode 100644 index 000000000..362f91d18 --- /dev/null +++ b/SCANsat.Unity/Unity/SCAN_DropDownElement.cs @@ -0,0 +1,60 @@ +#region license +/* + * [Scientific Committee on Advanced Navigation] + * S.C.A.N. Satellite + * + * SCAN_DropDownElement - Script for controlling individual elements of drop down menus + * + * Copyright (c)2014 David Grandy ; + * Copyright (c)2014 technogeeky ; + * Copyright (c)2014 (Your Name Here) ; see LICENSE.txt for licensing details. + */ +#endregion + +using System; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.UI; + +namespace SCANsat.Unity.Unity +{ + public class SCAN_DropDownElement : MonoBehaviour + { + [SerializeField] + private TextHandler m_ElementTitle = null; + [SerializeField] + private Color m_HighlightColor = Color.white; + + private SCAN_DropDown dropdown; + private string title; + + public void Setup(string element, bool current, SCAN_DropDown parent, ScrollRect scroll, int size) + { + if (parent == null) + return; + + dropdown = parent; + title = element; + + if (m_ElementTitle != null) + { + if (scroll != null) + m_ElementTitle.SetScroller(scroll); + + m_ElementTitle.OnTextUpdate.Invoke(string.Format("{1}", size, element)); + + if (current) + { + m_ElementTitle.OnColorUpdate.Invoke(m_HighlightColor); + m_ElementTitle.SetNormalColor(m_HighlightColor); + } + } + } + + public void Select() + { + dropdown.SetElement(title); + } + + } +} diff --git a/SCANsat.Unity/Unity/SCAN_Instruments.cs b/SCANsat.Unity/Unity/SCAN_Instruments.cs new file mode 100644 index 000000000..7b30c7d86 --- /dev/null +++ b/SCANsat.Unity/Unity/SCAN_Instruments.cs @@ -0,0 +1,286 @@ +#region license +/* + * [Scientific Committee on Advanced Navigation] + * S.C.A.N. Satellite + * + * SCAN_Instruments - Script for controlling the instruments window UI + * + * Copyright (c)2014 David Grandy ; + * Copyright (c)2014 technogeeky ; + * Copyright (c)2014 (Your Name Here) ; see LICENSE.txt for licensing details. + */ +#endregion + +using System; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.UI; +using UnityEngine.EventSystems; +using SCANsat.Unity.Interfaces; + +namespace SCANsat.Unity.Unity +{ + public class SCAN_Instruments : CanvasFader, IDragHandler, IBeginDragHandler, IEndDragHandler, IPointerDownHandler + { + [SerializeField] + private TextHandler m_Version = null; + [SerializeField] + private TextHandler m_ReadoutText = null; + [SerializeField] + private RectTransform m_ResourceButtons = null; + [SerializeField] + private RawImage m_AnomalyImage = null; + [SerializeField] + private TextHandler m_AnomalyPrintText = null; + [SerializeField] + private TextHandler m_AnomalyNameText = null; + [SerializeField] + private GameObject m_AnomalyObject = null; + [SerializeField] + private Shader m_EdgeDetectShader = null; + [SerializeField] + private Shader m_GrayScaleShader = null; + + private ISCAN_Instruments insInterface; + private RectTransform rect; + private Vector2 mouseStart; + private Vector3 windowStart; + + public Shader EdgeDetectShader + { + get { return m_EdgeDetectShader; } + } + + public Shader GrayScaleShader + { + get { return m_GrayScaleShader; } + } + + protected override void Awake() + { + base.Awake(); + + rect = GetComponent(); + + string s; + + if (m_EdgeDetectShader != null) + s = m_EdgeDetectShader.name; + + if (m_GrayScaleShader != null) + s = m_GrayScaleShader.name; + + Alpha(0); + } + + private void Update() + { + if (insInterface == null || !insInterface.IsVisible) + return; + + insInterface.Update(); + } + + public void SetInstruments(ISCAN_Instruments ins) + { + if (ins == null) + return; + + insInterface = ins; + + if (m_Version != null) + m_Version.OnTextUpdate.Invoke(ins.Version); + + if (!ins.ResourceButtons && m_ResourceButtons != null) + m_ResourceButtons.gameObject.SetActive(false); + + SetScale(ins.Scale); + + SetPosition(ins.Position); + + ProcessTooltips(); + + FadeIn(); + } + + public void FadeIn() + { + Fade(1, true); + } + + public void FadeOut() + { + Fade(0, false, Kill, false); + } + + private void Kill() + { + gameObject.SetActive(false); + Destroy(gameObject); + } + + public void Close() + { + if (insInterface != null) + insInterface.IsVisible = false; + } + + public void ProcessTooltips() + { + if (insInterface == null) + return; + + TooltipHandler[] handlers = gameObject.GetComponentsInChildren(true); + + if (handlers == null) + return; + + for (int j = 0; j < handlers.Length; j++) + ProcessTooltip(handlers[j], insInterface.TooltipsOn, insInterface.TooltipCanvas, insInterface.Scale); + } + + private void ProcessTooltip(TooltipHandler handler, bool isOn, Canvas c, float scale) + { + if (handler == null) + return; + + handler.IsActive = isOn && !handler.HelpTip; + handler._Canvas = c; + handler.Scale = scale; + } + + public void SetResourceButtons(int lines) + { + if (insInterface == null || m_ResourceButtons == null) + return; + + float y = -1 * lines * 24; + + if (insInterface.ResourceButtons && m_ResourceButtons != null) + m_ResourceButtons.anchoredPosition3D = new Vector3(m_ResourceButtons.anchoredPosition.x, y, 0); + } + + public void SetScale(float scale) + { + rect.localScale = Vector3.one * scale; + } + + public void SetPosition(Vector2 pos) + { + if (rect == null) + return; + + rect.anchoredPosition = new Vector3(pos.x, pos.y, 0); + } + + public void OnPointerDown(PointerEventData eventData) + { + transform.SetAsLastSibling(); + } + + public void OnBeginDrag(PointerEventData eventData) + { + if (rect == null) + return; + + mouseStart = eventData.position; + windowStart = rect.position; + } + + public void OnDrag(PointerEventData eventData) + { + if (rect == null) + return; + + rect.position = windowStart + (Vector3)(eventData.position - mouseStart); + + if (insInterface == null) + return; + + insInterface.ClampToScreen(rect); + } + + public void OnEndDrag(PointerEventData eventData) + { + if (rect == null || insInterface == null) + return; + + insInterface.Position = new Vector2(rect.anchoredPosition.x, rect.anchoredPosition.y); + } + + public void UpdateText(string s) + { + if (m_ReadoutText == null) + return; + + m_ReadoutText.OnTextUpdate.Invoke(s); + } + + public void UpdateAnomaly(Texture tex) + { + if (m_AnomalyImage == null) + return; + + m_AnomalyImage.texture = tex; + } + + public void UpdateAnomalyText(string s) + { + if (m_AnomalyPrintText == null) + return; + + m_AnomalyPrintText.OnTextUpdate.Invoke(s); + } + + public void UpdateAnomalyName(string s) + { + if (m_AnomalyNameText == null) + return; + + m_AnomalyNameText.OnTextUpdate.Invoke(s); + } + + public void PreviousResource() + { + if (insInterface == null) + return; + + insInterface.PreviousResource(); + } + + public void NextResource() + { + if (insInterface == null) + return; + + insInterface.NextResource(); + } + + public void SetDetailState(bool isOn) + { + if (m_AnomalyObject == null) + return; + + if (isOn && !m_AnomalyObject.activeSelf) + m_AnomalyObject.SetActive(true); + else if (!isOn && m_AnomalyObject.activeSelf) + m_AnomalyObject.SetActive(false); + } + + public void OnMouseEnterAnomaly(BaseEventData eventData) + { + if (!(eventData is PointerEventData) || insInterface == null) + return; + + insInterface.MouseAnomaly = true; + } + + public void OnMouseExitAnomaly(BaseEventData eventData) + { + if (!(eventData is PointerEventData) || insInterface == null) + return; + + insInterface.MouseAnomaly = false; + } + } +} diff --git a/SCANsat.Unity/Unity/SCAN_MainMap.cs b/SCANsat.Unity/Unity/SCAN_MainMap.cs new file mode 100644 index 000000000..b8d1709a9 --- /dev/null +++ b/SCANsat.Unity/Unity/SCAN_MainMap.cs @@ -0,0 +1,489 @@ +#region license +/* + * [Scientific Committee on Advanced Navigation] + * S.C.A.N. Satellite + * + * SCAN_MainMap - Script for controlling the main map UI + * + * Copyright (c)2014 David Grandy ; + * Copyright (c)2014 technogeeky ; + * Copyright (c)2014 (Your Name Here) ; see LICENSE.txt for licensing details. + */ +#endregion + +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEngine; +using UnityEngine.UI; +using UnityEngine.EventSystems; +using SCANsat.Unity.Interfaces; + +namespace SCANsat.Unity.Unity +{ + public class SCAN_MainMap : CanvasFader, IDragHandler, IBeginDragHandler, IEndDragHandler, IPointerDownHandler + { + [SerializeField] + private TextHandler m_Version = null; + [SerializeField] + private Toggle m_ColorToggle = null; + [SerializeField] + private Toggle m_TerminatorToggle = null; + [SerializeField] + private Toggle m_TypeToggle = null; + [SerializeField] + private Toggle m_MinimizeToggle = null; + [SerializeField] + private TextHandler m_MinimizeText = null; + [SerializeField] + private TextHandler m_TypeLabel = null; + [SerializeField] + private RawImage m_MainMap = null; + [SerializeField] + private TextHandler m_LoText = null; + [SerializeField] + private TextHandler m_HiText = null; + [SerializeField] + private TextHandler m_MultiText = null; + [SerializeField] + private TextHandler m_M700Text = null; + [SerializeField] + private TextHandler m_OreText = null; + [SerializeField] + private TextHandler m_PercentageText = null; + [SerializeField] + private GameObject m_VesselPrefab = null; + [SerializeField] + private Transform m_VesselTransform = null; + [SerializeField] + private GameObject m_MapPrefab = null; + [SerializeField] + private GameObject m_GeneratingText = null; + + private ISCAN_MainMap mapInterface; + private bool loaded; + private bool generating; + private RectTransform rect; + private Vector2 mouseStart; + private Vector3 windowStart; + private List vessels = new List(); + private List mapLabels = new List(); + + protected override void Awake() + { + base.Awake(); + + rect = GetComponent(); + + Alpha(0); + } + + private void Update() + { + if (mapInterface == null || !mapInterface.IsVisible) + return; + + mapInterface.Update(); + + if (generating) + SetGeneratingText(mapInterface.MapGenerating); + + if (!mapInterface.Minimized) + { + for (int i = vessels.Count - 1; i >= 0; i--) + { + SCAN_VesselInfo vessel = vessels[i]; + + vessel.UpdateText(mapInterface.VesselInfo(vessel.ID)); + } + } + + for (int i = mapLabels.Count - 1; i >= 0; i--) + { + SCAN_MapLabel mapLabel = mapLabels[i]; + + mapLabel.UpdatePosition(mapInterface.VesselPosition(mapLabel.ID)); + } + } + + public void setMap(ISCAN_MainMap map) + { + if (map == null) + return; + + mapInterface = map; + + if (m_Version != null) + m_Version.OnTextUpdate.Invoke(map.Version); + + if (m_ColorToggle != null) + m_ColorToggle.isOn = map.Color; + + if (m_TerminatorToggle != null) + m_TerminatorToggle.isOn = map.TerminatorToggle; + + if (m_TypeToggle != null) + m_TypeToggle.isOn = map.MapType; + + if (m_MinimizeToggle != null) + m_MinimizeToggle.isOn = map.Minimized; + + if (m_M700Text != null && !map.ResourcesOn) + m_M700Text.gameObject.SetActive(false); + + if (m_OreText != null && !map.ResourcesOn) + m_OreText.gameObject.SetActive(false); + + CreateVessels(map.VesselInfoList); + + SetScale(map.Scale); + + SetPosition(map.Position); + + if (!map.MapType) + SetGeneratingText(map.MapGenerating); + + ProcessTooltips(); + + if (m_VesselTransform != null) + m_VesselTransform.gameObject.SetActive(!map.Minimized); + + FadeIn(); + + loaded = true; + } + + public void FadeIn() + { + Fade(1, true); + } + + public void FadeOut() + { + Fade(0, false, Kill, false); + } + + private void Kill() + { + gameObject.SetActive(false); + Destroy(gameObject); + } + + public void Close() + { + if (mapInterface != null) + mapInterface.IsVisible = false; + } + + private void SetGeneratingText(bool isOn) + { + if (m_GeneratingText == null) + return; + + generating = isOn; + + if (isOn && !m_GeneratingText.activeSelf) + m_GeneratingText.SetActive(true); + else if (!isOn && m_GeneratingText.activeSelf) + m_GeneratingText.SetActive(false); + } + + public void ProcessTooltips() + { + if (mapInterface == null) + return; + + TooltipHandler[] handlers = gameObject.GetComponentsInChildren(true); + + if (handlers == null) + return; + + for (int j = 0; j < handlers.Length; j++) + ProcessTooltip(handlers[j], mapInterface.TooltipsOn, mapInterface.TooltipCanvas, mapInterface.Scale); + } + + private void ProcessTooltip(TooltipHandler handler, bool isOn, Canvas c, float scale) + { + if (handler == null) + return; + + handler.IsActive = isOn && !handler.HelpTip; + handler._Canvas = c; + handler.Scale = scale; + } + + public void SetScale(float scale) + { + rect.localScale = Vector3.one * scale; + } + + public void SetPosition(Vector2 pos) + { + if (rect == null) + return; + + rect.anchoredPosition = new Vector3(pos.x, pos.y, 0); + } + + public void RefreshVesselTypes() + { + if (mapInterface == null) + return; + + for (int i = mapLabels.Count - 1; i >= 0; i--) + { + SCAN_MapLabel mapLabel = mapLabels[i]; + + mapLabel.UpdateImage(mapInterface.VesselType(mapLabel.ID)); + } + } + + public void RefreshVessels() + { + for (int i = vessels.Count - 1; i >= 0; i--) + { + SCAN_VesselInfo v = vessels[i]; + + v.gameObject.SetActive(false); + Destroy(v.gameObject); + } + + for (int i = mapLabels.Count - 1; i >= 0; i--) + { + SCAN_MapLabel m = mapLabels[i]; + + m.gameObject.SetActive(false); + Destroy(m.gameObject); + } + + vessels.Clear(); + mapLabels.Clear(); + + if (mapInterface != null) + CreateVessels(mapInterface.VesselInfoList); + } + + private void CreateVessels(Dictionary vessels) + { + if (vessels == null) + return; + + if (mapInterface == null || m_VesselPrefab == null || m_MapPrefab == null || m_VesselTransform == null || m_MainMap == null) + return; + + for (int i = 0; i < vessels.Count; i++) + { + Guid id = vessels.ElementAt(i).Key; + + MapLabelInfo label; + + if (!vessels.TryGetValue(id, out label)) + continue; + + CreateVessel(id, label); + + CreateMapLabel(id, label); + } + } + + private void CreateVessel(Guid id, MapLabelInfo info) + { + SCAN_VesselInfo vInfo = Instantiate(m_VesselPrefab).GetComponent(); + + if (vInfo == null) + return; + + vInfo.transform.SetParent(m_VesselTransform, false); + + vInfo.SetVessel(id, info, mapInterface); + + vessels.Add(vInfo); + } + + private void CreateMapLabel(Guid id, MapLabelInfo info) + { + SCAN_MapLabel mapLabel = Instantiate(m_MapPrefab).GetComponent(); + + if (mapLabel == null) + return; + + mapLabel.transform.SetParent(m_MainMap.transform, false); + + mapLabel.Setup(id, info); + + mapLabels.Add(mapLabel); + } + + public void OnPointerDown(PointerEventData eventData) + { + transform.SetAsLastSibling(); + } + + public void OnBeginDrag(PointerEventData eventData) + { + if (rect == null) + return; + + mouseStart = eventData.position; + windowStart = rect.position; + } + + public void OnDrag(PointerEventData eventData) + { + if (rect == null) + return; + + rect.position = windowStart + (Vector3)(eventData.position - mouseStart); + + if (mapInterface == null) + return; + + mapInterface.ClampToScreen(rect); + } + + public void OnEndDrag(PointerEventData eventData) + { + if (rect == null || mapInterface == null) + return; + + mapInterface.Position = new Vector2(rect.anchoredPosition.x, rect.anchoredPosition.y); + } + + public void UpdateLoColor(Color c) + { + if (m_LoText == null) + return; + + m_LoText.OnColorUpdate.Invoke(c); + } + + public void UpdateHiColor(Color c) + { + if (m_HiText == null) + return; + + m_HiText.OnColorUpdate.Invoke(c); + } + + public void UpdateMultiColor(Color c) + { + if (m_MultiText == null) + return; + + m_MultiText.OnColorUpdate.Invoke(c); + } + + public void UpdateM700Color(Color c) + { + if (m_M700Text == null) + return; + + m_M700Text.OnColorUpdate.Invoke(c); + } + + public void UpdateOreColor(Color c) + { + if (m_OreText == null) + return; + + m_OreText.OnColorUpdate.Invoke(c); + } + + public void UpdatePercentage(string text) + { + if (m_PercentageText == null) + return; + + m_PercentageText.OnTextUpdate.Invoke(text); + } + + public void UpdateMapTexture(Texture2D map) + { + if (m_MainMap == null) + return; + + m_MainMap.texture = map; + } + + public void ToggleColor(bool isOn) + { + if (!loaded || mapInterface == null) + return; + + mapInterface.Color = isOn; + } + + public void ToggleTerminator(bool isOn) + { + if (!loaded || mapInterface == null) + return; + + mapInterface.TerminatorToggle = isOn; + } + + public void ToggleType(bool isOn) + { + if (m_TypeLabel != null) + m_TypeLabel.OnTextUpdate.Invoke(isOn ? "Biome" : "Terrain"); + + if (!loaded || mapInterface == null) + return; + + mapInterface.MapType = isOn; + } + + public void ToggleSize(bool isOn) + { + if (m_MinimizeText != null) + m_MinimizeText.OnTextUpdate.Invoke(isOn ? "+" : "-"); + + if (!loaded || mapInterface == null) + return; + + mapInterface.Minimized = isOn; + + if (m_VesselTransform != null) + m_VesselTransform.gameObject.SetActive(!isOn); + } + + public void OpenBigMap() + { + if (mapInterface == null) + return; + + mapInterface.OpenBigMap(); + } + + public void OpenInstruments() + { + if (mapInterface == null) + return; + + mapInterface.OpenInstruments(); + } + + public void OpenSettings() + { + if (mapInterface == null) + return; + + mapInterface.OpenSettings(); + } + + public void OpenZoomMap() + { + if (mapInterface == null) + return; + + mapInterface.OpenZoomMap(); + } + + public void OpenOverlay() + { + if (mapInterface == null) + return; + + mapInterface.OpenOverlay(); + } + } +} diff --git a/SCANsat.Unity/Unity/SCAN_MapLabel.cs b/SCANsat.Unity/Unity/SCAN_MapLabel.cs new file mode 100644 index 000000000..a3d6e06bf --- /dev/null +++ b/SCANsat.Unity/Unity/SCAN_MapLabel.cs @@ -0,0 +1,186 @@ +#region license +/* + * [Scientific Committee on Advanced Navigation] + * S.C.A.N. Satellite + * + * SCAN_MapLabel - Script for controlling map icon labels + * + * Copyright (c)2014 David Grandy ; + * Copyright (c)2014 technogeeky ; + * Copyright (c)2014 (Your Name Here) ; see LICENSE.txt for licensing details. + */ +#endregion + +using System; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.UI; + +namespace SCANsat.Unity.Unity +{ + public class SCAN_MapLabel : MonoBehaviour + { + [SerializeField] + private Image m_Image = null; + [SerializeField] + private TextHandler m_Label = null; + [SerializeField] + private LayoutElement m_Layout = null; + + private Guid _guid; + private int _intID; + private string _stringID; + private RectTransform rect; + private MapLabelInfo label; + + private int updateInterval = 60; + private int lastUpdate; + private bool flip; + + public Guid ID + { + get { return _guid; } + } + + public int IntID + { + get { return _intID; } + } + + public string StringID + { + get { return _stringID; } + } + + public MapLabelInfo Info + { + get { return label; } + } + + private void Awake() + { + rect = GetComponent(); + } + + private void Update() + { + if (!label.flash || m_Image == null || m_Label == null) + return; + + lastUpdate++; + + if (lastUpdate < updateInterval) + return; + + lastUpdate = 0; + flip = !flip; + + if (flip) + { + m_Image.color = label.flashColor; + m_Label.OnColorUpdate.Invoke(label.flashColor); + } + else + { + m_Image.color = label.baseColor; + m_Label.OnColorUpdate.Invoke(label.baseColor); + } + } + + public void Setup(Guid id, MapLabelInfo info) + { + _guid = id; + + Setup(info); + } + + public void Setup(int id, MapLabelInfo info) + { + _intID = id; + + Setup(info); + } + + public void Setup(string id, MapLabelInfo info) + { + _stringID = id; + + Setup(info); + } + + public void Setup(MapLabelInfo info) + { + label = info; + + if (m_Image != null) + m_Image.color = info.baseColor; + + if (m_Label != null) + m_Label.OnColorUpdate.Invoke(info.baseColor); + + if (rect != null) + rect.anchoredPosition = new Vector2(rect.anchoredPosition.x - (info.width / 2), rect.anchoredPosition.y + info.alignBottom); + + UpdateLabel(info.label); + + UpdateImage(info.image); + + UpdatePosition(info.pos); + + UpdateActive(info.show); + + UpdateSize(info.width); + } + + public void UpdateLabel(string l) + { + if (m_Label != null) + m_Label.OnTextUpdate.Invoke(l); + } + + public void UpdateImage(Sprite s) + { + if (m_Image != null) + m_Image.sprite = s; + } + + public void UpdateSize(int i) + { + if (m_Layout != null) + { + m_Layout.preferredHeight = i; + m_Layout.preferredWidth = i; + } + } + + public void UpdateActive(bool show) + { + if (gameObject.activeSelf && !show) + { + gameObject.SetActive(false); + return; + } + else if (!gameObject.activeSelf && show) + gameObject.SetActive(true); + } + + public void UpdatePosition(Vector2 p) + { + if (rect != null) + rect.anchoredPosition = new Vector2(p.x - (label.width / 2), p.y + label.alignBottom); + } + + public void UpdatePositionActivation(MapLabelInfo info) + { + UpdateActive(info.show); + + if (!info.show) + return; + + UpdatePosition(info.pos); + + if (label.label != info.label) + UpdateLabel(info.label); + } + } +} diff --git a/SCANsat.Unity/Unity/SCAN_Overlay.cs b/SCANsat.Unity/Unity/SCAN_Overlay.cs new file mode 100644 index 000000000..c30794d12 --- /dev/null +++ b/SCANsat.Unity/Unity/SCAN_Overlay.cs @@ -0,0 +1,447 @@ +#region license +/* + * [Scientific Committee on Advanced Navigation] + * S.C.A.N. Satellite + * + * SCAN_Overlay - Script for controlling the planetary overlay UI + * + * Copyright (c)2014 David Grandy ; + * Copyright (c)2014 technogeeky ; + * Copyright (c)2014 (Your Name Here) ; see LICENSE.txt for licensing details. + */ +#endregion + +using System; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.UI; +using UnityEngine.EventSystems; +using SCANsat.Unity.Interfaces; + +namespace SCANsat.Unity.Unity +{ + public class SCAN_Overlay : CanvasFader, IDragHandler, IBeginDragHandler, IEndDragHandler, IPointerDownHandler + { + [SerializeField] + private TextHandler m_Version = null; + [SerializeField] + private TextHandler m_BiomeText = null; + [SerializeField] + private TextHandler m_TerrainText = null; + [SerializeField] + private SCAN_Toggle m_OverlayToggle = null; + [SerializeField] + private GameObject m_RefreshButton = null; + [SerializeField] + private GameObject m_ResourcePrefab = null; + [SerializeField] + private Transform m_ResourceTransform = null; + [SerializeField] + private Color m_ActiveColor = Color.white; + [SerializeField] + private Color m_NormalColor = Color.white; + [SerializeField] + private GameObject m_TooltipPrefab = null; + + private ISCAN_Overlay overInterface; + private bool loaded; + private RectTransform rect; + private Vector2 mouseStart; + private Vector3 windowStart; + + private bool tooltipOn; + private SCAN_Tooltip _tooltip; + + private List resources = new List(); + + public Color ActiveColor + { + get { return m_ActiveColor; } + } + + public Color NormalColor + { + get { return m_NormalColor; } + } + + public ISCAN_Overlay OverlayInterface + { + get { return overInterface; } + } + + protected override void Awake() + { + base.Awake(); + + rect = GetComponent(); + + Alpha(0); + } + + private void Update() + { + if (overInterface == null || !overInterface.IsVisible) + return; + + overInterface.Update(); + + if (overInterface.OverlayTooltip) + { + if (!tooltipOn) + { + if (_tooltip != null) + CloseTooltip(); + + tooltipOn = true; + OpenTooltip(); + } + else if (_tooltip != null) + _tooltip.UpdateText(overInterface.TooltipText); + + } + else if (tooltipOn) + { + tooltipOn = false; + CloseTooltip(); + } + } + + private void OpenTooltip() + { + if (m_TooltipPrefab == null || overInterface.TooltipCanvas == null) + return; + + _tooltip = Instantiate(m_TooltipPrefab).GetComponent(); + + if (_tooltip == null) + return; + + _tooltip.transform.SetParent(overInterface.TooltipCanvas.transform, false); + _tooltip.transform.SetAsLastSibling(); + + _tooltip.Setup(overInterface.TooltipCanvas, "0°0'0\"N 0°0'0\"W", overInterface.Scale); + } + + private void CloseTooltip() + { + if (_tooltip == null) + return; + + _tooltip.gameObject.SetActive(false); + Destroy(_tooltip.gameObject); + _tooltip = null; + } + + public void SetOverlay(ISCAN_Overlay over) + { + if (over == null) + return; + + overInterface = over; + + if (m_Version != null) + m_Version.OnTextUpdate.Invoke(over.Version); + + if (m_OverlayToggle != null) + m_OverlayToggle.isOn = over.DrawOverlay; + + if (over.DrawBiome) + { + if (m_BiomeText != null) + { + m_BiomeText.OnColorUpdate.Invoke(m_ActiveColor); + m_BiomeText.SetNormalColor(m_ActiveColor); + } + } + else if (over.DrawTerrain) + { + if (m_TerrainText != null) + { + m_TerrainText.OnColorUpdate.Invoke(m_ActiveColor); + m_TerrainText.SetNormalColor(m_ActiveColor); + } + } + + if (m_RefreshButton != null) + m_RefreshButton.SetActive(over.DrawOverlay); + + CreateResources(over.Resources); + + SetScale(over.Scale); + + SetPosition(over.Position); + + ProcessTooltips(); + + FadeIn(); + + loaded = true; + } + + public void FadeIn() + { + Fade(1, true); + } + + public void FadeOut() + { + Fade(0, false, Kill, false); + } + + private void Kill() + { + gameObject.SetActive(false); + Destroy(gameObject); + } + + public void Close() + { + if (overInterface != null) + overInterface.IsVisible = false; + } + + public void ProcessTooltips() + { + if (overInterface == null) + return; + + TooltipHandler[] handlers = gameObject.GetComponentsInChildren(true); + + if (handlers == null) + return; + + for (int j = 0; j < handlers.Length; j++) + ProcessTooltip(handlers[j], overInterface.WindowTooltips, overInterface.TooltipCanvas, overInterface.Scale); + } + + private void ProcessTooltip(TooltipHandler handler, bool isOn, Canvas c, float scale) + { + if (handler == null) + return; + + handler.IsActive = isOn && !handler.HelpTip; + handler._Canvas = c; + handler.Scale = scale; + } + + public void SetScale(float scale) + { + rect.localScale = Vector3.one * scale; + } + + public void SetPosition(Vector2 pos) + { + if (rect == null) + return; + + rect.anchoredPosition = new Vector3(pos.x, pos.y, 0); + } + + public void OnPointerDown(PointerEventData eventData) + { + transform.SetAsLastSibling(); + } + + public void OnBeginDrag(PointerEventData eventData) + { + if (rect == null) + return; + + mouseStart = eventData.position; + windowStart = rect.position; + } + + public void OnDrag(PointerEventData eventData) + { + if (rect == null) + return; + + rect.position = windowStart + (Vector3)(eventData.position - mouseStart); + + if (overInterface == null) + return; + + overInterface.ClampToScreen(rect); + } + + public void OnEndDrag(PointerEventData eventData) + { + if (rect == null || overInterface == null) + return; + + overInterface.Position = new Vector2(rect.anchoredPosition.x, rect.anchoredPosition.y); + } + + private void CreateResources(IList resources) + { + if (resources == null) + return; + + if (m_ResourcePrefab == null || m_ResourceTransform == null) + return; + + for (int i = 0; i < resources.Count; i++) + { + string s = resources[i]; + + CreateResource(s); + } + } + + private void CreateResource(string resource) + { + SCAN_ResourceOverlay res = Instantiate(m_ResourcePrefab).GetComponent(); + + if (res == null) + return; + + res.transform.SetParent(m_ResourceTransform, false); + + res.SetResource(resource, this, overInterface.CurrentResource == resource); + + resources.Add(res); + } + + public void SetResource(string resource, bool isOn) + { + if (overInterface == null) + return; + + overInterface.SetResource(resource, isOn); + + if (isOn) + { + if (m_RefreshButton != null) + m_RefreshButton.SetActive(true); + + loaded = false; + + if (m_OverlayToggle != null) + m_OverlayToggle.isOn = true; + + loaded = true; + } + else + { + if (overInterface.DrawResource && overInterface.CurrentResource == resource) + { + if (m_RefreshButton != null) + m_RefreshButton.SetActive(false); + + loaded = false; + + if (m_OverlayToggle != null) + m_OverlayToggle.isOn = false; + + loaded = true; + } + } + + InactivateOthers(); + } + + public void DrawBiome() + { + if (!loaded || overInterface == null) + return; + + overInterface.DrawBiome = overInterface.DrawBiome ? !overInterface.DrawOverlay : true; + + if (m_BiomeText != null) + m_BiomeText.SetNormalColor(m_ActiveColor); + + if (m_RefreshButton != null) + m_RefreshButton.SetActive(overInterface.DrawOverlay); + + if (m_OverlayToggle != null) + { + loaded = false; + m_OverlayToggle.isOn = overInterface.DrawOverlay; + loaded = true; + } + + InactivateOthers(); + } + + public void DrawTerrain() + { + if (!loaded || overInterface == null) + return; + + overInterface.DrawTerrain = overInterface.DrawTerrain ? !overInterface.DrawOverlay : true; + + if (m_TerrainText != null) + m_TerrainText.SetNormalColor(m_ActiveColor); + + if (m_RefreshButton != null) + m_RefreshButton.SetActive(overInterface.DrawOverlay); + + if (m_OverlayToggle != null) + { + loaded = false; + m_OverlayToggle.isOn = overInterface.DrawOverlay; + loaded = true; + } + + InactivateOthers(); + } + + private void InactivateOthers() + { + if (overInterface == null) + return; + + if (m_BiomeText != null && !overInterface.DrawBiome) + { + m_BiomeText.OnColorUpdate.Invoke(m_NormalColor); + m_BiomeText.SetNormalColor(m_NormalColor); + } + + if (m_TerrainText != null && !overInterface.DrawTerrain) + { + m_TerrainText.OnColorUpdate.Invoke(m_NormalColor); + m_TerrainText.SetNormalColor(m_NormalColor); + } + + for (int i = resources.Count - 1; i >= 0; i--) + { + SCAN_ResourceOverlay resource = resources[i]; + + if (resource == null) + continue; + + if (!overInterface.DrawResource) + resource.Inactivate(); + else if (resource.Resource != overInterface.CurrentResource) + resource.Inactivate(); + } + } + + public void DrawOverlay(bool isOn) + { + if (!loaded || overInterface == null) + return; + + overInterface.DrawOverlay = isOn; + + if (m_RefreshButton != null) + m_RefreshButton.SetActive(isOn); + } + + public void Refresh() + { + if (overInterface == null) + return; + + overInterface.Refresh(); + } + + public void Settings() + { + if (overInterface == null) + return; + + overInterface.OpenSettings(); + } + } +} diff --git a/SCANsat.Unity/Unity/SCAN_PaletteButton.cs b/SCANsat.Unity/Unity/SCAN_PaletteButton.cs new file mode 100644 index 000000000..f50ea39d3 --- /dev/null +++ b/SCANsat.Unity/Unity/SCAN_PaletteButton.cs @@ -0,0 +1,46 @@ +#region license +/* + * [Scientific Committee on Advanced Navigation] + * S.C.A.N. Satellite + * + * SCAN_PaletteButton - Script for controlling the color palette button elements + * + * Copyright (c)2014 David Grandy ; + * Copyright (c)2014 technogeeky ; + * Copyright (c)2014 (Your Name Here) ; see LICENSE.txt for licensing details. + */ +#endregion + +using System; +using UnityEngine; +using UnityEngine.UI; + +namespace SCANsat.Unity.Unity +{ + public class SCAN_PaletteButton : MonoBehaviour + { + [SerializeField] + private RawImage m_Palette = null; + + private string paletteName; + private SCAN_ColorAltimetry color; + + public void setup(Texture2D tex, string palette, SCAN_ColorAltimetry c) + { + if (m_Palette == null || c == null) + return; + + m_Palette.texture = tex; + paletteName = palette; + color = c; + } + + public void Select() + { + if (color == null) + return; + + color.SetPalette(paletteName); + } + } +} diff --git a/SCANsat.Unity/Unity/SCAN_Popup.cs b/SCANsat.Unity/Unity/SCAN_Popup.cs new file mode 100644 index 000000000..0c30b9d6b --- /dev/null +++ b/SCANsat.Unity/Unity/SCAN_Popup.cs @@ -0,0 +1,71 @@ +#region license +/* + * [Scientific Committee on Advanced Navigation] + * S.C.A.N. Satellite + * + * SCAN_Popup - Script for controlling the warning popup windows + * + * Copyright (c)2014 David Grandy ; + * Copyright (c)2014 technogeeky ; + * Copyright (c)2014 (Your Name Here) ; see LICENSE.txt for licensing details. + */ +#endregion + +using System; +using UnityEngine; +using UnityEngine.UI; +using UnityEngine.Events; + +namespace SCANsat.Unity.Unity +{ + public class SCAN_Popup : CanvasFader + { + public class OnSelectEvent : UnityEvent { } + + [SerializeField] + private TextHandler m_WarningText = null; + + private OnSelectEvent _onSelectUpdate = new OnSelectEvent(); + + public OnSelectEvent OnSelectUpdate + { + get { return _onSelectUpdate; } + } + + protected override void Awake() + { + base.Awake(); + + Alpha(0); + } + + public void Setup(string text) + { + if (m_WarningText != null) + m_WarningText.OnTextUpdate.Invoke(text); + + FadeIn(); + } + + private void FadeIn() + { + Fade(1, true); + } + + public void FadeOut(bool fast = false) + { + Fade(0, fast, Close, false); + } + + private void Close() + { + gameObject.SetActive(false); + DestroyImmediate(gameObject); + } + + public void Confirm() + { + _onSelectUpdate.Invoke(); + } + } +} diff --git a/SCANsat.Unity/Unity/SCAN_ResourceOverlay.cs b/SCANsat.Unity/Unity/SCAN_ResourceOverlay.cs new file mode 100644 index 000000000..2115c4891 --- /dev/null +++ b/SCANsat.Unity/Unity/SCAN_ResourceOverlay.cs @@ -0,0 +1,77 @@ +#region license +/* + * [Scientific Committee on Advanced Navigation] + * S.C.A.N. Satellite + * + * SCAN_ResourceOverlay - Script for controlling each resource toggle for the planetary overlay window + * + * Copyright (c)2014 David Grandy ; + * Copyright (c)2014 technogeeky ; + * Copyright (c)2014 (Your Name Here) ; see LICENSE.txt for licensing details. + */ +#endregion + +using System; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.UI; + +namespace SCANsat.Unity.Unity +{ + public class SCAN_ResourceOverlay : MonoBehaviour + { + [SerializeField] + private TextHandler m_ResourceName = null; + + private SCAN_Overlay parent; + private string resource; + private bool active; + + public string Resource + { + get { return resource; } + } + + public void SetResource(string name, SCAN_Overlay p, bool isOn) + { + if (p == null) + return; + + parent = p; + resource = name; + + if (m_ResourceName != null) + m_ResourceName.OnTextUpdate.Invoke(name); + + if (isOn && p.OverlayInterface.DrawResource) + { + m_ResourceName.OnColorUpdate.Invoke(p.ActiveColor); + m_ResourceName.SetNormalColor(p.ActiveColor); + } + } + + public void DrawResource() + { + if (parent == null) + return; + + active = !active; + + parent.SetResource(resource, active); + + if (m_ResourceName != null) + m_ResourceName.SetNormalColor(parent.ActiveColor); + } + + public void Inactivate() + { + active = false; + + if (m_ResourceName != null) + { + m_ResourceName.OnColorUpdate.Invoke(parent.NormalColor); + m_ResourceName.SetNormalColor(parent.NormalColor); + } + } + } +} diff --git a/SCANsat.Unity/Unity/SCAN_Settings.cs b/SCANsat.Unity/Unity/SCAN_Settings.cs new file mode 100644 index 000000000..e4d70d044 --- /dev/null +++ b/SCANsat.Unity/Unity/SCAN_Settings.cs @@ -0,0 +1,474 @@ +#region license +/* + * [Scientific Committee on Advanced Navigation] + * S.C.A.N. Satellite + * + * SCAN_Settings - Script for controlling the settings UI + * + * Copyright (c)2014 David Grandy ; + * Copyright (c)2014 technogeeky ; + * Copyright (c)2014 (Your Name Here) ; see LICENSE.txt for licensing details. + */ +#endregion + +using System; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.UI; +using UnityEngine.EventSystems; +using SCANsat.Unity.Interfaces; + +namespace SCANsat.Unity.Unity +{ + public class SCAN_Settings : CanvasFader, IDragHandler, IBeginDragHandler, IEndDragHandler, IPointerDownHandler + { + [SerializeField] + private TextHandler m_Version = null; + [SerializeField] + private Transform m_ContentTransform = null; + [SerializeField] + private Toggle m_GeneralToggle = null; + [SerializeField] + private Toggle m_BackgroundToggle = null; + [SerializeField] + private Toggle m_ResourceToggle = null; + [SerializeField] + private Toggle m_DataToggle = null; + [SerializeField] + private Toggle m_ColorToggle = null; + [SerializeField] + private Toggle m_HelpTips = null; + [SerializeField] + private GameObject m_GeneralPrefab = null; + [SerializeField] + private GameObject m_BackgroundPrefab = null; + [SerializeField] + private GameObject m_ResourcePrefab = null; + [SerializeField] + private GameObject m_DataPrefab = null; + [SerializeField] + private GameObject m_ColorPrefab = null; + [SerializeField] + private GameObject m_PopupPrefab = null; + [SerializeField] + private GameObject m_DropDownPrefab = null; + + private ISCAN_Settings settingsInterface; + private RectTransform rect; + private Vector2 mouseStart; + private Vector3 windowStart; + private int _page; + + private SettingsPage CurrentPage; + private SCAN_Popup warningPopup; + private SCAN_DropDown dropDown; + + private static SCAN_Settings instance; + + public static SCAN_Settings Instance + { + get { return instance; } + } + + public int Page + { + get { return _page; } + } + + public GameObject PopupPrefab + { + get { return m_PopupPrefab; } + } + + public GameObject DropDownPrefab + { + get { return m_DropDownPrefab; } + } + + public SCAN_Popup WarningPopup + { + get { return warningPopup; } + set { warningPopup = value; } + } + + public SCAN_DropDown DropDown + { + get { return dropDown; } + set { dropDown = value; } + } + + public void ClearWarningsAndDropDown() + { + if (dropDown != null) + { + dropDown.gameObject.SetActive(false); + DestroyImmediate(dropDown.gameObject); + dropDown = null; + } + + if (warningPopup != null) + { + warningPopup.gameObject.SetActive(false); + DestroyImmediate(warningPopup.gameObject); + warningPopup = null; + } + } + + protected override void Awake() + { + base.Awake(); + + instance = this; + + rect = GetComponent(); + + Alpha(0); + } + + private void Update() + { + if (settingsInterface == null || !settingsInterface.IsVisible) + return; + + settingsInterface.Update(); + } + + public void setSettings(ISCAN_Settings settings, int page) + { + if (settings == null) + return; + + settingsInterface = settings; + + if (m_Version != null) + m_Version.OnTextUpdate.Invoke(settings.Version); + + _page = page; + + switch (page) + { + case 0: + if (m_GeneralToggle != null) + m_GeneralToggle.isOn = true; + break; + case 1: + if (m_BackgroundToggle != null) + m_BackgroundToggle.isOn = true; + break; + case 2: + if (m_ResourceToggle != null) + m_ResourceToggle.isOn = true; + break; + case 3: + if (m_DataToggle != null) + m_DataToggle.isOn = true; + break; + case 4: + if (m_ColorToggle != null) + m_ColorToggle.isOn = true; + break; + default: + if (m_GeneralToggle != null) + m_GeneralToggle.isOn = true; + break; + } + + SetScale(settings.UIScale); + + FadeIn(); + } + + public void FadeIn() + { + Fade(1, true); + } + + public void FadeOut() + { + Fade(0, false, Kill, false); + } + + private void Kill() + { + gameObject.SetActive(false); + Destroy(gameObject); + } + + public void Close() + { + if (settingsInterface != null) + settingsInterface.IsVisible = false; + } + + public void ProcessTooltips() + { + if (settingsInterface == null) + return; + + TooltipHandler[] handlers = gameObject.GetComponentsInChildren(true); + + if (handlers == null) + return; + + for (int j = 0; j < handlers.Length; j++) + ProcessTooltip(handlers[j], settingsInterface.WindowTooltips, settingsInterface.TooltipCanvas, settingsInterface.UIScale); + + if (m_HelpTips != null) + ProcessHelpTooltips(m_HelpTips.isOn); + } + + private void ProcessTooltip(TooltipHandler handler, bool isOn, Canvas c, float scale) + { + if (handler == null) + return; + + handler.IsActive = isOn && !handler.HelpTip; + handler._Canvas = c; + handler.Scale = scale; + } + + public void SetScale(float scale) + { + rect.localScale = Vector3.one * scale; + } + + public void SetPosition(Vector2 pos) + { + if (rect == null) + return; + + rect.anchoredPosition = new Vector3(pos.x, pos.y, 0); + } + + public void OnPointerDown(PointerEventData eventData) + { + transform.SetAsLastSibling(); + + ((SettingsPage)CurrentPage).OnPointerDown(eventData); + } + + public void OnBeginDrag(PointerEventData eventData) + { + if (rect == null) + return; + + mouseStart = eventData.position; + windowStart = rect.position; + } + + public void OnDrag(PointerEventData eventData) + { + if (rect == null) + return; + + rect.position = windowStart + (Vector3)(eventData.position - mouseStart); + + if (settingsInterface == null) + return; + + settingsInterface.ClampToScreen(rect); + } + + public void OnEndDrag(PointerEventData eventData) + { + if (rect == null || settingsInterface == null) + return; + + settingsInterface.Position = new Vector2(rect.anchoredPosition.x, rect.anchoredPosition.y); + } + + public void HelpTips(bool isOn) + { + ProcessHelpTooltips(isOn); + } + + public void ProcessHelpTooltips(bool isOn) + { + if (settingsInterface == null) + return; + + TooltipHandler[] handlers = gameObject.GetComponentsInChildren(true); + + if (handlers == null) + return; + + for (int j = 0; j < handlers.Length; j++) + ProcessHelpTooltip(handlers[j], isOn, settingsInterface.TooltipCanvas); + } + + private void ProcessHelpTooltip(TooltipHandler handler, bool isOn, Canvas c) + { + if (handler == null) + return; + + handler.IsActive = isOn && handler.HelpTip; + handler._Canvas = c; + } + + public void GeneralSettings(bool isOn) + { + if (!isOn) + return; + + if (CurrentPage != null) + { + CurrentPage.gameObject.SetActive(false); + DestroyImmediate(CurrentPage.gameObject); + } + + if (m_GeneralPrefab == null || m_ContentTransform == null || settingsInterface == null) + return; + + if (settingsInterface.LockInput) + settingsInterface.LockInput = false; + + CurrentPage = Instantiate(m_GeneralPrefab).GetComponent(); + + if (CurrentPage == null) + return; + + _page = 0; + + CurrentPage.transform.SetParent(m_ContentTransform, false); + + ((SCAN_SettingsGeneral)CurrentPage).setup(settingsInterface); + + ProcessTooltips(); + + ClearWarningsAndDropDown(); + } + + public void BackgroundSettings(bool isOn) + { + if (!isOn) + return; + + if (CurrentPage != null) + { + CurrentPage.gameObject.SetActive(false); + DestroyImmediate(CurrentPage.gameObject); + } + + if (m_BackgroundPrefab == null || m_ContentTransform == null || settingsInterface == null) + return; + + if (settingsInterface.LockInput) + settingsInterface.LockInput = false; + + CurrentPage = Instantiate(m_BackgroundPrefab).GetComponent(); + + if (CurrentPage == null) + return; + + _page = 1; + + CurrentPage.transform.SetParent(m_ContentTransform, false); + + ((SCAN_SettingsBackground)CurrentPage).setup(settingsInterface); + + ProcessTooltips(); + + ClearWarningsAndDropDown(); + } + + public void ResourceSettings(bool isOn) + { + if (!isOn) + return; + + if (CurrentPage != null) + { + CurrentPage.gameObject.SetActive(false); + DestroyImmediate(CurrentPage.gameObject); + } + + if (m_ResourcePrefab == null || m_ContentTransform == null || settingsInterface == null) + return; + + if (settingsInterface.LockInput) + settingsInterface.LockInput = false; + + CurrentPage = Instantiate(m_ResourcePrefab).GetComponent(); + + if (CurrentPage == null) + return; + + _page = 2; + + CurrentPage.transform.SetParent(m_ContentTransform, false); + + ((SCAN_SettingsResource)CurrentPage).setup(settingsInterface); + + ProcessTooltips(); + + ClearWarningsAndDropDown(); + } + + public void DataSettings(bool isOn) + { + if (!isOn) + return; + + if (CurrentPage != null) + { + CurrentPage.gameObject.SetActive(false); + DestroyImmediate(CurrentPage.gameObject); + } + + if (m_DataPrefab == null || m_ContentTransform == null || settingsInterface == null) + return; + + if (settingsInterface.LockInput) + settingsInterface.LockInput = false; + + CurrentPage = Instantiate(m_DataPrefab).GetComponent(); + + if (CurrentPage == null) + return; + + _page = 3; + + CurrentPage.transform.SetParent(m_ContentTransform, false); + + ((SCAN_SettingsData)CurrentPage).setup(settingsInterface); + + ProcessTooltips(); + + ClearWarningsAndDropDown(); + } + + public void ColorSettings(bool isOn) + { + if (!isOn) + return; + + if (CurrentPage != null) + { + CurrentPage.gameObject.SetActive(false); + DestroyImmediate(CurrentPage.gameObject); + } + + if (m_ColorPrefab == null || m_ContentTransform == null || settingsInterface == null) + return; + + if (settingsInterface.LockInput) + settingsInterface.LockInput = false; + + CurrentPage = Instantiate(m_ColorPrefab).GetComponent(); + + if (CurrentPage == null) + return; + + _page = 4; + + CurrentPage.transform.SetParent(m_ContentTransform, false); + + ((SCAN_ColorControl)CurrentPage).setup(settingsInterface, settingsInterface.ColorInterface); + + ProcessTooltips(); + + ClearWarningsAndDropDown(); + } + + } +} diff --git a/SCANsat.Unity/Unity/SCAN_SettingsBackground.cs b/SCANsat.Unity/Unity/SCAN_SettingsBackground.cs new file mode 100644 index 000000000..b7e17f011 --- /dev/null +++ b/SCANsat.Unity/Unity/SCAN_SettingsBackground.cs @@ -0,0 +1,129 @@ +#region license +/* + * [Scientific Committee on Advanced Navigation] + * S.C.A.N. Satellite + * + * SCAN_SettingsBackground - Script for controlling the background settings page + * + * Copyright (c)2014 David Grandy ; + * Copyright (c)2014 technogeeky ; + * Copyright (c)2014 (Your Name Here) ; see LICENSE.txt for licensing details. + */ +#endregion + +using System; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.UI; +using UnityEngine.EventSystems; +using SCANsat.Unity.Interfaces; + +namespace SCANsat.Unity.Unity +{ + public class SCAN_SettingsBackground : SettingsPage + { + [SerializeField] + private GameObject m_BodyInfoPrefab = null; + [SerializeField] + private Transform m_BodyInfoTransform = null; + [SerializeField] + private SCAN_Toggle m_ScanActiveToggle = null; + [SerializeField] + private Slider m_TimeWarpResolution = null; + [SerializeField] + private TextHandler m_SensorInfo = null; + + private bool loaded; + private ISCAN_Settings settings; + private List backgroundBodies = new List(); + + private void Update() + { + if (settings == null || !settings.IsVisible) + return; + + for (int i = backgroundBodies.Count - 1; i >= 0; i--) + { + SCAN_BackgroundElement background = backgroundBodies[i]; + + background.UpdateText(settings.BodyPercentage(background.BodyName)); + } + + if (m_SensorInfo != null) + m_SensorInfo.OnTextUpdate.Invoke(settings.SensorCount); + } + + public void setup(ISCAN_Settings set) + { + if (set == null) + return; + + settings = set; + + if (m_ScanActiveToggle != null) + m_ScanActiveToggle.isOn = set.BackgroundScanning; + + if (m_TimeWarpResolution != null) + m_TimeWarpResolution.value = set.TimeWarp; + + CreateBodySections(set.BackgroundBodies); + + loaded = true; + } + + private void CreateBodySections(IList bodies) + { + if (bodies == null || settings == null || m_BodyInfoPrefab == null || m_BodyInfoTransform == null) + return; + + for (int i = 0; i < bodies.Count; i++) + { + string s = bodies[i]; + + if (string.IsNullOrEmpty(s)) + continue; + + CreateBodySection(s); + } + } + + private void CreateBodySection(string body) + { + SCAN_BackgroundElement background = Instantiate(m_BodyInfoPrefab).GetComponent(); + + if (background == null) + return; + + background.transform.SetParent(m_BodyInfoTransform, false); + + background.Setup(body, settings.ToggleBodyActive(body), settings); + + backgroundBodies.Add(background); + } + + public void ScanToggle(bool isOn) + { + if (!loaded || settings == null) + return; + + settings.BackgroundScanning = isOn; + } + + public void TimeWarpSlider(float value) + { + if (!loaded || settings == null) + return; + + settings.TimeWarp = (int)value; + } + + public void UpdateScanners(string s) + { + if (settings == null || m_SensorInfo == null) + return; + + m_SensorInfo.OnTextUpdate.Invoke(s); + } + + } +} diff --git a/SCANsat.Unity/Unity/SCAN_SettingsData.cs b/SCANsat.Unity/Unity/SCAN_SettingsData.cs new file mode 100644 index 000000000..2cc4b0a11 --- /dev/null +++ b/SCANsat.Unity/Unity/SCAN_SettingsData.cs @@ -0,0 +1,369 @@ +#region license +/* + * [Scientific Committee on Advanced Navigation] + * S.C.A.N. Satellite + * + * SCAN_SettingsData - Script for controlling the data management settings page + * + * Copyright (c)2014 David Grandy ; + * Copyright (c)2014 technogeeky ; + * Copyright (c)2014 (Your Name Here) ; see LICENSE.txt for licensing details. + */ +#endregion + +using System; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.UI; +using UnityEngine.Events; +using UnityEngine.EventSystems; +using SCANsat.Unity.Interfaces; + +namespace SCANsat.Unity.Unity +{ + public class SCAN_SettingsData : SettingsPage + { + [SerializeField] + private SCAN_Toggle m_GreyScaleToggle = null; + [SerializeField] + private SCAN_Toggle m_CSVExportToggle = null; + [SerializeField] + private TextHandler m_MapWidth = null; + [SerializeField] + private TextHandler m_ResetCurrentText = null; + [SerializeField] + private TextHandler m_ResetCurrentStockText = null; + [SerializeField] + private TextHandler m_FillCurrentText = null; + [SerializeField] + private TextHandler m_TypeText = null; + [SerializeField] + private InputHandler m_MapWidthInputHandler = null; + [SerializeField] + private GameObject m_ResetStockResource = null; + [SerializeField] + private GameObject m_MapFill = null; + [SerializeField] + private Transform m_MapTypeOption = null; + + private bool loaded; + private ISCAN_Settings settings; + + private void Update() + { + if (settings == null) + return; + + if (settings.LockInput) + { + if (m_MapWidthInputHandler != null && !m_MapWidthInputHandler.IsFocused) + settings.LockInput = false; + } + } + + public void setup(ISCAN_Settings set) + { + if (set == null) + return; + + settings = set; + + if (m_GreyScaleToggle != null) + m_GreyScaleToggle.isOn = set.GreyScale; + + if (m_CSVExportToggle != null) + m_CSVExportToggle.isOn = set.ExportCSV; + + if (m_MapWidth != null) + m_MapWidth.OnTextUpdate.Invoke("Map Width: " + set.MapWidth.ToString()); + + if (!set.ShowStockReset) + { + if (m_ResetStockResource != null) + m_ResetStockResource.SetActive(false); + } + + if (!set.ShowMapFill && m_MapFill != null) + m_MapFill.SetActive(false); + + SetButtonText(); + + loaded = true; + } + + public void SetButtonText() + { + if (settings == null) + return; + + if (m_ResetCurrentText != null) + m_ResetCurrentText.OnTextUpdate.Invoke("Reset Map of " + settings.CurrentBody); + + if (m_ResetCurrentStockText != null) + m_ResetCurrentStockText.OnTextUpdate.Invoke("Reset stock resource data for " + settings.CurrentBody); + + if (m_FillCurrentText != null) + m_FillCurrentText.OnTextUpdate.Invoke("Fill map of " + settings.CurrentBody); + + if (m_TypeText != null) + m_TypeText.OnTextUpdate.Invoke(settings.CurrentMapData); + } + + public void GreyScale(bool isOn) + { + if (!loaded || settings == null) + return; + + settings.GreyScale = isOn; + } + + public void ExportCSV(bool isOn) + { + if (!loaded || settings == null) + return; + + settings.ExportCSV = isOn; + } + + public void SetMapWidth() + { + if (settings == null || m_MapWidthInputHandler == null) + return; + + settings.LockInput = false; + + int width = settings.MapWidth; + + if (int.TryParse(m_MapWidthInputHandler.Text, out width)) + { + if (width % 2 != 0) + width += 1; + + if (width > 8192) + width = 8192; + else if (width < 560) + width = 560; + + m_MapWidthInputHandler.OnTextUpdate.Invoke(width.ToString()); + + settings.MapWidth = width; + + if (m_MapWidth != null) + m_MapWidth.OnTextUpdate.Invoke("Map Width: " + width.ToString()); + } + } + + public void OnInputClick(BaseEventData eventData) + { + if (!(eventData is PointerEventData) || settings == null) + return; + + if (((PointerEventData)eventData).button != PointerEventData.InputButton.Left) + return; + + settings.LockInput = true; + } + + public override void OnPointerDown(PointerEventData eventData) + { + if (SCAN_Settings.Instance == null) + return; + + if (SCAN_Settings.Instance.DropDown != null) + { + RectTransform r = SCAN_Settings.Instance.DropDown.GetComponent(); + + if (r != null) + { + if (!RectTransformUtility.RectangleContainsScreenPoint(r, eventData.position, eventData.pressEventCamera)) + { + SCAN_Settings.Instance.DropDown.FadeOut(); + SCAN_Settings.Instance.DropDown = null; + } + } + } + + if (SCAN_Settings.Instance.WarningPopup != null) + { + RectTransform r = SCAN_Settings.Instance.WarningPopup.GetComponent(); + + if (r != null) + { + if (!RectTransformUtility.RectangleContainsScreenPoint(r, eventData.position, eventData.pressEventCamera)) + { + SCAN_Settings.Instance.WarningPopup.FadeOut(); + SCAN_Settings.Instance.WarningPopup = null; + } + } + } + } + + private void PopupPopup(string message, UnityAction callback) + { + if (SCAN_Settings.Instance == null) + return; + + if (SCAN_Settings.Instance.WarningPopup != null) + { + SCAN_Settings.Instance.WarningPopup.FadeOut(true); + SCAN_Settings.Instance.WarningPopup = null; + } + + if (SCAN_Settings.Instance.PopupPrefab == null) + return; + + SCAN_Settings.Instance.WarningPopup = Instantiate(SCAN_Settings.Instance.PopupPrefab).GetComponent(); + + if (SCAN_Settings.Instance.WarningPopup == null) + return; + + SCAN_Settings.Instance.WarningPopup.transform.SetParent(transform, false); + + SCAN_Settings.Instance.WarningPopup.Setup(message); + + SCAN_Settings.Instance.WarningPopup.OnSelectUpdate.AddListener(callback); + } + + public void ResetCurrentMap() + { + if (settings != null) + PopupPopup(settings.DataResetCurrent, ConfirmResetCurrentMap); + } + + private void ConfirmResetCurrentMap() + { + SCAN_Settings.Instance.WarningPopup.FadeOut(true); + SCAN_Settings.Instance.WarningPopup = null; + + if (settings == null) + return; + + settings.ResetCurrent(); + } + + public void ResetAllMaps() + { + if (settings != null) + PopupPopup(settings.DataResetAll, ConfirmResetAllMaps); + } + + private void ConfirmResetAllMaps() + { + SCAN_Settings.Instance.WarningPopup.FadeOut(true); + SCAN_Settings.Instance.WarningPopup = null; + + if (settings == null) + return; + + settings.ResetAll(); + } + + public void ResetStockResourceCurrent() + { + if (settings != null) + PopupPopup(settings.StockResourceResetCurrent, ConfirmResetStockResourceCurrent); + } + + private void ConfirmResetStockResourceCurrent() + { + SCAN_Settings.Instance.WarningPopup.FadeOut(true); + SCAN_Settings.Instance.WarningPopup = null; + + if (settings == null) + return; + + settings.ResetStockResourceCurrent(); + } + + public void ResetStockResourceAll() + { + if (settings != null) + PopupPopup(settings.StockResourceResetAll, ConfirmResetStockResourceAll); + } + + private void ConfirmResetStockResourceAll() + { + SCAN_Settings.Instance.WarningPopup.FadeOut(true); + SCAN_Settings.Instance.WarningPopup = null; + + if (settings == null) + return; + + settings.ResetStockResourceAll(); + } + + public void MapTypeDropDown(bool isOn) + { + if (SCAN_Settings.Instance.DropDown != null) + { + SCAN_Settings.Instance.DropDown.FadeOut(true); + SCAN_Settings.Instance.DropDown = null; + } + + if (!isOn) + return; + + if (m_MapTypeOption == null || SCAN_Settings.Instance.DropDownPrefab == null || settings == null) + return; + + SCAN_Settings.Instance.DropDown = Instantiate(SCAN_Settings.Instance.DropDownPrefab).GetComponent(); + + if (SCAN_Settings.Instance.DropDown == null) + return; + + SCAN_Settings.Instance.DropDown.transform.SetParent(m_MapTypeOption, false); + + SCAN_Settings.Instance.DropDown.Setup(settings.MapDataTypes, settings.CurrentMapData, 12); + + SCAN_Settings.Instance.DropDown.OnSelectUpdate.AddListener(new UnityEngine.Events.UnityAction(MapTypeOption)); + } + + public void MapTypeOption(string scanType) + { + if (m_TypeText != null) + m_TypeText.OnTextUpdate.Invoke(scanType); + + SCAN_Settings.Instance.DropDown.FadeOut(true); + SCAN_Settings.Instance.DropDown = null; + + if (settings == null) + return; + + settings.CurrentMapData = scanType; + } + + public void FillCurrentMap() + { + if (settings != null) + PopupPopup(settings.WarningMapFillCurrent, ConfirmFillCurrentMap); + } + + public void ConfirmFillCurrentMap() + { + SCAN_Settings.Instance.WarningPopup.FadeOut(true); + SCAN_Settings.Instance.WarningPopup = null; + + if (settings == null) + return; + + settings.FillCurrent(); + } + + public void FillAllMaps() + { + if (settings != null) + PopupPopup(settings.WarningMapFillAll, ConfirmFillAllMaps); + } + + public void ConfirmFillAllMaps() + { + SCAN_Settings.Instance.WarningPopup.FadeOut(true); + SCAN_Settings.Instance.WarningPopup = null; + + if (settings == null) + return; + + settings.FillAll(); + } + } +} diff --git a/SCANsat.Unity/Unity/SCAN_SettingsGeneral.cs b/SCANsat.Unity/Unity/SCAN_SettingsGeneral.cs new file mode 100644 index 000000000..b508af736 --- /dev/null +++ b/SCANsat.Unity/Unity/SCAN_SettingsGeneral.cs @@ -0,0 +1,228 @@ +#region license +/* + * [Scientific Committee on Advanced Navigation] + * S.C.A.N. Satellite + * + * SCAN_SettingsGeneral - Script for controlling the general settings page + * + * Copyright (c)2014 David Grandy ; + * Copyright (c)2014 technogeeky ; + * Copyright (c)2014 (Your Name Here) ; see LICENSE.txt for licensing details. + */ +#endregion + +using System; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.UI; +using UnityEngine.EventSystems; +using SCANsat.Unity.Interfaces; + +namespace SCANsat.Unity.Unity +{ + public class SCAN_SettingsGeneral : SettingsPage + { + [SerializeField] + private SCAN_Toggle m_GroundTrackToggle = null; + [SerializeField] + private SCAN_Toggle m_GroundTrackActiveToggle = null; + [SerializeField] + private SCAN_Toggle m_WindowTooltipToggle = null; + [SerializeField] + private SCAN_Toggle m_LegendTooltipToggle = null; + [SerializeField] + private SCAN_Toggle m_StockToolbarToggle = null; + [SerializeField] + private SCAN_Toggle m_ToolbarMenuToggle = null; + [SerializeField] + private SCAN_Toggle m_StockUIToggle = null; + [SerializeField] + private SCAN_Toggle m_MechJebToggle = null; + [SerializeField] + private SCAN_Toggle m_MechJebLoadToggle = null; + [SerializeField] + private GameObject m_MechJebBar = null; + [SerializeField] + private TextHandler m_UIScale = null; + [SerializeField] + private Slider m_MapSpeedSlider = null; + [SerializeField] + private Slider m_UIScaleSlider = null; + + private bool loaded; + private ISCAN_Settings settings; + + public void setup(ISCAN_Settings set) + { + if (set == null) + return; + + settings = set; + + if (m_GroundTrackToggle != null) + m_GroundTrackToggle.isOn = set.GroundTracks; + + if (m_GroundTrackActiveToggle != null) + { + m_GroundTrackActiveToggle.isOn = set.ActiveGround; + m_GroundTrackActiveToggle.gameObject.SetActive(set.GroundTracks); + } + + if (m_WindowTooltipToggle != null) + m_WindowTooltipToggle.isOn = set.WindowTooltips; + + if (m_LegendTooltipToggle != null) + m_LegendTooltipToggle.isOn = set.LegendTooltips; + + if (m_StockToolbarToggle != null) + m_StockToolbarToggle.isOn = set.StockToolbar; + + if (m_MechJebBar != null) + { + m_MechJebBar.SetActive(set.MechJebAvailable); + + if (m_MechJebToggle != null) + m_MechJebToggle.isOn = set.MechJebTarget; + + if (m_MechJebLoadToggle != null) + { + m_MechJebLoadToggle.isOn = set.MechJebLoad; + m_MechJebLoadToggle.gameObject.SetActive(set.MechJebTarget); + } + } + + if (m_ToolbarMenuToggle != null) + { + m_ToolbarMenuToggle.isOn = set.ToolbarMenu; + m_ToolbarMenuToggle.gameObject.SetActive(set.StockToolbar); + } + + if (m_StockUIToggle != null) + m_StockUIToggle.isOn = set.StockUIStyle; + + if (m_MapSpeedSlider != null) + m_MapSpeedSlider.value = set.MapGenSpeed; + + if (m_UIScale != null) + m_UIScale.OnTextUpdate.Invoke("UI Scale: " + set.UIScale.ToString("P0")); + + if (m_UIScaleSlider != null) + m_UIScaleSlider.value = set.UIScale * 100; + + loaded = true; + } + + public void GroundTrack(bool isOn) + { + if (!loaded || settings == null) + return; + + settings.GroundTracks = isOn; + + if (m_GroundTrackActiveToggle != null) + m_GroundTrackActiveToggle.gameObject.SetActive(isOn); + } + + public void ActiveTrackOnly(bool isOn) + { + if (!loaded || settings == null) + return; + + settings.ActiveGround = isOn; + } + + public void WindowTooltip(bool isOn) + { + if (!loaded || settings == null) + return; + + settings.WindowTooltips = isOn; + } + + public void LegendTooltip(bool isOn) + { + if (!loaded || settings == null) + return; + + settings.LegendTooltips = isOn; + } + + public void StockToolbar(bool isOn) + { + if (!loaded || settings == null) + return; + + settings.StockToolbar = isOn; + + if (m_ToolbarMenuToggle != null) + m_ToolbarMenuToggle.gameObject.SetActive(isOn); + } + + public void ToolbarMenu(bool isOn) + { + if (!loaded || settings == null) + return; + + settings.ToolbarMenu = isOn; + } + + public void StockUIStlye(bool isOn) + { + if (!loaded || settings == null) + return; + + settings.StockUIStyle = isOn; + } + + public void MechJebTargetSelection(bool isOn) + { + if (!loaded || settings == null) + return; + + settings.MechJebTarget = isOn; + + if (m_MechJebLoadToggle != null) + m_MechJebLoadToggle.gameObject.SetActive(isOn); + } + + public void MechJebLoadTarget(bool isOn) + { + if (!loaded || settings == null) + return; + + settings.MechJebLoad = isOn; + } + + public void MapGenSlider(float speed) + { + if (!loaded || settings == null) + return; + + settings.MapGenSpeed = Mathf.RoundToInt(speed); + } + + public void UISlider(float scale) + { + if (!loaded || m_UIScale == null) + return; + + m_UIScale.OnTextUpdate.Invoke("UI Scale: " + (scale / 100).ToString("P0")); + } + + public void SetUIScale() + { + if (settings == null || m_UIScaleSlider == null) + return; + + settings.UIScale = m_UIScaleSlider.value / 100; + } + + public void ResetWindows() + { + if (settings == null) + return; + + settings.ResetWindows(); + } + } +} diff --git a/SCANsat.Unity/Unity/SCAN_SettingsResource.cs b/SCANsat.Unity/Unity/SCAN_SettingsResource.cs new file mode 100644 index 000000000..ee33841ba --- /dev/null +++ b/SCANsat.Unity/Unity/SCAN_SettingsResource.cs @@ -0,0 +1,379 @@ +#region license +/* + * [Scientific Committee on Advanced Navigation] + * S.C.A.N. Satellite + * + * SCAN_SettingsResource - Script for controlling the resource settings page + * + * Copyright (c)2014 David Grandy ; + * Copyright (c)2014 technogeeky ; + * Copyright (c)2014 (Your Name Here) ; see LICENSE.txt for licensing details. + */ +#endregion + +using System; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.UI; +using UnityEngine.EventSystems; +using SCANsat.Unity.Interfaces; + +namespace SCANsat.Unity.Unity +{ + public class SCAN_SettingsResource : SettingsPage + { + [SerializeField] + private SCAN_Toggle m_BiomeLockToggle = null; + [SerializeField] + private SCAN_Toggle m_NarrowBandToggle = null; + [SerializeField] + private SCAN_Toggle m_InstantScanToggle = null; + [SerializeField] + private SCAN_Toggle m_DisableStockToggle = null; + [SerializeField] + private GameObject m_StockThresholdObject = null; + [SerializeField] + private SCAN_Toggle m_StockThresholdToggle = null; + [SerializeField] + private TextHandler m_StockThresholdValue = null; + [SerializeField] + private InputHandler m_ThresholdInput = null; + [SerializeField] + private SCAN_Toggle m_OverlayTooltipToggle = null; + [SerializeField] + private TextHandler m_MapInterpolation = null; + [SerializeField] + private TextHandler m_MapHeight = null; + [SerializeField] + private TextHandler m_CoverageTransparency = null; + [SerializeField] + private TextHandler m_BiomeMapHeight = null; + + private bool loaded; + private bool ignoreWarning; + private ISCAN_Settings settings; + + private void Update() + { + if (settings == null) + return; + + if (settings.LockInput) + { + if (m_ThresholdInput != null && !m_ThresholdInput.IsFocused) + settings.LockInput = false; + } + } + + public void setup(ISCAN_Settings set) + { + if (set == null) + return; + + settings = set; + + if (m_BiomeLockToggle != null) + m_BiomeLockToggle.isOn = set.BiomeLock; + + if (m_NarrowBandToggle != null) + m_NarrowBandToggle.isOn = set.NarrowBand; + + if (m_DisableStockToggle != null) + m_DisableStockToggle.isOn = set.DisableStock; + + if (m_InstantScanToggle != null) + { + m_InstantScanToggle.isOn = set.InstantScan; + m_InstantScanToggle.gameObject.SetActive(!set.DisableStock); + } + + if (m_StockThresholdObject != null) + m_StockThresholdObject.gameObject.SetActive(set.DisableStock); + + if (m_StockThresholdToggle != null) + m_StockThresholdToggle.isOn = set.StockThreshold; + + if (m_StockThresholdValue != null) + m_StockThresholdValue.OnTextUpdate.Invoke("Stock Scan Threshold: " + set.StockThresholdValue.ToString("P0")); + + if (set.DisableStock) + { + if (m_InstantScanToggle != null) + m_InstantScanToggle.gameObject.SetActive(false); + } + else + { + if (m_StockThresholdObject != null) + m_StockThresholdObject.gameObject.SetActive(false); + } + + if (m_OverlayTooltipToggle != null) + m_OverlayTooltipToggle.isOn = set.OverlayTooltips; + + if (m_MapInterpolation != null) + m_MapInterpolation.OnTextUpdate.Invoke(set.Interpolation.ToString()); + + if (m_MapHeight != null) + m_MapHeight.OnTextUpdate.Invoke(set.MapHeight.ToString()); + + if (m_CoverageTransparency != null) + m_CoverageTransparency.OnTextUpdate.Invoke(set.Transparency.ToString("P0")); + + if (m_BiomeMapHeight != null) + m_BiomeMapHeight.OnTextUpdate.Invoke(set.BiomeMapHeight.ToString()); + + + loaded = true; + } + + public override void OnPointerDown(PointerEventData eventData) + { + if (SCAN_Settings.Instance == null) + return; + + if (SCAN_Settings.Instance.WarningPopup != null) + { + RectTransform r = SCAN_Settings.Instance.WarningPopup.GetComponent(); + + if (r != null) + { + if (!RectTransformUtility.RectangleContainsScreenPoint(r, eventData.position, eventData.pressEventCamera)) + { + SCAN_Settings.Instance.WarningPopup.FadeOut(); + SCAN_Settings.Instance.WarningPopup = null; + } + } + } + } + + public void BimomeLock(bool isOn) + { + if (!loaded || settings == null) + return; + + settings.BiomeLock = isOn; + } + + public void RequireNarrowBand(bool isOn) + { + if (!loaded || settings == null) + return; + + settings.NarrowBand = isOn; + } + + public void DisableStock(bool isOn) + { + if (!loaded || settings == null) + return; + + if (isOn && !settings.ModuleManager && !ignoreWarning) + { + if (SCAN_Settings.Instance == null) + return; + + if (SCAN_Settings.Instance.WarningPopup != null) + { + SCAN_Settings.Instance.WarningPopup.FadeOut(true); + SCAN_Settings.Instance.WarningPopup = null; + } + + if (SCAN_Settings.Instance.PopupPrefab == null) + return; + + SCAN_Settings.Instance.WarningPopup = Instantiate(SCAN_Settings.Instance.PopupPrefab).GetComponent(); + + if (SCAN_Settings.Instance.WarningPopup == null) + return; + + SCAN_Settings.Instance.WarningPopup.transform.SetParent(transform, false); + + SCAN_Settings.Instance.WarningPopup.Setup(settings.ModuleManagerWarning); + + SCAN_Settings.Instance.WarningPopup.OnSelectUpdate.AddListener(ConfirmStockDisable); + + return; + } + + settings.DisableStock = isOn; + + if (m_InstantScanToggle != null) + m_InstantScanToggle.gameObject.SetActive(!isOn); + + if (m_StockThresholdObject != null) + m_StockThresholdObject.gameObject.SetActive(isOn); + } + + private void ConfirmStockDisable() + { + SCAN_Settings.Instance.WarningPopup.FadeOut(true); + SCAN_Settings.Instance.WarningPopup = null; + + if (settings == null) + return; + + ignoreWarning = true; + + settings.DisableStock = true; + + if (m_InstantScanToggle != null) + m_InstantScanToggle.gameObject.SetActive(false); + + if (m_StockThresholdObject != null) + m_StockThresholdObject.gameObject.SetActive(true); + } + + public void InstantScan(bool isOn) + { + if (!loaded || settings == null) + return; + + settings.InstantScan = isOn; + } + + public void StockTreshold(bool isOn) + { + if (!loaded || settings == null) + return; + + settings.LockInput = false; + + settings.StockThreshold = isOn; + } + + public void SetThreshold() + { + if (m_ThresholdInput == null || settings == null) + return; + + settings.LockInput = false; + + float value = settings.StockThresholdValue; + + if (float.TryParse(m_ThresholdInput.Text, out value)) + { + value /= 100; + + if (value < 0) + value = 0; + else if (value > 1) + value = 1; + + m_ThresholdInput.OnTextUpdate.Invoke((value * 100).ToString("N0")); + + settings.StockThresholdValue = value; + + if (m_StockThresholdValue != null) + m_StockThresholdValue.OnTextUpdate.Invoke("Stock Scan Threshold: " + value.ToString("P0")); + } + } + + public void OnInputClick(BaseEventData eventData) + { + if (!(eventData is PointerEventData) || settings == null) + return; + + if (((PointerEventData)eventData).button != PointerEventData.InputButton.Left) + return; + + settings.LockInput = true; + } + + public void OverlayTooltip(bool isOn) + { + if (!loaded || settings == null) + return; + + settings.OverlayTooltips = isOn; + } + + public void InterpolationDown() + { + if (settings == null) + return; + + settings.Interpolation = Math.Max(2, settings.Interpolation / 2); + + if (m_MapInterpolation != null) + m_MapInterpolation.OnTextUpdate.Invoke(settings.Interpolation.ToString()); + } + + public void InterpolationUp() + { + if (settings == null) + return; + + settings.Interpolation = Math.Min(32, settings.Interpolation * 2); + + if (m_MapInterpolation != null) + m_MapInterpolation.OnTextUpdate.Invoke(settings.Interpolation.ToString()); + } + + public void MapHeightDown() + { + if (settings == null) + return; + + settings.MapHeight = Math.Max(64, settings.MapHeight / 2); + + if (m_MapHeight != null) + m_MapHeight.OnTextUpdate.Invoke(settings.MapHeight.ToString()); + } + + public void MapHeightUp() + { + if (settings == null) + return; + + settings.MapHeight = Math.Min(1024, settings.MapHeight * 2); + + if (m_MapHeight != null) + m_MapHeight.OnTextUpdate.Invoke(settings.MapHeight.ToString()); + } + + public void TransparencyDown() + { + if (settings == null) + return; + + settings.Transparency = Mathf.Max(0f, settings.Transparency - 0.1f); + + if (m_CoverageTransparency != null) + m_CoverageTransparency.OnTextUpdate.Invoke(settings.Transparency.ToString("P0")); + } + + public void TransparencyUp() + { + if (settings == null) + return; + + settings.Transparency = Mathf.Min(1f, settings.Transparency + 0.1f); + + if (m_CoverageTransparency != null) + m_CoverageTransparency.OnTextUpdate.Invoke(settings.Transparency.ToString("P0")); + } + + public void BiomeMapHeightDown() + { + if (settings == null) + return; + + settings.BiomeMapHeight = Math.Max(256, settings.BiomeMapHeight / 2); + + if (m_BiomeMapHeight != null) + m_BiomeMapHeight.OnTextUpdate.Invoke(settings.BiomeMapHeight.ToString()); + } + + public void BiomeMapHeightUp() + { + if (settings == null) + return; + + settings.BiomeMapHeight = Math.Min(1024, settings.BiomeMapHeight * 2); + + if (m_BiomeMapHeight != null) + m_BiomeMapHeight.OnTextUpdate.Invoke(settings.BiomeMapHeight.ToString()); + } + + } +} diff --git a/SCANsat.Unity/Unity/SCAN_SimpleLabel.cs b/SCANsat.Unity/Unity/SCAN_SimpleLabel.cs new file mode 100644 index 000000000..6bb15d86b --- /dev/null +++ b/SCANsat.Unity/Unity/SCAN_SimpleLabel.cs @@ -0,0 +1,69 @@ +#region license +/* + * [Scientific Committee on Advanced Navigation] + * S.C.A.N. Satellite + * + * SCAN_SimpleLabel - Script for controlling simple map icons + * + * Copyright (c)2014 David Grandy ; + * Copyright (c)2014 technogeeky ; + * Copyright (c)2014 (Your Name Here) ; see LICENSE.txt for licensing details. + */ +#endregion + +using System; +using UnityEngine; +using UnityEngine.UI; + +namespace SCANsat.Unity.Unity +{ + public class SCAN_SimpleLabel : MonoBehaviour + { + private Image icon; + private RectTransform rect; + private SimpleLabelInfo info; + + public void Setup(SimpleLabelInfo label) + { + if (label == null) + return; + + info = label; + + rect = gameObject.AddComponent(); + rect.anchorMin = new Vector2(0, 0); + rect.anchorMax = new Vector2(0, 0); + rect.pivot = new Vector2(0.5f, 0.5f); + rect.localScale = new Vector3(1, 1, 1); + rect.localPosition = new Vector3(0, 0, 0); + rect.anchoredPosition3D = new Vector3(label.pos.x, label.pos.y, 0); + rect.sizeDelta = new Vector2(label.width, label.width); + + icon = gameObject.AddComponent(); + icon.sprite = label.image; + icon.color = label.color; + icon.raycastTarget = false; + icon.type = Image.Type.Sliced; + } + + public void UpdateIcon(SimpleLabelInfo label) + { + if (icon == null || rect == null || label == null) + return; + + if (gameObject.activeSelf && !label.show) + { + gameObject.SetActive(false); + return; + } + else if (!gameObject.activeSelf && label.show) + gameObject.SetActive(true); + + if (icon.color != label.color) + icon.color = label.color; + + rect.anchoredPosition = label.pos; + } + + } +} diff --git a/SCANsat.Unity/Unity/SCAN_Style.cs b/SCANsat.Unity/Unity/SCAN_Style.cs new file mode 100644 index 000000000..c8eea5ff0 --- /dev/null +++ b/SCANsat.Unity/Unity/SCAN_Style.cs @@ -0,0 +1,172 @@ +#region license +/* + * [Scientific Committee on Advanced Navigation] + * S.C.A.N. Satellite + * + * SCAN_Style - Script for applying UI style elements + * + * Copyright (c)2014 David Grandy ; + * Copyright (c)2014 technogeeky ; + * Copyright (c)2014 (Your Name Here) ; see LICENSE.txt for licensing details. + */ +#endregion + +using System; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.UI; + +namespace SCANsat.Unity.Unity +{ + public class SCAN_Style : MonoBehaviour + { + public enum StyleTypes + { + None, + Window, + Box, + HiddenBox, + Button, + HiddenButton, + ToggleButton, + Toggle, + HorizontalSlider, + TextInput, + KSPToggle, + VerticalScrollbar, + KSPWindow, + AppButton, + Tooltip, + VerticalSlider, + Popup, + } + + [SerializeField] + private StyleTypes m_StyleType = StyleTypes.None; + + public StyleTypes StlyeType + { + get { return m_StyleType; } + } + + private void setSelectable(Sprite normal, Sprite highlight, Sprite active, Sprite inactive) + { + Selectable select = GetComponent(); + + if (select == null) + return; + + select.image.sprite = normal; + select.image.type = Image.Type.Sliced; + select.transition = Selectable.Transition.SpriteSwap; + + SpriteState spriteState = select.spriteState; + spriteState.highlightedSprite = highlight; + spriteState.pressedSprite = active; + spriteState.disabledSprite = inactive; + select.spriteState = spriteState; + } + + public void setImage(Sprite sprite) + { + Image image = GetComponent(); + + if (image == null) + return; + + image.sprite = sprite; + } + + public void setButton(Sprite normal, Sprite highlight, Sprite active, Sprite inactive) + { + setSelectable(normal, highlight, active, inactive); + } + + public void setToggle(Sprite normal, Sprite highlight, Sprite active, Sprite inactive, Sprite checkmark, Sprite checkmarkHover) + { + setSelectable(normal, highlight, active, inactive); + + Toggle toggle = GetComponent(); + + if (toggle == null) + return; + + Image toggleImage = toggle.graphic as Image; + + if (toggleImage == null) + return; + + toggleImage.sprite = checkmark; + toggleImage.type = Image.Type.Sliced; + + SCAN_Toggle scan_toggle = GetComponent(); + + if (scan_toggle != null) + scan_toggle.HoverCheckmark = checkmarkHover; + } + + public void setToggleButton(Sprite normal, Sprite highlight, Sprite active, Sprite inactive, Sprite checkmark) + { + setSelectable(normal, highlight, active, inactive); + + Toggle toggle = GetComponent(); + + if (toggle == null) + return; + + Image toggleImage = toggle.graphic as Image; + + if (toggleImage == null) + return; + + toggleImage.sprite = checkmark; + toggleImage.type = Image.Type.Sliced; + } + + public void setSlider(Sprite background, Sprite thumb, Sprite thumbHighlight, Sprite thumbActive, Sprite thumbInactive) + { + setSelectable(thumb, thumbHighlight, thumbActive, thumbInactive); + + if (background == null) + return; + + Slider slider = GetComponent(); + + if (slider == null) + return; + + Image back = slider.GetComponentInChildren(); + + if (back == null) + return; + + back.sprite = background; + back.type = Image.Type.Sliced; + } + + public void setScrollbar(Sprite background, Sprite thumb) + { + Image back = GetComponent(); + + if (back == null) + return; + + back.sprite = background; + + Scrollbar scroll = GetComponent(); + + if (scroll == null) + return; + + if (scroll.targetGraphic == null) + return; + + Image scrollThumb = scroll.targetGraphic.GetComponent(); + + if (scrollThumb == null) + return; + + scrollThumb.sprite = thumb; + } + } +} diff --git a/SCANsat.Unity/Unity/SCAN_Toolbar.cs b/SCANsat.Unity/Unity/SCAN_Toolbar.cs new file mode 100644 index 000000000..14614d650 --- /dev/null +++ b/SCANsat.Unity/Unity/SCAN_Toolbar.cs @@ -0,0 +1,251 @@ +#region license +/* + * [Scientific Committee on Advanced Navigation] + * S.C.A.N. Satellite + * + * SCAN_Toolbar - Script for controlling the toolbar menu UI + * + * Copyright (c)2014 David Grandy ; + * Copyright (c)2014 technogeeky ; + * Copyright (c)2014 (Your Name Here) ; see LICENSE.txt for licensing details. + */ +#endregion + +using System; +using SCANsat.Unity.Interfaces; +using UnityEngine; +using UnityEngine.UI; +using UnityEngine.EventSystems; + +namespace SCANsat.Unity.Unity +{ + public class SCAN_Toolbar : CanvasFader, IPointerEnterHandler, IPointerExitHandler + { + [SerializeField] + private Toggle m_MainMapToggle = null; + [SerializeField] + private Toggle m_BigMapToggle = null; + [SerializeField] + private Toggle m_ZoomMapToggle = null; + [SerializeField] + private Toggle m_OverlayToggle = null; + [SerializeField] + private Toggle m_InstrumentsToggle = null; + [SerializeField] + private Toggle m_SettingsToggle = null; + + private bool loaded; + private ISCAN_Toolbar toolbarInterface; + + protected override void Awake() + { + base.Awake(); + + Alpha(0); + } + + public void Setup(ISCAN_Toolbar toolbar) + { + if (toolbar == null) + return; + + toolbarInterface = toolbar; + + if (m_MainMapToggle != null) + m_MainMapToggle.isOn = toolbar.MainMap; + + if (m_BigMapToggle != null) + m_BigMapToggle.isOn = toolbar.BigMap; + + if (m_ZoomMapToggle != null) + m_ZoomMapToggle.isOn = toolbar.ZoomMap; + + if (m_OverlayToggle != null) + m_OverlayToggle.isOn = toolbar.Overlay; + + if (m_InstrumentsToggle != null) + m_InstrumentsToggle.isOn = toolbar.Instruments; + + if (m_SettingsToggle != null) + m_SettingsToggle.isOn = toolbar.Settings; + + ProcessTooltips(); + + FadeIn(); + + loaded = true; + } + + public void FadeIn() + { + Fade(1, true); + } + + public void FadeOut() + { + Fade(0, false, Kill, false); + } + + private void Kill() + { + gameObject.SetActive(false); + Destroy(gameObject); + } + + public void ProcessTooltips() + { + if (toolbarInterface == null) + return; + + TooltipHandler[] handlers = gameObject.GetComponentsInChildren(true); + + if (handlers == null) + return; + + for (int j = 0; j < handlers.Length; j++) + ProcessTooltip(handlers[j], toolbarInterface.TooltipsOn, toolbarInterface.TooltipCanvas, toolbarInterface.Scale); + } + + private void ProcessTooltip(TooltipHandler handler, bool isOn, Canvas c, float scale) + { + if (handler == null) + return; + + handler.IsActive = isOn && !handler.HelpTip; + handler._Canvas = c; + handler.Scale = scale; + } + + public void SetMainMapToggle(bool isOn) + { + if (m_MainMapToggle == null) + return; + + loaded = false; + + m_MainMapToggle.isOn = isOn; + + loaded = true; + } + + public void SetBigMapToggle(bool isOn) + { + if (m_BigMapToggle == null) + return; + + loaded = false; + + m_BigMapToggle.isOn = isOn; + + loaded = true; + } + + public void SetZoomMapToggle(bool isOn) + { + if (m_ZoomMapToggle == null) + return; + + loaded = false; + + m_ZoomMapToggle.isOn = isOn; + + loaded = true; + } + + public void SetOverlayToggle(bool isOn) + { + if (m_OverlayToggle == null) + return; + + loaded = false; + + m_OverlayToggle.isOn = isOn; + + loaded = true; + } + + public void SetInstrumentToggle(bool isOn) + { + if (m_InstrumentsToggle == null) + return; + + loaded = false; + + m_InstrumentsToggle.isOn = isOn; + + loaded = true; + } + + public void SetSettingsToggle(bool isOn) + { + if (m_SettingsToggle == null) + return; + + loaded = false; + + m_SettingsToggle.isOn = isOn; + + loaded = true; + } + + public void ToggleMainMap(bool isOn) + { + if (!loaded || toolbarInterface == null) + return; + + toolbarInterface.MainMap = isOn; + } + + public void ToggleBigMap(bool isOn) + { + if (!loaded || toolbarInterface == null) + return; + + toolbarInterface.BigMap = isOn; + } + + public void ToggleZoomMap(bool isOn) + { + if (!loaded || toolbarInterface == null) + return; + + toolbarInterface.ZoomMap = isOn; + } + + public void ToggleOverlay(bool isOn) + { + if (!loaded || toolbarInterface == null) + return; + + toolbarInterface.Overlay = isOn; + } + + public void ToggleInstruments(bool isOn) + { + if (!loaded || toolbarInterface == null) + return; + + toolbarInterface.Instruments = isOn; + } + + public void ToggleSettings(bool isOn) + { + if (!loaded || toolbarInterface == null) + return; + + toolbarInterface.Settings = isOn; + } + + public void OnPointerEnter(PointerEventData eventData) + { + if (toolbarInterface != null) + toolbarInterface.InMenu = true; + } + + public void OnPointerExit(PointerEventData eventData) + { + if (toolbarInterface != null) + toolbarInterface.InMenu = false; + } + } +} diff --git a/SCANsat.Unity/Unity/SCAN_Tooltip.cs b/SCANsat.Unity/Unity/SCAN_Tooltip.cs new file mode 100644 index 000000000..45f1a2d20 --- /dev/null +++ b/SCANsat.Unity/Unity/SCAN_Tooltip.cs @@ -0,0 +1,159 @@ +/// Credit drHogan +/// Sourced from - http://forum.unity3d.com/threads/screenspace-camera-tooltip-controller-sweat-and-tears.293991/#post-1938929 +/// updated ddreaper - refactored code to be more performant. +/// *Note - only works for Screenspace Camera canvases at present, needs updating to include Screenspace and Worldspace! + +//ToolTip is written by Emiliano Pastorelli, H&R Tallinn (Estonia), http://www.hammerandravens.com +//Copyright (c) 2015 Emiliano Pastorelli, H&R - Hammer&Ravens, Tallinn, Estonia. +//All rights reserved. + +//Modified by DMagic - 2017 + +//Redistribution and use in source and binary forms are permitted +//provided that the above copyright notice and this paragraph are +//duplicated in all such forms and that any documentation, +//advertising materials, and other materials related to such +//distribution and use acknowledge that the software was developed +//by H&R, Hammer&Ravens. The name of the +//H&R, Hammer&Ravens may not be used to endorse or promote products derived +//from this software without specific prior written permission. +//THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR +//IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED +//WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + +using System; +using UnityEngine; +using UnityEngine.UI; + +namespace SCANsat.Unity.Unity +{ + [RequireComponent(typeof(RectTransform))] + [AddComponentMenu("UI/Extensions/Tooltip")] + public class SCAN_Tooltip : MonoBehaviour + { + //text of the tooltip + private TextHandler _handler; + private RectTransform _rectTransform; + + //if the tooltip is inside a UI element + private bool _inside; + + private float width, height; + + private float YShift, xShift; + + private RenderMode _guiMode; + + private Camera _guiCamera; + + private static SCAN_Tooltip instance; + + private void Awake() + { + _rectTransform = GetComponent(); + _handler = GetComponentInChildren(); + } + + // Use this for initialization + public void Setup(Canvas c, string t, float f) + { + if (instance != null) + { + instance.gameObject.SetActive(false); + DestroyImmediate(instance.gameObject); + instance = null; + } + + if (c == null || string.IsNullOrEmpty(t) || _rectTransform == null || _handler == null) + return; + + var _canvas = c; + _guiCamera = _canvas.worldCamera; + _guiMode = _canvas.renderMode; + + xShift = 5f; + YShift = -5f; + + _handler.OnTextUpdate.Invoke(t); + + _rectTransform.sizeDelta = new Vector2(_handler.PreferredSize.x + 10f, _handler.PreferredSize.y + 0f); + + _rectTransform.localScale = Vector3.one * f; + + OnScreenSpaceCamera(); + + _inside = true; + + instance = this; + } + + public void UpdateText(string text) + { + if (_handler != null) + _handler.OnTextUpdate.Invoke(text); + } + + // Update is called once per frame + void FixedUpdate() + { + if (_inside && _guiMode == RenderMode.ScreenSpaceCamera) + OnScreenSpaceCamera(); + } + + //main tooltip edge of screen guard and movement + public void OnScreenSpaceCamera() + { + Vector3 newPos = _guiCamera.ScreenToViewportPoint(Input.mousePosition - new Vector3(xShift, YShift, 0f)); + Vector3 newPosWVP = _guiCamera.ViewportToWorldPoint(newPos); + + width = _rectTransform.sizeDelta[0]; + height = _rectTransform.sizeDelta[1]; + + // check and solve problems for the tooltip that goes out of the screen on the horizontal axis + float val; + + Vector3 lowerLeft = _guiCamera.ViewportToWorldPoint(new Vector3(0.0f, 0.0f, 0.0f)); + Vector3 upperRight = _guiCamera.ViewportToWorldPoint(new Vector3(1.0f, 1.0f, 0.0f)); + + //check for right edge of screen + val = (newPosWVP.x + width / 2); + if (val > upperRight.x) + { + Vector3 shifter = new Vector3(val - upperRight.x, 0f, 0f); + Vector3 newWorldPos = new Vector3(newPosWVP.x - shifter.x, newPosWVP.y, 0f); + newPos.x = _guiCamera.WorldToViewportPoint(newWorldPos).x; + } + //check for left edge of screen + val = (newPosWVP.x - width / 2); + if (val < lowerLeft.x) + { + Vector3 shifter = new Vector3(lowerLeft.x - val, 0f, 0f); + Vector3 newWorldPos = new Vector3(newPosWVP.x + shifter.x, newPosWVP.y, 0f); + newPos.x = _guiCamera.WorldToViewportPoint(newWorldPos).x; + } + + // check and solve problems for the tooltip that goes out of the screen on the vertical axis + + //check for upper edge of the screen + val = (newPosWVP.y + height); + if (val > upperRight.y) + { + Vector3 shifter = new Vector3(0f, 30f + height, 0f); + Vector3 newWorldPos = new Vector3(newPosWVP.x, newPosWVP.y - shifter.y, 0f); + newPos.y = _guiCamera.WorldToViewportPoint(newWorldPos).y; + } + + //check for lower edge of the screen (if the shifts of the tooltip are kept as in this code, no need for this as the tooltip always appears above the mouse bu default) + val = newPosWVP.y; + if (val < lowerLeft.y) + { + Vector3 shifter = new Vector3(0f, 10f, 0f); + Vector3 newWorldPos = new Vector3(newPosWVP.x, lowerLeft.y + shifter.y, 0f); + newPos.y = _guiCamera.WorldToViewportPoint(newWorldPos).y; + } + newPosWVP = _guiCamera.ViewportToWorldPoint(newPos); + this.transform.position = new Vector3(newPosWVP.x, newPosWVP.y, 1f); + _inside = true; + } + } +} \ No newline at end of file diff --git a/SCANsat.Unity/Unity/SCAN_VesselInfo.cs b/SCANsat.Unity/Unity/SCAN_VesselInfo.cs new file mode 100644 index 000000000..b1afa17aa --- /dev/null +++ b/SCANsat.Unity/Unity/SCAN_VesselInfo.cs @@ -0,0 +1,75 @@ +#region license +/* + * [Scientific Committee on Advanced Navigation] + * S.C.A.N. Satellite + * + * SCAN_VesselInfo - Script for controlling vessel information readout buttons + * + * Copyright (c)2014 David Grandy ; + * Copyright (c)2014 technogeeky ; + * Copyright (c)2014 (Your Name Here) ; see LICENSE.txt for licensing details. + */ +#endregion + +using System; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.UI; +using SCANsat.Unity.Interfaces; + +namespace SCANsat.Unity.Unity +{ + public class SCAN_VesselInfo : MonoBehaviour + { + [SerializeField] + private TextHandler m_VesselText = null; + + private Guid _id; + private ISCAN_MainMap mapInterface; + private MapLabelInfo label; + + public Guid ID + { + get { return _id; } + } + + public void SetVessel(Guid id, MapLabelInfo info, ISCAN_MainMap map) + { + if (map == null) + return; + + _id = id; + label = info; + label.name = !string.IsNullOrEmpty(label.name) && label.name.Length > 26 ? label.name.Substring(0, 26) : label.name; + mapInterface = map; + + if (m_VesselText == null) + return; + + if (info.label != "1") + { + m_VesselText.SetNormalColor(Color.white); + m_VesselText.OnColorUpdate.Invoke(Color.white); + } + + m_VesselText.OnTextUpdate.Invoke(label.name); + } + + public void UpdateText(string value) + { + if (m_VesselText == null) + return; + + m_VesselText.OnTextUpdate.Invoke(string.Format("[{0}] {1}: {2}", label.label, label.name, value)); + } + + public void ChangeToVessel() + { + if (mapInterface == null) + return; + + mapInterface.ChangeToVessel(_id); + } + + } +} diff --git a/SCANsat.Unity/Unity/SCAN_ZoomMap.cs b/SCANsat.Unity/Unity/SCAN_ZoomMap.cs new file mode 100644 index 000000000..35cce5783 --- /dev/null +++ b/SCANsat.Unity/Unity/SCAN_ZoomMap.cs @@ -0,0 +1,1473 @@ +#region license +/* + * [Scientific Committee on Advanced Navigation] + * S.C.A.N. Satellite + * + * SCAN_ZoomMap - Script for controlling the zoom map UI + * + * Copyright (c)2014 David Grandy ; + * Copyright (c)2014 technogeeky ; + * Copyright (c)2014 (Your Name Here) ; see LICENSE.txt for licensing details. + */ +#endregion + +using System; +using System.Collections.Generic; +using System.Linq; +using SCANsat.Unity.Interfaces; +using UnityEngine; +using UnityEngine.UI; +using UnityEngine.EventSystems; + +namespace SCANsat.Unity.Unity +{ + public class SCAN_ZoomMap : CanvasFader, IDragHandler, IBeginDragHandler, IEndDragHandler, IPointerDownHandler + { + [SerializeField] + private float m_MaxWidth = 520; + [SerializeField] + private float m_MaxHeight = 440; + [SerializeField] + private TextHandler m_Version = null; + [SerializeField] + private Transform m_MapTypeMenu = null; + [SerializeField] + private Transform m_ResourceMenu = null; + [SerializeField] + private ToggleGroup m_DropDownToggles = null; + [SerializeField] + private GameObject m_DropDownPrefab = null; + [SerializeField] + private GameObject m_MapMoveObject = null; + [SerializeField] + private GameObject m_TobBarObject = null; + [SerializeField] + private GameObject m_TobBarSecondObject = null; + [SerializeField] + private GameObject m_ToggleBarObject = null; + [SerializeField] + private GameObject m_ReadoutBar = null; + [SerializeField] + private GameObject m_LegendBar = null; + [SerializeField] + private GameObject m_WaypointBar = null; + [SerializeField] + private GameObject m_MechJebButton = null; + [SerializeField] + private TextHandler m_Title = null; + [SerializeField] + private TextHandler m_ZoomLevel = null; + [SerializeField] + private GameObject m_OrbitObject = null; + [SerializeField] + private SCAN_Toggle m_OrbitToggle = null; + [SerializeField] + private SCAN_Toggle m_ColorToggle = null; + [SerializeField] + private SCAN_Toggle m_TerminatorToggle = null; + [SerializeField] + private SCAN_Toggle m_LegendToggle = null; + [SerializeField] + private SCAN_Toggle m_ResourceToggle = null; + [SerializeField] + private SCAN_Toggle m_IconsToggle = null; + [SerializeField] + private TextHandler m_ReadoutText = null; + [SerializeField] + private RawImage m_ZoomImage = null; + [SerializeField] + private LayoutElement m_MapLayout = null; + [SerializeField] + private RawImage m_LegendImage = null; + [SerializeField] + private TextHandler m_LegendLabelOne = null; + [SerializeField] + private TextHandler m_LegendLabelTwo = null; + [SerializeField] + private TextHandler m_LegendLabelThree = null; + [SerializeField] + private GameObject m_MapLabelPrefab = null; + [SerializeField] + private InputHandler m_WaypointInput = null; + [SerializeField] + private GameObject m_VesselSyncButton = null; + [SerializeField] + private GameObject m_VesselLockButton = null; + [SerializeField] + private Image m_VesselLockImage = null; + [SerializeField] + private Sprite m_VesselLock = null; + [SerializeField] + private Sprite m_VesselUnlock = null; + [SerializeField] + private Image m_WindowState = null; + [SerializeField] + private Sprite m_WindowMax = null; + [SerializeField] + private Sprite m_WindowMed = null; + [SerializeField] + private Sprite m_WindowMin = null; + [SerializeField] + private GameObject m_TooltipPrefab = null; + + private VerticalLayoutGroup windowLayout; + private RectTransform rect; + private Vector2 mouseStart; + private Vector3 windowStart; + private Vector2 resizeStart; + private bool loaded; + private bool inMap; + private bool waypointSelecting; + private string waypoint; + private Vector2 rectPos = new Vector2(); + + private bool tooltipOn; + private SCAN_Tooltip _tooltip; + + private SCAN_DropDown dropDown; + + private List orbitLabels = new List(); + private List orbitIconLabels = new List(); + private List anomalyLabels = new List(); + private List waypointLabels = new List(); + private List flagLabels = new List(); + private SCAN_MapLabel vesselLabel; + private SCAN_MapLabel tempWaypointLabel; + private SCAN_MapLabel hoverWaypointLabel; + + private ISCAN_ZoomMap zoomInterface; + + protected override void Awake() + { + base.Awake(); + + rect = GetComponent(); + windowLayout = GetComponent(); + + Alpha(0); + } + + private void Update() + { + if (zoomInterface == null || !zoomInterface.IsVisible) + return; + + if (zoomInterface.LockInput) + { + if (m_WaypointInput != null && !m_WaypointInput.IsFocused) + zoomInterface.LockInput = false; + } + + zoomInterface.Update(); + + if (vesselLabel != null) + { + Vector2 pos = zoomInterface.VesselPosition(); + + if (pos.x < 0 || pos.y < 0) + vesselLabel.UpdateActive(false); + else + { + vesselLabel.UpdateActive(true); + vesselLabel.UpdatePosition(pos); + } + } + + if (inMap && m_ZoomImage != null && m_ReadoutText != null) + { + RectTransformUtility.ScreenPointToLocalPointInRectangle(m_ZoomImage.rectTransform, Input.mousePosition, zoomInterface.MainCanvas.worldCamera, out rectPos); + + m_ReadoutText.OnTextUpdate.Invoke(zoomInterface.MapInfo(rectPos)); + + if (waypointSelecting) + { + if (hoverWaypointLabel != null) + { + Vector2 mapPos = new Vector2(rectPos.x, rectPos.y + zoomInterface.Size.y); + + hoverWaypointLabel.UpdateActive(true); + + hoverWaypointLabel.UpdatePosition(mapPos); + } + } + } + else if (waypointSelecting) + { + if (hoverWaypointLabel != null) + hoverWaypointLabel.UpdateActive(false); + } + + if (tooltipOn) + { + RectTransformUtility.ScreenPointToLocalPointInRectangle(m_LegendImage.rectTransform, Input.mousePosition, zoomInterface.MainCanvas.worldCamera, out rectPos); + + float halfWidth = m_LegendImage.rectTransform.rect.width / 2; + + float legendXPos = (rectPos.x + halfWidth) / m_LegendImage.rectTransform.rect.width; + + if (_tooltip != null) + _tooltip.UpdateText(zoomInterface.TooltipText(legendXPos)); + } + + if (zoomInterface.OrbitToggle && zoomInterface.ShowOrbit) + { + for (int i = orbitLabels.Count - 1; i >= 0; i--) + { + SCAN_SimpleLabel label = orbitLabels[i]; + + label.UpdateIcon(zoomInterface.OrbitInfo(i)); + } + + for (int i = orbitIconLabels.Count - 1; i >= 0; i--) + { + SCAN_MapLabel label = orbitIconLabels[i]; + + label.UpdatePositionActivation(zoomInterface.OrbitIconInfo(label.StringID)); + } + } + } + + public void setMap(ISCAN_ZoomMap map) + { + if (map == null) + return; + + zoomInterface = map; + + if (m_Version != null) + m_Version.OnTextUpdate.Invoke(map.Version); + + if (m_ColorToggle != null) + m_ColorToggle.isOn = map.ColorToggle; + + if (m_TerminatorToggle != null) + m_TerminatorToggle.isOn = map.TerminatorToggle; + + if (m_OrbitToggle != null) + m_OrbitToggle.isOn = map.OrbitToggle; + + if (m_IconsToggle != null) + m_IconsToggle.isOn = map.IconsToggle; + + if (m_LegendToggle != null) + m_LegendToggle.isOn = map.LegendToggle; + + if (m_ResourceToggle != null) + m_ResourceToggle.isOn = map.ResourceToggle; + + if (!map.OrbitAvailable && m_OrbitObject != null) + m_OrbitObject.SetActive(false); + + if (!map.ShowResource && m_ResourceMenu != null) + m_ResourceMenu.gameObject.SetActive(false); + + if (map.VesselLock && m_MapMoveObject != null) + m_MapMoveObject.SetActive(false); + + if (m_VesselLockImage != null && m_VesselLock != null && m_VesselUnlock != null) + m_VesselLockImage.sprite = map.VesselLock ? m_VesselLock : m_VesselUnlock; + + if (!map.ShowVessel) + { + if (m_VesselLockButton != null) + m_VesselLockButton.SetActive(false); + + if (m_VesselSyncButton != null) + m_VesselSyncButton.SetActive(false); + } + + SetLegend(map.LegendToggle); + + SetWindowState(map.WindowState); + + SetScale(map.Scale); + + SetPosition(map.Position); + + SetSize(map.Size); + + SetIcons(); + + ProcessTooltips(); + + ResetText(); + + FadeIn(); + + loaded = true; + } + + public void FadeIn() + { + Fade(1, true); + } + + public void FadeOut() + { + Fade(0, false, Kill, false); + } + + private void Kill() + { + gameObject.SetActive(false); + Destroy(gameObject); + } + + public void Close() + { + if (zoomInterface != null) + zoomInterface.IsVisible = false; + } + + public void ProcessTooltips() + { + if (zoomInterface == null) + return; + + TooltipHandler[] handlers = gameObject.GetComponentsInChildren(true); + + if (handlers == null) + return; + + for (int j = 0; j < handlers.Length; j++) + ProcessTooltip(handlers[j], zoomInterface.TooltipsOn, zoomInterface.TooltipCanvas, zoomInterface.Scale); + } + + private void ProcessTooltip(TooltipHandler handler, bool isOn, Canvas c, float scale) + { + if (handler == null) + return; + + handler.IsActive = isOn && !handler.HelpTip; + handler._Canvas = c; + handler.Scale = scale; + } + + public void SetScale(float scale) + { + rect.localScale = Vector3.one * scale; + } + + public void SetPosition(Vector2 pos) + { + if (rect == null) + return; + + rect.anchoredPosition = new Vector3(pos.x, pos.y, 0); + } + + private void SetSize(Vector2 size) + { + if (m_MapLayout == null) + return; + + if (size.x + 8 < m_MapLayout.minWidth) + size.x = m_MapLayout.minWidth - 8; + else if (size.x + 8 > m_MaxWidth) + size.x = m_MaxWidth - 8; + + if (size.y + 8 < m_MapLayout.minHeight) + size.y = m_MapLayout.minHeight - 8; + else if (size.y + 8 > m_MaxHeight) + size.y = m_MaxHeight - 8; + + if (size.x % 2 != 0) + size.x += 1; + if (size.y % 2 != 0) + size.y += 1; + + if (size.x % 4 != 0) + size.x += 2; + if (size.y % 4 != 0) + size.y += 2; + + m_MapLayout.preferredWidth = size.x + 8; + m_MapLayout.preferredHeight = size.y + 8; + } + + private void SetWindowState(int i) + { + switch (i) + { + case 0: + if (m_WindowState != null && m_WindowMax != null) + m_WindowState.sprite = m_WindowMax; + + if (m_TobBarObject != null) + m_TobBarObject.SetActive(true); + + if (m_TobBarSecondObject != null) + m_TobBarSecondObject.SetActive(true); + + if (m_ToggleBarObject != null) + m_ToggleBarObject.SetActive(true); + + SetLegend(zoomInterface.LegendToggle); + + if (windowLayout != null) + { + RectOffset padding = windowLayout.padding; + + windowLayout.padding = new RectOffset(padding.left, 14, padding.top, 6); + } + + break; + case 1: + if (m_WindowState != null && m_WindowMed != null) + m_WindowState.sprite = m_WindowMed; + + if (m_TobBarObject != null) + m_TobBarObject.SetActive(true); + + if (m_TobBarSecondObject != null) + m_TobBarSecondObject.SetActive(true); + + if (m_ToggleBarObject != null) + m_ToggleBarObject.SetActive(false); + + if (m_LegendBar != null) + m_LegendBar.SetActive(false); + + if (windowLayout != null) + { + RectOffset padding = windowLayout.padding; + + windowLayout.padding = new RectOffset(padding.left, 18, padding.top, 18); + } + + break; + case 2: + if (m_WindowState != null && m_WindowMin != null) + m_WindowState.sprite = m_WindowMin; + + if (m_TobBarObject != null) + m_TobBarObject.SetActive(false); + + if (m_TobBarSecondObject != null) + m_TobBarSecondObject.SetActive(false); + + if (m_ToggleBarObject != null) + m_ToggleBarObject.SetActive(false); + + if (m_LegendBar != null) + m_LegendBar.SetActive(false); + + if (windowLayout != null) + { + RectOffset padding = windowLayout.padding; + + windowLayout.padding = new RectOffset(padding.left, 18, padding.top, 18); + } + + break; + } + } + + public void SetLegend(bool isOn) + { + if (m_LegendBar == null) + return; + + if (zoomInterface.LegendAvailable) + m_LegendBar.SetActive(isOn); + else + { + m_LegendBar.SetActive(false); + return; + } + + if (!isOn) + return; + + if (m_LegendImage != null) + m_LegendImage.texture = zoomInterface.LegendImage; + + if (zoomInterface.CurrentMapType == "Biome") + { + if (m_LegendLabelOne != null) + m_LegendLabelOne.gameObject.SetActive(false); + + if (m_LegendLabelTwo != null) + m_LegendLabelTwo.gameObject.SetActive(false); + + if (m_LegendLabelThree != null) + m_LegendLabelThree.gameObject.SetActive(false); + } + else + { + IList labels = zoomInterface.LegendLabels; + + if (labels == null || labels.Count != 3) + return; + + if (m_LegendLabelOne != null) + { + m_LegendLabelOne.gameObject.SetActive(true); + m_LegendLabelOne.OnTextUpdate.Invoke(labels[0]); + } + + if (m_LegendLabelTwo != null) + { + m_LegendLabelTwo.gameObject.SetActive(true); + m_LegendLabelTwo.OnTextUpdate.Invoke(labels[1]); + } + + if (m_LegendLabelThree != null) + { + m_LegendLabelThree.gameObject.SetActive(true); + m_LegendLabelThree.OnTextUpdate.Invoke(labels[2]); + } + } + } + + private void SetFlagIcons(Dictionary flags) + { + if (flags == null) + return; + + if (m_MapLabelPrefab == null || m_ZoomImage == null) + return; + + for (int i = 0; i < flags.Count; i++) + { + Guid id = flags.ElementAt(i).Key; + + MapLabelInfo info; + + if (!flags.TryGetValue(id, out info)) + continue; + + createFlag(id, info); + } + } + + private void createFlag(Guid id, MapLabelInfo info) + { + SCAN_MapLabel mapLabel = Instantiate(m_MapLabelPrefab).GetComponent(); + + if (mapLabel == null) + return; + + mapLabel.transform.SetParent(m_ZoomImage.transform, false); + + mapLabel.Setup(id, info); + + flagLabels.Add(mapLabel); + } + + private void SetAnomalyIcons(Dictionary anomalies) + { + if (anomalies == null) + return; + + if (m_MapLabelPrefab == null || m_ZoomImage == null) + return; + + for (int i = 0; i < anomalies.Count; i++) + { + string id = anomalies.ElementAt(i).Key; + + MapLabelInfo info; + + if (!anomalies.TryGetValue(id, out info)) + continue; + + createAnomaly(id, info); + } + } + + private void createAnomaly(string id, MapLabelInfo info) + { + SCAN_MapLabel mapLabel = Instantiate(m_MapLabelPrefab).GetComponent(); + + if (mapLabel == null) + return; + + mapLabel.transform.SetParent(m_ZoomImage.transform, false); + + mapLabel.Setup(id, info); + + anomalyLabels.Add(mapLabel); + } + + private void SetWaypointIcons(Dictionary waypoints) + { + if (waypoints == null) + return; + + if (m_MapLabelPrefab == null || m_ZoomImage == null) + return; + + for (int i = 0; i < waypoints.Count; i++) + { + int id = waypoints.ElementAt(i).Key; + + MapLabelInfo info; + + if (!waypoints.TryGetValue(id, out info)) + continue; + + createWaypoint(id, info); + } + } + + private SCAN_MapLabel createWaypoint(int id, MapLabelInfo info, bool temp = false) + { + SCAN_MapLabel mapLabel = Instantiate(m_MapLabelPrefab).GetComponent(); + + if (mapLabel == null) + return null; + + mapLabel.transform.SetParent(m_ZoomImage.transform, false); + + mapLabel.Setup(id, info); + + if (!temp) + waypointLabels.Add(mapLabel); + + return mapLabel; + } + + private void SetVesselIcon(KeyValuePair vessel) + { + if (vessel.Value.label == "null") + return; + + if (m_MapLabelPrefab == null || m_ZoomImage == null) + return; + + SCAN_MapLabel mapLabel = Instantiate(m_MapLabelPrefab).GetComponent(); + + if (mapLabel == null) + return; + + mapLabel.transform.SetParent(m_ZoomImage.transform, false); + + mapLabel.Setup(vessel.Key, vessel.Value); + + vesselLabel = mapLabel; + } + + private void SetOrbitIcons(int count) + { + if (zoomInterface == null || m_ZoomImage == null) + return; + + for (int i = 0; i < count; i++) + { + SimpleLabelInfo info = zoomInterface.OrbitInfo(i); + + CreateOrbitIcon(info); + } + } + + private void CreateOrbitIcon(SimpleLabelInfo info) + { + GameObject labelObj = new GameObject("SCAN_SimpleLabel"); + + SCAN_SimpleLabel label = labelObj.AddComponent(); + + if (label == null) + return; + + label.transform.SetParent(m_ZoomImage.transform, false); + + label.Setup(info); + + orbitLabels.Add(label); + } + + private void SetOrbitMapIcons(Dictionary orbitLabels) + { + if (orbitLabels == null) + return; + + if (m_MapLabelPrefab == null || m_ZoomImage == null) + return; + + for (int i = 0; i < orbitLabels.Count; i++) + { + string id = orbitLabels.ElementAt(i).Key; + + MapLabelInfo info; + + if (!orbitLabels.TryGetValue(id, out info)) + continue; + + CreateOrbitMapIcon(id, info); + } + } + + private void CreateOrbitMapIcon(string id, MapLabelInfo info) + { + SCAN_MapLabel mapLabel = Instantiate(m_MapLabelPrefab).GetComponent(); + + if (mapLabel == null) + return; + + mapLabel.transform.SetParent(m_ZoomImage.transform, false); + + mapLabel.Setup(id, info); + + orbitIconLabels.Add(mapLabel); + } + + private void ClearIcons() + { + for (int i = waypointLabels.Count - 1; i >= 0; i--) + { + SCAN_MapLabel m = waypointLabels[i]; + + m.gameObject.SetActive(false); + Destroy(m.gameObject); + } + + for (int i = anomalyLabels.Count - 1; i >= 0; i--) + { + SCAN_MapLabel m = anomalyLabels[i]; + + m.gameObject.SetActive(false); + Destroy(m.gameObject); + } + + for (int i = flagLabels.Count - 1; i >= 0; i--) + { + SCAN_MapLabel m = flagLabels[i]; + + m.gameObject.SetActive(false); + Destroy(m.gameObject); + } + + for (int i = orbitLabels.Count - 1; i >= 0; i--) + { + SCAN_SimpleLabel s = orbitLabels[i]; + + s.gameObject.SetActive(false); + Destroy(s.gameObject); + } + + for (int i = orbitIconLabels.Count - 1; i >= 0; i--) + { + SCAN_MapLabel m = orbitIconLabels[i]; + + m.gameObject.SetActive(false); + Destroy(m.gameObject); + } + + if (vesselLabel != null) + { + vesselLabel.gameObject.SetActive(false); + Destroy(vesselLabel.gameObject); + } + + DestroyWaypoint(tempWaypointLabel); + + flagLabels.Clear(); + anomalyLabels.Clear(); + waypointLabels.Clear(); + orbitLabels.Clear(); + orbitIconLabels.Clear(); + vesselLabel = null; + } + + public void RefreshIcons() + { + ClearIcons(); + + SetIcons(); + } + + private void SetIcons() + { + if (zoomInterface == null) + return; + + if (zoomInterface.IconsToggle) + { + SetFlagIcons(zoomInterface.FlagInfoList); + + SetAnomalyIcons(zoomInterface.AnomalyInfoList); + + if (zoomInterface.ShowWaypoint) + SetWaypointIcons(zoomInterface.WaypointInfoList); + } + + if (zoomInterface.OrbitToggle && zoomInterface.ShowOrbit) + { + SetOrbitIcons(zoomInterface.OrbitSteps); + SetOrbitMapIcons(zoomInterface.OrbitLabelList); + } + + SetVesselIcon(zoomInterface.VesselInfo); + } + + private void ResetText() + { + if (zoomInterface == null) + return; + + if (m_ZoomLevel != null) + m_ZoomLevel.OnTextUpdate.Invoke(zoomInterface.ZoomLevelText); + + if (m_Title != null) + m_Title.OnTextUpdate.Invoke(zoomInterface.MapCenterText); + } + + public void OnEnterLegend(BaseEventData eventData) + { + if (zoomInterface == null || !zoomInterface.LegendToggle || !zoomInterface.LegendTooltips) + return; + + if (_tooltip != null) + CloseTooltip(); + + tooltipOn = true; + OpenTooltip(); + } + + public void OnExitLegend(BaseEventData eventData) + { + if (zoomInterface == null || !zoomInterface.LegendToggle || !zoomInterface.LegendTooltips) + return; + + tooltipOn = false; + CloseTooltip(); + } + + private void OpenTooltip() + { + if (m_TooltipPrefab == null || zoomInterface.TooltipCanvas == null) + return; + + _tooltip = Instantiate(m_TooltipPrefab).GetComponent(); + + if (_tooltip == null) + return; + + _tooltip.transform.SetParent(zoomInterface.TooltipCanvas.transform, false); + _tooltip.transform.SetAsLastSibling(); + + _tooltip.Setup(zoomInterface.TooltipCanvas, "_", zoomInterface.Scale); + } + + private void CloseTooltip() + { + if (_tooltip == null) + return; + + _tooltip.gameObject.SetActive(false); + Destroy(_tooltip.gameObject); + _tooltip = null; + } + + public void OnEnterMap(BaseEventData eventData) + { + inMap = true; + + if (m_ReadoutBar != null) + m_ReadoutBar.SetActive(true); + } + + public void OnExitMap(BaseEventData eventData) + { + inMap = false; + + if (m_ReadoutBar != null) + m_ReadoutBar.SetActive(false); + + if (m_ReadoutText != null) + m_ReadoutText.OnTextUpdate.Invoke(""); + } + + public void OnClickMap(BaseEventData eventData) + { + if (!inMap || zoomInterface == null || m_ZoomImage == null || !(eventData is PointerEventData)) + return; + + OnPointerDown((PointerEventData)eventData); + + Vector2 pos; + + RectTransformUtility.ScreenPointToLocalPointInRectangle(m_ZoomImage.rectTransform, Input.mousePosition, zoomInterface.MainCanvas.worldCamera, out pos); + + if (waypointSelecting) + { + DestroyWaypoint(tempWaypointLabel); + + SetWaypoint(pos); + } + else + { + zoomInterface.ClickMap((int)((PointerEventData)eventData).button, pos); + + ResetText(); + + RefreshIcons(); + + SetLegend(zoomInterface.LegendToggle); + } + } + + private void SetWaypoint(Vector2 p) + { + Vector2 mapPos = new Vector2(p.x, p.y + zoomInterface.Size.y); + + MapLabelInfo info = new MapLabelInfo() + { + label = "", + image = zoomInterface.WaypointSprite, + pos = mapPos, + baseColor = Color.white, + flash = false, + width = 20, + alignBottom = 10, + show = true + }; + + tempWaypointLabel = createWaypoint(0, info, true); + } + + public void OnBeginDrag(PointerEventData eventData) + { + if (rect == null) + return; + + mouseStart = eventData.position; + windowStart = rect.position; + } + + public void OnDrag(PointerEventData eventData) + { + if (rect == null) + return; + + rect.position = windowStart + (Vector3)(eventData.position - mouseStart); + + if (zoomInterface == null) + return; + + zoomInterface.ClampToScreen(rect); + } + + public void OnEndDrag(PointerEventData eventData) + { + if (rect == null || zoomInterface == null) + return; + + zoomInterface.Position = new Vector2(rect.anchoredPosition.x, rect.anchoredPosition.y); + } + + public void OnStartResize(BaseEventData eventData) + { + if (m_MapLayout == null) + return; + + if (!(eventData is PointerEventData)) + return; + + mouseStart = ((PointerEventData)eventData).position; + resizeStart = new Vector2(m_MapLayout.preferredWidth, m_MapLayout.preferredHeight); + + ClearIcons(); + } + + public void OnResize(BaseEventData eventData) + { + if (m_MapLayout == null) + return; + + if (!(eventData is PointerEventData)) + return; + + float width = resizeStart.x + (((PointerEventData)eventData).position.x - mouseStart.x); + float height = resizeStart.y - (((PointerEventData)eventData).position.y - mouseStart.y); + + if (width < m_MapLayout.minWidth) + width = m_MapLayout.minWidth; + else if (width > m_MaxWidth) + width = m_MaxWidth; + + if (height < m_MapLayout.minHeight) + height = m_MapLayout.minHeight; + else if (height > m_MaxHeight) + height = m_MaxHeight; + + if (width % 2 != 0) + width += 1; + if (width % 4 != 0) + width += 2; + + if (height % 2 != 0) + height += 1; + if (height % 4 != 0) + height += 2; + + m_MapLayout.preferredWidth = width; + m_MapLayout.preferredHeight = height; + } + + public void OnEndResize(BaseEventData eventData) + { + if (m_MapLayout == null || zoomInterface == null) + return; + + zoomInterface.Size = new Vector2(m_MapLayout.preferredWidth - 8, m_MapLayout.preferredHeight - 8); + + SetIcons(); + + ResetText(); + } + + public void OnPointerDown(PointerEventData eventData) + { + transform.SetAsLastSibling(); + + if (dropDown == null) + return; + + RectTransform r = dropDown.GetComponent(); + + if (r == null) + return; + + if (RectTransformUtility.RectangleContainsScreenPoint(r, eventData.position, eventData.pressEventCamera)) + return; + + dropDown.FadeOut(); + dropDown = null; + + if (m_DropDownToggles != null) + m_DropDownToggles.SetAllTogglesOff(); + } + + public void UpdateTitle(string text) + { + if (m_Title == null) + return; + + m_Title.OnTextUpdate.Invoke(text); + } + + public void UpdateMapTexture(Texture2D map) + { + if (m_ZoomImage == null) + return; + + m_ZoomImage.texture = map; + } + + public void ToggleWindowState() + { + if (zoomInterface == null) + return; + + int i = zoomInterface.WindowState + 1; + + if (i > 2) + i = 0; + + zoomInterface.WindowState = i; + + SetWindowState(i); + } + + public void ToggleTypeSelection(bool isOn) + { + if (dropDown != null) + { + dropDown.FadeOut(true); + dropDown = null; + } + + if (!isOn) + return; + + if (zoomInterface == null || m_DropDownPrefab == null || m_MapTypeMenu == null) + return; + + dropDown = Instantiate(m_DropDownPrefab).GetComponent(); + + if (dropDown == null) + return; + + dropDown.transform.SetParent(m_MapTypeMenu, false); + + dropDown.Setup(zoomInterface.MapTypes, zoomInterface.CurrentMapType); + + dropDown.OnSelectUpdate.AddListener(new UnityEngine.Events.UnityAction(SetType)); + } + + private void SetType(string selection) + { + if (zoomInterface == null) + return; + + zoomInterface.CurrentMapType = selection; + + dropDown.FadeOut(); + dropDown = null; + + if (m_DropDownToggles != null) + m_DropDownToggles.SetAllTogglesOff(); + + RefreshIcons(); + + SetLegend(zoomInterface.LegendToggle); + } + + public void ToggleResourceSelection(bool isOn) + { + if (dropDown != null) + { + dropDown.FadeOut(true); + dropDown = null; + } + + if (!isOn) + return; + + if (zoomInterface == null || m_DropDownPrefab == null || m_ResourceMenu == null) + return; + + dropDown = Instantiate(m_DropDownPrefab).GetComponent(); + + if (dropDown == null) + return; + + dropDown.transform.SetParent(m_ResourceMenu, false); + + dropDown.Setup(zoomInterface.Resources, zoomInterface.CurrentResource); + + dropDown.OnSelectUpdate.AddListener(new UnityEngine.Events.UnityAction(SetResource)); + } + + private void SetResource(string selection) + { + if (zoomInterface == null) + return; + + zoomInterface.CurrentResource = selection; + + loaded = false; + if (m_ResourceToggle != null) + m_ResourceToggle.isOn = true; + loaded = true; + + zoomInterface.ResourceToggle = true; + + dropDown.FadeOut(); + dropDown = null; + + if (m_DropDownToggles != null) + m_DropDownToggles.SetAllTogglesOff(); + } + + public void RefreshMap() + { + if (zoomInterface == null) + return; + + zoomInterface.RefreshMap(); + + RefreshIcons(); + } + + public void ToggleColor(bool isOn) + { + if (!loaded || zoomInterface == null) + return; + + zoomInterface.ColorToggle = isOn; + + RefreshIcons(); + + SetLegend(zoomInterface.LegendToggle); + } + + public void ToggleTerminator(bool isOn) + { + if (!loaded || zoomInterface == null) + return; + + zoomInterface.TerminatorToggle = isOn; + + RefreshIcons(); + } + + public void ToggleOrbit(bool isOn) + { + if (!loaded || zoomInterface == null) + return; + + zoomInterface.OrbitToggle = isOn; + + RefreshIcons(); + } + + public void ToggleIcons(bool isOn) + { + if (!loaded || zoomInterface == null) + return; + + zoomInterface.IconsToggle = isOn; + + RefreshIcons(); + } + + public void ToggleLegend(bool isOn) + { + if (!loaded || zoomInterface == null) + return; + + zoomInterface.LegendToggle = isOn; + + SetLegend(isOn); + } + + public void ToggleResource(bool isOn) + { + if (!loaded || zoomInterface == null) + return; + + zoomInterface.ResourceToggle = isOn; + + RefreshIcons(); + } + + public void SyncVessel() + { + if (zoomInterface == null) + return; + + zoomInterface.VesselSync(); + + SetLegend(zoomInterface.LegendToggle); + } + + public void LockVessel() + { + if (zoomInterface == null) + return; + + zoomInterface.VesselLock = !zoomInterface.VesselLock; + + if (m_VesselLockImage != null && m_VesselLock != null && m_VesselUnlock != null) + m_VesselLockImage.sprite = zoomInterface.VesselLock ? m_VesselLock : m_VesselUnlock; + + if (m_MapMoveObject != null) + m_MapMoveObject.SetActive(!zoomInterface.VesselLock); + + SetLegend(zoomInterface.LegendToggle); + } + + public void ZoomOut() + { + if (zoomInterface == null) + return; + + zoomInterface.ZoomMap(false); + + ResetText(); + + RefreshIcons(); + + SetLegend(zoomInterface.LegendToggle); + } + + public void ZoomIn() + { + if (zoomInterface == null) + return; + + zoomInterface.ZoomMap(true); + + ResetText(); + + RefreshIcons(); + + SetLegend(zoomInterface.LegendToggle); + } + + public void MoveLeft() + { + if (zoomInterface == null) + return; + + zoomInterface.MoveMap(0); + + ResetText(); + + RefreshIcons(); + + SetLegend(zoomInterface.LegendToggle); + } + + public void MoveRight() + { + if (zoomInterface == null) + return; + + zoomInterface.MoveMap(1); + + ResetText(); + + RefreshIcons(); + + SetLegend(zoomInterface.LegendToggle); + } + + public void MoveUp() + { + if (zoomInterface == null) + return; + + zoomInterface.MoveMap(2); + + ResetText(); + + RefreshIcons(); + + SetLegend(zoomInterface.LegendToggle); + } + + public void MoveDown() + { + if (zoomInterface == null) + return; + + zoomInterface.MoveMap(3); + + ResetText(); + + RefreshIcons(); + + SetLegend(zoomInterface.LegendToggle); + } + + public void GenerateWaypoint() + { + waypointSelecting = !waypointSelecting; + + DestroyWaypoint(tempWaypointLabel); + DestroyWaypoint(hoverWaypointLabel); + + if (zoomInterface == null) + return; + + zoomInterface.LockInput = false; + + if (m_WaypointBar != null) + m_WaypointBar.SetActive(waypointSelecting); + + if (waypointSelecting) + { + HoverWaypoint(); + + if (m_MechJebButton != null) + m_MechJebButton.SetActive(zoomInterface.MechJebAvailable); + + if (m_WaypointInput != null) + { + if (string.IsNullOrEmpty(waypoint)) + m_WaypointInput.OnTextUpdate.Invoke(zoomInterface.RandomWaypoint); + else + m_WaypointInput.OnTextUpdate.Invoke(waypoint); + } + } + } + + private void HoverWaypoint() + { + MapLabelInfo info = new MapLabelInfo() + { + label = "", + image = zoomInterface.WaypointSprite, + pos = new Vector2(), + baseColor = Color.white, + flashColor = Color.red, + flash = true, + width = 20, + alignBottom = 10, + show = false + }; + + hoverWaypointLabel = createWaypoint(0, info, true); + } + + public void OnInputClick(BaseEventData eventData) + { + if (!(eventData is PointerEventData) || zoomInterface == null) + return; + + if (((PointerEventData)eventData).button != PointerEventData.InputButton.Left) + return; + + zoomInterface.LockInput = true; + } + + public void RefreshWaypoint() + { + DestroyWaypoint(tempWaypointLabel); + + if (zoomInterface == null || m_WaypointInput == null) + return; + + m_WaypointInput.OnTextUpdate.Invoke(zoomInterface.RandomWaypoint); + + waypoint = ""; + } + + public void SetWaypoint() + { + if (zoomInterface == null || m_WaypointInput == null) + return; + + waypoint = ""; + + if (tempWaypointLabel != null) + zoomInterface.SetWaypoint(m_WaypointInput.Text, tempWaypointLabel.Info.pos); + + GenerateWaypoint(); + + RefreshIcons(); + + waypointSelecting = false; + } + + public void CancelWaypoint() + { + GenerateWaypoint(); + + RefreshIcons(); + + waypointSelecting = false; + } + + public void MechJebLanding() + { + if (zoomInterface == null) + return; + + waypoint = ""; + + if (tempWaypointLabel != null) + zoomInterface.SetMJWaypoint(tempWaypointLabel.Info.pos); + + GenerateWaypoint(); + + RefreshIcons(); + + waypointSelecting = false; + } + + private void DestroyWaypoint(SCAN_MapLabel waypoint) + { + if (waypoint != null) + { + waypoint.gameObject.SetActive(false); + Destroy(waypoint.gameObject); + waypoint = null; + } + } + } +} diff --git a/SCANsat/Properties/AssemblyInfo.cs b/SCANsat/Properties/AssemblyInfo.cs index 3b36744f4..78607bd8c 100644 --- a/SCANsat/Properties/AssemblyInfo.cs +++ b/SCANsat/Properties/AssemblyInfo.cs @@ -14,10 +14,10 @@ // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". // The form "{Major}.{Minor}.*" will automatically update the build and revision, // and "{Major}.{Minor}.{Build}.*" will update just the revision. -[assembly: AssemblyVersion ("1.6.0.11")] -[assembly: AssemblyFileVersion ("1.6.0.11")] -[assembly: AssemblyInformationalVersion ("v16.11")] +[assembly: AssemblyVersion ("1.8.0.0")] +[assembly: AssemblyFileVersion ("1.8.0.0")] +[assembly: AssemblyInformationalVersion ("v18.0")] -[assembly: KSPAssembly ("SCANsat", 1, 6)] +[assembly: KSPAssembly ("SCANsat", 1, 8)] diff --git a/SCANsat/SCAN_Color_Config.cs b/SCANsat/SCAN_Color_Config.cs index 7d7130568..ee9ec1f26 100644 --- a/SCANsat/SCAN_Color_Config.cs +++ b/SCANsat/SCAN_Color_Config.cs @@ -36,30 +36,6 @@ public class SCAN_Color_Config : SCAN_ConfigNodeStorage [Persistent] private string defaultPalette = "Default"; [Persistent] - private Color lowBiomeColor = palette.xkcd_CamoGreen; - [Persistent] - private Color highBiomeColor = palette.xkcd_Marigold; - [Persistent] - private float biomeTransparency = 40; - [Persistent] - private bool stockBiomeMap = false; - [Persistent] - private bool biomeBorder = true; - [Persistent] - private float slopeCutoff = 1f; - [Persistent] - private Color bottomLowSlopeColor = palette.xkcd_PukeGreen; - [Persistent] - private Color bottemHighSlopeColor = palette.xkcd_Lemon; - [Persistent] - private Color topLowSlopeColor = palette.xkcd_Lemon; - [Persistent] - private Color topHighSlopeColor = palette.xkcd_OrangeRed; - [Persistent] - private float windowScale = 1f; - [Persistent] - private bool cheatMapFill = false; - [Persistent] private List SCANsat_Altimetry = new List(); [Persistent] private List SCANsat_Resources = new List(); @@ -69,7 +45,12 @@ internal SCAN_Color_Config(string filepath, string node) FilePath = filepath; TopNodeName = filepath + "/" + node; - if (Load()) + if (!Load()) + { + Save(); + LoadSavedCopy(); + } + else SCANUtil.SCANlog("Color File Loaded..."); } @@ -85,21 +66,6 @@ public override void OnEncodeToConfigNode() SCANUtil.SCANlog("SCANcolors.cfg saved to ---> {0}", FilePath); SCANsat_Altimetry = SCANcontroller.EncodeTerrainConfigs; SCANsat_Resources = SCANcontroller.EncodeResourceConfigs; - - if (SCANcontroller.controller != null) - { - lowBiomeColor = SCANcontroller.controller.lowBiomeColor; - highBiomeColor = SCANcontroller.controller.highBiomeColor; - biomeTransparency = SCANcontroller.controller.biomeTransparency; - stockBiomeMap = SCANcontroller.controller.useStockBiomes; - biomeBorder = SCANcontroller.controller.biomeBorder; - slopeCutoff = SCANcontroller.controller.slopeCutoff; - bottomLowSlopeColor = SCANcontroller.controller.lowSlopeColorOne; - bottemHighSlopeColor = SCANcontroller.controller.highSlopeColorOne; - topLowSlopeColor = SCANcontroller.controller.lowSlopeColorTwo; - topHighSlopeColor = SCANcontroller.controller.highSlopeColorTwo; - windowScale = SCANcontroller.controller.windowScale; - } } public float DefaultMinHeightRange @@ -126,65 +92,5 @@ public string DefaultPalette { get { return defaultPalette; } } - - public Color LowBiomeColor - { - get { return lowBiomeColor; } - } - - public Color HighBiomeColor - { - get { return highBiomeColor; } - } - - public float BiomeTransparency - { - get { return biomeTransparency; } - } - - public bool StockBiomeMap - { - get { return stockBiomeMap; } - } - - public bool BiomeBorder - { - get { return biomeBorder; } - } - - public bool CheatMapFill - { - get { return cheatMapFill; } - } - - public float SlopeCutoff - { - get { return slopeCutoff; } - } - - public Color BottomLowSlopeColor - { - get { return bottomLowSlopeColor; } - } - - public Color BottomHighSlopeColor - { - get { return bottemHighSlopeColor; } - } - - public Color TopLowSlopeColor - { - get { return topLowSlopeColor; } - } - - public Color TopHighSlopeColor - { - get { return topHighSlopeColor; } - } - - public float WindowScale - { - get { return windowScale; } - } } } diff --git a/SCANsat/SCAN_Data/SCANdata.cs b/SCANsat/SCAN_Data/SCANdata.cs index 0eb972a5e..70927e243 100644 --- a/SCANsat/SCAN_Data/SCANdata.cs +++ b/SCANsat/SCAN_Data/SCANdata.cs @@ -25,6 +25,7 @@ using SCANsat.SCAN_Platform; using SCANsat.SCAN_Platform.Palettes; using SCANsat.SCAN_Platform.Palettes.ColorBrewer; +using SCANsat.SCAN_Unity; using palette = SCANsat.SCAN_UI.UI_Framework.SCANpalette; namespace SCANsat.SCAN_Data @@ -54,7 +55,7 @@ internal SCANdata(CelestialBody b) if (heightMaps.ContainsKey(body.flightGlobalsIndex)) built = true; - terrainConfig = SCANcontroller.getTerrainNode(b.name); + terrainConfig = SCANcontroller.getTerrainNode(b.bodyName); if (terrainConfig == null) { @@ -70,12 +71,12 @@ internal SCANdata(CelestialBody b) } catch (Exception e) { - SCANUtil.SCANlog("Error in calculating Max Height for {0}; using default value\n{1}", b.theName, e); + SCANUtil.SCANlog("Error in calculating Max Height for {0}; using default value\n{1}", b.displayName.LocalizeBodyName(), e); newMax = SCANconfigLoader.SCANNode.DefaultMaxHeightRange; } terrainConfig = new SCANterrainConfig(SCANconfigLoader.SCANNode.DefaultMinHeightRange, newMax, clamp, SCANUtil.paletteLoader(SCANconfigLoader.SCANNode.DefaultPalette, 7), 7, false, false, body); - SCANcontroller.addToTerrainConfigData(body.name, terrainConfig); + SCANcontroller.addToTerrainConfigData(body.bodyName, terrainConfig); } } @@ -167,17 +168,27 @@ public SCANanomaly[] Anomalies if (anomalies == null) { PQSSurfaceObject[] sites = body.pqsSurfaceObjects; - //PQSCity[] sites = body.GetComponentsInChildren(true); anomalies = new SCANanomaly[sites.Length]; for (int i = 0; i < sites.Length; ++i) { - anomalies[i] = new SCANanomaly(sites[i].SurfaceObjectName, body.GetLongitude(sites[i].transform.position), body.GetLatitude(sites[i].transform.position), sites[i]); + anomalies[i] = new SCANanomaly(sites[i].SurfaceObjectName + , body.GetLongitude(sites[i].transform.position) + , body.GetLatitude(sites[i].transform.position) + , sites[i]); } } + for (int i = 0; i < anomalies.Length; ++i) { - anomalies[i].Known = SCANUtil.isCovered(anomalies[i].Longitude, anomalies[i].Latitude, this, SCANtype.Anomaly); - anomalies[i].Detail = SCANUtil.isCovered(anomalies[i].Longitude, anomalies[i].Latitude, this, SCANtype.AnomalyDetail); + anomalies[i].Known = SCANUtil.isCovered(anomalies[i].Longitude + , anomalies[i].Latitude + , this + , SCANtype.Anomaly); + + anomalies[i].Detail = SCANUtil.isCovered(anomalies[i].Longitude + , anomalies[i].Latitude + , this + , SCANtype.AnomalyDetail); } return anomalies; } @@ -188,7 +199,6 @@ public SCANanomaly[] Anomalies #region Waypoints private List waypoints; - private bool waypointsLoaded; public void addToWaypoints() { @@ -196,6 +206,12 @@ public void addToWaypoints() return; addToWaypoints(SCANcontroller.controller.LandingTarget); + + if (SCAN_UI_ZoomMap.Instance != null && SCAN_UI_ZoomMap.Instance.IsVisible && SCAN_UI_ZoomMap.Body == body) + SCAN_UI_ZoomMap.Instance.RefreshIcons(); + + if (SCAN_UI_BigMap.Instance != null && SCAN_UI_BigMap.Instance.IsVisible && SCAN_UI_BigMap.Body == body) + SCAN_UI_BigMap.Instance.RefreshIcons(); } public void addToWaypoints(SCANwaypoint w) @@ -225,9 +241,6 @@ public void removeTargetWaypoint() public void addSurveyWaypoints(CelestialBody b, SurveyContract c) { - if (!waypointsLoaded) - return; - if (b != body) return; @@ -265,11 +278,23 @@ public List Waypoints if (HighLogic.CurrentGame.Mode == Game.Modes.CAREER && !SCANcontroller.controller.ContractsLoaded) return new List(); - else if (!waypointsLoaded) + else// if (!waypointsLoaded) { - waypointsLoaded = true; + SCANwaypoint landingTarget = null; + + //waypointsLoaded = true; if (waypoints == null) waypoints = new List(); + else + { + landingTarget = waypoints.FirstOrDefault(w => w.LandingTarget); + + waypoints.Clear(); + } + + if (landingTarget != null) + waypoints.Add(landingTarget); + if (ContractSystem.Instance != null) { var surveys = ContractSystem.Instance.GetCurrentActiveContracts(); @@ -329,19 +354,30 @@ public List Waypoints { if (p.celestialName == body.GetName()) { - if (p.contractReference != null) + bool add = true; + + for (int j = waypoints.Count - 1; j >= 0; j--) { - if (p.contractReference.ContractState == Contract.State.Active) + SCANwaypoint w = waypoints[j]; + + if (w.Seed != p.uniqueSeed) + continue; + + add = false; + break; + } + + if (add) + { + if (p.contractReference != null) { - if (!waypoints.Any(a => a.Way == p)) + if (p.contractReference.ContractState == Contract.State.Active) { waypoints.Add(new SCANwaypoint(p)); } } - } - else if (!waypoints.Any(a => a.Way == p)) - { - waypoints.Add(new SCANwaypoint(p)); + else + waypoints.Add(new SCANwaypoint(p)); } } } @@ -493,7 +529,7 @@ internal void generateHeightMap(ref int step, ref int xStart, int width) if (!heightMaps.ContainsKey(body.flightGlobalsIndex)) heightMaps.Add(body.flightGlobalsIndex, tempHeightMap); tempHeightMap = null; - SCANUtil.SCANlog("Height Map Of [{0}] Completed...", body.theName); + SCANUtil.SCANlog("Height Map Of [{0}] Completed...", body.bodyName); return; } @@ -515,13 +551,13 @@ internal void generateHeightMap(ref int step, ref int xStart, int width) #region Map Utilities /* DATA: debug option to fill in the map */ - internal void fillMap() + internal void fillMap(SCANtype type) { for (int i = 0; i < 360; i++) { for (int j = 0; j < 180; j++) { - coverage[i, j] |= (Int32)SCANtype.Everything; + coverage[i, j] |= (int)type; } } } @@ -541,25 +577,29 @@ internal void fillResourceMap() internal void reset() { coverage = new Int32[360, 180]; - if (SCANcontroller.controller == null) - return; - if (SCANcontroller.controller.mainMap == null) - return; - - SCANcontroller.controller.mainMap.resetImages(); + if (SCAN_UI_MainMap.Instance != null && SCAN_UI_MainMap.Instance.IsVisible) + SCAN_UI_MainMap.Instance.resetImages(); } - internal void resetResources() + internal void reset(SCANtype type) { + SCANtype mask = type; + + mask ^= SCANtype.Everything; + for (int x = 0; x < 360; x++) { for (int y = 0; y < 180; y++) { - coverage[x, y] &= (int)SCANtype.Everything_SCAN; + coverage[x, y] &= (int)mask; } } + + if (SCAN_UI_MainMap.Instance != null && SCAN_UI_MainMap.Instance.IsVisible) + SCAN_UI_MainMap.Instance.resetImages(); } + #endregion #region Data Serialize/Deserialize @@ -599,20 +639,6 @@ private byte[] ConvertToByte(Int32[,] iArray) return iArray; } - //One time conversion of single byte[,] to Int32 to recover old scanning data - private Int32[,] RecoverToInt(byte[,] bArray) - { - Int32[,] iArray = new Int32[360, 180]; - for (int i = 0; i < 360; i++) - { - for (int j = 0; j < 180; j++) - { - iArray[i, j] = (Int32)bArray[i, j]; - } - } - return iArray; - } - /* DATA: serialization and compression */ internal string integerSerialize() { @@ -624,7 +650,7 @@ internal string integerSerialize() return blob.Replace("/", "-").Replace("=", "_"); } - internal void integerDeserialize(string blob, bool b) + internal void integerDeserialize(string blob) { try { @@ -633,17 +659,8 @@ internal void integerDeserialize(string blob, bool b) bytes = SCAN_CLZF2.Decompress(bytes); MemoryStream mem = new MemoryStream(bytes, false); BinaryFormatter binf = new BinaryFormatter(); - if (b) - { - byte[,] bRecover = new byte[360, 180]; - bRecover = (byte[,])binf.Deserialize(mem); - Coverage = RecoverToInt(bRecover); - } - else - { - byte[] bArray = (byte[])binf.Deserialize(mem); - Coverage = ConvertToInt(bArray); - } + byte[] bArray = (byte[])binf.Deserialize(mem); + Coverage = ConvertToInt(bArray); } catch (Exception e) { diff --git a/SCANsat/SCAN_Data/SCANexperimentType.cs b/SCANsat/SCAN_Data/SCANexperimentType.cs new file mode 100644 index 000000000..6c325fdd4 --- /dev/null +++ b/SCANsat/SCAN_Data/SCANexperimentType.cs @@ -0,0 +1,13 @@ +using System; + +namespace SCANsat.SCAN_Data +{ + public enum SCANexperimentType + { + Nothing, + SCANsatAltimetryLoRes, + SCANsatAltimetryHiRes, + SCANsatBiomeAnomaly, + SCANsatResources + } +} diff --git a/SCANsat/SCAN_Data/SCANresourceBody.cs b/SCANsat/SCAN_Data/SCANresourceBody.cs index c97280d59..f18a87b81 100644 --- a/SCANsat/SCAN_Data/SCANresourceBody.cs +++ b/SCANsat/SCAN_Data/SCANresourceBody.cs @@ -37,7 +37,7 @@ internal SCANresourceBody(string rName, CelestialBody Body, float min, float max { resourceName = rName; body = Body; - bodyName = body.name; + bodyName = body.bodyName; index = body.flightGlobalsIndex; lowResourceCutoff = defaultMinValue = min; highResourceCutoff = defaultMaxValue = max; diff --git a/SCANsat/SCAN_Data/SCANresourceGlobal.cs b/SCANsat/SCAN_Data/SCANresourceGlobal.cs index 28f2e2dd2..c2582efc9 100644 --- a/SCANsat/SCAN_Data/SCANresourceGlobal.cs +++ b/SCANsat/SCAN_Data/SCANresourceGlobal.cs @@ -47,12 +47,14 @@ public class SCANresourceGlobal : SCAN_ConfigNodeStorage private Color32 lowColor32; private Color32 highColor32; private float defaultTrans; + private string displayName; private SCANresourceBody currentBody; - internal SCANresourceGlobal(string resource, float trans, float defMin, float defMax, Color minC, Color maxC, SCANresourceType t) + internal SCANresourceGlobal(string resource, string display, float trans, float defMin, float defMax, Color minC, Color maxC, SCANresourceType t) { name = resource; + displayName = display; resourceTransparency = trans; lowResourceColor = minC; highResourceColor = maxC; @@ -73,6 +75,7 @@ public SCANresourceGlobal() internal SCANresourceGlobal(SCANresourceGlobal copy) { name = copy.name; + displayName = copy.displayName; resourceTransparency = copy.resourceTransparency; lowResourceColor = copy.lowResourceColor; highResourceColor = copy.highResourceColor; @@ -179,6 +182,12 @@ public string Name get { return name; } } + public string DisplayName + { + get { return displayName; } + set { displayName = value; } + } + public float Transparency { get { return resourceTransparency; } diff --git a/SCANsat/SCAN_Data/SCANterrainConfig.cs b/SCANsat/SCAN_Data/SCANterrainConfig.cs index 6fea84178..62a7538c4 100644 --- a/SCANsat/SCAN_Data/SCANterrainConfig.cs +++ b/SCANsat/SCAN_Data/SCANterrainConfig.cs @@ -74,7 +74,7 @@ internal SCANterrainConfig(float min, float max, float? clamp, Palette color, in paletteReverse = reverse; paletteDiscrete = discrete; body = b; - name = body.name; + name = body.bodyName; index = body.flightGlobalsIndex; setDefaultValues(); @@ -110,7 +110,7 @@ public override void OnDecodeFromConfigNode() { body = FlightGlobals.Bodies.FirstOrDefault(b => b.flightGlobalsIndex == index); if (body != null) - name = body.name; + name = body.bodyName; else name = "WrongBody" + index; diff --git a/SCANsat/SCAN_Data/SCANtype.cs b/SCANsat/SCAN_Data/SCANtype.cs index e3853d35e..0226c3789 100644 --- a/SCANsat/SCAN_Data/SCANtype.cs +++ b/SCANsat/SCAN_Data/SCANtype.cs @@ -53,8 +53,8 @@ public enum SCANtype : int Science = 524299, // All science collection types AllResources = 2147483584, // All resource types DefinedResources = 536346496, // All defined resource types - MKSResources = 32613504, // All standard MKS/USI resources - KSPIResourece = 437272320, // All KSPI standard resources + MKSResources = 301048960, // All standard MKS/USI resources + KSPIResourece = 437272064, // All KSPI standard resources Everything = Int32.MaxValue // All scanner types } } diff --git a/SCANsat/SCAN_Data/SCANwaypoint.cs b/SCANsat/SCAN_Data/SCANwaypoint.cs index 393f4e00c..b5ebbfafb 100644 --- a/SCANsat/SCAN_Data/SCANwaypoint.cs +++ b/SCANsat/SCAN_Data/SCANwaypoint.cs @@ -28,6 +28,7 @@ internal SCANwaypoint(SurveyWaypointParameter p) { band = reflectFlightBand(p); root = p.Root; + seed = way.uniqueSeed; param = p; name = way.name; Vector2d coords = SCANUtil.fixRetardCoordinates(new Vector2d(way.longitude, way.latitude)); @@ -44,6 +45,7 @@ internal SCANwaypoint(StationaryPointParameter p) { band = FlightBand.NONE; root = p.Root; + seed = way.uniqueSeed; param = p; name = way.name; Vector2d coords = SCANUtil.fixRetardCoordinates(new Vector2d(way.longitude, way.latitude)); @@ -58,6 +60,7 @@ internal SCANwaypoint(Waypoint p) way = p; band = FlightBand.NONE; root = p.contractReference; + seed = way.uniqueSeed; param = null; name = way.name; Vector2d coords = SCANUtil.fixRetardCoordinates(new Vector2d(way.longitude, way.latitude)); @@ -70,6 +73,7 @@ public SCANwaypoint(double lat, double lon, string n) { way = null; band = FlightBand.NONE; + seed = Random.Range(0, int.MaxValue); root = null; param = null; name = n; @@ -82,6 +86,7 @@ public SCANwaypoint(double lat, double lon, string n) private string name; private double longitude; private double latitude; + private int seed; private FlightBand band; private Contract root; private ContractParameter param; @@ -97,6 +102,11 @@ public string Name get { return name; } } + public int Seed + { + get { return seed; } + } + public Contract Root { get { return root; } diff --git a/SCANsat/SCAN_Map/SCANmap.cs b/SCANsat/SCAN_Map/SCANmap.cs index bf545ace0..b66f7f1be 100644 --- a/SCANsat/SCAN_Map/SCANmap.cs +++ b/SCANsat/SCAN_Map/SCANmap.cs @@ -89,6 +89,19 @@ public int MapHeight public mapType MType { get { return mType; } + set { mType = value; } + } + + public bool ColorMap + { + get { return colorMap; } + set { colorMap = value; } + } + + public bool Terminator + { + get { return terminator; } + set { terminator = value; } } public mapSource MSource @@ -110,12 +123,13 @@ public CelestialBody Body public SCANresourceGlobal Resource { get { return resource; } - internal set { resource = value; } + set { resource = value; } } public bool ResourceActive { get { return resourceActive; } + set { resourceActive = value; } } public SCANmapLegend MapLegend @@ -127,6 +141,7 @@ public SCANmapLegend MapLegend public MapProjection Projection { get { return projection; } + set { projection = value; } } internal float[,] Big_HeightMap @@ -179,6 +194,7 @@ internal void setProjection(MapProjection p) { if (projection == p) return; + projection = p; } @@ -204,6 +220,18 @@ internal double projectLongitude(double lon, double lat) { lon = 1.3 * Math.Cos(lat) * Math.Sin(lon) + Math.PI / 2; } + return Mathf.Rad2Deg * lon; + case MapProjection.Orthographic: + lon = Mathf.Deg2Rad * lon; + lat = Mathf.Deg2Rad * lat; + double centerLon = Mathf.Deg2Rad * centeredLong; + double centerLat = Mathf.Deg2Rad * centeredLat; + + if (Math.Sin(centerLat) * Math.Sin(lat) + Math.Cos(centerLat) * Math.Cos(lat) * Math.Cos(lon - centerLon) < 0) + return -200; + + lon = 1.5 * Math.Cos(lat) * Math.Sin(lon - centerLon); + return Mathf.Rad2Deg * lon; default: return lon; @@ -227,6 +255,18 @@ internal double projectLatitude(double lon, double lat) { lat = -1.3 * Math.Cos(lat) * Math.Cos(lon); } + return Mathf.Rad2Deg * lat; + case MapProjection.Orthographic: + lon = Mathf.Deg2Rad * lon; + lat = Mathf.Deg2Rad * lat; + double centerLon = Mathf.Deg2Rad * centeredLong; + double centerLat = Mathf.Deg2Rad * centeredLat; + + if (Math.Sin(centerLat) * Math.Sin(lat) + Math.Cos(centerLat) * Math.Cos(lat) * Math.Cos(lon - centerLon) < 0) + return -200; + + lat = 1.5 * (Math.Cos(centerLat) * Math.Sin(lat) - Math.Sin(centerLat) * Math.Cos(lat) * Math.Cos(lon - centerLon)); + return Mathf.Rad2Deg * lat; default: return lat; @@ -276,6 +316,26 @@ internal double unprojectLongitude(double lon, double lat) if (lon <= -180) lon = -180; return lon; + case MapProjection.Orthographic: + lon = Mathf.Deg2Rad * lon; + lat = Mathf.Deg2Rad * lat; + double centerLon = Mathf.Deg2Rad * centeredLong; + double centerLat = Mathf.Deg2Rad * centeredLat; + + double p2 = Math.Sqrt(lon * lon + lat * lat); + double c2 = Math.Asin(p2/1.5); + + if (Math.Cos(c2) < 0) + return 300; + + lon = centerLon + Math.Atan2(lon * Math.Sin(c2), p2 * Math.Cos(c2) * Math.Cos(centerLat) - lat * Math.Sin(c2) * Math.Sin(centerLat)); + + lon = (Mathf.Rad2Deg * lon + 180) % 360 - 180; + + if (lon <= -180) + lon += 360; + + return lon; default: return lon; } @@ -315,6 +375,20 @@ internal double unprojectLatitude(double lon, double lat) double p = Math.Sqrt(lon * lon + lat * lat); double c = Math.Asin(p); lat = Math.Asin(Math.Cos(c) * Math.Sin(lat0) + (lat * Math.Sin(c) * Math.Cos(lat0)) / (p)); + return Mathf.Rad2Deg * lat; + case MapProjection.Orthographic: + lon = Mathf.Deg2Rad * lon; + lat = Mathf.Deg2Rad * lat; + double centerLat = Mathf.Deg2Rad * centeredLat; + + double p2 = Math.Sqrt(lon * lon + lat * lat); + double c2 = Math.Asin(p2/1.5); + + if (Math.Cos(c2) < 0) + return 300; + + lat = Math.Asin(Math.Cos(c2) * Math.Sin(centerLat) + (lat * Math.Sin(c2) * Math.Cos(centerLat)) / p2); + return Mathf.Rad2Deg * lat; default: return lat; @@ -336,6 +410,14 @@ internal double unprojectLatitude(double lon, double lat) private Color32[] stockBiomeColor; private int startLine; private int stopLine; + double sunLonCenter; + double sunLatCenter; + double gamma; + + internal void setSize(Vector2 size) + { + setSize((int)size.x, (int)size.y); + } internal void setSize(int w, int h, int interpolation = 2, int start = 0, int stop = 0) { @@ -382,9 +464,9 @@ internal void setWidth(int w) pix = new Color32[w]; biomeIndex = new double[w]; stockBiomeColor = new Color32[w]; - resourceMapHeight = SCANcontroller.controller.overlayMapHeight; + resourceMapHeight = SCAN_Settings_Config.Instance.ResourceMapHeight; resourceMapWidth = resourceMapHeight * 2; - resourceInterpolation = SCANcontroller.controller.overlayInterpolation; + resourceInterpolation = SCAN_Settings_Config.Instance.Interpolation; resourceMapScale = resourceMapWidth / 360f; resourceCache = new float[resourceMapWidth, resourceMapHeight]; randomEdges = true; @@ -400,7 +482,10 @@ internal void setWidth(int w) internal void centerAround(double lon, double lat) { - if (projection == MapProjection.Polar) + centeredLong = lon; + centeredLat = lat; + + if (projection == MapProjection.Orthographic) { double lo = projectLongitude(lon, lat); double la = projectLatitude(lon, lat); @@ -412,8 +497,6 @@ internal void centerAround(double lon, double lat) lon_offset = 180 + lon - (mapwidth / mapscale) / 2; lat_offset = 90 + lat - (mapheight / mapscale) / 2; } - centeredLong = lon; - centeredLat = lat; } internal double scaleLatitude(double lat) @@ -485,6 +568,7 @@ private double fixUnscale(double value, int size) private SCANdata data; private SCANmapLegend mapLegend; private int mapstep; // all refs are below + private int mapRedStep; private double[] mapline; // all refs are below private bool pqs; private bool biomeMap; @@ -492,6 +576,9 @@ private double fixUnscale(double value, int size) private float customMax; private float customRange; private bool useCustomRange; + private bool colorMap; + private bool terminator; + private float mapRedlineDraw = 10; /* MAP: nearly trivial functions */ public void setBody(CelestialBody b) @@ -515,13 +602,10 @@ public void setBody(CelestialBody b) if (SCANconfigLoader.GlobalResource) { - resourceActive = SCANcontroller.controller.map_ResourceOverlay; - resource = SCANcontroller.getResourceNode(SCANcontroller.controller.resourceSelection); - if (resource == null) - resource = SCANcontroller.GetFirstResource; - resource.CurrentBodyConfig(body.name); + if (resource != null) + resource.CurrentBodyConfig(body.bodyName); } - } + } public void setCustomRange(float min, float max) { @@ -544,15 +628,61 @@ public void resetMap(bool resourceOn, bool setRes = true) resourceActive = resourceOn; if (SCANconfigLoader.GlobalResource && setRes) { //Make sure that a resource is initialized if necessary - if (resource == null && body != null) - { - resource = SCANcontroller.getResourceNode(SCANcontroller.controller.resourceSelection); - if (resource == null) - resource = SCANcontroller.GetFirstResource; - resource.CurrentBodyConfig(body.name); - } + if (resource != null && body != null) + resource.CurrentBodyConfig(body.bodyName); + resetResourceMap(); } + + switch(mSource) + { + case mapSource.BigMap: + switch (SCAN_Settings_Config.Instance.MapGenerationSpeed) + { + case 1: + mapRedlineDraw = 6; + break; + case 2: + mapRedlineDraw = 3; + break; + case 3: + mapRedlineDraw = 2; + break; + } + break; + case mapSource.ZoomMap: + switch (SCAN_Settings_Config.Instance.MapGenerationSpeed) + { + case 1: + mapRedlineDraw = 6; + break; + case 2: + mapRedlineDraw = 3; + break; + case 3: + mapRedlineDraw = 2; + break; + } + break; + case mapSource.RPM: + mapRedlineDraw = 10; + break; + } + + if (terminator) + { + double sunLon = body.GetLongitude(Planetarium.fetch.Sun.position, false); + double sunLat = body.GetLatitude(Planetarium.fetch.Sun.position, false); + + sunLatCenter = SCANUtil.fixLatShift(sunLat); + + if (sunLatCenter >= 0) + sunLonCenter = SCANUtil.fixLonShift(sunLon + 90); + else + sunLonCenter = SCANUtil.fixLonShift(sunLon - 90); + + gamma = Math.Abs(sunLatCenter) < 0.55 ? 100 : Math.Tan(Mathf.Deg2Rad * (90 - Math.Abs(sunLatCenter))); + } } public void resetMap(mapType mode, bool Cache, bool resourceOn, bool setRes = true) @@ -566,16 +696,16 @@ public void resetResourceMap() { if (mSource != mapSource.ZoomMap) { - if (SCANcontroller.controller.overlayMapHeight != resourceMapHeight) + if (SCAN_Settings_Config.Instance.ResourceMapHeight != resourceMapHeight) { - resourceMapHeight = SCANcontroller.controller.overlayMapHeight; + resourceMapHeight = SCAN_Settings_Config.Instance.ResourceMapHeight; resourceMapWidth = resourceMapHeight * 2; resourceMapScale = resourceMapWidth / 360f; resourceCache = new float[resourceMapWidth, resourceMapHeight]; } - if (SCANcontroller.controller.overlayInterpolation != resourceInterpolation) - resourceInterpolation = SCANcontroller.controller.overlayInterpolation; + if (SCAN_Settings_Config.Instance.Interpolation != resourceInterpolation) + resourceInterpolation = SCAN_Settings_Config.Instance.Interpolation; } for (int i = 0; i < resourceMapWidth; i++ ) @@ -610,7 +740,7 @@ internal void exportPNG() #region Big Map Texture Generator /* MAP: build: map to Texture2D */ - internal Texture2D getPartialMap() + internal Texture2D getPartialMap(bool apply = true) { if (data == null) return new Texture2D(1, 1); @@ -706,11 +836,22 @@ internal Texture2D getPartialMap() continue; } - if (SCANcontroller.controller.useStockBiomes && SCANcontroller.controller.colours == 0) + if (SCAN_Settings_Config.Instance.BigMapStockBiomes && colorMap) { stockBiomeColor[i] = SCANUtil.getBiome(body, lon, lat).mapColor; - if (SCANcontroller.controller.biomeBorder) - biomeIndex[i] = SCANUtil.getBiomeIndexFraction(body, lon, lat); + + switch (mSource) + { + case mapSource.BigMap: + if (SCAN_Settings_Config.Instance.BigMapBiomeBorder) + biomeIndex[i] = SCANUtil.getBiomeIndexFraction(body, lon, lat); + break; + case mapSource.ZoomMap: + case mapSource.RPM: + if (SCAN_Settings_Config.Instance.ZoomMapBiomeBorder) + biomeIndex[i] = SCANUtil.getBiomeIndexFraction(body, lon, lat); + break; + } } else biomeIndex[i] = SCANUtil.getBiomeIndexFraction(body, lon, lat); @@ -732,8 +873,8 @@ internal Texture2D getPartialMap() Color32 baseColor = palette.Grey; pix[i] = baseColor; - int scheme = SCANcontroller.controller.colours; float projVal = 0f; + bool nowColor = colorMap; double lat = (mapstep * 1.0f / mapscale) - 90f + lat_offset; double lon = (i * 1.0f / mapscale) - 180f + lon_offset; double la = lat, lo = lon; @@ -756,11 +897,11 @@ internal Texture2D getPartialMap() } else if (SCANUtil.isCovered(lon, lat, data, SCANtype.Altimetry)) { - projVal = terrainElevation(lon, lat, mapwidth, mapheight, big_heightmap, cache, data, out scheme); + projVal = terrainElevation(lon, lat, mapwidth, mapheight, big_heightmap, cache, data, out nowColor); if (useCustomRange) - baseColor = palette.heightToColor(projVal, scheme, data.TerrainConfig, customMin, customMax, customRange, useCustomRange); + baseColor = palette.heightToColor(projVal, nowColor, data.TerrainConfig, customMin, customMax, customRange, true); else - baseColor = palette.heightToColor(projVal, scheme, data.TerrainConfig); + baseColor = palette.heightToColor(projVal, nowColor, data.TerrainConfig); } break; } @@ -772,7 +913,7 @@ internal Texture2D getPartialMap() } else if (SCANUtil.isCovered(lon, lat, data, SCANtype.Altimetry)) { - projVal = terrainElevation(lon, lat, mapwidth, mapheight, big_heightmap, cache, data, out scheme); + projVal = terrainElevation(lon, lat, mapwidth, mapheight, big_heightmap, cache, data, out nowColor); if (mapstep >= 0) { // This doesn't actually calculate the slope per se, but it's faster @@ -784,20 +925,14 @@ internal Texture2D getPartialMap() if (i < mapline.Length - 1) v1 = Math.Max(v1, mapline[i + 1]); float v = Mathf.Clamp((float)Math.Abs(projVal - v1) / 1000f, 0, 2f); - if (SCANcontroller.controller.colours == 1) - { + if (!colorMap) baseColor = palette.lerp(palette.Black, palette.White, v / 2f); - } else { - if (v < SCANcontroller.controller.slopeCutoff) - { - baseColor = palette.lerp(SCANcontroller.controller.lowSlopeColorOne, SCANcontroller.controller.highSlopeColorOne, v / SCANcontroller.controller.slopeCutoff); - } + if (v < SCAN_Settings_Config.Instance.SlopeCutoff) + baseColor = palette.lerp(SCANcontroller.controller.lowSlopeColorOne32, SCANcontroller.controller.highSlopeColorOne32, v / SCAN_Settings_Config.Instance.SlopeCutoff); else - { - baseColor = palette.lerp(SCANcontroller.controller.lowSlopeColorTwo, SCANcontroller.controller.highSlopeColorTwo, (v - SCANcontroller.controller.slopeCutoff) / (2 -SCANcontroller.controller.slopeCutoff)); - } + baseColor = palette.lerp(SCANcontroller.controller.lowSlopeColorTwo32, SCANcontroller.controller.highSlopeColorTwo32, (v - SCAN_Settings_Config.Instance.SlopeCutoff) / (2 - SCAN_Settings_Config.Instance.SlopeCutoff)); } } mapline[i] = projVal; @@ -807,27 +942,21 @@ internal Texture2D getPartialMap() case mapType.Biome: { if (!biomeMap) - { baseColor = palette.lerp(palette.Black, palette.White, UnityEngine.Random.value); - } else if (SCANUtil.isCovered(lon, lat, data, SCANtype.Biome)) { Color32 biome = palette.Grey; - if (SCANcontroller.controller.colours == 1) + if (!colorMap) { if ((i > 0 && mapline[i - 1] != biomeIndex[i]) || (mapstep > 0 && mapline[i] != biomeIndex[i])) - { biome = palette.White; - } else - { biome = palette.lerp(palette.Black, palette.White, (float)biomeIndex[i]); - } } else { Color32 elevation = palette.Grey; - if (SCANcontroller.controller.biomeTransparency > 0) + if (SCAN_Settings_Config.Instance.BiomeTransparency > 0) { if (!pqs) { @@ -835,7 +964,7 @@ internal Texture2D getPartialMap() } else if (SCANUtil.isCovered(lon, lat, data, SCANtype.Altimetry)) { - projVal = terrainElevation(lon, lat, mapwidth, mapheight, big_heightmap, cache, data, out scheme); + projVal = terrainElevation(lon, lat, mapwidth, mapheight, big_heightmap, cache, data, out nowColor); if (useCustomRange) elevation = palette.lerp(palette.Black, palette.White, Mathf.Clamp(projVal + (-1f * customMin), 0, customRange) / customRange); else @@ -843,18 +972,27 @@ internal Texture2D getPartialMap() } } - if (SCANcontroller.controller.biomeBorder && ((i > 0 && mapline[i - 1] != biomeIndex[i]) || (mapstep > 0 && mapline[i] != biomeIndex[i]))) - { - biome = palette.White; - } - else if (SCANcontroller.controller.useStockBiomes) + bool border = false; + + switch(mSource) { - biome = palette.lerp(stockBiomeColor[i], elevation, SCANcontroller.controller.biomeTransparency / 100f); + case mapSource.BigMap: + if (SCAN_Settings_Config.Instance.BigMapBiomeBorder) + border = true; + break; + case mapSource.ZoomMap: + case mapSource.RPM: + if (SCAN_Settings_Config.Instance.ZoomMapBiomeBorder) + border = true; + break; } + + if (border && ((i > 0 && mapline[i - 1] != biomeIndex[i]) || (mapstep > 0 && mapline[i] != biomeIndex[i]))) + biome = palette.White; + else if (SCAN_Settings_Config.Instance.BigMapStockBiomes) + biome = palette.lerp(stockBiomeColor[i], elevation, SCAN_Settings_Config.Instance.BiomeTransparency); else - { - biome = palette.lerp(palette.lerp(SCANcontroller.controller.lowBiomeColor32, SCANcontroller.controller.highBiomeColor32, (float)biomeIndex[i]), elevation, SCANcontroller.controller.biomeTransparency / 100f); - } + biome = palette.lerp(palette.lerp(SCANcontroller.controller.lowBiomeColor32, SCANcontroller.controller.highBiomeColor32, (float)biomeIndex[i]), elevation, SCAN_Settings_Config.Instance.BiomeTransparency); } baseColor = biome; @@ -870,25 +1008,35 @@ internal Texture2D getPartialMap() switch (projection) { case MapProjection.Rectangular: - { - abundance = getResoureCache(lo, la); - break; - } case MapProjection.KavrayskiyVII: - { + case MapProjection.Polar: abundance = getResoureCache(lon, lat); break; - } - case MapProjection.Polar: - { - if (mSource == mapSource.ZoomMap) - abundance = resourceCache[Mathf.RoundToInt(i * (resourceMapWidth / mapwidth)), Mathf.RoundToInt(mapstep * (resourceMapWidth / mapwidth))]; - else - abundance = getResoureCache(lon, lat); + case MapProjection.Orthographic: + abundance = resourceCache[Mathf.RoundToInt(i * (resourceMapWidth / mapwidth)), Mathf.RoundToInt(mapstep * (resourceMapWidth / mapwidth))]; break; - } } - pix[i] = SCANuiUtil.resourceToColor(baseColor, resource, abundance, data, lon, lat); + baseColor = SCANuiUtil.resourceToColor32(baseColor, resource, abundance, data, lon, lat); + } + + if (terminator) + { + double crossingLat = Math.Atan(gamma * Math.Sin(Mathf.Deg2Rad * lon - Mathf.Deg2Rad * sunLonCenter)); + + if (sunLatCenter >= 0) + { + if (lat < crossingLat * Mathf.Rad2Deg) + pix[i] = palette.lerp(baseColor, palette.Black, 0.5f); + else + pix[i] = baseColor; + } + else + { + if (lat > crossingLat * Mathf.Rad2Deg) + pix[i] = palette.lerp(baseColor, palette.Black, 0.5f); + else + pix[i] = baseColor; + } } else pix[i] = baseColor; @@ -899,29 +1047,45 @@ internal Texture2D getPartialMap() mapstep++; - if (mapstep % 10 == 0 || mapstep >= map.height) + if (apply) + mapRedStep++; + + if (mapRedStep % mapRedlineDraw == 0 || mapstep >= map.height) { + mapRedStep = 0; + if (mapstep < map.height - 1) map.SetPixels32(0, mapstep, map.width, 1, palette.redline); - map.Apply(); + if (apply || mapstep >= map.height) + map.Apply(); } return map; } /* Calculates the terrain elevation based on scanning coverage; fetches data from elevation cache if possible */ - private float terrainElevation(double Lon, double Lat, int w, int h, float[,] heightMap, bool c, SCANdata Data, out int Scheme, bool exporting = false) + private float terrainElevation(double Lon, double Lat, int w, int h, float[,] heightMap, bool c, SCANdata Data, out bool NowColor, bool exporting = false) { float elevation = 0f; - Scheme = SCANcontroller.controller.colours; + NowColor = colorMap; if (SCANUtil.isCovered(Lon, Lat, Data, SCANtype.AltimetryHiRes)) { if (c) { double lon = fixUnscale(unScaleLongitude(Lon), w); double lat = fixUnscale(unScaleLatitude(Lat), h); - elevation = heightMap[Mathf.RoundToInt((float)lon), Mathf.RoundToInt((float)lat)]; + + int ilon = Mathf.RoundToInt((float)lon); + int ilat = Mathf.RoundToInt((float)lat); + + if (ilon >= w) + ilon = w - 1; + + if (ilat >= h) + ilat = h - 1; + + elevation = heightMap[ilon, ilat]; if (elevation == 0f && !exporting) elevation = (float)SCANUtil.getElevation(body, Lon, Lat); } @@ -934,13 +1098,23 @@ private float terrainElevation(double Lon, double Lat, int w, int h, float[,] he { double lon = fixUnscale(unScaleLongitude(Lon), w); double lat = fixUnscale(unScaleLatitude(Lat), h); - elevation = heightMap[((int)(lon * 5)) / 5, ((int)(lat * 5)) / 5]; + + int ilon = ((int)(lon * 5)) / 5; + int ilat = ((int)(lat * 5)) / 5; + + if (ilon >= w) + ilon = w - 1; + + if (ilat >= h) + ilat = h - 1; + + elevation = heightMap[ilon, ilat]; if (elevation == 0f && !exporting) elevation = (float)SCANUtil.getElevation(body, ((int)(Lon * 5)) / 5, ((int)(Lat * 5)) / 5); } else elevation = (float)SCANUtil.getElevation(body, ((int)(Lon * 5)) / 5, ((int)(Lat * 5)) / 5); - Scheme = 1; + NowColor = false; } return elevation; @@ -948,16 +1122,26 @@ private float terrainElevation(double Lon, double Lat, int w, int h, float[,] he public float terrainElevation(double Lon, double Lat, int W, int H, float[,] heightMap, SCANdata Data, bool export = false) { - int i = 0; + bool c = true; - return terrainElevation(Lon, Lat, W, H, heightMap, true, Data, out i, export); + return terrainElevation(Lon, Lat, W, H, heightMap, true, Data, out c, export); } private float getResoureCache(double Lon, double Lat) { double resourceLat = fixUnscale(unScaleLatitude(Lat, resourceMapScale), resourceMapHeight); double resourceLon = fixUnscale(unScaleLongitude(Lon, resourceMapScale), resourceMapWidth); - return resourceCache[Mathf.RoundToInt((float)resourceLon), Mathf.RoundToInt((float)resourceLat)]; + + int ilon = Mathf.RoundToInt((float)resourceLon); + int ilat = Mathf.RoundToInt((float)resourceLat); + + if (ilon >= resourceMapWidth) + ilon = resourceMapWidth - 1; + + if (ilat >= resourceMapHeight) + ilat = resourceMapHeight - 1; + + return resourceCache[ilon, ilat]; } #endregion diff --git a/SCANsat/SCAN_Map/SCANmapExporter.cs b/SCANsat/SCAN_Map/SCANmapExporter.cs index 498ebbb7a..55053938a 100644 --- a/SCANsat/SCAN_Map/SCANmapExporter.cs +++ b/SCANsat/SCAN_Map/SCANmapExporter.cs @@ -38,12 +38,12 @@ public void exportPNG(SCANmap map, SCANdata data) case mapType.Biome: mode = "biome"; break; } - if (map.ResourceActive && SCANconfigLoader.GlobalResource && !string.IsNullOrEmpty(SCANcontroller.controller.resourceSelection)) - mode += "-" + SCANcontroller.controller.resourceSelection; - if (SCANcontroller.controller.colours == 1) + if (map.ResourceActive && SCANconfigLoader.GlobalResource && !string.IsNullOrEmpty(SCANcontroller.controller.bigMapResource)) + mode += "-" + SCANcontroller.controller.bigMapResource; + if (!SCANcontroller.controller.bigMapColor) mode += "-grey"; - string baseFileName = string.Format("{0}_{1}_{2}x{3}", map.Body.name, mode, map.Map.width, map.Map.height); + string baseFileName = string.Format("{0}_{1}_{2}x{3}", map.Body.bodyName, mode, map.Map.width, map.Map.height); if (map.Projection != MapProjection.Rectangular) baseFileName += "_" + map.Projection.ToString(); @@ -58,9 +58,9 @@ public void exportPNG(SCANmap map, SCANdata data) ScreenMessages.PostScreenMessage("SCANsat Map saved: GameData/SCANsat/PluginData/" + filename, 8, ScreenMessageStyle.UPPER_CENTER); - SCANUtil.SCANlog("Map of [{0}] saved\nMap Size: {1} X {2}\nMinimum Altitude: {3:F0}m; Maximum Altitude: {4:F0}m\nPixel Width At Equator: {5:F6}m", map.Body.theName, map.Map.width, map.Map.height, data.TerrainConfig.MinTerrain, data.TerrainConfig.MaxTerrain, (map.Body.Radius * 2 * Math.PI) / (map.Map.width * 1f)); + SCANUtil.SCANlog("Map of [{0}] saved\nMap Size: {1} X {2}\nMinimum Altitude: {3:F0}m; Maximum Altitude: {4:F0}m\nPixel Width At Equator: {5:F6}m", map.Body.displayName.LocalizeBodyName(), map.Map.width, map.Map.height, data.TerrainConfig.MinTerrain, data.TerrainConfig.MaxTerrain, (map.Body.Radius * 2 * Math.PI) / (map.Map.width * 1f)); - if (SCANcontroller.controller.exportCSV && map.MType == mapType.Altimetry) + if (SCAN_Settings_Config.Instance.ExportCSV && map.MType == mapType.Altimetry) StartCoroutine(exportCSV(path, baseFileName, map, data)); else exporting = false; diff --git a/SCANsat/SCAN_Map/SCANmapLegend.cs b/SCANsat/SCAN_Map/SCANmapLegend.cs index 2cf066dfa..77de1de4d 100644 --- a/SCANsat/SCAN_Map/SCANmapLegend.cs +++ b/SCANsat/SCAN_Map/SCANmapLegend.cs @@ -11,6 +11,7 @@ */ #endregion +using System; using SCANsat.SCAN_Platform.Palettes; using SCANsat.SCAN_Data; using palette = SCANsat.SCAN_UI.UI_Framework.SCANpalette; @@ -24,7 +25,9 @@ public class SCANmapLegend private Texture2D legend; private float legendMin, legendMax; private Palette dataPalette; - private int legendScheme; + private bool legendScheme; + private bool stockScheme; + private CelestialBody body; public Texture2D Legend { @@ -32,50 +35,139 @@ public Texture2D Legend set { legend = value; } } - internal Texture2D getLegend(float min, float max, int scheme, SCANterrainConfig terrain) + public Texture2D getLegend(bool color, SCANterrainConfig terrain) { - if (legend != null && legendMin == min && legendMax == max && legendScheme == scheme && terrain.ColorPal.hash == dataPalette.hash) + if (legend != null && legendMin == terrain.MinTerrain && legendMax == terrain.MaxTerrain && legendScheme == color && terrain.ColorPal.hash == dataPalette.hash) return legend; + + body = null; + + legend = new Texture2D(256, 1, TextureFormat.RGB24, false); + legendMin = terrain.MinTerrain; + legendMax = terrain.MaxTerrain; + legendScheme = color; + dataPalette = terrain.ColorPal; + Color32[] pix = new Color32[256]; + for (int x = 0; x < 256; ++x) + { + float val = (x * (legendMax - legendMin)) / 256f + legendMin; + pix[x] = palette.heightToColor(val, color, terrain); + } + legend.SetPixels32(pix); + legend.Apply(); + return legend; + } + + public Texture2D getLegend(float min, float max, bool color, SCANterrainConfig terrain) + { + if (legend != null && legendMin == min && legendMax == max && legendScheme == color && terrain.ColorPal.hash == dataPalette.hash) + return legend; + legend = new Texture2D(256, 1, TextureFormat.RGB24, false); legendMin = min; - legendMax = max; - legendScheme = scheme; + legendMin = max; + legendScheme = color; dataPalette = terrain.ColorPal; - Color[] pix = legend.GetPixels(); + Color32[] pix = new Color32[256]; for (int x = 0; x < 256; ++x) { float val = (x * (max - min)) / 256f + min; - pix[x] = palette.heightToColor(val, scheme, terrain); + pix[x] = palette.heightToColor(val, color, terrain, min, max, max - min, true); + } + legend.SetPixels32(pix); + legend.Apply(); + return legend; + } + + public Texture2D getLegend(SCANdata data, bool color, bool stock, CBAttributeMapSO.MapAttribute[] biomes, bool reset = false) + { + if (legend != null && legendScheme == color && stockScheme == stock && body == data.Body && !reset) + return legend; + + dataPalette = new Palette(); + + legend = new Texture2D(256, 1, TextureFormat.RGB24, false); + body = data.Body; + legendScheme = color; + stockScheme = stock; + + Color32[] pix = new Color32[256]; + + int count = biomes.Length; + + int blockSize = (int)Math.Truncate(256 / (count * 1d)); + + int total = 0; + + for (int i = 0; i < count; i++) + { + for (int j = 0; j < blockSize; j++) + { + if (total >= 256) + break; + + int current = i * blockSize + j; + + if (stock && color) + pix[current] = biomes[i].mapColor; + else if (color) + pix[current] = palette.lerp(SCANcontroller.controller.lowBiomeColor32, SCANcontroller.controller.highBiomeColor32, (float)((i * 1f) / (count * 1f))); + else + pix[current] = palette.lerp(palette.Black, palette.White, (float)(i * 1f) / (count * 1f)); + + total++; + } + } + + int remaining = 256 - count * blockSize; + int backCount = remaining; + + for (int i = 0; i < remaining; i++) + { + if (total > 256 || backCount <= 0) + break; + + if (SCAN_Settings_Config.Instance.BigMapStockBiomes && color) + pix[256 - backCount] = biomes[count - 1].mapColor; + else if (color) + pix[256 - backCount] = palette.lerp(SCANcontroller.controller.lowBiomeColor32, SCANcontroller.controller.highBiomeColor32, (float)(((count - 1) * 1f) / (count * 1f))); + else + pix[256 - backCount] = palette.lerp(palette.Black, palette.White, (float)(((count - 1) * 1f) / (count * 1f))); + + backCount--; + + total++; } - legend.SetPixels(pix); + + legend.SetPixels32(pix); legend.Apply(); return legend; } - internal Texture2D getLegend(int scheme, SCANterrainConfig terrain) + public static Texture2D getStaticLegend(SCANterrainConfig terrain) { Texture2D t = new Texture2D(256, 1, TextureFormat.RGB24, false); - Color[] pix = t.GetPixels(); + Color32[] pix = new Color32[256]; for (int x = 0; x < 256; ++x) { float val = (x * (terrain.MaxTerrain - terrain.MinTerrain)) / 256f + terrain.MinTerrain; - pix[x] = palette.heightToColor(val, scheme, terrain); + pix[x] = palette.heightToColor(val, true, terrain); } - t.SetPixels(pix); + t.SetPixels32(pix); t.Apply(); return t; } - internal Texture2D getLegend(float max, float min, float range, float? clamp, bool discrete, Color32[] c) + public static Texture2D getStaticLegend(float max, float min, float range, float? clamp, bool discrete, Color32[] c) { Texture2D t = new Texture2D(128, 1, TextureFormat.RGB24, false); - Color[] pix = t.GetPixels(); + Color32[] pix = new Color32[128]; for (int x = 0; x < 128; x++) { float val = (x * (max - min)) / 128f + min; pix[x] = palette.heightToColor(val, max, min, range, clamp, discrete, c); } - t.SetPixels(pix); + t.SetPixels32(pix); t.Apply(); return t; } diff --git a/SCANsat/SCAN_Map/SCANmapProjection.cs b/SCANsat/SCAN_Map/SCANmapProjection.cs index e36c6f447..f16bfea12 100644 --- a/SCANsat/SCAN_Map/SCANmapProjection.cs +++ b/SCANsat/SCAN_Map/SCANmapProjection.cs @@ -34,5 +34,6 @@ public enum MapProjection Rectangular = 0, KavrayskiyVII = 1, Polar = 2, + Orthographic = 3, } } diff --git a/SCANsat/SCAN_PartModules/SCANRPMStorage.cs b/SCANsat/SCAN_PartModules/SCANRPMStorage.cs index 59c1fee40..feb41ab00 100644 --- a/SCANsat/SCAN_PartModules/SCANRPMStorage.cs +++ b/SCANsat/SCAN_PartModules/SCANRPMStorage.cs @@ -35,9 +35,9 @@ public override void OnLoad(ConfigNode node) continue; int m = RPMNode.parse("Mode", (int)0); - int c = RPMNode.parse("Color", (int)0); int z = RPMNode.parse("Zoom", (int)0); int r = RPMNode.parse("Resource", (int)0); + bool c = RPMNode.parse("Color", true); bool lines = RPMNode.parse("Lines", true); bool anom = RPMNode.parse("Anomalies", true); bool resource = RPMNode.parse("DrawResource", true); @@ -58,9 +58,9 @@ public override void OnSave(ConfigNode node) ConfigNode RPMProp = new ConfigNode("Prop"); RPMProp.AddValue("Prop ID", RPMMFD.RPMID); RPMProp.AddValue("Mode", RPMMFD.RPMMode); - RPMProp.AddValue("Color", RPMMFD.RPMColor); RPMProp.AddValue("Zoom", RPMMFD.RPMZoom); RPMProp.AddValue("Resource", RPMMFD.RPMResource); + RPMProp.AddValue("Color", RPMMFD.RPMColor); RPMProp.AddValue("Lines", RPMMFD.RPMLines); RPMProp.AddValue("Anomalies", RPMMFD.RPMAnomaly); RPMProp.AddValue("DrawResource", RPMMFD.RPMDrawResource); diff --git a/SCANsat/SCAN_PartModules/SCANexperiment.cs b/SCANsat/SCAN_PartModules/SCANexperiment.cs new file mode 100644 index 000000000..cc8642969 --- /dev/null +++ b/SCANsat/SCAN_PartModules/SCANexperiment.cs @@ -0,0 +1,341 @@ +#region license +/* [Scientific Committee on Advanced Navigation] + * S.C.A.N. Satellite + * + * SCANexperiment - Part module for controlling science experiments + * + * Copyright (c)2013 damny; + * Copyright (c)2014 technogeeky ; + * Copyright (c)2014 (Your Name Here) ; see LICENSE.txt for licensing details. + */ +#endregion + +using System; +using System.Collections.Generic; +using System.Linq; +using SCANsat.SCAN_Data; +using KSP.UI.Screens.Flight.Dialogs; +using KSP.Localization; + +namespace SCANsat.SCAN_PartModules +{ + public class SCANexperiment : PartModule, IScienceDataContainer + { + [KSPField] + public string experimentType; + + private SCANexperimentType expType; + private List storedData = new List(); + private ExperimentsResultDialog expDialog = null; + + public override void OnStart(PartModule.StartState state) + { + base.OnStart(state); + + try + { + expType = (SCANexperimentType)Enum.Parse(typeof(SCANexperimentType), experimentType); + } + catch (Exception e) + { + expType = SCANexperimentType.Nothing; + SCANUtil.SCANlog("Error assigning SCANsat experiment type - Type: {0}\n{1}", experimentType, e); + } + + if (expType == SCANexperimentType.Nothing) + { + Events["analyze"].active = false; + Actions["analyzeData"].active = false; + } + else + { + Events["analyze"].active = true; + Actions["analyzeData"].active = false; + } + + UpdateEventNames(); + } + + private void UpdateEventNames() + { + string dataType = ""; + + switch(expType) + { + case SCANexperimentType.SCANsatAltimetryLoRes: + dataType = "RADAR"; + break; + case SCANexperimentType.SCANsatAltimetryHiRes: + dataType = "SAR"; + break; + case SCANexperimentType.SCANsatBiomeAnomaly: + dataType = "Multispectral"; + break; + case SCANexperimentType.SCANsatResources: + dataType = "Resources"; + break; + } + + Events["analyze"].guiName = string.Format("{0}: {1}", Localizer.Format("#autoLOC_SCANsat_Analyze"), dataType); + Events["reviewEvent"].guiName = string.Format("{0}: {1}", Localizer.Format("#autoLOC_502204"), dataType); + Events["EVACollect"].guiName = string.Format("{0}: {1}", Localizer.Format("#autoLOC_6004057"), dataType); + Actions["analyzeData"].guiName = string.Format("{0}: {1}", Localizer.Format("#autoLOC_SCANsat_Analyze"), dataType); + } + + private void Update() + { + Events["reviewEvent"].active = storedData.Count > 0; + Events["EVACollect"].active = storedData.Count > 0; + } + + public override void OnLoad(ConfigNode node) + { + if (node.HasNode("ScienceData")) + { + foreach (ConfigNode storedDataNode in node.GetNodes("ScienceData")) + { + ScienceData data = new ScienceData(storedDataNode); + storedData.Add(data); + } + } + } + + public override void OnSave(ConfigNode node) + { + node.RemoveNodes("ScienceData"); + + foreach (ScienceData SCANData in storedData) + { + ConfigNode storedDataNode = node.AddNode("ScienceData"); + SCANData.Save(storedDataNode); + } + } + + + [KSPEvent(guiActiveUnfocused = true, guiName = "Collect Stored Data", externalToEVAOnly = true, unfocusedRange = 1.5f, active = false)] + public void EVACollect() + { + List EVACont = FlightGlobals.ActiveVessel.FindPartModulesImplementing(); + if (storedData.Count > 0) + { + if (EVACont.First().StoreData(new List() { this }, false)) + { + foreach (ScienceData data in storedData) + DumpData(data); + } + } + } + + [KSPEvent(guiActive = true, guiName = "Analyze Data", active = true)] + public void analyze() + { + gatherScienceData(); + } + + [KSPAction("Analyze Data")] + public void analyzeData(KSPActionParam param) + { + gatherScienceData(); + } + + public void gatherScienceData(bool silent = false) + { + makeScienceData(); + + if (!silent) + ReviewData(); + } + + [KSPEvent(guiActive = true, guiName = "Review Data", active = false)] + public void reviewEvent() + { + ReviewData(); + } + + private void makeScienceData() + { + storedData.Clear(); + ScienceData sd = getAvailableScience(); + if (sd == null) + return; + storedData.Add(sd); + } + + private ScienceData getAvailableScience() + { + SCANdata data = SCANUtil.getData(vessel.mainBody); + + if (data == null) + return null; + + ScienceData sd = null; + ScienceExperiment se = null; + ScienceSubject su = null; + float coverage = 0; + float multiplier = 1f; + + switch (expType) + { + case SCANexperimentType.SCANsatAltimetryLoRes: + if (vessel.mainBody.pqsController == null) + multiplier = 0.5f; + + coverage = (float)SCANUtil.getCoveragePercentage(data, SCANtype.AltimetryLoRes); + + coverage = GetScienceCoverage(expType.ToString(), ref se, ref su, coverage, multiplier); + break; + case SCANexperimentType.SCANsatAltimetryHiRes: + if (vessel.mainBody.pqsController == null) + multiplier = 0.5f; + + coverage = (float)SCANUtil.getCoveragePercentage(data, SCANtype.AltimetryHiRes); + + coverage = GetScienceCoverage(expType.ToString(), ref se, ref su, coverage, multiplier); + break; + case SCANexperimentType.SCANsatBiomeAnomaly: + if (vessel.mainBody.BiomeMap == null) + multiplier = 0.5f; + + coverage = (float)SCANUtil.getCoveragePercentage(data, SCANtype.Biome); + + coverage = GetScienceCoverage(expType.ToString(), ref se, ref su, coverage, multiplier); + break; + case SCANexperimentType.SCANsatResources: + coverage = (float)SCANUtil.getCoveragePercentage(data, SCANtype.FuzzyResources); + + coverage = GetScienceCoverage(expType.ToString(), ref se, ref su, coverage, multiplier); + break; + } + + if (su == null || se == null) + return null; + + su.scientificValue = 1; + + coverage = Math.Max(0, (coverage - su.science)); + coverage /= su.subjectValue; + + if (coverage <= 0) + coverage = 0.0000001f; + + string title = Localizer.Format("#autoLOC_301689", se.experimentTitle, vessel.mainBody.displayName.LocalizeBodyName()); + + su.title = title; + + sd = new ScienceData(coverage * su.dataScale, 1, 0, su.id, su.title, false, part.flightID); + return sd; + } + + private float GetScienceCoverage(string scienceID, ref ScienceExperiment se, ref ScienceSubject su, float coverage, float mult) + { + se = ResearchAndDevelopment.GetExperiment(scienceID); + + if (se == null) + return 0; + + su = ResearchAndDevelopment.GetExperimentSubject(se, ExperimentSituations.InSpaceHigh, vessel.mainBody, "", ""); + + if (su == null) + return 0; + + su.scienceCap *= mult; + + if (coverage > 95) + coverage = 100; + else if (coverage < 30) + coverage = 0; + + coverage /= 100; + + coverage *= su.scienceCap; + + return coverage; + } + + public ScienceData[] GetData() + { + return storedData.ToArray(); + } + + public void ReturnData(ScienceData data) + { + if (data == null) + return; + + storedData.Clear(); + + storedData.Add(data); + } + + private void KeepData(ScienceData data) + { + expDialog = null; + } + + private void TransmitData(ScienceData data) + { + expDialog = null; + + IScienceDataTransmitter bestTransmitter = ScienceUtil.GetBestTransmitter(vessel); + + if (bestTransmitter != null) + { + bestTransmitter.TransmitData(new List { data }); + DumpData(data); + } + else if (CommNet.CommNetScenario.CommNetEnabled) + ScreenMessages.PostScreenMessage(Localizer.Format("#autoLOC_237738"), 3f, ScreenMessageStyle.UPPER_CENTER); + else + ScreenMessages.PostScreenMessage(Localizer.Format("#autoLOC_237740"), 3f, ScreenMessageStyle.UPPER_CENTER); + } + + private void LabData(ScienceData data) + { + expDialog = null; + ScienceLabSearch labSearch = new ScienceLabSearch(vessel, data); + + if (labSearch.NextLabForDataFound) + { + StartCoroutine(labSearch.NextLabForData.ProcessData(data, null)); + DumpData(data); + } + else + labSearch.PostErrorToScreen(); + } + + public void DumpData(ScienceData data) + { + expDialog = null; + + if (storedData.Contains(data)) + storedData.Remove(data); + } + + public void ReviewDataItem(ScienceData sd) + { + ReviewData(); + } + + public void ReviewData() + { + if (storedData.Count < 1) + return; + + expDialog = null; + ScienceData sd = storedData[0]; + expDialog = ExperimentsResultDialog.DisplayResult( + new ExperimentResultDialogPage( + part, sd, 1f, 0f, false, "", true, new ScienceLabSearch(vessel, sd), DumpData, KeepData, TransmitData, LabData)); + } + + public bool IsRerunnable() + { + return true; + } + + public int GetScienceCount() + { + return storedData.Count; + } + } +} diff --git a/SCANsat/SCAN_PartModules/SCANhiDefCamera.cs b/SCANsat/SCAN_PartModules/SCANhiDefCamera.cs deleted file mode 100644 index 2b72ec25e..000000000 --- a/SCANsat/SCAN_PartModules/SCANhiDefCamera.cs +++ /dev/null @@ -1,175 +0,0 @@ -#region license -/* [Scientific Committee on Advanced Navigation] - * S.C.A.N. Satellite - * - * SCANhiDefCamera - Controls modified zoom map - * - * Copyright (c)2013 damny; - * Copyright (c)2014 technogeeky ; - * Copyright (c)2014 DMagic - * Copyright (c)2014 (Your Name Here) ; see LICENSE.txt for licensing details. - */ -#endregion - -using System; -using System.Collections.Generic; -using System.Linq; -using SCANsat.SCAN_UI; -using UnityEngine; - -namespace SCANsat.SCAN_PartModules -{ - public class SCANhiDefCamera : PartModule, IAnimatedModule - { - //[KSPField] - //public float minZoom = 2; - //[KSPField] - //public float maxZoom = 1000; - //[KSPField] - //public bool hiDetailOnly; - - //private List stockCameras; - - private bool activated; - private bool refreshState; - - //public override void OnStart(PartModule.StartState state) - //{ - // if (state == StartState.Editor) - // return; - - // part.force_activate(); - // this.isEnabled = true; - // activated = true; - // refreshState = true; - - // //stockCameras = findCameras(); - - // minZoom = clampValue(minZoom, 1, 10); - // maxZoom = clampValue(maxZoom, 10, 1000); - - // Events["toggleSCANHiDef"].guiName = "Toggle Map"; - // Events["resetCenter"].guiName = "Reset Map Center"; - //} - - //private void OnDestroy() - //{ - // Events["resetCenter"].active = false; - //} - - //private List findCameras() - //{ - // return part.FindModulesImplementing().ToList(); - //} - - private float clampValue (float value, float min, float max) - { - return Mathf.Clamp(value, min, max); - } - - //private void Update() - //{ - // if (!activated) - // { - // Events["toggleSCANHiDef"].active = false; - // return; - // } - - // if (!HighLogic.LoadedSceneIsFlight || !FlightGlobals.ready) - // return; - - // if (SCANcontroller.controller == null) - // return; - - // if (refreshState) - // { - // if (SCANcontroller.controller.disableStockResource) - // disableConnectedModules(); - // refreshState = false; - // } - - // if (!SCANcontroller.controller.disableStockResource) - // { - // Events["toggleSCANHiDef"].active = false; - // return; - // } - - // Events["toggleSCANHiDef"].active = true; - //} - - //[KSPEvent(guiActive = true, active = false)] - //public void toggleSCANHiDef() - //{ - // if (SCANcontroller.controller.hiDefMap == null) - // { - // SCANcontroller.controller.hiDefMap = gameObject.AddComponent(); - // } - - // if (!SCANcontroller.controller.hiDefMap.Visible) - // { - // SCANcontroller.controller.hiDefMap.setMapCenter(SCANUtil.fixLatShift(vessel.latitude), SCANUtil.fixLonShift(vessel.longitude), hiDetailOnly || SCANcontroller.controller.hiDetailZoomMap, null, false, this); - // } - // else - // SCANcontroller.controller.hiDefMap.closeMap(); - - // Events["resetCenter"].active = SCANcontroller.controller.hiDefMap.Visible; - //} - - //[KSPEvent(guiActive = true, active = false)] - //public void resetCenter() - //{ - // if (SCANcontroller.controller.hiDefMap == null) - // return; - - // SCANcontroller.controller.hiDefMap.setMapCenter(SCANUtil.fixLatShift(vessel.latitude), SCANUtil.fixLonShift(vessel.longitude), hiDetailOnly || SCANcontroller.controller.hiDetailZoomMap, null, false, this); - //} - - private void enableConnectedModules() - { - //if (stockCameras != null) - //{ - // foreach (ModuleHighDefCamera m in stockCameras) - // { - // m.EnableModule(); - // } - //} - } - - private void disableConnectedModules() - { - //if (stockCameras != null) - //{ - // foreach (ModuleHighDefCamera m in stockCameras) - // { - // m.DisableModule(); - // } - //} - } - - public void EnableModule() - { - activated = true; - if (SCANcontroller.controller != null && SCANcontroller.controller.disableStockResource) - disableConnectedModules(); - } - - public void DisableModule() - { - activated = false; - Events["resetCenter"].active = false; - if (SCANcontroller.controller != null && SCANcontroller.controller.disableStockResource) - disableConnectedModules(); - } - - public bool ModuleIsActive() - { - return activated; - } - - public bool IsSituationValid() - { - return true; - } - - } -} diff --git a/SCANsat/SCAN_PartModules/SCANresourceDisplay.cs b/SCANsat/SCAN_PartModules/SCANresourceDisplay.cs index f8c4b77d2..11a8d7bb4 100644 --- a/SCANsat/SCAN_PartModules/SCANresourceDisplay.cs +++ b/SCANsat/SCAN_PartModules/SCANresourceDisplay.cs @@ -15,6 +15,7 @@ using System.Collections.Generic; using System.Linq; using SCANsat.SCAN_Data; +using KSP.Localization; namespace SCANsat.SCAN_PartModules { @@ -22,7 +23,7 @@ public class SCANresourceDisplay : PartModule, IAnimatedModule { [KSPField] public int sensorType; - [KSPField(guiActive = true, guiName = "Abundance")] + [KSPField(guiActive = true)] public string abundanceField; [KSPField] public string ResourceName; @@ -41,18 +42,22 @@ public class SCANresourceDisplay : PartModule, IAnimatedModule private bool fuzzy; private bool refreshState; private bool activated; + private string resourceDisplayName; public override void OnStart(PartModule.StartState state) { if (state == StartState.Editor) return; + Fields["abundanceField"].guiName = Localizer.Format("#autoLOC_SCANsat_Abundance"); + GameEvents.onVesselSOIChanged.Add(onSOIChange); part.force_activate(); this.isEnabled = true; activated = true; refreshState = true; + resourceDisplayName = SCANUtil.displayNameFromResource(ResourceName); stockScanners = findScanners(); animGroup = findAnimator(); @@ -90,7 +95,7 @@ private void setupFields(ModuleResourceScanner m) RequiresUnlock = true; } - Fields["abundanceField"].guiName = string.Format("{0}[Surf]", ResourceName); + Fields["abundanceField"].guiName = string.Format("{0}[{1}]", resourceDisplayName, Localizer.Format("#autoLOC_SCANsat_Surface")); } private void OnDestroy() @@ -109,17 +114,14 @@ private void Update() if (!HighLogic.LoadedSceneIsFlight || !FlightGlobals.ready) return; - if (SCANcontroller.controller == null) - return; - if (refreshState) { - if (SCANcontroller.controller.disableStockResource) + if (SCAN_Settings_Config.Instance.DisableStockResource) disableConnectedScanners(); refreshState = false; } - if (!SCANcontroller.controller.disableStockResource) + if (!SCAN_Settings_Config.Instance.DisableStockResource) { Fields["abundanceField"].guiActive = false; return; @@ -129,12 +131,12 @@ private void Update() if (tooHigh) { - abundanceField = "Too High"; + abundanceField = Localizer.Format("#autoLOC_SCANsat_TooHigh"); return; } else if (abundanceValue < 0) { - abundanceField = "No Data"; + abundanceField = Localizer.Format("#autoLOC_SCANsat_NoData"); return; } @@ -143,7 +145,7 @@ private void Update() if (body.BiomeMap != null) biome = SCANUtil.getBiomeName(body, SCANUtil.fixLonShift(vessel.longitude), SCANUtil.fixLatShift(vessel.latitude)); - if (checkBiome(biome) || !SCANcontroller.controller.resourceBiomeLock) + if (checkBiome(biome) || !SCAN_Settings_Config.Instance.BiomeLock) { if (fuzzy) abundanceField = abundanceValue.ToString("P0"); @@ -185,12 +187,12 @@ private void FixedUpdate() double lon = SCANUtil.fixLonShift(vessel.longitude); if (SCANUtil.isCovered(lon, lat, vessel.mainBody, sensorType)) { - abundanceValue = SCANUtil.ResourceOverlay(lat, lon, ResourceName, vessel.mainBody, RequiresUnlock && SCANcontroller.controller.resourceBiomeLock); + abundanceValue = SCANUtil.ResourceOverlay(lat, lon, ResourceName, vessel.mainBody, RequiresUnlock && SCAN_Settings_Config.Instance.BiomeLock); fuzzy = false; } else if (SCANUtil.isCovered(lon, lat, vessel.mainBody, 524288)) { - abundanceValue = SCANUtil.ResourceOverlay(lat, lon, ResourceName, vessel.mainBody, RequiresUnlock && SCANcontroller.controller.resourceBiomeLock); + abundanceValue = SCANUtil.ResourceOverlay(lat, lon, ResourceName, vessel.mainBody, RequiresUnlock && SCAN_Settings_Config.Instance.BiomeLock); fuzzy = true; } else @@ -240,14 +242,14 @@ private void enableConnectedScanners() public void EnableModule() { activated = true; - if (SCANcontroller.controller != null && SCANcontroller.controller.disableStockResource) + if (SCAN_Settings_Config.Instance.DisableStockResource) disableConnectedScanners(); } public void DisableModule() { activated = false; - if (SCANcontroller.controller != null && SCANcontroller.controller.disableStockResource) + if (SCAN_Settings_Config.Instance.DisableStockResource) disableConnectedScanners(); } diff --git a/SCANsat/SCAN_PartModules/SCANresourceScanner.cs b/SCANsat/SCAN_PartModules/SCANresourceScanner.cs index c23ad044a..37db1e233 100644 --- a/SCANsat/SCAN_PartModules/SCANresourceScanner.cs +++ b/SCANsat/SCAN_PartModules/SCANresourceScanner.cs @@ -14,6 +14,7 @@ using System.Collections.Generic; using System.Linq; using SCANsat.SCAN_Data; +using KSP.Localization; namespace SCANsat.SCAN_PartModules { @@ -33,10 +34,9 @@ public override void OnStart(PartModule.StartState state) Actions["startScanAction"].active = false; Actions["stopScanAction"].active = false; Actions["toggleScanAction"].active = false; - Actions["analyzeData"].active = false; - Actions["startResourceScanAction"].guiName = "Start " + scanName; - Actions["stopResourceScanAction"].guiName = "Stop " + scanName; - Actions["toggleResourceScanAction"].guiName = "Toggle " + scanName; + Actions["startResourceScanAction"].guiName = string.Format("{0}: {1}", Localizer.Format("#autoLOC_SCANsat_StartScan"), scanName); + Actions["stopResourceScanAction"].guiName = string.Format("{0}: {1}", Localizer.Format("#autoLOC_SCANsat_StopScan"), scanName); + Actions["toggleResourceScanAction"].guiName = string.Format("{0}: {1}", Localizer.Format("#autoLOC_SCANsat_ToggleScan"), scanName); if (state == StartState.Editor) return; @@ -86,7 +86,6 @@ override protected void Update() { base.Events["startScan"].active = false; base.Events["stopScan"].active = false; - base.Events["analyze"].active = false; if (scanning && loaded) unregisterScanner(); return; @@ -104,7 +103,7 @@ override protected void Update() { refreshState = false; - if (SCANcontroller.controller.disableStockResource) + if (SCAN_Settings_Config.Instance.DisableStockResource) { if (mSurvey != null) { @@ -121,13 +120,12 @@ override protected void Update() loaded = true; } - if (!SCANcontroller.controller.easyModeScanning || SCANcontroller.controller.disableStockResource) + if (!SCAN_Settings_Config.Instance.InstantScan || SCAN_Settings_Config.Instance.DisableStockResource) updateEvents(); else { base.Events["startScan"].active = false; base.Events["stopScan"].active = false; - base.Events["analyze"].active = false; if (scanning) unregisterScanner(); } @@ -136,7 +134,7 @@ override protected void Update() [KSPAction("Start Resource Scan")] public void startResourceScanAction(KSPActionParam param) { - if (!SCANcontroller.controller.easyModeScanning || SCANcontroller.controller.disableStockResource) + if (!SCAN_Settings_Config.Instance.InstantScan || SCAN_Settings_Config.Instance.DisableStockResource) { if (animGroup != null && !scanning && !animGroup.isDeployed) animGroup.DeployModule(); @@ -157,7 +155,7 @@ public void toggleResourceScanAction(KSPActionParam param) stopScan(); else { - if (!SCANcontroller.controller.easyModeScanning || SCANcontroller.controller.disableStockResource) + if (!SCAN_Settings_Config.Instance.InstantScan || SCAN_Settings_Config.Instance.DisableStockResource) { if (animGroup != null && !animGroup.isDeployed) animGroup.DeployModule(); @@ -171,11 +169,10 @@ public void DisableModule() activated = false; base.Events["startScan"].active = false; base.Events["stopScan"].active = false; - base.Events["analyze"].active = false; if (scanning && loaded) unregisterScanner(); - if (SCANcontroller.controller != null && SCANcontroller.controller.disableStockResource) + if (SCAN_Settings_Config.Instance.DisableStockResource) { if (mSurvey != null) { @@ -194,10 +191,8 @@ public void DisableModule() public void EnableModule() { activated = true; - if (SCANcontroller.controller != null && SCANcontroller.controller.disableStockResource) + if (SCAN_Settings_Config.Instance.DisableStockResource) { - base.Events["analyze"].active = (sensorType & (int)SCANtype.FuzzyResources) != 0; - if (mSurvey != null) { foreach (ModuleOrbitalSurveyor m in mSurvey) diff --git a/SCANsat/SCAN_PartModules/SCANsat.cs b/SCANsat/SCAN_PartModules/SCANsat.cs index 5bb17b932..06ddf2a62 100644 --- a/SCANsat/SCAN_PartModules/SCANsat.cs +++ b/SCANsat/SCAN_PartModules/SCANsat.cs @@ -16,20 +16,46 @@ using SCANsat.SCAN_Data; using SCANsat.SCAN_Toolbar; using SCANsat.SCAN_UI; +using SCANsat.SCAN_Unity; using KSP.UI.Screens.Flight.Dialogs; +using KSP.Localization; using UnityEngine; using palette = SCANsat.SCAN_UI.UI_Framework.SCANpalette; namespace SCANsat.SCAN_PartModules { - public class SCANsat : PartModule, IScienceDataContainer + public class SCANsat : PartModule { + [KSPField] + public int sensorType; + [KSPField] + public int experimentType; + [KSPField] + public float fov; + [KSPField] + public float min_alt; + [KSPField] + public float max_alt; + [KSPField] + public float best_alt; + [KSPField] + public string scanName; + [KSPField] + public string animationName; + [KSPField(guiName = "SCANsat Altitude", guiActive = false)] + public string alt_indicator; + [KSPField(isPersistant = true)] + protected bool scanning = false; + + public bool scanningNow + { + get { return scanning; } + } + private bool powerIsProblem; private int powerTimer; private Animation anim = null; - private List storedData = new List(); - private ExperimentsResultDialog expDialog = null; /* SAT: KSP entry points */ public override void OnStart(StartState state) @@ -57,34 +83,12 @@ public override void OnStart(StartState state) } } if (scanName != null) - { // Use bitwise operators to check if the part has valid science collection scanners - if ((sensorType & (Int32)SCANtype.AltimetryLoRes) == 0 && (sensorType & (Int32)SCANtype.AltimetryHiRes) == 0 && (sensorType & (Int32)SCANtype.Biome) == 0) - { - Events["startScan"].guiName = "Start " + scanName; - Events["stopScan"].guiName = "Stop " + scanName; - Actions["startScanAction"].guiName = "Start " + scanName; - Actions["stopScanAction"].guiName = "Stop " + scanName; - Actions["toggleScanAction"].guiName = "Toggle " + scanName; - } - else - { - Events["startScan"].guiName = "Start " + scanName; - Events["stopScan"].guiName = "Stop " + scanName; - Actions["startScanAction"].guiName = "Start " + scanName; - Actions["stopScanAction"].guiName = "Stop " + scanName; - Actions["toggleScanAction"].guiName = "Toggle " + scanName; - } - - if ((sensorType & (int)SCANtype.Science) == 0) - { - Events["analyze"].active = false; - Actions["analyzeData"].active = false; - } - else - { - Events["analyze"].active = true; - Actions["analyzeData"].active = false; - } + { + Events["startScan"].guiName = string.Format("{0}: {1}", Localizer.Format("#autoLOC_SCANsat_StartScan"), scanName); + Events["stopScan"].guiName = string.Format("{0}: {1}", Localizer.Format("#autoLOC_SCANsat_StopScan"), scanName); + Actions["startScanAction"].guiName = string.Format("{0}: {1}", Localizer.Format("#autoLOC_SCANsat_StartScan"), scanName); + Actions["stopScanAction"].guiName = string.Format("{0}: {1}", Localizer.Format("#autoLOC_SCANsat_StopScan"), scanName); + Actions["toggleScanAction"].guiName = string.Format("{0}: {1}", Localizer.Format("#autoLOC_SCANsat_ToggleScan"), scanName); } if (sensorType == 0) @@ -93,12 +97,10 @@ public override void OnStart(StartState state) // and we also disable the analyze button (it does nothing) Events["startScan"].active = false; Events["stopScan"].active = false; - Events["analyze"].active = false; Events["editorExtend"].active = false; Actions["startScanAction"].active = false; Actions["stopScanAction"].active = false; Actions["toggleScanAction"].active = false; - Actions["analyzeData"].active = false; } if (scanning) animate(1, 1); @@ -117,8 +119,6 @@ protected virtual void Update() if (sensorType == 0) return; - Events["reviewEvent"].active = storedData.Count > 0; - Events["EVACollect"].active = storedData.Count > 0; Events["startScan"].active = !scanning && !powerIsProblem; Events["stopScan"].active = scanning || powerIsProblem; if (sensorType != 32) @@ -174,28 +174,6 @@ protected virtual void FixedUpdate() } } - public override void OnLoad(ConfigNode node) - { - if (node.HasNode("ScienceData")) - { - foreach (ConfigNode storedDataNode in node.GetNodes("ScienceData")) - { - ScienceData data = new ScienceData(storedDataNode); - storedData.Add(data); - } - } - } - - public override void OnSave(ConfigNode node) - { - node.RemoveNodes("ScienceData"); //** Prevent duplicates - foreach (ScienceData SCANData in storedData) - { - ConfigNode storedDataNode = node.AddNode("ScienceData"); - SCANData.Save(storedDataNode); - } - } - public override string GetInfo() { if (sensorType == 0) @@ -203,49 +181,26 @@ public override string GetInfo() string str = base.GetInfo(); if (min_alt != 0) - str += "Altitude ( min): " + (min_alt / 1000).ToString("F0") + " km\n"; + str += Localizer.Format("#autoLOC_SCANsat_AltitudeMin", (min_alt / 1000).ToString("F0")); if (best_alt != min_alt) - str += "Altitude (best): " + (best_alt / 1000).ToString("F0") + " km\n"; + str += Localizer.Format("#autoLOC_SCANsat_AltitudeBest", (best_alt / 1000).ToString("F0")); if (max_alt != 0) - str += "Altitude ( max): " + (max_alt / 1000).ToString("F0") + " km\n"; + str += Localizer.Format("#autoLOC_SCANsat_AltitudeMax", (max_alt / 1000).ToString("F0")); if (fov != 0) - str += "FOV: " + fov.ToString("F0") + " °"; + str += Localizer.Format("#autoLOC_SCANsat_FOV", fov.ToString("F0") + ""); str += resHandler.PrintModuleResources(1); return str; } - - /* SAT: KSP fields */ - [KSPField] - public int sensorType; - [KSPField] - public float fov; - [KSPField] - public float min_alt; - [KSPField] - public float max_alt; - [KSPField] - public float best_alt; - [KSPField] - public string scanName; - [KSPField] - public string animationName; - [KSPField(guiName = "SCANsat Altitude", guiActive = false)] - public string alt_indicator; - - /* SCAN: all of these fields and only scanning is persistant */ - [KSPField(isPersistant = true)] - protected bool scanning = false; - public bool scanningNow() { return scanning; } - + /* SCAN: context (right click) buttons in FLIGHT */ [KSPEvent(guiActive = true, guiName = "Start RADAR Scan", active = true)] public void startScan() { if (!ToolbarManager.ToolbarAvailable && SCANcontroller.controller != null) { - if (!SCANcontroller.controller.useStockAppLauncher) - SCANcontroller.controller.mainMap.Visible = true; + if (!SCAN_Settings_Config.Instance.StockToolbar && SCAN_UI_MainMap.Instance != null && !SCAN_UI_MainMap.Instance.IsVisible) + SCAN_UI_MainMap.Instance.Open(); } registerScanner(); animate(1, 0); @@ -259,39 +214,6 @@ public void stopScan() animate(-1, 1); } - [KSPEvent(guiActive = true, guiName = "Analyze Data", active = true)] - public void analyze() - { - gatherScienceData(); - } - - public void gatherScienceData(bool silent = false) - { - makeScienceData(true); - if (!silent) - ReviewData(); - } - - [KSPEvent(guiActive = true, guiName = "Review Data", active = false)] - public void reviewEvent() - { - ReviewData(); - } - - [KSPEvent(guiActiveUnfocused = true, guiName = "Collect Stored Data", externalToEVAOnly = true, unfocusedRange = 1.5f, active = false)] - public void EVACollect() - { - List EVACont = FlightGlobals.ActiveVessel.FindPartModulesImplementing(); - if (storedData.Count > 0) - { - if (EVACont.First().StoreData(new List() { this }, false)) - { - foreach (ScienceData data in storedData) - DumpData(data); - } - } - } - /* SCAN: context (right click) buttons in EDTIOR */ [KSPEvent(guiActiveEditor = true, guiName = "Extend", active = true)] public void editorExtend() @@ -346,29 +268,22 @@ public void toggleScanAction(KSPActionParam param) startScan(); } - [KSPAction("Analyze Data")] - public void analyzeData(KSPActionParam param) - { - //if (scanning) ** Always available - gatherScienceData(); - } - /* SCAN: add static (a warning that we're low on electric charge) */ private void addStatic() { if (SCANcontroller.controller == null) return; - if (SCANcontroller.controller.mainMap == null) - return; + //if (SCANcontroller.controller.mainMap == null) + // return; - if (SCANcontroller.controller.mainMap.Map == null) - return; + //if (SCANcontroller.controller.mainMap.Map == null) + // return; - for (int i = 0; i < 1000; i++) - { - SCANcontroller.controller.mainMap.Map.SetPixel(UnityEngine.Random.Range(0, 360), UnityEngine.Random.Range(0, 180), palette.lerp(palette.black, palette.white, UnityEngine.Random.value)); - } + //for (int i = 0; i < 1000; i++) + //{ + // SCANcontroller.controller.mainMap.Map.SetPixel(UnityEngine.Random.Range(0, 360), UnityEngine.Random.Range(0, 180), palette.lerp(palette.black, palette.white, UnityEngine.Random.value)); + //} } /* SCAN: register scanners without going through animation */ @@ -389,175 +304,21 @@ protected void unregisterScanner() private string scanAlt(SCANdata d) { - string altitude = "Unknown"; - if (!SCANcontroller.controller.scan_background) - altitude = "All Scanning Disabled"; + string altitude = Localizer.Format("#autoLOC_SCANsat_Unknown"); + if (!SCAN_Settings_Config.Instance.BackgroundScanning) + altitude = Localizer.Format("#autoLOC_SCANsat_All_Disabled"); else if (d.Disabled) - altitude = d.Body.name + " Scanning Disabled"; + altitude = d.Body.displayName.LocalizeBodyName() + ": " + Localizer.Format("#autoLOC_SCANsat_Disabled"); else if (vessel.altitude < min_alt) - altitude = "Too low"; + altitude = Localizer.Format("#autoLOC_SCANsat_TooLow"); else if (vessel.altitude < best_alt) - altitude = "Sub-optimal"; + altitude = Localizer.Format("#autoLOC_SCANsat_SubOptimal"); else if (vessel.altitude >= best_alt && vessel.altitude <= max_alt) - altitude = "Ideal"; + altitude = Localizer.Format("#autoLOC_SCANsat_Ideal"); else if (vessel.altitude > max_alt) - altitude = "Too high"; + altitude = Localizer.Format("#autoLOC_SCANsat_TooHigh"); return altitude; } - /* SCAN: SCIENCE! make, store, transmit, keep - * discard, review, count DATA */ - private void makeScienceData(bool notZero) - { - storedData.Clear(); - ScienceData sd = getAvailableScience((SCANtype)sensorType, notZero); - if (sd == null) - return; - storedData.Add(sd); - } - - private ScienceData getAvailableScience(SCANtype sensor, bool notZero) - { - SCANdata data = SCANUtil.getData(vessel.mainBody); - if (data == null) - return null; - ScienceData sd = null; - ScienceExperiment se = null; - ScienceSubject su = null; - bool found = false; - string id = null; - double coverage = 0f; - float multiplier = 1f; - - if (!found && (sensor & SCANtype.AltimetryLoRes) != SCANtype.Nothing) - { - found = true; - if (vessel.mainBody.pqsController == null) - multiplier = 0.5f; - id = "SCANsatAltimetryLoRes"; - coverage = SCANUtil.getCoveragePercentage(data, SCANtype.AltimetryLoRes); - } - else if (!found && (sensor & SCANtype.AltimetryHiRes) != SCANtype.Nothing) - { - found = true; - if (vessel.mainBody.pqsController == null) - multiplier = 0.5f; - id = "SCANsatAltimetryHiRes"; - coverage = SCANUtil.getCoveragePercentage(data, SCANtype.AltimetryHiRes); - } - else if (!found && (sensor & SCANtype.Biome) != SCANtype.Nothing) - { - found = true; - if (vessel.mainBody.BiomeMap == null) - multiplier = 0.5f; - id = "SCANsatBiomeAnomaly"; - coverage = SCANUtil.getCoveragePercentage(data, SCANtype.Biome); - } - else if (!found && (sensor & SCANtype.FuzzyResources) != SCANtype.Nothing) - { - found = true; - if (vessel.mainBody.pqsController == null) - multiplier = 0.5f; - id = "SCANsatResources"; - coverage = SCANUtil.getCoveragePercentage(data, SCANtype.FuzzyResources); - } - if (!found) return null; - se = ResearchAndDevelopment.GetExperiment(id); - if (se == null) return null; - - su = ResearchAndDevelopment.GetExperimentSubject(se, ExperimentSituations.InSpaceHigh, vessel.mainBody, "surface"); - if (su == null) return null; - - su.scienceCap *= multiplier; - - SCANUtil.SCANlog("Coverage: {0}, Science cap: {1}, Subject value: {2}, Scientific value: {3}, Science: {4}", new object[5] { coverage.ToString("F1"), su.scienceCap.ToString("F1"), su.subjectValue.ToString("F2"), su.scientificValue.ToString("F2"), su.science.ToString("F2") }); - - su.scientificValue = 1; - - float science = (float)coverage; - if (science > 95) science = 100; - if (science < 30) science = 0; - science = science / 100f; - science = Mathf.Max(0, (science * su.scienceCap) - su.science); - - SCANUtil.SCANlog("Remaining science: {0}, Base value: {1}", new object[2] { science.ToString("F1"), se.baseValue.ToString("F1") }); - - science /= Mathf.Max(0.1f, su.scientificValue); //look 10 lines up; this is always 1... - science /= su.subjectValue; - - SCANUtil.SCANlog("Resulting science value: {0}", new object[1] { science.ToString("F2") }); - - if (notZero && science <= 0) science = 0.00001f; - - sd = new ScienceData(science * su.dataScale, 1f, 0f, su.id, se.experimentTitle + " of " + vessel.mainBody.theName, false, part.flightID); - su.title = sd.title; - return sd; - } - - public ScienceData[] GetData() - { - return storedData.ToArray(); - } - - public void ReturnData(ScienceData data) - { - if (data == null) - return; - - storedData.Clear(); - - storedData.Add(data); - } - - private void KeepData(ScienceData data) - { - expDialog = null; - } - - private void TransmitData(ScienceData data) - { - expDialog = null; - List tranList = vessel.FindPartModulesImplementing(); - if (tranList.Count > 0 && storedData.Count > 0) - { - tranList.OrderBy(ScienceUtil.GetTransmitterScore).First().TransmitData(storedData); - DumpData(storedData[0]); - } - else ScreenMessages.PostScreenMessage("No transmitters available on this vessel.", 4f, ScreenMessageStyle.UPPER_LEFT); - } - - public void DumpData(ScienceData data) - { - expDialog = null; - while (storedData.Contains(data)) - { - storedData.Remove(data); - } - } - - public void ReviewDataItem(ScienceData sd) - { - ReviewData(); - } - - public void ReviewData() - { - if (storedData.Count < 1) - return; - expDialog = null; - ScienceData sd = storedData[0]; - expDialog = ExperimentsResultDialog.DisplayResult(new ExperimentResultDialogPage(part, sd, 1f, 0f, false, "", true, new ScienceLabSearch(vessel, sd), DumpData, KeepData, TransmitData, null)); - } - - public bool IsRerunnable() - { - return true; - } - - public int GetScienceCount() - { - return storedData.Count; - } } } - diff --git a/SCANsat/SCAN_Platform/Attributes/Bounds.cs b/SCANsat/SCAN_Platform/Attributes/Bounds.cs deleted file mode 100644 index de9111a4c..000000000 --- a/SCANsat/SCAN_Platform/Attributes/Bounds.cs +++ /dev/null @@ -1,94 +0,0 @@ -using System; -using System.Runtime.InteropServices; - -namespace SCANsat.SCAN_Platform.Attributes -{ - [StructLayout(LayoutKind.Explicit)] - public struct AValue { - [FieldOffset(0)] public bool aBool; - [FieldOffset(0)] public byte aByte; - [FieldOffset(0)] public char aChar; - [FieldOffset(0)] public float aFloat; - [FieldOffset(0)] public double aDouble; - [FieldOffset(0)] public int aInt; - [FieldOffset(0)] public long aLong; - [FieldOffset(0)] public short aShort; - } - - [AttributeUsage((AttributeTargets.Class | AttributeTargets.Interface | AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.Property | AttributeTargets.ReturnValue | AttributeTargets.Method),AllowMultiple = true)] - public class LowerBoundAttribute : Attribute { - private AValue floor = new AValue(); - public LowerBoundAttribute (bool b) { floor.aBool = b; } - public LowerBoundAttribute (bool[] b) { } - public LowerBoundAttribute (byte b) { floor.aByte = b; } - public LowerBoundAttribute (byte[] b) { } - public LowerBoundAttribute (char c) { floor.aChar = c; } - public LowerBoundAttribute (char[] c) { } - public LowerBoundAttribute (float f) { floor.aFloat = f; } - public LowerBoundAttribute (float[] f) { } - public LowerBoundAttribute (double d) { floor.aDouble = d; } - public LowerBoundAttribute (double[] d) { } - public LowerBoundAttribute (int i) { floor.aInt = i; } - public LowerBoundAttribute (int[] i) { } - public LowerBoundAttribute (long l) { floor.aLong = l; } - public LowerBoundAttribute (long[] l) { } - public LowerBoundAttribute (short s) { floor.aShort = s; } - public LowerBoundAttribute (short[] s) { } - public LowerBoundAttribute (string s) { } - public LowerBoundAttribute (string[] s) { } - public LowerBoundAttribute (object o) { } - public LowerBoundAttribute (object[] o) { } - public LowerBoundAttribute (Type t) { } - public LowerBoundAttribute (Type[] t) { } - } - [AttributeUsage((AttributeTargets.Class | AttributeTargets.Interface | AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.Property | AttributeTargets.ReturnValue | AttributeTargets.Method),AllowMultiple = true)] - public class UpperBoundAttribute : Attribute { - private AValue roof = new AValue(); - public UpperBoundAttribute (bool b) { roof.aBool = b; } - public UpperBoundAttribute (bool[] b) { } - public UpperBoundAttribute (byte b) { roof.aByte = b; } - public UpperBoundAttribute (byte[] b) { } - public UpperBoundAttribute (char c) { roof.aChar = c; } - public UpperBoundAttribute (char[] c) { } - public UpperBoundAttribute (float f) { roof.aFloat = f; } - public UpperBoundAttribute (float[] f) { } - public UpperBoundAttribute (double d) { roof.aDouble = d; } - public UpperBoundAttribute (double[] d) { } - public UpperBoundAttribute (int i) { roof.aInt = i; } - public UpperBoundAttribute (int[] i) { } - public UpperBoundAttribute (long l) { roof.aLong = l; } - public UpperBoundAttribute (long[] l) { } - public UpperBoundAttribute (short s) { roof.aShort = s; } - public UpperBoundAttribute (short[] s) { } - public UpperBoundAttribute (string s) { } - public UpperBoundAttribute (string[] s) { } - public UpperBoundAttribute (object o) { } - public UpperBoundAttribute (object[] o) { } - public UpperBoundAttribute (Type t) { } - public UpperBoundAttribute (Type[] t) { } - } - [AttributeUsage((AttributeTargets.Class | AttributeTargets.Interface | AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.Property | AttributeTargets.ReturnValue | AttributeTargets.Method),AllowMultiple = true, Inherited = true)] - public class BoundedAttribute : Attribute { - internal AValue floor = new AValue(); - internal AValue roof = new AValue(); - - //public BoundedAttribute ( ) { } - public BoundedAttribute (bool l , bool u) { floor.aBool = l; roof.aBool = u; } - public BoundedAttribute (byte l , byte u) { floor.aByte = l; roof.aByte = u; } - public BoundedAttribute (char l , char u) { floor.aChar = l; roof.aChar = u; } - public BoundedAttribute (float l , float u) { floor.aFloat = l; roof.aFloat = u; } - public BoundedAttribute (double l , double u) { floor.aDouble = l; roof.aDouble = u; } - public BoundedAttribute (int l , int u) { floor.aInt = l; roof.aInt = u; } - public BoundedAttribute (long l , long u) { floor.aLong = l; roof.aLong = u; } - public BoundedAttribute (short l , short u) { floor.aShort = l; roof.aShort = u; } - public BoundedAttribute (string l , string u) { } - public BoundedAttribute (object l , object u) { } - public BoundedAttribute (Type l , Type u) { } - } - [AttributeUsage((AttributeTargets.Class | AttributeTargets.Interface | AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.Property | AttributeTargets.ReturnValue | AttributeTargets.Method),AllowMultiple = true, Inherited = true)] - public class NormAttribute : BoundedAttribute { - public NormAttribute ( float f ) : base(0.0f,f) { } - public NormAttribute ( double d ) : base (0.0d,d) { } - } -} - diff --git a/SCANsat/SCAN_Platform/Extensions/GUI/UnityEngine.GUILayout_.cs b/SCANsat/SCAN_Platform/Extensions/GUI/UnityEngine.GUILayout_.cs deleted file mode 100644 index 5eeddc37d..000000000 --- a/SCANsat/SCAN_Platform/Extensions/GUI/UnityEngine.GUILayout_.cs +++ /dev/null @@ -1,50 +0,0 @@ -using System; - -namespace UnityEngine -{ - public class GUILayout_ - { -// Box Make an auto-layout box. -// Button Make a single press button. The user clicks them and something happens immediately. -// Label Make an auto-layout label. -// PasswordField Make a text field where the user can enter a password. -// RepeatButton Make a repeating button. The button returns true as long as the user holds down the mouse. -// SelectionGrid Make a Selection Grid. -// TextArea Make a multi-line text field where the user can edit a string. -// TextField Make a single-line text field where the user can edit a string. -// Toggle Make an on/off toggle button. -// Toolbar Make a toolbar. -// Window Make a popup window that layouts its contents automatically. -// -// -// BeginArea Begin a GUILayout block of GUI controls in a fixed screen area. -// BeginHorizontal Begin a Horizontal control group. -// BeginScrollView Begin an automatically laid out scrollview. -// BeginVertical Begin a vertical control group. -// EndArea Close a GUILayout block started with BeginArea. -// EndHorizontal Close a group started with BeginHorizontal. -// EndScrollView End a scroll view begun with a call to BeginScrollView. -// EndVertical Close a group started with BeginVertical. -// -// HorizontalScrollbar Make a horiztonal scrollbar. -// VerticalScrollbar Make a vertical scrollbar. -// HorizontalSlider A horizontal slider the user can drag to change a value between a min and a max. -// VerticalSlider A vertical slider the user can drag to change a value between a min and a max. -// -// ExpandHeight Option passed to a control to allow or disallow vertical expansion. -// ExpandWidth Option passed to a control to allow or disallow horizontal expansion. -// Height Option passed to a control to give it an absolute height. -// MaxHeight Option passed to a control to specify a maximum height. -// MaxWidth Option passed to a control to specify a maximum width. -// MinHeight Option passed to a control to specify a minimum height. -// MinWidth Option passed to a control to specify a minimum width. -// Width Option passed to a control to give it an absolute width. -// Space Insert a space in the current layout group. -// FlexibleSpace Insert a flexible space element. - - public GUILayout_ () - { - } - } -} - diff --git a/SCANsat/SCAN_Platform/Extensions/GUI/UnityEngine.GUISkin_.cs b/SCANsat/SCAN_Platform/Extensions/GUI/UnityEngine.GUISkin_.cs deleted file mode 100644 index d95c7f990..000000000 --- a/SCANsat/SCAN_Platform/Extensions/GUI/UnityEngine.GUISkin_.cs +++ /dev/null @@ -1,59 +0,0 @@ -using System; -using System.Collections.Generic; -using SCANsat.SCAN_Platform; -using Log = SCANsat.SCAN_Platform.Logging.ConsoleLogger; - - -namespace UnityEngine -{ - public static class GUISkin_ - { - public static void dumpSkins(this GUISkin s) { - - string msg= ""; - Object[] fonts = UnityEngine.Resources.FindObjectsOfTypeAll( typeof(UnityEngine.Font) ); - foreach (Object f in fonts) { - msg += "found a font: " + ((UnityEngine.Font) f).name + "\n"; - } - - Log.Debug("----------------------------------\n{0}", msg); - - foreach (KeyValuePair e in SCAN_SkinsLibrary.knownSkins) { - string k = e.Key; - int hash = e.GetHashCode (); - GUISkin v = e.Value; - GUIStyle[] cs = e.Value.customStyles; - - string prefix = "#[" + hash.ToString ("X8") + "]" + " GUISkin "; - - GUIStyle_.knownStyles.Add (v.box.dumpStyle(prefix + k + ".box")); - GUIStyle_.knownStyles.Add (v.button.dumpStyle(prefix + k + ".button")); - GUIStyle_.knownStyles.Add (v.label.dumpStyle(prefix + k + ".label")); - GUIStyle_.knownStyles.Add (v.scrollView.dumpStyle(prefix + k + ".scrollView")); - GUIStyle_.knownStyles.Add (v.textArea.dumpStyle(prefix + k + ".textArea")); - GUIStyle_.knownStyles.Add (v.textField.dumpStyle(prefix + k + ".textField")); - GUIStyle_.knownStyles.Add (v.toggle.dumpStyle(prefix + k + ".toggle")); - GUIStyle_.knownStyles.Add (v.horizontalSlider.dumpStyle(prefix + k + ".HSlider")); - GUIStyle_.knownStyles.Add (v.horizontalSliderThumb.dumpStyle(prefix + k + ".HSliderThumb")); - GUIStyle_.knownStyles.Add (v.horizontalScrollbar.dumpStyle(prefix + k + ".HScrollbar")); - GUIStyle_.knownStyles.Add (v.horizontalScrollbarLeftButton.dumpStyle(prefix + k + ".HScrollbarLeftButton")); - GUIStyle_.knownStyles.Add (v.horizontalScrollbarRightButton.dumpStyle(prefix + k + ".HScrollbarRightButton")); - GUIStyle_.knownStyles.Add (v.horizontalScrollbarThumb.dumpStyle(prefix + k + ".HScrollbarThumb")); - GUIStyle_.knownStyles.Add (v.verticalSlider.dumpStyle(prefix + k + ".VSlider")); - GUIStyle_.knownStyles.Add (v.verticalSliderThumb.dumpStyle(prefix + k + ".VSliderThumb")); - GUIStyle_.knownStyles.Add (v.verticalScrollbar.dumpStyle(prefix + k + ".VScrollbar")); - GUIStyle_.knownStyles.Add (v.verticalScrollbarUpButton.dumpStyle(prefix + k + ".VScrollbarLeftButton")); - GUIStyle_.knownStyles.Add (v.verticalScrollbarDownButton.dumpStyle(prefix + k + ".VScrollbarRightButton")); - GUIStyle_.knownStyles.Add (v.verticalScrollbarThumb.dumpStyle(prefix + k + ".VScrollbarThumb")); - - int i = 0; - Log.Debug("GUISkin {0}.customStyles contains {1} custom styles:", k, cs.Length); - foreach(GUIStyle sty in cs) { - string csi = ".customStyles[" + i++ + "]"; - GUIStyle_.knownStyles.Add (sty.dumpStyle(prefix + k + csi)); - } - } - } - } -} - diff --git a/SCANsat/SCAN_Platform/Extensions/GUI/UnityEngine.GUIStyleState_.cs b/SCANsat/SCAN_Platform/Extensions/GUI/UnityEngine.GUIStyleState_.cs deleted file mode 100644 index 5b0221740..000000000 --- a/SCANsat/SCAN_Platform/Extensions/GUI/UnityEngine.GUIStyleState_.cs +++ /dev/null @@ -1,51 +0,0 @@ -using System; -using System.Linq; -using System.Reflection; -using System.Collections.Generic; -using System.Text; - -using Log = SCANsat.SCAN_Platform.Logging.ConsoleLogger; - -namespace UnityEngine -{ - public static class GUIStyleState_ { - internal static Color white = Color.white; - internal static Color black = Color.black; - internal static Color clear = Color.clear; - - // background - // textColor - - public static string backgroundPP(this GUIStyleState s, params object[] strs) { - return ""; - } - public static string PP(this GUIStyleState s, params object[] strs) { - string bkg = "null"; - string colorName = ""; - - if (s.textColor == black && s.background == null) { return ""; } - if (s.background != null) bkg = s.background.ToString (); - - if (Color_.knownColors.TryGetValue (s.textColor, out colorName)) { - return "{ GUIss: textColor: " + colorName + " bkg: " + bkg + " }"; - } else { - return "{ GUIss: textColor: " + s.textColor.ToString () + " bkg: " + bkg + " }"; - } - } - - public static void PPP(this GUIStyleState s, string breadcrumbs) { - string bkg = "null"; - string colorName = ""; - - if (s.textColor == black && s.background == null) { return; } - if (s.background != null) bkg = s.background.ToString (); - - if (Color_.knownColors.TryGetValue (s.textColor, out colorName)) { - Log.Debug("{0} {{ GUIss: textColor: {1} bkg: {2} }}", breadcrumbs, colorName, bkg); - } else { - Log.Debug("{0} {{ GUIss: textColor: {1} bkg: {2} }}", breadcrumbs, s.textColor.ToString(), bkg); - } - } - } -} - diff --git a/SCANsat/SCAN_Platform/Extensions/GUI/UnityEngine.GUIStyle_.cs b/SCANsat/SCAN_Platform/Extensions/GUI/UnityEngine.GUIStyle_.cs deleted file mode 100644 index 8565b64a7..000000000 --- a/SCANsat/SCAN_Platform/Extensions/GUI/UnityEngine.GUIStyle_.cs +++ /dev/null @@ -1,76 +0,0 @@ -using System; -using System.Collections.Generic; - -using UnityEngine; -using Log = SCANsat.SCAN_Platform.Logging.ConsoleLogger; - - -namespace UnityEngine { - public static class GUIStyle_ { - internal static List knownStyles { get; set; } - - public static GUIStyle dumpStyle(this GUIStyle s, string breadcrumbs) { - var hash = s.GetHashCode (); - - if (knownStyles.Contains(s)) { Log.Debug("{0} => #[{2:X8}] {1} skipped", breadcrumbs, s.ToString(), hash); return s; } - - - - //Log.Debug("{0} => #[{2:X8}] {1}", breadcrumbs, s.ToString(), s.GetHashCode()); - //Log.Debug(" ------------------------------------------------------------------------------------------------ "); - //Log.Debug(" -> contentOffset => {0}", s.contentOffset); - //Log.Debug(" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "); - //Log.Debug(" -> border => {0}", s.border); - //Log.Debug(" -> padding => {0}", s.border); - //Log.Debug(" -> margin => {0}", s.border); - //Log.Debug(" -> overflow => {0}", s.border); - //// print all of the non-trivialGUIStyleState components - //Log.Debug(" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "); - //s.active.PPP (" -> active => "); - //s.onActive.PPP (" -> onActive => "); - //s.normal.PPP (" -> normal => "); - //s.onNormal.PPP (" -> onNormal => "); - //s.hover.PPP (" -> hover => "); - //s.onHover.PPP (" -> onHover => "); - //s.focused.PPP (" -> focused => "); - //s.onFocused.PPP (" -> onFocused => "); - //Log.Debug(" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "); - //Log.Debug(" -> alignment => {0}", s.alignment); - //Log.Debug(" -> wordwrap => {0}", s.alignment); - //Log.Debug(" -> clipping => {0}", s.clipping); - //Log.Debug(" -> richText? => {0}", s.richText); - //Log.Debug(" -> lineHeight=> {0}", s.lineHeight); - //Log.Debug(" -> font => {0}", s.fontPP()); - //Log.Debug(" -> fontSize => {0}", s.fontSize); - //Log.Debug(" -> fontStyle => {0}", s.fontStyle); - //Log.Debug(" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "); - //Log.Debug(" -> fixedW, stretchW? => {0} ({1})", s.fixedWidth, s.stretchWidth); - //Log.Debug(" -> fixedH, stretchH? => {0} ({1})", s.fixedHeight, s.stretchHeight); - //Log.Debug(" -> isHdepW? => {0}", s.isHeightDependantOnWidth); - //Log.Debug(" ------------------------------------------------------------------------------------------------ "); - - return s; - } - - - public static string fontPP(this GUIStyle s) { - string font = "null"; - if (s.font != null) font = s.font.ToString (); - return font; - } - - public static GUIStyle PaddingChange(this GUIStyle g, Int32 PaddingValue) - { - GUIStyle gReturn = new GUIStyle(g); - gReturn.padding = new RectOffset(PaddingValue, PaddingValue, PaddingValue, PaddingValue); - return gReturn; - } - public static GUIStyle PaddingChangeBottom(this GUIStyle g, Int32 PaddingValue) - { - GUIStyle gReturn = new GUIStyle(g); - gReturn.padding.bottom = PaddingValue; - return gReturn; - } - } -} - diff --git a/SCANsat/SCAN_Platform/Extensions/GUI/UnityEngine.GUI_.cs b/SCANsat/SCAN_Platform/Extensions/GUI/UnityEngine.GUI_.cs deleted file mode 100644 index 99a6af130..000000000 --- a/SCANsat/SCAN_Platform/Extensions/GUI/UnityEngine.GUI_.cs +++ /dev/null @@ -1,64 +0,0 @@ -using System; -namespace UnityEngine -{ - public class GUI_ { - // static -// var backgroundColor Global tinting color for all background elements rendered by the GUI. -// var changed Returns true if any controls changed the value of the input data. -// var color Global tinting color for the GUI. -// var contentColor Tinting color for all text rendered by the GUI. -// var depth The sorting depth of the currently executing GUI behaviour. -// var enabled Is the GUI enabled? -// var matrix The GUI transform matrix. -// var skin The global skin to use. -// var tooltip The tooltip of the control the mouse is currently over, or which has keyboard focus. (Read Only). - - -// // GUI Elements (compare to GUILayout) -// Box Make a graphical box. -// Button Make a single press button. The user clicks them and something happens immediately. -// DragWindow Make a window draggable. -// Label Make a text or texture label on screen. -// PasswordField Make a text field where the user can enter a password. -// RepeatButton Make a button that is active as long as the user holds it down. -// SelectionGrid Make a grid of buttons. -// TextArea Make a Multi-line text area where the user can edit a string. -// TextField Make a single-line text field where the user can edit a string. -// Toggle Make an on/off toggle button. -// Toolbar Make a toolbar. -// Window Make a popup window. -// ModalWindow Show a Modal Window. -// -// -// // Groups and Scrolling Views (Begin/End must be paired) -// BeginGroup Begin a group. Must be matched with a call to EndGroup. -// BeginScrollView Begin a scrolling view inside your GUI. -// EndGroup End a group. -// EndScrollView Ends a scrollview started with a call to BeginScrollView. -// ScrollTo Scrolls all enclosing scrollviews so they try to make position visible. -// -// // H and V Sliders and Scrollbars -// HorizontalSlider A horizontal slider the user can drag to change a value between a min and a max. -// VerticalSlider A vertical slider the user can drag to change a value between a min and a max. -// HorizontalScrollbar Make a horizontal scrollbar. Scrollbars are what you use to scroll through a document. Most likely, you want to use scrollViews instead. -// VerticalScrollbar Make a vertical scrollbar. Scrollbars are what you use to scroll through a document. Most likely, you want to use scrollViews instead. -// -// // Texture Drawing -// DrawTexture Draw a texture within a rectangle. -// DrawTextureWithTexCoords Draw a texture within a rectangle with the given texture coordinates. Use this function for clipping or tiling the image within the given rectangle. -// -// // Control Naming -// SetNextControlName Set the name of the next control. -// -// // Keyboard and Mouse Focusing -// FocusControl Move keyboard focus to a named control. -// FocusWindow Make a window become the active window. -// GetNameOfFocusedControl Get the name of named control that has focus. -// UnfocusWindow Remove focus from all windows. -// -// // Window Depth Manipulation -// BringWindowToBack Bring a specific window to back of the floating windows. -// BringWindowToFront Bring a specific window to front of the floating windows. - } -} - diff --git a/SCANsat/SCAN_Platform/Extensions/Math/UnityEngine.Rect_.cs b/SCANsat/SCAN_Platform/Extensions/Math/UnityEngine.Rect_.cs deleted file mode 100644 index 66b46766d..000000000 --- a/SCANsat/SCAN_Platform/Extensions/Math/UnityEngine.Rect_.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System; - -namespace UnityEngine -{ - public static class Rect_ { - - public static Rect ClampToScreen(this Rect r) { return r.ClampToScreen(new RectOffset(0, 0, 0, 0)); } - - public static Rect ClampToScreen(this Rect r, RectOffset ScreenBorder) { - r.x = Mathf.Clamp(r.x, ScreenBorder.left, Screen.width - r.width - ScreenBorder.right); - r.y = Mathf.Clamp(r.y, ScreenBorder.top, Screen.height - r.height - ScreenBorder.bottom); - return r; - } - - public static string WxH(this Rect r) { return string.Format ("[{0}x{1}]",(int)r.width,(int)r.height); } - } -} - diff --git a/SCANsat/SCAN_Platform/Extensions/StringExtensions.cs b/SCANsat/SCAN_Platform/Extensions/StringExtensions.cs new file mode 100644 index 000000000..251019797 --- /dev/null +++ b/SCANsat/SCAN_Platform/Extensions/StringExtensions.cs @@ -0,0 +1,12 @@ +using KSP.Localization; + +namespace SCANsat +{ + public static class StringExtensions + { + public static string LocalizeBodyName(this string input) + { + return Localizer.Format("<<1>>", input); + } + } +} diff --git a/SCANsat/SCAN_Platform/Palettes/Palette.cs b/SCANsat/SCAN_Platform/Palettes/Palette.cs index b9666f789..89ce1d0c6 100644 --- a/SCANsat/SCAN_Platform/Palettes/Palette.cs +++ b/SCANsat/SCAN_Platform/Palettes/Palette.cs @@ -48,8 +48,6 @@ private static string[] getKindNames() public static string[] kindNames = getKindNames(); - - public enum Is : ushort { Unsafe = 0, Safe = 1, Unsure = 2, Unknown = 3 } public Is blind; diff --git a/SCANsat/SCAN_Platform/Palettes/Palettes.cs b/SCANsat/SCAN_Platform/Palettes/Palettes.cs index c71a2c50b..92a1bdc3f 100644 --- a/SCANsat/SCAN_Platform/Palettes/Palettes.cs +++ b/SCANsat/SCAN_Platform/Palettes/Palettes.cs @@ -22,6 +22,11 @@ public class _Palettes internal Texture2D[] paletteSwatch; internal int size; + internal int Length + { + get { return availablePalettes.Length; } + } + internal _Palettes (Palette[] p, Palette.Kind pK, int i) { availablePalettes = p; diff --git a/SCANsat/SCAN_Platform/Palettes/Swatches.cs b/SCANsat/SCAN_Platform/Palettes/Swatches.cs deleted file mode 100644 index 83ea5fa94..000000000 --- a/SCANsat/SCAN_Platform/Palettes/Swatches.cs +++ /dev/null @@ -1,104 +0,0 @@ -//using System; -//using System.Collections.Generic; -//using System.Collections; -//using System.Collections.ObjectModel; -//using UnityEngine; -//using System.Diagnostics; -//using System.Runtime.InteropServices; - -//namespace SCANsat.SCAN_Platform.Palettes -//{ -// public class Swatches : ICollection -// { -// private List _swatches = new List(); - -// public delegate void Has(object sender, Swatch color); - -// public event EventHandler Cleared; -// public event Has Grown; -// public event Has Shrunk; - -// public void AddRange(IEnumerable colors) -// { -// _swatches.AddRange(colors); -// foreach (Swatch c in colors) { if (this.Grown != null) this.Grown(this, c); } -// } -// public void Add(Swatch color) { -// _swatches.Add(color); -// if (this.Grown != null) this.Grown(this, color); -// } -// public bool Remove(Swatch color) { -// if (this.Shrunk != null) this.Shrunk(this, color); -// return _swatches.Remove(color); -// } -// public void Clear() { -// _swatches.Clear(); -// if (this.Cleared != null) this.Cleared(this, new EventArgs()); -// } - -// public bool Contains (Swatch color) { -// return _swatches.Contains(color); -// } - -// public void CopyTo(Swatch[] colors, int index) { -// _swatches.CopyTo(colors,index); -// } - -// public int Count { -// get { return _swatches.Count; } -// } - -// public bool IsReadOnly { -// get { return ((ICollection) _swatches).IsReadOnly; } -// } - -// public ReadOnlyCollection AsReadOnly() { -// return _swatches.AsReadOnly(); -// } - -// public IEnumerator GetEnumerator() { -// return _swatches.GetEnumerator(); -// } - -// IEnumerator IEnumerable.GetEnumerator() { -// return _swatches.GetEnumerator(); -// } -// } - -// public class ChangedEventArgs : EventArgs { -// public T OldV { get; private set; } -// public T NewV { get; private set; } - -// public ChangedEventArgs(T oldV, T newV) { -// this.OldV = oldV; -// this.NewV = newV; -// } -// } - - - -// public class Swatch { -// public string Name { get; set; } -// public Color Color { get; set; } -// //public _color _col; - -// //[StructLayout(LayoutKind.Explicit)] -// //public struct _color { -// // [FieldOffset(0)] public Color AsRGBAf; -// // [FieldOffset(0)] public Color32 AsRGBAb; -// // [FieldOffset(0)] public ColorModels.HSVA AsHSVA; -// // [FieldOffset(0)] public ColorModels.HSBA AsHSBA; -// // [FieldOffset(0)] public ColorModels.HSLA AsHSLA; -// // [FieldOffset(0)] public ColorModels.CMYK AsCMYK; -// //} -// internal Texture2D tex = new Texture2D(1,1); - -// public Swatch(string name) : this(name, new Color()) {} - -// public Swatch(string name, Color c) { -// this.Name = name; -// this.Color = c; -// } -// } -//} - diff --git a/SCANsat/SCAN_Platform/SCAN_KSPAddonImproved.cs b/SCANsat/SCAN_Platform/SCAN_KSPAddonImproved.cs deleted file mode 100644 index b6caf85f1..000000000 --- a/SCANsat/SCAN_Platform/SCAN_KSPAddonImproved.cs +++ /dev/null @@ -1,224 +0,0 @@ -/* KSPAddonImproved by xEvilReeperx - * - * - Allows definition of multiple startup scenes - * - * http://forum.kerbalspaceprogram.com/threads/79889-Expanded-KSPAddon-modes?p=1157014&viewfull=1#post1157014 - * - * Provided in the Public Domain - * - */ - -using System; -using UnityEngine; -using System.Linq; -using System.Collections.Generic; - -namespace SCANsat.SCAN_Platform -{ - - [AttributeUsage(AttributeTargets.Class)] - internal class SCAN_KSPAddonImproved : Attribute - { - [Flags] - public enum Startup - { - // KSPAddon.Startup values: - /* Instantly = -2, - EveryScene, - EditorAny = -3, - MainMenu = 2, - Settings, - SpaceCentre = 5, - Credits = 4, - EditorVAB = 6, - EditorSPH = 9, - Flight = 7, - TrackingStation, - PSystemSpawn = 10 - */ - - None = 0, - MainMenu = 1 << 0, - Settings = 1 << 1, - SpaceCenter = 1 << 2, - Credits = 1 << 3, - EditorVAB = 1 << 4, - //EditorSPH = 1 << 5, - Flight = 1 << 5, - TrackingStation = 1 << 6, - PSystemSpawn = 1 << 7, - Instantly = 1 << 8, - - TimeElapses = Flight | TrackingStation | SpaceCenter, - RealTime = TimeElapses, - EveryScene = ~0 - } - - public bool runOnce; - public Startup scenes; - - public SCAN_KSPAddonImproved(Startup mask, bool once = false) - { - runOnce = once; - scenes = mask; - } - } - - [KSPAddon(KSPAddon.Startup.Instantly, true)] - internal class CustomAddonLoader : MonoBehaviour - { - // What's improved? The KSPAddon.Startup is now a bitmask so you can - // use logical operations to specify which scenes you want your addon - // to be loaded in - - - // master list to keep track of addons in our assembly - List addons = new List(); - private string _identifier; - - // Mainly required so we can flag addons when they've - // been created in the case of runOnce = true - class AddonInfo - { - public readonly Type type; - public readonly SCAN_KSPAddonImproved addon; - public bool created; - - internal AddonInfo(Type t, SCAN_KSPAddonImproved add) - { - type = t; - created = false; - - addon = add; - } - - internal bool RunOnce - { - get - { - return addon.runOnce; - } - } - - internal SCAN_KSPAddonImproved.Startup Scenes - { - get - { - return addon.scenes; - } - } - } - - - - void Awake() - { - DontDestroyOnLoad(this); - - // multiple plugins using this source will create their own instances - // of the loader; the log can get confusing pretty fast without some - // way of telling them apart - _identifier = System.Reflection.Assembly.GetExecutingAssembly().GetName().Name + "." + GetType().ToString(); - - // examine our assembly for loaded types - foreach (var ourType in System.Reflection.Assembly.GetExecutingAssembly().GetTypes()) - { - var attr = ((SCAN_KSPAddonImproved[])ourType.GetCustomAttributes(typeof(SCAN_KSPAddonImproved), true)).SingleOrDefault(); - if (attr != null) - { - Debug.Log(string.Format("Found KSPAddonImproved in {0}", ourType.FullName)); - addons.Add(new AddonInfo(ourType, attr)); - } - } - - // special case here: since we're already in the first scene, - // OnLevelWasLoaded won't be invoked so we need to fire off any - // "instant" loading addons now - OnLevelWasLoaded((int)GameScenes.LOADING); - } - - - - void OnLevelWasLoaded(int level) - { - GameScenes scene = (GameScenes)level; - SCAN_KSPAddonImproved.Startup mask = 0; - - if (scene == GameScenes.LOADINGBUFFER) - return; - - Debug.Log(string.Format("{1}: {0} was loaded; instantiating addons...", scene.ToString(), _identifier)); - - // Convert GameScenes => SceneMask - switch (scene) - { - case GameScenes.EDITOR: - mask = SCAN_KSPAddonImproved.Startup.EditorVAB; - break; - - case GameScenes.CREDITS: - mask = SCAN_KSPAddonImproved.Startup.Credits; - break; - - case GameScenes.FLIGHT: - mask = SCAN_KSPAddonImproved.Startup.Flight; - break; - - case GameScenes.LOADING: - mask = SCAN_KSPAddonImproved.Startup.Instantly; - break; - - case GameScenes.MAINMENU: - mask = SCAN_KSPAddonImproved.Startup.MainMenu; - break; - - case GameScenes.SETTINGS: - mask = SCAN_KSPAddonImproved.Startup.Settings; - break; - - case GameScenes.SPACECENTER: - mask = SCAN_KSPAddonImproved.Startup.SpaceCenter; - break; - - case GameScenes.TRACKSTATION: - mask = SCAN_KSPAddonImproved.Startup.TrackingStation; - break; - - case GameScenes.PSYSTEM: - mask = SCAN_KSPAddonImproved.Startup.PSystemSpawn; - break; - - case GameScenes.LOADINGBUFFER: - // intentionally left unset - break; - - default: - Debug.LogError(string.Format("{1} unrecognized scene: {0}", scene.ToString(), _identifier)); - break; - } - - int counter = 0; - - for (int i = 0; i < addons.Count; ++i) - { - var addon = addons[i]; - - if (addon.created && addon.RunOnce) - continue; // this addon was already loaded - - // should this addon be initialized in current scene? - if ((addon.Scenes & mask) != 0) - { - Debug.Log(string.Format("ImprovedAddonLoader: Creating addon '{0}'", addon.type.Name)); - GameObject go = new GameObject(addon.type.Name); - go.AddComponent(addon.type); - - addon.created = true; - ++counter; - } - } - - Debug.Log(string.Format("{1} finished; created {0} addons", counter, _identifier)); - } - } -} \ No newline at end of file diff --git a/SCANsat/SCAN_Platform/SCAN_MBE.cs b/SCANsat/SCAN_Platform/SCAN_MBE.cs index 45bdc7754..e142bff68 100644 --- a/SCANsat/SCAN_Platform/SCAN_MBE.cs +++ b/SCANsat/SCAN_Platform/SCAN_MBE.cs @@ -157,8 +157,8 @@ private void OnGUI() if (!_OnGUI_FirstRun) { _OnGUI_FirstRun = true; // set the flag so this only runs once - if (!SCAN_SkinsLibrary._Initialized) - SCAN_SkinsLibrary.InitSkinList(); // set up the skins library + //if (!SCAN_SkinsLibrary._Initialized) + //SCAN_SkinsLibrary.InitSkinList(); // set up the skins library OnGUI_FirstRun(); // then actually *do* the firstrun stuff } OnGUIEvery(); diff --git a/SCANsat/SCAN_Platform/SCAN_MBW.cs b/SCANsat/SCAN_Platform/SCAN_MBW.cs deleted file mode 100644 index 95ce2c5c0..000000000 --- a/SCANsat/SCAN_Platform/SCAN_MBW.cs +++ /dev/null @@ -1,365 +0,0 @@ -#region license -/* - * [Scientific Committee on Advanced Navigation] - * S.C.A.N. Satellite - * - * SCANsat - MonoBehaviour Window - * * - * A modified form of TriggerAu's MonoBehaviour Window class: - * http://forum.kerbalspaceprogram.com/threads/66503-KSP-Plugin-Framework - * - * Copyright (c)2013 damny; - * Copyright (c)2014 David Grandy ; - * Copyright (c)2014 technogeeky ; - * Copyright (c)2014 (Your Name Here) ; see LICENSE.txt for licensing details. - * - */ -#endregion -using System; -using UnityEngine; - -using Log = SCANsat.SCAN_Platform.Logging.ConsoleLogger; - -namespace SCANsat.SCAN_Platform -{ - - [AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = true)] - public sealed class WindowInitialsAttribute : Attribute - { - public string Caption { get; set; } // the title of the window - public bool Visible { get; set; } // is this window visible? - - public bool IsDragging { get; set; } // is this window being dragged? (moved) - public bool DragEnabled { get; set; } // can this window be dragged? - public bool ClampEnabled { get; set; } // will this window be kept on screen? - - public bool TooltipsEnabled { get; set; } // will this window show tooltips? - - public bool IsResizing { get; set; } // is this window being resized? - public Vector2 MinSize { get; set; } // the minimum extent of the window - public Vector2 MaxSize { get; set; } // the maximum extent of the window - } - - public abstract class SCAN_MBW : SCAN_MBE - { - - /* - * MonoBehavior "LifeCycle" - * - * [ Reset ] - * v - * [ Awake ] - * v - * [ OnEnable ] - * v>---------v - * v [ Start ] - * v<---------< - * [ FixedUpdate ]<----o - * v | "Physics Loop" - * [ y4FixedUpdate ] ----o - * v - * [ Update ] - * v - * [ y4null ] -AND- - * [ y4ForSeconds ] -AND- - * [ y4StartLooper] - * v - * [ LateUpdate ] - * v - * [ OnWillRenderObject ] - * v - * ... - * v - * [ OnPostRender ] - * v - * [ OnGUI ]<-----------o "GUI Loop" - * v | 1. and - * v | 2. and and - * v---------------o - * [ y4waitEOF ] - * v===========> ^[ FixedUpdate ] "Frame Loop" - * v - * [ OnDisable ] - * v - * [ OnDestroy ] - * - * - * Some notes: - * + These states are **individual** to each gameObject. You can not depend on - * all objects having finished [Start] just because one object is in [FixedUpdate]. - * + - * + The "GUI Loop" be run [2..N] times. - * + Adapted from: http://www.richardfine.co.uk/2012/10/unity3d-monobehaviour-lifecycle/ - * + Ref: http://docs.unity3d.com/Manual/ExecutionOrder.html - */ - - //#region "Constructor" - //protected SCAN_MBW() - // : base() - //{ - // //do the assembly name add so we get different windowIDs for multiple plugins - // WindowID = UnityEngine.Random.Range(1000, 2000000) + Log._AssemblyName.GetHashCode(); - // _Visible = false; - // Log.Debug("WindowID:{0}", WindowID); - - // //and look for any customattributes - // WindowInitialsAttribute[] attrs = (WindowInitialsAttribute[])Attribute.GetCustomAttributes(GetType(), typeof(WindowInitialsAttribute)); - // foreach (WindowInitialsAttribute attr in attrs) - // { - // Visible = attr.Visible; - // WindowCaption = attr.Caption; - - // IsDragging = attr.IsDragging; - // DragEnabled = attr.DragEnabled; - // ClampEnabled = attr.ClampEnabled; - - // TooltipsEnabled = attr.TooltipsEnabled; - - // IsResizing = attr.IsResizing; - - // WindowSize_Min = attr.MinSize; - // WindowSize_Max = attr.MaxSize; - // } - //} - //#endregion - - internal Int32 WindowID { get; private set; } - internal TimeSpan DrawWindowInternalDuration { get; private set; } - private bool _Visible; - protected Rect WindowRect; - protected string WindowCaption; - protected GUIStyle WindowStyle; - internal GUILayoutOption[] WindowOptions; - - public Rect GetWindowRect - { - get { return WindowRect; } - } - - /* dragging and clamping */ - - internal Rect DragRect; - public bool DragEnabled; - public bool ClampEnabled; - internal bool IsDragging; - internal RectOffset ClampToScreenOffset; - - /* tooltips */ - protected bool TooltipShown { get; set; } - internal Rect TooltipPosition { get { return _TooltipPosition; } } - internal Vector2d TooltipMouseOffset; - private Rect _TooltipPosition; - - public bool TooltipsEnabled; - protected Int32 TooltipDisplayForSecs; - protected Int32 TooltipMaxWidth; - private string strToolTipText; - private string strLastTooltipText; - private float fltTooltipTime; // display dt for tooltip - - /* resizing windows */ - internal bool IsResizing; - protected Rect WindowRect_Default; - protected Vector2 WindowSize_Min; - protected Vector2 WindowSize_Max; - protected Rect TextureRect; - protected Texture2D MapTexture; - protected float dW, dH; - - public Vector2 _WindowSize_Min - { - get { return WindowSize_Min; } - } - - public Vector2 _WindowSize_Max - { - get { return WindowSize_Max; } - } - - internal void resetWindowPos(Rect r) - { - WindowRect = r; - } - - public static bool inRepaint() { return (Event.current.type == EventType.Repaint); } - public static bool inLayout() { return (Event.current.type == EventType.Layout); } - - // convenience functions to shorten the task of creating windows - public static void growE() { GUILayout.BeginHorizontal(); } - public static void growS() { GUILayout.BeginVertical(); } - public static void stopE() { GUILayout.EndHorizontal(); } - public static void stopS() { GUILayout.EndVertical(); } - public static void growE(GUIContent c, string s) { GUILayout.BeginHorizontal(c, s); } - public static void growS(GUIContent c, string s) { GUILayout.BeginVertical(c, s); } - public static void growE(params GUILayoutOption[] options) { GUILayout.BeginHorizontal(options); } - public static void growS(params GUILayoutOption[] options) { GUILayout.BeginVertical(options); } - public static void fillS() { GUILayout.FlexibleSpace(); } - public static void fillS(float f) { GUILayout.Space(f); } - - public static GUILayoutOption GoE() { return GUILayout.ExpandWidth(true); } - public static GUILayoutOption GoS() { return GUILayout.ExpandHeight(true); } - public static GUILayoutOption NoE() { return GUILayout.ExpandWidth(false); } - public static GUILayoutOption NoS() { return GUILayout.ExpandHeight(false); } - public static GUILayoutOption GoE(bool grow) { return GUILayout.ExpandWidth(grow); } - public static GUILayoutOption GoS(bool grow) { return GUILayout.ExpandHeight(grow); } - - // helper functions to include tooltips - public static GUIContent textWithTT(string label, string tooltip) { return new GUIContent(label, tooltip); } - public static GUIContent iconWithTT(Texture tex, string tooltip) { return new GUIContent(tex, tooltip); } - - protected override void Awake() - { - Log.Debug("New MBWindow Awakened"); - - base.Awake(); - - //do the assembly name add so we get different windowIDs for multiple plugins - WindowID = UnityEngine.Random.Range(1000, 2000000) + Log._AssemblyName.GetHashCode(); - _Visible = false; - Log.Debug("WindowID:{0}", WindowID); - - ClampToScreenOffset = new RectOffset(0, 0, 0, 0); - _TooltipPosition = new Rect(); - ClampEnabled = true; - TooltipDisplayForSecs = 15; - TooltipMaxWidth = 250; - strToolTipText = ""; - strLastTooltipText = ""; - - //and look for any customattributes - WindowInitialsAttribute[] attrs = (WindowInitialsAttribute[])Attribute.GetCustomAttributes(GetType(), typeof(WindowInitialsAttribute)); - foreach (WindowInitialsAttribute attr in attrs) - { - Visible = attr.Visible; - WindowCaption = attr.Caption; - - IsDragging = attr.IsDragging; - DragEnabled = attr.DragEnabled; - ClampEnabled = attr.ClampEnabled; - - TooltipsEnabled = attr.TooltipsEnabled; - - IsResizing = attr.IsResizing; - - WindowSize_Min = attr.MinSize; - WindowSize_Max = attr.MaxSize; - } - } - protected virtual void DrawWindowPre(Int32 id) { } - protected abstract void DrawWindow(Int32 id); - protected virtual void DrawWindowPost(Int32 id) { } - - /* tooltip helper functions */ - private void SetTooltipText() { if (inRepaint()) { strToolTipText = GUI.tooltip; } } - private bool untimed() { return (TooltipDisplayForSecs == 0); } - private bool hasMoreTime() { return (fltTooltipTime < (float)TooltipDisplayForSecs); } - private bool expired() { return (fltTooltipTime <= 0); } - private bool hasChanged() { return (strToolTipText != strLastTooltipText); } - private bool hasContent() { return (strToolTipText != ""); } - private bool inUseNow() { return ((untimed() || hasMoreTime()) && (hasContent()) && TooltipsEnabled && Visible); } - - public bool Visible - { - get { return _Visible; } - set - { - if (_Visible != value) - { - if (value) - { - Log.Debug("Adding Window to PostDrawQueue-{0}", WindowID); - SCANcontroller.controller.addToDrawQueue(WindowID, this.DrawGUI); - } - else - { - Log.Debug("Removing Window from PostDrawQueue", WindowID); - SCANcontroller.controller.removeFromDrawQueue(WindowID); - } - } - _Visible = value; - } - } - - protected void DrawGUI() - { - string cc = ""; - GUI.skin = SCAN_SkinsLibrary.CurrentSkin; //this sets the skin on each draw loop - if (ClampEnabled) WindowRect = WindowRect.ClampToScreen(ClampToScreenOffset); - if (IsResizing) cc = WindowCaption + " --> Map Width: " + dW.ToString("N0"); - else cc = WindowCaption; - - switch (WindowStyle == null) - { - case true: WindowRect = GUILayout.Window(WindowID, WindowRect, DrawWindowInternal, cc, WindowOptions); break; - default: WindowRect = GUILayout.Window(WindowID, WindowRect, DrawWindowInternal, cc, WindowStyle, WindowOptions); break; - } - if (TooltipsEnabled) DrawToolTip(); //Draw the tooltip of its there to be drawn - } - - private void DrawWindowInternal(Int32 id) - { - DateTime Duration = DateTime.Now; // record the start date - DrawWindowPre(id); - DrawWindow(id); // This calls the must be overridden code - DrawWindowPost(id); - if (TooltipsEnabled) SetTooltipText(); //Set the Tooltip variable based on whats in this window - - if (DragEnabled) - if (DragRect.height == 0 && DragRect.width == 0) GUI.DragWindow(); - else GUI.DragWindow(DragRect); - DrawWindowInternalDuration = (DateTime.Now - Duration); //Now calc the duration - } - protected void DrawToolTip() - { - // Added drawing check to turn off tooltips when window hides - if (inUseNow()) - { - GUIContent contTooltip = new GUIContent(strToolTipText); - GUIStyle styleTooltip = SCAN_SkinsLibrary.CurrentTooltip; - - // if the content of the tooltip changes then reset the counter - if (!TooltipShown || hasChanged()) fltTooltipTime = 0f; - - if (TooltipMouseOffset == null) - TooltipMouseOffset = new Vector2d(); - - // Calc the size of the Tooltip - _TooltipPosition.x = Event.current.mousePosition.x + (float)TooltipMouseOffset.x; - _TooltipPosition.y = Event.current.mousePosition.y + (float)TooltipMouseOffset.y; - - //do max width calc if needed - if (TooltipMaxWidth > 0) - { - float minwidth, maxwidth; - SCAN_SkinsLibrary.CurrentTooltip.CalcMinMaxWidth(contTooltip, out minwidth, out maxwidth); // figure out how wide one line would be - _TooltipPosition.width = Math.Min(TooltipMaxWidth - SCAN_SkinsLibrary.CurrentTooltip.padding.horizontal, maxwidth + SCAN_SkinsLibrary.CurrentTooltip.padding.horizontal + 10); // then work out the height with a max width - _TooltipPosition.height = SCAN_SkinsLibrary.CurrentTooltip.CalcHeight(contTooltip, TooltipPosition.width); // heres the result - } - else - { // (TooltipMaxWidth== 0) - Vector2 Size = SCAN_SkinsLibrary.CurrentTooltip.CalcSize(contTooltip); - _TooltipPosition.width = Size.x; - _TooltipPosition.height = Size.y; - } - styleTooltip.stretchHeight = !(TooltipMaxWidth > 0); - styleTooltip.stretchWidth = !(TooltipMaxWidth > 0); - styleTooltip.wordWrap = (TooltipMaxWidth > 0); - - //clamp it accordingly - if (ClampEnabled) _TooltipPosition = _TooltipPosition.ClampToScreen(ClampToScreenOffset); - GUI.Label(TooltipPosition, contTooltip, styleTooltip); // Draw the Tooltip - GUI.depth = 0; // On top of everything - fltTooltipTime += Time.deltaTime; // update how long the tip has been on the screen - TooltipShown = true; // reset the flags - } - else - { - TooltipShown = false; - } // clear the flags - - if (strToolTipText != strLastTooltipText) fltTooltipTime = 0f; - strLastTooltipText = strToolTipText; - - } - } -} diff --git a/SCANsat/SCAN_Platform/SCAN_SkinsLibrary.cs b/SCANsat/SCAN_Platform/SCAN_SkinsLibrary.cs deleted file mode 100644 index 17fcf6a52..000000000 --- a/SCANsat/SCAN_Platform/SCAN_SkinsLibrary.cs +++ /dev/null @@ -1,231 +0,0 @@ -#region license -/* - * [Scientific Committee on Advanced Navigation] - * S.C.A.N. Satellite - * - * SCANsat - Skins Library; For adding, copying and modifying GUI Skins and Styles - * * - * A modified form of TriggerAu's Skins Library class: - * http://forum.kerbalspaceprogram.com/threads/66503-KSP-Plugin-Framework - * - * Copyright (c)2013 damny; - * Copyright (c)2014 David Grandy ; - * Copyright (c)2014 technogeeky ; - * Copyright (c)2014 (Your Name Here) ; see LICENSE.txt for licensing details. - * - */ -#endregion -using System; -using System.Collections.Generic; -using System.Linq; - -using UnityEngine; - -using Log = SCANsat.SCAN_Platform.Logging.ConsoleLogger; - -namespace SCANsat.SCAN_Platform -{ - - public static class SCAN_SkinsLibrary - { - #region Constructor - static SCAN_SkinsLibrary() - { - _Initialized = false; - knownSkins = new Dictionary(); - GUIStyle_.knownStyles = new List(); - Color_.initColorTable(); // initalize the table of known colors - } - #endregion - private static GUISkin _CurrentSkin; - private static GUIStyle _CurrentTooltip; - internal static bool _Initialized { get; private set; } - public static GUISkin DefUnitySkin { get; private set; } - public static GUISkin DefKSPSkin { get; private set; } - - internal static GUISkin CurrentSkin { get { return _CurrentSkin; } } - internal static GUIStyle CurrentTooltip { get { return _CurrentTooltip; } } - - internal static Dictionary knownSkins { get; set; } - - public delegate void SkinChangedEvent(); - public static event SkinChangedEvent OnSkinChanged; - - public delegate void TooltipChangedEvent(); - - internal static void InitSkinList() - { - Log.Debug("in InitSkinList()"); - if (!_Initialized) - { - DefUnitySkin = GUI.skin; - DefKSPSkin = HighLogic.Skin; - - knownSkins.Add("Unity", DefUnitySkin); - knownSkins.Add("KSP", DefKSPSkin); - DefUnitySkin.dumpSkins(); - SetCurrent("KSP"); - _Initialized = true; - } - } - - public static void SetCurrent(string SkinID) - { - GUISkin OldSkin = _CurrentSkin; - - Log.Debug("Setting GUISkin(string SkinID) to {0}", SkinID); - - if (knownSkins.ContainsKey(SkinID)) _CurrentSkin = knownSkins[SkinID]; - else Log.Now("SetCurrent: GUISkin {0} not found", SkinID); - - //SetCurrentTooltip(); // Now set the tooltip style as well - if (OldSkin != CurrentSkin && OnSkinChanged != null) OnSkinChanged(); - } - - public static void SetCurrentTooltip() - { - //Use the custom skin if it exists - Log.Debug("in SetCurrentTooltip()"); - if (StyleExists(_CurrentSkin, "SCAN_Tooltip")) _CurrentTooltip = GetStyle(_CurrentSkin, "SCAN_Tooltip"); - else - { //otherwise lets build a style for the defaults or take the label style otherwise - if (_CurrentSkin == DefUnitySkin) _CurrentTooltip = new GUIStyle(DefUnitySkin.box); - else if (_CurrentSkin == DefKSPSkin) _CurrentTooltip = GenDefKSPTooltip(); - else _CurrentTooltip = _CurrentSkin.label; - } - } - public static GUIStyle GenDefKSPTooltip() - { - Log.Debug("in GenDefKSPTooltip()"); - GUIStyle retStyle = new GUIStyle(DefKSPSkin.label); // build a new style to return - Texture2D texBack = new Texture2D(1, 1, TextureFormat.ARGB32, false); // background texture - texBack.SetPixel(0, 0, new Color(0.5f, 0.5f, 0.5f, 0.95f)); // background color - texBack.Apply(); - retStyle.normal.background = texBack; // put bkg into style - retStyle.normal.textColor = new Color32(224, 224, 224, 255); // set some text defaults - retStyle.padding = new RectOffset(3, 3, 3, 3); // set padding defaults - retStyle.alignment = TextAnchor.MiddleCenter; // set default center alignment - return retStyle; - } - - public static GUISkin CopySkin(string SkinID) - { - Log.Debug("in CopySkin(string SkinID)"); - if (knownSkins.ContainsKey(SkinID)) return (GUISkin)SCAN_MBE.Instantiate(knownSkins[SkinID]); - else - { - Log.Now("CopySkin(): GUISkin {0} not found", SkinID); - throw new SystemException(string.Format("CopySkin(): GUISkin {0} not found", SkinID)); - } - } - - public static void AddSkin(string SkinID, GUISkin NewSkin, bool SetAsCurrent = false) - { - Log.Debug("in AddSkin"); - NewSkin.name = SkinID; - if (knownSkins.ContainsKey(SkinID)) knownSkins[SkinID] = NewSkin; - else knownSkins.Add(SkinID, NewSkin); - - if (SetAsCurrent) SetCurrent(SkinID); - } - public static bool RemoveSkin(string SkinID) - { - switch (SkinID) - { - case "Unity": - case "KSP": Log.Now("RemoveSkin({0}) failed: removing a built-in skin is prohibited.", SkinID); return false; - default: Log.Now("RemoveSkin({0})", SkinID); return knownSkins.Remove(SkinID); - } - } - internal static bool SkinExists(string SkinID) { Log.Debug("in SkinExists()"); return knownSkins.ContainsKey(SkinID); } - - internal static bool StyleExists(string SkinID, string StyleID) - { - return (SkinExists(SkinID) && StyleExists(knownSkins[SkinID], StyleID)); - } - internal static bool StyleExists(GUISkin SkinToAction, string StyleID) - { - Log.Debug("in StyleExists(GUISkin s2a,)"); - if (SkinToAction.customStyles.Any(x => x.name == StyleID)) - return true; - else - { - //Log.log("Unable to find Style: {0} in Skin: {1}", StyleID, SkinToAction.name); - return false; - } - //return (SkinToAction.customStyles.Any(x => x.name == StyleID)); - } - - public static void AddStyle(GUIStyle NewStyle, string SkinId) - { - Log.Debug("in AddStyle(GUIStyle ns,string sid)"); - if (SkinExists(SkinId)) - { - GUISkin skinTemp = knownSkins[SkinId]; - AddStyle(NewStyle, ref skinTemp); - } - } - internal static void AddStyle(GUIStyle NewStyle, string SkinId, string StyleID) - { - Log.Debug("in AddStyle(GUIStyle ns,string skinID, string StyleID)"); - NewStyle.name = StyleID; - AddStyle(NewStyle, SkinId); - } - internal static void AddStyle(GUIStyle NewStyle, ref GUISkin SkinToAction, string StyleID) - { - Log.Debug("in AddStyle(GUIStyle ns,ref GUISkin, string StyleID)"); - NewStyle.name = StyleID; // set the name - AddStyle(NewStyle, ref SkinToAction); // and push to the next method - } - internal static void AddStyle(GUIStyle NewStyle, ref GUISkin SkinToAction) - { - Log.Debug("in AddStyle(GUIStyle ns,ref GUISkin)"); - if (string.IsNullOrEmpty(NewStyle.name)) - { - Log.Now("No Name Provided in the Style to add to {0}. Cannot add this.", SkinToAction.name); - return; - } - List lstTemp = SkinToAction.customStyles.ToList(); // convert to a list - - - if (lstTemp.Any(x => x.name == NewStyle.name)) - { // add or edit the customstyle - GUIStyle styleTemp = lstTemp.First(x => x.name == NewStyle.name); - lstTemp.Remove(styleTemp); // if itexists then remove it first - } - - lstTemp.Add(NewStyle); // add the new style - SkinToAction.customStyles = lstTemp.ToArray(); // write the list back to the array - } - - internal static void RemoveStyle(string SkinID, string StyleID) - { - Log.Debug("in RemoveStyle(string SkinID,string StyleID)"); - if (SkinExists(SkinID)) - { - GUISkin skinTemp = knownSkins[SkinID]; - RemoveStyle(ref skinTemp, StyleID); - } - } - internal static void RemoveStyle(ref GUISkin SkinToAction, string StyleID) - { - Log.Debug("in RemoveStyle(GUISkin s2a, string StyleID)"); - if (StyleExists(SkinToAction, StyleID)) - { - List lstTemp = SkinToAction.customStyles.ToList(); // convert to a list - GUIStyle styleTemp = lstTemp.First(x => x.name == StyleID); // find and ... - lstTemp.Remove(styleTemp); // ... remove the style - SkinToAction.customStyles = lstTemp.ToArray(); // write back - } - } - - internal static GUIStyle GetStyle(GUISkin SkinToAction, string StyleID) - { - Log.Debug("in GetStyle(GUISkin s2a, string StyleID)"); - if (StyleExists(SkinToAction, StyleID)) - return SkinToAction.customStyles.First(x => x.name == StyleID); - else - return null; - } - } -} diff --git a/SCANsat/SCAN_Settings_Config.cs b/SCANsat/SCAN_Settings_Config.cs new file mode 100644 index 000000000..d18bb0797 --- /dev/null +++ b/SCANsat/SCAN_Settings_Config.cs @@ -0,0 +1,229 @@ +#region license +/* + * [Scientific Committee on Advanced Navigation] + * S.C.A.N. Satellite + * + * SCAN_Settings_Config - serializable object that stores settings in an external file + * + * Copyright (c)2014 David Grandy ; + * Copyright (c)2014 technogeeky ; + * Copyright (c)2014 (Your Name Here) ; see LICENSE.txt for licensing details. + */ +#endregion + +using System; +using System.IO; +using System.Reflection; +using UnityEngine; +using palette = SCANsat.SCAN_UI.UI_Framework.SCANpalette; + +namespace SCANsat +{ + [KSPAddon(KSPAddon.Startup.MainMenu, true)] + public class SCAN_Settings_Config : MonoBehaviour + { + [Persistent] + public bool BackgroundScanning = true; + [Persistent] + public int TimeWarpResolution = 12; + [Persistent] + public bool ShowGroundTracks = true; + [Persistent] + public bool GroundTracksActiveOnly = true; + [Persistent] + public bool MechJebTarget = false; + [Persistent] + public bool MechJebTargetLoad = false; + [Persistent] + public bool OverlayTooltips = true; + [Persistent] + public bool WindowTooltips = true; + [Persistent] + public bool LegendTooltips = true; + [Persistent] + public bool StockToolbar = true; + [Persistent] + public bool ToolbarMenu = true; + [Persistent] + public bool StockUIStyle = false; + [Persistent] + public int MapGenerationSpeed = 2; + [Persistent] + public float UIScale = 1; + [Persistent] + public bool BiomeLock = true; + [Persistent] + public bool RequireNarrowBand = true; + [Persistent] + public bool DisableStockResource = false; + [Persistent] + public bool InstantScan = true; + [Persistent] + public bool UseStockTreshold = true; + [Persistent] + public float StockTreshold = 0.9f; + [Persistent] + public int Interpolation = 8; + [Persistent] + public int ResourceMapHeight = 256; + [Persistent] + public int BiomeMapHeight = 512; + [Persistent] + public float CoverageTransparency = 0.2f; + [Persistent] + public bool TrueGreyScale = false; + [Persistent] + public bool ExportCSV = false; + [Persistent] + public float BiomeTransparency = 0.4f; + [Persistent] + public bool BigMapBiomeBorder = true; + [Persistent] + public bool BigMapStockBiomes = true; + [Persistent] + public bool ZoomMapBiomeBorder = true; + [Persistent] + public bool SmallMapBiomeBorder = false; + [Persistent] + public bool SmallMapStockBiomes = true; + [Persistent] + public Color LowBiomeColor = palette.xkcd_CamoGreen; + [Persistent] + public Color HighBiomeColor = palette.xkcd_Marigold; + [Persistent] + public float SlopeCutoff = 1; + [Persistent] + public Color BottomLowSlopeColor = palette.xkcd_PukeGreen; + [Persistent] + public Color BottomHighSlopeColor = palette.xkcd_Lemon; + [Persistent] + public Color TopLowSlopeColor = palette.xkcd_Lemon; + [Persistent] + public Color TopHighSlopeColor = palette.xkcd_OrangeRed; + [Persistent] + public bool CheatMapFill = false; + [Persistent] + public int BigMapWidth = 720; + [Persistent] + public Vector2 ZoomMapSize = new Vector2(360, 240); + [Persistent] + public Vector2 BigMapPosition = new Vector2(400, -400); + [Persistent] + public Vector2 MainMapPosition = new Vector2(100, -200); + [Persistent] + public Vector2 ZoomMapPosition = new Vector2(400, -400); + [Persistent] + public Vector2 InstrumentsPosition = new Vector2(100, -500); + [Persistent] + public Vector2 OverlayPosition = new Vector2(600, -200); + + private const string filePath = "GameData/SCANsat/PluginData/Settings.cfg"; + private string fullPath; + + private static bool loaded; + private static SCAN_Settings_Config instance; + + public static SCAN_Settings_Config Instance + { + get { return instance; } + } + + private void Awake() + { + if (loaded) + { + Destroy(gameObject); + return; + } + + DontDestroyOnLoad(gameObject); + + loaded = true; + + instance = this; + + fullPath = Path.Combine(KSPUtil.ApplicationRootPath, filePath).Replace("\\", "/"); + + if (Load()) + SCANUtil.SCANlog("Settings file loaded"); + else + { + if (Save()) + SCANUtil.SCANlog("Settings file generated at:\n{0}", filePath); + } + + GameEvents.onGameStateSaved.Add(GameSaved); + } + + private void GameSaved(Game g) + { + if (HighLogic.CurrentGame == g) + Save(); + } + + public bool Load() + { + bool b = false; + + try + { + if (File.Exists(fullPath)) + { + ConfigNode node = ConfigNode.Load(fullPath); + ConfigNode unwrapped = node.GetNode(GetType().Name); + ConfigNode.LoadObjectFromConfig(this, unwrapped); + b = true; + } + else + { + SCANUtil.SCANlog("Settings file could not be found [{0}]", fullPath); + b = false; + } + } + catch (Exception e) + { + SCANUtil.SCANlog("Error while loading settings file from [{0}]\n{1}", fullPath, e); + b = false; + } + + return b; + } + + public bool Save() + { + bool b = false; + + try + { + ConfigNode node = AsConfigNode(); + ConfigNode wrapper = new ConfigNode(GetType().Name); + wrapper.AddNode(node); + wrapper.Save(fullPath); + b = true; + } + catch (Exception e) + { + SCANUtil.SCANlog("Error while saving settings file from [{0}]\n{1}", fullPath, e); + b = false; + } + + return b; + } + + private ConfigNode AsConfigNode() + { + try + { + ConfigNode node = new ConfigNode(GetType().Name); + + node = ConfigNode.CreateConfigFromObject(this, node); + return node; + } + catch (Exception e) + { + SCANUtil.SCANlog("Failed to generate settings file node...\n{0}", e); + return new ConfigNode(GetType().Name); + } + } + } +} diff --git a/SCANsat/SCAN_Toolbar/SCANappLauncher.cs b/SCANsat/SCAN_Toolbar/SCANappLauncher.cs index 36a7a76a3..6b199d349 100644 --- a/SCANsat/SCAN_Toolbar/SCANappLauncher.cs +++ b/SCANsat/SCAN_Toolbar/SCANappLauncher.cs @@ -15,25 +15,100 @@ using SCANsat.SCAN_Platform; using SCANsat.SCAN_UI; using SCANsat.SCAN_UI.UI_Framework; +using SCANsat.SCAN_Unity; +using SCANsat.Unity.Unity; +using SCANsat.Unity.Interfaces; +using KSP.UI; using KSP.UI.Screens; +using UnityEngine; namespace SCANsat.SCAN_Toolbar { - class SCANappLauncher : SCAN_MBE + public class SCANappLauncher : MonoBehaviour, ISCAN_Toolbar { private ApplicationLauncherButton SCANappLauncherButton = null; + private bool _inMenu; + private bool _sticky; + private bool _hovering; + private SCANsat.Unity.Unity.SCAN_Toolbar uiElement; + private static SCANappLauncher instance; - protected override void Start() + public static SCANappLauncher Instance { + get { return instance; } + } + + public SCANsat.Unity.Unity.SCAN_Toolbar UIElement + { + get { return uiElement; } + } + + public ApplicationLauncherButton SCANAppButton + { + get { return SCANappLauncherButton; } + } + + public Canvas TooltipCanvas + { + get { return UIMasterController.Instance.tooltipCanvas; } + } + + public bool TooltipsOn + { + get { return SCAN_Settings_Config.Instance.WindowTooltips; } + } + + public bool IsVisible + { + get { return _sticky && uiElement != null; } + } + + public float Scale + { + get { return GameSettings.UI_SCALE_APPS; } + } + + public void ProcessTooltips() + { + if (uiElement != null) + uiElement.ProcessTooltips(); + } + + private void Start() + { + instance = this; + setupToolbar(); + + GameEvents.OnGameSettingsApplied.Add(settingsApplied); + } + + public void ToggleToolbarType() + { + removeButton(HighLogic.LoadedScene); + + StartCoroutine(addButton()); } - protected override void OnDestroy() + private void OnDestroy() { GameEvents.onGUIApplicationLauncherUnreadifying.Remove(removeButton); if (SCANappLauncherButton != null) removeButton(HighLogic.LoadedScene); + + GameEvents.OnGameSettingsApplied.Remove(settingsApplied); + } + + private void settingsApplied() + { + if (!_sticky || uiElement == null) + return; + + uiElement.gameObject.SetActive(false); + DestroyImmediate(uiElement.gameObject); + + OpenMenu(); } private void setupToolbar() @@ -48,11 +123,22 @@ IEnumerator addButton() if (HighLogic.LoadedScene == GameScenes.FLIGHT) { - SCANappLauncherButton = ApplicationLauncher.Instance.AddModApplication(toggleFlight, toggleFlight, null, null, null, null, ApplicationLauncher.AppScenes.FLIGHT | ApplicationLauncher.AppScenes.MAPVIEW, SCANskins.SCAN_SmallMapAppIcon); + if (SCAN_Settings_Config.Instance.ToolbarMenu) + { + SCANappLauncherButton = ApplicationLauncher.Instance.AddModApplication(OnTrue, OnFalse, HoverMenuIn, HoverMenuOut, null, null, ApplicationLauncher.AppScenes.FLIGHT | ApplicationLauncher.AppScenes.MAPVIEW, SCAN_UI_Loader.SmallMapAppIcon.texture); + ApplicationLauncher.Instance.EnableMutuallyExclusive(SCANappLauncherButton); + } + else + { + SCANappLauncherButton = ApplicationLauncher.Instance.AddModApplication(toggleFlight, toggleFlight, null, null, null, null, ApplicationLauncher.AppScenes.FLIGHT | ApplicationLauncher.AppScenes.MAPVIEW, SCAN_UI_Loader.SmallMapAppIcon.texture); + + if (SCAN_UI_MainMap.Instance.IsVisible) + SCANappLauncherButton.SetTrue(false); + } } else if (HighLogic.LoadedScene == GameScenes.SPACECENTER || HighLogic.LoadedScene == GameScenes.TRACKSTATION) { - SCANappLauncherButton = ApplicationLauncher.Instance.AddModApplication(toggleKSC, toggleKSC, null, null, null, null, ApplicationLauncher.AppScenes.SPACECENTER | ApplicationLauncher.AppScenes.TRACKSTATION, SCANskins.SCAN_BigMapAppIcon); + SCANappLauncherButton = ApplicationLauncher.Instance.AddModApplication(toggleKSC, toggleKSC, null, null, null, null, ApplicationLauncher.AppScenes.SPACECENTER | ApplicationLauncher.AppScenes.TRACKSTATION, SCAN_UI_Loader.BigMapAppIcon.texture); } GameEvents.onGUIApplicationLauncherUnreadifying.Add(removeButton); @@ -60,6 +146,12 @@ IEnumerator addButton() private void removeButton(GameScenes scene) { + if (uiElement != null) + { + uiElement.gameObject.SetActive(false); + Destroy(uiElement.gameObject); + } + if (SCANappLauncherButton != null) { ApplicationLauncher.Instance.RemoveModApplication(SCANappLauncherButton); @@ -69,19 +161,198 @@ private void removeButton(GameScenes scene) private void toggleFlight() { - if (SCANcontroller.controller != null) + if (SCAN_UI_MainMap.Instance.IsVisible) + SCAN_UI_MainMap.Instance.Close(); + else + SCAN_UI_MainMap.Instance.Open(); + } + + private void toggleKSC() + { + if (SCAN_UI_BigMap.Instance.IsVisible) + SCAN_UI_BigMap.Instance.Close(); + else + SCAN_UI_BigMap.Instance.Open(); + } + + private void OnTrue() + { + _sticky = true; + + if (uiElement == null) + OpenMenu(); + } + + private void OnFalse() + { + _sticky = false; + + CloseMenu(); + + uiElement = null; + } + + private void HoverMenuIn() + { + _hovering = true; + + if (_sticky || uiElement != null) + return; + + OpenMenu(); + } + + private void HoverMenuOut() + { + _hovering = false; + + if (!_sticky) + StartCoroutine(HoverOutWait()); + } + + private IEnumerator HoverOutWait() + { + int timer = 0; + + while (timer < 2) { - SCANcontroller.controller.mainMap.Visible = !SCANcontroller.controller.mainMap.Visible; - SCANcontroller.controller.mainMapVisible = !SCANcontroller.controller.mainMapVisible; + timer++; + yield return null; } + + if (!_inMenu) + CloseMenu(); } - private void toggleKSC() + public Vector3 GetAnchor() + { + if (SCANappLauncherButton == null) + return Vector3.zero; + + Vector3 anchor = SCANappLauncherButton.GetAnchor(); + + anchor.x -= 3; + anchor.y += 20; + + return anchor; + } + + private void OpenMenu() + { + if (SCAN_UI_Loader.ToolbarPrefab == null) + return; + + uiElement = (Instantiate(SCAN_UI_Loader.ToolbarPrefab, GetAnchor(), Quaternion.identity) as GameObject).GetComponent(); + + if (uiElement == null) + return; + + uiElement.transform.SetParent(UIMasterController.Instance.appCanvas.transform); + + uiElement.Setup(this); + } + + private void CloseMenu() + { + if (uiElement != null) + uiElement.FadeOut(); + } + + private IEnumerator MenuHoverOutWait() + { + int timer = 0; + + while (timer < 2) + { + timer++; + yield return null; + } + + if (!_hovering && !_sticky) + CloseMenu(); + } + + public bool InMenu + { + get { return _inMenu; } + set + { + _inMenu = value; + + if (!value) + StartCoroutine(MenuHoverOutWait()); + } + } + + public bool MainMap + { + get { return SCAN_UI_MainMap.Instance.IsVisible; } + set + { + if (value) + SCAN_UI_MainMap.Instance.Open(); + else + SCAN_UI_MainMap.Instance.Close(); + } + } + + public bool BigMap + { + get { return SCAN_UI_BigMap.Instance.IsVisible; } + set + { + if (value) + SCAN_UI_BigMap.Instance.Open(); + else + SCAN_UI_BigMap.Instance.Close(); + } + } + + public bool ZoomMap + { + get { return SCAN_UI_ZoomMap.Instance.IsVisible; } + set + { + if (value) + SCAN_UI_ZoomMap.Instance.Open(true); + else + SCAN_UI_ZoomMap.Instance.Close(); + } + } + + public bool Overlay + { + get { return SCAN_UI_Overlay.Instance.IsVisible; } + set + { + if (value) + SCAN_UI_Overlay.Instance.Open(); + else + SCAN_UI_Overlay.Instance.Close(); + } + } + + public bool Instruments + { + get { return SCAN_UI_Instruments.Instance.IsVisible; } + set + { + if (value) + SCAN_UI_Instruments.Instance.Open(); + else + SCAN_UI_Instruments.Instance.Close(); + } + } + + public bool Settings { - if (SCANcontroller.controller != null) + get { return SCAN_UI_Settings.Instance.IsVisible; } + set { - SCANcontroller.controller.kscMap.Visible = !SCANcontroller.controller.kscMap.Visible; - SCANcontroller.controller.kscMapVisible = !SCANcontroller.controller.kscMapVisible; + if (value) + SCAN_UI_Settings.Instance.Open(); + else + SCAN_UI_Settings.Instance.Close(); } } } diff --git a/SCANsat/SCAN_Toolbar/SCANtoolbar.cs b/SCANsat/SCAN_Toolbar/SCANtoolbar.cs index f4ab53ac1..20e5879a2 100644 --- a/SCANsat/SCAN_Toolbar/SCANtoolbar.cs +++ b/SCANsat/SCAN_Toolbar/SCANtoolbar.cs @@ -16,11 +16,12 @@ using System.IO; using UnityEngine; using SCANsat.SCAN_Platform; +using SCANsat.SCAN_Unity; namespace SCANsat.SCAN_Toolbar { - [SCAN_KSPAddonImproved(SCAN_KSPAddonImproved.Startup.TimeElapses, false)] - class SCANtoolbar : MonoBehaviour + [KSPAddon(KSPAddon.Startup.AllGameScenes, false)] + public class SCANtoolbar : MonoBehaviour { private IButton SCANButton; private IButton MapButton; @@ -29,9 +30,13 @@ class SCANtoolbar : MonoBehaviour private IButton KSCButton; private IButton ZoomButton; - internal SCANtoolbar() + public SCANtoolbar() { - if (!ToolbarManager.ToolbarAvailable) return; // bail if we don't have a toolbar + if (!ToolbarManager.ToolbarAvailable) + { + Destroy(gameObject); // bail if we don't have a toolbar + return; + } if (HighLogic.LoadedSceneIsFlight) { @@ -78,34 +83,42 @@ internal SCANtoolbar() }; MapButton.OnClick += (e) => { - if (SCANcontroller.controller != null) + if (SCAN_UI_BigMap.Instance != null) { - SCANcontroller.controller.BigMap.Visible = !SCANcontroller.controller.BigMap.Visible; - SCANcontroller.controller.bigMapVisible = !SCANcontroller.controller.bigMapVisible; + if (SCAN_UI_BigMap.Instance.IsVisible) + SCAN_UI_BigMap.Instance.Close(); + else + SCAN_UI_BigMap.Instance.Open(); } }; SmallButton.OnClick += (e) => { - if (SCANcontroller.controller != null) + if (SCAN_UI_MainMap.Instance != null) { - SCANcontroller.controller.mainMap.Visible = !SCANcontroller.controller.mainMap.Visible; - SCANcontroller.controller.mainMapVisible = !SCANcontroller.controller.mainMapVisible; + if (SCAN_UI_MainMap.Instance.IsVisible) + SCAN_UI_MainMap.Instance.Close(); + else + SCAN_UI_MainMap.Instance.Open(); } }; OverlayButton.OnClick += (e) => { - if (SCANcontroller.controller != null) + if (SCAN_UI_Overlay.Instance != null) { - SCANcontroller.controller.resourceOverlay.Visible = !SCANcontroller.controller.resourceOverlay.Visible; + if (SCAN_UI_Overlay.Instance.IsVisible) + SCAN_UI_Overlay.Instance.Close(); + else + SCAN_UI_Overlay.Instance.Open(); } }; ZoomButton.OnClick += (e) => { - if (SCANcontroller.controller != null) + if (SCAN_UI_ZoomMap.Instance != null) { - SCANcontroller.controller.zoomMap.Visible = !SCANcontroller.controller.zoomMap.Visible; - if (SCANcontroller.controller.zoomMap.Visible && !SCANcontroller.controller.zoomMap.Initialized) - SCANcontroller.controller.zoomMap.initializeMap(); + if (SCAN_UI_ZoomMap.Instance.IsVisible) + SCAN_UI_ZoomMap.Instance.Close(); + else + SCAN_UI_ZoomMap.Instance.Open(true); } }; } @@ -122,13 +135,17 @@ internal SCANtoolbar() KSCButton.OnClick += (e) => { - if (SCANcontroller.controller != null) + if (SCAN_UI_BigMap.Instance != null) { - SCANcontroller.controller.kscMap.Visible = !SCANcontroller.controller.kscMap.Visible; - SCANcontroller.controller.kscMapVisible = !SCANcontroller.controller.kscMapVisible; + if (SCAN_UI_BigMap.Instance.IsVisible) + SCAN_UI_BigMap.Instance.Close(); + else + SCAN_UI_BigMap.Instance.Open(); } }; } + else + Destroy(gameObject); } private void toggleMenu(IButton menu) @@ -150,45 +167,67 @@ private void createMenu(IButton menu) IButton bigMap = list.AddOption("Big Map"); IButton zoomMap = list.AddOption("Zoom Map"); IButton settings = list.AddOption("Settings"); - IButton color = list.AddOption("Color Options"); IButton resource = list.AddOption("Planetary Overlay"); - IButton resourceSettings = list.AddOption("Resource Settings"); smallMap.OnClick += (e2) => { - SCANcontroller.controller.mainMap.Visible = !SCANcontroller.controller.mainMap.Visible; - SCANcontroller.controller.mainMapVisible = !SCANcontroller.controller.mainMapVisible; + if (SCAN_UI_MainMap.Instance != null) + { + if (SCAN_UI_MainMap.Instance.IsVisible) + SCAN_UI_MainMap.Instance.Close(); + else + SCAN_UI_MainMap.Instance.Open(); + } }; instrument.OnClick += (e2) => { - SCANcontroller.controller.instrumentsWindow.Visible = !SCANcontroller.controller.instrumentsWindow.Visible; + if (SCAN_UI_Instruments.Instance != null) + { + if (SCAN_UI_Instruments.Instance.IsVisible) + SCAN_UI_Instruments.Instance.Close(); + else + SCAN_UI_Instruments.Instance.Open(); + } }; bigMap.OnClick += (e2) => { - SCANcontroller.controller.BigMap.Visible = !SCANcontroller.controller.BigMap.Visible; - SCANcontroller.controller.bigMapVisible = !SCANcontroller.controller.bigMapVisible; + if (SCAN_UI_BigMap.Instance != null) + { + if (SCAN_UI_BigMap.Instance.IsVisible) + SCAN_UI_BigMap.Instance.Close(); + else + SCAN_UI_BigMap.Instance.Open(); + } }; zoomMap.OnClick += (e2) => { - SCANcontroller.controller.zoomMap.Visible = !SCANcontroller.controller.zoomMap.Visible; - if (SCANcontroller.controller.zoomMap.Visible && !SCANcontroller.controller.zoomMap.Initialized) - SCANcontroller.controller.zoomMap.initializeMap(); + if (SCAN_UI_ZoomMap.Instance != null) + { + if (SCAN_UI_ZoomMap.Instance.IsVisible) + SCAN_UI_ZoomMap.Instance.Close(); + else + SCAN_UI_ZoomMap.Instance.Open(true); + } }; settings.OnClick += (e2) => { - SCANcontroller.controller.settingsWindow.Visible = !SCANcontroller.controller.settingsWindow.Visible; - }; - color.OnClick += (e2) => - { - SCANcontroller.controller.colorManager.Visible = !SCANcontroller.controller.colorManager.Visible; + if (SCAN_UI_Settings.Instance != null) + { + if (SCAN_UI_Settings.Instance.IsVisible) + SCAN_UI_Settings.Instance.Close(); + else + SCAN_UI_Settings.Instance.Open(); + } }; resource.OnClick += (e2) => { - SCANcontroller.controller.resourceOverlay.Visible = !SCANcontroller.controller.resourceOverlay.Visible; - }; - resourceSettings.OnClick += (e2) => - { - SCANcontroller.controller.resourceSettings.Visible = !SCANcontroller.controller.resourceSettings.Visible; + if (SCAN_UI_Overlay.Instance != null) + { + if (SCAN_UI_Overlay.Instance.IsVisible) + SCAN_UI_Overlay.Instance.Close(); + else + SCAN_UI_Overlay.Instance.Open(); + } }; list.OnAnyOptionClicked += () => destroyMenu(menu); menu.Drawable = list; diff --git a/SCANsat/SCAN_UI/SCANbigMap.cs b/SCANsat/SCAN_UI/SCANbigMap.cs deleted file mode 100644 index 136307d0c..000000000 --- a/SCANsat/SCAN_UI/SCANbigMap.cs +++ /dev/null @@ -1,881 +0,0 @@ -#region license -/* - * [Scientific Committee on Advanced Navigation] - * S.C.A.N. Satellite - * - * SCANsat - New Big map window object - * - * Copyright (c)2013 damny; - * Copyright (c)2014 David Grandy ; - * Copyright (c)2014 technogeeky ; - * Copyright (c)2014 (Your Name Here) ; see LICENSE.txt for licensing details. - * - */ -#endregion - -using System.Collections.Generic; -using System.Text; -using SCANsat.SCAN_Platform; -using SCANsat; -using SCANsat.SCAN_UI.UI_Framework; -using SCANsat.SCAN_Data; -using SCANsat.SCAN_Map; -using palette = SCANsat.SCAN_UI.UI_Framework.SCANpalette; -using UnityEngine; - -namespace SCANsat.SCAN_UI -{ - class SCANBigMap : SCAN_MBW - { - private static SCANmap bigmap; - private static CelestialBody b; - private string mapTypeTitle = ""; - private SCANdata data; - private Vessel v; - private float resizeW, dragX; - private bool drawGrid, currentGrid, currentColor, lastColor, lastResource; - private bool drop_down_open, projection_drop_down, mapType_drop_down, resources_drop_down, planetoid_drop_down; - //private Texture2D overlay_static; - private Dictionary>> gridLines = new Dictionary>>(); - private Rect ddRect, zoomCloseRect; - private Rect rc; - private Vector2 scrollP, scrollR; - private Vector2d mjTarget = new Vector2d(); - private Rect pos_spotmap; - private Rect pos_spotmap_x; - private StringBuilder infoString; - private StringBuilder infoString2; - internal static Rect defaultRect = new Rect(250, 60, 780, 460); - - private List loadedResources = new List(); - - //Values used for the orbit overlay - Need to fix this - //internal static int[] eq_an_map, eq_dn_map; - //internal static Texture2D eq_map; - //internal static int eq_frame; - - protected override void Awake() - { - base.Awake(); - - WindowCaption = "Map of "; - WindowRect = defaultRect; - WindowSize_Min = new Vector2(550, 225); - WindowSize_Max = new Vector2(8192, 4096); - WindowOptions = new GUILayoutOption[2] { GUILayout.Width(600), GUILayout.Height(300) }; - WindowStyle = SCANskins.SCAN_window; - Visible = false; - DragEnabled = true; - ClampEnabled = false; - TooltipMouseOffset = new Vector2d(-10, -25); - pos_spotmap = new Rect(10f, 10f, 10f, 10f); - pos_spotmap_x = new Rect(10f, 10f, 25f, 25f); - rc = new Rect(0, 0, 20, 20); - - SCAN_SkinsLibrary.SetCurrent("SCAN_Unity"); - SCAN_SkinsLibrary.SetCurrentTooltip(); - } - - protected override void Start() - { - //Initialize the map object - Visible = SCANcontroller.controller.bigMapVisible; - WindowRect.x = SCANcontroller.controller.map_x; - WindowRect.y = SCANcontroller.controller.map_y; - lastColor = currentColor = SCANcontroller.controller.colours == 0; - lastResource = SCANcontroller.controller.map_ResourceOverlay; - infoString = new StringBuilder(); - infoString2 = new StringBuilder(); - if (SCANconfigLoader.GlobalResource) - loadedResources = SCANcontroller.setLoadedResourceList(); - TooltipsEnabled = SCANcontroller.controller.toolTips; - - initializeMap(); - - GameEvents.OnCameraChange.Add(onCameraChange); - } - - private void initializeMap() - { - v = FlightGlobals.ActiveVessel; - if (b == null) - { - if (v == null) - b = FlightGlobals.Bodies[1]; - else - b = v.mainBody; - } - - if (bigmap == null) - { - bigmap = new SCANmap(b, true, mapSource.BigMap); - bigmap.setProjection((MapProjection)SCANcontroller.controller.projection); - if (SCANcontroller.controller.map_width % 2 != 0) - SCANcontroller.controller.map_width += 1; - bigmap.setWidth(SCANcontroller.controller.map_width); - } - - data = SCANUtil.getData(b); - if (data == null) - { - data = new SCANdata(b); - SCANcontroller.controller.addToBodyData(b, data); - } - bigmap.setBody(b); - - WindowCaption = string.Format("Map of {0}", b.theName); - } - - protected override void OnDestroy() - { - GameEvents.OnCameraChange.Remove(onCameraChange); - SCANcontroller.controller.unloadPQS(bigmap.Body, mapSource.BigMap); - } - - protected override void Update() - { - if (FlightGlobals.ready) - v = FlightGlobals.ActiveVessel; - } - - private void onCameraChange(CameraManager.CameraMode cam) - { - if (cam == CameraManager.CameraMode.IVA) - DragEnabled = false; - else - DragEnabled = true; - } - - //Properties used to sync with color selection window - public static SCANmap BigMap - { - get { return bigmap; } - } - - public SCANdata Data - { - get { return data; } - } - - public Vessel V - { - get { return v; } - } - - public CelestialBody Body - { - get { return b; } - } - - public void setMapWidth(int width) - { - if (bigmap == null) - return; - - bigmap.setWidth(width); - drawGrid = true; - SCANcontroller.controller.map_width = bigmap.MapWidth; - } - - protected override void DrawWindowPre(int id) - { - //Append the map type to the window caption - if (bigmap != null) - mapTypeTitle = SCANmapType.mapTypeNames[(int)bigmap.MType]; - else - mapTypeTitle = ""; - - WindowCaption = string.Format("{0} Map of {1}", mapTypeTitle, bigmap.Body.theName); - - //Re-sizing code; moved here from SCAN_MBW - if (IsResizing && !inRepaint()) - { - if (Input.GetMouseButtonUp(0)) - { - IsResizing = false; - if (resizeW < WindowSize_Min.x) - resizeW = WindowSize_Min.x; - else if (resizeW > WindowSize_Max.x) - resizeW = WindowSize_Max.x; - if ((int)resizeW % 2 != 0) - resizeW += 1; - bigmap.setWidth((int)resizeW); - drawGrid = true; - SCANcontroller.controller.map_width = bigmap.MapWidth; - } - else - { - float xx = Input.mousePosition.x; - resizeW += xx - dragX; - dragX = xx; - } - if (Event.current.isMouse) - Event.current.Use(); - } - - //Disable any errant drop down menus - if (!drop_down_open) - { - projection_drop_down = false; - mapType_drop_down = false; - resources_drop_down = false; - planetoid_drop_down = false; - } - } - - //The primary GUI method - protected override void DrawWindow(int id) - { - versionLabel(id); /* Standard version label and close button */ - closeBox(id); - - growS(); - topMenu(id); /* Top row of buttons - used to control the map types */ - growE(); - toggleBar(id); /* Toggle options along left side - control overlay options - *Replace buttons with textures* */ - fillS(60); - mapDraw(id); /* Draw the main map texture */ - stopE(); - growE(); - fillS(180); - growS(); - mouseOver(id); /* Handle all mouse-over info and zoom-map code */ - legendBar(id); /* Draw the mouseover info and legend bar along the bottom */ - stopS(); - stopE(); - stopS(); - - mapLabels(id); /* Draw the vessel/anomaly icons on the map */ - if (drop_down_open) - dropDown(id); /* Draw the drop down menus if any are open */ - } - - protected override void DrawWindowPost(int id) - { - //Close the drop down menu if the window is clicked anywhere else - if (drop_down_open && Event.current.type == EventType.mouseDown && !ddRect.Contains(Event.current.mousePosition)) - drop_down_open = false; - - if (SCANcontroller.controller.TargetSelecting && Event.current.type == EventType.mouseDown && !TextureRect.Contains(Event.current.mousePosition)) - { - SCANcontroller.controller.TargetSelecting = false; - SCANcontroller.controller.TargetSelectingActive = false; - data.removeTargetWaypoint(); - } - - //Update black and white/color statuse - if (lastColor != currentColor) - { - lastColor = currentColor; - if (SCANcontroller.controller.colours == 0) - SCANcontroller.controller.colours = 1; - else - SCANcontroller.controller.colours = 0; - bigmap.resetMap(SCANcontroller.controller.map_ResourceOverlay); - SCANcontroller.controller.mainMap.resetImages(); - } - - //Update grid overlay status - if (currentGrid != SCANcontroller.controller.map_grid) - { - currentGrid = SCANcontroller.controller.map_grid; - drawGrid = true; - } - - //Update selected resource status - if (lastResource != SCANcontroller.controller.map_ResourceOverlay) - { - lastResource = SCANcontroller.controller.map_ResourceOverlay; - bigmap.resetMap(SCANcontroller.controller.map_ResourceOverlay); - } - - SCANcontroller.controller.map_x = (int)WindowRect.x; - SCANcontroller.controller.map_y = (int)WindowRect.y; - } - - //Draw version label in upper left corner - private void versionLabel(int id) - { - Rect r = new Rect(6, 0, 50, 18); - GUI.Label(r, SCANmainMenuLoader.SCANsatVersion, SCANskins.SCAN_whiteReadoutLabel); - } - - //Draw the close button in upper right corner - private void closeBox(int id) - { - Rect r = new Rect(WindowRect.width - 20, 1, 18, 18); - if (GUI.Button(r, SCANcontroller.controller.closeBox, SCANskins.SCAN_closeButton)) - { - Visible = false; - SCANcontroller.controller.bigMapVisible = Visible; - } - } - - //Draw the drop down buttons along the top of the map - Used to control map types - private void topMenu(int id) - { - growE(); - fillS(100); - if (GUILayout.Button("Projection", GUILayout.MaxWidth(100))) - { - SCANcontroller.controller.TargetSelecting = false; - SCANcontroller.controller.TargetSelectingActive = false; - projection_drop_down = !projection_drop_down; - drop_down_open = !drop_down_open; - } - fillS(40); - if (GUILayout.Button("Map Type", GUILayout.MaxWidth(90))) - { - SCANcontroller.controller.TargetSelecting = false; - SCANcontroller.controller.TargetSelectingActive = false; - mapType_drop_down = !mapType_drop_down; - drop_down_open = !drop_down_open; - } - fillS(); - if (GUILayout.Button(iconWithTT(SCANskins.SCAN_RefreshIcon, "Refresh Map"), SCANskins.SCAN_buttonBorderless, GUILayout.MaxWidth(34), GUILayout.MaxHeight(28))) - { - SCANcontroller.controller.TargetSelecting = false; - SCANcontroller.controller.TargetSelectingActive = false; - bigmap.resetMap(SCANcontroller.controller.map_ResourceOverlay); - } - fillS(); - if (SCANconfigLoader.GlobalResource) - { - if (GUILayout.Button("Resources", GUILayout.MaxWidth(90))) - { - SCANcontroller.controller.TargetSelecting = false; - SCANcontroller.controller.TargetSelectingActive = false; - resources_drop_down = !resources_drop_down; - drop_down_open = !drop_down_open; - } - fillS(40); - } - if (GUILayout.Button("Celestial Body", GUILayout.MaxWidth(110))) - { - SCANcontroller.controller.TargetSelecting = false; - SCANcontroller.controller.TargetSelectingActive = false; - planetoid_drop_down = !planetoid_drop_down; - drop_down_open = !drop_down_open; - } - fillS(20); - stopE(); - } - - //Draw the overlay options along the left side of the map texture - private void toggleBar(int id) - { - Rect r = new Rect(32, 24, 24, 24); - - if (SCANcontroller.controller.mechJebTargetSelection) - { - if (SCANcontroller.controller.MechJebLoaded && SCANcontroller.controller.LandingTargetBody == b) - { - if (GUI.Button(r, textWithTT("", "Set MechJeb Target"), SCANskins.SCAN_buttonBorderless)) - { - SCANcontroller.controller.TargetSelecting = !SCANcontroller.controller.TargetSelecting; - } - - r.x += 1; - r.y += 1; - r.width = r.height = 22; - - Color old = GUI.color; - GUI.color = palette.red; - GUI.DrawTexture(r, SCANskins.SCAN_MechJebIcon); - GUI.color = old; - } - } - else - { - if (GUI.Button(r, textWithTT("", "Set Landing Target"), SCANskins.SCAN_buttonBorderless)) - { - SCANcontroller.controller.TargetSelecting = !SCANcontroller.controller.TargetSelecting; - } - - r.x += 1; - r.y += 1; - r.width = r.height = 22; - - Color old = GUI.color; - GUI.color = palette.xkcd_PukeGreen; - GUI.DrawTexture(r, SCANskins.SCAN_TargetIcon); - GUI.color = old; - } - - growS(); - - currentColor = GUILayout.Toggle(currentColor, textWithTT("", "Toggle Color")); - - Rect d = GUILayoutUtility.GetLastRect(); - d.x += 34; - d.y += 2; - d.width = 48; - d.height = 24; - - if (GUI.Button(d, iconWithTT(SCANskins.SCAN_ColorToggleIcon, "Toggle Color"), SCANskins.SCAN_buttonBorderless)) - { - currentColor = !currentColor; - } - - fillS(); - - SCANcontroller.controller.map_grid = GUILayout.Toggle(SCANcontroller.controller.map_grid, textWithTT("", "Toggle Grid")); - - d = GUILayoutUtility.GetLastRect(); - d.x += 34; - d.y += 2; - d.width = 48; - d.height = 24; - - if (GUI.Button(d, iconWithTT(SCANskins.SCAN_GridIcon, "Toggle Grid"), SCANskins.SCAN_buttonBorderless)) - { - SCANcontroller.controller.map_grid = !SCANcontroller.controller.map_grid; - } - - fillS(); - - SCANcontroller.controller.map_orbit = GUILayout.Toggle(SCANcontroller.controller.map_orbit, textWithTT("", "Toggle Orbit")); - - d = GUILayoutUtility.GetLastRect(); - d.x += 34; - d.y += 2; - d.width = 48; - d.height = 24; - - if (GUI.Button(d, iconWithTT(SCANskins.SCAN_OrbitIcon, "Toggle Orbit"), SCANskins.SCAN_buttonBorderless)) - { - SCANcontroller.controller.map_orbit = !SCANcontroller.controller.map_orbit; - } - - fillS(); - - SCANcontroller.controller.map_waypoints = GUILayout.Toggle(SCANcontroller.controller.map_waypoints, textWithTT("", "Toggle Waypoints")); - - d = GUILayoutUtility.GetLastRect(); - d.x += 44; - d.y += 2; - d.width = 24; - d.height = 24; - - if (GUI.Button(d, iconWithTT(SCANskins.SCAN_WaypointIcon, "Toggle Waypoints"), SCANskins.SCAN_buttonBorderless)) - { - SCANcontroller.controller.map_waypoints = !SCANcontroller.controller.map_waypoints; - } - - fillS(); - - SCANcontroller.controller.map_markers = GUILayout.Toggle(SCANcontroller.controller.map_markers, textWithTT("", "Toggle Anomalies")); - - d = GUILayoutUtility.GetLastRect(); - d.x += 44; - d.y += 2; - d.width = 24; - d.height = 24; - - if (GUI.Button(d, textWithTT(SCANcontroller.controller.anomalyMarker, "Toggle Anomalies"), SCANskins.SCAN_buttonBorderless)) - { - SCANcontroller.controller.map_markers = !SCANcontroller.controller.map_markers; - } - - fillS(); - - SCANcontroller.controller.map_flags = GUILayout.Toggle(SCANcontroller.controller.map_flags, textWithTT("", "Toggle Flags")); - - d = GUILayoutUtility.GetLastRect(); - d.x += 44; - d.y += 2; - d.width = 24; - d.height = 24; - - if (GUI.Button(d, iconWithTT(SCANskins.SCAN_FlagIcon, "Toggle Flags"), SCANskins.SCAN_buttonBorderless)) - { - SCANcontroller.controller.map_flags = !SCANcontroller.controller.map_flags; - } - - fillS(); - - SCANcontroller.controller.map_asteroids = GUILayout.Toggle(SCANcontroller.controller.map_asteroids, textWithTT("", "Toggle Asteroids")); - - d = GUILayoutUtility.GetLastRect(); - d.x += 44; - d.y += 2; - d.width = 24; - d.height = 24; - - if (GUI.Button(d, iconWithTT(SCANskins.SCAN_AsteroidIcon, "Toggle Asteroids"), SCANskins.SCAN_buttonBorderless)) - { - SCANcontroller.controller.map_asteroids = !SCANcontroller.controller.map_asteroids; - } - - fillS(); - - SCANcontroller.controller.legend = GUILayout.Toggle(SCANcontroller.controller.legend, textWithTT("", "Toggle Legend")); - - d = GUILayoutUtility.GetLastRect(); - d.x += 34; - d.y += 2; - d.width = 48; - d.height = 24; - - if (GUI.Button(d, iconWithTT(SCANskins.SCAN_LegendIcon, "Toggle Legend"), SCANskins.SCAN_buttonBorderless)) - { - SCANcontroller.controller.legend = !SCANcontroller.controller.legend; - } - - if (SCANconfigLoader.GlobalResource) - { - fillS(); - - SCANcontroller.controller.map_ResourceOverlay = GUILayout.Toggle(SCANcontroller.controller.map_ResourceOverlay, textWithTT("", "Toggle Resources")); - - d = GUILayoutUtility.GetLastRect(); - d.x += 44; - d.y += 2; - d.width = 24; - d.height = 24; - - if (GUI.Button(d, iconWithTT(SCANskins.SCAN_ResourceIcon, "Toggle Resources"), SCANskins.SCAN_buttonBorderless)) - { - SCANcontroller.controller.map_ResourceOverlay = !SCANcontroller.controller.map_ResourceOverlay; - } - } - stopS(); - - //Open all four windows using icons instead of text; use tooltips - Rect s = new Rect(10, WindowRect.height - 42, 32, 32); - - if (GUI.Button(s, iconWithTT(SCANskins.SCAN_SmallMapIcon, "Small Map"), SCANskins.SCAN_windowButton)) - { - SCANcontroller.controller.TargetSelecting = false; - SCANcontroller.controller.TargetSelectingActive = false; - SCANcontroller.controller.mainMap.Visible = !SCANcontroller.controller.mainMap.Visible; - } - - s.x += 36; - - if (GUI.Button(s, iconWithTT(SCANskins.SCAN_InstrumentIcon, "Instrument Window"), SCANskins.SCAN_windowButton)) - { - SCANcontroller.controller.TargetSelecting = false; - SCANcontroller.controller.TargetSelectingActive = false; - SCANcontroller.controller.instrumentsWindow.Visible = !SCANcontroller.controller.instrumentsWindow.Visible; - } - - s.x += 36; - - if (GUI.Button(s, iconWithTT(SCANskins.SCAN_ZoomMapIcon, "Zoom Map"), SCANskins.SCAN_windowButton)) - { - SCANcontroller.controller.TargetSelecting = false; - SCANcontroller.controller.TargetSelectingActive = false; - SCANcontroller.controller.zoomMap.Visible = !SCANcontroller.controller.zoomMap.Visible; - if (SCANcontroller.controller.zoomMap.Visible && !SCANcontroller.controller.zoomMap.Initialized) - SCANcontroller.controller.zoomMap.initializeMap(); - } - - s.x += 36; - - if (GUI.Button(s, iconWithTT(SCANskins.SCAN_OverlayIcon, "Overlay Control"), SCANskins.SCAN_windowButton)) - { - SCANcontroller.controller.TargetSelecting = false; - SCANcontroller.controller.TargetSelectingActive = false; - SCANcontroller.controller.resourceOverlay.Visible = !SCANcontroller.controller.resourceOverlay.Visible; - } - - s.x += 36; - - if (GUI.Button(s, iconWithTT(SCANskins.SCAN_SettingsIcon, "Settings Menu"), SCANskins.SCAN_windowButton)) - { - SCANcontroller.controller.TargetSelecting = false; - SCANcontroller.controller.TargetSelectingActive = false; - SCANcontroller.controller.settingsWindow.Visible = !SCANcontroller.controller.settingsWindow.Visible; - } - - s.x = WindowRect.width - 66; - - if (GUI.Button(s, iconWithTT(SCANskins.SCAN_ScreenshotIcon, "Export Map"), SCANskins.SCAN_windowButton)) - { - SCANcontroller.controller.TargetSelecting = false; - SCANcontroller.controller.TargetSelectingActive = false; - if (bigmap.isMapComplete()) - bigmap.exportPNG(); - } - } - - private void mapDraw(int id) - { - MapTexture = bigmap.getPartialMap(); - - //A blank label used as a template for the actual map texture - if (IsResizing) - { - //Set minimum map size during re-sizing - dW = resizeW; - if (dW < WindowSize_Min.x) - dW = WindowSize_Min.x; - else if (dW > WindowSize_Max.x) - dW = WindowSize_Max.x; - dH = dW / 2f; - GUILayout.Label("", GUILayout.Width(dW), GUILayout.Height(dH)); - } - else - { - GUILayout.Label("", GUILayout.Width(MapTexture.width), GUILayout.Height(MapTexture.height)); - } - - TextureRect = GUILayoutUtility.GetLastRect(); - TextureRect.width = bigmap.MapWidth; - TextureRect.height = bigmap.MapHeight; - - //Generate the grid lines - if (drawGrid) - { - gridLines = new Dictionary>>(); - gridLines = SCANuiUtil.drawGridLine(TextureRect, bigmap); - drawGrid = false; - } - - //Stretches the existing map while re-sizing - if (IsResizing) - { - TextureRect.width = dW; - TextureRect.height = dH; - GUI.DrawTexture(TextureRect, MapTexture, ScaleMode.StretchToFill); - } - else - { - GUI.DrawTexture(TextureRect, MapTexture); - } - - //Add the North/South labels to the polar projection - if (bigmap.Projection == MapProjection.Polar) - { - rc.x = TextureRect.x + TextureRect.width / 2 - TextureRect.width / 8; - rc.y = TextureRect.y + TextureRect.height / 8; - SCANuiUtil.drawLabel(rc, "S", SCANskins.SCAN_orbitalLabelOff, true, SCANskins.SCAN_shadowReadoutLabel, false, SCANskins.SCAN_orbitalLabelOn, true); - rc.x = TextureRect.x + TextureRect.width / 2 + TextureRect.width / 8; - SCANuiUtil.drawLabel(rc, "N", SCANskins.SCAN_orbitalLabelOff, true, SCANskins.SCAN_shadowReadoutLabel, false, SCANskins.SCAN_orbitalLabelOn, true); - } - - if (SCANcontroller.controller.map_grid && !IsResizing) - { - if (gridLines.Count > 0 && inRepaint()) - { - GL.PushMatrix(); - for (int i = gridLines[0].Count - 1; i >= 0; i--) - { - List points = gridLines[0][i]; - SCANuiUtil.drawGridLines(points, bigmap.MapWidth, TextureRect.x, TextureRect.y, SCANuiUtil.blackLineColor); - } - for (int i = gridLines[1].Count - 1; i >= 0; i--) - { - List points = gridLines[1][i]; - SCANuiUtil.drawGridLines(points, bigmap.MapWidth, TextureRect.x, TextureRect.y, SCANuiUtil.lineColor); - } - GL.PopMatrix(); - } - } - - //Draw the orbit overlays - if (SCANcontroller.controller.map_orbit) - { - SCANuiUtil.drawOrbit(TextureRect, bigmap, v, bigmap.Body); - } - } - - //Display info for mouse over in the map and handle the zoom map - private void mouseOver(int id) - { - float mx = Event.current.mousePosition.x - TextureRect.x; - float my = Event.current.mousePosition.y - TextureRect.y; - bool in_map = false; - double mlon = 0, mlat = 0; - - //Draw the re-size label in the corner - Rect resizer = new Rect(WindowRect.width - 24, WindowRect.height - 26, 24, 24); - GUI.Label(resizer, SCANskins.SCAN_ResizeIcon); - - //Handles mouse positioning and converting to lat/long coordinates - if (mx >= 0 && my >= 0 && mx < MapTexture.width && my < MapTexture.height) - { - double mlo = (mx * 360f / MapTexture.width) - 180; - double mla = 90 - (my * 180f / MapTexture.height); - mlon = bigmap.unprojectLongitude(mlo, mla); - mlat = bigmap.unprojectLatitude(mlo, mla); - - if (mlon >= -180 && mlon <= 180 && mlat >= -90 && mlat <= 90) - { - in_map = true; - if (SCANcontroller.controller.TargetSelecting) - { - SCANcontroller.controller.TargetSelectingActive = true; - mjTarget.x = mlon; - mjTarget.y = mlat; - SCANcontroller.controller.LandingTargetCoords = mjTarget; - Rect r = new Rect(mx + TextureRect.x - 11, my + TextureRect.y - 13, 24, 24); - SCANuiUtil.drawMapIcon(r, SCANcontroller.controller.mechJebTargetSelection ? SCANskins.SCAN_MechJebIcon : SCANskins.SCAN_TargetIcon, true, palette.yellow, true); - } - } - else if (SCANcontroller.controller.TargetSelecting) - SCANcontroller.controller.TargetSelectingActive = false; - } - else if (SCANcontroller.controller.TargetSelecting) - SCANcontroller.controller.TargetSelectingActive = false; - - //Handles mouse click while inside map; opens zoom map - if (Event.current.isMouse && !ddRect.Contains(Event.current.mousePosition) && !zoomCloseRect.Contains(Event.current.mousePosition)) - { - if (Event.current.type == EventType.MouseUp) - { - //Generate waypoint for MechJeb target - if (SCANcontroller.controller.TargetSelecting && SCANcontroller.controller.TargetSelectingActive && Event.current.button == 0 && in_map) - { - string s = SCANcontroller.controller.mechJebTargetSelection ? "MechJeb Landing Target" : "Landing Target Site"; - SCANwaypoint w = new SCANwaypoint(mlat, mlon, s); - SCANcontroller.controller.LandingTarget = w; - data.addToWaypoints(); - SCANcontroller.controller.TargetSelecting = false; - SCANcontroller.controller.TargetSelectingActive = false; - } - else if (Event.current.button == 1) - { - if (in_map) - { - SCANcontroller.controller.zoomMap.setMapCenter(mlat, mlon, true, bigmap, true); - } - Event.current.Use(); - } - } - //Handle clicking inside the re-size button - else if (Event.current.isMouse - && Event.current.type == EventType.MouseDown - && Event.current.button == 0 - && resizer.Contains(Event.current.mousePosition)) - { - IsResizing = true; - dragX = Input.mousePosition.x; - resizeW = TextureRect.width; - Event.current.Use(); - } - } - - //Draw the actual mouse over info label below the map - if (SCANcontroller.controller.TargetSelecting) - { - SCANuiUtil.readableLabel(SCANcontroller.controller.mechJebTargetSelection ? "MechJeb Landing Guidance Targeting..." : "Landing Site Targeting...", false); - SCANuiUtil.mouseOverInfo(mlon, mlat, bigmap, data, bigmap.Body, in_map, ref infoString, ref infoString2); - } - else - SCANuiUtil.mouseOverInfo(mlon, mlat, bigmap, data, bigmap.Body, in_map, ref infoString, ref infoString2); - } - - //Draw the altitude legend bar along the bottom - private void legendBar(int id) - { - if (bigmap.MType == mapType.Altimetry && SCANcontroller.controller.legend) - { - if (bigmap.MapLegend == null) - bigmap.MapLegend = new SCANmapLegend(); - bigmap.MapLegend.Legend = bigmap.MapLegend.getLegend(data.TerrainConfig.MinTerrain, data.TerrainConfig.MaxTerrain, SCANcontroller.controller.colours, data.TerrainConfig); - SCANuiUtil.drawLegend(data, bigmap.MapLegend); - } - } - - //Draw the map overlay labels - private void mapLabels(int id) - { - SCANuiUtil.drawMapLabels(TextureRect, v, bigmap, data, bigmap.Body, SCANcontroller.controller.map_markers, SCANcontroller.controller.map_waypoints); - } - - //Draw the drop down menus if any have been opened - private void dropDown(int id) - { - if (projection_drop_down) - { - ddRect = new Rect(110, 45, 100, 70); - GUI.Box(ddRect, ""); - for (int i = 0; i < SCANmapProjection.projectionNames.Length; ++i) - { - Rect r = new Rect(ddRect.x + 2, ddRect.y + (24 * i), ddRect.width - 4, 20); - if (GUI.Button(r, SCANmapProjection.projectionNames[i], SCANcontroller.controller.projection == i ? SCANskins.SCAN_dropDownButtonActive : SCANskins.SCAN_dropDownButton)) - { - bigmap.setProjection((MapProjection)i); - bigmap.resetMap(SCANcontroller.controller.map_ResourceOverlay); - SCANcontroller.controller.projection = i; - drawGrid = true; - drop_down_open = false; - } - } - } - - else if (mapType_drop_down) - { - ddRect = new Rect(270, 45, 70, 70); - GUI.Box(ddRect, ""); - for (int i = 0; i < SCANmapType.mapTypeNames.Length; i++) - { - Rect r = new Rect(ddRect.x + 2, ddRect.y + (24 * i), ddRect.width - 4, 20); - if (GUI.Button(r, SCANmapType.mapTypeNames[i], (int)(bigmap.MType) == i ? SCANskins.SCAN_dropDownButtonActive : SCANskins.SCAN_dropDownButton)) - { - bigmap.resetMap((mapType)i, true, SCANcontroller.controller.map_ResourceOverlay); - drop_down_open = false; - } - } - } - - else if (resources_drop_down) - { - ddRect = new Rect(WindowRect.width - 290, 45, 120, 160); - GUI.Box(ddRect, ""); - for (int i = 0; i < loadedResources.Count; i++) - { - scrollR = GUI.BeginScrollView(ddRect, scrollR, new Rect(0, 0, 100, 20 * loadedResources.Count)); - Rect r = new Rect(2, 20 * i, 96, 20); - if (GUI.Button(r, loadedResources[i].Name, SCANcontroller.controller.resourceSelection == loadedResources[i].Name ? SCANskins.SCAN_dropDownButtonActive : SCANskins.SCAN_dropDownButton)) - { - bigmap.Resource = loadedResources[i]; - bigmap.Resource.CurrentBodyConfig(bigmap.Body.name); - - SCANcontroller.controller.resourceSelection = bigmap.Resource.Name; - - if (SCANcontroller.controller.map_ResourceOverlay) - { - bigmap.resetMap(SCANcontroller.controller.map_ResourceOverlay); - } - - drop_down_open = false; - } - GUI.EndScrollView(); - } - } - - else if (planetoid_drop_down) - { - int j = 0; - ddRect = new Rect(WindowRect.width - 130, 45, 100, 160); - GUI.Box(ddRect, ""); - for (int i = 0; i < SCANcontroller.controller.GetDataCount; i++) - { - scrollP = GUI.BeginScrollView(ddRect, scrollP, new Rect(0, 0, 80, (20 * SCANcontroller.controller.GetDataCount) + 1)); - - SCANdata dropDownData = SCANcontroller.controller.getData(i); - if (dropDownData != null) - { - Rect r = new Rect(2, 20 * j, 76, 20); - if (GUI.Button(r, dropDownData.Body.name, b.name == dropDownData.Body.name ? SCANskins.SCAN_dropDownButtonActive : SCANskins.SCAN_dropDownButton)) - { - data = dropDownData; - b = data.Body; - bigmap.setBody(data.Body); - bigmap.resetMap(SCANcontroller.controller.map_ResourceOverlay); - drop_down_open = false; - } - j++; - } - GUI.EndScrollView(); - } - } - else - drop_down_open = false; - } - - } -} diff --git a/SCANsat/SCAN_UI/SCANcolorSelection.cs b/SCANsat/SCAN_UI/SCANcolorSelection.cs deleted file mode 100644 index 5c37741da..000000000 --- a/SCANsat/SCAN_UI/SCANcolorSelection.cs +++ /dev/null @@ -1,1403 +0,0 @@ -#region license -/* - * [Scientific Committee on Advanced Navigation] - * S.C.A.N. Satellite - * - * SCANsat - Color Selection and Settings Menu - * - * Copyright (c)2013 damny; - * Copyright (c)2014 David Grandy ; - * Copyright (c)2014 technogeeky ; - * Copyright (c)2014 (Your Name Here) ; see LICENSE.txt for licensing details. - * - */ -#endregion - -using System; -using System.Collections.Generic; -using SCANsat.SCAN_Data; -using SCANsat.SCAN_Map; -using SCANsat.SCAN_UI.UI_Framework; -using SCANsat.SCAN_Platform; -using SCANsat.SCAN_Platform.Palettes; -using FinePrint.Utilities; -using palette = SCANsat.SCAN_UI.UI_Framework.SCANpalette; -using UnityEngine; - -namespace SCANsat.SCAN_UI -{ - class SCANcolorSelection: SCAN_MBW - { - private bool dropDown, paletteBox, resourceBox, planetBox, saveWarning; - private bool oldReverseState, oldDiscreteState; - private bool controlLock, clampState, oldClampState; - private Rect ddRect; - private int paletteIndex; - private SCANmapLegend currentLegend, previewLegend; - private int windowMode = 0; - - private SCANterrainConfig currentTerrain; - private SCANterrainConfig bodyTerrain; - private float minT, maxT, clampT, pSize; - - private SCANuiSlider minTerrainSlider, maxTerrainSlider, clampTerrainSlider, paletteSizeSlider, resourceMinSlider, resourceMaxSlider, resourceTransSlider, biomeTransSlider, slopeSlider; - - private SCANuiColorPicker slopeColorPickerLow, slopeColorPickerHigh, biomeColorPicker, resourceColorPicker; - private float bTrans, rTrans, sCutoff; - - private bool stockBiomes = false; - private bool biomeBorders = true; - - private SCANresourceGlobal currentResource; - private float lowRCutoff, highRCutoff; - - private List loadedResources; - - private bool fineControlMode, oldFineControl; - private int bodyIndex; - - private Vector2 scrollR; - private const string lockID = "colorLockID"; - internal readonly static Rect defaultRect = new Rect(100, 400, 780, 360); - private static Rect sessionRect = defaultRect; - - //SCAN_MBW objects to sync the color selection fields to the currently displayed map - private SCANkscMap kscMapObj; - private SCANBigMap bigMapObj; - - private static SCANmap bigMap; - private CelestialBody body; - - private string colorTerrainHelpMin = "Defines the low altitude cutoff for the terrain color palette. Anything below this altitude will be shown with the lowest color."; - private string colorTerrainHelpMax = "Defines the high altitude cutoff for the terrain color palette. Anything above this altitude will be shown with the highest color."; - private string colorTerrainHelpClampToggle = "Used to define a cutoff between the low and high altitude values. This is particularly useful for ocean planets where it helps to define a sharp distinction between land and ocean."; - private string colorTerrainHelpClamp = "Defines the clamp altitude cutoff. Anything below the cutoff will be represented by the first two colors in the selected color palette. Anything above the cutoff will be represented with the remaining colors."; - private string colorTerrainHelpReverse = "Reverses the order of the currently\nselected color palette."; - private string colorTerrainHelpDiscrete = "Draws the map using only the specific colors defined by each palette, instead of smoothly interpolating between them."; - private string colorTerrainHelpPaletteSize = "Adjust the number of colors available in the currently selected color palette."; - private string colorBiomeHelpStock = "Use the stock biome color scheme for\nSCANsat biome maps."; - private string colorBiomeHelpWhiteBorder = "Draw a white border between biomes. Does not apply to the planetary overlay biome maps."; - private string colorBiomeHelpTransparency = "Adjust the transparency of biome maps. Terrain elevation is shown behind the biome maps. Set to 0% to disable terrain drawing."; - private string colorPickerHelpLow = "The top color swatch shows the updated color selection for the low end of this color spectrum. The bottom color swatch shows the currently active color."; - private string colorPickerHelpHigh = "The top color swatch shows the updated color selection for the high end of this color spectrum. The bottom color swatch shows the currently active color."; - private string colorPickerHelpValue = "This slider adjusts the Value (in HSV color terms) or Brightness for the currently selected color."; - private string colorResourceHelpFineControl = "Activates Fine Control Mode where the sliders will only show values within 5% of the current selection."; - private string colorResourceHelpMin = "The low cutoff for resource concentration on the selected celestial body. Resource deposits at this level will be displayed using the low end of the current resource overlay color spectrum. Resource deposits below this value will not be shown."; - private string colorResourceHelpMax = "The high cutoff for resource concentration on the selected celestial body. Resource deposits above this value will be shown using the high end of the current resource overlay color spectrum."; - private string colorResourceHelpTransparency = "Defines the level of transparency for resource overlays. Increase to allow more of the underlying terrain, slope, or biome map to be visible. This also affect the transparency of resource deposits on the planetary overlay resource map."; - private string colorResourceHelpApply = "Applies the current values for the selected resource and celestial body only."; - private string colorResourceHelpApplyAll = "Applies the current values for the selected resource for all celestial bodies."; - private string colorResourceHelpDefault = "Reverts to the default values for the selected resource and celestial body only."; - private string colorResourceHelpDefaultAll = "Reverts to the default values for the selected resource for all celestial bodies."; - private string colorHelpSaveToConfig = "Save all color configuration values to the config file found in your SCANsat/Resources folder. These values serve as the defaults for new saves and for all Revert To Default buttons. Values do not need to be saved to the config file to be applied for this save file."; - private string colorSlopeHelpCutoff = "Adjust the cutoff level between the two selected slope color pairs."; - - protected override void Awake() - { - base.Awake(); - - WindowCaption = "S.C.A.N. Color Management"; - WindowRect = sessionRect; - WindowStyle = SCANskins.SCAN_window; - WindowOptions = new GUILayoutOption[2] { GUILayout.Width(780), GUILayout.Height(360) }; - Visible = false; - DragEnabled = true; - TooltipMouseOffset = new Vector2d(-10, -25); - TooltipMaxWidth = 350; - TooltipDisplayForSecs = 60; - ClampToScreenOffset = new RectOffset(-450, -450, -250, -250); - - SCAN_SkinsLibrary.SetCurrent("SCAN_Unity"); - - removeControlLocks(); - } - - protected override void Start() - { - TooltipsEnabled = false; - - if (SCANconfigLoader.languagePack != null) - loadStrings(); - - if (HighLogic.LoadedScene == GameScenes.SPACECENTER || HighLogic.LoadedScene == GameScenes.TRACKSTATION) - { - kscMapObj = (SCANkscMap)SCANcontroller.controller.kscMap; - if (SCANkscMap.BigMap != null) - bigMap = SCANkscMap.BigMap; - if (kscMapObj.Data != null) - body = kscMapObj.Body; - if (body == null) - body = Planetarium.fetch.Home; - } - else if (HighLogic.LoadedSceneIsFlight) - { - bigMapObj = (SCANBigMap)SCANcontroller.controller.BigMap; - if (SCANBigMap.BigMap != null) - bigMap = SCANBigMap.BigMap; - if (bigMapObj.Data != null) - body = bigMapObj.Data.Body; - if (body == null) - body = FlightGlobals.currentMainBody; - } - - setBodyTerrain(); - - currentTerrain = new SCANterrainConfig(bodyTerrain); - - stockBiomes = SCANcontroller.controller.useStockBiomes; - biomeBorders = SCANcontroller.controller.biomeBorder; - - minTerrainSlider = new SCANuiSlider(currentTerrain.DefaultMinHeight - SCANconfigLoader.SCANNode.RangeBelowMinHeight, currentTerrain.MaxTerrain - 100, currentTerrain.MinTerrain, "Min: ", "m", colorTerrainHelpMin, -2); - maxTerrainSlider = new SCANuiSlider(currentTerrain.MinTerrain + 100, currentTerrain.DefaultMaxHeight + SCANconfigLoader.SCANNode.RangeAboveMaxHeight, currentTerrain.MaxTerrain, "Max: ", "m", colorTerrainHelpMax, -2); - clampTerrainSlider = new SCANuiSlider(currentTerrain.MinTerrain + 10, currentTerrain.MaxTerrain - 10, currentTerrain.ClampTerrain ?? currentTerrain.MinTerrain + 10, "Clamp: ", "m", colorTerrainHelpClamp, -1); - paletteSizeSlider = new SCANuiSlider(3, 12, currentTerrain.PalSize, "Palette Size: ", "", colorTerrainHelpPaletteSize, 0); - - sCutoff = SCANcontroller.controller.slopeCutoff; - slopeSlider = new SCANuiSlider(0.2f, 1.8f, sCutoff, "Slope Cutoff: ", "", colorSlopeHelpCutoff, 2, 180, 10); - - slopeColorPickerLow = new SCANuiColorPicker(SCANcontroller.controller.lowSlopeColorOne, SCANcontroller.controller.highSlopeColorOne, colorPickerHelpLow, colorPickerHelpHigh, colorPickerHelpValue, true); - slopeColorPickerHigh = new SCANuiColorPicker(SCANcontroller.controller.lowSlopeColorTwo, SCANcontroller.controller.highSlopeColorTwo, colorPickerHelpLow, colorPickerHelpHigh, colorPickerHelpValue, true); - - slopeColorPickerLow.updateOldSwatches(); - slopeColorPickerHigh.updateOldSwatches(); - - bTrans = SCANcontroller.controller.biomeTransparency; - biomeTransSlider = new SCANuiSlider(0, 80, bTrans, "Ter. Trans: ", "%", colorBiomeHelpTransparency, 0); - - biomeColorPicker = new SCANuiColorPicker(SCANcontroller.controller.lowBiomeColor, SCANcontroller.controller.highBiomeColor, colorPickerHelpLow, colorPickerHelpHigh, colorPickerHelpValue, true); - - biomeColorPicker.updateOldSwatches(); - - if (SCANconfigLoader.GlobalResource) - { - loadedResources = SCANcontroller.setLoadedResourceList(); - currentResource = new SCANresourceGlobal(loadedResources[0]); - currentResource.CurrentBodyConfig(body.name); - - if (currentResource != null) - { - resourceMinSlider = new SCANuiSlider(0, currentResource.CurrentBody.MinValue - 0.1f, currentResource.CurrentBody.MinValue, "Min: ", "%", colorResourceHelpMin, 1); - resourceMaxSlider = new SCANuiSlider(currentResource.CurrentBody.MinValue + 0.1f, 100, currentResource.CurrentBody.MaxValue, "Max: ", "%", colorResourceHelpMax, 1); - resourceTransSlider = new SCANuiSlider(0, 80, currentResource.Transparency, "Trans: ", "%", colorResourceHelpTransparency, 0); - - resourceColorPicker = new SCANuiColorPicker(currentResource.MinColor, currentResource.MaxColor, colorPickerHelpLow, colorPickerHelpHigh, colorPickerHelpValue, true); - } - } - - bodyIndex = body.flightGlobalsIndex; - - if (windowMode > 3 || (windowMode > 2 && !SCANconfigLoader.GlobalResource)) - windowMode = 0; - - setSizeSlider(currentTerrain.ColorPal.kind); - } - - private void loadStrings() - { - colorTerrainHelpMin = SCANconfigLoader.languagePack.colorTerrainHelpMin; - colorTerrainHelpMax = SCANconfigLoader.languagePack.colorTerrainHelpMax; - colorTerrainHelpClampToggle = SCANconfigLoader.languagePack.colorTerrainHelpClampToggle; - colorTerrainHelpClamp = SCANconfigLoader.languagePack.colorTerrainHelpClamp; - colorTerrainHelpReverse = SCANconfigLoader.languagePack.colorTerrainHelpReverse; - colorTerrainHelpDiscrete = SCANconfigLoader.languagePack.colorTerrainHelpDiscrete; - colorTerrainHelpPaletteSize = SCANconfigLoader.languagePack.colorTerrainHelpPaletteSize; - colorBiomeHelpStock = SCANconfigLoader.languagePack.colorBiomeHelpStock; - colorBiomeHelpWhiteBorder = SCANconfigLoader.languagePack.colorBiomeHelpWhiteBorder; - colorBiomeHelpTransparency = SCANconfigLoader.languagePack.colorBiomeHelpTransparency; - colorPickerHelpLow = SCANconfigLoader.languagePack.colorPickerHelpLow; - colorPickerHelpHigh = SCANconfigLoader.languagePack.colorPickerHelpHigh; - colorPickerHelpValue = SCANconfigLoader.languagePack.colorPickerHelpValue; - colorResourceHelpFineControl = SCANconfigLoader.languagePack.colorResourceHelpFineControl; - colorResourceHelpMin = SCANconfigLoader.languagePack.colorResourceHelpMin; - colorResourceHelpMax = SCANconfigLoader.languagePack.colorResourceHelpMax; - colorResourceHelpTransparency = SCANconfigLoader.languagePack.colorResourceHelpTransparency; - colorResourceHelpApply = SCANconfigLoader.languagePack.colorResourceHelpApply; - colorResourceHelpApplyAll = SCANconfigLoader.languagePack.colorResourceHelpApplyAll; - colorResourceHelpDefault = SCANconfigLoader.languagePack.colorResourceHelpDefault; - colorResourceHelpDefaultAll = SCANconfigLoader.languagePack.colorResourceHelpDefaultAll; - colorHelpSaveToConfig = SCANconfigLoader.languagePack.colorHelpSaveToConfig; - colorSlopeHelpCutoff = SCANconfigLoader.languagePack.colorSlopeHelpCutoff; - } - - protected override void OnDestroy() - { - removeControlLocks(); - TooltipsEnabled = false; - } - - internal void removeControlLocks() - { - InputLockManager.RemoveControlLock(lockID); - controlLock = false; - } - - protected override void DrawWindowPre(int id) - { - //Some clumsy logic is used here to ensure that the color selection fields always remain in sync with the current map in each scene - switch (HighLogic.LoadedScene) - { - case GameScenes.FLIGHT: - if (SCANBigMap.BigMap != null) - { - bigMap = SCANBigMap.BigMap; - } - - if (body == null) - { - body = FlightGlobals.currentMainBody; - } - break; - case GameScenes.SPACECENTER: - if (kscMapObj.Visible) - { - bigMap = SCANkscMap.BigMap; - } - - if (body == null) - { - body = Planetarium.fetch.Home; - } - - Vector2 mousePos = Input.mousePosition; - mousePos.y = Screen.height - mousePos.y; - if (WindowRect.Contains(mousePos) && !controlLock) - { - InputLockManager.SetControlLock(ControlTypes.CAMERACONTROLS | ControlTypes.KSC_ALL, lockID); - controlLock = true; - } - else if (!WindowRect.Contains(mousePos) && controlLock) - { - removeControlLocks(); - } - break; - case GameScenes.TRACKSTATION: - if (kscMapObj.Visible) - { - bigMap = SCANkscMap.BigMap; - } - - if (body == null) - { - body = Planetarium.fetch.Home; - } - - Vector2 mousePosT = Input.mousePosition; - mousePosT.y = Screen.height - mousePosT.y; - if (WindowRect.Contains(mousePosT) && !controlLock) - { - InputLockManager.SetControlLock(ControlTypes.TRACKINGSTATION_UI, lockID); - controlLock = true; - } - else if (!WindowRect.Contains(mousePosT) && controlLock) - { - removeControlLocks(); - } - break; - } - - //This updates all of the fields whenever the palette selection is changed - if (windowMode == 0 && (currentLegend == null || bodyIndex != body.flightGlobalsIndex)) - { - setBodyTerrain(); - - currentTerrain = new SCANterrainConfig(bodyTerrain); - - bodyIndex = body.flightGlobalsIndex; - - updateUI(); - } - - if (windowMode == 0 && previewLegend == null) - { - drawPreviewLegend(); - } - - if (!dropDown) - { - paletteBox = false; - resourceBox = false; - planetBox = false; - saveWarning = false; - } - } - - protected override void DrawWindow(int id) - { - versionLabel(id); /* The standard version number and close button */ - closeBox(id); - - growS(); - windowTabs(id); /* Draws the window selection tabs across the top */ - if (windowMode == 0) - { - growE(); - paletteTextures(id); /* Draws the palette selection button and preview swatches */ - paletteOptions(id); /* All of the terrain and palette options */ - stopE(); - fillS(8); - growE(); - palettePreview(id); /* Draws the two preview palette legends */ - paletteConfirmation(id); /* The buttons for default, apply, and cancel */ - stopE(); - } - else if (windowMode == 1) - { - growE(); - fillS(10); - slopeColorPickerLow.drawColorSelector(WindowRect); - fillS(40); - slopeColorPickerHigh.drawColorSelector(WindowRect); - stopE(); - fillS(100); - growE(); - slopeOptions(id); - slopeConfirm(id); - stopE(); - } - else if (windowMode == 2) - { - growE(); - fillS(10); - biomeColorPicker.drawColorSelector(WindowRect); - fillS(80); - growS(); - biomeOptions(id); - biomeConfirm(id); - stopS(); - stopE(); - } - else if (windowMode == 3 && SCANconfigLoader.GlobalResource) - { - growE(); - fillS(10); - resourceColorPicker.drawColorSelector(WindowRect); - fillS(120); - growS(); - resourceOptions(id); - resourceConfirm(id); - stopS(); - stopE(); - } - else - windowMode = 0; - stopS(); - - dropDownBox(id); /* Draw the drop down menu for the palette selection box */ - } - - protected override void DrawWindowPost(int id) - { - if (dropDown && Event.current.type == EventType.mouseDown && !ddRect.Contains(Event.current.mousePosition)) - { - dropDown = false; - } - - //These methods update all of the UI elements whenever any of the options are changed - switch (windowMode) - { - case 0: - if (currentTerrain.PalRev != oldReverseState) - { - oldReverseState = currentTerrain.PalRev; - drawPreviewLegend(); - } - - if (minTerrainSlider.valueChanged() || maxTerrainSlider.valueChanged()) - { - setTerrainSliders(); - } - - if (currentTerrain.PalDis != oldDiscreteState) - { - oldDiscreteState = currentTerrain.PalDis; - drawPreviewLegend(); - } - - if (clampState != oldClampState) - { - oldClampState = clampState; - drawPreviewLegend(); - } - - if (paletteSizeSlider.valueChanged()) - { - regenPaletteSets(); - currentTerrain.ColorPal = palette.CurrentPalettes.availablePalettes[paletteIndex]; - drawPreviewLegend(); - } - break; - - case 1: - slopeColorPickerLow.colorStateChanged(); - slopeColorPickerLow.brightnessChanged(); - slopeColorPickerHigh.colorStateChanged(); - slopeColorPickerHigh.brightnessChanged(); - break; - - case 2: - biomeColorPicker.colorStateChanged(); - biomeColorPicker.brightnessChanged(); - break; - - case 3: - if (resourceMinSlider.valueChanged() || resourceMaxSlider.valueChanged()) - { - setResourceSliders(); - } - - if (bodyIndex != body.flightGlobalsIndex) - { - SCANUtil.SCANdebugLog("Trigger Body Change"); - bodyIndex = body.flightGlobalsIndex; - - currentResource.CurrentBodyConfig(body.name); - - lowRCutoff = currentResource.CurrentBody.MinValue; - highRCutoff = currentResource.CurrentBody.MaxValue; - - oldFineControl = fineControlMode = false; - - setResourceSliders(); - } - - if (oldFineControl != fineControlMode) - { - oldFineControl = fineControlMode; - if (fineControlMode) - { - if (lowRCutoff < 5f) - resourceMinSlider.MinValue = 0f; - else - resourceMinSlider.MinValue = lowRCutoff - 5; - - if (lowRCutoff > 95f) - resourceMinSlider.MaxValue = 100f; - else if (highRCutoff < lowRCutoff + 5f) - resourceMinSlider.MaxValue = highRCutoff - 0.1f; - else - resourceMinSlider.MaxValue = lowRCutoff + 5f; - - if (highRCutoff < 5f) - resourceMaxSlider.MinValue = 0f; - else if (lowRCutoff > highRCutoff - 5f) - resourceMaxSlider.MinValue = lowRCutoff + 0.1f; - else - resourceMaxSlider.MinValue = highRCutoff - 5f; - - if (highRCutoff > 95f) - resourceMaxSlider.MaxValue = 100f; - else - resourceMaxSlider.MaxValue = highRCutoff + 5f; - } - else - setResourceSliders(); - } - - resourceColorPicker.colorStateChanged(); - resourceColorPicker.brightnessChanged(); - break; - default: - break; - } - - sessionRect = WindowRect; - } - - //Draw the version label in the upper left corner - private void versionLabel(int id) - { - Rect r = new Rect(6, 0, 50, 18); - GUI.Label(r, SCANmainMenuLoader.SCANsatVersion, SCANskins.SCAN_whiteReadoutLabel); - } - - //Draw the close button in the upper right corner - private void closeBox(int id) - { - Rect r = new Rect(WindowRect.width - 42, 1, 18, 18); - if (GUI.Button(r, textWithTT("?", "Show Help Tips"), SCANskins.SCAN_closeButton)) - { - TooltipsEnabled = !TooltipsEnabled; - } - - r.x += 22; - - if (GUI.Button(r, SCANcontroller.controller.closeBox, SCANskins.SCAN_closeButton)) - { - removeControlLocks(); - Visible = false; - TooltipsEnabled = false; - } - } - - //Draw the window tab options - private void windowTabs(int id) - { - growE(); - if (GUILayout.Button("Altimetry")) - { - windowMode = 0; - - setBodyTerrain(); - - currentTerrain = new SCANterrainConfig(bodyTerrain); - - bodyIndex = body.flightGlobalsIndex; - - updateUI(); - } - if (GUILayout.Button("Slope")) - { - windowMode = 1; - } - if (GUILayout.Button("Biome")) - { - windowMode = 2; - } - if (SCANconfigLoader.GlobalResource) - { - if (GUILayout.Button("Resources")) - { - windowMode = 3; - - fineControlMode = oldFineControl = false; - - currentResource.CurrentBodyConfig(body.name); - - bodyIndex = body.flightGlobalsIndex; - - updateUI(); - } - } - stopE(); - } - - //Draw the palette selection field - private void paletteTextures(int id) - { - growS(); - GUILayout.Label("Palette Selection", SCANskins.SCAN_headline); - fillS(12); - growE(); - if (GUILayout.Button("Palette Style:", GUILayout.MaxWidth(120))) - { - dropDown = !dropDown; - paletteBox = !paletteBox; - } - fillS(10); - GUILayout.Label(palette.getPaletteTypeName, SCANskins.SCAN_whiteReadoutLabel); - stopE(); - growE(); - // This integer stores the amount of palettes of each type - int j = 9; - if (palette.CurrentPalettes.paletteType == Palette.Kind.Sequential) - j = 12; - else if (palette.CurrentPalettes.paletteType == Palette.Kind.Qualitative) - j = 8; - else if (palette.CurrentPalettes.paletteType == Palette.Kind.Fixed) - j = 11; - else if (palette.CurrentPalettes.paletteType == Palette.Kind.Invertable || palette.CurrentPalettes.paletteType == Palette.Kind.Unknown) - j = 0; - for (int i = 0; i < j; i++) - { - if (i % 3 == 0) - { - stopE(); - fillS(9); - growE(); - } - Texture2D t = palette.CurrentPalettes.paletteSwatch[i]; - if (paletteBox) - { - GUILayout.Label("", GUILayout.Width(110), GUILayout.Height(25)); - } - else - { - if (GUILayout.Button("", SCANskins.SCAN_texButton, GUILayout.Width(110), GUILayout.Height(25))) - { - currentTerrain.ColorPal = palette.CurrentPalettes.availablePalettes[i]; - paletteIndex = currentTerrain.ColorPal.index; - updateUI(); - drawPreviewLegend(); - } - } - Rect r = GUILayoutUtility.GetLastRect(); - r.width -= 10; - GUI.DrawTexture(r, t); - } - stopE(); - stopS(); - } - - //Main palette option settings - private void paletteOptions(int id) - { - growS(); - fillS(4); - growE(); - fillS(20); - GUILayout.Label("Terrain Options: ", SCANskins.SCAN_headlineSmall, GUILayout.Width(150)); - - if (GUILayout.Button(body.name, SCANskins.SCAN_headerButton, GUILayout.Width(170))) - { - dropDown = !dropDown; - planetBox = !planetBox; - } - stopE(); - - growE(); - fillS(10); - currentTerrain.MinTerrain = minTerrainSlider.drawSlider(dropDown, ref minT); - stopE(); - fillS(8); - growE(); - fillS(10); - currentTerrain.MaxTerrain = maxTerrainSlider.drawSlider(dropDown, ref maxT); - stopE(); - fillS(6); - growE(); - fillS(); - if (dropDown) - GUILayout.Label("Clamp Terrain", SCANskins.SCAN_settingsToggle, GUILayout.Width(100)); - else - clampState = GUILayout.Toggle(clampState, textWithTT("Clamp Terrain", colorTerrainHelpClampToggle), SCANskins.SCAN_settingsToggle, GUILayout.Width(100)); - fillS(); - stopE(); - if (clampState) - { - growE(); - fillS(10); - currentTerrain.ClampTerrain = clampTerrainSlider.drawSlider(dropDown, ref clampT); - stopE(); - } - fillS(6); - GUILayout.Label("Palette Options", SCANskins.SCAN_headlineSmall); - if (palette.CurrentPalettes.paletteType != Palette.Kind.Fixed) - { - growE(); - fillS(10); - currentTerrain.PalSize = (int)paletteSizeSlider.drawSlider(dropDown, ref pSize); - stopE(); - } - - growE(); - if (dropDown) - { - GUILayout.Label(" Reverse Order", SCANskins.SCAN_boldToggle, GUILayout.Width(120)); - fillS(10); - GUILayout.Label(" Discrete Gradient", SCANskins.SCAN_boldToggle, GUILayout.Width(140)); - } - else - { - currentTerrain.PalRev = GUILayout.Toggle(currentTerrain.PalRev, textWithTT(" Reverse Order", colorTerrainHelpReverse), SCANskins.SCAN_boldToggle, GUILayout.Width(120)); - fillS(10); - currentTerrain.PalDis = GUILayout.Toggle(currentTerrain.PalDis, textWithTT(" Discrete Gradient", colorTerrainHelpDiscrete), SCANskins.SCAN_boldToggle, GUILayout.Width(140)); - } - stopE(); - - stopS(); - } - - //Two boxes to show the current and new palettes as they appear on the legend - private void palettePreview(int id) - { - growS(); - GUILayout.Label("Current Palette", SCANskins.SCAN_headlineSmall); - GUILayout.Label("", SCANskins.SCAN_legendTex, GUILayout.Width(180), GUILayout.Height(25)); - Rect r = GUILayoutUtility.GetLastRect(); - GUI.DrawTexture(r, currentLegend.Legend); - stopS(); - fillS(8); - growS(); - GUILayout.Label("New Palette", SCANskins.SCAN_headlineSmall); - GUILayout.Label("", SCANskins.SCAN_legendTex, GUILayout.Width(180), GUILayout.Height(25)); - r = GUILayoutUtility.GetLastRect(); - GUI.DrawTexture(r, previewLegend.Legend); - stopS(); - } - - //Buttons to apply the new palette or cancel and return to the original - private void paletteConfirmation(int id) - { - growS(); - fillS(6); - growE(); - if (!dropDown) - { - if (GUILayout.Button("Apply Values", GUILayout.Width(110))) - { - if (!clampState) - currentTerrain.ClampTerrain = null; - - SCANcontroller.updateTerrainConfig(currentTerrain); - - updateUI(); - - if (bigMap != null && bigMap.Body == body) - { - if (bigMap.MType == mapType.Altimetry && SCANcontroller.controller.colours == 0) - bigMap.resetMap(SCANcontroller.controller.map_ResourceOverlay); - } - } - - fillS(6); - - if (GUILayout.Button("Default Values", GUILayout.Width(110))) - { - setBodyTerrain(); - - currentTerrain.MinTerrain = bodyTerrain.DefaultMinHeight; - currentTerrain.MaxTerrain = bodyTerrain.DefaultMaxHeight; - currentTerrain.ClampTerrain = bodyTerrain.DefaultClampHeight; - currentTerrain.ColorPal = bodyTerrain.DefaultPalette; - currentTerrain.PalRev = bodyTerrain.DefaultReverse; - currentTerrain.PalDis = bodyTerrain.DefaultDiscrete; - currentTerrain.PalSize = bodyTerrain.DefaultPaletteSize; - - SCANcontroller.updateTerrainConfig(currentTerrain); - - updateUI(); - - if (bigMap != null && bigMap.Body == body) - { - if (bigMap.MType == mapType.Altimetry && SCANcontroller.controller.colours == 0) - bigMap.resetMap(SCANcontroller.controller.map_ResourceOverlay); - } - } - } - else - { - GUILayout.Label("Apply Values", SCANskins.SCAN_button, GUILayout.Width(110)); - fillS(6); - GUILayout.Label("Default Values", SCANskins.SCAN_button, GUILayout.Width(110)); - } - stopE(); - fillS(8); - if (!dropDown) - { - if (GUILayout.Button(textWithTT("Save Values To Config", colorHelpSaveToConfig), GUILayout.Width(180))) - { - dropDown = true; - saveWarning = true; - } - } - else - GUILayout.Label("Save Values To Config", SCANskins.SCAN_button, GUILayout.Width(180)); - stopS(); - } - - private void biomeOptions(int id) - { - GUILayout.Label("Biome Options", SCANskins.SCAN_headline, GUILayout.Width(300)); - - fillS(20); - stockBiomes = GUILayout.Toggle(stockBiomes, textWithTT("Use Stock Biome Maps", colorBiomeHelpStock), SCANskins.SCAN_toggle, GUILayout.Width(200)); - fillS(8); - biomeBorders = GUILayout.Toggle(biomeBorders, textWithTT("White Biome Borders", colorBiomeHelpWhiteBorder), SCANskins.SCAN_toggle, GUILayout.Width(190)); - fillS(8); - growE(); - fillS(10); - biomeTransSlider.drawSlider(false, ref bTrans); - stopE(); - } - - private void slopeOptions(int id) - { - slopeSlider.drawSlider(false, ref sCutoff); - } - - private void resourceOptions(int id) - { - growE(); - - fillS(30); - GUILayout.Label("Resource Options: ", SCANskins.SCAN_headlineSmall, GUILayout.Width(150)); - - if (GUILayout.Button(body.name, SCANskins.SCAN_headerButton, GUILayout.Width(170))) - { - dropDown = !dropDown; - planetBox = !planetBox; - } - - stopE(); - - fillS(10); - growE(); - fillS(20); - GUILayout.Label("Resource Selection: ", SCANskins.SCAN_headlineSmall, GUILayout.Width(180)); - - if (dropDown) - { - GUILayout.Label(currentResource.Name, SCANskins.SCAN_headerButton, GUILayout.Width(140)); - } - else - { - if (GUILayout.Button(currentResource.Name, SCANskins.SCAN_headerButton, GUILayout.Width(140))) - { - dropDown = !dropDown; - resourceBox = !resourceBox; - } - } - - stopE(); - fillS(10); - growE(); - fillS(110); - if (dropDown) - GUILayout.Label(" Fine Control Mode", SCANskins.SCAN_boldToggle, GUILayout.Width(140)); - else - fineControlMode = GUILayout.Toggle(fineControlMode, textWithTT(" Fine Control Mode", colorResourceHelpFineControl), SCANskins.SCAN_boldToggle, GUILayout.Width(140)); - stopE(); - growE(); - fillS(10); - currentResource.CurrentBody.MinValue = resourceMinSlider.drawSlider(dropDown, ref lowRCutoff); - stopE(); - fillS(8); - growE(); - fillS(10); - currentResource.CurrentBody.MaxValue = resourceMaxSlider.drawSlider(dropDown, ref highRCutoff); - stopE(); - fillS(8); - growE(); - fillS(10); - currentResource.Transparency = resourceTransSlider.drawSlider(dropDown, ref rTrans); - stopE(); - } - - private void biomeConfirm(int id) - { - fillS(10); - - growE(); - if (!dropDown) - { - if (GUILayout.Button("Apply Values", GUILayout.Width(110))) - { - SCANcontroller.controller.lowBiomeColor = biomeColorPicker.ColorLow; - SCANcontroller.controller.lowBiomeColor32 = biomeColorPicker.ColorLow; - SCANcontroller.controller.highBiomeColor = biomeColorPicker.ColorHigh; - SCANcontroller.controller.highBiomeColor32 = biomeColorPicker.ColorHigh; - SCANcontroller.controller.useStockBiomes = stockBiomes; - SCANcontroller.controller.biomeBorder = biomeBorders; - SCANcontroller.controller.biomeTransparency = bTrans; - - biomeColorPicker.updateOldSwatches(); - - if (bigMap != null) - { - if (bigMap.MType == mapType.Biome) - bigMap.resetMap(SCANcontroller.controller.map_ResourceOverlay); - } - } - - fillS(8); - - if (GUILayout.Button("Default Values", GUILayout.Width(110))) - { - SCANcontroller.controller.lowBiomeColor = SCANconfigLoader.SCANNode.LowBiomeColor; - SCANcontroller.controller.lowBiomeColor32 = SCANconfigLoader.SCANNode.LowBiomeColor; - SCANcontroller.controller.highBiomeColor = SCANconfigLoader.SCANNode.HighBiomeColor; - SCANcontroller.controller.highBiomeColor32 = SCANconfigLoader.SCANNode.HighBiomeColor; - SCANcontroller.controller.useStockBiomes = SCANconfigLoader.SCANNode.StockBiomeMap; - SCANcontroller.controller.biomeBorder = SCANconfigLoader.SCANNode.BiomeBorder; - SCANcontroller.controller.biomeTransparency = SCANconfigLoader.SCANNode.BiomeTransparency; - - stockBiomes = SCANcontroller.controller.useStockBiomes; - biomeBorders = SCANcontroller.controller.biomeBorder; - - biomeColorPicker = new SCANuiColorPicker(SCANcontroller.controller.lowBiomeColor, SCANcontroller.controller.highBiomeColor, colorPickerHelpLow, colorPickerHelpHigh, colorPickerHelpValue, biomeColorPicker.LowColorChange); - - biomeColorPicker.updateOldSwatches(); - - bTrans = SCANcontroller.controller.biomeTransparency; - - if (bigMap != null) - { - if (bigMap.MType == mapType.Biome) - bigMap.resetMap(SCANcontroller.controller.map_ResourceOverlay); - } - } - } - else - { - GUILayout.Label("Apply Values", SCANskins.SCAN_button, GUILayout.Width(110)); - fillS(8); - GUILayout.Label("Default Values", SCANskins.SCAN_button, GUILayout.Width(110)); - } - stopE(); - fillS(8); - if (!dropDown) - { - if (GUILayout.Button(textWithTT("Save Values To Config", colorHelpSaveToConfig), GUILayout.Width(180))) - { - dropDown = true; - saveWarning = true; - } - } - else - GUILayout.Label("Save Values To Config", SCANskins.SCAN_button, GUILayout.Width(180)); - } - - private void slopeConfirm(int id) - { - if (!dropDown) - { - fillS(20); - - if (GUILayout.Button("Apply Values", GUILayout.Width(110))) - { - SCANcontroller.controller.lowSlopeColorOne = slopeColorPickerLow.ColorLow; - SCANcontroller.controller.highSlopeColorOne = slopeColorPickerLow.ColorHigh; - SCANcontroller.controller.lowSlopeColorTwo = slopeColorPickerHigh.ColorLow; - SCANcontroller.controller.highSlopeColorTwo = slopeColorPickerHigh.ColorHigh; - SCANcontroller.controller.lowSlopeColorOne32 = slopeColorPickerLow.ColorLow; - SCANcontroller.controller.highSlopeColorOne32 = slopeColorPickerLow.ColorHigh; - SCANcontroller.controller.lowSlopeColorTwo32 = slopeColorPickerHigh.ColorLow; - SCANcontroller.controller.highSlopeColorTwo32 = slopeColorPickerHigh.ColorHigh; - SCANcontroller.controller.slopeCutoff = sCutoff; - - slopeColorPickerLow.updateOldSwatches(); - slopeColorPickerHigh.updateOldSwatches(); - - if (bigMap != null) - { - if (bigMap.MType == mapType.Slope) - bigMap.resetMap(SCANcontroller.controller.map_ResourceOverlay); - } - - } - - fillS(8); - - if (GUILayout.Button("Default Values", GUILayout.Width(110))) - { - SCANcontroller.controller.lowSlopeColorOne = SCANconfigLoader.SCANNode.BottomLowSlopeColor; - SCANcontroller.controller.highSlopeColorOne = SCANconfigLoader.SCANNode.BottomHighSlopeColor; - SCANcontroller.controller.lowSlopeColorTwo = SCANconfigLoader.SCANNode.TopLowSlopeColor; - SCANcontroller.controller.highSlopeColorTwo = SCANconfigLoader.SCANNode.TopHighSlopeColor; - SCANcontroller.controller.lowSlopeColorOne32 = SCANconfigLoader.SCANNode.BottomLowSlopeColor; - SCANcontroller.controller.highSlopeColorOne32 = SCANconfigLoader.SCANNode.BottomHighSlopeColor; - SCANcontroller.controller.lowSlopeColorTwo32 = SCANconfigLoader.SCANNode.TopLowSlopeColor; - SCANcontroller.controller.highSlopeColorTwo32 = SCANconfigLoader.SCANNode.TopHighSlopeColor; - SCANcontroller.controller.slopeCutoff = SCANconfigLoader.SCANNode.SlopeCutoff; - - slopeColorPickerLow = new SCANuiColorPicker(SCANcontroller.controller.lowSlopeColorOne, SCANcontroller.controller.highSlopeColorOne, colorPickerHelpLow, colorPickerHelpHigh, colorPickerHelpValue, slopeColorPickerLow.LowColorChange); - slopeColorPickerHigh = new SCANuiColorPicker(SCANcontroller.controller.lowSlopeColorTwo, SCANcontroller.controller.highSlopeColorTwo, colorPickerHelpLow, colorPickerHelpHigh, colorPickerHelpValue, slopeColorPickerHigh.LowColorChange); - - sCutoff = SCANcontroller.controller.slopeCutoff; - - slopeColorPickerLow.updateOldSwatches(); - slopeColorPickerHigh.updateOldSwatches(); - - if (bigMap != null) - { - if (bigMap.MType == mapType.Slope) - bigMap.resetMap(SCANcontroller.controller.map_ResourceOverlay); - } - } - - fillS(20); - - if (GUILayout.Button(textWithTT("Save Values To Config", colorHelpSaveToConfig), GUILayout.Width(180))) - { - dropDown = true; - saveWarning = true; - } - } - else - { - fillS(20); - GUILayout.Label("Apply Values", SCANskins.SCAN_button, GUILayout.Width(110)); - fillS(8); - GUILayout.Label("Default Values", SCANskins.SCAN_button, GUILayout.Width(110)); - fillS(20); - GUILayout.Label("Save Values To Config", SCANskins.SCAN_button, GUILayout.Width(180)); - } - } - - private void resourceConfirm(int id) - { - fillS(10); - growE(); - if (!dropDown) - { - if (GUILayout.Button(textWithTT("Apply Values", colorResourceHelpApply), GUILayout.Width(110))) - { - currentResource.MinColor = resourceColorPicker.ColorLow; - currentResource.MaxColor = resourceColorPicker.ColorHigh; - - SCANcontroller.updateSCANresource(currentResource, false); - - updateUI(); - - if (bigMap != null && SCANcontroller.controller.map_ResourceOverlay) - bigMap.resetMap(SCANcontroller.controller.map_ResourceOverlay); - } - - fillS(6); - - if (GUILayout.Button(textWithTT("Apply To All Planets", colorResourceHelpApplyAll), GUILayout.Width(200))) - { - for (int i = 0; i < currentResource.getBodyCount; i++) - { - SCANresourceBody r = currentResource.getBodyConfig(i); - if (r != null) - { - r.MinValue = lowRCutoff; - r.MaxValue = highRCutoff; - } - } - - currentResource.MinColor = resourceColorPicker.ColorLow; - currentResource.MaxColor = resourceColorPicker.ColorHigh; - - SCANcontroller.updateSCANresource(currentResource, true); - - updateUI(); - - if (bigMap != null && SCANcontroller.controller.map_ResourceOverlay) - bigMap.resetMap(SCANcontroller.controller.map_ResourceOverlay); - } - } - else - { - GUILayout.Label("Apply Values", SCANskins.SCAN_button, GUILayout.Width(110)); - fillS(6); - GUILayout.Label("Apply To All Planets", SCANskins.SCAN_button, GUILayout.Width(200)); - } - stopE(); - fillS(8); - growE(); - if (!dropDown) - { - if (GUILayout.Button(textWithTT("Default Values", colorResourceHelpDefault), GUILayout.Width(110))) - { - currentResource.CurrentBody.MinValue = currentResource.CurrentBody.DefaultMinValue; - currentResource.CurrentBody.MaxValue = currentResource.CurrentBody.DefaultMaxValue; - currentResource.MinColor = currentResource.DefaultLowColor; - currentResource.MaxColor = currentResource.DefaultHighColor; - currentResource.Transparency = currentResource.DefaultTrans; - - SCANcontroller.updateSCANresource(currentResource, false); - - updateUI(); - - if (bigMap != null && SCANcontroller.controller.map_ResourceOverlay) - bigMap.resetMap(SCANcontroller.controller.map_ResourceOverlay); - } - - fillS(6); - - if (GUILayout.Button(textWithTT("Default Values For All Planets", colorResourceHelpDefaultAll), GUILayout.Width(200))) - { - currentResource.MinColor = currentResource.DefaultLowColor; - currentResource.MaxColor = currentResource.DefaultHighColor; - currentResource.Transparency = currentResource.DefaultTrans; - - for (int i = 0; i < currentResource.getBodyCount; i++) - { - SCANresourceBody r = currentResource.getBodyConfig(i); - if (r != null) - { - r.MinValue = r.DefaultMinValue; - r.MaxValue = r.DefaultMaxValue; - } - } - - SCANcontroller.updateSCANresource(currentResource, true); - - updateUI(); - - if (bigMap != null && SCANcontroller.controller.map_ResourceOverlay) - bigMap.resetMap(SCANcontroller.controller.map_ResourceOverlay); - } - } - else - { - GUILayout.Label("Default Values", SCANskins.SCAN_button, GUILayout.Width(110)); - fillS(6); - GUILayout.Label("Default Values For All Planets", SCANskins.SCAN_button, GUILayout.Width(200)); - } - stopE(); - fillS(8); - if (!dropDown) - { - if (GUILayout.Button(textWithTT("Save Values To Config", colorHelpSaveToConfig), GUILayout.Width(180))) - { - dropDown = true; - saveWarning = true; - } - } - else - GUILayout.Label("Save Values To Config", SCANskins.SCAN_button, GUILayout.Width(180)); - } - - //Drop down menu for palette selection - private void dropDownBox(int id) - { - if (dropDown) - { - if (paletteBox && windowMode == 0) - { - ddRect = new Rect(40, 120, 100, 100); - GUI.Box(ddRect, ""); - for (int i = 0; i < Palette.kindNames.Length; i++) - { - Rect r = new Rect(ddRect.x + 10, ddRect.y + 5 + (i * 23), 80, 22); - if (GUI.Button(r, Palette.kindNames[i], SCANskins.SCAN_dropDownButton)) - { - paletteBox = false; - palette.CurrentPalettes = palette.setCurrentPalettesType((Palette.Kind)i, (int)pSize); - setSizeSlider((Palette.Kind)i); - } - } - } - else if (resourceBox && windowMode == 3) - { - ddRect = new Rect(WindowRect.width - 240, 112, 160, 140); - GUI.Box(ddRect, ""); - for (int i = 0; i < loadedResources.Count; i ++) - { - scrollR = GUI.BeginScrollView(ddRect, scrollR, new Rect(0, 0, 140, 23 * loadedResources.Count)); - Rect r = new Rect(2, i * 23, 136, 22); - if (GUI.Button(r, loadedResources[i].Name, currentResource.Name == loadedResources[i].Name ? SCANskins.SCAN_dropDownButtonActive : SCANskins.SCAN_dropDownButton)) - { - currentResource = new SCANresourceGlobal(loadedResources[i]); - currentResource.CurrentBodyConfig(body.name); - - fineControlMode = oldFineControl = false; - - updateUI(); - - dropDown = false; - resourceBox = false; - } - GUI.EndScrollView(); - } - } - else if (planetBox) - { - ddRect = new Rect(WindowRect.width - 250, 78, 180, 180); - GUI.Box(ddRect, ""); - for (int i = 0; i < FlightGlobals.Bodies.Count; i++) - { - CelestialBody b = FlightGlobals.Bodies[i]; - scrollR = GUI.BeginScrollView(ddRect, scrollR, new Rect(0, 0, 140, 23 * FlightGlobals.Bodies.Count)); - Rect r = new Rect(2, i * 23, 136, 22); - if (GUI.Button(r, b.name, body == b ? SCANskins.SCAN_dropDownButtonActive : SCANskins.SCAN_dropDownButton)) - { - body = b; - - bodyIndex = body.flightGlobalsIndex; - - if (windowMode == 0) - { - setBodyTerrain(); - - currentTerrain = new SCANterrainConfig(bodyTerrain); - } - else if (windowMode == 3) - { - currentResource.CurrentBodyConfig(body.name); - - lowRCutoff = currentResource.CurrentBody.MinValue; - highRCutoff = currentResource.CurrentBody.MaxValue; - - oldFineControl = fineControlMode = false; - - setResourceSliders(); - } - - updateUI(); - - dropDown = false; - planetBox = false; - } - GUI.EndScrollView(); - } - } - else if (saveWarning) - { - ddRect = new Rect(WindowRect.width - 182, WindowRect.height - 92, 180, 90); - GUI.Box(ddRect, ""); - Rect r = new Rect(ddRect.x + 10, ddRect.y, 160, 60); - GUI.Label(r, "Overwrite Existing Config File?", SCANskins.SCAN_headlineSmall); - - r.x += 40; - r.y += 55; - r.width = 80; - r.height = 30; - - if (GUI.Button(r, "Confirm", SCANskins.SCAN_buttonWarning)) - { - dropDown = false; - saveWarning = false; - SCANconfigLoader.SCANNode.Save(); - } - } - else - dropDown = false; - } - } - - private void updateUI() - { - if (windowMode == 0) - { - minT = currentTerrain.MinTerrain; - maxT = currentTerrain.MaxTerrain; - clampT = currentTerrain.ClampTerrain ?? currentTerrain.MinTerrain + 10f; - pSize = currentTerrain.PalSize; - oldReverseState = currentTerrain.PalRev; - oldDiscreteState = currentTerrain.PalDis; - oldClampState = clampState = currentTerrain.ClampTerrain != null; - palette.CurrentPalettes = palette.setCurrentPalettesType(currentTerrain.ColorPal.kind, (int)pSize); - minTerrainSlider.valueChanged(); - maxTerrainSlider.valueChanged(); - clampTerrainSlider.valueChanged(); - paletteSizeSlider.valueChanged(); - paletteIndex = currentTerrain.ColorPal.index; - - regenPaletteSets(); - setSizeSlider(currentTerrain.ColorPal.kind); - setTerrainSliders(); - drawCurrentLegend(); - } - else if (windowMode == 3) - { - lowRCutoff = currentResource.CurrentBody.MinValue; - highRCutoff = currentResource.CurrentBody.MaxValue; - rTrans = currentResource.Transparency; - - resourceColorPicker = new SCANuiColorPicker(currentResource.MinColor, currentResource.MaxColor, colorPickerHelpLow, colorPickerHelpHigh, colorPickerHelpValue, resourceColorPicker.LowColorChange); - - resourceColorPicker.updateOldSwatches(); - - setResourceSliders(); - } - } - - //Draws the palette swatch for the currently active SCANdata selection - private void drawCurrentLegend() - { - currentLegend = new SCANmapLegend(); - currentLegend.Legend = currentLegend.getLegend(0, bodyTerrain); - } - - //Draws the palette swatch for the newly adjusted palette - private void drawPreviewLegend() - { - float? clamp = null; - Color32[] c = currentTerrain.ColorPal.colors; - if (clampState) - clamp = clampT; - if (currentTerrain.PalRev) - c = currentTerrain.ColorPal.colorsReverse; - previewLegend = new SCANmapLegend(); - previewLegend.Legend = previewLegend.getLegend(maxT, minT, maxT - minT, clamp, currentTerrain.PalDis, c); - } - - //Resets the palettes whenever the size slider is adjusted - private void regenPaletteSets() - { - palette.CurrentPalettes = palette.setCurrentPalettesType(palette.CurrentPalettes.paletteType, (int)pSize); - } - - //Change the max range on the palette size slider based on palette type - private void setSizeSlider(Palette.Kind k) - { - int max = 11; - switch (k) - { - case Palette.Kind.Diverging: - { - max = 11; - break; - } - case Palette.Kind.Qualitative: - { - max = 12; - break; - } - case Palette.Kind.Sequential: - { - max = 9; - break; - } - case Palette.Kind.Fixed: - { - break; - } - } - - paletteSizeSlider.MaxValue = max; - if (pSize > paletteSizeSlider.MaxValue) - pSize = paletteSizeSlider.MaxValue; - - } - - //Dynamically adjust the min and max values on all of the terrain height sliders; avoids impossible values - private void setTerrainSliders() - { - setBodyTerrain(); - - minTerrainSlider.MinValue = bodyTerrain.DefaultMinHeight - SCANconfigLoader.SCANNode.RangeBelowMinHeight; - maxTerrainSlider.MaxValue = bodyTerrain.DefaultMaxHeight + SCANconfigLoader.SCANNode.RangeAboveMaxHeight; - minTerrainSlider.MaxValue = maxT - 100f; - maxTerrainSlider.MinValue = minT + 100f; - clampTerrainSlider.MinValue = minT + 10f; - clampTerrainSlider.MaxValue = maxT - 10f; - if (clampT < minT + 10f) - clampT = minT + 10f; - else if (clampT > maxT - 10f) - clampT = maxT - 10f; - } - - private void setResourceSliders() - { - if (fineControlMode) - { - if (highRCutoff < lowRCutoff + 5f) - resourceMinSlider.MaxValue = highRCutoff - 0.1f; - - if (lowRCutoff > highRCutoff - 5f) - resourceMaxSlider.MinValue = lowRCutoff + 0.1f; - } - else - { - resourceMinSlider.MinValue = 0f; - resourceMinSlider.MaxValue = highRCutoff - 0.1f; - resourceMaxSlider.MinValue = lowRCutoff + 0.1f; - resourceMaxSlider.MaxValue = 100f; - } - } - - private void setBodyTerrain() - { - bodyTerrain = SCANcontroller.getTerrainNode(body.name); - - if (bodyTerrain == null) - { - float? clamp = null; - if (body.ocean) - clamp = 0; - - float newMax; - - try - { - newMax = ((float)CelestialUtilities.GetHighestPeak(body)).Mathf_Round(-2); - } - catch (Exception e) - { - SCANUtil.SCANlog("Error in calculating Max Height for {0}; using default value\n{1}", body.theName, e); - newMax = SCANconfigLoader.SCANNode.DefaultMaxHeightRange; - } - - bodyTerrain = new SCANterrainConfig(SCANconfigLoader.SCANNode.DefaultMinHeightRange, newMax, clamp, SCANUtil.paletteLoader(SCANconfigLoader.SCANNode.DefaultPalette, 7), 7, false, false, body); - - SCANcontroller.addToTerrainConfigData(body.name, bodyTerrain); - } - } - - } -} diff --git a/SCANsat/SCAN_UI/SCANkscMap.cs b/SCANsat/SCAN_UI/SCANkscMap.cs deleted file mode 100644 index 1d14a1781..000000000 --- a/SCANsat/SCAN_UI/SCANkscMap.cs +++ /dev/null @@ -1,741 +0,0 @@ -#region license -/* - * [Scientific Committee on Advanced Navigation] - * S.C.A.N. Satellite - * - * SCANsat - KSC map window object - * - * Copyright (c)2013 damny; - * Copyright (c)2014 David Grandy ; - * Copyright (c)2014 technogeeky ; - * Copyright (c)2014 (Your Name Here) ; see LICENSE.txt for licensing details. - * - */ -#endregion - -using System.Collections.Generic; -using System.Text; -using SCANsat.SCAN_Platform; -using SCANsat; -using SCANsat.SCAN_UI.UI_Framework; -using SCANsat.SCAN_Data; -using SCANsat.SCAN_Map; -using UnityEngine; -using System.Linq; - -namespace SCANsat.SCAN_UI -{ - class SCANkscMap : SCAN_MBW - { - private static SCANmap bigmap; - private static CelestialBody b; - private Vessel v; - private string mapTypeTitle = ""; - private SCANdata data; - private bool drawGrid, currentGrid, currentColor, lastColor, lastResource, controlLock, waypoints; - private bool drop_down_open, projection_drop_down, mapType_drop_down, resources_drop_down, planetoid_drop_down; - //private Texture2D overlay_static; - private List loadedResources = new List(); - private Dictionary>> gridLines = new Dictionary>>(); - private Rect ddRect, zoomCloseRect; - private Rect rc; - private Vector2 scrollP, scrollR; - private Rect pos_spotmap; - private Rect pos_spotmap_x; - private StringBuilder infoString; - private StringBuilder infoString2; - internal readonly static Rect defaultRect = new Rect(250, 60, 780, 460); - private static Rect sessionRect = defaultRect; - private const string lockID = "SCANksc_LOCK"; - - internal SCANzoomWindow spotMap; - - protected override void Awake() - { - base.Awake(); - - WindowCaption = "Map of "; - WindowRect = sessionRect; - WindowOptions = new GUILayoutOption[2] { GUILayout.Width(740), GUILayout.Height(420) }; - WindowStyle = SCANskins.SCAN_window; - Visible = false; - DragEnabled = true; - TooltipMouseOffset = new Vector2d(-10, -25); - ClampToScreenOffset = new RectOffset(-600, -600, -400, -400); - waypoints = HighLogic.LoadedScene != GameScenes.SPACECENTER; - pos_spotmap = new Rect(10f, 10f, 10f, 10f); - pos_spotmap_x = new Rect(10f, 10f, 25f, 25f); - rc = new Rect(0, 0, 20, 20); - - SCAN_SkinsLibrary.SetCurrent("SCAN_Unity"); - SCAN_SkinsLibrary.SetCurrentTooltip(); - - removeControlLocks(); - } - - protected override void Start() - { - Visible = SCANcontroller.controller.kscMapVisible; - if (b == null) - b = Planetarium.fetch.Home; - if (bigmap == null) - { - bigmap = new SCANmap(b, true, mapSource.BigMap); - bigmap.setProjection((MapProjection)SCANcontroller.controller.projection); - bigmap.setWidth(720); - } - currentColor = SCANcontroller.controller.colours == 0; - lastColor = currentColor; - lastResource = SCANcontroller.controller.map_ResourceOverlay; - WindowCaption = string.Format("Map of {0}", b.theName); - data = SCANUtil.getData(b); - infoString = new StringBuilder(); - infoString2 = new StringBuilder(); - if (data == null) - { - data = new SCANdata(b); - SCANcontroller.controller.addToBodyData(b, data); - } - bigmap.setBody(b); - if (SCANconfigLoader.GlobalResource) - { - loadedResources = SCANcontroller.setLoadedResourceList(); - } - TooltipsEnabled = SCANcontroller.controller.toolTips; - } - - protected override void OnDestroy() - { - removeControlLocks(); - if (spotMap != null) - Destroy(spotMap); - - SCANcontroller.controller.unloadPQS(bigmap.Body, mapSource.BigMap); - } - - protected override void Update() - { - if (HighLogic.LoadedScene != GameScenes.TRACKSTATION) - { - v = null; - return; - } - - MapObject target = PlanetariumCamera.fetch.target; - - if (target.type != MapObject.ObjectType.Vessel) - { - v = null; - return; - } - - v = target.vessel; - } - - internal void removeControlLocks() - { - InputLockManager.RemoveControlLock(lockID); - controlLock = false; - } - - //These properties are used by the color selection window to sync color palettes - public SCANdata Data - { - get { return data; } - } - - public static SCANmap BigMap - { - get { return bigmap; } - } - - public CelestialBody Body - { - get { return b; } - } - - protected override void DrawWindowPre(int id) - { - if (bigmap != null) - mapTypeTitle = SCANmapType.mapTypeNames[(int)bigmap.MType]; - else - mapTypeTitle = ""; - - WindowCaption = string.Format("{0} Map of {1}", mapTypeTitle, bigmap.Body.theName); - - //Disable any errant drop down menus - if (!drop_down_open) - { - projection_drop_down = false; - mapType_drop_down = false; - resources_drop_down = false; - planetoid_drop_down = false; - } - - switch (HighLogic.LoadedScene) - { - case GameScenes.SPACECENTER: - Vector2 mousePos = Input.mousePosition; - mousePos.y = Screen.height - mousePos.y; - if (WindowRect.Contains(mousePos) && !controlLock) - { - InputLockManager.SetControlLock(ControlTypes.CAMERACONTROLS | ControlTypes.KSC_ALL, lockID); - controlLock = true; - } - else if (!WindowRect.Contains(mousePos) && controlLock) - { - removeControlLocks(); - } - break; - case GameScenes.TRACKSTATION: - Vector2 mousePosT = Input.mousePosition; - mousePosT.y = Screen.height - mousePosT.y; - if (WindowRect.Contains(mousePosT) && !controlLock) - { - InputLockManager.SetControlLock(ControlTypes.TRACKINGSTATION_UI, lockID); - controlLock = true; - } - else if (!WindowRect.Contains(mousePosT) && controlLock) - { - removeControlLocks(); - } - break; - } - } - - //The primary GUI method - protected override void DrawWindow(int id) - { - versionLabel(id); /* Standard version label and close button */ - closeBox(id); - - growS(); - topMenu(id); /* Top row of buttons - used to control the map types */ - growE(); - toggleBar(id); /* Toggle options along left side - control overlay options - *Replace buttons with textures* */ - fillS(60); - mapDraw(id); /* Draw the main map texture */ - stopE(); - growE(); - fillS(160); - growS(); - mouseOver(id); /* Handle all mouse-over info and zoom-map code */ - legendBar(id); /* Draw the mouseover info and legend bar along the bottom */ - stopS(); - stopE(); - stopS(); - - drawOrbit(id); /* Draw the vessel's orbit if in the tracking station */ - mapLabels(id); /* Draw the vessel/anomaly icons on the map */ - if (drop_down_open) - dropDown(id); /* Draw the drop down menus if any are open */ - } - - protected override void DrawWindowPost(int id) - { - //Close the drop down menu if the window is clicked anywhere else - if (drop_down_open && Event.current.type == EventType.mouseDown && !ddRect.Contains(Event.current.mousePosition)) - drop_down_open = false; - - //Used to update the black and white/color status - if (lastColor != currentColor) - { - lastColor = currentColor; - if (SCANcontroller.controller.colours == 0) - SCANcontroller.controller.colours = 1; - else - SCANcontroller.controller.colours = 0; - bigmap.resetMap(SCANcontroller.controller.map_ResourceOverlay); - } - - //Updates the grid overlay status - if (currentGrid != SCANcontroller.controller.map_grid) - { - currentGrid = SCANcontroller.controller.map_grid; - drawGrid = true; - } - - //Update selected resource status - if (lastResource != SCANcontroller.controller.map_ResourceOverlay) - { - lastResource = SCANcontroller.controller.map_ResourceOverlay; - bigmap.resetMap(SCANcontroller.controller.map_ResourceOverlay); - } - - sessionRect = WindowRect; - } - - //Draw version label in upper left corner - private void versionLabel(int id) - { - Rect r = new Rect(6, 0, 50, 18); - GUI.Label(r, SCANmainMenuLoader.SCANsatVersion, SCANskins.SCAN_whiteReadoutLabel); - } - - //Draw the close button in upper right corner - private void closeBox(int id) - { - Rect r = new Rect(WindowRect.width - 20, 1, 18, 18); - if (GUI.Button(r, SCANcontroller.controller.closeBox, SCANskins.SCAN_closeButton)) - { - removeControlLocks(); - Visible = false; - SCANcontroller.controller.kscMapVisible = Visible; - } - } - - //Draw the drop down buttons along the top of the map - Used to control map types - private void topMenu (int id) - { - growE(); - - fillS(100); - - if (GUILayout.Button("Projection", GUILayout.MaxWidth(100))) - { - projection_drop_down = !projection_drop_down; - drop_down_open = !drop_down_open; - } - - fillS(40); - - if (GUILayout.Button("Map Type", GUILayout.MaxWidth(90))) - { - mapType_drop_down = !mapType_drop_down; - drop_down_open = !drop_down_open; - } - - fillS(); - if (GUILayout.Button(iconWithTT(SCANskins.SCAN_RefreshIcon, "Refresh Map"), SCANskins.SCAN_buttonBorderless, GUILayout.MaxWidth(34), GUILayout.MaxHeight(28))) - { - bigmap.resetMap(SCANcontroller.controller.map_ResourceOverlay); - } - fillS(); - - if (SCANconfigLoader.GlobalResource) - { - if (GUILayout.Button("Resources", GUILayout.MaxWidth(90))) - { - resources_drop_down = !resources_drop_down; - drop_down_open = !drop_down_open; - } - fillS(40); - } - - if (GUILayout.Button("Celestial Body", GUILayout.MaxWidth(110))) - { - planetoid_drop_down = !planetoid_drop_down; - drop_down_open = !drop_down_open; - } - - fillS(20); - - stopE(); - } - - //Draw the overlay options along the left side of the map texture - private void toggleBar(int id) - { - growS(); - - currentColor = GUILayout.Toggle(currentColor, textWithTT("", "Toggle Color")); - - Rect d = GUILayoutUtility.GetLastRect(); - d.x += 34; - d.y += 2; - d.width = 48; - d.height = 24; - - if (GUI.Button(d, iconWithTT(SCANskins.SCAN_ColorToggleIcon, "Toggle Color"), SCANskins.SCAN_buttonBorderless)) - { - currentColor = !currentColor; - } - - fillS(); - - SCANcontroller.controller.map_grid = GUILayout.Toggle(SCANcontroller.controller.map_grid, textWithTT("", "Toggle Grid")); - - d = GUILayoutUtility.GetLastRect(); - d.x += 34; - d.y += 2; - d.width = 48; - d.height = 24; - - if (GUI.Button(d, iconWithTT(SCANskins.SCAN_GridIcon, "Toggle Grid"), SCANskins.SCAN_buttonBorderless)) - { - SCANcontroller.controller.map_grid = !SCANcontroller.controller.map_grid; - } - - if (v != null) - { - fillS(); - - SCANcontroller.controller.map_orbit = GUILayout.Toggle(SCANcontroller.controller.map_orbit, textWithTT("", "Toggle Orbit")); - - d = GUILayoutUtility.GetLastRect(); - d.x += 34; - d.y += 2; - d.width = 48; - d.height = 24; - - if (GUI.Button(d, iconWithTT(SCANskins.SCAN_OrbitIcon, "Toggle Orbit"), SCANskins.SCAN_buttonBorderless)) - { - SCANcontroller.controller.map_orbit = !SCANcontroller.controller.map_orbit; - } - - fillS(); - } - else - fillS(); - - if (waypoints) - { - SCANcontroller.controller.map_waypoints = GUILayout.Toggle(SCANcontroller.controller.map_waypoints, textWithTT("", "Toggle Waypoints")); - - d = GUILayoutUtility.GetLastRect(); - d.x += 44; - d.y += 2; - d.width = 24; - d.height = 24; - - if (GUI.Button(d, iconWithTT(SCANskins.SCAN_WaypointIcon, "Toggle Waypoints"), SCANskins.SCAN_buttonBorderless)) - { - SCANcontroller.controller.map_waypoints = !SCANcontroller.controller.map_waypoints; - } - - fillS(); - } - - SCANcontroller.controller.map_markers = GUILayout.Toggle(SCANcontroller.controller.map_markers, textWithTT("", "Toggle Anomalies")); - - d = GUILayoutUtility.GetLastRect(); - d.x += 44; - d.y += 2; - d.width = 24; - d.height = 24; - - if (GUI.Button(d, textWithTT(SCANcontroller.controller.anomalyMarker, "Toggle Anomalies"), SCANskins.SCAN_buttonBorderless)) - { - SCANcontroller.controller.map_markers = !SCANcontroller.controller.map_markers; - } - - fillS(); - - SCANcontroller.controller.map_flags = GUILayout.Toggle(SCANcontroller.controller.map_flags, textWithTT("", "Toggle Flags")); - - d = GUILayoutUtility.GetLastRect(); - d.x += 44; - d.y += 2; - d.width = 24; - d.height = 24; - - if (GUI.Button(d, iconWithTT(SCANskins.SCAN_FlagIcon, "Toggle Flags"), SCANskins.SCAN_buttonBorderless)) - { - SCANcontroller.controller.map_flags = !SCANcontroller.controller.map_flags; - } - - fillS(); - - SCANcontroller.controller.map_asteroids = GUILayout.Toggle(SCANcontroller.controller.map_asteroids, textWithTT("", "Toggle Asteroids")); - - d = GUILayoutUtility.GetLastRect(); - d.x += 44; - d.y += 2; - d.width = 24; - d.height = 24; - - if (GUI.Button(d, iconWithTT(SCANskins.SCAN_AsteroidIcon, "Toggle Asteroids"), SCANskins.SCAN_buttonBorderless)) - { - SCANcontroller.controller.map_asteroids = !SCANcontroller.controller.map_asteroids; - } - - fillS(); - - SCANcontroller.controller.legend = GUILayout.Toggle(SCANcontroller.controller.legend, textWithTT("", "Toggle Legend")); - - d = GUILayoutUtility.GetLastRect(); - d.x += 34; - d.y += 2; - d.width = 48; - d.height = 24; - - if (GUI.Button(d, iconWithTT(SCANskins.SCAN_LegendIcon, "Toggle Legend"), SCANskins.SCAN_buttonBorderless)) - { - SCANcontroller.controller.legend = !SCANcontroller.controller.legend; - } - - if (SCANconfigLoader.GlobalResource) - { - fillS(); - - SCANcontroller.controller.map_ResourceOverlay = GUILayout.Toggle(SCANcontroller.controller.map_ResourceOverlay, textWithTT ("", "Toggle Resources")); - - d = GUILayoutUtility.GetLastRect(); - d.x += 44; - d.y += 2; - d.width = 24; - d.height = 24; - - if (GUI.Button(d, iconWithTT(SCANskins.SCAN_ResourceIcon, "Toggle Resources"), SCANskins.SCAN_buttonBorderless)) - { - SCANcontroller.controller.map_ResourceOverlay = !SCANcontroller.controller.map_ResourceOverlay; - } - } - stopS(); - - //Open settings windows using icons instead of text; use tooltips - Rect s = new Rect(10, WindowRect.height - 42, 32, 32); - - if (GUI.Button(s, iconWithTT(SCANskins.SCAN_SettingsIcon, "Settings Menu"), SCANskins.SCAN_windowButton)) - { - SCANcontroller.controller.settingsWindow.Visible = !SCANcontroller.controller.settingsWindow.Visible; - SCANcontroller.controller.settingsWindow.removeControlLocks(); - } - - s.x += 36; - - if (GUI.Button(s, iconWithTT(SCANskins.SCAN_ColorIcon, "Color Control"), SCANskins.SCAN_windowButton)) - { - SCANcontroller.controller.colorManager.Visible = !SCANcontroller.controller.colorManager.Visible; - SCANcontroller.controller.colorManager.removeControlLocks(); - } - - if (HighLogic.LoadedScene == GameScenes.TRACKSTATION) - { - s.x += 36; - - if (GUI.Button(s, iconWithTT(SCANskins.SCAN_OverlayIcon, "Overlay Control"), SCANskins.SCAN_windowButton)) - { - SCANcontroller.controller.resourceOverlay.Visible = !SCANcontroller.controller.resourceOverlay.Visible; - } - } - - s.x = WindowRect.width - 66; - - if (GUI.Button(s, iconWithTT(SCANskins.SCAN_ScreenshotIcon, "Export Map"), SCANskins.SCAN_windowButton)) - { - if (bigmap.isMapComplete()) - bigmap.exportPNG(); - } - } - - //Draw the actual map texture - private void mapDraw (int id) - { - MapTexture = bigmap.getPartialMap(); - - GUILayout.Label("", GUILayout.Width(MapTexture.width), GUILayout.Height(MapTexture.height)); - - TextureRect = GUILayoutUtility.GetLastRect(); - TextureRect.width = bigmap.MapWidth; - TextureRect.height = bigmap.MapHeight; - - if (drawGrid) - { - gridLines = new Dictionary>>(); - gridLines = SCANuiUtil.drawGridLine(TextureRect, bigmap); - drawGrid = false; - } - - GUI.DrawTexture(TextureRect, MapTexture); - - if (bigmap.Projection == MapProjection.Polar) - { - rc.x = TextureRect.x + TextureRect.width / 2 - TextureRect.width / 8; - rc.y = TextureRect.y + TextureRect.height / 8; - SCANuiUtil.drawLabel(rc, "S", SCANskins.SCAN_orbitalLabelOff, true, SCANskins.SCAN_shadowReadoutLabel, false, SCANskins.SCAN_orbitalLabelOn, true); - rc.x = TextureRect.x + TextureRect.width / 2 + TextureRect.width / 8; - SCANuiUtil.drawLabel(rc, "N", SCANskins.SCAN_orbitalLabelOff, true, SCANskins.SCAN_shadowReadoutLabel, false, SCANskins.SCAN_orbitalLabelOn, true); - } - - if (SCANcontroller.controller.map_grid) - { - if (gridLines.Count > 0 && inRepaint()) - { - GL.PushMatrix(); - foreach (List points in gridLines[0]) - { - SCANuiUtil.drawGridLines(points, bigmap.MapWidth, TextureRect.x, TextureRect.y, SCANuiUtil.blackLineColor); - } - foreach (List points in gridLines[1]) - { - SCANuiUtil.drawGridLines(points, bigmap.MapWidth, TextureRect.x, TextureRect.y, SCANuiUtil.lineColor); - } - GL.PopMatrix(); - } - } - } - - //Display info for mouse over in the map and handle the zoom map - private void mouseOver(int id) - { - float mx = Event.current.mousePosition.x - TextureRect.x; - float my = Event.current.mousePosition.y - TextureRect.y; - bool in_map = false; - double mlon = 0, mlat = 0; - - //Handles mouse positioning and converting to lat/long coordinates - if (mx >= 0 && my >= 0 && mx < MapTexture.width && my < MapTexture.height) - { - double mlo = (mx * 360f / MapTexture.width) - 180; - double mla = 90 - (my * 180f / MapTexture.height); - mlon = bigmap.unprojectLongitude(mlo, mla); - mlat = bigmap.unprojectLatitude(mlo, mla); - - if (mlon >= -180 && mlon <= 180 && mlat >= -90 && mlat <= 90) - { - in_map = true; - } - } - - //Handles mouse click while inside map; opens zoom map or zooms in further - if (Event.current.isMouse && !ddRect.Contains(Event.current.mousePosition) && !zoomCloseRect.Contains(Event.current.mousePosition)) - { - if (Event.current.type == EventType.MouseUp) - { - if (Event.current.button == 1) - { - if (in_map) - { - if (spotMap == null) - { - spotMap = gameObject.AddComponent(); - } - spotMap.setMapCenter(mlat, mlon, true, bigmap, true); - } - } - Event.current.Use(); - } - } - - //Draw the actual mouse over info label below the map - SCANuiUtil.mouseOverInfo(mlon, mlat, bigmap, data, bigmap.Body, in_map, ref infoString, ref infoString2); - } - - //Draw the altitude legend bar along the bottom - private void legendBar(int id) - { - if (bigmap.MType == mapType.Altimetry && SCANcontroller.controller.legend) - { - if (bigmap.MapLegend == null) - bigmap.MapLegend = new SCANmapLegend(); - bigmap.MapLegend.Legend = bigmap.MapLegend.getLegend(data.TerrainConfig.MinTerrain, data.TerrainConfig.MaxTerrain, SCANcontroller.controller.colours, data.TerrainConfig); - SCANuiUtil.drawLegend(data, bigmap.MapLegend); - } - } - - //Draw the orbit overlays - private void drawOrbit(int id) - { - if (HighLogic.LoadedScene == GameScenes.TRACKSTATION) - { - if (SCANcontroller.controller.map_orbit && v != null) - { - SCANuiUtil.drawOrbit(TextureRect, bigmap, v, bigmap.Body); - } - } - } - - //Draw the map overlay labels - private void mapLabels (int id) - { - bool showWaypoints = false; - if (waypoints) - showWaypoints = SCANcontroller.controller.map_waypoints; - - SCANuiUtil.drawMapLabels(TextureRect, v, bigmap, data, bigmap.Body, SCANcontroller.controller.map_markers, showWaypoints); - } - - //Draw the drop down menus if any have been opened - private void dropDown(int id) - { - if (projection_drop_down) - { - ddRect = new Rect(110, 45, 100, 70); - GUI.Box(ddRect, ""); - for (int i = 0; i < SCANmapProjection.projectionNames.Length; ++i) - { - Rect r = new Rect(ddRect.x + 2, ddRect.y + (24 * i), ddRect.width - 4, 20); - if (GUI.Button(r, SCANmapProjection.projectionNames[i], SCANcontroller.controller.projection == i ? SCANskins.SCAN_dropDownButtonActive : SCANskins.SCAN_dropDownButton)) - { - bigmap.setProjection((MapProjection)i); - bigmap.resetMap(SCANcontroller.controller.map_ResourceOverlay); - SCANcontroller.controller.projection = i; - drawGrid = true; - drop_down_open = false; - } - } - } - - else if (mapType_drop_down) - { - ddRect = new Rect(270, 45, 70, 70); - GUI.Box(ddRect, ""); - for (int i = 0; i < SCANmapType.mapTypeNames.Length; i++) - { - Rect r = new Rect(ddRect.x + 2, ddRect.y + (24 * i), ddRect.width - 4, 20); - if (GUI.Button(r, SCANmapType.mapTypeNames[i], (int)(bigmap.MType) == i ? SCANskins.SCAN_dropDownButtonActive : SCANskins.SCAN_dropDownButton)) - { - bigmap.resetMap((mapType)i, true, SCANcontroller.controller.map_ResourceOverlay); - drop_down_open = false; - } - } - } - - else if (resources_drop_down) - { - ddRect = new Rect(WindowRect.width - 290, 45, 120, 160); - GUI.Box(ddRect, ""); - for (int i = 0; i < loadedResources.Count; i++) - { - scrollR = GUI.BeginScrollView(ddRect, scrollR, new Rect(0, 0, 100, 20 * loadedResources.Count)); - Rect r = new Rect(2, 20 * i, 96, 20); - if (GUI.Button(r, loadedResources[i].Name, SCANcontroller.controller.resourceSelection == loadedResources[i].Name ? SCANskins.SCAN_dropDownButtonActive : SCANskins.SCAN_dropDownButton)) - { - bigmap.Resource = loadedResources[i]; - bigmap.Resource.CurrentBodyConfig(bigmap.Body.name); - - SCANcontroller.controller.resourceSelection = bigmap.Resource.Name; - - if (SCANcontroller.controller.map_ResourceOverlay) - bigmap.resetMap(SCANcontroller.controller.map_ResourceOverlay); - - drop_down_open = false; - } - GUI.EndScrollView(); - } - } - - else if (planetoid_drop_down) - { - int j = 0; - ddRect = new Rect(WindowRect.width - 130, 45, 100, 160); - GUI.Box(ddRect, ""); - for (int i = 0; i < SCANcontroller.controller.GetDataCount; i++) - { - scrollP = GUI.BeginScrollView(ddRect, scrollP, new Rect(0, 0, 80, (20 * SCANcontroller.controller.GetDataCount) + 1)); - - SCANdata dropDownData = SCANcontroller.controller.getData(i); - if (dropDownData != null) - { - Rect r = new Rect(2, 20 * j, 76, 20); - if (GUI.Button(r, dropDownData.Body.name, b.name == dropDownData.Body.name ? SCANskins.SCAN_dropDownButtonActive : SCANskins.SCAN_dropDownButton)) - { - data = dropDownData; - b = data.Body; - bigmap.setBody(data.Body); - bigmap.resetMap(SCANcontroller.controller.map_ResourceOverlay); - drop_down_open = false; - } - j++; - } - GUI.EndScrollView(); - } - } - - else - drop_down_open = false; - } - - } -} diff --git a/SCANsat/SCAN_UI/SCANmainMap.cs b/SCANsat/SCAN_UI/SCANmainMap.cs deleted file mode 100644 index cfb03ec23..000000000 --- a/SCANsat/SCAN_UI/SCANmainMap.cs +++ /dev/null @@ -1,479 +0,0 @@ -#region license -/* - * [Scientific Committee on Advanced Navigation] - * S.C.A.N. Satellite - * - * SCANsat - Main map window object - * - * Copyright (c)2013 damny; - * Copyright (c)2014 David Grandy ; - * Copyright (c)2014 technogeeky ; - * Copyright (c)2014 (Your Name Here) ; see LICENSE.txt for licensing details. - * - */ -#endregion - -using System.Text; -using SCANsat.SCAN_Platform; -using SCANsat.SCAN_Data; -using SCANsat.SCAN_UI.UI_Framework; -using UnityEngine; -using palette = SCANsat.SCAN_UI.UI_Framework.SCANpalette; - -namespace SCANsat.SCAN_UI -{ - class SCANmainMap: SCAN_MBW - { - private Vessel v; - private SCANdata data; - private SCANtype sensors; - private bool notMappingToday; //Unused out-of-power bool - private Rect mapRect; - private static bool showVesselInfo = true; - internal static readonly Rect defaultRect = new Rect(10, 55, 380, 230); - private static Rect sessionRect = defaultRect; - private bool flash; - private Texture2D map_small; - private Color32[] cols_height_map_small; - private Color32[] biomeCache; - private bool biomeBuilding; - private bool drawBiome; - private double[] biomeIndex = new double[360]; - private int scanline; - private int scanstep; - private StringBuilder vesselText; - private StringBuilder infoText; - - protected override void Awake() - { - base.Awake(); - - WindowCaption = "S.C.A.N. Planetary Mapping"; - WindowRect = sessionRect; - WindowOptions = new GUILayoutOption[2] { GUILayout.Width(380), GUILayout.Height(230) }; - WindowStyle = SCANskins.SCAN_window; - Visible = false; - DragEnabled = true; - TooltipMouseOffset = new Vector2d(-10, -25); - ClampToScreenOffset = new RectOffset(-300, -300, -200, -200); - infoText = new StringBuilder(); - vesselText = new StringBuilder(); - map_small = new Texture2D(360, 180, TextureFormat.ARGB32, false); - cols_height_map_small = new Color32[360]; - biomeCache = new Color32[360 * 180]; - - SCAN_SkinsLibrary.SetCurrent("SCAN_Unity"); - SCAN_SkinsLibrary.SetCurrentTooltip(); - } - - protected override void Start() - { - base.Start(); - - Visible = SCANcontroller.controller.mainMapVisible; - v = FlightGlobals.ActiveVessel; - data = SCANUtil.getData(v.mainBody); - if (data == null) - { - data = new SCANdata(v.mainBody); - SCANcontroller.controller.addToBodyData(v.mainBody, data); - } - TooltipsEnabled = SCANcontroller.controller.toolTips; - - if (palette.small_redline == null) - { - palette.small_redline = new Color32[360]; - for (int i = 0; i < 360; i++) - palette.small_redline[i] = palette.Red; - } - - resetImages(); - } - - protected override void DrawWindowPre(int id) - { - //Keep the map updated with the current vessel location and status - v = FlightGlobals.ActiveVessel; - data = SCANUtil.getData(v.mainBody); - if (data == null) - { - data = new SCANdata(v.mainBody); - SCANcontroller.controller.addToBodyData(v.mainBody, data); - } - sensors = SCANcontroller.controller.activeSensorsOnVessel(v.id); - } - - protected override void DrawWindow(int id) - { - versionLabel(id); /* Standard version label and close button */ - topMenu(id); - growS(); - mainMap(id); /* Draws the main map texture */ - growE(); - scannerInfo(id); /* Draws the scanner indicators */ - windowButtons(id); /* Draw the buttons for other SCANsat windows */ - stopE(); - fillS(-6); - vesselInfo(id); /* Shows info for any SCANsat vessels */ - stopS(); - } - - protected override void DrawWindowPost(int id) - { - sessionRect = WindowRect; - } - - //Print the version number - private void versionLabel(int id) - { - Rect r = new Rect(6, 0, 50, 18); - GUI.Label(r, SCANmainMenuLoader.SCANsatVersion, SCANskins.SCAN_whiteReadoutLabel); - } - - //Draw the top menu items - private void topMenu(int id) - { - Rect r = new Rect(WindowRect.width - 90, 2, 50, 18); - - if (GUI.Button(r, drawBiome ? "Biome" : "Terrain", SCANskins.SCAN_buttonBorderlessSmall)) - { - drawBiome = !drawBiome; - resetImages(); - } - r.x += 50; - r.y -= 2; - r.width = 18; - if (GUI.Button(r, showVesselInfo ? "-" : "+", SCANskins.SCAN_buttonBorderless)) - showVesselInfo = !showVesselInfo; - r.x += 20; - r.y += 1; - if (GUI.Button(r, SCANcontroller.controller.closeBox, SCANskins.SCAN_closeButton)) - { - Visible = false; - SCANcontroller.controller.mainMapVisible = Visible; - } - } - - //Draw the map texture - private void mainMap(int id) - { - mapRect = new Rect(10, 20, 360, 180); - GUI.DrawTexture(mapRect, drawBiome ? drawBiomeMap(sensors) : drawPartialMap(sensors)); - - if (data.MapBuilding || data.OverlayBuilding || data.ControllerBuilding) - { - flash = (int)(Time.realtimeSinceStartup % 2) == 0; - SCANuiUtil.drawLabel(new Rect(mapRect.x + 80, mapRect.y + 50, 200, 60), "Building Database...", SCANskins.SCAN_insColorLabel, true, SCANskins.SCAN_insColorLabelShadow, flash, SCANskins.SCAN_insWhiteLabel); - } - - GUILayout.Space(184); - } - - //Draw the active scanner display - private void scannerInfo(int id) - { - if (Event.current.type == EventType.Layout) - SCANuiUtil.InfoText(v, data, notMappingToday, ref infoText); - - SCANuiUtil.readableLabel(infoText.ToString(), false); - } - - //Draw the SCANsat window buttons with icons - private void windowButtons(int id) - { - if (GUILayout.Button(iconWithTT(SCANskins.SCAN_BigMapIcon, "Big Map"), SCANskins.SCAN_windowButton, GUILayout.Height(32), GUILayout.Width(32))) - { - SCANcontroller.controller.BigMap.Visible = !SCANcontroller.controller.BigMap.Visible; - SCANcontroller.controller.bigMapVisible = !SCANcontroller.controller.bigMapVisible; - } - if (GUILayout.Button(iconWithTT(SCANskins.SCAN_InstrumentIcon, "Instrument Window"), SCANskins.SCAN_windowButton, GUILayout.Height(32), GUILayout.Width(32))) - { - SCANcontroller.controller.instrumentsWindow.Visible = !SCANcontroller.controller.instrumentsWindow.Visible; - } - if (GUILayout.Button(iconWithTT(SCANskins.SCAN_ZoomMapIcon, "Zoom Map"), SCANskins.SCAN_windowButton, GUILayout.Height(32), GUILayout.Width(32))) - { - SCANcontroller.controller.zoomMap.Visible = !SCANcontroller.controller.zoomMap.Visible; - if (SCANcontroller.controller.zoomMap.Visible && !SCANcontroller.controller.zoomMap.Initialized) - SCANcontroller.controller.zoomMap.initializeMap(); - } - if (GUILayout.Button(iconWithTT(SCANskins.SCAN_OverlayIcon, "Overlay Contral"), SCANskins.SCAN_windowButton, GUILayout.Height(32), GUILayout.Width(32))) - { - SCANcontroller.controller.resourceOverlay.Visible = !SCANcontroller.controller.resourceOverlay.Visible; - } - if (GUILayout.Button(iconWithTT(SCANskins.SCAN_SettingsIcon, "Settings Menu"), SCANskins.SCAN_windowButton, GUILayout.Height(32), GUILayout.Width(32))) - { - SCANcontroller.controller.settingsWindow.Visible = !SCANcontroller.controller.settingsWindow.Visible; - } - } - - //Draw the vessel location and alt info - private void vesselInfo(int id) - { - if (!notMappingToday) - { - int count = 2; - vesselInfo(v, mapRect, 1, true); - - foreach (SCANcontroller.SCANvessel sV in SCANcontroller.controller.Known_Vessels) - { - if (sV.vessel == FlightGlobals.ActiveVessel) - continue; - if (sV.vessel.mainBody != v.mainBody) - continue; - - if (vesselInfo(sV.vessel, mapRect, count, false)) - count++; - } - } - } - - //Method to handle vessel info - private bool vesselInfo(Vessel scanV, Rect r, int i, bool b) - { - if (scanV == null) - return false; - - if (!showVesselInfo) - { - SCANuiUtil.drawVesselLabel(r, null, -1, scanV); - return true; - } - - float lon = (float)SCANUtil.fixLonShift(scanV.longitude); - float lat = (float)SCANUtil.fixLatShift(scanV.latitude); - - string units = ""; - if (drawBiome) - { - if (SCANUtil.isCovered(lon, lat, data, SCANtype.Biome)) - units = string.Format("; {0}", SCANUtil.getBiomeName(data.Body, lon, lat)); - } - else - { - if (SCANUtil.isCovered(lon, lat, data, SCANtype.Altimetry)) - { - if (SCANUtil.isCovered(lon, lat, data, SCANtype.AltimetryHiRes)) - { - float alt = scanV.heightFromTerrain; - if (alt < 0) - alt = (float)scanV.altitude; - units = string.Format("; {0}", SCANuiUtil.distanceString(alt, 100000, 100000000)); - } - else - { - float alt = scanV.heightFromTerrain; - if (alt < 0) - alt = (float)scanV.altitude; - - alt = ((int)(alt / 500)) * 500; - units = string.Format("; {0}", SCANuiUtil.distanceString(alt, 100000, 100000000)); - } - } - } - - vesselText.Length = 0; - vesselText.AppendFormat(string.Format("[{0}] {1} ({2:F1}°,{3:F1}°{4})", i, !string.IsNullOrEmpty(scanV.vesselName) && scanV.vesselName.Length > 26 ? scanV.vesselName.Substring(0, 26) : scanV.vesselName, lat, lon, units)); - - if (SCANuiUtil.readableLabel(vesselText.ToString(), b)) - { - if (Event.current.clickCount > 1) - { - Event.current.Use(); - FlightGlobals.SetActiveVessel(scanV); - ScreenMessages.PostScreenMessage(scanV.vesselName, 5, ScreenMessageStyle.UPPER_CENTER); - } - } - SCANuiUtil.drawVesselLabel(r, null, i, scanV); - fillS(-10); - return true; - } - - private Texture2D drawPartialMap(SCANtype type) - { - bool pqsController = data.Body.pqsController != null; - - if (data.ControllerBuilding || data.OverlayBuilding) - { - return map_small; - } - - if (!data.Built) - { - if (!data.MapBuilding) - { - scanline = 0; - scanstep = 0; - } - - data.MapBuilding = true; - data.generateHeightMap(ref scanline, ref scanstep, 360); - return map_small; - } - - int scheme = SCANcontroller.controller.colours; - - for (int ilon = 0; ilon < 360; ilon++) - { - if (!pqsController) - { - cols_height_map_small[ilon] = palette.lerp(palette.black, palette.white, UnityEngine.Random.value); - continue; - } - - Color32 c = palette.Grey; - float val = data.HeightMapValue(data.Body.flightGlobalsIndex, ilon, scanline); - if (SCANUtil.isCovered(ilon, scanline, data, SCANtype.Altimetry)) - { - if (SCANUtil.isCovered(ilon, scanline, data, SCANtype.AltimetryHiRes)) - c = palette.heightToColor(val, scheme, data.TerrainConfig); - else - c = palette.heightToColor(val, 1, data.TerrainConfig); - } - else - { - if (scanline % 30 == 0 && ilon % 3 == 0) - { - c = palette.White; - } - else if (ilon % 30 == 0 && scanline % 3 == 0) - { - c = palette.White; - } - } - - if (type != SCANtype.Nothing) - { - if (!SCANUtil.isCoveredByAll(ilon, scanline, data, type)) - { - c = palette.lerp(c, palette.Black, 0.5f); - } - } - - cols_height_map_small[ilon] = c; - } - - map_small.SetPixels32(0, scanline, 360, 1, cols_height_map_small); - - if (scanline < 179) - map_small.SetPixels32(0, scanline + 1, 360, 1, palette.small_redline); - - scanline++; - - if (scanline >= 180) - scanline = 0; - - map_small.Apply(); - - return map_small; - } - - private Texture2D drawBiomeMap(SCANtype type) - { - bool biomeMap = data.Body.BiomeMap != null; - - if (biomeBuilding) - buildBiomeCache(); - - int scheme = SCANcontroller.controller.colours; - - for (int ilon = 0; ilon < 360; ilon++) - { - if (!biomeMap) - { - cols_height_map_small[ilon] = palette.lerp(palette.black, palette.white, UnityEngine.Random.value); - continue; - } - - Color32 c = biomeCache[scanline * 360 + ilon]; - if (!SCANUtil.isCovered(ilon, scanline, data, SCANtype.Biome)) - { - c = palette.Grey; - } - - if (type != SCANtype.Nothing) - { - if (!SCANUtil.isCoveredByAll(ilon, scanline, data, type)) - { - c = palette.lerp(c, palette.Black, 0.5f); - } - } - - cols_height_map_small[ilon] = c; - } - - map_small.SetPixels32(0, scanline, 360, 1, cols_height_map_small); - - if (scanline < 179) - map_small.SetPixels32(0, scanline + 1, 360, 1, palette.small_redline); - - scanline++; - - if (scanline >= 180) - scanline = 0; - - map_small.Apply(); - - return map_small; - } - - private void buildBiomeCache() - { - for (int i = 0; i < 360; i++) - { - double index = SCANUtil.getBiomeIndexFraction(data.Body, i - 180, scanline - 90); - Color32 c = palette.Grey; - - if (SCANcontroller.controller.biomeBorder && ((i > 0 && biomeIndex[i - 1] != index) || (scanline > 0 && biomeIndex[i] != index))) - { - c = palette.White; - } - else if (SCANcontroller.controller.useStockBiomes) - { - c = SCANUtil.getBiome(data.Body, i - 180, scanline - 90).mapColor; - } - else - { - c = palette.lerp(SCANcontroller.controller.lowBiomeColor32, SCANcontroller.controller.highBiomeColor32, (float)index); - } - - biomeCache[scanline * 360 + i] = c; - - biomeIndex[i] = index; - } - - if (scanline >= 179) - biomeBuilding = false; - } - - public Texture2D Map - { - get { return map_small; } - } - - internal void resetImages() - { - // Just draw a simple grid to initialize the image; the map will appear on top of it - for (int y = 0; y < map_small.height; y++) - { - for (int x = 0; x < map_small.width; x++) - { - if ((x % 30 == 0 && y % 3 > 0) || (y % 30 == 0 && x % 3 > 0)) - { - map_small.SetPixel(x, y, palette.white); - } - else - { - map_small.SetPixel(x, y, palette.grey); - } - } - } - map_small.Apply(); - if (drawBiome) - { - biomeBuilding = true; - scanline = 0; - } - } - - } -} diff --git a/SCANsat/SCAN_UI/SCANoverlayController.cs b/SCANsat/SCAN_UI/SCANoverlayController.cs deleted file mode 100644 index eb07f423e..000000000 --- a/SCANsat/SCAN_UI/SCANoverlayController.cs +++ /dev/null @@ -1,740 +0,0 @@ -#region license -/* [Scientific Committee on Advanced Navigation] - * S.C.A.N. Satellite - * - * SCANoverlayController - Window to control the planetary overlay maps - * - * Copyright (c)2013 damny; - * Copyright (c)2014 technogeeky ; - * Copyright (c)2014 DMagic - * Copyright (c)2014 (Your Name Here) ; see LICENSE.txt for licensing details. - */ -#endregion - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using System.Threading; -using SCANsat.SCAN_Data; -using SCANsat.SCAN_UI.UI_Framework; -using SCANsat.SCAN_Platform; -using UnityEngine; -using palette = SCANsat.SCAN_UI.UI_Framework.SCANpalette; - -namespace SCANsat.SCAN_UI -{ - class SCANoverlayController : SCAN_MBW - { - internal static Rect defaultRect = new Rect(Screen.width - 320, 200, 175, 100); - private static Rect sessionRect = defaultRect; - private CelestialBody body; - private SCANdata data; - private SCANresourceGlobal currentResource; - private List resources; - //private List resourceFractions; - private bool drawOverlay; - private bool oldOverlay; - - private bool mapGenerating; - private int selection; - private double degreeOffset; - private bool enableUI = true; - private int mapStep, mapStart; - private bool bodyBiome, bodyPQS; - - private int timer; - //These are read/written on multiple threads; we use volatile to ensure that cached values are not used when reading the value - private volatile bool threadRunning, threadFinished; - private volatile bool terrainGenerated; - - private string tooltipText = ""; - - private Texture2D mapOverlay; - private Color32[] resourcePixels; - private Color32[] biomePixels; - private Color32[] terrainPixels; - private float[,] abundanceValues; - private float[,] terrainValues; - - protected override void Awake() - { - base.Awake(); - - WindowCaption = " S.C.A.N. Overlay"; - WindowRect = sessionRect; - if ((WindowRect.x * SCANcontroller.controller.windowScale) > (Screen.width - 100)) - WindowRect.x /= SCANcontroller.controller.windowScale; - WindowStyle = SCANskins.SCAN_window; - WindowOptions = new GUILayoutOption[2] { GUILayout.Width(175), GUILayout.Height(100) }; - Visible = false; - DragEnabled = true; - ClampToScreenOffset = new RectOffset(-120, -120, -100, -100); - - SCAN_SkinsLibrary.SetCurrent("SCAN_Unity"); - } - - protected override void Start() - { - GameEvents.onShowUI.Add(showUI); - GameEvents.onHideUI.Add(hideUI); - GameEvents.onGameSceneSwitchRequested.Add(switchScene); - - resources = SCANcontroller.setLoadedResourceList(); - - setBody(HighLogic.LoadedSceneIsFlight ? FlightGlobals.currentMainBody : Planetarium.fetch.Home); - } - - protected override void Update() - { - if ((MapView.MapIsEnabled && HighLogic.LoadedSceneIsFlight && FlightGlobals.ready) || HighLogic.LoadedScene == GameScenes.TRACKSTATION) - { - CelestialBody mapBody = SCANUtil.getTargetBody(MapView.MapCamera.target); - - if (mapBody == null) - return; - - if (mapBody != body) - setBody(mapBody); - } - else if (HighLogic.LoadedSceneIsFlight && FlightGlobals.ready) - { - if (body != FlightGlobals.currentMainBody) - setBody(FlightGlobals.currentMainBody); - } - } - - private void switchScene(GameEvents.FromToAction FT) - { - removeOverlay(); - } - - protected override void OnDestroy() - { - GameEvents.onShowUI.Remove(showUI); - GameEvents.onHideUI.Remove(hideUI); - GameEvents.onGameSceneSwitchRequested.Remove(switchScene); - - resourcePixels = null; - biomePixels = null; - terrainPixels = null; - abundanceValues = null; - terrainValues = null; - } - - public bool DrawOverlay - { - get { return drawOverlay; } - } - - protected override void DrawWindow(int id) - { - versionLabel(id); /* Standard version label and close button */ - closeBox(id); - - drawResourceList(id); - overlayToggle(id); - overlayOptions(id); - resourceSettings(id); - } - - protected override void DrawWindowPost(int id) - { - if (oldOverlay != drawOverlay) - { - oldOverlay = drawOverlay; - if (oldOverlay) - refreshMap(); - else - removeOverlay(); - } - - sessionRect = WindowRect; - } - - protected override void OnGUIEvery() - { - if (enableUI) - mouseOverToolTip(); - } - - //Draw the version label in the upper left corner - private void versionLabel(int id) - { - Rect r = new Rect(4, 0, 50, 18); - GUI.Label(r, SCANmainMenuLoader.SCANsatVersion, SCANskins.SCAN_whiteReadoutLabel); - } - - //Draw the close button in the upper right corner - private void closeBox(int id) - { - Rect r = new Rect(WindowRect.width - 20, 1, 18, 18); - if (GUI.Button(r, SCANcontroller.controller.closeBox, SCANskins.SCAN_closeButton)) - { - Visible = false; - } - } - - private void drawResourceList(int id) - { - for (int i = 0; i < resources.Count; i++) - { - SCANresourceGlobal r = resources[i]; - - if (r == null) - continue; - - if (GUILayout.Button(r.Name, selection == i ? SCANskins.SCAN_labelLeftActive : SCANskins.SCAN_labelLeft)) - { - if (mapGenerating || threadRunning) - return; - - removeOverlay(); - - if (selection != i) - { - selection = i; - currentResource = r; - currentResource.CurrentBodyConfig(body.name); - oldOverlay = drawOverlay = true; - refreshMap(); - return; - } - - if (drawOverlay) - { - oldOverlay = drawOverlay = false; - } - else - { - oldOverlay = drawOverlay = true; - refreshMap(); - } - } - } - - if (bodyBiome) - { - if (GUILayout.Button("Biome Map", selection == (resources.Count) ? SCANskins.SCAN_labelLeftActive : SCANskins.SCAN_labelLeft)) - { - if (mapGenerating || threadRunning) - return; - - removeOverlay(); - - if (selection != resources.Count) - { - selection = resources.Count; - oldOverlay = drawOverlay = true; - refreshMap(); - return; - } - - if (drawOverlay) - { - oldOverlay = drawOverlay = false; - } - else - { - oldOverlay = drawOverlay = true; - refreshMap(); - } - } - } - - if (bodyPQS) - { - if (GUILayout.Button("Terrain Map", selection == (resources.Count + 1) ? SCANskins.SCAN_labelLeftActive : SCANskins.SCAN_labelLeft)) - { - if (mapGenerating || threadRunning) - return; - - removeOverlay(); - - if (selection != resources.Count + 1) - { - selection = resources.Count + 1; - oldOverlay = drawOverlay = true; - refreshMap(); - return; - } - - if (drawOverlay) - { - oldOverlay = drawOverlay = false; - } - else - { - oldOverlay = drawOverlay = true; - refreshMap(); - } - } - } - - //if (GUILayout.Button("Slope Map", selection == (resources.Count + 2) ? SCANskins.SCAN_labelLeftActive : SCANskins.SCAN_labelLeft)) - //{ - // if (mapGenerating) - // return; - - // OverlayGenerator.Instance.ClearDisplay(); - - // if (selection != resources.Count + 2) - // { - // selection = resources.Count + 2; - // oldOverlay = drawOverlay = true; - // refreshMap(); - // return; - // } - - // if (drawOverlay) - // { - // oldOverlay = drawOverlay = false; - // } - // else - // { - // oldOverlay = drawOverlay = true; - // refreshMap(); - // } - //} - } - - private void overlayToggle(int id) - { - drawOverlay = GUILayout.Toggle(drawOverlay, "Draw Overlay", SCANskins.SCAN_settingsToggle); - } - - private void overlayOptions(int id) - { - if (!drawOverlay) - return; - - if (mapGenerating) - return; - - if (GUILayout.Button("Refresh")) - refreshMap(); - - if (selection >= resources.Count) - return; - } - - private void resourceSettings(int id) - { - fillS(); - - SCANcontroller.controller.planetaryOverlayTooltips = GUILayout.Toggle(SCANcontroller.controller.planetaryOverlayTooltips, "Tooltips", SCANskins.SCAN_settingsToggle); - - if (GUILayout.Button("Resource Settings")) - { - SCANcontroller.controller.resourceSettings.Visible = !SCANcontroller.controller.resourceSettings.Visible; - } - - //if (GUILayout.Button("Biome Summary")) - //{ - // foreach (ResourceCache.AbundanceSummary a in ResourceCache.Instance.AbundanceCache) - // { - // if (a.ResourceName == "Ore" && a.HarvestType == HarvestTypes.Planetary) - // SCANUtil.SCANlog("{0}: For {1} on Body {2} of scanner type {3}: Abundance = {4:P3}", a.ResourceName, a.BiomeName, a.BodyId, a.HarvestType, a.Abundance); - // } - //} - } - - private void removeOverlay() - { - OverlayGenerator.Instance.ClearDisplay(); - - if (mapOverlay != null) - Destroy(mapOverlay); - - mapOverlay = null; - } - - private void mouseOverToolTip() - { - if (!drawOverlay) - return; - - if (SCANcontroller.controller == null) - return; - - if (!SCANcontroller.controller.planetaryOverlayTooltips) - return; - - if ((MapView.MapIsEnabled && HighLogic.LoadedSceneIsFlight && FlightGlobals.ready) || HighLogic.LoadedScene == GameScenes.TRACKSTATION) - { - if (SCANUtil.MouseIsOverWindow()) - return; - - SCANUtil.SCANCoordinates coords = SCANUtil.GetMouseCoordinates(body); - - if (coords == null) - return; - - if (timer < 5) - { - timer++; - drawToolTipLabel(); - return; - } - - timer = 0; - tooltipText = ""; - - tooltipText += coords.ToDMS(); - - if (body.pqsController != null) - { - if (SCANUtil.isCovered(coords.longitude, coords.latitude, data, SCANtype.Altimetry)) - { - tooltipText += string.Format("\nTerrain: {0}", SCANuiUtil.getMouseOverElevation(coords.longitude, coords.latitude, data, 0)); - - tooltipText += string.Format("\nSlope: {0:F1}°", SCANUtil.slope(SCANUtil.getElevation(body, coords.longitude, coords.latitude), body, coords.longitude, coords.latitude, degreeOffset)); - } - } - - if (body.BiomeMap != null) - { - if (SCANUtil.isCovered(coords.longitude, coords.latitude, data, SCANtype.Biome)) - tooltipText += string.Format("\nBiome: {0}", SCANUtil.getBiomeName(body, coords.longitude, coords.latitude)); - } - - bool resources = false; - bool fuzzy = false; - - if (SCANUtil.isCovered(coords.longitude, coords.latitude, data, currentResource.SType)) - { - resources = true; - } - else if (SCANUtil.isCovered(coords.longitude, coords.latitude, data, SCANtype.FuzzyResources)) - { - resources = true; - fuzzy = true; - } - - if (resources) - { - tooltipText += "\n" + SCANuiUtil.getResourceAbundance(body, coords.latitude, coords.longitude, fuzzy, currentResource); - } - - drawToolTipLabel(); - } - } - - private void drawToolTipLabel() - { - Vector2 size = SCANskins.SCAN_readoutLabelCenter.CalcSize(new GUIContent(tooltipText)); - - float sizeX = size.x; - if (sizeX < 160) - sizeX = 160; - else if (sizeX < 190) - sizeX = 190; - - Rect r = new Rect(Event.current.mousePosition.x - (sizeX / 2), Event.current.mousePosition.y - (size.y + 16), sizeX + 10, size.y + 8); - - GUI.Box(r, ""); - - r.x += 5; - r.y += 4; - r.width -= 10; - r.height -= 8; - - SCANuiUtil.drawLabel(r, tooltipText, SCANskins.SCAN_readoutLabelCenter, true, SCANskins.SCAN_shadowReadoutLabelCenter); - } - - public void refreshMap(float t, int height, int interp, int biomeHeight) - { - SCANcontroller.controller.overlayTransparency = t; - SCANcontroller.controller.overlayMapHeight = height; - SCANcontroller.controller.overlayInterpolation = interp; - SCANcontroller.controller.overlayBiomeHeight = biomeHeight; - if (drawOverlay) - refreshMap(); - } - - private void refreshMap() - { - if (mapGenerating) - return; - if (threadRunning) - return; - - if (selection == resources.Count) - body.SetResourceMap(SCANuiUtil.drawBiomeMap(ref mapOverlay, ref biomePixels, data, SCANcontroller.controller.overlayTransparency, SCANcontroller.controller.overlayBiomeHeight)); - else if (selection == resources.Count + 1) - StartCoroutine(setTerrainMap()); - else if (selection == resources.Count + 2) - StartCoroutine(setSlopeMap()); - else - StartCoroutine(setOverlayMap()); - } - - private IEnumerator setOverlayMap() - { - int timer = 0; - - mapGenerating = true; - - SCANuiUtil.generateOverlayResourceValues(ref abundanceValues, SCANcontroller.controller.overlayMapHeight, data, currentResource, SCANcontroller.controller.overlayInterpolation); - - SCANdata copy = new SCANdata(data); - SCANresourceGlobal resourceCopy = new SCANresourceGlobal(currentResource); - resourceCopy.CurrentBodyConfig(body.name); - - Thread t = new Thread(() => resourceThreadRun(SCANcontroller.controller.overlayMapHeight, SCANcontroller.controller.overlayInterpolation, SCANcontroller.controller.overlayTransparency, new System.Random(ResourceScenario.Instance.gameSettings.Seed), copy, resourceCopy)); - threadRunning = true; - threadFinished = false; - t.Start(); - - while (threadRunning && timer < 1000) - { - timer++; - yield return null; - } - - mapGenerating = false; - copy = null; - resourceCopy = null; - - if (timer >= 1000) - { - Debug.LogError("[SCANsat] Something went wrong when drawing the SCANsat resource map overlay..."); - t.Abort(); - threadRunning = false; - yield break; - } - - if (!threadFinished) - { - Debug.LogError("[SCANsat] Something went wrong when drawing the SCANsat resource map overlay..."); - yield break; - } - - if (mapOverlay == null || mapOverlay.height != SCANcontroller.controller.overlayMapHeight) - mapOverlay = new Texture2D(SCANcontroller.controller.overlayMapHeight * 2, SCANcontroller.controller.overlayMapHeight, TextureFormat.ARGB32, true); - - mapOverlay.SetPixels32(resourcePixels); - mapOverlay.Apply(); - - body.SetResourceMap(mapOverlay); - } - - private void resourceThreadRun(int height, int step, float transparent, System.Random r, SCANdata copyData, SCANresourceGlobal copyResource) - { - try - { - SCANuiUtil.generateOverlayResourcePixels(ref resourcePixels, ref abundanceValues, height, copyData, copyResource, r, step, transparent); - threadFinished = true; - } - catch - { - threadFinished = false; - } - finally - { - threadRunning = false; - } - } - - private IEnumerator setTerrainMap() - { - if (data.Body.pqsController == null) - yield break; - - int timer = 0; - - while (!data.Built && timer < 2000) - { - mapGenerating = true; - if (!data.ControllerBuilding && !data.MapBuilding) - { - if (!data.OverlayBuilding) - { - mapStep = 0; - mapStart = 0; - } - - data.OverlayBuilding = true; - data.generateHeightMap(ref mapStep, ref mapStart, 360); - } - timer++; - yield return null; - } - - if (timer >= 2000) - { - mapGenerating = false; - yield break; - } - - timer = 0; - - SCANdata copy = new SCANdata(data); - int index = data.Body.flightGlobalsIndex; - - Thread t = new Thread( () => terrainThreadRun(copy, index)); - threadFinished = false; - threadRunning = true; - t.Start(); - - while (threadRunning && timer < 1000) - { - timer++; - yield return null; - } - - mapGenerating = false; - copy = null; - - if (timer >= 1000) - { - Debug.LogError("[SCANsat] Something went wrong when drawing the SCANsat terrain map overlay..."); - t.Abort(); - threadRunning = false; - yield break; - } - - if (!threadFinished) - { - Debug.LogError("[SCANsat] Something went wrong when drawing the SCANsat terrain map overlay..."); - yield break; - } - - if (mapOverlay == null) - mapOverlay = new Texture2D(1440, 720, TextureFormat.ARGB32, true); - - mapOverlay.SetPixels32(terrainPixels); - mapOverlay.Apply(); - - body.SetResourceMap(mapOverlay); - } - - private void terrainThreadRun(SCANdata copyData, int i) - { - try - { - if (!terrainGenerated) - { - SCANuiUtil.generateTerrainArray(ref terrainValues, 720, 4, copyData, i); - terrainGenerated = true; - } - - SCANuiUtil.drawTerrainMap(ref terrainPixels, ref terrainValues, copyData, 720, 4); - - threadFinished = true; - } - catch - { - threadFinished = false; - } - finally - { - threadRunning = false; - } - } - - private IEnumerator setSlopeMap() - { - if (data.Body.pqsController == null) - yield break; - - int timer = 0; - - while (!data.Built && timer < 2000) - { - mapGenerating = true; - if (!data.ControllerBuilding && !data.MapBuilding) - { - data.OverlayBuilding = true; - data.generateHeightMap(ref mapStep, ref mapStart, 360); - } - timer++; - yield return null; - } - - mapGenerating = false; - - if (timer >= 2000) - yield break; - - if (!terrainGenerated) - { - SCANuiUtil.generateTerrainArray(ref terrainValues, 720, 4, data, data.Body.flightGlobalsIndex); - terrainGenerated = true; - } - - body.SetResourceMap(SCANuiUtil.drawSlopeMap(ref mapOverlay, ref terrainPixels, ref terrainValues, data, 720, 4)); - } - - private void setBody(CelestialBody B) - { - body = B; - - data = SCANUtil.getData(body); - if (data == null) - { - data = new SCANdata(body); - SCANcontroller.controller.addToBodyData(body, data); - } - - if (currentResource == null) - { - if (resources.Count > 0) - { - currentResource = resources[0]; - currentResource.CurrentBodyConfig(body.name); - } - } - else - { - currentResource.CurrentBodyConfig(body.name); - } - - bodyBiome = body.BiomeMap != null; - bodyPQS = body.pqsController != null; - - terrainGenerated = false; - - if (drawOverlay) - refreshMap(); - - double circum = body.Radius * 2 * Math.PI; - double eqDistancePerDegree = circum / 360; - degreeOffset = 5 / eqDistancePerDegree; - - //resourceFractions = ResourceMap.Instance.GetResourceItemList(HarvestTypes.Planetary, body); - //if (resources.Count > 0) - //{ - // currentResource = resources[0]; - // currentResource.CurrentBodyConfig(body.name); - - // //foreach (SCANresourceGlobal r in resources) - // //{ - // // SCANresourceBody b = r.getBodyConfig(body.name, false); - // // if (b != null) - // // { - // // b.Fraction = resourceFractions.FirstOrDefault(a => a.resourceName == r.Name).fraction; - // // } - // //} - //} - } - - private double inc(double d) - { - if (d > 90) - d = 180 - d; - - return d; - } - - private void showUI() - { - enableUI = true; - } - - private void hideUI() - { - enableUI = false; - } - } -} diff --git a/SCANsat/SCAN_UI/SCANresourceSettings.cs b/SCANsat/SCAN_UI/SCANresourceSettings.cs deleted file mode 100644 index d1e6b8f02..000000000 --- a/SCANsat/SCAN_UI/SCANresourceSettings.cs +++ /dev/null @@ -1,536 +0,0 @@ -#region license -/* [Scientific Committee on Advanced Navigation] - * S.C.A.N. Satellite - * - * SCANresourceSettings - Window for resource scanning options - * - * Copyright (c)2013 damny; - * Copyright (c)2014 technogeeky ; - * Copyright (c)2014 DMagic - * Copyright (c)2014 (Your Name Here) ; see LICENSE.txt for licensing details. - */ -#endregion - -using System; -using SCANsat.SCAN_Data; -using SCANsat.SCAN_UI.UI_Framework; -using SCANsat.SCAN_Platform; -using UnityEngine; -using palette = SCANsat.SCAN_UI.UI_Framework.SCANpalette; - -namespace SCANsat.SCAN_UI -{ - class SCANresourceSettings : SCAN_MBW - { - internal readonly static Rect defaultRect = new Rect(300, 200, 300, 270); - private static Rect sessionRect = defaultRect; - private int mapHeight, biomeMapHeight; - private float transparency; - private int interpolationScale; - private bool popup, warningResource, warningStockResource, warningMMLoaded, controlLock, oldNarrowBand, oldStockScanThreshold, oldInstantScan, oldDisableScan; - private const string lockID = "resourceSettingLockID"; - private Rect warningRect; - private string scanThreshold = ""; - private static bool MMWarned = false; - - private string resourceSettingsHelpOverlayWindow = "Open the planetary overlay map control window."; - private string resourceSettingsHelpBiomeLock = "Circumvents the requirement for stock surface biome scans. SCANsat displays will show the full accuracy for resource abundance with or without any surface biome scans."; - private string resourceSettingsHelpInstant = "By default, the stock M700 resource scanner's orbital survey will fill in all SCANsat resource maps. This can be disabled, requiring standard SCANsat methods for all resource scanning. Disabled automatically when stock resource scanning is disabled."; - private string resourceSettingsHelpNarrowBand = "Numerous SCANsat functions require a Narrow-Band resource scanner on-board the current vessel or in orbit of a celestial body for fully accurate resource abundance data.\nDisable this to circumvent these restrictions."; - private string resourceSettingsHelpDisableStock = "Disables all stock resource scanning functions. SCANsat scanning methods will be required for all resource data. Replaces several stock resource functions with SCANsat tools. These include The right-click readouts, the high resolution narrow-band scanner map, and the planetary overlay maps."; - private string resourceSettingsHelpResetSCANsatResource = "Resets all SCANsat resource data for the current celestial body. Other SCANsat data is not affected.\nA confirmation window will open before activating.\nCannot be reversed."; - private string resourceSettingsHelpResetStockResource = "Resets the stock resource scanning coverage for the current celestial body. A reload or scene change may be required for all changes to take effect.\nA confirmation window will open before activating.\nCannot be reversed."; - private string resourceSettingsHelpOverlayInterpolation = "Change the number of resource abundance measurements used in constructing the planetary overlay and big map resource overlay. Decrease the value to increase the accuracy of the map. Lower values will result in slower map generation."; - private string resourceSettingsHelpOverlayHeight = "Change the texture size (map width is 2XHeight) used in constructing the planetary overlay and big map resource overlay. Increase the value to increase the quality and accuracy of the map. Higher values will result in slower map generation."; - private string resourceSettingsHelpOverlayBiomeHeight = "Change the texture size (map width is 2XHeight) used in constructing the planetary overlay biome map. Increase the value to increase the quality and accuracy of the map. Higher values will result in slower map generation."; - private string resourceSettingsHelpOverlayTransparency = "Create a grey background for planetary overlay resource maps. Used to make clear which sections of the celestial body have been\nscanned but contain no resources."; - private string resourceSettingsHelpScanThreshold = "A threshold level used to apply the stock resource scan to a celestial body after scanning with SCANsat sensors. This is useful when contracts or other addons require that a stock resource scan be performed. Set a value from 0-100 in the text box and click on the Set button. All celestial bodies will be checked immediately; celestial bodies will also be checked upon loading or a scene change. A reload may be required for the changes to take effect."; - private string MMwarning = "Warning:\nModule Manager is required for all SCANsat resource scanning"; - - protected override void Awake() - { - base.Awake(); - - WindowCaption = "S.C.A.N. Resources Settings"; - WindowRect = sessionRect; - WindowStyle = SCANskins.SCAN_window; - WindowOptions = new GUILayoutOption[2] { GUILayout.Width(300), GUILayout.Height(270) }; - Visible = false; - DragEnabled = true; - TooltipMouseOffset = new Vector2d(-10, -25); - TooltipMaxWidth = 350; - TooltipDisplayForSecs = 60; - ClampToScreenOffset = new RectOffset(-200, -200, -200, -200); - - SCAN_SkinsLibrary.SetCurrent("SCAN_Unity"); - } - - protected override void Start() - { - oldNarrowBand = SCANcontroller.controller.needsNarrowBand; - oldStockScanThreshold = SCANcontroller.controller.useScanThreshold; - oldInstantScan = SCANcontroller.controller.easyModeScanning; - oldDisableScan = SCANcontroller.controller.disableStockResource; - - biomeMapHeight = SCANcontroller.controller.overlayBiomeHeight; - mapHeight = SCANcontroller.controller.overlayMapHeight; - transparency = SCANcontroller.controller.overlayTransparency; - interpolationScale = SCANcontroller.controller.overlayInterpolation; - - scanThreshold = (SCANcontroller.controller.scanThreshold * 100f).ToString("F0"); - - TooltipsEnabled = false; - - if (SCANconfigLoader.languagePack != null) - loadStrings(); - } - - private void loadStrings() - { - resourceSettingsHelpOverlayWindow = SCANconfigLoader.languagePack.resourceSettingsHelpOverlayWindow; - resourceSettingsHelpBiomeLock = SCANconfigLoader.languagePack.resourceSettingsHelpBiomeLock; - resourceSettingsHelpInstant = SCANconfigLoader.languagePack.resourceSettingsHelpInstant; - resourceSettingsHelpNarrowBand = SCANconfigLoader.languagePack.resourceSettingsHelpNarrowBand; - resourceSettingsHelpDisableStock = SCANconfigLoader.languagePack.resourceSettingsHelpDisableStock; - resourceSettingsHelpResetSCANsatResource = SCANconfigLoader.languagePack.resourceSettingsHelpResetSCANsatResource; - resourceSettingsHelpResetStockResource = SCANconfigLoader.languagePack.resourceSettingsHelpResetStockResource; - resourceSettingsHelpOverlayInterpolation = SCANconfigLoader.languagePack.resourceSettingsHelpOverlayInterpolation; - resourceSettingsHelpOverlayHeight = SCANconfigLoader.languagePack.resourceSettingsHelpOverlayHeight; - resourceSettingsHelpOverlayBiomeHeight = SCANconfigLoader.languagePack.resourceSettingsHelpOverlayBiomeHeight; - resourceSettingsHelpOverlayTransparency = SCANconfigLoader.languagePack.resourceSettingsHelpOverlayTransparency; - resourceSettingsHelpScanThreshold = SCANconfigLoader.languagePack.resourceSettingsHelpScanThreshold; - MMwarning = SCANconfigLoader.languagePack.resourceSettingsModuleManagerWarning; - } - - internal void removeControlLocks() - { - InputLockManager.RemoveControlLock(lockID); - controlLock = false; - } - - protected override void DrawWindowPre(int id) - { - //Lock space center click through - if (HighLogic.LoadedScene == GameScenes.SPACECENTER) - { - Vector2 mousePos = Input.mousePosition; - mousePos.y = Screen.height - mousePos.y; - if (WindowRect.Contains(mousePos) && !controlLock) - { - InputLockManager.SetControlLock(ControlTypes.CAMERACONTROLS | ControlTypes.KSC_ALL, lockID); - controlLock = true; - } - else if (!WindowRect.Contains(mousePos) && controlLock) - { - removeControlLocks(); - } - } - - //Lock tracking scene click through - if (HighLogic.LoadedScene == GameScenes.TRACKSTATION) - { - Vector2 mousePos = Input.mousePosition; - mousePos.y = Screen.height - mousePos.y; - if (WindowRect.Contains(mousePos) && !controlLock) - { - InputLockManager.SetControlLock(ControlTypes.TRACKINGSTATION_UI, lockID); - controlLock = true; - } - else if (!WindowRect.Contains(mousePos) && controlLock) - { - InputLockManager.RemoveControlLock(lockID); - controlLock = false; - } - } - - if (!popup) - { - warningResource = false; - warningStockResource = false; - } - } - - protected override void DrawWindow(int id) - { - versionLabel(id); /* Standard version label and close button */ - closeBox(id); - - resourceController(id); - resourceSettings(id); - overlayOptions(id); - - warningBox(id); - } - - protected override void DrawWindowPost(int id) - { - if (popup && Event.current.type == EventType.mouseDown && !warningRect.Contains(Event.current.mousePosition)) - { - popup = false; - } - - if (!MMWarned && !SCANmainMenuLoader.MMLoaded) - { - if (oldInstantScan != SCANcontroller.controller.easyModeScanning) - { - oldInstantScan = SCANcontroller.controller.easyModeScanning; - MMWarned = true; - popup = !popup; - warningMMLoaded = !warningMMLoaded; - } - - if (oldDisableScan != SCANcontroller.controller.disableStockResource) - { - oldDisableScan = SCANcontroller.controller.disableStockResource; - MMWarned = true; - popup = !popup; - warningMMLoaded = !warningMMLoaded; - } - } - else - { - if (oldInstantScan != SCANcontroller.controller.easyModeScanning) - { - oldInstantScan = SCANcontroller.controller.easyModeScanning; - if (oldInstantScan) - { - for (int i = FlightGlobals.Bodies.Count - 1; i >= 0; i--) - { - CelestialBody b = FlightGlobals.Bodies[i]; - - SCANcontroller.controller.checkStockResourceScanStatus(b); - } - } - } - } - - if (oldNarrowBand != SCANcontroller.controller.needsNarrowBand) - { - oldNarrowBand = SCANcontroller.controller.needsNarrowBand; - if (SCANcontroller.controller.instrumentsWindow != null && oldNarrowBand) - SCANcontroller.controller.instrumentsWindow.resetResourceList(); - } - - if (oldStockScanThreshold != SCANcontroller.controller.useScanThreshold) - { - oldStockScanThreshold = SCANcontroller.controller.useScanThreshold; - if (oldStockScanThreshold) - { - for (int i = FlightGlobals.Bodies.Count - 1; i >= 0; i--) - { - CelestialBody b = FlightGlobals.Bodies[i]; - - SCANcontroller.controller.checkResourceScanStatus(b); - } - } - } - - sessionRect = WindowRect; - } - - //Draw the version label in the upper left corner - private void versionLabel(int id) - { - Rect r = new Rect(4, 0, 50, 18); - GUI.Label(r, SCANmainMenuLoader.SCANsatVersion, SCANskins.SCAN_whiteReadoutLabel); - } - - //Draw the close button in the upper right corner - private void closeBox(int id) - { - Rect r = new Rect(WindowRect.width - 42, 1, 18, 18); - if (GUI.Button(r, textWithTT("?", "Show Help Tips"), SCANskins.SCAN_closeButton)) - { - TooltipsEnabled = !TooltipsEnabled; - } - - r.x += 22; - if (GUI.Button(r, SCANcontroller.controller.closeBox, SCANskins.SCAN_closeButton)) - { - removeControlLocks(); - Visible = false; - TooltipsEnabled = false; - } - } - - private void resourceController(int id) - { - if (SCANcontroller.controller.resourceOverlay == null) - return; - - if (GUILayout.Button(textWithTT("Planetary Overlay Window", resourceSettingsHelpOverlayWindow))) - { - SCANcontroller.controller.resourceOverlay.Visible = !SCANcontroller.controller.resourceOverlay.Visible; - } - } - - private void resourceSettings(int id) - { - GUILayout.Label("Resource Settings", SCANskins.SCAN_headline); - growE(); - SCANcontroller.controller.resourceBiomeLock = GUILayout.Toggle(SCANcontroller.controller.resourceBiomeLock, textWithTT("Resource Biome Lock", resourceSettingsHelpBiomeLock), SCANskins.SCAN_settingsToggle); - if (SCANcontroller.controller.disableStockResource) - GUILayout.Toggle(false, textWithTT("Instant Resource Scan", resourceSettingsHelpInstant + "[Disabled]"), SCANskins.SCAN_settingsToggle); - else - SCANcontroller.controller.easyModeScanning = GUILayout.Toggle(SCANcontroller.controller.easyModeScanning, textWithTT("Instant Resource Scan", resourceSettingsHelpInstant), SCANskins.SCAN_settingsToggle); - stopE(); - growE(); - fillS(); - SCANcontroller.controller.needsNarrowBand = GUILayout.Toggle(SCANcontroller.controller.needsNarrowBand, textWithTT("Requires Narrow Band Scanner", resourceSettingsHelpNarrowBand), SCANskins.SCAN_settingsToggle); - fillS(); - stopE(); - growE(); - fillS(); - SCANcontroller.controller.disableStockResource = GUILayout.Toggle(SCANcontroller.controller.disableStockResource, textWithTT("Disable Stock Scanning", resourceSettingsHelpDisableStock), SCANskins.SCAN_settingsToggle); - fillS(); - stopE(); - if (SCANcontroller.controller.disableStockResource) - { - growE(); - fillS(20); - SCANcontroller.controller.useScanThreshold = GUILayout.Toggle(SCANcontroller.controller.useScanThreshold, textWithTT("Stock Scan Threshold: " + SCANcontroller.controller.scanThreshold.ToString("P0"), resourceSettingsHelpScanThreshold), SCANskins.SCAN_settingsToggle, GUILayout.Width(190)); - - if (SCANcontroller.controller.useScanThreshold) - { - scanThreshold = GUILayout.TextField(scanThreshold, 3, GUILayout.Width(40)); - - Rect r = GUILayoutUtility.GetLastRect(); - - GUI.Label(r, textWithTT("", resourceSettingsHelpScanThreshold)); - - if (GUILayout.Button(textWithTT("Set", resourceSettingsHelpScanThreshold), GUILayout.Width(45))) - { - float f = 0; - - if (float.TryParse(scanThreshold, out f)) - { - f /= 100; - - if (f <= 0f) - f = 0; - else if (f >= 1) - f = 1; - - SCANcontroller.controller.scanThreshold = f; - - for (int i = 0; i < FlightGlobals.Bodies.Count; i++) - { - CelestialBody b = FlightGlobals.Bodies[i]; - - SCANcontroller.controller.checkResourceScanStatus(b); - } - } - } - } - fillS(); - stopE(); - } - GUILayout.Label("Resource Scan Data", SCANskins.SCAN_headline); - if (popup) - { - GUILayout.Label("Reset SCANsat Resource Coverage", SCANskins.SCAN_button); - if (SCANcontroller.controller.disableStockResource) - { - fillS(8); - GUILayout.Label("Reset Stock Resource Scanning", SCANskins.SCAN_button); - } - } - else - { - if (GUILayout.Button(textWithTT("Reset SCANsat Resource Coverage", resourceSettingsHelpResetSCANsatResource))) - { - popup = !popup; - warningResource = !warningResource; - } - if (SCANcontroller.controller.disableStockResource) - { - fillS(8); - if (GUILayout.Button(textWithTT("Reset Stock Resource Scanning", resourceSettingsHelpResetStockResource))) - { - popup = !popup; - warningStockResource = !warningStockResource; - } - } - } - } - - private void overlayOptions(int id) - { - GUILayout.Label("Overlay Map Quality", SCANskins.SCAN_headline); - growE(); - GUILayout.Label(textWithTT("Interpolation:", resourceSettingsHelpOverlayInterpolation), SCANskins.SCAN_labelSmallLeft); - - fillS(); - - if (GUILayout.Button(textWithTT("-", resourceSettingsHelpOverlayInterpolation), SCANskins.SCAN_buttonSmall, GUILayout.Width(18))) - { - interpolationScale = Math.Max(2, interpolationScale / 2); - refreshMap(); - } - GUILayout.Label(textWithTT(interpolationScale.ToString(), resourceSettingsHelpOverlayInterpolation), SCANskins.SCAN_labelSmall, GUILayout.Width(36)); - if (GUILayout.Button(textWithTT("+", resourceSettingsHelpOverlayInterpolation), SCANskins.SCAN_buttonSmall, GUILayout.Width(18))) - { - interpolationScale = Math.Min(32, interpolationScale * 2); - refreshMap(); - } - stopE(); - - growE(); - GUILayout.Label(textWithTT("Map Height:", resourceSettingsHelpOverlayHeight), SCANskins.SCAN_labelSmallLeft); - - fillS(); - - if (GUILayout.Button(textWithTT("-", resourceSettingsHelpOverlayHeight), SCANskins.SCAN_buttonSmall, GUILayout.Width(18))) - { - mapHeight = Math.Max(64, mapHeight / 2); - refreshMap(); - } - GUILayout.Label(textWithTT(mapHeight.ToString(), resourceSettingsHelpOverlayHeight), SCANskins.SCAN_labelSmall, GUILayout.Width(36)); - if (GUILayout.Button(textWithTT("+", resourceSettingsHelpOverlayHeight), SCANskins.SCAN_buttonSmall, GUILayout.Width(18))) - { - mapHeight = Math.Min(1024, mapHeight * 2); - refreshMap(); - } - stopE(); - - growE(); - GUILayout.Label(textWithTT("Coverage Transparency:", resourceSettingsHelpOverlayTransparency), SCANskins.SCAN_labelSmallLeft); - - fillS(); - - if (GUILayout.Button(textWithTT("-", resourceSettingsHelpOverlayTransparency), SCANskins.SCAN_buttonSmall, GUILayout.Width(18))) - { - transparency = Mathf.Max(0f, transparency - 0.1f); - refreshMap(); - } - GUILayout.Label(textWithTT(transparency.ToString("P0"), resourceSettingsHelpOverlayTransparency), SCANskins.SCAN_labelSmall, GUILayout.Width(36)); - if (GUILayout.Button(textWithTT("+", resourceSettingsHelpOverlayTransparency), SCANskins.SCAN_buttonSmall, GUILayout.Width(18))) - { - transparency = Mathf.Min(1f, transparency + 0.1f); - refreshMap(); - } - stopE(); - - growE(); - GUILayout.Label(textWithTT("Biome Map Height:", resourceSettingsHelpOverlayBiomeHeight), SCANskins.SCAN_labelSmallLeft); - - fillS(); - - if (GUILayout.Button(textWithTT("-", resourceSettingsHelpOverlayBiomeHeight), SCANskins.SCAN_buttonSmall, GUILayout.Width(18))) - { - biomeMapHeight = Math.Max(256, biomeMapHeight / 2); - refreshMap(); - } - GUILayout.Label(textWithTT(biomeMapHeight.ToString(), resourceSettingsHelpOverlayBiomeHeight), SCANskins.SCAN_labelSmall, GUILayout.Width(36)); - if (GUILayout.Button(textWithTT("+", resourceSettingsHelpOverlayBiomeHeight), SCANskins.SCAN_buttonSmall, GUILayout.Width(18))) - { - biomeMapHeight = Math.Min(1024, biomeMapHeight * 2); - refreshMap(); - } - stopE(); - } - - //Confirmation boxes for map resets - private void warningBox(int id) - { - if (popup) - { - if (warningMMLoaded) - { - warningRect = new Rect(WindowRect.width - (WindowRect.width / 2) - 150, WindowRect.height - 125, 300, 115); - GUI.Box(warningRect, ""); - Rect r = new Rect(warningRect.x + 10, warningRect.y + 5, 280, 70); - GUI.Label(r, MMwarning, SCANskins.SCAN_headlineSmall); - r.x += 90; - r.y += 70; - r.width = 80; - r.height = 30; - if (GUI.Button(r, "OK", SCANskins.SCAN_buttonWarning)) - { - popup = false; - warningMMLoaded = false; - } - } - else if (warningResource) - { - CelestialBody thisBody = getTargetBody(); - - if (thisBody == null) - { - popup = false; - return; - } - warningRect = new Rect(WindowRect.width - (WindowRect.width / 2) - 150, WindowRect.height - 125, 300, 90); - GUI.Box(warningRect, ""); - Rect r = new Rect(warningRect.x + 10, warningRect.y + 5, 280, 40); - GUI.Label(r, "Erase SCANsat resource data for " + thisBody.theName + "?", SCANskins.SCAN_headlineSmall); - r.x += 90; - r.y += 45; - r.width = 80; - r.height = 30; - if (GUI.Button(r, "Confirm", SCANskins.SCAN_buttonWarning)) - { - popup = false; - warningResource = false; - SCANdata data = SCANUtil.getData(thisBody); - if (data != null) - data.resetResources(); - } - } - else if (warningStockResource) - { - CelestialBody thisBody = getTargetBody(); - - if (thisBody == null) - { - popup = false; - return; - } - - warningRect = new Rect(WindowRect.width - (WindowRect.width / 2) - 150, WindowRect.height - 125, 300, 110); - GUI.Box(warningRect, ""); - Rect r = new Rect(warningRect.x + 10, warningRect.y + 5, 280, 60); - GUI.Label(r, "Erase stock resource data for " + thisBody.theName + "?", SCANskins.SCAN_headlineSmall); - r.x += 90; - r.y += 65; - r.width = 80; - r.height = 30; - if (GUI.Button(r, "Confirm", SCANskins.SCAN_buttonWarning)) - { - popup = false; - warningStockResource = false; - var resources = ResourceScenario.Instance.gameSettings.GetPlanetScanInfo(); - resources.RemoveAll(a => a.PlanetId == thisBody.flightGlobalsIndex); - } - } - else - popup = false; - } - } - - private void refreshMap() - { - if (SCANcontroller.controller.resourceOverlay == null) - return; - - SCANcontroller.controller.resourceOverlay.refreshMap(transparency, mapHeight, interpolationScale, biomeMapHeight); - } - - private CelestialBody getTargetBody() - { - switch (HighLogic.LoadedScene) - { - case GameScenes.FLIGHT: - return FlightGlobals.currentMainBody; - case GameScenes.SPACECENTER: - return Planetarium.fetch.Home; - case GameScenes.TRACKSTATION: - return SCANUtil.getTargetBody(MapView.MapCamera.target); - default: - return null; - } - } - - - } -} diff --git a/SCANsat/SCAN_UI/SCANsatRPM.cs b/SCANsat/SCAN_UI/SCANsatRPM.cs index c387c7299..4efd8aed7 100644 --- a/SCANsat/SCAN_UI/SCANsatRPM.cs +++ b/SCANsat/SCAN_UI/SCANsatRPM.cs @@ -24,6 +24,7 @@ using SCANsat.SCAN_Data; using SCANsat.SCAN_PartModules; using SCANsat.SCAN_UI.UI_Framework; +using SCANsat.SCAN_Unity; namespace SCANsat.SCAN_UI { @@ -178,8 +179,6 @@ public bool MapRenderer(RenderTexture screen, float cameraAspect) mapMode = loadedMode ?? 0; int? loadedZoom = persist.RPMZoom; zoomLevel = loadedZoom ?? 0; - int? loadedColors = persist.RPMColor; - SCANcontroller.controller.colours = loadedColors ?? 0; if (SCANconfigLoader.GlobalResource) { @@ -188,7 +187,13 @@ public bool MapRenderer(RenderTexture screen, float cameraAspect) int? loadedResource = persist.RPMResource; currentResource = loadedResource ?? 0; - loadedResources[currentResource].CurrentBodyConfig(vessel.mainBody.name); + if (currentResource >= loadedResources.Count - 1) + currentResource = 0; + else if (currentResource < 0) + currentResource = 0; + + if (loadedResources.Count > 0) + loadedResources[currentResource].CurrentBodyConfig(vessel.mainBody.bodyName); } } @@ -497,13 +502,13 @@ private void DrawIcon(SCANwaypoint p, Color iconColor) { pos.x -= 8; pos.y -= 16; - SCANuiUtil.drawMapIconGL(pos, SCANskins.SCAN_WaypointIcon, iconColor, iconMaterial, iconColorShadowValue, true); + SCANuiUtil.drawMapIconGL(pos, SCAN_UI_Loader.WaypointIcon.texture, iconColor, iconMaterial, iconColorShadowValue, true); } else { pos.x -= 8; pos.y -= 8; - SCANuiUtil.drawMapIconGL(pos, SCANcontroller.controller.mechJebTargetSelection ? SCANskins.SCAN_MechJebIcon : SCANskins.SCAN_TargetIcon, iconColor, iconMaterial, iconColorShadowValue, true); + SCANuiUtil.drawMapIconGL(pos, SCAN_UI_Loader.MechJebIcon.texture, iconColor, iconMaterial, iconColorShadowValue, true); } } @@ -561,9 +566,9 @@ public void ButtonProcessor(int buttonID) } else if (buttonID == buttonEsc) { // Whatever possessed him to do THAT? - SCANcontroller.controller.colours = SCANcontroller.controller.colours == 0 ? 1 : 0; if (satModuleFound) - persist.RPMColor = SCANcontroller.controller.colours; + persist.RPMColor = !persist.RPMColor; + map.ColorMap = persist.RPMColor; RedrawMap(); } else if (buttonID == buttonHome) { @@ -689,6 +694,7 @@ private void RedrawMap() if (map == null) { map = new SCANmap(orbitingBody, false, mapSource.RPM); + map.ColorMap = persist.RPMColor; map.setProjection(MapProjection.Rectangular); } map.setBody(orbitingBody); @@ -700,10 +706,15 @@ private void RedrawMap() if (zoomLevel == 0) mapCenterLat = 0; map.centerAround(mapCenterLong, mapCenterLat); - if (SCANconfigLoader.GlobalResource) + if (SCANconfigLoader.GlobalResource && loadedResources.Count > 0) { + if (currentResource >= loadedResources.Count - 1) + currentResource = 0; + else if (currentResource < 0) + currentResource = 0; + map.Resource = loadedResources[currentResource]; - map.Resource.CurrentBodyConfig(orbitingBody.name); + map.Resource.CurrentBodyConfig(orbitingBody.bodyName); } calcTerrainLimits(orbitingBody); map.resetMap((mapType)mapMode, false, SCANconfigLoader.GlobalResource && resourceOverlay); @@ -924,8 +935,9 @@ public MapMarkupLine(ConfigNode node) internal class RPMPersistence { - internal int RPMMode, RPMColor, RPMZoom = 0; + internal int RPMMode, RPMZoom = 0; internal int RPMResource = 0; + internal bool RPMColor = true; internal bool RPMLines = true; internal bool RPMAnomaly = true; internal bool RPMDrawResource = true; @@ -936,7 +948,7 @@ internal RPMPersistence(string id) RPMID = id; } - internal RPMPersistence(string id, int mode, int color, int zoom, bool lines, bool anomaly, bool drawResource, int resource) + internal RPMPersistence(string id, int mode, bool color, int zoom, bool lines, bool anomaly, bool drawResource, int resource) { RPMID = id; RPMMode = mode; diff --git a/SCANsat/SCAN_UI/SCANsettingsUI.cs b/SCANsat/SCAN_UI/SCANsettingsUI.cs deleted file mode 100644 index 4b97c5113..000000000 --- a/SCANsat/SCAN_UI/SCANsettingsUI.cs +++ /dev/null @@ -1,628 +0,0 @@ -#region license -/* - * [Scientific Committee on Advanced Navigation] - * S.C.A.N. Satellite - * - * SCANsat - Settings menu window object - * - * Copyright (c)2013 damny; - * Copyright (c)2014 David Grandy ; - * Copyright (c)2014 technogeeky ; - * Copyright (c)2014 (Your Name Here) ; see LICENSE.txt for licensing details. - * - */ -#endregion - -using SCANsat.SCAN_Toolbar; -using SCANsat.SCAN_Data; -using SCANsat.SCAN_UI.UI_Framework; -using SCANsat.SCAN_Platform; -using SCANsat.SCAN_Platform.Palettes; -using UnityEngine; - -using palette = SCANsat.SCAN_UI.UI_Framework.SCANpalette; - -namespace SCANsat.SCAN_UI -{ - class SCANsettingsUI: SCAN_MBW - { - private string settingsHelpAnomalies = "Select the marker used to display\nanomalies on the map."; - private string settingsHelpScanningToggle = "Toggle all SCANsat scanning."; - private string settingsHelpBackground = "Toggle background scanning on\nselected celestial bodies."; - private string settingsHelpTimeWarp = "Adjust the scanning frequency during TimeWarp.\nHigher settings result in fewer gaps in the maps but may have a performance impact at high TimeWarp."; - private string settingsHelpGroundTracks = "Display a visible indicator of\nscanning activity in map mode."; - private string settingsHelpGroundTracksActive = "The ground track indicator can be limited to only be displayed for the active vessel."; - private string settingsHelpOverlayTooltips = "Displays tooltips for the current mouse position when a planetary overlay map is activated. These tooltips include The cursor coordinates, terrain height, slope, biome name, and resource abundance, depending on scanning coverage."; - private string settingsHelpWindowTooltips = "Display tooltips on some map window buttons. These are primarily used to identify icon buttons."; - private string settingsHelpStockToolbar = "Use the stock toolbar.\nOnly one stock button is available. Can be used concurrently with the Blizzy78 Toolbar."; - private string settingsHelpMechJeb = "The SCANsat zoom map target selection mode can be used to select a MechJeb landing site."; - private string settingsHelpResetWindows = "Reset all window positions and scale. Use this in case a window has been dragged completely off screen or if any windows are not visible."; - private string settingsHelpResetPlanetData = "Resets all SCANsat data for the current celestial body.\nA confirmation window will open before activating.\nCannot be reversed."; - private string settingsHelpResetAllData = "Resets all SCANsat data for all celestial bodies. \nA confirmation window will open before activating.\nCannot be reversed."; - private string settingsHelpVessels = "Information about the currently active SCANsat sensors. Vessels indicates the number of vessels with active sensors. Sensors indicates the total number of sensors; instruments with multiple sensor types count each individual sensor. Passes indicates the number of sensor updates performed per second.\nThis value is affected by the\nTimeWarp Resolution setting."; - private string settingsHelpGreyScale = "Use a true grey-scale color spectrum for black-and-white SCANsat maps. Pixels on the altitude map will interpolate between black and white; the min and max terrain heights for each celestial body\ndefine the limits."; - private string settingsHelpExportCSV = "Export a .csv file along with map texture when using the Export button on the big map. The file contains coordinates and the terrain height for each pixel. Pixels are labeled from left to right\nand from top to bottom."; - private string settingsHelpSetMapWidth = "Enter an exact value for the SCANsat big map texture width. Values are limited to 550 - 8192 pixels wide. Press the Set button to apply the value."; - private string settingsHelpWindowScale = "Adjust all SCANsat window scales; buttons adjust scale in increments of 5%."; - - /* UI: a list of glyphs that are used for something */ - private string[] exmarks = { "✗", "✘", "×", "✖", "x", "X", "∇", "☉", "★", "*", "•", "º", "+" }; - - /* UI: time warp names and settings */ - private string[] twnames = { "Off", "Low", "Medium", "High" }; - private int[] twvals = { 1, 6, 9, 15 }; - private bool popup, warningBoxOne, warningBoxAll, controlLock; - private Rect warningRect; - private const string lockID = "settingLockID"; - private bool oldTooltips, stockToolbar; - private string exportSize = ""; - - internal readonly static Rect defaultRect = new Rect(Screen.width - (Screen.width / 2) - 180, 100, 360, 300); - - protected override void Awake() - { - base.Awake(); - - WindowCaption = "S.C.A.N. Settings"; - WindowRect = defaultRect; - WindowStyle = SCANskins.SCAN_window; - WindowOptions = new GUILayoutOption[2] { GUILayout.Width(360), GUILayout.Height(300) }; - Visible = false; - DragEnabled = true; - TooltipMouseOffset = new Vector2d(-10, -25); - TooltipMaxWidth = 350; - TooltipDisplayForSecs = 60; - ClampToScreenOffset = new RectOffset(-280, -280, -600, -600); - - SCAN_SkinsLibrary.SetCurrent("SCAN_Unity"); - - removeControlLocks(); - } - - protected override void OnDestroy() - { - removeControlLocks(); - TooltipsEnabled = false; - } - - internal void removeControlLocks() - { - InputLockManager.RemoveControlLock(lockID); - controlLock = false; - } - - protected override void Start() - { - oldTooltips = SCANcontroller.controller.toolTips; - TooltipsEnabled = false; - stockToolbar = SCANcontroller.controller.useStockAppLauncher; - - if (SCANconfigLoader.languagePack != null) - loadStrings(); - } - - private void loadStrings() - { - settingsHelpAnomalies = SCANconfigLoader.languagePack.settingsHelpAnomalies; - settingsHelpScanningToggle = SCANconfigLoader.languagePack.settingsHelpScanningToggle; - settingsHelpBackground = SCANconfigLoader.languagePack.settingsHelpBackground; - settingsHelpTimeWarp = SCANconfigLoader.languagePack.settingsHelpTimeWarp; - settingsHelpGroundTracks = SCANconfigLoader.languagePack.settingsHelpGroundTracks; - settingsHelpGroundTracksActive = SCANconfigLoader.languagePack.settingsHelpGroundTracksActive; - settingsHelpOverlayTooltips = SCANconfigLoader.languagePack.settingsHelpOverlayTooltips; - settingsHelpWindowTooltips = SCANconfigLoader.languagePack.settingsHelpWindowTooltips; - settingsHelpStockToolbar = SCANconfigLoader.languagePack.settingsHelpStockToolbar; - settingsHelpMechJeb = SCANconfigLoader.languagePack.settingsHelpMechJeb; - settingsHelpResetWindows = SCANconfigLoader.languagePack.settingsHelpResetWindows; - settingsHelpResetPlanetData = SCANconfigLoader.languagePack.settingsHelpResetPlanetData; - settingsHelpResetAllData = SCANconfigLoader.languagePack.settingsHelpResetAllData; - settingsHelpVessels = SCANconfigLoader.languagePack.settingsHelpVesselsSensorsPasses; - settingsHelpGreyScale = SCANconfigLoader.languagePack.settingsHelpGreyScale; - settingsHelpExportCSV = SCANconfigLoader.languagePack.settingsHelpExportCSV; - settingsHelpSetMapWidth = SCANconfigLoader.languagePack.settingsHelpSetMapWidth; - settingsHelpWindowScale = SCANconfigLoader.languagePack.settingsHelpWindowScale; - } - - protected override void DrawWindowPre(int id) - { - //Lock space center click through - if (HighLogic.LoadedScene == GameScenes.SPACECENTER) - { - Vector2 mousePos = Input.mousePosition; - mousePos.y = Screen.height - mousePos.y; - if (WindowRect.Contains(mousePos) && !controlLock) - { - InputLockManager.SetControlLock(ControlTypes.CAMERACONTROLS | ControlTypes.KSC_ALL, lockID); - controlLock = true; - } - else if (!WindowRect.Contains(mousePos) && controlLock) - { - removeControlLocks(); - } - } - - //Lock tracking scene click through - if (HighLogic.LoadedScene == GameScenes.TRACKSTATION) - { - Vector2 mousePos = Input.mousePosition; - mousePos.y = Screen.height - mousePos.y; - if (WindowRect.Contains(mousePos) && !controlLock) - { - InputLockManager.SetControlLock(ControlTypes.TRACKINGSTATION_UI, lockID); - controlLock = true; - } - else if (!WindowRect.Contains(mousePos) && controlLock) - { - InputLockManager.RemoveControlLock(lockID); - controlLock = false; - } - } - - if (!popup) - { - warningBoxOne = false; - warningBoxAll = false; - } - } - - protected override void DrawWindow(int id) - { - versionLabel(id); /* Standard version label and close button */ - closeBox(id); - - growS(); - gui_settings_resources(id); /* resource scanning options */ - gui_settings_xmarks(id); /* X marker selection */ - gui_settings_toggle_body_scanning(id); /* background and body scanning toggles */ - gui_settings_timewarp(id); /* time warp resolution settings */ - gui_settings_numbers(id); /* sensor/scanning statistics */ - gui_settings_window_resets_tooltips(id);/* reset windows and positions and toggle tooltips*/ - gui_settings_export_options(id); - gui_settings_data_resets(id); /* reset data and/or reset resources */ - if (SCANconfigLoader.SCANNode.CheatMapFill) - gui_settings_window_mapFill(id); /* debug option to fill in maps */ - stopS(); - - warningBox(id); /* Warning box for deleting map data */ - } - - protected override void DrawWindowPost(int id) - { - if (popup && Event.current.type == EventType.mouseDown && !warningRect.Contains(Event.current.mousePosition)) - { - popup = false; - } - - if (oldTooltips != SCANcontroller.controller.toolTips) - { - oldTooltips = SCANcontroller.controller.toolTips; - TooltipsEnabled = SCANcontroller.controller.toolTips; - if (HighLogic.LoadedSceneIsFlight) - { - SCANcontroller.controller.BigMap.TooltipsEnabled = SCANcontroller.controller.toolTips; - SCANcontroller.controller.mainMap.TooltipsEnabled = SCANcontroller.controller.toolTips; - SCANcontroller.controller.zoomMap.TooltipsEnabled = SCANcontroller.controller.toolTips; - } - if (HighLogic.LoadedScene == GameScenes.SPACECENTER || HighLogic.LoadedScene == GameScenes.TRACKSTATION) - { - SCANcontroller.controller.kscMap.TooltipsEnabled = SCANcontroller.controller.toolTips; - if (SCANcontroller.controller.kscMap.spotMap != null) - SCANcontroller.controller.kscMap.spotMap.TooltipsEnabled = SCANcontroller.controller.toolTips; - } - } - - if (stockToolbar != SCANcontroller.controller.useStockAppLauncher) - { - stockToolbar = SCANcontroller.controller.useStockAppLauncher; - if (stockToolbar) - SCANcontroller.controller.appLauncher = gameObject.AddComponent(); - else - { - Destroy(SCANcontroller.controller.appLauncher); - SCANcontroller.controller.appLauncher = null; - } - } - } - - //Draw the version label in the upper left corner - private void versionLabel(int id) - { - Rect r = new Rect(6, 0, 50, 18); - GUI.Label(r, SCANmainMenuLoader.SCANsatVersion, SCANskins.SCAN_whiteReadoutLabel); - } - - //Draw the close button in the upper right corner - private void closeBox(int id) - { - Rect r = new Rect(WindowRect.width - 42, 1, 18, 18); - if (GUI.Button(r, textWithTT("?", "Show Help Tips"), SCANskins.SCAN_closeButton)) - { - TooltipsEnabled = !TooltipsEnabled; - } - - r.x += 22; - - if (GUI.Button(r, SCANcontroller.controller.closeBox, SCANskins.SCAN_closeButton)) - { - removeControlLocks(); - Visible = false; - TooltipsEnabled = false; - } - } - - //Choose anomaly marker icon - private void gui_settings_xmarks(int id) - { - fillS(8); - GUILayout.Label(textWithTT("Anomaly Marker", settingsHelpAnomalies), SCANskins.SCAN_headline); - growE(); - for (int i = 0; i < exmarks.Length; ++i) - { - if (SCANcontroller.controller.anomalyMarker == exmarks[i]) - { - if (GUILayout.Button(textWithTT(exmarks[i], settingsHelpAnomalies), SCANskins.SCAN_closeButton)) - SCANcontroller.controller.anomalyMarker = exmarks[i]; - } - else - { - if (GUILayout.Button(textWithTT(exmarks[i], settingsHelpAnomalies), SCANskins.SCAN_buttonBorderless)) - SCANcontroller.controller.anomalyMarker = exmarks[i]; - } - } - stopE(); - fillS(16); - } - - //Control background scanning options - private void gui_settings_toggle_body_scanning(int id) - { - - GUILayout.Label(textWithTT("Background Scanning", settingsHelpBackground), SCANskins.SCAN_headline); - // scan background - SCANcontroller.controller.scan_background = GUILayout.Toggle(SCANcontroller.controller.scan_background, textWithTT("All scanning active", settingsHelpScanningToggle), SCANskins.SCAN_settingsToggle); - // scanning for individual SoIs - growE(); - int count = 0; - foreach (SCANdata data in SCANcontroller.controller.GetAllData) - { - if (count == 0) growS(); - data.Disabled = !GUILayout.Toggle(!data.Disabled, textWithTT(string.Format("{0} ({1:N1}%)", data.Body.name, SCANUtil.getCoveragePercentage(data, SCANtype.Nothing)), settingsHelpBackground), SCANskins.SCAN_settingsToggle); - switch (count) - { - case 5: stopS(); count = 0; break; - default: ++count; break; - } - } - if (count != 0) - stopS(); ; - stopE(); - } - - //Control scanning resolution - private void gui_settings_timewarp(int id) - { - GUILayout.Label(textWithTT("Time Warp Resolution", settingsHelpTimeWarp), SCANskins.SCAN_headline); - growE(); - - for (int i = 0; i < twnames.Length; ++i) - { - if (SCANcontroller.controller.timeWarpResolution == twvals[i]) - { - if (GUILayout.Button(textWithTT(twnames[i], settingsHelpTimeWarp), SCANskins.SCAN_buttonActive)) - SCANcontroller.controller.timeWarpResolution = twvals[i]; - } - else - { - if (GUILayout.Button(textWithTT(twnames[i], settingsHelpTimeWarp))) - SCANcontroller.controller.timeWarpResolution = twvals[i]; - } - } - stopE(); - fillS(8); - } - - //Display the total number of SCANsat sensors and scanning passes - /* Needs to be clarified for users */ - private void gui_settings_numbers(int id) - { - string s = "Vessels: " + SCANcontroller.controller.ActiveVessels.ToString() + - " Sensors: " + SCANcontroller.controller.ActiveSensors + - " Passes: " + SCANcontroller.controller.ActualPasses.ToString(); - GUILayout.Label(textWithTT(s, settingsHelpVessels), SCANskins.SCAN_whiteReadoutLabel); - fillS(16); - } - - //Export options - private void gui_settings_export_options(int id) - { - GUILayout.Label("Export Options", SCANskins.SCAN_headline); - - if (HighLogic.LoadedSceneIsFlight) - { - growE(); - fillS(); - GUILayout.Label(textWithTT("Map Width: " + SCANcontroller.controller.map_width, settingsHelpSetMapWidth), SCANskins.SCAN_settingsGreyLabel, GUILayout.Width(110)); - - exportSize = GUILayout.TextField(exportSize, 4, GUILayout.Width(75)); - - Rect r = GUILayoutUtility.GetLastRect(); - - GUI.Label(r, textWithTT("", settingsHelpSetMapWidth)); - - if (GUILayout.Button(textWithTT("Set", settingsHelpSetMapWidth), GUILayout.Width(50))) - { - if (SCANcontroller.controller.BigMap == null) - return; - - int i = 0; - - if (int.TryParse(exportSize, out i)) - { - if (i <= SCANcontroller.controller.BigMap._WindowSize_Min.x) - i = (int)SCANcontroller.controller.BigMap._WindowSize_Min.x; - else if (i > SCANcontroller.controller.BigMap._WindowSize_Max.x) - i = (int)SCANcontroller.controller.BigMap._WindowSize_Max.x; - - if (i % 2 != 0) - i += 1; - - SCANcontroller.controller.BigMap.setMapWidth(i); - } - } - fillS(); - stopE(); - } - - growE(); - SCANcontroller.controller.trueGreyScale = GUILayout.Toggle(SCANcontroller.controller.trueGreyScale, textWithTT("Use True Grey Scale", settingsHelpGreyScale), SCANskins.SCAN_settingsToggle); - - SCANcontroller.controller.exportCSV = GUILayout.Toggle(SCANcontroller.controller.exportCSV, textWithTT("Export .csv Data File", settingsHelpExportCSV), SCANskins.SCAN_settingsToggle); - stopE(); - } - - //Reset databases - private void gui_settings_data_resets(int id) - { - CelestialBody thisBody = getTargetBody(); - - if (thisBody == null) - return; - - GUILayout.Label("Data Management", SCANskins.SCAN_headline); - growE(); - if (popup) - { - GUILayout.Label("Reset map of " + thisBody.theName, SCANskins.SCAN_button); - GUILayout.Label("Reset all data", SCANskins.SCAN_button); - } - else - { - if (GUILayout.Button(textWithTT("Reset map of " + thisBody.theName, settingsHelpResetPlanetData))) - { - popup = !popup; - warningBoxOne = !warningBoxOne; - } - if (GUILayout.Button(textWithTT("Reset all data", settingsHelpResetAllData))) - { - popup = !popup; - warningBoxAll = !warningBoxAll; - } - } - stopE(); - fillS(8); - } - - //Resets all window positions, tooltip toggle - private void gui_settings_window_resets_tooltips(int id) - { - GUILayout.Label("Settings", SCANskins.SCAN_headline); - growE(); - SCANcontroller.controller.groundTracks = GUILayout.Toggle(SCANcontroller.controller.groundTracks, textWithTT("Show Ground Tracks", settingsHelpGroundTracks), SCANskins.SCAN_settingsToggle); - - if (SCANcontroller.controller.groundTracks) - SCANcontroller.controller.groundTrackActiveOnly = GUILayout.Toggle(SCANcontroller.controller.groundTrackActiveOnly, textWithTT("Active Vessel Only", settingsHelpGroundTracksActive), SCANskins.SCAN_settingsToggle); - stopE(); - growE(); - SCANcontroller.controller.planetaryOverlayTooltips = GUILayout.Toggle(SCANcontroller.controller.planetaryOverlayTooltips, textWithTT("Planetary Overlay Tooltips", settingsHelpOverlayTooltips), SCANskins.SCAN_settingsToggle); - - SCANcontroller.controller.toolTips = GUILayout.Toggle(SCANcontroller.controller.toolTips, textWithTT("Window Tooltips", settingsHelpWindowTooltips), SCANskins.SCAN_settingsToggle); - stopE(); - growE(); - SCANcontroller.controller.useStockAppLauncher = GUILayout.Toggle(SCANcontroller.controller.useStockAppLauncher, textWithTT("Stock Toolbar", settingsHelpStockToolbar), SCANskins.SCAN_settingsToggle); - - if (SCANmainMenuLoader.MechJebLoaded) - SCANcontroller.controller.mechJebTargetSelection = GUILayout.Toggle(SCANcontroller.controller.mechJebTargetSelection, textWithTT("MechJeb Target Selection", settingsHelpMechJeb), SCANskins.SCAN_settingsToggle); - stopE(); - growE(); - fillS(); - GUILayout.Label(textWithTT("Window Scale: " + SCANcontroller.controller.windowScale.ToString("P0"), settingsHelpWindowScale), SCANskins.SCAN_settingsGreyLabel, GUILayout.Width(150)); - - if (popup) - { - GUILayout.Label("Size -", SCANskins.SCAN_button, GUILayout.Width(60)); - - fillS(10); - - GUILayout.Label("Size +", SCANskins.SCAN_button, GUILayout.Width(60)); - } - else - { - if (GUILayout.Button(textWithTT("Size -", settingsHelpWindowScale), GUILayout.Width(60))) - { - if (SCANcontroller.controller.windowScale > 0.7f) - SCANcontroller.controller.windowScale -= 0.05f; - } - - fillS(10); - - if (GUILayout.Button(textWithTT("Size +", settingsHelpWindowScale), GUILayout.Width(60))) - { - if (SCANcontroller.controller.windowScale < 2f) - SCANcontroller.controller.windowScale += 0.05f; - } - } - fillS(); - stopE(); - fillS(8); - if (popup) - { - GUILayout.Label("Reset window positions", SCANskins.SCAN_button); - } - else - { - if (GUILayout.Button(textWithTT("Reset window positions", settingsHelpResetWindows))) - { - SCANcontroller.controller.windowScale = 1f; - - if (HighLogic.LoadedSceneIsFlight) - { - SCANuiUtil.resetMainMapPos(); - SCANuiUtil.resetBigMapPos(); - SCANuiUtil.resetInstUIPos(); - SCANuiUtil.resetSettingsUIPos(); - SCANuiUtil.resetColorMapPos(); - SCANuiUtil.resetResourceSettingPos(); - SCANuiUtil.resetOverlayControllerPos(); - SCANuiUtil.resetZoomMapPos(); - //SCANuiUtil.resetHiDefMapPos(); - } - else - { - SCANuiUtil.resetKSCMapPos(); - SCANuiUtil.resetColorMapPos(); - SCANuiUtil.resetSettingsUIPos(); - SCANuiUtil.resetResourceSettingPos(); - SCANuiUtil.resetZoomMapPos(); - if (HighLogic.LoadedScene == GameScenes.TRACKSTATION) - SCANuiUtil.resetOverlayControllerPos(); - } - } - } - fillS(8); - } - - private void gui_settings_resources(int id) - { - if (SCANcontroller.controller.resourceSettings == null) - return; - - if (GUILayout.Button("Resource Settings Window")) - { - SCANcontroller.controller.resourceSettings.Visible = !SCANcontroller.controller.resourceSettings.Visible; - } - - if (GUILayout.Button("Color Management Window")) - { - SCANcontroller.controller.colorManager.Visible = !SCANcontroller.controller.colorManager.Visible; - } - } - - //Debugging option to fill in SCAN maps - private void gui_settings_window_mapFill(int id) - { - growE(); - CelestialBody thisBody = getTargetBody(); - - if (thisBody == null) - return; - if (GUILayout.Button("Fill SCAN map of " + thisBody.theName)) - { - SCANdata data = SCANUtil.getData(thisBody); - if (data == null) - { - data = new SCANdata(thisBody); - SCANcontroller.controller.addToBodyData(thisBody, data); - } - data.fillMap(); - } - if (GUILayout.Button("Fill SCAN map for all planets")) - { - foreach (CelestialBody b in FlightGlobals.Bodies) - { - SCANdata data = SCANUtil.getData(b); - if (data == null) - { - data = new SCANdata(b); - SCANcontroller.controller.addToBodyData(b, data); - } - data.fillMap(); - } - } - stopE(); - fillS(8); - } - - //Confirmation boxes for map resets - private void warningBox(int id) - { - if (popup) - { - if (warningBoxOne) - { - CelestialBody thisBody = getTargetBody(); - - if (thisBody == null) - { - popup = false; - return; - } - - warningRect = new Rect(WindowRect.width - (WindowRect.width / 2) - 150, WindowRect.height - 125, 300, 90); - GUI.Box(warningRect, ""); - Rect r = new Rect(warningRect.x + 10, warningRect.y + 5, 280, 40); - GUI.Label(r, "Erase all data for " + thisBody.theName + "?", SCANskins.SCAN_headlineSmall); - r.x += 90; - r.y += 45; - r.width = 80; - r.height = 30; - if (GUI.Button(r, "Confirm", SCANskins.SCAN_buttonWarning)) - { - popup = false; - warningBoxOne = false; - SCANdata data = SCANUtil.getData(thisBody); - if (data != null) - data.reset(); - } - } - else if (warningBoxAll) - { - warningRect = new Rect(WindowRect.width - (WindowRect.width / 2) - 120, WindowRect.height - 160, 240, 90); - GUI.Box(warningRect, ""); - Rect r = new Rect(warningRect.x + 10, warningRect.y + 5, 220, 40); - GUI.Label(r, "Erase all data ?", SCANskins.SCAN_headlineSmall); - r.x += 70; - r.y += 45; - r.width = 80; - r.height = 30; - if (GUI.Button(r, "Confirm", SCANskins.SCAN_buttonWarning)) - { - popup = false; - warningBoxAll = false; - foreach (SCANdata data in SCANcontroller.controller.GetAllData) - { - data.reset(); - } - } - } - else - popup = false; - } - } - - private CelestialBody getTargetBody() - { - switch (HighLogic.LoadedScene) - { - case GameScenes.FLIGHT: - return FlightGlobals.currentMainBody; - case GameScenes.SPACECENTER: - return Planetarium.fetch.Home; - case GameScenes.TRACKSTATION: - return SCANUtil.getTargetBody(MapView.MapCamera.target); - default: - return null; - } - } - - } -} diff --git a/SCANsat/SCAN_UI/SCANzoomHiDef.cs b/SCANsat/SCAN_UI/SCANzoomHiDef.cs deleted file mode 100644 index 4c35ff04f..000000000 --- a/SCANsat/SCAN_UI/SCANzoomHiDef.cs +++ /dev/null @@ -1,185 +0,0 @@ -#region license -/* [Scientific Committee on Advanced Navigation] - * S.C.A.N. Satellite - * - * SCANzoomHiDef - Extension of standard SCANsat zoom window - * - * Copyright (c)2013 damny; - * Copyright (c)2014 technogeeky ; - * Copyright (c)2014 DMagic - * Copyright (c)2014 (Your Name Here) ; see LICENSE.txt for licensing details. - */ -#endregion - -using System; -using SCANsat; -using SCANsat.SCAN_PartModules; -using SCANsat.SCAN_UI.UI_Framework; -using SCANsat.SCAN_Data; -using SCANsat.SCAN_Map; -using palette = SCANsat.SCAN_UI.UI_Framework.SCANpalette; -using UnityEngine; - -namespace SCANsat.SCAN_UI -{ - class SCANzoomHiDef : SCANzoomWindow - { - private Color32[] mapPix; - private float[,] mapValues; - private SCANhiDefCamera cameraModule; - private bool mapGenerated; - - private static Rect sessionRectHiDef = defaultRect; - - //protected override void Awake() - //{ - // base.Awake(); - - // WindowRect = sessionRectHiDef; - //} - - protected override void Startup() - { - //Initialize the map object - Visible = false; - - v = FlightGlobals.ActiveVessel; - b = FlightGlobals.ActiveVessel.mainBody; - data = SCANcontroller.controller.getData(b.name); - - if (spotmap == null) - { - spotmap = new SCANmap(b, false, mapSource.ZoomMap); - spotmap.setSize(320, 240); - } - - showOrbit = SCANcontroller.controller.map_orbit; - showAnomaly = SCANcontroller.controller.map_markers; - showWaypoints = SCANcontroller.controller.map_waypoints; - resourceOverlay = true; - - if (SCANconfigLoader.GlobalResource) - { - loadedResources = SCANcontroller.setLoadedResourceList(); - resource = SCANcontroller.getResourceNode(SCANcontroller.controller.resourceSelection); - if (resource == null) - resource = SCANcontroller.GetFirstResource; - resource.CurrentBodyConfig(b.name); - spotmap.Resource = resource; - } - - TooltipsEnabled = SCANcontroller.controller.toolTips; - - spotmap.setBody(b); - } - - protected override void DrawWindowPost(int id) - { - sessionRectHiDef = WindowRect; - - if (SCANcontroller.controller.TargetSelecting && Event.current.type == EventType.mouseDown && !TextureRect.Contains(Event.current.mousePosition)) - { - SCANcontroller.controller.TargetSelecting = false; - SCANcontroller.controller.TargetSelectingActive = false; - data.removeTargetWaypoint(); - } - - if (dropDown && Event.current.type == EventType.mouseUp && !ddRect.Contains(Event.current.mousePosition)) - dropDown = false; - } - - protected override void resetMap(bool checkScanner = false, double lat = 0, double lon = 0, bool withCenter = false) - { - mapGenerated = false; - - base.resetMap(false, SCANUtil.fixLatShift(v.latitude), SCANUtil.fixLonShift(v.longitude), true); - } - - public override void setMapCenter(double lat, double lon, bool hi, SCANmap big = null, bool mapBody = true, SCANhiDefCamera camera = null) - { - highDetail = hi; - Visible = true; - - SCANcontroller.controller.TargetSelecting = false; - SCANcontroller.controller.TargetSelectingActive = false; - - if (v.mainBody != b) - { - SCANdata dat = SCANUtil.getData(v.mainBody); - if (dat == null) - dat = new SCANdata(v.mainBody); - - data = dat; - b = data.Body; - - spotmap.setBody(b); - } - - //if (camera != null) - //{ - // cameraModule = camera; - // minZoom = camera.minZoom; - // maxZoom = camera.maxZoom; - //} - - spotmap.MapScale = 10; - - spotmap.centerAround(lon, lat); - - calcTerrainLimits(); - - spotmap.resetMap(mapType.Altimetry, false, resourceOverlay); - - mapGenerated = false; - } - - protected override void resyncMap() - { - if (v.mainBody != b) - { - SCANdata dat = SCANUtil.getData(v.mainBody); - if (dat == null) - dat = new SCANdata(v.mainBody); - - data = dat; - b = data.Body; - - spotmap.setBody(b); - } - - spotmap.centerAround(SCANUtil.fixLonShift(v.longitude), SCANUtil.fixLatShift(v.latitude)); - - calcTerrainLimits(); - - spotmap.resetMap(spotmap.MType, false, resourceOverlay); - - mapGenerated = false; - } - - protected override Texture2D getMap() - { - if (highDetail) - return base.getMap(); - else - { - if (mapGenerated) - return spotmap.Map; - else - { - mapGenerated = true; - return SCANuiUtil.drawLoDetailMap(ref mapPix, ref mapValues, spotmap, data, spotmap.MapWidth, spotmap.MapHeight, 4, resourceOverlay); - } - } - } - - //public override void closeMap() - //{ - // base.closeMap(); - - // if (cameraModule == null) - // return; - - // cameraModule.Events["resetCenter"].active = false; - //} - } -} diff --git a/SCANsat/SCAN_UI/SCANzoomWindow.cs b/SCANsat/SCAN_UI/SCANzoomWindow.cs deleted file mode 100644 index 2438c18b6..000000000 --- a/SCANsat/SCAN_UI/SCANzoomWindow.cs +++ /dev/null @@ -1,917 +0,0 @@ -#region license -/* - * [Scientific Committee on Advanced Navigation] - * S.C.A.N. Satellite - * - * SCANsat - Zoom window object - * - * Copyright (c)2013 damny; - * Copyright (c)2014 David Grandy ; - * Copyright (c)2014 technogeeky ; - * Copyright (c)2014 (Your Name Here) ; see LICENSE.txt for licensing details. - * - */ -#endregion - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using SCANsat.SCAN_Platform; -using SCANsat; -using SCANsat.SCAN_UI.UI_Framework; -using SCANsat.SCAN_PartModules; -using SCANsat.SCAN_Data; -using SCANsat.SCAN_Map; -using palette = SCANsat.SCAN_UI.UI_Framework.SCANpalette; -using UnityEngine; - -namespace SCANsat.SCAN_UI -{ - class SCANzoomWindow : SCAN_MBW - { - protected SCANmap spotmap; - private SCANmap bigmap; - protected CelestialBody b; - protected SCANdata data; - protected Vessel v; - protected SCANresourceGlobal resource; - protected bool showOrbit, showAnomaly, showWaypoints; - private bool narrowBand, showInfo, controlLock; - private bool initialized; - protected float minZoom = 2; - protected float maxZoom = 1000; - private Vector2 dragStart; - private Vector2d mjTarget = new Vector2d(); - private float resizeW, resizeH; - private const string lockID = "SCANzoom_LOCK"; - internal readonly static Rect defaultRect = new Rect(50f, 50f, 340f, 240f); - private static Rect sessionRect = defaultRect; - private StringBuilder infoString; - private StringBuilder infoString2; - - protected bool dropDown; - protected Rect ddRect; - private Vector2 scrollR; - protected List loadedResources = new List(); - protected bool resourceOverlay; - - protected bool highDetail; - - public bool Initialized - { - get { return initialized; } - } - - protected override void Awake() - { - base.Awake(); - - WindowRect = sessionRect; - WindowSize_Min = new Vector2(310, 180); - WindowSize_Max = new Vector2(540, 400); - WindowOptions = new GUILayoutOption[2] { GUILayout.Width(340), GUILayout.Height(240) }; - WindowStyle = SCANskins.SCAN_window; - showInfo = true; - Visible = false; - DragEnabled = true; - ClampEnabled = true; - TooltipMouseOffset = new Vector2d(-10, -25); - ClampToScreenOffset = new RectOffset(-200, -200, -160, -160); - - SCAN_SkinsLibrary.SetCurrent("SCAN_Unity"); - SCAN_SkinsLibrary.SetCurrentTooltip(); - - removeControlLocks(); - infoString = new StringBuilder(); - infoString2 = new StringBuilder(); - - Startup(); - - GameEvents.OnCameraChange.Add(onCameraChange); - } - - protected virtual void Startup() - { - //Initialize the map object - Visible = false; - - if (HighLogic.LoadedSceneIsFlight) - { - b = FlightGlobals.currentMainBody; - data = SCANUtil.getData(b); - if (data == null) - { - data = new SCANdata(b); - SCANcontroller.controller.addToBodyData(b, data); - } - } - else if (HighLogic.LoadedSceneHasPlanetarium) - { - v = null; - b = SCANcontroller.controller.kscMap.Body; - data = SCANcontroller.controller.kscMap.Data; - } - - if (spotmap == null) - { - spotmap = new SCANmap(b, false, mapSource.ZoomMap); - spotmap.setSize(320, 240); - } - - showOrbit = SCANcontroller.controller.map_orbit; - showAnomaly = SCANcontroller.controller.map_markers; - resourceOverlay = SCANcontroller.controller.map_ResourceOverlay; - - if (SCANconfigLoader.GlobalResource) - { - loadedResources = SCANcontroller.setLoadedResourceList(); - } - - if (HighLogic.LoadedScene == GameScenes.SPACECENTER) - showWaypoints = false; - else - showWaypoints = SCANcontroller.controller.map_waypoints; - - TooltipsEnabled = SCANcontroller.controller.toolTips; - - spotmap.setBody(b); - } - - protected override void OnDestroy() - { - removeControlLocks(); - - GameEvents.OnCameraChange.Remove(onCameraChange); - SCANcontroller.controller.unloadPQS(spotmap.Body, mapSource.ZoomMap); - } - - private void onCameraChange(CameraManager.CameraMode cam) - { - if (cam == CameraManager.CameraMode.IVA) - DragEnabled = false; - else - DragEnabled = true; - } - - internal void removeControlLocks() - { - InputLockManager.RemoveControlLock(lockID); - controlLock = false; - } - - public void initializeMap() - { - initialized = true; - - v = FlightGlobals.ActiveVessel; - - setToVessel(true); - } - - public void setToVessel(bool sync) - { - if (v == null) - return; - - if (sync) - { - setMapCenter(SCANUtil.fixLatShift(v.latitude), SCANUtil.fixLonShift(v.longitude), true, SCANBigMap.BigMap, false); - } - else - { - if (v.mainBody != b) - { - SCANdata dat = SCANUtil.getData(v.mainBody); - if (dat == null) - dat = new SCANdata(v.mainBody); - - data = dat; - b = data.Body; - - spotmap.setBody(b); - } - - resetMap(true, SCANUtil.fixLatShift(v.latitude), SCANUtil.fixLonShift(v.longitude), true); - } - } - - public virtual void setMapCenter(double lat, double lon, bool hi, SCANmap big = null, bool mapBody = true, SCANhiDefCamera camera = null) - { - highDetail = hi; - Visible = true; - bigmap = big; - - SCANcontroller.controller.TargetSelecting = false; - SCANcontroller.controller.TargetSelectingActive = false; - - if (bigmap.Projection == MapProjection.Polar) - spotmap.setProjection(MapProjection.Polar); - else - spotmap.setProjection(MapProjection.Rectangular); - - if (mapBody) - { - if (bigmap.Body != b) - { - SCANdata dat = SCANUtil.getData(bigmap.Body); - if (dat == null) - dat = new SCANdata(bigmap.Body); - - data = dat; - b = data.Body; - - spotmap.setBody(b); - } - } - else - { - if (v.mainBody != b) - { - SCANdata dat = SCANUtil.getData(v.mainBody); - if (dat == null) - dat = new SCANdata(v.mainBody); - - data = dat; - b = data.Body; - - spotmap.setBody(b); - } - } - - if (SCANconfigLoader.GlobalResource) - { - resource = bigmap.Resource; - spotmap.Resource = resource; - spotmap.Resource.CurrentBodyConfig(b.name); - } - - if (SCANcontroller.controller.needsNarrowBand && resourceOverlay) - checkForScanners(); - - spotmap.MapScale = 10; - - spotmap.centerAround(lon, lat); - - calcTerrainLimits(); - - spotmap.resetMap(bigmap.MType, false, resourceOverlay, narrowBand); - } - - protected virtual void resetMap(bool checkScanner = false, double lat = 0, double lon = 0, bool withCenter = false) - { - if (withCenter) - spotmap.centerAround(lon, lat); - else - spotmap.centerAround(spotmap.CenteredLong, spotmap.CenteredLat); - - SCANcontroller.controller.TargetSelecting = false; - SCANcontroller.controller.TargetSelectingActive = false; - - if (checkScanner && SCANcontroller.controller.needsNarrowBand && resourceOverlay) - checkForScanners(); - - calcTerrainLimits(); - - spotmap.resetMap(resourceOverlay, narrowBand || !checkScanner); - } - - protected virtual void resyncMap() - { - SCANcontroller.controller.TargetSelecting = false; - SCANcontroller.controller.TargetSelectingActive = false; - - if (bigmap.Projection == MapProjection.Polar) - spotmap.setProjection(MapProjection.Polar); - else - spotmap.setProjection(MapProjection.Rectangular); - - if (bigmap.Body != b) - { - SCANdata dat = SCANUtil.getData(bigmap.Body); - if (dat == null) - dat = new SCANdata(bigmap.Body); - - data = dat; - b = data.Body; - - spotmap.setBody(b); - } - - if (SCANconfigLoader.GlobalResource && resourceOverlay) - { - resource = bigmap.Resource; - spotmap.Resource = resource; - spotmap.Resource.CurrentBodyConfig(b.name); - } - - spotmap.centerAround(spotmap.CenteredLong, spotmap.CenteredLat); - - if (SCANcontroller.controller.needsNarrowBand && resourceOverlay) - checkForScanners(); - - calcTerrainLimits(); - - spotmap.resetMap(bigmap.MType, false, resourceOverlay, narrowBand); - } - - protected void calcTerrainLimits() - { - if (spotmap.MType == mapType.Slope) - return; - - int w = spotmap.MapWidth / 4; - int h = spotmap.MapHeight / 4; - - float max = -200000; - float min = 100000; - float terrain = 0; - - for (int i = 0; i < spotmap.MapHeight; i += 4) - { - for (int j = 0; j < spotmap.MapWidth; j += 4) - { - double lat = (i * 1.0f / spotmap.MapScale) - 90f + spotmap.Lat_Offset; - double lon = (j * 1.0f / spotmap.MapScale) - 180f + spotmap.Lon_Offset; - double la = lat, lo = lon; - lat = spotmap.unprojectLatitude(lo, la); - lon = spotmap.unprojectLongitude(lo, la); - - terrain = (float)SCANUtil.getElevation(b, lon, lat); - - if (terrain < min) - min = terrain; - if (terrain > max) - max = terrain; - } - } - - if (min > max) - min = max - 1f; - - if (min == max) - min = max - 1f; - - spotmap.setCustomRange(min, max); - } - - public SCANmap SpotMap - { - get { return spotmap; } - } - - public virtual void closeMap() - { - removeControlLocks(); - Visible = false; - } - - private void checkForScanners() - { - string t = ""; - narrowBand = SCANuiUtil.narrowBandInOrbit(ref t, b, Math.Abs(spotmap.CenteredLat - 10), resource); - - if (!narrowBand) - spotmap.Resource = null; - else - { - spotmap.Resource = resource; - spotmap.Resource.CurrentBodyConfig(b.name); - if (resourceOverlay) - spotmap.resetMap(resourceOverlay, true); - } - } - - protected override void Update() - { - if (Visible) - { - if (!SCANcontroller.controller.needsNarrowBand && SCANconfigLoader.GlobalResource) - narrowBand = true; - - if (HighLogic.LoadedSceneIsFlight && FlightGlobals.ready) - v = FlightGlobals.ActiveVessel; - else if (HighLogic.LoadedScene == GameScenes.TRACKSTATION) - { - MapObject target = PlanetariumCamera.fetch.target; - - if (target.type == MapObject.ObjectType.Vessel) - v = target.vessel; - else - v = null; - } - } - } - - protected override void DrawWindowPre(int id) - { - WindowCaption = SCANuiUtil.toDMS(spotmap.CenteredLat, spotmap.CenteredLong); - - if (IsResizing && !inRepaint()) - { - if (Input.GetMouseButtonUp(0)) - { - double scale = spotmap.MapScale; - IsResizing = false; - if (resizeW < WindowSize_Min.x) - resizeW = WindowSize_Min.x; - else if (resizeW > WindowSize_Max.x) - resizeW = WindowSize_Max.x; - if (resizeH < WindowSize_Min.y) - resizeH = WindowSize_Min.y; - else if (resizeH > WindowSize_Max.y) - resizeH = WindowSize_Max.y; - - if ((int)resizeW % 2 != 0) - resizeW += 1; - if ((int)resizeH % 2 != 0) - resizeH += 1; - - if ((int)resizeW % 4 != 0) - resizeW += 2; - if ((int)resizeH % 4 != 0) - resizeH += 2; - - spotmap.setSize((int)resizeW, (int)resizeH); - spotmap.MapScale = scale; - - resetMap(true); - } - else - { - float yy = Input.mousePosition.y; - float xx = Input.mousePosition.x; - if (Input.mousePosition.y < 0) - yy = 0; - if (Input.mousePosition.x < 0) - xx = 0; - - resizeH += dragStart.y - yy; - dragStart.y = yy; - resizeW += xx - dragStart.x; - dragStart.x = xx; - } - if (Event.current.isMouse) - Event.current.Use(); - } - - //Lock space center click through - if (HighLogic.LoadedScene == GameScenes.SPACECENTER) - { - Vector2 mousePos = Input.mousePosition; - mousePos.y = Screen.height - mousePos.y; - if (WindowRect.Contains(mousePos) && !controlLock) - { - InputLockManager.SetControlLock(ControlTypes.CAMERACONTROLS | ControlTypes.KSC_ALL, lockID); - controlLock = true; - } - else if (!WindowRect.Contains(mousePos) && controlLock) - { - InputLockManager.RemoveControlLock(lockID); - controlLock = false; - } - } - - //Lock tracking scene click through - if (HighLogic.LoadedScene == GameScenes.TRACKSTATION) - { - Vector2 mousePos = Input.mousePosition; - mousePos.y = Screen.height - mousePos.y; - if (WindowRect.Contains(mousePos) && !controlLock) - { - InputLockManager.SetControlLock(ControlTypes.TRACKINGSTATION_UI, lockID); - controlLock = true; - } - else if (!WindowRect.Contains(mousePos) && controlLock) - { - InputLockManager.RemoveControlLock(lockID); - controlLock = false; - } - } - } - - protected override void DrawWindow(int id) - { - versionLabel(id); - closeBox(id); - - growS(); - topBar(id); - fillS(28); - drawMap(id); - mouseOver(id); - stopS(); - - mapLabels(id); - - drawDropDown(id); - } - - protected override void DrawWindowPost(int id) - { - sessionRect = WindowRect; - - if (SCANcontroller.controller.TargetSelecting && Event.current.type == EventType.mouseDown && !TextureRect.Contains(Event.current.mousePosition)) - { - SCANcontroller.controller.TargetSelecting = false; - SCANcontroller.controller.TargetSelectingActive = false; - data.removeTargetWaypoint(); - } - - if (dropDown && Event.current.type == EventType.mouseUp && !ddRect.Contains(Event.current.mousePosition)) - dropDown = false; - } - - //Draw version label in upper left corner - private void versionLabel(int id) - { - Rect r = new Rect(6, 0, 50, 18); - GUI.Label(r, SCANmainMenuLoader.SCANsatVersion, SCANskins.SCAN_whiteReadoutLabel); - } - - //Draw the close button in upper right corner - private void closeBox(int id) - { - Rect r = new Rect(WindowRect.width - 40, 0, 18, 18); - if (showInfo) - { - if (GUI.Button(r, "-", SCANskins.SCAN_buttonBorderless)) - showInfo = !showInfo; - } - else - { - if (GUI.Button(r, "+", SCANskins.SCAN_buttonBorderless)) - showInfo = !showInfo; - } - r.x += 20; - r.y += 1; - if (GUI.Button(r, SCANcontroller.controller.closeBox, SCANskins.SCAN_closeButton)) - { - closeMap(); - } - } - - private void topBar(int id) - { - Rect r = new Rect(); - - if (HighLogic.LoadedScene != GameScenes.SPACECENTER) - { - if (v != null) - { - r = new Rect(2, 22, 16, 16); - - showOrbit = GUI.Toggle(r, showOrbit, textWithTT("", "Toggle Orbit"), SCANskins.SCAN_settingsToggle); - - r.x += 12; - r.width = 40; - r.height = 20; - - if (GUI.Button(r, iconWithTT(SCANskins.SCAN_OrbitIcon, "Toggle Orbit"), SCANskins.SCAN_buttonBorderless)) - { - showOrbit = !showOrbit; - } - } - - r = new Rect(58, 20, 24, 24); - - if (SCANcontroller.controller.mechJebTargetSelection) - { - if (SCANcontroller.controller.MechJebLoaded && SCANcontroller.controller.LandingTargetBody == b) - { - if (GUI.Button(r, textWithTT("", "Set MechJeb Target"), SCANskins.SCAN_buttonBorderless)) - { - SCANcontroller.controller.TargetSelecting = !SCANcontroller.controller.TargetSelecting; - } - - r.x += 1; - r.y += 1; - r.width = r.height = 22; - - Color old = GUI.color; - GUI.color = palette.red; - GUI.DrawTexture(r, SCANskins.SCAN_MechJebIcon); - GUI.color = old; - } - } - else - { - if (GUI.Button(r, textWithTT("", "Set Landing Target"), SCANskins.SCAN_buttonBorderless)) - { - SCANcontroller.controller.TargetSelecting = !SCANcontroller.controller.TargetSelecting; - } - - r.x += 1; - r.y += 1; - r.width = r.height = 22; - - Color old = GUI.color; - GUI.color = palette.xkcd_PukeGreen; - GUI.DrawTexture(r, SCANskins.SCAN_TargetIcon); - GUI.color = old; - } - - r = new Rect(86, 22, 18, 18); - - showWaypoints = GUI.Toggle(r, showWaypoints, textWithTT("", "Toggle Waypoints"), SCANskins.SCAN_settingsToggle); - - r.x += 13; - r.width = r.height = 20; - - if (GUI.Button(r, iconWithTT(SCANskins.SCAN_WaypointIcon, "Toggle Waypoints"), SCANskins.SCAN_buttonBorderless)) - { - showWaypoints = !showWaypoints; - } - } - - r = new Rect(WindowRect.width / 2 - 46, 20, 26, 26); - - if (GUI.Button(r, iconWithTT(SCANskins.SCAN_ZoomOutIcon, "Zoom Out"), SCANskins.SCAN_buttonBorderless)) - { - spotmap.MapScale = spotmap.MapScale / 1.25f; - if (spotmap.MapScale < minZoom) - spotmap.MapScale = minZoom; - resetMap(); - } - - r.x += 24; - r.width = 58; - - if (GUI.Button(r, textWithTT(spotmap.MapScale.ToString("N1") + " X", "Sync To Big Map"), SCANskins.SCAN_buttonBorderless)) - { - resyncMap(); - } - - r.x += 58; - r.width = 26; - - if (GUI.Button(r, iconWithTT(SCANskins.SCAN_ZoomInIcon, "Zoom In"), SCANskins.SCAN_buttonBorderless)) - { - spotmap.MapScale = spotmap.MapScale * 1.25f; - if (spotmap.MapScale > maxZoom) - spotmap.MapScale = maxZoom; - resetMap(); - } - - if (SCANconfigLoader.GlobalResource) - { - r = new Rect(WindowRect.width - 96, 20, 24, 24); - - if (GUI.Button(r, iconWithTT(SCANskins.SCAN_ResourceIcon, "Resources"), SCANskins.SCAN_buttonBorderless)) - { - dropDown = !dropDown; - } - } - - r = new Rect(WindowRect.width - 62, 22, 18, 18); - - showAnomaly = GUI.Toggle(r, showAnomaly, textWithTT("", "Toggle Anomalies"), SCANskins.SCAN_settingsToggle); - - r.x += 12; - r.width = r.height = 20; - - if (GUI.Button(r, textWithTT(SCANcontroller.controller.anomalyMarker, "Toggle Anomalies"), SCANskins.SCAN_buttonBorderless)) - { - showAnomaly = !showAnomaly; - } - - if (v != null) - { - r.x += 22; - - if (GUI.Button(r, iconWithTT(SCANskins.SCAN_SmallMapIcon, "Sync To Vessel"), SCANskins.SCAN_buttonBorderless)) - { - setToVessel(false); - } - } - } - - private void drawMap(int id) - { - MapTexture = getMap(); - - if (IsResizing) - { - //Set minimum map size during re-sizing - dW = resizeW; - if (dW < WindowSize_Min.x) - dW = WindowSize_Min.x; - else if (dW > WindowSize_Max.x) - dW = WindowSize_Max.x; - dH = resizeH; - if (dH < WindowSize_Min.y) - dH = WindowSize_Min.y; - else if (dH > WindowSize_Max.y) - dH = WindowSize_Max.y; - - GUILayout.Label("", GUILayout.Width(dW), GUILayout.Height(dH)); - } - else - { - GUILayout.Label("", GUILayout.Width(MapTexture.width), GUILayout.Height(MapTexture.height)); - } - - TextureRect = GUILayoutUtility.GetLastRect(); - TextureRect.width = spotmap.MapWidth; - TextureRect.height = spotmap.MapHeight; - - //Stretches the existing map while re-sizing - if (IsResizing) - { - TextureRect.width = dW; - TextureRect.height = dH; - GUI.DrawTexture(TextureRect, MapTexture, ScaleMode.StretchToFill); - } - else - { - GUI.DrawTexture(TextureRect, MapTexture); - } - } - - protected virtual Texture2D getMap() - { - return spotmap.getPartialMap(); - } - - private void mouseOver(int id) - { - float mx = Event.current.mousePosition.x - TextureRect.x; - float my = Event.current.mousePosition.y - TextureRect.y; - bool in_map = false; - double mlon = 0, mlat = 0; - - //Draw the re-size label in the corner - Rect resizer = new Rect(WindowRect.width - 24, WindowRect.height - 26, 24, 24); - GUI.Label(resizer, SCANskins.SCAN_ResizeIcon); - - //Handles mouse positioning and converting to lat/long coordinates - if (mx >= 0 && my >= 0 && mx <= TextureRect.width && my <= TextureRect.height /*mx >= 0 && my >= 0 && mx < MapTexture.width && my < MapTexture.height*/) - { - double mlo = spotmap.Lon_Offset + (mx / spotmap.MapScale) - 180; - double mla = spotmap.Lat_Offset + ((TextureRect.height - my) / spotmap.MapScale) - 90; - mlon = spotmap.unprojectLongitude(mlo, mla); - mlat = spotmap.unprojectLatitude(mlo, mla); - - if (mlon >= -180 && mlon <= 180 && mlat >= -90 && mlat <= 90) - { - in_map = true; - if (SCANcontroller.controller.TargetSelecting) - { - SCANcontroller.controller.TargetSelectingActive = true; - mjTarget.x = mlon; - mjTarget.y = mlat; - SCANcontroller.controller.LandingTargetCoords = mjTarget; - Rect r = new Rect(mx + TextureRect.x - 11, my + TextureRect.y - 13, 24, 24); - SCANuiUtil.drawMapIcon(r, SCANcontroller.controller.mechJebTargetSelection ? SCANskins.SCAN_MechJebIcon : SCANskins.SCAN_TargetIcon, true, palette.yellow, true); - } - } - else if (SCANcontroller.controller.TargetSelecting) - SCANcontroller.controller.TargetSelectingActive = false; - - if (mlat > 90) - { - mlon = (mlon + 360) % 360 - 180; - mlat = 180 - mlat; - } - else if (mlat < -90) - { - mlon = (mlon + 360) % 360 - 180; - mlat = -180 - mlat; - } - } - else if (SCANcontroller.controller.TargetSelecting) - SCANcontroller.controller.TargetSelectingActive = false; - - //Handles mouse click while inside map - if (!dropDown && Event.current.isMouse) - { - if (Event.current.type == EventType.MouseUp) - { - //Generate waypoint for MechJeb target - if (SCANcontroller.controller.TargetSelecting && SCANcontroller.controller.TargetSelectingActive && Event.current.button == 0 && in_map) - { - string s = SCANcontroller.controller.mechJebTargetSelection ? "MechJeb Landing Target" : "Landing Target Site"; - SCANwaypoint w = new SCANwaypoint(mlat, mlon, s); - SCANcontroller.controller.LandingTarget = w; - data.addToWaypoints(); - SCANcontroller.controller.TargetSelecting = false; - SCANcontroller.controller.TargetSelectingActive = false; - } - //Middle click re-center - else if (Event.current.button == 2 || (Event.current.button == 1 && GameSettings.MODIFIER_KEY.GetKey())) - { - if (in_map) - { - resetMap(true, mlat, mlon, highDetail); - } - } - //Right click zoom in - else if (Event.current.button == 1) - { - if (in_map) - { - spotmap.MapScale = spotmap.MapScale * 1.25f; - if (spotmap.MapScale > maxZoom) - spotmap.MapScale = maxZoom; - resetMap(true, mlat, mlon, highDetail); - } - } - //Left click zoom out - else if (Event.current.button == 0) - { - if (in_map) - { - spotmap.MapScale = spotmap.MapScale / 1.25f; - if (spotmap.MapScale < minZoom) - spotmap.MapScale = minZoom; - resetMap(true, mlat, mlon, highDetail); - } - } - Event.current.Use(); - } - - //Handle clicking inside the re-size button - else if (Event.current.isMouse - && Event.current.type == EventType.MouseDown - && Event.current.button == 0 - && resizer.Contains(Event.current.mousePosition)) - { - IsResizing = true; - dragStart.x = Input.mousePosition.x; - dragStart.y = Input.mousePosition.y; - resizeW = TextureRect.width; - resizeH = TextureRect.height; - Event.current.Use(); - } - } - - //Draw the actual mouse over info label below the map - if (SCANcontroller.controller.TargetSelecting) - { - SCANuiUtil.readableLabel(SCANcontroller.controller.mechJebTargetSelection ? "MechJeb Landing Guidance Targeting..." : "Landing Site Targeting...", false); - fillS(-10); - SCANuiUtil.mouseOverInfoSimple(mlon, mlat, spotmap, data, spotmap.Body, in_map, ref infoString, ref infoString2); - } - else if (showInfo) - SCANuiUtil.mouseOverInfoSimple(mlon, mlat, spotmap, data, spotmap.Body, in_map, ref infoString, ref infoString2); - else - fillS(10); - } - - private void mapLabels(int id) - { - //Draw the orbit overlays - if (showOrbit && v != null) - { - SCANuiUtil.drawOrbit(TextureRect, spotmap, v, spotmap.Body, true); - } - - SCANuiUtil.drawMapLabels(TextureRect, v, spotmap, data, spotmap.Body, showAnomaly, showWaypoints); - } - - private void drawDropDown(int id) - { - if (!dropDown) - return; - - ddRect = new Rect(WindowRect.width - 190, 48, 160, 200); - GUI.Box(ddRect, ""); - for (int i = -1; i < loadedResources.Count; i++) - { - scrollR = GUI.BeginScrollView(ddRect, scrollR, new Rect(0, 0, 140, 20 * (loadedResources.Count + 1))); - - Rect r; - - if (i == -1) - { - r = new Rect(2, 0, 130, 20); - if (GUI.Button(r, "Toggle Resources", resourceOverlay ? SCANskins.SCAN_dropDownButtonActive : SCANskins.SCAN_dropDownButton)) - { - resourceOverlay = !resourceOverlay; - - resetMap(true); - dropDown = false; - } - } - else - { - r = new Rect(2, 20 * (i + 1), 130, 20); - if (GUI.Button(r, loadedResources[i].Name, resource.Name == loadedResources[i].Name ? SCANskins.SCAN_dropDownButtonActive : SCANskins.SCAN_dropDownButton)) - { - resourceOverlay = true; - - resource = loadedResources[i]; - spotmap.Resource = resource; - spotmap.Resource.CurrentBodyConfig(b.name); - - resetMap(true); - - dropDown = false; - } - } - GUI.EndScrollView(); - } - } - - } -} diff --git a/SCANsat/SCAN_UI/UI_Framework/SCAN_Localization.cs b/SCANsat/SCAN_UI/UI_Framework/SCAN_Localization.cs deleted file mode 100644 index b5a3ccea4..000000000 --- a/SCANsat/SCAN_UI/UI_Framework/SCAN_Localization.cs +++ /dev/null @@ -1,46 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using SCANsat.SCAN_Platform; - -namespace SCANsat.SCAN_UI.UI_Framework -{ - public class SCAN_Localization : SCAN_ConfigNodeStorage - { - private SCANlanguagePack activePack; - - [Persistent] - private List Language_Packs = new List(); - - public SCAN_Localization(string path, string node) - { - FilePath = path; - TopNodeName = path + "/" + node; - - if (!Load()) - { - activePack = new SCANlanguagePack(); - Language_Packs.Add(activePack); - Save(); - LoadSavedCopy(); - } - else - { - SCANUtil.SCANlog("Language File Loaded..."); - } - } - - public override void OnDecodeFromConfigNode() - { - activePack = Language_Packs.FirstOrDefault(l => l.activePack); - - if (activePack == null) - activePack = new SCANlanguagePack(); - } - - public SCANlanguagePack ActivePack - { - get { return activePack; } - } - } -} diff --git a/SCANsat/SCAN_UI/UI_Framework/SCANicon.cs b/SCANsat/SCAN_UI/UI_Framework/SCANicon.cs index f03a7a8df..3bac76a62 100644 --- a/SCANsat/SCAN_UI/UI_Framework/SCANicon.cs +++ b/SCANsat/SCAN_UI/UI_Framework/SCANicon.cs @@ -22,93 +22,11 @@ namespace SCANsat.SCAN_UI.UI_Framework { - public static class String_ - { - public static void Dispose(this String s, bool f) - { - // nothing need be done - } - } public class SCANicon { private static Rect pos_icon = new Rect(0, 0, 0, 0); private static Rect grid_pos; - private static string WhereIsKSPPP_DLL() { return Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); } - - //public static Texture2D octIcons = new Texture2D(1 * 32, 177 * 32, TextureFormat.ARGB32, false); - //public static Texture2D planetIcons = new Texture2D(1 * 26, 16 * 26, TextureFormat.ARGB32, false); - - - //public static void loadAssets() { - // Log.Now("trying to load textures"); - - // try { - // var ret = Icon.LoadImageFromFile(ref octIcons); - // var ret2= Icon.LoadImageFromFile(ref planetIcons,"planeticons.png"); - // if (!ret) - // Log.Now("Failed to load octIcons"); - // if (!ret2) - // Log.Now("Failed to load planetIcons"); - // } catch(Exception e) { - // Log.Now("Failed to load textures. File location error: {0} ",e); - // } - //} - - //public static bool LoadImageFromFile(ref Texture2D tex, string name = "octicons.png", string path = "./GameData/KSPPP") { - - // var location = string.Format("{0}/{1}",path, name); - // if (File.Exists(location)) - // return tex.LoadImage(File.ReadAllBytes(location)); - // else - // Log.Now("File.Exists() failed with location: {0}", location); - // return false; - //} - - public static void drawIconAt(int x, int y, Color c, int size = 32 /*px*/, bool outline = false) - { - var old = GUI.color; - - // PX [0..n] - // ORIGIN: NorthWest - pos_icon.x = (x - size) / 2; - pos_icon.y = (y - size) / 2; - pos_icon.width = size; - pos_icon.height = size; - - // UV [0..1] - // Origin: SouthWest - grid_pos.width = 1f; // 32 px - grid_pos.height = (float)(1 / size); // 1/177th - grid_pos.x = 0f; //(float)(1/size); // 1/177th - grid_pos.y = 0f; // (float)(1/size) * 1/(177 - ((int) i)); - - GUI.color = c; - //GUI.DrawTextureWithTexCoords(pos_icon, octIcons, grid_pos); - GUI.color = old; - } - - internal static void drawOrbitIcon(int x, int y, OrbitIcon icon, Color c, int size = 32 /*px*/, bool outline = false) - { - var old = GUI.color; - - // PX [0..n] - // ORIGIN: NorthWest - pos_icon.x = x - (size / 2); - pos_icon.y = y - (size / 2); - pos_icon.width = size; - pos_icon.height = size; - - // UV [0..1] - // Origin: SouthWest - grid_pos.width = 0.2f; - grid_pos.height = 0.2f; - grid_pos.x = 0.2f * ((int)icon % 5); - grid_pos.y = 0.2f * (4 - (int)icon / 5); - - SCANuiUtil.drawMapIcon(pos_icon, SCANmainMenuLoader.OrbitIconsMap, outline, c, true, grid_pos, true); - } - internal static void drawOrbitIconGL(int x, int y, OrbitIcon icon, Color c, Color shadow, Material iconMat, int size = 32 /*px*/, bool outline = false) { // PX [0..n] @@ -127,54 +45,7 @@ internal static void drawOrbitIconGL(int x, int y, OrbitIcon icon, Color c, Colo SCANuiUtil.drawMapIconGL(pos_icon, SCANmainMenuLoader.OrbitIconsMap, c, iconMat, shadow, outline, grid_pos, true); } - - public static void drawIcon(Color c, int size = 32 /*px*/, bool outline = false) - { - var old = GUI.color; - - // PX [0..n] - // ORIGIN: NorthWest - pos_icon.x = 0; - pos_icon.y = 0; - pos_icon.width = size; - pos_icon.height = size; - - // UV [0..1] - // Origin: SouthWest - grid_pos.width = 1f; // 32 px - grid_pos.height = (float)(1 / size); // 1/177th - grid_pos.x = 0f; // (float)(1/size); // 1/177th - grid_pos.y = 0f; // (float)(1/size) * 1/(177 - ((int) i)); - - GUI.color = c; - //GUI.DrawTextureWithTexCoords(pos_icon, octIcons, grid_pos); - GUI.color = old; - } - - - // I am guessing that splitting these up like this will be nice for rendering purposes. - public enum PlanetIcons - { - Moho, - Eve, - Kerbin, - Duna, - Dres, - Jool, - Eeloo, - } - public enum MoonIcons - { - Gilly, - Mun, - Minmus, - Ike, - Laythe, - Vall, - Tylo, - Bop, - Pol, - } + public enum OrbitIcon : int { Pe = 0, @@ -235,188 +106,7 @@ internal static OrbitIcon orbitIconForVesselType(VesselType type) default: return OrbitIcon.Mystery; } - } - #region icons - //public enum Icons { - // Heart, /* = 0 */ - // Zap, - // LightBulb, - // Repo, - // RepoForked, - // RepoPush, - // RepoPull, - // Book, - // Octoface, - // GitPullRequest, - // MarkGithub, - // CloudDownload, - // CloudUpload, - // Keyboard, - // Gist, - // FileCode, - // FileText, - // FileMedia, - // FileZip, - // FilePdf, - // Tag, - // FileDirectory, - // FileSubmodule, - // Person, - // Jersey, - // GitCommit, - // GitBranch, - // GitMerge, - // Mirror, - // IssueOpened, - // IssueReopened, - // IssueClosed, - // Star, - // Comment, - // Question, - // Alert, - // Search, - // Gear, - // RadioTower, - // Tools, - // SignOut, - // Rocket, - // Rss, - // Clippy, - // SignIn, - // Organization, - // DeviceMobile, - // Unfold, - // Check, - // Mail, - // MailRead, - // ArrowUp, - // ArrowRight, - // ArrowDown, - // ArrowLeft, - // Pin, - // Gift, - // Graph, - // TriangleLeft, - // CreditCard, - // Clock, - // Ruby, - // Broadcast, - // Key, - // RepoForcePush, - // RepoClone, - // Diff, - // Eye, - // CommentDiscussion, - // MailReply, - // PrimitiveDot, - // PrimitiveSquare, - // DeviceCamera, - // DeviceCameraVideo, - // Pencil, - // Info, - // TriangleRight, - // TriangleDown, - // Link, - // Plus, - // ThreeBars, - // Code, - // Location, - // ListUnordered, - // ListOrdered, - // Quote, - // Versions, - // ColorMode, - // ScreenFull, - // ScreenNormal, - // Calendar, - // Beer, - // Lock, - // DiffAdded, - // DiffRemoved, - // DiffModified, - // DiffRenamed, - // HorizontalRule, - // ArrowSmallRight, - // JumpDown, - // JumpUp, - // MoveLeft, - // Milestone, - // Checklist, - // Megaphone, - // ChevronRight, - // Bookmark, - // Settings, - // Dashboard, - // History, - // LinkExternal, - // Mute, - // X, - // CircleSlash, - // Pulse, - // Sync, - // Telescope, - // Microscope, - // AlignmentAlign, - // AlignmentUnalign, - // GistSecret, - // Home, - // AlignmentAlignedTo, - // Stop, - // Bug, - // FileBinary, - // Database, - // Server, - // DiffIgnored, - // Ellipsis, - // NoNewline, - // Hubot, - // Hourglass, - // ArrowSmallUp, - // ArrowSmallDown, - // ArrowSmallLeft, - // ChevronUp, - // ChevronDown, - // ChevronLeft, - // JumpLeft, - // JumpRight, - // MoveUp, - // MoveDown, - // MoveRight, - // TriangleUp, - // GitCompare, - // Podium, - // FileSymlinkFile, - // FileSymlinkDirectory, - // Squirrel, - // Globe, - // Unmute, - // PlaybackPause, - // PlaybackRewind, - // PlaybackFastForward, - // Mention, - // PlaybackPlay, - // Puzzle, - // Package, - // Browser, - // Split, - // Steps, - // Terminal, - // Markdown, - // Dash, - // Fold, - // Inbox, - // Trashcan, - // Paintcan, - // Flame, - // Briefcase, - // Plug, - // CircuitBoard, - // MortarBoard, - // Law, - // DeviceDesktop, - // Blank /* = 177 */ - //} - #endregion + } } } diff --git a/SCANsat/SCAN_UI/UI_Framework/SCANlanguagePack.cs b/SCANsat/SCAN_UI/UI_Framework/SCANlanguagePack.cs deleted file mode 100644 index 9ccccfae8..000000000 --- a/SCANsat/SCAN_UI/UI_Framework/SCANlanguagePack.cs +++ /dev/null @@ -1,176 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using SCANsat.SCAN_Platform; -using System.Text.RegularExpressions; -using System.Reflection; - -namespace SCANsat.SCAN_UI.UI_Framework -{ - public class SCANlanguagePack : SCAN_ConfigNodeStorage - { - [Persistent] - public bool activePack = true; - [Persistent] - public string language = "English (USA)"; - - //Settings Window Help Tooltips - [Persistent] - public string settingsHelpAnomalies = "Select the marker used to display\nanomalies on the map."; - [Persistent] - public string settingsHelpScanningToggle = "Toggle all SCANsat scanning."; - [Persistent] - public string settingsHelpBackground = "Toggle background scanning on\nselected celestial bodies."; - [Persistent] - public string settingsHelpTimeWarp = "Adjust the scanning frequency during TimeWarp.\nHigher settings result in fewer gaps in the maps but may have a performance impact at high TimeWarp."; - [Persistent] - public string settingsHelpGroundTracks = "Display a visible indicator of\nscanning activity in map mode."; - [Persistent] - public string settingsHelpGroundTracksActive = "The ground track indicator can be limited to only be displayed for the active vessel."; - [Persistent] - public string settingsHelpOverlayTooltips = "Displays tooltips for the current mouse position when a planetary overlay map is activated. These tooltips include The cursor coordinates, terrain height, slope, biome name, and resource abundance, depending on scanning coverage."; - [Persistent] - public string settingsHelpWindowTooltips = "Display tooltips on some map window buttons. These are primarily used to identify icon buttons."; - [Persistent] - public string settingsHelpStockToolbar = "Use the stock toolbar.\nOnly one stock button is available. Can be used concurrently with the Blizzy78 Toolbar."; - [Persistent] - public string settingsHelpMechJeb = "The SCANsat zoom map target selection mode can be used to select a MechJeb landing site."; - [Persistent] - public string settingsHelpResetWindows = "Reset all window positions and scale. Use this in case a window has been dragged completely off screen or if any windows are not visible."; - [Persistent] - public string settingsHelpResetPlanetData = "Resets all SCANsat data for the current celestial body.\nA confirmation window will open before activating.\nCannot be reversed."; - [Persistent] - public string settingsHelpResetAllData = "Resets all SCANsat data for all celestial bodies. \nA confirmation window will open before activating.\nCannot be reversed."; - [Persistent] - public string settingsHelpVesselsSensorsPasses = "Information about the currently active SCANsat sensors. Vessels indicates the number of vessels with active sensors. Sensors indicates the total number of sensors; instruments with multiple sensor types count each individual sensor. Passes indicates the number of sensor updates performed per second.\nThis value is affected by the\nTimeWarp Resolution setting."; - [Persistent] - public string settingsHelpGreyScale = "Use a true grey-scale color spectrum for black-and-white SCANsat maps. Pixels on the altitude map will interpolate between black and white; the min and max terrain heights for each celestial body\ndefine the limits."; - [Persistent] - public string settingsHelpExportCSV = "Export a .csv file along with map texture when using the Export button on the big map. The file contains coordinates and the terrain height for each pixel. Pixels are labeled from left to right\nand from top to bottom."; - [Persistent] - public string settingsHelpSetMapWidth = "Enter an exact value for the SCANsat big map texture width. Values are limited to 550 - 8192 pixels wide. Press the Set button to apply the value."; - [Persistent] - public string settingsHelpWindowScale = "Adjust all SCANsat window scales; buttons adjust scale in increments of 5%."; - - //Resource Settings Window Help Tooltips - [Persistent] - public string resourceSettingsHelpOverlayWindow = "Open the planetary overlay map control window."; - [Persistent] - public string resourceSettingsHelpBiomeLock = "Circumvents the requirement for stock surface biome scans. SCANsat displays will show the full accuracy for resource abundance with or without any surface biome scans."; - [Persistent] - public string resourceSettingsHelpInstant = "By default, the stock M700 resource scanner's orbital survey will fill in all SCANsat resource maps. This can be disabled, requiring standard SCANsat methods for all resource scanning. Disabled automatically when stock resource scanning is disabled."; - [Persistent] - public string resourceSettingsHelpNarrowBand = "Numerous SCANsat functions require a Narrow-Band resource scanner on-board the current vessel or in orbit of a celestial body for fully accurate resource abundance data.\nDisable this to circumvent these restrictions."; - [Persistent] - public string resourceSettingsHelpDisableStock = "Disables all stock resource scanning functions. SCANsat scanning methods will be required for all resource data. Replaces several stock resource functions with SCANsat tools. These include The right-click readouts, the high resolution narrow-band scanner map, and the planetary overlay maps."; - [Persistent] - public string resourceSettingsHelpResetSCANsatResource = "Resets all SCANsat resource data for the current celestial body. Other SCANsat data is not affected.\nA confirmation window will open before activating.\nCannot be reversed."; - [Persistent] - public string resourceSettingsHelpResetStockResource = "Resets the stock resource scanning coverage for the current celestial body. A reload or scene change may be required for all changes to take effect.\nA confirmation window will open before activating.\nCannot be reversed."; - [Persistent] - public string resourceSettingsHelpOverlayInterpolation = "Change the number of resource abundance measurements used in constructing the planetary overlay and big map resource overlay. Decrease the value to increase the accuracy of the map. Lower values will result in slower map generation."; - [Persistent] - public string resourceSettingsHelpOverlayHeight = "Change the texture size (map width is 2XHeight) used in constructing the planetary overlay and big map resource overlay. Increase the value to increase the quality and accuracy of the map. Higher values will result in slower map generation."; - [Persistent] - public string resourceSettingsHelpOverlayBiomeHeight = "Change the texture size (map width is 2XHeight) used in constructing the planetary overlay biome map. Increase the value to increase the quality and accuracy of the map. Higher values will result in slower map generation."; - [Persistent] - public string resourceSettingsHelpOverlayTransparency = "Create a grey background for planetary overlay resource maps. Used to make clear which sections of the celestial body have been\nscanned but contain no resources."; - [Persistent] - public string resourceSettingsHelpScanThreshold = "A threshold level used to apply the stock resource scan to a celestial body after scanning with SCANsat sensors. This is useful when contracts or other addons require that a stock resource scan be performed. Set a value from 0-100 in the text box and click on the Set button. All celestial bodies will be checked immediately; celestial bodies will also be checked upon loading or a scene change. A reload may be required for the changes to take effect."; - [Persistent] - public string resourceSettingsModuleManagerWarning = "Warning:\nModule Manager is required for all SCANsat resource scanning"; - - //Color Config Window Help Tooltips - [Persistent] - public string colorTerrainHelpMin = "Defines the low altitude cutoff for the terrain color palette. Anything below this altitude will be shown with the lowest color."; - [Persistent] - public string colorTerrainHelpMax = "Defines the high altitude cutoff for the terrain color palette. Anything above this altitude will be shown with the highest color."; - [Persistent] - public string colorTerrainHelpClampToggle = "Used to define a cutoff between the low and high altitude values. This is particularly useful for ocean planets where it helps to define a sharp distinction between land and ocean."; - [Persistent] - public string colorTerrainHelpClamp = "Defines the clamp altitude cutoff. Anything below the cutoff will be represented by the first two colors in the selected color palette. Anything above the cutoff will be represented with the remaining colors."; - [Persistent] - public string colorTerrainHelpReverse = "Reverses the order of the currently\nselected color palette."; - [Persistent] - public string colorTerrainHelpDiscrete = "Draws the map using only the specific colors defined by each palette, instead of smoothly interpolating between them."; - [Persistent] - public string colorTerrainHelpPaletteSize = "Adjust the number of colors available in the currently selected color palette."; - [Persistent] - public string colorBiomeHelpStock = "Use the stock biome color scheme for\nSCANsat biome maps."; - [Persistent] - public string colorBiomeHelpWhiteBorder = "Draw a white border between biomes. Does not apply to the planetary overlay biome maps."; - [Persistent] - public string colorBiomeHelpTransparency = "Adjust the transparency of biome maps. Terrain elevation is shown behind the biome maps. Set to 0% to disable terrain drawing."; - [Persistent] - public string colorPickerHelpLow = "The top color swatch shows the updated color selection for the low end of this color spectrum. The bottom color swatch shows the currently active color."; - [Persistent] - public string colorPickerHelpHigh = "The top color swatch shows the updated color selection for the high end of this color spectrum. The bottom color swatch shows the currently active color."; - [Persistent] - public string colorPickerHelpValue = "This slider adjusts the Value (in HSV color terms) or Brightness for the currently selected color."; - [Persistent] - public string colorResourceHelpFineControl = "Activates Fine Control Mode where the sliders will only show values within 5% of the current selection."; - [Persistent] - public string colorResourceHelpMin = "The low cutoff for resource concentration on the selected celestial body. Resource deposits at this level will be displayed using the low end of the current resource overlay color spectrum. Resource deposits below this value will not be shown."; - [Persistent] - public string colorResourceHelpMax = "The high cutoff for resource concentration on the selected celestial body. Resource deposits above this value will be shown using the high end of the current resource overlay color spectrum."; - [Persistent] - public string colorResourceHelpTransparency = "Defines the level of transparency for resource overlays. Increase to allow more of the underlying terrain, slope, or biome map to be visible. This also affect the transparency of resource deposits on the planetary overlay resource map."; - [Persistent] - public string colorResourceHelpApply = "Applies the current values for the selected resource and celestial body only."; - [Persistent] - public string colorResourceHelpApplyAll = "Applies the current values for the selected resource for all celestial bodies."; - [Persistent] - public string colorResourceHelpDefault = "Reverts to the default values for the selected resource and celestial body only."; - [Persistent] - public string colorResourceHelpDefaultAll = "Reverts to the default values for the selected resource for all celestial bodies."; - [Persistent] - public string colorHelpSaveToConfig = "Save all color configuration values to the config file found in your SCANsat/Resources folder. These values serve as the defaults for new saves and for all Revert To Default buttons. Values do not need to be saved to the config file to be applied for this save file."; - [Persistent] - public string colorSlopeHelpCutoff = "Adjust the cutoff level between the two selected slope color pairs."; - - public override void OnDecodeFromConfigNode() - { - Regex openBracket = new Regex(@"\[(?=\d+:?\w?\d?\])"); - - Regex closeBraket = new Regex(@"(?<=\{\d+:?\w?\d?)\]"); - - Regex newLines = new Regex(@"\\n"); - - var stringFields = this.GetType().GetFields(BindingFlags.Instance | BindingFlags.Public).Where(a => a.FieldType == typeof(string)).ToList(); - - for (int i = 0; i < stringFields.Count(); i++) - { - FieldInfo f = stringFields[i]; - - f.SetValue(this, openBracket.Replace((string)f.GetValue(this), "{")); - - f.SetValue(this, closeBraket.Replace((string)f.GetValue(this), "}")); - - f.SetValue(this, newLines.Replace((string)f.GetValue(this), Environment.NewLine)); - } - } - - public override void OnEncodeToConfigNode() - { - Regex openCurlyBracket = new Regex(@"\{(?=\d+:?\w?\d?\})"); - - Regex closeCurlyBraket = new Regex(@"(?<=\[\d+:?\w?\d?)\}"); - - Regex newLines = new Regex(@"\n"); - - var stringFields = this.GetType().GetFields(BindingFlags.Instance | BindingFlags.Public).Where(a => a.FieldType == typeof(string)).ToList(); - - for (int i = 0; i < stringFields.Count(); i++) - { - FieldInfo f = stringFields[i]; - - f.SetValue(this, openCurlyBracket.Replace((string)f.GetValue(this), "[")); - - f.SetValue(this, closeCurlyBraket.Replace((string)f.GetValue(this), "]")); - - f.SetValue(this, newLines.Replace((string)f.GetValue(this), @"\n")); - } - } - - } -} diff --git a/SCANsat/SCAN_UI/UI_Framework/SCANlocalization.cs b/SCANsat/SCAN_UI/UI_Framework/SCANlocalization.cs deleted file mode 100644 index b3da537fe..000000000 --- a/SCANsat/SCAN_UI/UI_Framework/SCANlocalization.cs +++ /dev/null @@ -1,41 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using SCANsat.SCAN_Platform; - -namespace SCANsat.SCAN_UI.UI_Framework -{ - public class SCANlocalization : SCAN_ConfigNodeStorage - { - private SCANlanguagePack activePack; - - [Persistent] - private List languagePacks = new List(); - - public SCANlocalization(string path, string node) - { - FilePath = path; - TopNodeName = node; - - if (!Load()) - { - activePack = new SCANlanguagePack(); - languagePacks.Add(activePack); - Save(); - } - } - - public override void OnDecodeFromConfigNode() - { - activePack = languagePacks.FirstOrDefault(l => l.activePack); - - if (activePack == null) - activePack = new SCANlanguagePack(); - } - - public SCANlanguagePack ActivePack - { - get { return activePack; } - } - } -} diff --git a/SCANsat/SCAN_UI/UI_Framework/SCANpalette.cs b/SCANsat/SCAN_UI/UI_Framework/SCANpalette.cs index ef980663c..d84a53b98 100644 --- a/SCANsat/SCAN_UI/UI_Framework/SCANpalette.cs +++ b/SCANsat/SCAN_UI/UI_Framework/SCANpalette.cs @@ -73,6 +73,7 @@ public static Color32 lerp(Color32 a, Color32 b, float t) public static Color xkcd_Yellow = XKCDColors.Yellow; public static Color xkcd_Red = XKCDColors.Red; public static Color xkcd_White = XKCDColors.White; + public static Color xkcd_DarkGreenAlpha = XKCDColors.DarkGreen * new Vector4(1, 1, 1, 0.4f); // colourblind barrier-free colours, according to Masataka Okabe and Kei Ito @@ -123,26 +124,24 @@ public static Color32 lerp(Color32 a, Color32 b, float t) }; public static Color32[] redline; - public static Color gridFull; // resource colors - public static Color gridEmpty; //empty resource color public static Color32[] small_redline; - public static Color32 heightToColor(float val, int scheme, SCANterrainConfig terrain, float min = 0, float max = 0, float range = 0, bool useCustomRange = false) + public static Color32 heightToColor(float val, bool color, SCANterrainConfig terrain, float min = 0, float max = 0, float range = 0, bool useCustomRange = false) { Color32[] c = terrain.ColorPal.colors; if (terrain.PalRev) c = terrain.ColorPal.colorsReverse; if (useCustomRange) { - if (scheme == 0) + if (color) return heightToColor(val, max, min, range, terrain.ClampTerrain, terrain.PalDis, c, true); else return heightToColor(val, max, min, range, terrain.PalDis); } else { - if (scheme == 0) + if (color) return heightToColor(val, terrain.MaxTerrain, terrain.MinTerrain, terrain.TerrainRange, terrain.ClampTerrain, terrain.PalDis, c); else return heightToColor(val, terrain.MaxTerrain, terrain.MinTerrain, terrain.TerrainRange, terrain.PalDis); @@ -153,7 +152,7 @@ private static Color32 heightToColor(float val, float max, float min, float rang { Color32 c = Black; val -= min; - if (SCANcontroller.controller.trueGreyScale) + if (SCAN_Settings_Config.Instance.TrueGreyScale) { val = Mathf.Clamp(val, 0, range) / range; c = lerp(Black, White, val); @@ -277,14 +276,19 @@ internal static Color32 heightToColor(float val, float max, float min, float ran public static string colorHex ( Color32 c ) { return string.Format("#{0:X2}{1:X2}{2:X2}", c.r, c.g, c.b); } - public static string colored ( Color c , string text ) { - return string.Format("{1}", colorHex(c), text); + public static string coloredNoQuote(Color c, string text) + { + return string.Format("{1}", colorHex(c), text); } - internal static Color c_good { - get { - if (SCANcontroller.controller.colours != 1) return cb_bluishGreen; - else return cb_skyBlue; + internal static Color c_good + { + get + { + if (SCANcontroller.controller.mainMapColor) + return cb_bluishGreen; + else + return cb_skyBlue; } } internal static Color c_bad @@ -295,39 +299,15 @@ internal static Color c_bad } } internal static Color c_ugly { - get { - if (SCANcontroller.controller.colours != 1) return xkcd_LightRed; - else return cb_yellow; + get + { + if (SCANcontroller.controller.mainMapColor) + return xkcd_LightRed; + else + return cb_yellow; } } - public static Color picker(Rect r, Color c) { - GUILayout.BeginArea (r,"","Box"); - GUILayout.BeginHorizontal (); - // R - GUILayout.EndHorizontal(); - - GUILayout.BeginHorizontal (); - // G - GUILayout.EndHorizontal(); - - GUILayout.BeginHorizontal (); - // B - GUILayout.EndHorizontal(); - - GUILayout.EndArea (); - return c; - } - - public static void swatch(Color c) { - Texture2D tex = new Texture2D (20,20); - GUILayout.BeginVertical ("Box",new GUILayoutOption[]{GUILayout.Width (22),GUILayout.Height (22)}); - GUI.color = c; - GUILayout.Label (tex); - GUI.color = Color.white; - GUILayout.EndVertical (); - } - private static _Palettes currentPaletteSet; private static Palette greyScalePalette = BrewerPalettes.Greys(9); diff --git a/SCANsat/SCAN_UI/UI_Framework/SCANremoteView.cs b/SCANsat/SCAN_UI/UI_Framework/SCANremoteView.cs index 3cdf79ad4..d2e8e9d7b 100644 --- a/SCANsat/SCAN_UI/UI_Framework/SCANremoteView.cs +++ b/SCANsat/SCAN_UI/UI_Framework/SCANremoteView.cs @@ -13,190 +13,178 @@ using System; using System.Collections.Generic; +using SCANsat.SCAN_Unity; using UnityEngine; using palette = SCANsat.SCAN_UI.UI_Framework.SCANpalette; namespace SCANsat.SCAN_UI.UI_Framework { - public class SCANremoteView { - + public class SCANremoteView + { private static Camera cam; private static GameObject camgo; - private static Shader edgeDetectShader, grayscaleShader; private static Material edgeDetectMaterial, grayscaleMaterial; - private static AudioClip tick; private RenderTexture rt; - /* FIXME: unused */ //private Rect camRect; private int updateFrame, width, height; private List cons; private Bounds bounds; private int activeCon; - private double switchTime; public GameObject lookat; public CrashObjectName lookdetail; - public void setup ( int w , int h , GameObject focus ) { - if (edgeDetectShader == null) { - // simple colour based edge detection that comes with Unity Pro - edgeDetectShader = Shader.Find ("Hidden/Edge Detect X"); - edgeDetectMaterial = new Material (edgeDetectShader); - edgeDetectMaterial.SetFloat ("_Threshold" , 0.05f); - - // greyscale shader that comes with Unity Pro - grayscaleShader = Shader.Find ("Hidden/Grayscale Effect"); - grayscaleMaterial = new Material (grayscaleShader); - Texture2D t = new Texture2D (256 , 1 , TextureFormat.RGB24 , false); - // ramp texture to render everything in dark shades of Amber, - // except originally dark lines, which become bright Amber - for (int i=0; i<256; ++i) - t.SetPixel (i , 0 , palette.lerp (palette.black , palette.xkcd_Amber , i / 1024f)); - for (int i=0; i<10; ++i) - t.SetPixel (i , 0 , palette.xkcd_Amber); - t.Apply (); - grayscaleMaterial.SetTexture ("_RampTex" , t); - } - if (lookat != focus) { - switchTime = Time.realtimeSinceStartup; + public void setup(int w, int h, GameObject focus) + { + edgeDetectMaterial = new Material(SCAN_UI_Loader.EdgeDetectShader); + edgeDetectMaterial.SetFloat("_Threshold", 0.05f); + + grayscaleMaterial = new Material(SCAN_UI_Loader.GreyScaleShader); + Texture2D t = new Texture2D(256, 1, TextureFormat.RGB24, false); + + // ramp texture to render everything in dark shades of Amber, + // except originally dark lines, which become bright Amber + for (int i = 0; i < 256; ++i) + t.SetPixel(i, 0, palette.lerp(palette.black, palette.xkcd_Amber, i / 1024f)); + for (int i = 0; i < 10; ++i) + t.SetPixel(i, 0, palette.xkcd_Amber); + t.Apply(); + grayscaleMaterial.SetTexture("_RampTex", t); + + if (lookat != focus) + { lookdetail = null; - bounds = new Bounds (); + bounds = new Bounds(); foreach (Collider c in focus.GetComponentsInChildren()) - bounds.Encapsulate (c.bounds); - cons = new List (); - foreach (CrashObjectName con in focus.GetComponentsInChildren()) { - cons.Add (con); + bounds.Encapsulate(c.bounds); + cons = new List(); + foreach (CrashObjectName con in focus.GetComponentsInChildren()) + { + cons.Add(con); } } lookat = focus; width = w; height = h; - /* FIXME: unused */ //camRect = new Rect (0 , 0 , width , height); } - public void free () { - GameObject.Destroy (camgo); - RenderTexture.Destroy (rt); + public bool valid(GameObject focus) + { + if (focus == null) + return false; + + if (focus != lookat) + return false; + + return true; + } + + public void free() + { + GameObject.Destroy(camgo); + RenderTexture.Destroy(rt); cam = null; camgo = null; rt = null; } - public void updateCamera () { + private void updateCamera() + { if (updateFrame > Time.frameCount - 5) return; - if (rt == null || rt.width != width || rt.height != height) { - rt = new RenderTexture (width , height , 32 , RenderTextureFormat.RGB565); - rt.Create (); - } - if (camgo == null) { - camgo = new GameObject (); + + if (rt == null || rt.width != width || rt.height != height) + { + rt = new RenderTexture(width, height, 32, RenderTextureFormat.RGB565); + rt.Create(); } - if (cam == null) { - cam = camgo.AddComponent (); - cam.enabled = false; // so we can render on demand + + if (camgo == null) + camgo = new GameObject(); + + if (cam == null) + { + cam = camgo.AddComponent(); + cam.enabled = false; cam.targetTexture = rt; cam.aspect = width * 1f / height; cam.fieldOfView = 90; } Vector3 pos_target = lookat.transform.position; + if (lookdetail != null) pos_target = lookdetail.transform.position; + Vector3 pos_cam = FlightGlobals.ActiveVessel.transform.position; Vector3 target_up = (pos_target - FlightGlobals.currentMainBody.transform.position).normalized; Vector3 dir = (pos_target - pos_cam).normalized; - float dist = 100; // TODO: replace with something useful for given object size + float dist = 100; + pos_cam = pos_target - dir * dist / 2 + target_up * dist / 3; Vector3 cam_up = (pos_cam - FlightGlobals.currentMainBody.transform.position).normalized; cam.transform.position = pos_cam; - cam.transform.LookAt (pos_target , cam_up); + cam.transform.LookAt(pos_target, cam_up); cam.farClipPlane = dist * 3; RenderTexture old = RenderTexture.active; RenderTexture.active = rt; - cam.Render (); - Graphics.Blit (rt , rt , edgeDetectMaterial); - Graphics.Blit (rt , rt , grayscaleMaterial); + cam.Render(); + Graphics.Blit(rt, rt, edgeDetectMaterial); + Graphics.Blit(rt, rt, grayscaleMaterial); RenderTexture.active = old; updateFrame = Time.frameCount; } - private bool ticking; - private double lastTick; - private int tickRate = 10; + public Texture getTexture() + { + updateCamera(); + return rt; + } + + public string getInfoString() + { + string info = "No structures found"; + + if (cons.Count > 0) + info = string.Format("Identified {0} structure{1}", cons.Count, cons.Count > 1 ? "s" : ""); - public void drawOverlay ( Rect where , GUIStyle style , bool identified ) { - if (tick == null) { - tick = GameDatabase.Instance.GetAudioClip ("Squad/Sounds/sound_click_tick"); - } - ticking = false; - int chars = (int)((Time.realtimeSinceStartup - switchTime) * tickRate); - Rect r = new Rect (0 , 0 , 240 , 30); - string info = "no structures found"; - if (cons.Count == 1) { - info = "identified 1 structure"; - } else if (cons.Count > 1) { - info = "identified " + cons.Count.ToString () + " structures"; - } - if (!identified) - info = "scanning..."; info = "> " + info; - if (Math.Round (Time.realtimeSinceStartup) % 2 == 0) - info += "_"; - r.x = where.x + 4; - r.y = where.y + 8; - GUI.Label (r , left (info , chars) , style); - if (!identified) - return; + + return info; + } - r.x = where.x + 4; - r.y = where.y + where.height - 60; + public string getAnomalyDataString(bool mouse) + { string sname = lookat.name; + Vector3 lookvec = lookat.transform.position; - if (cons.Count > 0) { - if (Event.current.type == EventType.ScrollWheel && where.Contains (Event.current.mousePosition)) { - activeCon += cons.Count + (Event.current.delta.y > 0 ? 1 : -1); - Event.current.Use (); - switchTime = Time.realtimeSinceStartup; + + if (cons.Count > 0) + { + float scroll = Input.GetAxis("Mouse ScrollWheel"); + + if (mouse && scroll != 0) + { + activeCon += (scroll > 0 ? 1 : -1); + + if (activeCon >= cons.Count) + activeCon = 0; + else if (activeCon < 0) + activeCon = cons.Count - 1; } - activeCon = activeCon % cons.Count; - lookdetail = cons [activeCon]; - /* FIXME: unused */ //Vector3 pos = cam.WorldToScreenPoint (lookdetail.transform.position); + + lookdetail = cons[activeCon]; lookvec = lookdetail.transform.position; sname = lookdetail.objectName; } - if (sname != null) { - GUI.Label (r , left (sname , chars) , style); - r.y += 30; - GUI.Label (r , left (distanceString ((FlightGlobals.ActiveVessel.transform.position - lookvec).magnitude) , chars) , style); - } - if (ticking) { - if (Time.realtimeSinceStartup - lastTick > 1f / tickRate) { - AudioSource.PlayClipAtPoint (tick , Camera.main.transform.position); - lastTick = Time.realtimeSinceStartup; - } - } - } - public string left ( string s , int cnt ) { - if (cnt >= s.Length) - return s; - ticking = true; - return s.Substring (0 , cnt); - } + string dist = SCANuiUtil.distanceString((FlightGlobals.ActiveVessel.transform.position - lookvec).magnitude, 2000); - public string distanceString ( double dist ) { - if (dist < 5000) - return dist.ToString ("N1") + "m"; - return (dist / 1000d).ToString ("N3") + "km"; + return string.Format("{0}\n{1}", sname, dist); } - public Texture getTexture () { - updateCamera (); - return rt; - } } } diff --git a/SCANsat/SCAN_UI/UI_Framework/SCANskins.cs b/SCANsat/SCAN_UI/UI_Framework/SCANskins.cs deleted file mode 100644 index 06d93b5ee..000000000 --- a/SCANsat/SCAN_UI/UI_Framework/SCANskins.cs +++ /dev/null @@ -1,441 +0,0 @@ -#region license -/* - * [Scientific Committee on Advanced Navigation] - * S.C.A.N. Satellite - * - * SCANsat - Skins and Styles setup - * - * Copyright (c)2013 damny; - * Copyright (c)2014 David Grandy ; - * Copyright (c)2014 technogeeky ; - * Copyright (c)2014 (Your Name Here) ; see LICENSE.txt for licensing details. - * - */ -#endregion - -using SCANsat.SCAN_Platform; -using SCANsat.SCAN_Platform.Palettes; -using palette = SCANsat.SCAN_UI.UI_Framework.SCANpalette; -using UnityEngine; - - -namespace SCANsat.SCAN_UI.UI_Framework -{ - [KSPAddon(KSPAddon.Startup.MainMenu, true)] - class SCANskins: SCAN_MBE - { - internal static GUISkin SCAN_skin; - - internal static GUIStyle SCAN_window; - internal static GUIStyle SCAN_tooltip; - internal static GUIStyle SCAN_label; - internal static GUIStyle SCAN_toggle; - - //Button styles - internal static GUIStyle SCAN_button; - internal static GUIStyle SCAN_buttonActive; - internal static GUIStyle SCAN_windowButton; - internal static GUIStyle SCAN_texButton; - internal static GUIStyle SCAN_buttonBorderless; - internal static GUIStyle SCAN_buttonBorderlessSmall; - internal static GUIStyle SCAN_closeButton; - internal static GUIStyle SCAN_headerButton; - - //Map info readout styles - internal static GUIStyle SCAN_readoutLabel; - internal static GUIStyle SCAN_readoutLabelCenter; - internal static GUIStyle SCAN_whiteReadoutLabel; - internal static GUIStyle SCAN_activeReadoutLabel; - internal static GUIStyle SCAN_inactiveReadoutLabel; - internal static GUIStyle SCAN_shadowReadoutLabel; - internal static GUIStyle SCAN_shadowReadoutLabelCenter; - internal static GUIStyle SCAN_whiteLabelCenter; - - //Instrument readout styles - internal static GUIStyle SCAN_insColorLabel; - internal static GUIStyle SCAN_insColorLabelShadow; - internal static GUIStyle SCAN_insWhiteLabel; - internal static GUIStyle SCAN_anomalyOverlay; - - //Resource controller styles - internal static GUIStyle SCAN_labelLeft; - internal static GUIStyle SCAN_labelRight; - internal static GUIStyle SCAN_labelSmall; - internal static GUIStyle SCAN_labelLeftActive; - internal static GUIStyle SCAN_buttonSmall; - - //Settings menu styles - internal static GUIStyle SCAN_headline; - internal static GUIStyle SCAN_headlineSmall; - internal static GUIStyle SCAN_buttonWarning; - internal static GUIStyle SCAN_legendTex; - internal static GUIStyle SCAN_textBox; - internal static GUIStyle SCAN_settingsToggle; - internal static GUIStyle SCAN_boldToggle; - internal static GUIStyle SCAN_labelSmallLeft; - internal static GUIStyle SCAN_labelSmallRight; - internal static GUIStyle SCAN_vertSlider; - internal static GUIStyle SCAN_horSlider; - internal static GUIStyle SCAN_sliderThumb; - internal static GUIStyle SCAN_colorWheelButton; - internal static GUIStyle SCAN_headerLabel; - internal static GUIStyle SCAN_settingsGreyLabel; - - //Styles for map overlay icons - internal static GUIStyle SCAN_orbitalLabelOn; - internal static GUIStyle SCAN_orbitalLabelOff; - - //Drop down menu styles - internal static GUIStyle SCAN_dropDownButton; - internal static GUIStyle SCAN_dropDownButtonActive; - internal static GUIStyle SCAN_dropDownBox; - - internal static Font dotty; - - //Some UI Textures - internal static Texture2D SCAN_toggleOn; - internal static Texture2D SCAN_toggleOnHover; - internal static Texture2D SCAN_dropDownTex; - - //Map Icon Textures - internal static Texture2D SCAN_GridIcon; - internal static Texture2D SCAN_OrbitIcon; - internal static Texture2D SCAN_FlagIcon; - internal static Texture2D SCAN_LegendIcon; - internal static Texture2D SCAN_ColorToggleIcon; - internal static Texture2D SCAN_AsteroidIcon; - internal static Texture2D SCAN_ResourceIcon; - internal static Texture2D SCAN_RefreshIcon; - internal static Texture2D SCAN_ScreenshotIcon; - internal static Texture2D SCAN_ResizeIcon; - internal static Texture2D SCAN_WaypointIcon; - - //Window Textures - internal static Texture2D SCAN_SettingsIcon; - internal static Texture2D SCAN_ColorIcon; - internal static Texture2D SCAN_InstrumentIcon; - internal static Texture2D SCAN_SmallMapIcon; - internal static Texture2D SCAN_BigMapIcon; - internal static Texture2D SCAN_OverlayIcon; - internal static Texture2D SCAN_ZoomMapIcon; - - //Zoom Window Textures - internal static Texture2D SCAN_ZoomOutIcon; - internal static Texture2D SCAN_ZoomInIcon; - internal static Texture2D SCAN_MechJebIcon; - internal static Texture2D SCAN_TargetIcon; - - //App Launcher Textures - internal static Texture2D SCAN_SmallMapAppIcon; - internal static Texture2D SCAN_BigMapAppIcon; - - //Color Wheel Texture - internal static Texture2D SCAN_BigColorWheel; - - protected override void OnGUI_FirstRun() - { - initializeTextures(); - initializeSkins(); - initializeColors(); - } - - private static void initializeTextures() - { - SCAN_toggleOn = GameDatabase.Instance.GetTexture("SCANsat/Icons/SCAN_Toggle", false); - SCAN_toggleOnHover = GameDatabase.Instance.GetTexture("SCANsat/Icons/SCAN_Toggle_Hover", false); - SCAN_dropDownTex = GameDatabase.Instance.GetTexture("SCANsat/Icons/DropDownTex", false); - SCAN_GridIcon = GameDatabase.Instance.GetTexture("SCANsat/Icons/SCAN_Grid_Icon", false); - SCAN_OrbitIcon = GameDatabase.Instance.GetTexture("SCANsat/Icons/SCAN_Orbit_Icon", false); - SCAN_FlagIcon = GameDatabase.Instance.GetTexture("SCANsat/Icons/SCAN_Flag_Icon", false); - SCAN_LegendIcon = GameDatabase.Instance.GetTexture("SCANsat/Icons/SCAN_Legend_Icon", false); - SCAN_ColorToggleIcon = GameDatabase.Instance.GetTexture("SCANsat/Icons/SCAN_ColorToggle_Icon", false); - SCAN_AsteroidIcon = GameDatabase.Instance.GetTexture("SCANsat/Icons/SCAN_Asteroid_Icon", false); - SCAN_ResourceIcon = GameDatabase.Instance.GetTexture("SCANsat/Icons/SCAN_Resource_Icon", false); - SCAN_RefreshIcon = GameDatabase.Instance.GetTexture("SCANsat/Icons/SCAN_Refresh_Icon", false); - SCAN_SettingsIcon = GameDatabase.Instance.GetTexture("SCANsat/Icons/SCAN_Settings_Icon", false); - SCAN_ColorIcon = GameDatabase.Instance.GetTexture("SCANsat/Icons/SCAN_Color_Icon", false); - SCAN_InstrumentIcon = GameDatabase.Instance.GetTexture("SCANsat/Icons/SCAN_Instrument_Icon", false); - SCAN_SmallMapIcon = GameDatabase.Instance.GetTexture("SCANsat/Icons/SCANsat_SmallMap_Icon", false); - SCAN_BigMapIcon = GameDatabase.Instance.GetTexture("SCANsat/Icons/SCANsat_Map_Icon", false); - SCAN_ScreenshotIcon = GameDatabase.Instance.GetTexture("SCANsat/Icons/SCAN_Screenshot_Icon", false); - SCAN_ResizeIcon = GameDatabase.Instance.GetTexture("SCANsat/Icons/SCAN_Resize_Icon", false); - SCAN_SmallMapAppIcon = GameDatabase.Instance.GetTexture("SCANsat/Icons/SCANsat_AppLauncherSmall_Icon", false); - SCAN_BigMapAppIcon = GameDatabase.Instance.GetTexture("SCANsat/Icons/SCANsat_AppLauncherLarge_Icon", false); - SCAN_BigColorWheel = GameDatabase.Instance.GetTexture("SCANsat/Icons/SCAN_BigColorWheel_Tex", false); - SCAN_ZoomInIcon = GameDatabase.Instance.GetTexture("SCANsat/Icons/SCAN_ZoomInIcon", false); - SCAN_ZoomOutIcon = GameDatabase.Instance.GetTexture("SCANsat/Icons/SCAN_ZoomOutIcon", false); - SCAN_WaypointIcon = GameDatabase.Instance.GetTexture("SCANsat/Icons/SCAN_WayPointIcon", false); - SCAN_MechJebIcon = GameDatabase.Instance.GetTexture("SCANsat/Icons/SCAN_MechJebIcon", false); - SCAN_TargetIcon = GameDatabase.Instance.GetTexture("SCANsat/Icons/SCAN_TargetIcon", false); - SCAN_OverlayIcon = GameDatabase.Instance.GetTexture("SCANsat/Icons/SCAN_Overlay_Icon", false); - SCAN_ZoomMapIcon = GameDatabase.Instance.GetTexture("SCANsat/Icons/SCAN_Zoom_Map_Icon", false); - } - - private static void initializeColors() - { - palette.CurrentPalettes = palette.setCurrentPalettesType(Palette.Kind.Diverging, 7); - } - - private static void initializeSkins() - { - SCAN_skin = SCAN_SkinsLibrary.CopySkin("Unity"); - SCAN_SkinsLibrary.AddSkin("SCAN_Unity", SCAN_skin); - - //ScreenMessages SM = (ScreenMessages)GameObject.FindObjectOfType(typeof(ScreenMessages)); - //dotty = SM.textStyles[1].font; - - SCAN_window = new GUIStyle(SCAN_SkinsLibrary.DefUnitySkin.window); - SCAN_window.name = "SCAN_Window"; - - SCAN_label = new GUIStyle(SCAN_SkinsLibrary.DefUnitySkin.label); - SCAN_label.name = "SCAN_Label"; - SCAN_label.normal.textColor = palette.xkcd_PukeGreen; - - //Initialize button styles - SCAN_button = new GUIStyle(SCAN_SkinsLibrary.DefUnitySkin.button); - SCAN_button.name = "SCAN_Button"; - SCAN_button.alignment = TextAnchor.MiddleCenter; - SCAN_button.fontStyle = FontStyle.Bold; - - SCAN_buttonActive = new GUIStyle(SCAN_button); - SCAN_buttonActive.name = "SCAN_ButtonActive"; - SCAN_buttonActive.normal.textColor = palette.xkcd_PukeGreen; - - SCAN_windowButton = new GUIStyle(SCAN_button); - SCAN_windowButton.name = "SCAN_WindowButton"; - SCAN_windowButton.padding = new RectOffset(2, 2, 2, 2); - - SCAN_texButton = new GUIStyle(SCAN_button); - SCAN_texButton.name = "SCAN_TexButton"; - SCAN_texButton.padding = new RectOffset(0, 0, 1, 1); - SCAN_texButton.normal.background = SCAN_SkinsLibrary.DefUnitySkin.label.normal.background; - SCAN_texButton.hover.background = SCAN_SkinsLibrary.DefUnitySkin.label.normal.background; - SCAN_texButton.active.background = SCAN_SkinsLibrary.DefUnitySkin.label.normal.background; - - SCAN_colorWheelButton = new GUIStyle(SCAN_texButton); - SCAN_colorWheelButton.name = "SCAN_ColorWheelButton"; - SCAN_colorWheelButton.padding = new RectOffset(0, 0, 0, 0); - SCAN_colorWheelButton.margin = new RectOffset(0, 0, 0, 0); - SCAN_colorWheelButton.border = new RectOffset(0, 0, 0, 0); - - SCAN_buttonBorderless = new GUIStyle(SCAN_button); - SCAN_buttonBorderless.name = "SCAN_ButtonBorderless"; - SCAN_buttonBorderless.fontSize = 14; - SCAN_buttonBorderless.margin = new RectOffset(2, 2, 2, 2); - SCAN_buttonBorderless.padding = new RectOffset(2, 2, 2, 2); - SCAN_buttonBorderless.normal.background = SCAN_SkinsLibrary.DefUnitySkin.label.normal.background; - - SCAN_buttonBorderlessSmall = new GUIStyle(SCAN_buttonBorderless); - SCAN_buttonBorderlessSmall.fontSize = 12; - - SCAN_closeButton = new GUIStyle(SCAN_buttonBorderless); - SCAN_closeButton.name = "SCAN_CloseButton"; - SCAN_closeButton.normal.textColor = palette.cb_vermillion; - SCAN_closeButton.alignment = TextAnchor.MiddleLeft; - - //Initialize drop down menu styles - SCAN_dropDownBox = new GUIStyle(SCAN_SkinsLibrary.DefUnitySkin.box); - SCAN_dropDownBox.name = "SCAN_DropDownBox"; - SCAN_dropDownBox.normal.background = SCAN_dropDownTex; - - SCAN_dropDownButton = new GUIStyle(SCAN_label); - SCAN_dropDownButton.name = "SCAN_DropDownButton"; - SCAN_dropDownButton.padding = new RectOffset(2, 2, 2, 2); - SCAN_dropDownButton.normal.textColor = palette.xkcd_White; - SCAN_dropDownButton.hover.textColor = palette.black; - Texture2D sortBackground = new Texture2D(1, 1); - sortBackground.SetPixel(1, 1, palette.xkcd_White); - sortBackground.Apply(); - SCAN_dropDownButton.hover.background = sortBackground; - SCAN_dropDownButton.alignment = TextAnchor.MiddleLeft; - SCAN_dropDownButton.fontStyle = FontStyle.Bold; - - SCAN_dropDownButtonActive = new GUIStyle(SCAN_dropDownButton); - SCAN_dropDownButtonActive.normal.textColor = palette.xkcd_PukeGreen; - - //Initialize info readout styles - SCAN_readoutLabel = new GUIStyle(SCAN_label); - SCAN_readoutLabel.name = "SCAN_ReadoutLabel"; - SCAN_readoutLabel.fontStyle = FontStyle.Bold; - - SCAN_readoutLabelCenter = new GUIStyle(SCAN_readoutLabel); - SCAN_readoutLabelCenter.alignment = TextAnchor.MiddleCenter; - SCAN_readoutLabelCenter.wordWrap = false; - - SCAN_whiteReadoutLabel = new GUIStyle(SCAN_readoutLabel); - SCAN_whiteReadoutLabel.name = "SCAN_WhiteLabel"; - SCAN_whiteReadoutLabel.normal.textColor = palette.white; - SCAN_whiteReadoutLabel.wordWrap = false; - - SCAN_activeReadoutLabel = new GUIStyle(SCAN_readoutLabel); - SCAN_activeReadoutLabel.name = "SCAN_ActiveLabel"; - SCAN_activeReadoutLabel.normal.textColor = palette.cb_bluishGreen; - - SCAN_inactiveReadoutLabel = new GUIStyle(SCAN_readoutLabel); - SCAN_inactiveReadoutLabel.name = "SCAN_InactiveLabel"; - SCAN_inactiveReadoutLabel.normal.textColor = palette.xkcd_LightGrey; - - SCAN_shadowReadoutLabel = new GUIStyle(SCAN_readoutLabel); - SCAN_shadowReadoutLabel.name = "SCAN_ShadowLabel"; - SCAN_shadowReadoutLabel.normal.textColor = palette.black; - - SCAN_shadowReadoutLabelCenter = new GUIStyle(SCAN_shadowReadoutLabel); - SCAN_shadowReadoutLabelCenter.alignment = TextAnchor.MiddleCenter; - - SCAN_whiteLabelCenter = new GUIStyle(SCAN_whiteReadoutLabel); - SCAN_whiteLabelCenter.name = "SCAN_WhiteLabelCenter"; - SCAN_whiteLabelCenter.alignment = TextAnchor.MiddleCenter; - - //Initialize instrument styles - SCAN_insColorLabel = new GUIStyle(SCAN_label); - SCAN_insColorLabel.name = "SCAN_InsColorLabel"; - SCAN_insColorLabel.alignment = TextAnchor.MiddleCenter; - SCAN_insColorLabel.fontSize = 20; - - SCAN_insColorLabelShadow = new GUIStyle(SCAN_insColorLabel); - SCAN_insColorLabelShadow.normal.textColor = palette.black; - - SCAN_insWhiteLabel = new GUIStyle(SCAN_whiteReadoutLabel); - SCAN_insWhiteLabel.name = "SCAN_InsWhiteLabel"; - SCAN_insWhiteLabel.alignment = TextAnchor.MiddleCenter; - SCAN_insWhiteLabel.fontStyle = FontStyle.Normal; - SCAN_insWhiteLabel.fontSize = 20; - - SCAN_anomalyOverlay = new GUIStyle(SCAN_SkinsLibrary.DefUnitySkin.label); - SCAN_anomalyOverlay.name = "SCAN_AnomalyOverlay"; - SCAN_anomalyOverlay.font = dotty; - SCAN_anomalyOverlay.fontSize = 20; - SCAN_anomalyOverlay.fontStyle = FontStyle.Bold; - SCAN_anomalyOverlay.normal.textColor = palette.cb_skyBlue; - - //Resource Control settings - SCAN_labelLeft = new GUIStyle(SCAN_texButton); - SCAN_labelLeft.fontSize = 12; - SCAN_labelLeft.hover.textColor = palette.cb_bluishGreen; - SCAN_labelLeft.alignment = TextAnchor.MiddleLeft; - - SCAN_labelLeftActive = new GUIStyle(SCAN_labelLeft); - SCAN_labelLeftActive.normal.textColor = palette.cb_bluishGreen; - - SCAN_labelRight = new GUIStyle(SCAN_labelLeft); - SCAN_labelRight.alignment = TextAnchor.MiddleRight; - - SCAN_labelSmall = new GUIStyle(SCAN_whiteReadoutLabel); - SCAN_labelSmall.fontSize = 10; - SCAN_labelSmall.alignment = TextAnchor.MiddleCenter; - SCAN_labelSmall.fontStyle = FontStyle.Bold; - - SCAN_buttonSmall = new GUIStyle(SCAN_SkinsLibrary.DefUnitySkin.button); - SCAN_buttonSmall.fontSize = 10; - SCAN_buttonSmall.alignment = TextAnchor.MiddleLeft; - SCAN_buttonSmall.fontStyle = FontStyle.Bold; - - //Initialize settings menu styles - SCAN_headline = new GUIStyle(SCAN_SkinsLibrary.DefUnitySkin.label); - SCAN_headline.name = "SCAN_Headline"; - SCAN_headline.normal.textColor = palette.xkcd_YellowGreen; - SCAN_headline.alignment = TextAnchor.MiddleCenter; - SCAN_headline.fontSize = 20; - SCAN_headline.font = dotty; - - SCAN_headerButton = new GUIStyle(SCAN_SkinsLibrary.DefUnitySkin.button); - SCAN_headerButton.fontSize = 18; - SCAN_headerButton.fontStyle = FontStyle.Bold; - - SCAN_headerLabel = new GUIStyle(SCAN_SkinsLibrary.DefUnitySkin.label); - SCAN_headerLabel.fontSize = 18; - SCAN_headerLabel.fontStyle = FontStyle.Bold; - - SCAN_headlineSmall = new GUIStyle(SCAN_headline); - SCAN_headlineSmall.name = "SCAN_HeadlineSmall"; - SCAN_headlineSmall.fontSize = 16; - - SCAN_labelSmallLeft = new GUIStyle(SCAN_whiteReadoutLabel); - SCAN_labelSmallLeft.name = "SCAN_LabelSmallLeft"; - SCAN_labelSmallLeft.fontSize = 10; - SCAN_labelSmallLeft.alignment = TextAnchor.MiddleLeft; - - SCAN_labelSmallRight = new GUIStyle(SCAN_labelSmallLeft); - SCAN_labelSmallRight.name = "SCAN_LabelSmallRight"; - SCAN_labelSmallRight.alignment = TextAnchor.MiddleRight; - - SCAN_buttonWarning = new GUIStyle(SCAN_button); - SCAN_buttonWarning.name = "SCAN_ButtonWarning"; - SCAN_buttonWarning.fontSize = 16; - SCAN_buttonWarning.fontStyle = FontStyle.Bold; - SCAN_buttonWarning.normal.textColor = palette.cb_vermillion; - - SCAN_toggle = new GUIStyle(SCAN_SkinsLibrary.DefKSPSkin.toggle); - SCAN_toggle.name = "SCAN_Toggle"; - SCAN_toggle.font = dotty; - SCAN_toggle.onNormal.textColor = palette.xkcd_YellowGreen; - SCAN_toggle.fontSize = 20; - SCAN_toggle.fixedHeight = 28; - SCAN_toggle.fixedWidth = 28; - - SCAN_settingsToggle = new GUIStyle(SCAN_SkinsLibrary.DefUnitySkin.toggle); - SCAN_settingsToggle.name = "SCAN_SettingsToggle"; - SCAN_settingsToggle.onNormal.background = SCAN_toggleOn; - SCAN_settingsToggle.onHover.background = SCAN_toggleOnHover; - SCAN_settingsToggle.onNormal.background.wrapMode = TextureWrapMode.Clamp; - SCAN_settingsToggle.onHover.background.wrapMode = TextureWrapMode.Clamp; - SCAN_settingsToggle.border = new RectOffset(15, 0, 1, 1); - - SCAN_settingsGreyLabel = new GUIStyle(SCAN_SkinsLibrary.DefUnitySkin.label); - - SCAN_boldToggle = new GUIStyle(SCAN_settingsToggle); - SCAN_boldToggle.name = "SCAN_BoldToggle"; - SCAN_boldToggle.fontStyle = FontStyle.Bold; - - SCAN_textBox = new GUIStyle(SCAN_SkinsLibrary.DefUnitySkin.textField); - SCAN_textBox.name = "SCAN_TextBox"; - - SCAN_legendTex = new GUIStyle(SCAN_label); - SCAN_legendTex.name = "SCAN_LegendTex"; - SCAN_legendTex.alignment = TextAnchor.MiddleCenter; - - SCAN_vertSlider = new GUIStyle(SCAN_SkinsLibrary.DefKSPSkin.verticalSlider); - SCAN_vertSlider.name = "SCAN_VertSlider"; - - SCAN_horSlider = new GUIStyle(SCAN_SkinsLibrary.DefUnitySkin.horizontalSlider); - - SCAN_sliderThumb = new GUIStyle(SCAN_SkinsLibrary.DefKSPSkin.verticalSliderThumb); - SCAN_sliderThumb.name = "SCAN_SliderThumb"; - - SCAN_tooltip = new GUIStyle(SCAN_SkinsLibrary.DefUnitySkin.box); - SCAN_tooltip.name = "SCAN_Tooltip"; - SCAN_tooltip.normal.background = SCAN_dropDownTex; - SCAN_tooltip.fontStyle = FontStyle.Bold; - SCAN_tooltip.normal.textColor = palette.white; - SCAN_tooltip.alignment = TextAnchor.MiddleCenter; - SCAN_tooltip.fontSize = 13; - - SCAN_orbitalLabelOn = new GUIStyle(SCAN_label); - SCAN_orbitalLabelOn.name = "SCAN_OrbitalLabelOn"; - SCAN_orbitalLabelOn.fontSize = 13; - SCAN_orbitalLabelOn.fontStyle = FontStyle.Bold; - SCAN_orbitalLabelOn.normal.textColor = palette.cb_yellow; - - SCAN_orbitalLabelOff = new GUIStyle(SCAN_orbitalLabelOn); - SCAN_orbitalLabelOff.name = "SCAN_OrbitalLabelOff"; - SCAN_orbitalLabelOff.normal.textColor = palette.white; - - //Add styles to skin - SCAN_SkinsLibrary.knownSkins["SCAN_Unity"].window = new GUIStyle(SCAN_window); - SCAN_SkinsLibrary.knownSkins["SCAN_Unity"].button = new GUIStyle(SCAN_button); - SCAN_SkinsLibrary.knownSkins["SCAN_Unity"].toggle = new GUIStyle(SCAN_toggle); - SCAN_SkinsLibrary.knownSkins["SCAN_Unity"].label = new GUIStyle(SCAN_label); - SCAN_SkinsLibrary.knownSkins["SCAN_Unity"].box = new GUIStyle(SCAN_dropDownBox); - SCAN_SkinsLibrary.knownSkins["SCAN_Unity"].horizontalSlider = new GUIStyle(SCAN_horSlider); - - SCAN_SkinsLibrary.AddStyle(SCAN_window, "SCAN_Unity"); - SCAN_SkinsLibrary.AddStyle(SCAN_button, "SCAN_Unity"); - SCAN_SkinsLibrary.AddStyle(SCAN_toggle, "SCAN_Unity"); - SCAN_SkinsLibrary.AddStyle(SCAN_label, "SCAN_Unity"); - SCAN_SkinsLibrary.AddStyle(SCAN_tooltip, "SCAN_Unity"); - SCAN_SkinsLibrary.AddStyle(SCAN_dropDownBox, "SCAN_Unity"); - SCAN_SkinsLibrary.AddStyle(SCAN_horSlider, "SCAN_Unity"); - } - - } -} diff --git a/SCANsat/SCAN_UI/UI_Framework/SCANuiColorPicker.cs b/SCANsat/SCAN_UI/UI_Framework/SCANuiColorPicker.cs deleted file mode 100644 index 9f1d8879e..000000000 --- a/SCANsat/SCAN_UI/UI_Framework/SCANuiColorPicker.cs +++ /dev/null @@ -1,181 +0,0 @@ -#region license -/* - * [Scientific Committee on Advanced Navigation] - * S.C.A.N. Satellite - * - * SCANuiColorPicker - object to handle color selection from an HSV color picker - * - * Copyright (c)2014 David Grandy ; - * Copyright (c)2014 technogeeky ; - * Copyright (c)2014 (Your Name Here) ; see LICENSE.txt for licensing details. - */ -#endregion - -using UnityEngine; - -namespace SCANsat.SCAN_UI.UI_Framework -{ - public class SCANuiColorPicker - { - private float valSlider, oldValSlider; - private bool lowColorChange, oldColorState; - private string lowToolTip, highToolTip, valueToolTip; - private Color c = new Color(); - private Color colorLow = new Color(); - private Color colorHigh = new Color(); - private Texture2D minColorPreview = new Texture2D(1, 1); - private Texture2D minColorOld = new Texture2D(1, 1); - private Texture2D maxColorPreview = new Texture2D(1, 1); - private Texture2D maxColorOld = new Texture2D(1, 1); - - public Color ColorLow - { - get { return colorLow; } - } - - public Color ColorHigh - { - get { return colorHigh; } - } - - public bool LowColorChange - { - get { return lowColorChange; } - } - - internal SCANuiColorPicker (Color low, Color high, string tipLow, string tipHigh, string tipValue, bool changeLow) - { - colorLow = c= low; - c = colorLow.maxBright(); - colorHigh = high; - lowToolTip = tipLow; - highToolTip = tipHigh; - valueToolTip = tipValue; - lowColorChange = oldColorState = changeLow; - valSlider = oldValSlider = colorLow.Brightness().Mathf_Round(2) * 100f; - } - - internal void drawColorSelector(Rect R) - { - GUILayout.Space(20); - GUILayout.BeginVertical(); - GUILayout.Label("Color Selection", SCANskins.SCAN_headline); - GUILayout.BeginHorizontal(); - GUILayout.Space(30); - GUILayout.Label(SCANskins.SCAN_BigColorWheel); - Rect r = GUILayoutUtility.GetLastRect(); - GUILayout.EndHorizontal(); - GUILayout.EndVertical(); - - Rect s = new Rect(r.x + 170, r.y + 100, 80, 30); - GUI.Label(s, new GUIContent("Value: " + valSlider.ToString("N0") + "%", valueToolTip), SCANskins.SCAN_whiteReadoutLabel); - - s.x += 80; - s.y -= 90; - s.width = 30; - s.height = 200; - - GUI.Label(s, new GUIContent("", valueToolTip)); - - valSlider = GUI.VerticalSlider(s, valSlider, 100, 0, SCANskins.SCAN_vertSlider, SCANskins.SCAN_sliderThumb).Mathf_Round(0); - - SCANuiUtil.drawVerticalSliderLabel(s, "0%", "100%"); - - if (GUI.RepeatButton(r, "", SCANskins.SCAN_colorWheelButton)) - { - int a = (int)Input.mousePosition.x; - int b = Screen.height - (int)Input.mousePosition.y; - - c = SCANskins.SCAN_BigColorWheel.GetPixel(a - (int)R.x - (int)r.x, -(b - (int)R.y - (int)r.y)); - - if (lowColorChange) - colorLow = c * new Color(valSlider / 100f, valSlider / 100f, valSlider / 100f); - else - colorHigh = c * new Color(valSlider / 100f, valSlider / 100f, valSlider / 100f); - } - - r.x -= 55; - r.y += 145; - r.width = 60; - r.height = 30; - - colorSwatches(r, "Low", lowToolTip, ref lowColorChange, true, minColorPreview, minColorOld, colorLow); - - r.x += 150; - colorSwatches(r, "High", highToolTip, ref lowColorChange, false, maxColorPreview, maxColorOld, colorHigh); - - r.x -= 60; - r.y += 30; - GUI.Label(r, "New", SCANskins.SCAN_headlineSmall); - - r.y += 32; - GUI.Label(r, "Old", SCANskins.SCAN_headlineSmall); - } - - private void colorSwatches(Rect R, string Title, string ToolTip, ref bool Active, bool Low, Texture2D Preview, Texture2D Current, Color New) - { - bool active; - if (Low) - active = Active; - else - active = !Active; - - active = GUI.Toggle(R, active, new GUIContent(Title, ToolTip)); - - if (Low) - Active = active; - else - Active = !active; - - R.x += 10; - R.y += 30; - - Preview.SetPixel(0, 0, New); - Preview.Apply(); - GUI.DrawTexture(R, Preview); - - R.y += 32; - GUI.DrawTexture(R, Current); - } - - internal void brightnessChanged() - { - if (oldValSlider != valSlider) - { - oldValSlider = valSlider; - if (lowColorChange) - colorLow = c * new Color(valSlider / 100f, valSlider / 100f, valSlider / 100f); - else - colorHigh = c * new Color(valSlider / 100f, valSlider / 100f, valSlider / 100f); - } - } - - internal void colorStateChanged() - { - if (oldColorState != lowColorChange) - { - oldColorState = lowColorChange; - if (lowColorChange) - { - c = colorLow.maxBright(); - valSlider = colorLow.Brightness().Mathf_Round(2) * 100f; - } - else - { - c = colorHigh.maxBright(); - valSlider = colorHigh.Brightness().Mathf_Round(2) * 100f; - } - oldValSlider = valSlider; - } - } - - internal void updateOldSwatches() - { - minColorOld.SetPixel(0, 0, colorLow); - minColorOld.Apply(); - - maxColorOld.SetPixel(0, 0, colorHigh); - maxColorOld.Apply(); - } - } -} diff --git a/SCANsat/SCAN_UI/UI_Framework/SCANuiSlider.cs b/SCANsat/SCAN_UI/UI_Framework/SCANuiSlider.cs deleted file mode 100644 index 9e8d717ba..000000000 --- a/SCANsat/SCAN_UI/UI_Framework/SCANuiSlider.cs +++ /dev/null @@ -1,101 +0,0 @@ -#region license -/* - * [Scientific Committee on Advanced Navigation] - * S.C.A.N. Satellite - * - * SCANuiSlider - object to handle drawing and labeling GUI sliders - * - * Copyright (c)2014 David Grandy ; - * Copyright (c)2014 technogeeky ; - * Copyright (c)2014 (Your Name Here) ; see LICENSE.txt for licensing details. - */ -#endregion - -using UnityEngine; - -namespace SCANsat.SCAN_UI.UI_Framework -{ - public class SCANuiSlider - { - private float minValue, maxValue, currentValue; - private float oldValue; - private float width; - private float extraLabelWidth; - private string title, units, tooltip; - private int precision; - - public float MinValue - { - get { return minValue; } - internal set - { - if (value < maxValue) - minValue = value; - } - } - - public float MaxValue - { - get { return maxValue; } - internal set - { - if (value > minValue) - maxValue = value; - } - } - - //public float CurrentValue - //{ - // get { return currentValue; } - // internal set { currentValue = value; } - //} - - public SCANuiSlider(float Min, float Max, float Value, string Title, string Units, string Tooltip, int Prec, float w = 260, float extraLabel = 0) - { - minValue = Min; - maxValue = Max; - currentValue = Value; - oldValue = Value; - title = Title; - units = Units; - tooltip = Tooltip; - precision = Prec; - width = w; - extraLabelWidth = extraLabel; - } - - public float drawSlider(bool under, ref float value) - { - string s = title + value + units; - GUILayout.Label(under ? new GUIContent(s) : new GUIContent(s, tooltip), SCANskins.SCAN_whiteReadoutLabel); - - Rect r = GUILayoutUtility.GetLastRect(); - r.x += 110 + extraLabelWidth; - r.width = width; - - if (under) - GUI.Label(r, "", SCANskins.SCAN_horSlider); - else - value = GUI.HorizontalSlider(r, value, minValue, maxValue).Mathf_Round(precision); - - int i = precision <= 0 ? 0 : precision; - string labelPrecision = "F" + i.ToString(); - SCANuiUtil.drawSliderLabel(r, minValue.ToString(labelPrecision) + units, maxValue.ToString(labelPrecision) + units); - - currentValue = value; - - return value; - } - - public bool valueChanged() - { - if (oldValue != currentValue) - { - oldValue = currentValue; - return true; - } - - return false; - } - } -} diff --git a/SCANsat/SCAN_UI/UI_Framework/SCANuiUtil.cs b/SCANsat/SCAN_UI/UI_Framework/SCANuiUtil.cs index 7995c6030..5d2595f11 100644 --- a/SCANsat/SCAN_UI/UI_Framework/SCANuiUtil.cs +++ b/SCANsat/SCAN_UI/UI_Framework/SCANuiUtil.cs @@ -22,6 +22,7 @@ using SCANsat.SCAN_Platform; using SCANsat.SCAN_Data; using SCANsat.SCAN_Map; +using SCANsat.SCAN_Unity; using palette = SCANsat.SCAN_UI.UI_Framework.SCANpalette; using UnityEngine; @@ -29,404 +30,171 @@ namespace SCANsat.SCAN_UI.UI_Framework { static class SCANuiUtil { + #region UI Utilities - #region Text labels - - //Generates a text label with a black border - //Basically generates several offset black labels with a color label on top of it - internal static bool readableLabel(string text, bool active) + internal static string getResourceAbundance(CelestialBody Body, double lat, double lon, bool fuzzy, SCANresourceGlobal resource) { - string textpoor = Regex.Replace(text, "<[^>]*>", ""); - GUI.color = palette.black; - GUILayout.Label(textpoor, SCANskins.SCAN_shadowReadoutLabel); - Rect r = GUILayoutUtility.GetLastRect(); - r.x += 2; - GUI.Label(r, textpoor, SCANskins.SCAN_shadowReadoutLabel); - r.x -= 1; - r.y -= 1; - GUI.Label(r, textpoor, SCANskins.SCAN_shadowReadoutLabel); - r.y += 2; - GUI.Label(r, textpoor, SCANskins.SCAN_shadowReadoutLabel); - r.y -= 1; - GUI.color = palette.white; - if (active) - GUI.Label(r, text, SCANskins.SCAN_readoutLabel); - else - GUI.Label(r, text, SCANskins.SCAN_whiteReadoutLabel); - if (!Event.current.isMouse) - return false; - return r.Contains(Event.current.mousePosition); - } + string label = ""; - //Used to label icons drawn over the map; similar to readableLabel - internal static void drawLabel(Rect r, string txt, GUIStyle labelStyle, bool outline = false, GUIStyle shadowStyle = null, bool Flash = false, GUIStyle flashStyle = null, bool aligned = false) - { - if (txt.Length < 1) - return; - if (aligned) - { - Vector2 sz = labelStyle.CalcSize(new GUIContent(txt.Substring(0, 1))); - r.x -= sz.x / 2; - r.y -= sz.y / 2; - } - if (outline) - { - r.x -= 1; - GUI.Label(r, txt, shadowStyle); - r.x += 2; - GUI.Label(r, txt, shadowStyle); - r.x -= 1; - r.y -= 1; - GUI.Label(r, txt, shadowStyle); - r.y += 2; - GUI.Label(r, txt, shadowStyle); - r.y -= 1; - } - if (Flash) - GUI.Label(r, txt, flashStyle); + if (fuzzy) + label = resourceLabel(true, lat, lon, resource, Body); + else if (narrowBandInOrbit(Body, lat, resource)) + label = resourceLabel(false, lat, lon, resource, Body); else - GUI.Label(r, txt, labelStyle); + label = resourceLabel(true, lat, lon, resource, Body); + + return label; } - //A smaller font-size, simpler label method - internal static void drawLabel(Rect r, string txt, bool aligned, bool left) + internal static bool narrowBandInOrbit(CelestialBody b, double lat, SCANresourceGlobal resource) { - if (txt.Length < 1) - return; - if (aligned) + if (SCAN_Settings_Config.Instance.RequireNarrowBand) { - Vector2 sz = SCANskins.SCAN_labelSmallLeft.CalcSize(new GUIContent(txt.Substring(0, 1))); - r.x -= sz.x / 2; - r.y -= sz.y / 2; - } - if (left) - GUI.Label(r, txt, SCANskins.SCAN_labelSmallLeft); - else - GUI.Label(r, txt, SCANskins.SCAN_labelSmallRight); - } - - #endregion + if (resource == null) + return false; - #region UI Utilities + bool scanner = false; - //Generates a string with info from mousing over the map - internal static void mouseOverInfo(double lon, double lat, SCANmap mapObj, SCANdata data, CelestialBody body, bool b, ref StringBuilder sb, ref StringBuilder sb2) - { - if (Event.current.type == EventType.Repaint) - { - sb.Length = 0; - sb2.Length = 0; - if (b) + foreach (Vessel vessel in FlightGlobals.Vessels) { - if (SCANUtil.isCovered(lon, lat, data, SCANtype.AltimetryLoRes)) - { - if (body.pqsController == null) - sb.Append(palette.colored(palette.c_ugly, "LO ")); - else - sb.Append(palette.colored(palette.c_good, "LO ")); - } - else - sb.Append(palette.colored(palette.grey, "LO ")); - if (SCANUtil.isCovered(lon, lat, data, SCANtype.AltimetryHiRes)) - { - if (body.pqsController == null) - sb.Append(palette.colored(palette.c_ugly, "HI ")); - else - sb.Append(palette.colored(palette.c_good, "HI ")); - } - else - sb.Append(palette.colored(palette.grey, "HI ")); - if (SCANUtil.isCovered(lon, lat, data, SCANtype.Biome)) - { - if (body.BiomeMap == null) - sb.Append(palette.colored(palette.c_ugly, "MULTI ")); - else - sb.Append(palette.colored(palette.c_good, "MULTI ")); - } - else - sb.Append(palette.colored(palette.grey, "MULTI ")); + if (vessel.protoVessel.protoPartSnapshots.Count <= 1) + continue; - if (SCANUtil.isCovered(lon, lat, data, SCANtype.Altimetry)) - { - sb.Append(getMouseOverElevation(lon, lat, data, 2)); + if (vessel.vesselType == VesselType.Debris || vessel.vesselType == VesselType.Unknown || vessel.vesselType == VesselType.EVA || vessel.vesselType == VesselType.Flag) + continue; - if (SCANUtil.isCovered(lon, lat, data, SCANtype.AltimetryHiRes)) - { - double circum = body.Radius * 2 * Math.PI; - double eqDistancePerDegree = circum / 360; - double degreeOffset = 5 / eqDistancePerDegree; + if (vessel.mainBody != b) + continue; - sb.AppendFormat(" {0:F1}° ", SCANUtil.slope(SCANUtil.getElevation(body, lon, lat), body, lon, lat, degreeOffset)); - } - } + if ((vessel.loaded ? vessel.situation : vessel.protoVessel.situation) != Vessel.Situations.ORBITING) + continue; - if (SCANUtil.isCovered(lon, lat, data, SCANtype.Biome)) - { - sb.Append(SCANUtil.getBiomeName(body, lon, lat)); - sb.Append(" "); - } + if ((inc(vessel.orbit.inclination) + 5) < Math.Abs(lat)) + continue; - if (mapObj.ResourceActive && SCANconfigLoader.GlobalResource && mapObj.Resource != null) //Adds selected resource amount to big map legend + if (SCAN_Settings_Config.Instance.DisableStockResource) { - bool resources = false; - bool fuzzy = false; + var scanners = from pref in vessel.protoVessel.protoPartSnapshots + where pref.modules.Any(a => a.moduleName == "ModuleSCANresourceScanner") + select pref; - if (SCANUtil.isCovered(lon, lat, data, mapObj.Resource.SType)) - { - resources = true; - } - else if (SCANUtil.isCovered(lon, lat, data, SCANtype.FuzzyResources)) - { - resources = true; - fuzzy = true; - } + if (scanners.Count() == 0) + continue; - if (resources) + foreach (var p in scanners) { - sb.Append(palette.colored(mapObj.Resource.MaxColor, getResourceAbundance(mapObj.Body, lat, lon, fuzzy, mapObj.Resource))); - sb.Append(" "); - } - } + if (p.partInfo == null) + continue; - if (SCANcontroller.controller.map_waypoints) - { - double range = ContractDefs.Survey.MaximumTriggerRange; - foreach (SCANwaypoint p in data.Waypoints) - { - if (!p.LandingTarget) - { - if (p.Root != null) - { - if (p.Root.ContractState != Contracts.Contract.State.Active) - continue; - } - if (p.Param != null) - { - if (p.Param.State != Contracts.ParameterState.Incomplete) - continue; - } + ConfigNode node = p.partInfo.partConfig; - if (SCANUtil.waypointDistance(lat, lon, 1000, p.Latitude, p.Longitude, 1000, body) <= range) - { - sb.Append(p.Name); - sb.Append(" "); - break; - } - } - } - } + if (node == null) + continue; - sb2.AppendFormat("{0} (lat: {1:F2} lon: {2:F2})", toDMS(lat, lon), lat, lon); - } - } - //else - //{ - // info += " " + mlat.ToString("F") + " " + mlon.ToString("F"); // uncomment for debugging projections - //} + var moduleNodes = from nodes in node.GetNodes("MODULE") + where nodes.GetValue("name") == "ModuleSCANresourceScanner" + select nodes; - //Draw the readout info labels - readableLabel(sb.ToString(), false); - SCAN_MBW.fillS(-10); - readableLabel(sb2.ToString(), false); - } + foreach (ConfigNode moduleNode in moduleNodes) + { + if (moduleNode == null) + continue; - internal static void mouseOverInfoSimple(double lon, double lat, SCANmap mapObj, SCANdata data, CelestialBody body, bool b, ref StringBuilder sb, ref StringBuilder sb2) - { - if (Event.current.type == EventType.Repaint) - { - sb.Length = 0; - sb2.Length = 0; - if (b) - { - if (SCANUtil.isCovered(lon, lat, data, SCANtype.Altimetry)) - { - sb.Append(getMouseOverElevation(lon, lat, data, 0)); + if (!moduleNode.HasValue("sensorType")) + continue; - if (SCANUtil.isCovered(lon, lat, data, SCANtype.AltimetryHiRes)) - { - double circum = body.Radius * 2 * Math.PI; - double eqDistancePerDegree = circum / 360; - double degreeOffset = 5 / eqDistancePerDegree; + string type = moduleNode.GetValue("sensorType"); - sb.AppendFormat(" {0:F1}° ", SCANUtil.slope(SCANUtil.getElevation(body, lon, lat), body, lon, lat, degreeOffset)); - } - } + int sType = 0; - if (SCANUtil.isCovered(lon, lat, data, SCANtype.Biome)) - { - sb.Append(SCANUtil.getBiomeName(body, lon, lat)); - sb.Append(" "); - } + if (!int.TryParse(type, out sType)) + continue; - if (mapObj.ResourceActive && SCANconfigLoader.GlobalResource && mapObj.Resource != null) - { - string label = ""; - if (SCANUtil.isCovered(lon, lat, data, mapObj.Resource.SType)) - { - double amount = SCANUtil.ResourceOverlay(lat, lon, mapObj.Resource.Name, mapObj.Body, SCANcontroller.controller.resourceBiomeLock); - if (amount < 0) - label = "Unknown"; - else - { - if (amount > 1) - amount = 1; - label = amount.ToString("P2"); - } - sb.Append(palette.colored(mapObj.Resource.MaxColor, string.Format("{0}: {1} ", mapObj.Resource.Name, label))); - } - else if (SCANUtil.isCovered(lon, lat, data, SCANtype.FuzzyResources)) - { - double amount = SCANUtil.ResourceOverlay(lat, lon, mapObj.Resource.Name, mapObj.Body, SCANcontroller.controller.resourceBiomeLock); - if (amount < 0) - label = "Unknown"; - else - { - if (amount > 1) - amount = 1; - label = amount.ToString("P0"); - } - sb.Append(palette.colored(mapObj.Resource.MaxColor, string.Format("{0}: {1} ", mapObj.Resource.Name, label))); - } - } + if ((SCANtype)sType != resource.SType) + continue; - if (SCANcontroller.controller.map_waypoints) - { - double range = ContractDefs.Survey.MaximumTriggerRange; - foreach (SCANwaypoint p in data.Waypoints) - { - if (!p.LandingTarget) - { - if (p.Root != null) + if (moduleNode.HasValue("max_alt") && !vessel.Landed) { - if (p.Root.ContractState != Contracts.Contract.State.Active) + string alt = moduleNode.GetValue("max_alt"); + float f = 0; + if (!float.TryParse(alt, out f)) continue; - } - if (p.Param != null) - { - if (p.Param.State != Contracts.ParameterState.Incomplete) + + if (f < vessel.altitude) + { + scanner = false; continue; + } } - if (SCANUtil.waypointDistance(lat, lon, 1000, p.Latitude, p.Longitude, 1000, body) <= range) - { - sb.Append(p.Name); - sb.Append(" "); - break; - } + scanner = true; + break; } + if (scanner) + break; } + if (scanner) + break; } - - sb2.AppendFormat("{0} ({1:F2}°,{2:F2}°)", toDMS(lat, lon), lat, lon); - } - } - - //Draw the readout info labels - readableLabel(sb.ToString(), false); - SCAN_MBW.fillS(-10); - readableLabel(sb2.ToString(), false); - } - - internal static string getResourceAbundance(CelestialBody Body, double lat, double lon, bool fuzzy, SCANresourceGlobal resource) - { - string label = ""; - - if (fuzzy) - label = resourceLabel(true, lat, lon, resource, Body); - else if (narrowBandInOrbit(ref label, Body, lat, resource)) - label = resourceLabel(false, lat, lon, resource, Body); - else - label = resourceLabel(true, lat, lon, resource, Body); - - return label; - } - - internal static bool narrowBandInOrbit(ref string text, CelestialBody b, double lat, SCANresourceGlobal resource) - { - if (SCANcontroller.controller.needsNarrowBand) - { - bool scanner = false; - - foreach (Vessel vessel in FlightGlobals.Vessels) - { - if (vessel.protoVessel.protoPartSnapshots.Count <= 1) - continue; - - if (vessel.vesselType == VesselType.Debris || vessel.vesselType == VesselType.Unknown || vessel.vesselType == VesselType.EVA || vessel.vesselType == VesselType.Flag) - continue; - - if (vessel.mainBody != b) - continue; - - if (vessel.situation != Vessel.Situations.ORBITING) - continue; - - if (inc(vessel.orbit.inclination) < Math.Abs(lat)) + else { - continue; - } - var scanners = from pref in vessel.protoVessel.protoPartSnapshots - where pref.modules.Any(a => a.moduleName == "ModuleResourceScanner") - select pref; - - if (scanners.Count() == 0) - continue; - - foreach (var p in scanners) - { - if (p.partInfo == null) + if (vessel.altitude > 1000000) continue; - ConfigNode node = p.partInfo.partConfig; + var scanners = from pref in vessel.protoVessel.protoPartSnapshots + where pref.modules.Any(a => a.moduleName == "ModuleKerbNetAccess") + select pref; - if (node == null) + if (scanners.Count() == 0) continue; - var moduleNodes = from nodes in node.GetNodes("MODULE") - where nodes.GetValue("name") == "ModuleResourceScanner" - select nodes; - - foreach (ConfigNode moduleNode in moduleNodes) + foreach (var p in scanners) { - if (moduleNode == null) + if (p.partInfo == null) continue; - if (moduleNode.GetValue("ScannerType") != "0") - continue; + ConfigNode node = p.partInfo.partConfig; - if (moduleNode.GetValue("ResourceName") != resource.Name) + if (node == null) continue; - if (moduleNode.HasValue("MaxAbundanceAltitude") && !vessel.Landed) + var moduleNodes = from nodes in node.GetNodes("MODULE") + where nodes.GetValue("name") == "ModuleKerbNetAccess" + select nodes; + + foreach (ConfigNode moduleNode in moduleNodes) { - string alt = moduleNode.GetValue("MaxAbundanceAltitude"); - float f = 0; - if (!float.TryParse(alt, out f)) + if (!moduleNode.HasNode("DISPLAY_MODES")) continue; - if (f < vessel.altitude) - { - scanner = false; + ConfigNode displayMode = moduleNode.GetNode("DISPLAY_MODES"); + + if (!displayMode.HasValue("Mode")) continue; + + foreach (string mode in displayMode.GetValues("Mode")) + { + if (mode != "Resources") + continue; + + scanner = true; + break; } - } - scanner = true; - break; + if (scanner) + break; + } + if (scanner) + break; } if (scanner) break; } - if (scanner) - break; } if (!scanner) - { - text = string.Format("{0}: No Scanner", resource.Name); return false; - } } return true; @@ -435,9 +203,9 @@ where nodes.GetValue("name") == "ModuleResourceScanner" internal static string resourceLabel(bool fuzz, double lat, double lon, SCANresourceGlobal resource, CelestialBody b) { if (fuzz) - return string.Format("{0}: {1:P0}", resource.Name, SCANUtil.ResourceOverlay(lat, lon, resource.Name, b, SCANcontroller.controller.resourceBiomeLock)); + return string.Format("{0}: {1:P0}", resource.DisplayName, SCANUtil.ResourceOverlay(lat, lon, resource.Name, b, SCAN_Settings_Config.Instance.BiomeLock)); else - return string.Format("{0}: {1:P2}", resource.Name, SCANUtil.ResourceOverlay(lat, lon, resource.Name, b, SCANcontroller.controller.resourceBiomeLock)); + return string.Format("{0}: {1:P2}", resource.DisplayName, SCANUtil.ResourceOverlay(lat, lon, resource.Name, b, SCAN_Settings_Config.Instance.BiomeLock)); } private static double inc(double d) @@ -450,80 +218,22 @@ private static double inc(double d) return d; } - internal static string getMouseOverElevation(double Lon, double Lat, SCANdata d, int precision) + internal static string getMouseOverElevation(double Lon, double Lat, SCANdata d, int precision, bool high) { string s = " "; - if (SCANUtil.isCovered(Lon, Lat, d, SCANtype.AltimetryHiRes)) + if (high) { - s = SCANUtil.getElevation(d.Body, Lon, Lat).ToString("N" + precision) + "m "; + s = SCANUtil.getElevation(d.Body, Lon, Lat).ToString("N" + precision) + "m"; } else { - s = (((int)SCANUtil.getElevation(d.Body, Lon, Lat) / 500) * 500).ToString() + "m "; + s = (((int)SCANUtil.getElevation(d.Body, Lon, Lat) / 500) * 500).ToString() + "m"; } return s; } - //Method to handle active scanner display - internal static void InfoText(Vessel v, SCANdata data, bool b, ref StringBuilder sb) - { - sb.Length = 0; - SCANcontroller.SCANsensor s; - - //Check here for each sensor; if active, in range, and at the ideal altitude - s = SCANcontroller.controller.getSensorStatus(v, SCANtype.AltimetryLoRes); - if (s == null) - sb.Append(palette.colored(palette.grey, "LO")); - else if (!s.inRange) - sb.Append(palette.colored(palette.c_bad, "LO")); - else if (!s.bestRange && (Time.realtimeSinceStartup % 2 < 1)) - sb.Append(palette.colored(palette.c_bad, "LO")); - else - sb.Append(palette.colored(palette.c_good, "LO")); - - s = SCANcontroller.controller.getSensorStatus(v, SCANtype.AltimetryHiRes); - if (s == null) - sb.Append(palette.colored(palette.grey, " HI")); - else if (!s.inRange) - sb.Append(palette.colored(palette.c_bad, " HI")); - else if (!s.bestRange && (Time.realtimeSinceStartup % 2 < 1)) - sb.Append(palette.colored(palette.c_bad, " HI")); - else - sb.Append(palette.colored(palette.c_good, " HI")); - - s = SCANcontroller.controller.getSensorStatus(v, SCANtype.Biome); - if (s == null) - sb.Append(palette.colored(palette.grey, " MULTI")); - else if (!s.inRange) - sb.Append(palette.colored(palette.c_bad, " MULTI")); - else if (!s.bestRange && (Time.realtimeSinceStartup % 2 < 1)) - sb.Append(palette.colored(palette.c_bad, " MULTI")); - else - sb.Append(palette.colored(palette.c_good, " MULTI")); - - s = SCANcontroller.controller.getSensorStatus(v, SCANtype.AnomalyDetail); - if (s == null) - sb.Append(palette.colored(palette.grey, " BTDT")); - else if (!s.inRange) - sb.Append(palette.colored(palette.c_bad, " BTDT")); - else if (!s.bestRange && (Time.realtimeSinceStartup % 2 < 1)) - sb.Append(palette.colored(palette.c_bad, " BTDT")); - else - sb.Append(palette.colored(palette.c_good, " BTDT")); - - //Get coverage percentage for all active scanners on the vessel - SCANtype active = SCANcontroller.controller.activeSensorsOnVessel(v.id); - if (active != SCANtype.Nothing) - { - double cov = SCANUtil.getCoveragePercentage(data, active); - sb.Append(string.Format(" {0:N1}%", cov)); - if (b) - sb.Append(palette.colored(palette.c_bad, "NO POWER")); - } - } - /* UI: conversions to and from DMS */ /* FIXME: These do not belong here. And they are only used once! */ private static string toDMS(double thing, string neg, string pos, int prec) @@ -556,309 +266,51 @@ internal static string distanceString(double dist, double cutoff, double cutoff2 return string.Format("{0:N0}km", dist / 1000d); } - internal static void clearTexture(Texture2D tex) - { - Color[] pix = tex.GetPixels(); - for (int i = 0; i < pix.Length; ++i) - pix[i] = palette.clear; - tex.SetPixels(pix); - } - //Reset window positions; internal static void resetMainMapPos() - { - if (SCANcontroller.controller.mainMap == null) - return; - - SCANcontroller.controller.mainMap.resetWindowPos(SCANmainMap.defaultRect); - } - - internal static void resetSettingsUIPos() - { - if (SCANcontroller.controller.settingsWindow == null) - return; - - SCANcontroller.controller.settingsWindow.resetWindowPos(SCANsettingsUI.defaultRect); - } - - internal static void resetInstUIPos() - { - if (SCANcontroller.controller.instrumentsWindow == null) - return; - - SCANcontroller.controller.instrumentsWindow.resetWindowPos(SCANinstrumentUI.defaultRect); - } - - internal static void resetBigMapPos() - { - if (SCANcontroller.controller.BigMap == null) - return; - - SCANcontroller.controller.BigMap.resetWindowPos(SCANBigMap.defaultRect); - } - - internal static void resetKSCMapPos() - { - if (SCANcontroller.controller.kscMap == null) - return; - - SCANcontroller.controller.kscMap.resetWindowPos(SCANkscMap.defaultRect); - } - - internal static void resetColorMapPos() - { - if (SCANcontroller.controller.colorManager == null) - return; - - SCANcontroller.controller.colorManager.resetWindowPos(SCANcolorSelection.defaultRect); - } - - internal static void resetOverlayControllerPos() - { - if (SCANcontroller.controller.resourceOverlay == null) - return; - - SCANcontroller.controller.resourceOverlay.resetWindowPos(SCANoverlayController.defaultRect); - } - - internal static void resetResourceSettingPos() - { - if (SCANcontroller.controller.resourceSettings == null) - return; - - SCANcontroller.controller.resourceSettings.resetWindowPos(SCANresourceSettings.defaultRect); - } - - internal static void resetZoomMapPos() - { - if (SCANcontroller.controller.zoomMap == null) - return; - - SCANcontroller.controller.zoomMap.resetWindowPos(SCANzoomWindow.defaultRect); - } - - //internal static void resetHiDefMapPos() - //{ - // if (SCANcontroller.controller.hiDefMap == null) - // return; - - // SCANcontroller.controller.hiDefMap.resetWindowPos(SCANzoomHiDef.defaultRect); - //} - - #endregion - - #region Texture/Icon labels - - //Method to actually draw vessel labels on the map - internal static void drawVesselLabel(Rect maprect, SCANmap map, int num, Vessel vessel) - { - bool flash = false; - double lon = SCANUtil.fixLon(vessel.longitude); - double lat = SCANUtil.fixLat(vessel.latitude); - if (map != null) - { - lat = SCANUtil.fixLat(map.projectLatitude(vessel.longitude, vessel.latitude)); - lon = SCANUtil.fixLon(map.projectLongitude(vessel.longitude, vessel.latitude)); - lat = map.scaleLatitude(lat); - lon = map.scaleLongitude(lon); - if (lat < 0 || lon < 0 || lat > 180 || lon > 360) - return; - } - lon = lon * maprect.width / 360f; - lat = maprect.height - lat * maprect.height / 180f; - string txt = num.ToString(); - if (num == 0) - txt = vessel.vesselName; - else if (num < 0) - txt = ""; - Rect r = new Rect(maprect.x + (float)lon, maprect.y + (float)lat, 250f, 25f); - Color col = palette.white; - if (SCANcontroller.controller.colours == 1 && vessel != FlightGlobals.ActiveVessel) - col = palette.cb_skyBlue; - if (vessel == FlightGlobals.ActiveVessel && (int)(Time.realtimeSinceStartup % 2) == 0) - { - flash = true; - col = palette.cb_yellow; - } - int sz = 16; - if (vessel.vesselType == VesselType.Flag) - sz = 24; - SCANicon.drawOrbitIcon((int)r.x, (int)r.y, SCANicon.orbitIconForVesselType(vessel.vesselType), col, sz, true); - if (maprect.width < 360) - return; - r.x += 12; - drawLabel(r, txt, SCANskins.SCAN_orbitalLabelOff, true, SCANskins.SCAN_shadowReadoutLabel, flash, SCANskins.SCAN_orbitalLabelOn, true); - } - - //Handles various map labels; probably should be split up into multiple methods - internal static void drawMapLabels(Rect maprect, Vessel vessel, SCANmap map, SCANdata data, CelestialBody body, bool showAnom, bool showWaypoints) - { - //This section handles flag and asteroid labels - for (int i = FlightGlobals.Vessels.Count - 1; i >= 0; i--) - { - Vessel v = FlightGlobals.Vessels[i]; - - if (v.mainBody == body) - { - if (v.vesselType == VesselType.Flag && SCANcontroller.controller.map_flags) - { - drawVesselLabel(maprect, map, 0, v); - } - if (v.vesselType == VesselType.SpaceObject && SCANcontroller.controller.map_asteroids) - { - drawVesselLabel(maprect, map, 0, v); - } - } - } - //This section handles anomaly labels - if (showAnom) - { - foreach (SCANanomaly anomaly in data.Anomalies) - { - drawAnomalyLabel(maprect, map, anomaly); - } - } - if (showWaypoints) - { - foreach (SCANwaypoint p in data.Waypoints) - { - if (!p.LandingTarget) - { - if (p.Root != null) - { - if (p.Root.ContractState != Contracts.Contract.State.Active) - continue; - } - if (p.Param != null) - { - if (p.Param.State != Contracts.ParameterState.Incomplete) - continue; - } - } - - drawWaypointLabel(maprect, map, p, data); - } - } - if (vessel != null) - { - if (vessel.mainBody == body) - drawVesselLabel(maprect, map, 0, vessel); - } + { + if (SCAN_UI_MainMap.Instance == null) + return; + + SCAN_UI_MainMap.Instance.ResetPosition(); } - //Method to draw anomaly labels on the map - private static void drawAnomalyLabel(Rect maprect, SCANmap map, SCANanomaly anomaly) + internal static void resetInstUIPos() { - if (!anomaly.Known) + if (SCAN_UI_Instruments.Instance == null) return; - double lon = SCANUtil.fixLon(anomaly.Longitude); - double lat = SCANUtil.fixLat(anomaly.Latitude); - if (map != null) - { - lat = SCANUtil.fixLat(map.projectLatitude(anomaly.Longitude, anomaly.Latitude)); - lon = SCANUtil.fixLon(map.projectLongitude(anomaly.Longitude, anomaly.Latitude)); - lat = map.scaleLatitude(lat); - lon = map.scaleLongitude(lon); - if (lat < 0 || lon < 0 || lat > 180 || lon > 360) - return; - } - lon = lon * maprect.width / 360f; - lat = maprect.height - lat * maprect.height / 180f; - string txt = SCANcontroller.controller.anomalyMarker + " " + anomaly.Name; - if (!anomaly.Detail) - txt = SCANcontroller.controller.anomalyMarker + " Anomaly"; - Rect r = new Rect(maprect.x + (float)lon, maprect.y + (float)lat, 250f, 25f); - drawLabel(r, txt, SCANskins.SCAN_orbitalLabelOff, true, SCANskins.SCAN_shadowReadoutLabel, true, SCANskins.SCAN_orbitalLabelOn, true); + + SCAN_UI_Instruments.Instance.ResetPosition(); } - private static void drawWaypointLabel(Rect maprect, SCANmap map, SCANwaypoint p, SCANdata data) + internal static void resetBigMapPos() { - double lon = SCANUtil.fixLon(p.Longitude); - double lat = SCANUtil.fixLat(p.Latitude); - - if (map != null) - { - lat = SCANUtil.fixLat(map.projectLatitude(p.Longitude, p.Latitude)); - lon = SCANUtil.fixLon(map.projectLongitude(p.Longitude, p.Latitude)); - lat = map.scaleLatitude(lat); - lon = map.scaleLongitude(lon); - if (lat < 0 || lon < 0 || lat > 180 || lon > 360) - return; - } - lon = lon * maprect.width / 360f; - lat = maprect.height - lat * maprect.height / 180f; + if (SCAN_UI_BigMap.Instance == null) + return; - Rect r = new Rect(maprect.x + (float)lon, maprect.y + (float)lat, 24, 24); + SCAN_UI_BigMap.Instance.ResetPosition(); + } - r.x -= 12; + internal static void resetOverlayControllerPos() + { + if (SCAN_UI_Overlay.Instance == null) + return; - if (!p.LandingTarget) - { - r.y -= 24; - drawMapIcon(r, SCANskins.SCAN_WaypointIcon, true); - } - else - { - r.x += 1; - r.y -= 13; - drawMapIcon(r, SCANcontroller.controller.mechJebTargetSelection ? SCANskins.SCAN_MechJebIcon : SCANskins.SCAN_TargetIcon, true, SCANcontroller.controller.mechJebTargetSelection ? palette.red : palette.xkcd_PukeGreen, true); - } + SCAN_UI_Overlay.Instance.ResetPosition(); } - internal static void drawMapIcon(Rect pos, Texture2D tex, bool outline = false, Color c = new Color(), bool flash = false, Rect texPos = new Rect(), bool texCoords = false) + internal static void resetZoomMapPos() { - if (texCoords) - { - Color old = GUI.color; - if (outline) - { - GUI.color = palette.black; - pos.x -= 1; - GUI.DrawTextureWithTexCoords(pos, tex, texPos); - pos.x += 2; - GUI.DrawTextureWithTexCoords(pos, tex, texPos); - pos.x -= 1; - pos.y -= 1; - GUI.DrawTextureWithTexCoords(pos, tex, texPos); - pos.y += 2; - GUI.DrawTextureWithTexCoords(pos, tex, texPos); - pos.y -= 1; - } - if (flash) - GUI.color = c; - else - GUI.color = old; - - GUI.DrawTextureWithTexCoords(pos, tex, texPos); - GUI.color = old; - } - else - { - Color old = GUI.color; - if (outline) - { - GUI.color = palette.black; - pos.x -= 1; - GUI.DrawTexture(pos, tex); - pos.x += 2; - GUI.DrawTexture(pos, tex); - pos.x -= 1; - pos.y -= 1; - GUI.DrawTexture(pos, tex); - pos.y += 2; - GUI.DrawTexture(pos, tex); - pos.y -= 1; - } - if (flash) - GUI.color = c; - else - GUI.color = old; + if (SCAN_UI_ZoomMap.Instance == null) + return; - GUI.DrawTexture(pos, tex); - GUI.color = old; - } + SCAN_UI_ZoomMap.Instance.ResetPosition(); } + #endregion + + #region Texture/Icon labels + internal static void drawMapIconGL(Rect pos, Texture2D tex, Color c, Material iconMat, Color shadow = new Color(), bool outline = false, Rect texPos = new Rect(), bool texCoords = false) { if (texCoords) @@ -904,605 +356,6 @@ private static void drawWaypointLabel(Rect maprect, SCANmap map, SCANwaypoint p, } - /* FIXME: This may use assumed, shared, static constants with Legend stuff in other SCANsat files */ - private static void drawLegendLabel(Rect r, float val, float min, float max) - { - if (val < min || val > max) - return; - float scale = r.width * 1f / (max - min); - float x = r.x + scale * (val - min); - Rect lr = new Rect(x, r.y + r.height / 4, 15, r.height); - drawLabel(lr, "|", SCANskins.SCAN_orbitalLabelOff, true, SCANskins.SCAN_shadowReadoutLabel, false, SCANskins.SCAN_orbitalLabelOn, true); - string txt = val.ToString("N0"); - GUIContent c = new GUIContent(txt); - Vector2 dim = SCANskins.SCAN_whiteReadoutLabel.CalcSize(c); - lr.y += dim.y * 0.25f; - lr.x -= dim.x / 2; - if (lr.x < r.x) - lr.x = r.x; - if (lr.x + dim.x > r.x + r.width) - lr.x = r.x + r.width - dim.x; - lr.width = dim.x; - drawLabel(lr, txt, SCANskins.SCAN_orbitalLabelOff, true, SCANskins.SCAN_shadowReadoutLabel, false, SCANskins.SCAN_orbitalLabelOn, true); - } - - internal static void drawSliderLabel(Rect r, string min, string max) - { - Rect sr = new Rect(r.x, r.y + 7, 10, 20); - drawLabel(sr, "|", true, true); - sr.x += (r.width - 8); - drawLabel(sr, "|", true, false); - sr.width = 80; - sr.x -= (r.width + 60); - sr.y += 12; - drawLabel(sr, min, true, false); - sr.x += (r.width + 62); - drawLabel(sr, max, true, true); - } - - internal static void drawVerticalSliderLabel(Rect r, string min, string max) - { - Rect sr = new Rect(r.x - 15, r.y - 4, 20, 20); - drawLabel(sr, "_", true, false); - sr.y += (r.height - 8); - drawLabel(sr, "_", true, false); - sr.width = 50; - sr.x -= 40; - sr.y = r.y + 2; - drawLabel(sr, max, true, false); - sr.y += (r.height - 8); - drawLabel(sr, min, true, false); - } - - /* FIXME: This uses assumed, shared, static constants with Legend stuff in other SCANsat files */ - internal static void drawLegend(SCANdata data, SCANmapLegend legend) - { - GUILayout.Label("", GUILayout.ExpandWidth(true)); - Rect r = GUILayoutUtility.GetLastRect(); - r.width -= 64; - GUI.DrawTexture(r, legend.Legend); //SCANmapLegend.getLegend(data.MinHeight, data.MaxHeight, SCANcontroller.controller.colours, data)); - float minLabel = data.TerrainConfig.MinTerrain; - float maxLabel = data.TerrainConfig.MaxTerrain; - if (data.TerrainConfig.MinTerrain % 1000 != 0) - minLabel += 500; - if (data.TerrainConfig.MaxTerrain % 1000 != 0) - maxLabel -= 500; - float range = data.TerrainConfig.MaxTerrain - data.TerrainConfig.MinTerrain; - float step = 1000f; - if (range > 10000) - step = 2000; - else if (range < 4000) - step = 500; - for (float val = minLabel; val < maxLabel; val += step) - { - drawLegendLabel(r, val, data.TerrainConfig.MinTerrain, data.TerrainConfig.MaxTerrain); - } - } - - #endregion - - #region Overlays - - internal static Color lineColor = new Color(1f, 1f, 1f, 1f); - internal static Color blackLineColor = new Color(0f, 0f, 0f, 0.9f); - private static Material lineMat = JUtil.DrawLineMaterial(); - - internal static Dictionary>> drawGridLine(Rect maprect, SCANmap map) - { - var lineDict = new Dictionary>>(); - var whiteLineList = new List>(); - var blackLineList = new List>(); - - switch (map.Projection) - { - case MapProjection.Rectangular: - { - for (double lon = -150; lon <= 150; lon += 30) - { - List points = new List(); - List pointsBlack = new List(); - points.Add(new Vector2d((int)(map.MapScale * (lon + 180)), 0)); - points.Add(new Vector2d((int)(map.MapScale * (lon + 180)), (int)(map.MapScale * 180))); - pointsBlack.Add(new Vector2d(points[0].x + 1, points[0].y)); - pointsBlack.Add(new Vector2d(points[1].x + 1, points[1].y)); - - whiteLineList.Add(points); - blackLineList.Add(pointsBlack); - } - for (double lat = -60; lat <= 60; lat += 30) - { - List points = new List(); - List pointsBlack = new List(); - points.Add(new Vector2d(0, (int)(map.MapScale * (lat + 90)))); - points.Add(new Vector2d((int)(map.MapScale * 360), (int)(map.MapScale * (lat + 90)))); - pointsBlack.Add(new Vector2d(points[0].x, points[0].y - 1)); - pointsBlack.Add(new Vector2d(points[1].x, points[1].y - 1)); - - whiteLineList.Add(points); - blackLineList.Add(pointsBlack); - } - break; - } - case MapProjection.KavrayskiyVII: - { - for (double lon = -150; lon <= 150; lon += 30) - { - List points = new List(); - List pointsBlack = new List(); - int i = 0; - for (double lat = -88; lat <= 88; lat += 4) - { - points.Add(new Vector2d((int)(map.MapScale * (map.projectLongitude(lon, lat) + 180)), (int)(map.MapScale * (map.projectLatitude(lon, lat) + 90)))); - pointsBlack.Add(new Vector2d(points[i].x + 1, points[i].y)); - i++; - } - - whiteLineList.Add(points); - blackLineList.Add(pointsBlack); - } - for (double lat = -60; lat <= 60; lat += 30) - { - List points = new List(); - List pointsBlack = new List(); - points.Add(new Vector2d((int)(map.MapScale * (map.projectLongitude(-179, lat) + 180)), (int)(map.MapScale * (lat + 90)))); - points.Add(new Vector2d((int)(map.MapScale * (map.projectLongitude(179, lat) + 180)), (int)(map.MapScale * (lat + 90)))); - pointsBlack.Add(new Vector2d(points[0].x, points[0].y - 1)); - pointsBlack.Add(new Vector2d(points[1].x, points[1].y - 1)); - - whiteLineList.Add(points); - blackLineList.Add(pointsBlack); - } - break; - } - case MapProjection.Polar: - { - for (double lon = -180; lon <= 150; lon += 30) - { - List pointsS = new List(); - List pointsBlackS = new List(); - pointsS.Add(new Vector2d((int)(map.MapScale * (map.projectLongitude(lon, -88) + 180)), (int)(map.MapScale * (map.projectLatitude(lon, -88) + 90)))); - pointsS.Add(new Vector2d((int)(map.MapScale * (map.projectLongitude(lon, -2) + 180)), (int)(map.MapScale * (map.projectLatitude(lon, -2) + 90)))); - - whiteLineList.Add(pointsS); - - List pointsN = new List(); - List pointsBlackN = new List(); - pointsN.Add(new Vector2d((int)(map.MapScale * (map.projectLongitude(lon, 2) + 180)), (int)(map.MapScale * (map.projectLatitude (lon, 2) + 90)))); - pointsN.Add(new Vector2d((int)(map.MapScale * (map.projectLongitude(lon, 88) + 180)), (int)(map.MapScale * (map.projectLatitude(lon, 88) + 90)))); - - whiteLineList.Add(pointsN); - - if (lon == -180 || lon == 0) - { - pointsBlackS.Add(new Vector2d(pointsS[0].x + 1, pointsS[0].y)); - pointsBlackS.Add(new Vector2d(pointsS[1].x + 1, pointsS[1].y)); - pointsBlackN.Add(new Vector2d(pointsN[0].x + 1, pointsN[0].y)); - pointsBlackN.Add(new Vector2d(pointsN[1].x + 1, pointsN[1].y)); - } - else if (lon == -90 || lon == 90) - { - pointsBlackS.Add(new Vector2d(pointsS[0].x, pointsS[0].y - 1)); - pointsBlackS.Add(new Vector2d(pointsS[1].x, pointsS[1].y - 1)); - pointsBlackN.Add(new Vector2d(pointsN[0].x, pointsN[0].y - 1)); - pointsBlackN.Add(new Vector2d(pointsN[1].x, pointsN[1].y - 1)); - } - else if (lon == -60 || lon == -30 || lon == 120 || lon == 150) - { - pointsBlackS.Add(new Vector2d(pointsS[0].x - 1, pointsS[0].y - 1)); - pointsBlackS.Add(new Vector2d(pointsS[1].x - 1, pointsS[1].y - 1)); - pointsBlackN.Add(new Vector2d(pointsN[0].x + 1, pointsN[0].y - 1)); - pointsBlackN.Add(new Vector2d(pointsN[1].x + 1, pointsN[1].y - 1)); - } - else - { - pointsBlackS.Add(new Vector2d(pointsS[0].x + 1, pointsS[0].y - 1)); - pointsBlackS.Add(new Vector2d(pointsS[1].x + 1, pointsS[1].y - 1)); - pointsBlackN.Add(new Vector2d(pointsN[0].x - 1, pointsN[0].y - 1)); - pointsBlackN.Add(new Vector2d(pointsN[1].x - 1, pointsN[1].y - 1)); - } - blackLineList.Add(pointsBlackS); - blackLineList.Add(pointsBlackN); - } - for (double lat = -88; lat <= 88; lat += 2) - { - if (lat != 0) - { - if (lat % 30 == 0 || lat == -88 || lat == 88) - { - List points = new List(); - List pointsBlack = new List(); - for (double lon = -180; lon <= 180; lon += 4) - { - points.Add(new Vector2d((int)(map.MapScale * (map.projectLongitude(lon, lat) + 180)), (int)(map.MapScale * (map.projectLatitude(lon, lat) + 90)))); - float offset = 0; - if (lat == 30) offset = -0.8f; - else if (lat == -30) offset = 0.8f; - else if (lat == 60) offset = -0.3f; - else if (lat == -60) offset = 0.3f; - if (lat != -88 && lat != 88) - pointsBlack.Add(new Vector2d((int)(map.MapScale * (map.projectLongitude(lon, lat + offset) + 180)), (int)(map.MapScale * (map.projectLatitude(lon, lat + offset) + 90)))); - } - whiteLineList.Add(points); - blackLineList.Add(pointsBlack); - } - } - } - break; - } - } - - lineDict.Add(0, blackLineList); - lineDict.Add(1, whiteLineList); - - return lineDict; - } - - internal static void drawGridLines(IList points, float mapWidth, float left, float top, Color c) - { - if (points.Count < 2) - return; - GL.Begin(GL.LINES); - lineMat.SetPass(0); - GL.Color(c); - float xStart, yStart; - xStart = (float)points[0].x; - yStart = (mapWidth / 2) - (float)points[0].y; - if (xStart < 0 || yStart < 0 || yStart > (mapWidth / 2) || xStart > mapWidth) - return; - xStart += left; - yStart += top; - for (int i = 1; i < points.Count; i++) - { - float xEnd = (float)points[i].x; - float yEnd = (mapWidth / 2) - (float)points[i].y; - if (xEnd < 0 || yEnd < 0 || yEnd > (mapWidth / 2) || xEnd > mapWidth) - continue; - xEnd += left; - yEnd += top; - - drawLine(xStart, yStart, xEnd, yEnd); - - xStart = xEnd; - yStart = yEnd; - } - GL.End(); - } - - private static void drawLine(float xStart, float yStart, float xEnd, float yEnd) - { - var start = new Vector2(xStart, yStart); - var end = new Vector2(xEnd, yEnd); - - GL.Vertex(start); - GL.Vertex(end); - } - - private static int[] eq_an_map, eq_dn_map; - private static Texture2D eq_map; - private static int eq_frame; - private static Color32[] eq_pix; - - //Draw the orbit overlay - internal static void drawOrbit(Rect maprect, SCANmap map, Vessel vessel, CelestialBody body, bool lite = false) - { - if (vessel == null) return; - if (vessel.mainBody != body) return; - int eqh = 16; - - if (vessel.LandedOrSplashed) - return; - - Orbit o = vessel.orbit; - double startUT = Planetarium.GetUniversalTime(); - double UT = startUT; - int steps = 80; // increase for neater lines, decrease for better speed indication - bool ath = false; - if (vessel.mainBody.atmosphere) - { - if (vessel.mainBody.atmosphereDepth >= vessel.altitude) - { - ath = true; - } - } - Rect r = new Rect(0, 0, 70f, 50f); - Color col; - // project the last and the current orbital period onto the map - for (int i = -steps; i < steps; ++i) - { - if (i < 0) - UT = startUT - (steps + i) * (o.period / steps); - else - UT = startUT + i * o.period * 1f / steps; - if (double.IsNaN(UT)) - continue; - if (UT < o.StartUT && o.StartUT != startUT) - continue; - if (UT > o.EndUT) - continue; - if (double.IsNaN(o.getObtAtUT(UT))) - continue; - Vector3d pos = o.getPositionAtUT(UT); - double rotation = 0; - if (vessel.mainBody.rotates) - { - rotation = (360 * ((UT - startUT) / vessel.mainBody.rotationPeriod)) % 360; - } - double alt = (vessel.mainBody.GetAltitude(pos)); - if (alt < 0) - { - if (i < 0) - { - i = 0; - continue; - } - break; - } - double lo = (vessel.mainBody.GetLongitude(pos) - rotation); - double la = (vessel.mainBody.GetLatitude(pos)); - double lon = (map.projectLongitude(lo, la) + 180) % 360; - double lat = (map.projectLatitude(lo, la) + 90) % 180; - lat = map.scaleLatitude(lat); - lon = map.scaleLongitude(lon); - if (lat < 0 || lon < 0 || lat > 180 || lon > 360) - continue; - lon = lon * maprect.width / 360f; - lat = maprect.height - lat * maprect.height / 180f; - r.x = maprect.x + (float)lon; - r.y = maprect.y + (float)lat; - col = palette.cb_skyBlue; - if (i < 0) - { - col = palette.cb_orange; - } - else - { - if (vessel.mainBody.atmosphere) - { - if (vessel.mainBody.atmosphereDepth >= alt) - { - if (!ath) - { - ath = true; - // do something when it flips? - } - col = palette.cb_reddishPurple; - } - } - } - SCANicon.drawOrbitIcon((int)r.x, (int)r.y, SCANicon.OrbitIcon.Planet, col, 8, false); - } - - // show apoapsis and periapsis - if (o.ApA > 0 && mapPosAtT(maprect, map, ref r, vessel, o, o.timeToAp, startUT)) - { - SCANicon.drawOrbitIcon((int)r.x, (int)r.y, SCANicon.OrbitIcon.Ap, palette.cb_skyBlue, 32, true); - r.x += 24; - r.y -= 12; - if (!lite) - drawLabel(r, o.ApA.ToString("N0"), SCANskins.SCAN_orbitalLabelOff, true, SCANskins.SCAN_shadowReadoutLabel, true, SCANskins.SCAN_orbitalLabelOn, true); - } - if (o.PeA > 0 && mapPosAtT(maprect, map, ref r, vessel, o, o.timeToPe, startUT)) - { - SCANicon.drawOrbitIcon((int)r.x, (int)r.y, SCANicon.OrbitIcon.Pe, palette.cb_skyBlue, 32, true); - r.x += 24; - r.y -= 12; - if (!lite) - drawLabel(r, o.PeA.ToString("N0"), SCANskins.SCAN_orbitalLabelOff, true, SCANskins.SCAN_shadowReadoutLabel, true, SCANskins.SCAN_orbitalLabelOn, true); - } - - // show first maneuver node - if (vessel.patchedConicSolver != null) - { - if (vessel.patchedConicSolver.maneuverNodes.Count > 0) - { - ManeuverNode n = vessel.patchedConicSolver.maneuverNodes[0]; - if (n.patch == vessel.orbit && n.nextPatch != null && n.nextPatch.activePatch && n.UT > startUT - o.period && mapPosAtT(maprect, map, ref r, vessel, o, n.UT - startUT, startUT)) - { - col = palette.cb_reddishPurple; - if (SCANcontroller.controller.colours != 1) - col = palette.xkcd_PurplyPink; - SCANicon.drawOrbitIcon((int)r.x, (int)r.y, SCANicon.OrbitIcon.ManeuverNode, col, 32, true); - Orbit nuo = n.nextPatch; - for (int i = 0; i < steps; ++i) - { - double T = n.UT - startUT + i * nuo.period / steps; - if (T + startUT > nuo.EndUT) - break; - if (mapPosAtT(maprect, map, ref r, vessel, nuo, T, startUT)) - { - SCANicon.drawOrbitIcon((int)r.x, (int)r.y, SCANicon.OrbitIcon.Planet, col, 8, false); - } - } - if (nuo.patchEndTransition == Orbit.PatchTransitionType.ESCAPE) - { - SCANicon.drawOrbitIcon((int)r.x, (int)r.y, SCANicon.OrbitIcon.Exit, col, 32, true); - } - else if (nuo.patchEndTransition == Orbit.PatchTransitionType.ENCOUNTER) - { - SCANicon.drawOrbitIcon((int)r.x, (int)r.y, SCANicon.OrbitIcon.Encounter, col, 32, true); - } - if (nuo.timeToAp > 0 && n.UT + nuo.timeToAp < nuo.EndUT && mapPosAtT(maprect, map, ref r, vessel, nuo, n.UT - startUT + nuo.timeToAp, startUT)) - { - SCANicon.drawOrbitIcon((int)r.x, (int)r.y, SCANicon.OrbitIcon.Ap, col, 32, true); - } - if (nuo.timeToPe > 0 && n.UT + nuo.timeToPe < nuo.EndUT && mapPosAtT(maprect, map, ref r, vessel, nuo, n.UT - startUT + nuo.timeToPe, startUT)) - { - SCANicon.drawOrbitIcon((int)r.x, (int)r.y, SCANicon.OrbitIcon.Pe, col, 32, true); - } - } - } - } - - if (lite) - return; - - if (o.PeA < 0) - return; - if (map.Projection == MapProjection.Polar) - return; - - if (eq_frame <= 0) - { - // predict equatorial crossings for the next 100 loops - double TAAN = 360f - o.argumentOfPeriapsis; // true anomaly at ascending node - double TADN = (TAAN + 180) % 360; // true anomaly at descending node - double MAAN = meanForTrue(TAAN, o.eccentricity); - double MADN = meanForTrue(TADN, o.eccentricity); - double tAN = (((MAAN - o.meanAnomaly * Mathf.Rad2Deg + 360) % 360) / 360f * o.period + startUT); - double tDN = (((MADN - o.meanAnomaly * Mathf.Rad2Deg + 360) % 360) / 360f * o.period + startUT); - - if (eq_an_map == null || eq_dn_map == null || eq_an_map.Length != maprect.width) - { - eq_an_map = new int[(int)maprect.width]; - eq_dn_map = new int[(int)maprect.width]; - } - if (eq_map == null || eq_map.width != eq_an_map.Length) - { - eq_map = new Texture2D(eq_an_map.Length, eqh, TextureFormat.ARGB32, false); - } - if (eq_pix == null || eq_pix.Length != eq_an_map.Length) - { - eq_pix = new Color32[eq_an_map.Length * eqh]; - } - for (int i = 0; i < eq_an_map.Length; ++i) - { - eq_an_map[i] = 0; - eq_dn_map[i] = 0; - } - for (int i = 0; i < 100; ++i) - { - double UTAN = tAN + o.period * i; - double UTDN = tDN + o.period * i; - if (double.IsNaN(UTAN) || double.IsNaN(UTDN)) - continue; - Vector3d pAN = o.getPositionAtUT(UTAN); - Vector3d pDN = o.getPositionAtUT(UTDN); - double rotAN = 0, rotDN = 0; - if (vessel.mainBody.rotates) - { - rotAN = ((360 * ((UTAN - startUT) / vessel.mainBody.rotationPeriod)) % 360); - rotDN = ((360 * ((UTDN - startUT) / vessel.mainBody.rotationPeriod)) % 360); - } - double loAN = vessel.mainBody.GetLongitude(pAN) - rotAN; - double loDN = vessel.mainBody.GetLongitude(pDN) - rotDN; - int lonAN = (int)(((map.projectLongitude(loAN, 0) + 180) % 360) * eq_an_map.Length / 360f); - int lonDN = (int)(((map.projectLongitude(loDN, 0) + 180) % 360) * eq_dn_map.Length / 360f); - if (lonAN >= 0 && lonAN < eq_an_map.Length) - eq_an_map[lonAN] += 1; - if (lonDN >= 0 && lonDN < eq_dn_map.Length) - eq_dn_map[lonDN] += 1; - } - //Color[] pix = SCANBigMap.eq_map.GetPixels(0, 0, SCANBigMap.eq_an_map.Length, eqh); - Color32 cAN = palette.CB_skyBlue, cDN = palette.CB_orange; - for (int y = 0; y < eqh; ++y) - { - Color32 lc = palette.Clear; - for (int x = 0; x < eq_an_map.Length; ++x) - { - Color32 c = palette.Clear; - float scale = 0; - if (y < eqh / 2) - { - c = cDN; - scale = eq_dn_map[x]; - } - else - { - c = cAN; - scale = eq_an_map[x]; - } - if (scale >= 1) - { - if (y == 0 || y == eqh - 1) - { - c = palette.black; - } - else - { - if (lc == palette.clear) - eq_pix[y * eq_an_map.Length + x - 1] = palette.Black; - scale = Mathf.Clamp(scale - 1, 0, 10) / 10f; - c = palette.lerp(c, palette.White, scale); - } - } - else - { - c = palette.Clear; - if (lc.r != palette.Clear.r && lc.r != palette.Black.r) - c = palette.Black; - } - eq_pix[y * eq_an_map.Length + x] = c; - lc = c; - } - } - eq_map.SetPixels32(0, 0, eq_an_map.Length, eqh, eq_pix); - eq_map.Apply(); - eq_frame = 4; - } - else - { - eq_frame -= 1; - } - - if (eq_map != null) - { - r.x = maprect.x; - r.y = maprect.y + maprect.height / 2 - eq_map.height / 2; - r.width = eq_map.width; - r.height = eq_map.height; - GUI.DrawTexture(r, eq_map); - } - } - - /* UI: This isn't really a UI function, so it doesn't belong here. - * This is more of a time-projection mathematical function. */ - /* FIXME: possible relocation */ - private static bool mapPosAtT(Rect maprect, SCANmap map, ref Rect r, Vessel vessel, Orbit o, double dT, double startUT) - { - double UT = startUT + dT; - if (double.IsNaN(UT)) - return false; - try - { - if (double.IsNaN(o.getObtAtUT(UT))) - return false; - Vector3d pos = o.getPositionAtUT(UT); - double rotation = 0; - if (vessel.mainBody.rotates) - { - rotation = (360 * (dT / vessel.mainBody.rotationPeriod)) % 360; - } - double lo = (vessel.mainBody.GetLongitude(pos) - rotation); - double la = (vessel.mainBody.GetLatitude(pos)); - double lon = (map.projectLongitude(lo, la) + 180) % 360; - double lat = (map.projectLatitude(lo, la) + 90) % 180; - lat = map.scaleLatitude(lat); - lon = map.scaleLongitude(lon); - if (lat < 0 || lon < 0 || lat > 180 || lon > 360) - return false; - lon = lon * maprect.width / 360f; - lat = maprect.height - lat * maprect.height / 180f; - r.x = maprect.x + (float)lon; - r.y = maprect.y + (float)lat; - return true; - } - catch (Exception) - { - return false; - } - } - - internal static double meanForTrue(double TA, double e) - { - TA = TA * Mathf.Deg2Rad; - double EA = Math.Acos((e + Math.Cos(TA)) / (1 + e * Math.Cos(TA))); - if (TA > Math.PI) - EA = 2 * Math.PI - EA; - double MA = EA - e * Math.Sin(EA); - // the mean anomaly isn't really an angle, but I'm a simple person - return MA * Mathf.Rad2Deg; - } - #endregion #region MechJeb Target Overlay @@ -1657,7 +510,7 @@ internal static void generateOverlayResourceValues(ref float[,] values, int heig { double lon = fixLon(i / scale); - values[i, j] = SCANUtil.ResourceOverlay(lat, lon, resource.Name, data.Body, SCANcontroller.controller.resourceBiomeLock) * 100; + values[i, j] = SCANUtil.ResourceOverlay(lat, lon, resource.Name, data.Body, SCAN_Settings_Config.Instance.BiomeLock) * 100; } } } @@ -1712,7 +565,7 @@ internal static Texture2D drawResourceTexture(ref Texture2D map, ref Color32[] p { double lon = fixLon(i / scale); - values[i, j] = SCANUtil.ResourceOverlay(lat, lon, resource.Name, data.Body, SCANcontroller.controller.resourceBiomeLock) * 100; + values[i, j] = SCANUtil.ResourceOverlay(lat, lon, resource.Name, data.Body, SCAN_Settings_Config.Instance.BiomeLock) * 100; } } @@ -1776,11 +629,11 @@ internal static Texture2D drawBiomeMap(ref Texture2D map, ref Color32[] pix, SCA } else if (useStock) { - pix[j * width + i] = palette.lerp((Color32)SCANUtil.getBiome(data.Body, lon, lat).mapColor, palette.Clear, SCANcontroller.controller.biomeTransparency / 100f); + pix[j * width + i] = palette.lerp((Color32)SCANUtil.getBiome(data.Body, lon, lat).mapColor, palette.Clear, SCAN_Settings_Config.Instance.BiomeTransparency); } else { - pix[j * width + i] = palette.lerp(palette.lerp((Color32)SCANcontroller.controller.lowBiomeColor, (Color32)SCANcontroller.controller.highBiomeColor, biomeIndex), palette.Clear, SCANcontroller.controller.biomeTransparency / 100f); + pix[j * width + i] = palette.lerp(palette.lerp(SCANcontroller.controller.lowBiomeColor32, SCANcontroller.controller.highBiomeColor32, biomeIndex), palette.Clear, SCAN_Settings_Config.Instance.BiomeTransparency); } } } @@ -1872,14 +725,14 @@ internal static void drawTerrainMap(ref Color32[] pix, ref float[,] values, SCAN if (SCANUtil.isCovered(lon, lat, data, SCANtype.Altimetry)) { if (SCANUtil.isCovered(lon, lat, data, SCANtype.AltimetryHiRes)) - c = palette.heightToColor(values[i, j], 0, data.TerrainConfig); + c = palette.heightToColor(values[i, j], true, data.TerrainConfig); else { int ilon = SCANUtil.icLON(unFixLon(lon)); int ilat = SCANUtil.icLAT(lat); int lo = ((int)(ilon * scale * 5)) / 5; int la = ((int)(ilat * scale * 5)) / 5; - c = palette.heightToColor(values[lo, la], 1, data.TerrainConfig); + c = palette.heightToColor(values[lo, la], false, data.TerrainConfig); } c = palette.lerp(c, palette.Clear, 0.1f); @@ -2071,9 +924,9 @@ internal static Texture2D drawLoDetailMap(ref Color32[] pix, ref float[,] values for (int j = 0; j < height; j++) { if (map.UseCustomRange) - pix[j * width + i] = palette.heightToColor(values[i, j], 1, data.TerrainConfig, map.CustomMin, map.CustomMax, map.CustomRange, true); + pix[j * width + i] = palette.heightToColor(values[i, j], true, data.TerrainConfig, map.CustomMin, map.CustomMax, map.CustomRange, true); else - pix[j * width + i] = palette.heightToColor(values[i, j], 1, data.TerrainConfig); + pix[j * width + i] = palette.heightToColor(values[i, j], true, data.TerrainConfig); } } @@ -2120,7 +973,7 @@ internal static void generateResourceCache(ref float[,] values, int height, int for (int i = 0; i < width; i += stepScale) { Vector2d coords; - if (map.MSource == mapSource.ZoomMap && map.Projection == MapProjection.Polar) + if (map.Projection == MapProjection.Orthographic) { double rLon = (i * 1.0f / scale) - 180f + map.Lon_Offset; double rLat = (j * 1.0f / scale) - 90f + map.Lat_Offset; @@ -2144,7 +997,7 @@ internal static void generateResourceCache(ref float[,] values, int height, int coords = SCANUtil.fixRetardCoordinates(new Vector2d(rLon, rLat)); } - values[i, j] = SCANUtil.ResourceOverlay(coords.y, coords.x, map.Resource.Name, map.Body, SCANcontroller.controller.resourceBiomeLock) * 100f; + values[i, j] = SCANUtil.ResourceOverlay(coords.y, coords.x, map.Resource.Name, map.Body, SCAN_Settings_Config.Instance.BiomeLock) * 100f; } } } @@ -2289,7 +1142,7 @@ internal static Color resourceToColor(Color BaseColor, SCANresourceGlobal Resour return palette.lerp(palette.lerp(Resource.MinColor, Resource.MaxColor, (Abundance - Resource.CurrentBody.MinValue) / (Resource.CurrentBody.MaxValue - Resource.CurrentBody.MinValue)), BaseColor, Resource.Transparency / 100f); } - private static Color32 resourceToColor32(Color32 BaseColor, SCANresourceGlobal Resource, float Abundance, SCANdata Data, double Lon, double Lat, float Transparency = 0.3f) + internal static Color32 resourceToColor32(Color32 BaseColor, SCANresourceGlobal Resource, float Abundance, SCANdata Data, double Lon, double Lat, float Transparency = 0.3f) { if (SCANUtil.isCovered(Lon, Lat, Data, Resource.SType)) { @@ -2322,6 +1175,5 @@ private static Color32 resourceToColor32(Color32 BaseColor, SCANresourceGlobal R } #endregion - } } diff --git a/SCANsat/SCAN_Unity/SCAN_TMP_InputField.cs b/SCANsat/SCAN_Unity/SCAN_TMP_InputField.cs new file mode 100644 index 000000000..6e463cb03 --- /dev/null +++ b/SCANsat/SCAN_Unity/SCAN_TMP_InputField.cs @@ -0,0 +1,58 @@ +#region license +/* + * [Scientific Committee on Advanced Navigation] + * S.C.A.N. Satellite + * + * SCAN_TMP_InputField - An extension of TMP_InputField for updating certain elements of the input field + * + * Copyright (c)2014 David Grandy ; + * Copyright (c)2014 technogeeky ; + * Copyright (c)2014 (Your Name Here) ; see LICENSE.txt for licensing details. + */ +#endregion + +using SCANsat.Unity; +using UnityEngine; +using UnityEngine.Events; +using UnityEngine.UI; +using TMPro; + +namespace SCANsat.SCAN_Unity +{ + public class SCAN_TMP_InputField : TMP_InputField + { + private InputHandler _handler; + + new private void Awake() + { + base.Awake(); + + _handler = GetComponent(); + + onValueChanged.AddListener(new UnityAction(valueChanged)); + + _handler.OnTextUpdate.AddListener(new UnityAction(UpdateText)); + } + + private void Update() + { + if (_handler != null) + _handler.IsFocused = isFocused; + } + + private void valueChanged(string s) + { + if (_handler == null) + return; + + _handler.Text = s; + + _handler.OnValueChange.Invoke(s); + } + + private void UpdateText(string t) + { + text = t; + } + } +} diff --git a/SCANsat/SCAN_Unity/SCAN_TextMeshPro.cs b/SCANsat/SCAN_Unity/SCAN_TextMeshPro.cs new file mode 100644 index 000000000..f4ca6e41f --- /dev/null +++ b/SCANsat/SCAN_Unity/SCAN_TextMeshPro.cs @@ -0,0 +1,70 @@ +#region license +/* + * [Scientific Committee on Advanced Navigation] + * S.C.A.N. Satellite + * + * SCAN_TextMeshPro - An extension of TextMeshProUGUI for updating certain elements of the text + * + * Copyright (c)2014 David Grandy ; + * Copyright (c)2014 technogeeky ; + * Copyright (c)2014 (Your Name Here) ; see LICENSE.txt for licensing details. + */ +#endregion + +using SCANsat.Unity; +using UnityEngine; +using UnityEngine.UI; +using UnityEngine.Events; +using TMPro; + +namespace SCANsat.SCAN_Unity +{ + public class SCAN_TextMeshPro : TextMeshProUGUI + { + private TextHandler _handler; + + new private void Awake() + { + m_isAlignmentEnumConverted = true; + + base.Awake(); + + _handler = GetComponent(); + + if (_handler == null) + return; + + _handler.SetNormalColor(color); + + _handler.OnColorUpdate.AddListener(new UnityAction(UpdateColor)); + _handler.OnTextUpdate.AddListener(new UnityAction(UpdateText)); + _handler.OnFontChange.AddListener(new UnityAction(UpdateFontSize)); + } + + public void Setup(TextHandler h) + { + _handler = h; + + _handler.OnColorUpdate.AddListener(new UnityAction(UpdateColor)); + _handler.OnTextUpdate.AddListener(new UnityAction(UpdateText)); + _handler.OnFontChange.AddListener(new UnityAction(UpdateFontSize)); + } + + private void UpdateColor(Color c) + { + color = c; + } + + private void UpdateText(string t) + { + text = t; + + _handler.PreferredSize = new Vector2(preferredWidth, preferredHeight); + } + + private void UpdateFontSize(int i) + { + fontSize += i; + } + } +} diff --git a/SCANsat/SCAN_Unity/SCAN_UI_BigMap.cs b/SCANsat/SCAN_Unity/SCAN_UI_BigMap.cs new file mode 100644 index 000000000..0e9fbbd9c --- /dev/null +++ b/SCANsat/SCAN_Unity/SCAN_UI_BigMap.cs @@ -0,0 +1,2204 @@ +#region license +/* + * [Scientific Committee on Advanced Navigation] + * S.C.A.N. Satellite + * + * SCAN_UI_BigMap - UI control object for SCANsat big map + * + * Copyright (c)2014 David Grandy ; + * Copyright (c)2014 technogeeky ; + * Copyright (c)2014 (Your Name Here) ; see LICENSE.txt for licensing details. + */ +#endregion + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using UnityEngine; +using SCANsat.SCAN_Toolbar; +using SCANsat.Unity.Interfaces; +using SCANsat.Unity; +using SCANsat.Unity.Unity; +using SCANsat.SCAN_Data; +using SCANsat.SCAN_Map; +using SCANsat.SCAN_UI.UI_Framework; +using Contracts; +using KSP.UI; +using KSP.Localization; +using FinePrint; +using FinePrint.Utilities; +using palette = SCANsat.SCAN_UI.UI_Framework.SCANpalette; + +namespace SCANsat.SCAN_Unity +{ + public class SCAN_UI_BigMap : ISCAN_BigMap + { + private bool _isVisible; + + private static SCANmap bigmap; + private static CelestialBody body; + private SCANdata data; + private Vessel vessel; + private bool updateMap; + private StringBuilder infoString; + private System.Random gen; + private bool _inputLock; + private const string controlLock = "SCANsatBig"; + + private SCANresourceGlobal currentResource; + private List resources; + + private List mapFlags = new List(); + + private SCAN_BigMap uiElement; + + private const int orbitSteps = 80; + private List orbitLabels = new List(); + private Dictionary orbitMapLabels = new Dictionary(); + private const string Aplabel = "Ap"; + private const string Pelabel = "Pe"; + private const string Escapelabel = "Escape"; + private const string Encounterlabel = "Encounter"; + private const string Manlabel = "Man"; + private const string ManAplabel = "ManAp"; + private const string ManPelabel = "ManPe"; + private const string ManEscapelabel = "ManEscape"; + private const string ManEncounterlabel = "ManEncounter"; + + private static Texture2D eqMap; + private static bool[] eq_an; + private static bool[] eq_dn; + private static Color32[] eq_pix; + private const int eq_height = 20; + private const int eq_count = 100; + private const int eq_update = 4; + private int eq_timer; + private Color32 c_dn = palette.CB_orange; + private Color32 c_an = palette.CB_skyBlue; + private Texture2D clearMap; + private bool clearMapSet; + + private Texture2D gridMap; + + private static SCAN_UI_BigMap instance; + + public static SCAN_UI_BigMap Instance + { + get { return instance; } + } + + public static CelestialBody Body + { + get { return body; } + } + + public SCAN_UI_BigMap() + { + instance = this; + + resources = SCANcontroller.setLoadedResourceList(); + + GameEvents.onVesselChange.Add(vesselChange); + GameEvents.onVesselWasModified.Add(vesselChange); + GameEvents.onVesselSOIChanged.Add(soiChange); + + gen = new System.Random(Environment.TickCount.GetHashCode()); + + initializeMap(); + + if (HighLogic.LoadedSceneIsFlight && SCANcontroller.controller.bigMapVisible) + { + if (WaypointToggle) + SCANcontroller.controller.StartCoroutine(WaitForWaypoints()); + else + Open(); + } + } + + private IEnumerator WaitForWaypoints() + { + while (!ContractSystem.loaded) + yield return null; + + Open(); + } + + private void vesselChange(Vessel V) + { + vessel = FlightGlobals.ActiveVessel; + + if (!_isVisible) + return; + + RefreshIcons(); + } + + private void soiChange(GameEvents.HostedFromToAction action) + { + if (!_isVisible) + return; + + RefreshIcons(); + + updateMap = true; + } + + public void Open() + { + if (uiElement != null) + { + uiElement.gameObject.SetActive(false); + MonoBehaviour.DestroyImmediate(uiElement.gameObject); + } + + uiElement = GameObject.Instantiate(SCAN_UI_Loader.BigMapPrefab).GetComponent(); + + if (uiElement == null) + return; + + uiElement.transform.SetParent(UIMasterController.Instance.dialogCanvas.transform, false); + + _isVisible = true; + + if (OrbitToggle && ShowOrbit) + { + Orbit o = vessel.orbit; + + orbitLabels.Clear(); + + for (int i = 0; i < orbitSteps * 3; i++) + { + orbitLabels.Add(new SimpleLabelInfo(10, SCAN_UI_Loader.PlanetIcon)); + } + + if (!vessel.LandedOrSplashed) + UpdateOrbitIcons(o); + } + + uiElement.setMap(this); + + SetGridLines(); + + SetTitle(); + + uiElement.UpdateEQMapTexture(clearMap); + clearMapSet = true; + + updateMap = true; + + if (HighLogic.LoadedSceneIsFlight) + SCANcontroller.controller.bigMapVisible = true; + + if (SCAN_Settings_Config.Instance.StockToolbar) + { + if (HighLogic.LoadedSceneIsFlight) + { + if (SCAN_Settings_Config.Instance.ToolbarMenu) + { + if (SCANappLauncher.Instance != null && SCANappLauncher.Instance.UIElement != null) + SCANappLauncher.Instance.UIElement.SetBigMapToggle(true); + } + } + else + { + if (SCANappLauncher.Instance != null && SCANappLauncher.Instance.SCANAppButton != null) + SCANappLauncher.Instance.SCANAppButton.SetTrue(false); + } + } + } + + public void Close() + { + _isVisible = false; + + if (uiElement == null) + return; + + uiElement.FadeOut(); + + if (SCAN_Settings_Config.Instance.StockToolbar) + { + if (HighLogic.LoadedSceneIsFlight) + { + if (SCAN_Settings_Config.Instance.ToolbarMenu) + { + if (SCANappLauncher.Instance != null && SCANappLauncher.Instance.UIElement != null) + SCANappLauncher.Instance.UIElement.SetBigMapToggle(false); + } + } + else + { + if (SCANappLauncher.Instance != null && SCANappLauncher.Instance.SCANAppButton != null) + SCANappLauncher.Instance.SCANAppButton.SetFalse(false); + } + } + + if (HighLogic.LoadedSceneIsFlight) + SCANcontroller.controller.bigMapVisible = false; + + uiElement = null; + } + + public void RefreshIcons() + { + if (!_isVisible || uiElement == null) + return; + + uiElement.RefreshIcons(); + } + + private void initializeMap() + { + if (HighLogic.LoadedSceneIsFlight) + vessel = FlightGlobals.ActiveVessel; + + if (body == null) + { + for (int i = FlightGlobals.Bodies.Count - 1; i >= 0; i--) + { + CelestialBody b = FlightGlobals.Bodies[i]; + + if (b.bodyName != SCANcontroller.controller.bigMapBody) + continue; + + body = b; + break; + } + + if (body == null) + { + if (vessel == null) + body = FlightGlobals.Bodies[1]; + else + body = vessel.mainBody; + } + } + + data = SCANUtil.getData(body); + + if (data == null) + { + data = new SCANdata(body); + SCANcontroller.controller.addToBodyData(body, data); + } + + if (bigmap == null) + { + bigmap = new SCANmap(body, true, mapSource.BigMap); + + MapProjection p = MapProjection.Rectangular; + mapType t = mapType.Altimetry; + + try + { + p = (MapProjection)Enum.Parse(typeof(MapProjection), SCANcontroller.controller.bigMapProjection, true); + t = (mapType)Enum.Parse(typeof(mapType), SCANcontroller.controller.bigMapType, true); + } + catch (Exception e) + { + SCANUtil.SCANlog("Error in parsing map projection and/or type\n{0}", e); + + p = MapProjection.Rectangular; + t = mapType.Altimetry; + } + + bigmap.Projection = p; + bigmap.MType = t; + bigmap.ResourceActive = SCANcontroller.controller.bigMapResourceOn; + bigmap.ColorMap = SCANcontroller.controller.bigMapColor; + bigmap.Terminator = SCANcontroller.controller.bigMapTerminator; + + if (SCAN_Settings_Config.Instance.BigMapWidth % 2 != 0) + SCAN_Settings_Config.Instance.BigMapWidth += 1; + + bigmap.setWidth(SCAN_Settings_Config.Instance.BigMapWidth); + } + + bigmap.setBody(body); + + currentResource = AssignResource(SCANcontroller.controller.bigMapResource); + + if (currentResource != null) + bigmap.Resource = currentResource; + + if (eqMap == null) + RefreshEQMap(); + + AddOrbitMapLabels(); + + clearMap = new Texture2D(1, 1, TextureFormat.ARGB32, false); + + clearMap.SetPixel(0, 0, palette.clear); + clearMap.Apply(); + } + + private void AddOrbitMapLabels() + { + orbitMapLabels.Add(Aplabel, new MapLabelInfo() + { + label = "", + image = SCAN_UI_Loader.APMarker, + pos = new Vector2(), + baseColor = palette.cb_skyBlue, + flash = false, + width = 28, + show = false + }); + + orbitMapLabels.Add(Pelabel, new MapLabelInfo() + { + label = "", + image = SCAN_UI_Loader.PEMarker, + pos = new Vector2(), + baseColor = palette.cb_skyBlue, + flash = false, + width = 28, + show = false + }); + + orbitMapLabels.Add(Escapelabel, new MapLabelInfo() + { + label = "", + image = SCAN_UI_Loader.ExitMarker, + pos = new Vector2(), + baseColor = palette.cb_skyBlue, + flash = false, + width = 26, + show = false + }); + + orbitMapLabels.Add(Encounterlabel, new MapLabelInfo() + { + label = "", + image = SCAN_UI_Loader.EncounterMarker, + pos = new Vector2(), + baseColor = palette.cb_skyBlue, + flash = false, + width = 26, + show = false + }); + + orbitMapLabels.Add(Manlabel, new MapLabelInfo() + { + label = "", + image = SCAN_UI_Loader.ManeuverMarker, + pos = new Vector2(), + baseColor = palette.cb_reddishPurple, + flash = false, + width = 24, + show = false + }); + + orbitMapLabels.Add(ManEscapelabel, new MapLabelInfo() + { + label = "", + image = SCAN_UI_Loader.ExitMarker, + pos = new Vector2(), + baseColor = palette.cb_reddishPurple, + flash = false, + width = 26, + show = false + }); + + orbitMapLabels.Add(ManEncounterlabel, new MapLabelInfo() + { + label = "", + image = SCAN_UI_Loader.EncounterMarker, + pos = new Vector2(), + baseColor = palette.cb_reddishPurple, + flash = false, + width = 26, + show = false + }); + + orbitMapLabels.Add(ManAplabel, new MapLabelInfo() + { + label = "", + image = SCAN_UI_Loader.APMarker, + pos = new Vector2(), + baseColor = palette.cb_reddishPurple, + flash = false, + width = 28, + show = false + }); + + orbitMapLabels.Add(ManPelabel, new MapLabelInfo() + { + label = "", + image = SCAN_UI_Loader.PEMarker, + pos = new Vector2(), + baseColor = palette.cb_reddishPurple, + flash = false, + width = 28, + show = false + }); + } + + public void OnDestroy() + { + GameEvents.onVesselChange.Remove(vesselChange); + GameEvents.onVesselWasModified.Remove(vesselChange); + GameEvents.onVesselSOIChanged.Remove(soiChange); + + if (uiElement != null) + { + uiElement.gameObject.SetActive(false); + MonoBehaviour.Destroy(uiElement.gameObject); + } + + SCANcontroller.controller.unloadPQS(bigmap.Body, mapSource.BigMap); + } + + public void SetScale(float scale) + { + if (uiElement != null) + uiElement.SetScale(scale); + } + + public void ProcessTooltips() + { + if (uiElement != null) + uiElement.ProcessTooltips(); + } + + public void Update() + { + if (!_isVisible || data == null || bigmap == null) + return; + + if (uiElement == null) + return; + + if (!bigmap.isMapComplete()) + { + if (SCAN_Settings_Config.Instance.MapGenerationSpeed > 2) + bigmap.getPartialMap(false); + + if (SCAN_Settings_Config.Instance.MapGenerationSpeed > 1) + bigmap.getPartialMap(false); + + bigmap.getPartialMap(true); + } + + if (OrbitToggle && ShowOrbit) + { + if (vessel != null && vessel.mainBody == body && !vessel.LandedOrSplashed) + { + Orbit o = vessel.orbit; + + UpdateOrbitIcons(o); + + if (o.PeA < 0) + { + if (!clearMapSet) + { + clearMapSet = true; + uiElement.UpdateEQMapTexture(clearMap); + } + } + else if (clearMapSet) + { + clearMapSet = false; + if (bigmap.Projection != MapProjection.Polar) + uiElement.UpdateEQMapTexture(eqMap); + } + + if (eq_timer >= eq_update) + UpdateEQMap(o); + + eq_timer++; + + if (eq_timer > eq_update) + eq_timer = 0; + } + } + + if (updateMap) + { + updateMap = false; + uiElement.UpdateMapTexture(bigmap.Map); + + if (OrbitToggle && ShowOrbit && bigmap.Projection != MapProjection.Polar && vessel.orbit.PeA > 0) + uiElement.UpdateEQMapTexture(eqMap); + else + uiElement.UpdateEQMapTexture(clearMap); + } + } + + private void UpdateOrbitIcons(Orbit o) + { + double startUT = Planetarium.GetUniversalTime(); + double UT = startUT; + Color col; + + for (int i = 0; i < orbitSteps * 2; i++) + { + SimpleLabelInfo info = orbitLabels[i]; + + if (info == null) + continue; + + int k = i - orbitSteps; + + if (k < 0) + UT = startUT - (orbitSteps + k) * (o.period / orbitSteps); + else + UT = startUT + k * o.period * (1f / orbitSteps); + + if (double.IsNaN(UT)) + { + info.show = false; + continue; + } + + if (UT < o.StartUT && o.StartUT != startUT) + { + info.show = false; + continue; + } + + if (UT > o.EndUT) + { + info.show = false; + continue; + } + + if (double.IsNaN(o.getObtAtUT(UT))) + { + info.show = false; + continue; + } + + Vector3d pos = o.getPositionAtUT(UT); + + double rotation = 0; + + if (body.rotates) + rotation = (360 * ((UT - startUT) / body.rotationPeriod)) % 360; + + double alt = body.GetAltitude(pos); + + if (alt < 0) + { + if (k < 0) + { + for (int j = k; j < 0; j++) + { + orbitLabels[j + orbitSteps].show = false; + } + + i = orbitSteps; + continue; + } + + for (int j = k; j < orbitSteps; j++) + { + orbitLabels[j + orbitSteps].show = false; + } + + break; + } + + double lo = body.GetLongitude(pos) - rotation; + double la = body.GetLatitude(pos); + + double lon = (bigmap.projectLongitude(lo, la) + 180) % 360; + double lat = (bigmap.projectLatitude(lo, la) + 90) % 180; + + lon = bigmap.scaleLongitude(lon); + lat = bigmap.scaleLatitude(lat); + + if (lat < 0 || lon < 0 || lat > 180 || lon > 360) + { + info.show = false; + continue; + } + + lon = lon * bigmap.MapWidth / 360; + lat = lat * bigmap.MapHeight / 180; + + if (k < 0) + col = palette.cb_orange; + else + { + if (body.atmosphere && body.atmosphereDepth >= alt) + col = palette.cb_reddishPurple; + else + col = palette.cb_skyBlue; + } + + info.show = true; + info.color = col; + info.pos = new Vector2((float)lon, (float)lat); + } + + MapLabelInfo Ap = orbitMapLabels[Aplabel]; + + Vector2 labelPos; + + if (o.ApA > 0 && mapPosAtT(o, o.timeToAp, startUT, out labelPos)) + { + Ap.show = true; + Ap.pos = labelPos; + Ap.label = o.ApA.ToString("N0"); + } + else + Ap.show = false; + + orbitMapLabels[Aplabel] = Ap; + + MapLabelInfo Pe = orbitMapLabels[Pelabel]; + + if (o.PeA > 0 && mapPosAtT(o, o.timeToPe, startUT, out labelPos)) + { + Pe.show = true; + Pe.pos = labelPos; + Pe.label = o.PeA.ToString("N0"); + } + else + Pe.show = false; + + orbitMapLabels[Pelabel] = Pe; + + if (o.patchEndTransition == Orbit.PatchTransitionType.ESCAPE && mapPosAtT(o, o.EndUT, startUT, out labelPos)) + { + MapLabelInfo Esc = orbitMapLabels[Escapelabel]; + + Esc.show = true; + Esc.pos = labelPos; + + orbitMapLabels[Escapelabel] = Esc; + } + else if (o.patchEndTransition == Orbit.PatchTransitionType.ENCOUNTER && mapPosAtT(o, o.EndUT, startUT, out labelPos)) + { + MapLabelInfo Enc = orbitMapLabels[Encounterlabel]; + + Enc.show = true; + Enc.pos = labelPos; + + orbitMapLabels[Encounterlabel] = Enc; + } + else + { + MapLabelInfo Esc = orbitMapLabels[Escapelabel]; + Esc.show = false; + orbitMapLabels[Escapelabel] = Esc; + + MapLabelInfo Enc = orbitMapLabels[Encounterlabel]; + Enc.show = false; + orbitMapLabels[Encounterlabel] = Enc; + } + + if (vessel.patchedConicSolver != null) + { + if (vessel.patchedConicSolver.maneuverNodes.Count > 0) + { + ManeuverNode n = vessel.patchedConicSolver.maneuverNodes[0]; + + if (n.patch == o && n.nextPatch != null && n.nextPatch.activePatch && n.UT > startUT - o.period && mapPosAtT(o, n.UT - startUT, startUT, out labelPos)) + { + MapLabelInfo Man = orbitMapLabels[Manlabel]; + + Man.show = true; + Man.pos = labelPos; + + orbitMapLabels[Manlabel] = Man; + + Orbit next = n.nextPatch; + + for (int i = 0; i < orbitSteps; i++) + { + SimpleLabelInfo info = orbitLabels[orbitSteps * 2 + i]; + + double T = n.UT - startUT + i * next.period / orbitSteps; + + if (T + startUT > next.EndUT) + { + for (int j = i; j < orbitSteps; j++) + { + orbitLabels[orbitSteps * 2 + j].show = false; + } + + info.show = false; + + break; + } + + if (mapPosAtT(next, T, startUT, out labelPos)) + { + info.color = palette.cb_reddishPurple; + info.show = true; + info.pos = labelPos; + } + else + { + info.show = false; + continue; + } + } + + if (next.patchEndTransition == Orbit.PatchTransitionType.ESCAPE) + { + MapLabelInfo ManEsc = orbitMapLabels[ManEscapelabel]; + + ManEsc.show = true; + ManEsc.pos = labelPos; + + orbitMapLabels[ManEscapelabel] = ManEsc; + } + else if (next.patchEndTransition == Orbit.PatchTransitionType.ENCOUNTER) + { + MapLabelInfo ManEnc = orbitMapLabels[ManEncounterlabel]; + + ManEnc.show = true; + ManEnc.pos = labelPos; + + orbitMapLabels[ManEncounterlabel] = ManEnc; + } + else + { + MapLabelInfo ManEsc = orbitMapLabels[ManEscapelabel]; + ManEsc.show = false; + orbitMapLabels[ManEscapelabel] = ManEsc; + + MapLabelInfo ManEnc = orbitMapLabels[ManEncounterlabel]; + ManEnc.show = false; + orbitMapLabels[ManEncounterlabel] = ManEnc; + } + + MapLabelInfo ManAp = orbitMapLabels[ManAplabel]; + + if (next.timeToAp > 0 && n.UT + next.timeToAp < next.EndUT && mapPosAtT(next, n.UT - startUT + next.timeToAp, startUT, out labelPos)) + { + ManAp.show = true; + ManAp.pos = labelPos; + } + else + ManAp.show = false; + + orbitMapLabels[ManAplabel] = ManAp; + + MapLabelInfo ManPe = orbitMapLabels[ManPelabel]; + + if (next.timeToPe > 0 && n.UT + next.timeToPe < next.EndUT && mapPosAtT(next, n.UT - startUT + next.timeToPe, startUT, out labelPos)) + { + ManPe.show = true; + ManPe.pos = labelPos; + } + else + ManPe.show = false; + + orbitMapLabels[ManPelabel] = ManPe; + + } + else + { + MapLabelInfo Man = orbitMapLabels[Manlabel]; + Man.show = false; + orbitMapLabels[Manlabel] = Man; + + MapLabelInfo ManEsc = orbitMapLabels[ManEscapelabel]; + ManEsc.show = false; + orbitMapLabels[ManEscapelabel] = ManEsc; + + MapLabelInfo ManEnc = orbitMapLabels[ManEncounterlabel]; + ManEnc.show = false; + orbitMapLabels[ManEncounterlabel] = ManEnc; + + MapLabelInfo ManAp = orbitMapLabels[ManAplabel]; + ManAp.show = false; + orbitMapLabels[ManAplabel] = ManAp; + + MapLabelInfo ManPe = orbitMapLabels[ManPelabel]; + ManPe.show = false; + orbitMapLabels[ManPelabel] = ManPe; + + for (int i = 0; i < orbitSteps; i++) + { + SimpleLabelInfo info = orbitLabels[orbitSteps * 2 + i]; + info.show = false; + } + } + + } + else + { + MapLabelInfo Man = orbitMapLabels[Manlabel]; + Man.show = false; + orbitMapLabels[Manlabel] = Man; + + MapLabelInfo ManEsc = orbitMapLabels[ManEscapelabel]; + ManEsc.show = false; + orbitMapLabels[ManEscapelabel] = ManEsc; + + MapLabelInfo ManEnc = orbitMapLabels[ManEncounterlabel]; + ManEnc.show = false; + orbitMapLabels[ManEncounterlabel] = ManEnc; + + MapLabelInfo ManAp = orbitMapLabels[ManAplabel]; + ManAp.show = false; + orbitMapLabels[ManAplabel] = ManAp; + + MapLabelInfo ManPe = orbitMapLabels[ManPelabel]; + ManPe.show = false; + orbitMapLabels[ManPelabel] = ManPe; + + for (int i = 0; i < orbitSteps; i++) + { + SimpleLabelInfo info = orbitLabels[orbitSteps * 2 + i]; + info.show = false; + } + } + + } + } + + private void UpdateEQMap(Orbit o) + { + if (o.PeA < 0) + return; + + if (bigmap.Projection == MapProjection.Polar) + return; + + for (int i = eq_an.Length - 1; i >= 0; i--) + { + eq_an[i] = false; + eq_dn[i] = false; + } + + double startUT = Planetarium.GetUniversalTime(); + + double TAAN = 360f - o.argumentOfPeriapsis; // true anomaly at ascending node + double TADN = (TAAN + 180) % 360; // true anomaly at descending node + double MAAN = meanForTrue(TAAN, o.eccentricity); + double MADN = meanForTrue(TADN, o.eccentricity); + double tAN = (((MAAN - o.meanAnomaly * Mathf.Rad2Deg + 360) % 360) / 360f * o.period + startUT); + double tDN = (((MADN - o.meanAnomaly * Mathf.Rad2Deg + 360) % 360) / 360f * o.period + startUT); + + for (int i = 0; i < 100; i++) + { + double UTAN = tAN + o.period * i; + double UTDN = tDN + o.period * i; + + if (double.IsNaN(UTAN) || double.IsNaN(UTDN)) + continue; + + Vector3d pAN = o.getPositionAtUT(UTAN); + Vector3d pDN = o.getPositionAtUT(UTDN); + + double rotAN = 0; + double rotDN = 0; + + if (body.rotates) + { + rotAN = ((360 * ((UTAN - startUT) / body.rotationPeriod)) % 360); + rotDN = ((360 * ((UTDN - startUT) / body.rotationPeriod)) % 360); + } + + double loAN = body.GetLongitude(pAN) - rotAN; + double loDN = body.GetLongitude(pDN) - rotDN; + + int lonAN = (int)(((bigmap.projectLongitude(loAN, 0) + 180) % 360) * eq_an.Length / 360f); + int lonDN = (int)(((bigmap.projectLongitude(loDN, 0) + 180) % 360) * eq_dn.Length / 360f); + + if (lonAN >= 0 && lonAN < eq_an.Length) + eq_an[lonAN] = true; + if (lonDN >= 0 && lonDN < eq_dn.Length) + eq_dn[lonDN] = true; + } + + for (int y = 0; y < eq_height; y++) + { + bool down = y < eq_height / 2; + Color32 lc = palette.Clear; + + for (int x = 0; x < eq_an.Length; x++) + { + bool cross; + Color32 c = palette.Clear; + + if (down) + cross = eq_dn[x]; + else + cross = eq_an[x]; + + if (cross) + { + if (y == 0 || y == eq_height - 1) + c = palette.Black; + else + { + if (lc.r == palette.Clear.r) + eq_pix[y * eq_an.Length + x - 1] = palette.Black; + + c = down ? c_dn : c_an; + } + } + else + { + if (lc.r != palette.Clear.r && lc.r != palette.Black.r) + c = palette.Black; + } + + eq_pix[y * eq_an.Length + x] = c; + lc = c; + } + } + + eqMap.SetPixels32(eq_pix); + eqMap.Apply(); + } + + private double meanForTrue(double TA, double e) + { + TA = TA * Mathf.Deg2Rad; + + double EA = Math.Acos((e + Math.Cos(TA)) / (1 + e * Math.Cos(TA))); + + if (TA > Math.PI) + EA = 2 * Math.PI - EA; + + double MA = EA - e * Math.Sin(EA); + + // the mean anomaly isn't really an angle, but I'm a simple person + return MA * Mathf.Rad2Deg; + } + + private bool mapPosAtT(Orbit o, double dT, double startUT, out Vector2 labelPos) + { + labelPos = new Vector2(); + + double UT = startUT + dT; + + if (double.IsNaN(UT)) + return false; + + try + { + if (double.IsNaN(o.getObtAtUT(UT))) + return false; + + Vector3d pos = o.getPositionAtUT(UT); + double rotation = 0; + + if (body.rotates) + rotation = (360 * (dT / vessel.mainBody.rotationPeriod)) % 360; + + double lo = (body.GetLongitude(pos) - rotation); + double la = (body.GetLatitude(pos)); + + double lon = (bigmap.projectLongitude(lo, la) + 180) % 360; + double lat = (bigmap.projectLatitude(lo, la) + 90) % 180; + + lat = bigmap.scaleLatitude(lat); + lon = bigmap.scaleLongitude(lon); + + if (lat < 0 || lon < 0 || lat > 180 || lon > 360) + return false; + + lon = lon * bigmap.MapWidth / 360; + lat = lat * bigmap.MapHeight / 180; + + labelPos = new Vector2((float)lon, (float)lat); + + return true; + } + catch (Exception) + { + return false; + } + } + + private void RefreshEQMap() + { + eqMap = new Texture2D(bigmap.MapWidth, eq_height, TextureFormat.ARGB32, false); + eq_an = new bool[bigmap.MapWidth]; + eq_dn = new bool[bigmap.MapWidth]; + eq_pix = new Color32[bigmap.MapWidth * eq_height]; + + for (int i = eq_pix.Length - 1; i >= 0; i--) + { + eq_pix[i] = palette.Clear; + } + + eqMap.SetPixels32(eq_pix); + eqMap.Apply(); + } + + private void SetGridLines() + { + if (uiElement == null) + return; + + if (!GridToggle) + uiElement.UpdateGridTexture(clearMap); + else + { + GenerateGridMap(); + + uiElement.UpdateGridTexture(gridMap); + } + } + + private void GenerateGridMap() + { + gridMap = new Texture2D(bigmap.MapWidth, bigmap.MapHeight, TextureFormat.ARGB32, false); + + Color32[] pix = gridMap.GetPixels32(); + + for (int i = pix.Length - 1; i >= 0; i--) + pix[i] = palette.Clear; + + int x, y; + for (double lat = -90; lat < 90; lat+=2) + { + for (double lon = -180; lon < 180; lon +=2) + { + if (lat % 30 == 0 || lon % 30 == 0) + { + x = (int)(bigmap.MapScale * ((bigmap.projectLongitude(lon, lat) + 180) % 360)); + y = (int)(bigmap.MapScale * ((bigmap.projectLatitude(lon, lat) + 90) % 180)); + + pix[y * bigmap.MapWidth + x] = palette.White; + + if (x < bigmap.MapWidth - 1) + pix[(y * bigmap.MapWidth) + (x + 1)] = palette.Black; + + if (x > 0) + pix[(y * bigmap.MapWidth) + (x - 1)] = palette.Black; + + if (y < bigmap.MapHeight - 1) + pix[((y + 1) * bigmap.MapWidth) + x] = palette.Black; + + if (y > 0) + pix[((y - 1) * bigmap.MapWidth) + x] = palette.Black; + } + } + } + + gridMap.SetPixels32(pix); + + gridMap.Apply(); + } + + public void SetMapSize() + { + if (!_isVisible || uiElement == null) + return; + + uiElement.SetSize(Size); + } + + private void SetTitle() + { + if (uiElement == null || bigmap == null) + return; + + uiElement.UpdateTitle(string.Format("S.C.A.N. {0} Map of {1}", bigmap.MType, body.displayName.LocalizeBodyName())); + } + + public string Version + { + get { return SCANmainMenuLoader.SCANsatVersion; } + } + + public string CurrentProjection + { + get { return SCANcontroller.controller.bigMapProjection; } + set + { + MapProjection p; + + try + { + p = (MapProjection)Enum.Parse(typeof(MapProjection), value, true); + + SCANcontroller.controller.bigMapProjection = value; + bigmap.Projection = p; + + SetGridLines(); + + bigmap.resetMap(SCANcontroller.controller.bigMapResourceOn); + + updateMap = true; + } + catch (Exception e) + { + SCANUtil.SCANlog("Error in parsing map projection type\n{0}", e); + } + } + } + + public string CurrentMapType + { + get { return SCANcontroller.controller.bigMapType; } + set + { + mapType t; + + try + { + t = (mapType)Enum.Parse(typeof(mapType), value, true); + + SCANcontroller.controller.bigMapType = value; + bigmap.MType = t; + bigmap.resetMap(SCANcontroller.controller.bigMapResourceOn); + } + catch (Exception e) + { + SCANUtil.SCANlog("Error in parsing map type\n{0}", e); + } + + SetTitle(); + } + } + + public string CurrentResource + { + get { return SCANUtil.displayNameFromResource(SCANcontroller.controller.bigMapResource); } + set + { + SCANcontroller.controller.bigMapResource = SCANUtil.resourceFromDisplayName(value); + + currentResource = AssignResource(SCANcontroller.controller.bigMapResource); + + if (currentResource == null) + bigmap.Resource = null; + else + bigmap.Resource = currentResource; + } + } + + private SCANresourceGlobal AssignResource(string resource) + { + SCANresourceGlobal r = currentResource; + + if (r == null || r.DisplayName != resource) + { + for (int i = resources.Count - 1; i >= 0; i--) + { + SCANresourceGlobal res = resources[i]; + + if (res.DisplayName != resource) + continue; + + r = res; + break; + } + } + + if (r == null) + r = SCANcontroller.GetFirstResource; + + if (r != null) + r.CurrentBodyConfig(body.bodyName); + + return r; + } + + public string CurrentCelestialBody + { + get { return SCANUtil.displayNameFromBodyName(SCANcontroller.controller.bigMapBody); } + set + { + string b = SCANUtil.bodyFromDisplayName(value); + + SCANdata bodyData = SCANUtil.getData(b); + + if (bodyData != null) + { + data = bodyData; + body = data.Body; + bigmap.setBody(body); + + if (OrbitToggle && ShowOrbit) + { + Orbit o = vessel.orbit; + + orbitLabels.Clear(); + + for (int i = 0; i < orbitSteps * 3; i++) + { + orbitLabels.Add(new SimpleLabelInfo(10, SCAN_UI_Loader.PlanetIcon)); + } + + if (!vessel.LandedOrSplashed) + UpdateOrbitIcons(o); + } + + bigmap.resetMap(SCANcontroller.controller.bigMapResourceOn); + + SCANcontroller.controller.bigMapBody = b; + + if (currentResource != null) + currentResource.CurrentBodyConfig(body.bodyName); + + updateMap = true; + } + + SetTitle(); + } + } + + public string RandomWaypoint + { + get { return StringUtilities.GenerateSiteName(gen.Next(), body, false, true); } + } + + public bool IsVisible + { + get { return _isVisible; } + set + { + _isVisible = value; + + if (!value) + Close(); + } + } + + public bool ColorToggle + { + get { return SCANcontroller.controller.bigMapColor; } + set + { + SCANcontroller.controller.bigMapColor = value; + + bigmap.ColorMap = value; + bigmap.resetMap(SCANcontroller.controller.bigMapResourceOn); + } + } + + public bool TerminatorToggle + { + get { return SCANcontroller.controller.bigMapTerminator; } + set + { + SCANcontroller.controller.bigMapTerminator = value; + + bigmap.Terminator = value; + bigmap.resetMap(SCANcontroller.controller.bigMapResourceOn); + } + } + + public bool GridToggle + { + get { return SCANcontroller.controller.bigMapGrid; } + set + { + SCANcontroller.controller.bigMapGrid = value; + + SetGridLines(); + } + } + + public bool OrbitToggle + { + get { return SCANcontroller.controller.bigMapOrbit; } + set + { + SCANcontroller.controller.bigMapOrbit = value; + + if (value && ShowOrbit) + { + Orbit o = vessel.orbit; + + orbitLabels.Clear(); + + for (int i = 0; i < orbitSteps * 3; i++) + { + orbitLabels.Add(new SimpleLabelInfo(10, SCAN_UI_Loader.PlanetIcon)); + } + + if (!vessel.LandedOrSplashed) + UpdateOrbitIcons(o); + } + + updateMap = true; + } + } + + public bool WaypointToggle + { + get { return SCANcontroller.controller.bigMapWaypoint; } + set + { + SCANcontroller.controller.bigMapWaypoint = value; + + } + } + + public bool AnomalyToggle + { + get { return SCANcontroller.controller.bigMapAnomaly; } + set + { + SCANcontroller.controller.bigMapAnomaly = value; + + } + } + + public bool FlagToggle + { + get { return SCANcontroller.controller.bigMapFlag; } + set + { + SCANcontroller.controller.bigMapFlag = value; + + } + } + + public bool LegendToggle + { + get { return SCANcontroller.controller.bigMapLegend; } + set { SCANcontroller.controller.bigMapLegend = value;} + } + + public bool LegendAvailable + { + get + { + switch (bigmap.MType) + { + case mapType.Altimetry: + return body.pqsController != null; + case mapType.Biome: + return body.BiomeMap != null && SCAN_Settings_Config.Instance.LegendTooltips; + } + + return false; + } + } + + public bool ResourceToggle + { + get { return SCANcontroller.controller.bigMapResourceOn; } + set + { + SCANcontroller.controller.bigMapResourceOn = value; + + bigmap.resetMap(SCANcontroller.controller.bigMapResourceOn); + } + } + + public bool OrbitAvailable + { + get { return HighLogic.LoadedSceneIsFlight; } + } + + public bool ShowOrbit + { + get + { + return HighLogic.LoadedSceneIsFlight + && vessel != null + && body != null + && vessel.mainBody == body + && GameVariables.Instance.GetOrbitDisplayMode( + ScenarioUpgradeableFacilities.GetFacilityLevel( + SpaceCenterFacility.TrackingStation) + ) == GameVariables.OrbitDisplayMode.PatchedConics; + } + } + + public bool ShowWaypoint + { + get { return HighLogic.LoadedScene != GameScenes.SPACECENTER; } + } + + public bool ShowResource + { + get { return SCANcontroller.MasterResourceCount > 1; } + } + + public bool MechJebAvailable + { + get { return SCANmainMenuLoader.MechJebLoaded && SCAN_Settings_Config.Instance.MechJebTarget && SCANcontroller.controller.MechJebLoaded; } + } + + public bool LockInput + { + get { return _inputLock; } + set + { + _inputLock = value; + + if (_inputLock) + InputLockManager.SetControlLock(controlLock); + else + InputLockManager.RemoveControlLock(controlLock); + } + } + + public bool TooltipsOn + { + get { return SCAN_Settings_Config.Instance.WindowTooltips; } + } + + public bool LegendTooltips + { + get { return SCAN_Settings_Config.Instance.LegendTooltips; } + } + + public int OrbitSteps + { + get { return orbitSteps * 3; } + } + + public int CurrentScene + { + get + { + switch (HighLogic.LoadedScene) + { + case GameScenes.FLIGHT: + return 0; + case GameScenes.TRACKSTATION: + return 1; + case GameScenes.SPACECENTER: + return 2; + default: + return -1; + } + } + } + + public float Scale + { + get { return SCAN_Settings_Config.Instance.UIScale; } + } + + public Sprite WaypointSprite + { + get { return SCAN_UI_Loader.WaypointIcon; } + } + + public Canvas MainCanvas + { + get { return UIMasterController.Instance.dialogCanvas; } + } + + public Canvas TooltipCanvas + { + get { return UIMasterController.Instance.tooltipCanvas; } + } + + public Vector2 Position + { + get { return SCAN_Settings_Config.Instance.BigMapPosition; } + set { SCAN_Settings_Config.Instance.BigMapPosition = value; } + } + + public Vector2 Size + { + get + { + float width = SCAN_Settings_Config.Instance.BigMapWidth; + float height = width / 2; + + return new Vector2(width, height); + } + set + { + SCAN_Settings_Config.Instance.BigMapWidth = (int)value.x; + + bigmap.setWidth(SCAN_Settings_Config.Instance.BigMapWidth); + + SetGridLines(); + + RefreshEQMap(); + + updateMap = true; + } + } + + public Texture2D LegendImage + { + get + { + if (bigmap.MapLegend == null) + bigmap.MapLegend = new SCANmapLegend(); + + if (data == null) + return null; + + switch (bigmap.MType) + { + case mapType.Altimetry: + return bigmap.MapLegend.getLegend(SCANcontroller.controller.zoomMapColor, data.TerrainConfig); + case mapType.Biome: + if (body != null && body.BiomeMap != null && body.BiomeMap.Attributes != null) + return bigmap.MapLegend.getLegend(data, SCANcontroller.controller.zoomMapColor, SCAN_Settings_Config.Instance.BigMapStockBiomes, body.BiomeMap.Attributes); + else + return null; + } + + return null; + } + } + + public IList Projections + { + get { return new List(3) { "Rectangular", "KavrayskiyVII", "Polar" }; } + } + + public IList MapTypes + { + get { return new List(3) { "Altimetry", "Slope", "Biome" }; } + } + + public IList Resources + { + get { return new List(resources.Select(r => r.DisplayName)); } + } + + public IList CelestialBodies + { + get + { + List bodyList = new List(); + + var bodies = SCANcontroller.controller.GetAllData.Select(d => d.Body).Where(b => b.referenceBody == Planetarium.fetch.Sun && b.referenceBody != b); + + var orderedBodies = bodies.OrderBy(b => b.orbit.semiMajorAxis).ToList(); + + for (int i = 0; i < orderedBodies.Count; i++) + { + CelestialBody body = orderedBodies[i]; + + bodyList.Add(body.displayName.LocalizeBodyName()); + //SCANUtil.SCANlog("Body: {0} - Orbiting Count: {1}", body.bodyName, body.orbitingBodies.Count); + for (int j = 0; j < body.orbitingBodies.Count; j++) + { + CelestialBody moon = body.orbitingBodies[j]; + //SCANUtil.SCANlog("Moon: {0} - Orbiting Count: {1}", moon.bodyName, moon.orbitingBodies.Count); + + if (SCANcontroller.controller.getData(moon.bodyName) != null) + bodyList.Add(moon.displayName.LocalizeBodyName()); + + for (int k = 0; k < moon.orbitingBodies.Count; k++) + { + CelestialBody subMoon = moon.orbitingBodies[k]; + //SCANUtil.SCANlog("Sub Moon: {0} - Orbiting Count: {1}", subMoon.bodyName, subMoon.orbitingBodies.Count); + + if (SCANcontroller.controller.getData(subMoon.bodyName) != null) + bodyList.Add(subMoon.displayName.LocalizeBodyName()); + + for (int l = 0; l < subMoon.orbitingBodies.Count; l++) + { + CelestialBody subSubMoon = subMoon.orbitingBodies[l]; + //SCANUtil.SCANlog("Sub Sub Moon: {0} - Orbiting Count: {1}", subMoon.bodyName, subMoon.orbitingBodies.Count); + + if (SCANcontroller.controller.getData(subSubMoon.bodyName) != null) + bodyList.Add(subSubMoon.displayName.LocalizeBodyName()); + } + } + } + } + + if (HighLogic.LoadedSceneIsFlight) + { + for (int i = bodyList.Count - 1; i >= 0; i--) + { + string b = bodyList[i]; + + if (b != FlightGlobals.currentMainBody.displayName.LocalizeBodyName()) + continue; + + bodyList.RemoveAt(i); + bodyList.Insert(0, b); + break; + } + } + + SCANdata sun = SCANcontroller.controller.getData(Planetarium.fetch.Sun.bodyName); + + if (sun != null) + bodyList.Add(sun.Body.displayName.LocalizeBodyName()); + + return bodyList; + } + } + + public IList LegendLabels + { + get + { + if (data == null) + return null; + + string one = string.Format("|\n{0:N0}", (((int)(data.TerrainConfig.MinTerrain / 100)) * 100)); + + string two = string.Format("|\n{0:N0}", (((int)((data.TerrainConfig.MinTerrain + (data.TerrainConfig.TerrainRange / 2)) / 100)) * 100)); + + string three = string.Format("|\n{0:N0}", (((int)(data.TerrainConfig.MaxTerrain / 100)) * 100)); + + return new List(3) { one, two, three }; + } + } + + public SimpleLabelInfo OrbitInfo(int index) + { + if (index < 0 || index >= orbitLabels.Count) + return null; + + return orbitLabels[index]; + } + + public MapLabelInfo OrbitIconInfo(string id) + { + MapLabelInfo info; + + if (OrbitLabelList.TryGetValue(id, out info)) + return info; + + return new MapLabelInfo(); + } + + public Vector2 VesselPosition() + { + if (vessel == null) + return new Vector2(); + + return VesselPosition(vessel); + } + + public Vector2 VesselPosition(Guid id) + { + Vessel v = null; + + for (int i = FlightGlobals.Vessels.Count - 1; i >= 0; i--) + { + v = FlightGlobals.Vessels[i]; + + if (v.id == id) + break; + } + + return VesselPosition(v); + } + + public Vector2 VesselPosition(Vessel v) + { + if (v == null) + return new Vector2(); + + double lat = SCANUtil.fixLat(bigmap.projectLatitude(v.longitude, v.latitude)); + double lon = SCANUtil.fixLon(bigmap.projectLongitude(v.longitude, v.latitude)); + lat = bigmap.scaleLatitude(lat); + lon = bigmap.scaleLongitude(lon); + + lon = lon * bigmap.MapWidth / 360; + lat = lat * bigmap.MapHeight / 180; + + return new Vector2((float)lon, (float)lat); + } + + public Vector2 MapPosition(double lat, double lon) + { + double Lat = SCANUtil.fixLat(bigmap.projectLatitude(lon, lat)); + double Lon = SCANUtil.fixLon(bigmap.projectLongitude(lon, lat)); + Lat = bigmap.scaleLatitude(Lat); + Lon = bigmap.scaleLongitude(Lon); + + Lon = Lon * bigmap.MapWidth / 360; + Lat = Lat * bigmap.MapHeight / 180; + + return new Vector2((float)Lon, (float)Lat); + } + + public Dictionary OrbitLabelList + { + get { return orbitMapLabels; } + } + + public Dictionary FlagInfoList + { + get + { + Dictionary vessels = new Dictionary(); + mapFlags.Clear(); + + for (int i = FlightGlobals.Vessels.Count - 1; i >= 0; i--) + { + Vessel v = FlightGlobals.Vessels[i]; + + if (v == null) + continue; + + if (v.vesselType != VesselType.Flag) + continue; + + if (v.mainBody != body) + continue; + + mapFlags.Add(v); + + vessels.Add(v.id, new MapLabelInfo() + { + label = "", + image = SCAN_UI_Loader.FlagIcon, + pos = VesselPosition(v.id), + baseColor = ColorToggle ? palette.cb_yellow : palette.cb_skyBlue, + flash = false, + width = 32, + show = true + }); + } + + return vessels; + } + } + + public Dictionary AnomalyInfoList + { + get + { + Dictionary anomalies = new Dictionary(); + + if (data != null) + { + for (int i = data.Anomalies.Length - 1; i >= 0; i--) + { + SCANanomaly a = data.Anomalies[i]; + + if (a == null) + continue; + + if (!a.Known) + continue; + + anomalies.Add(a.Name, new MapLabelInfo() + { + label = "", + image = SCAN_UI_Loader.AnomalyIcon, + pos = MapPosition(a.Latitude, a.Longitude), + baseColor = ColorToggle ? palette.cb_yellow : palette.cb_skyBlue, + flash = false, + width = 20, + alignBottom = 8, + show = true + }); + } + } + + return anomalies; + } + } + + public Dictionary WaypointInfoList + { + get + { + Dictionary waypoints = new Dictionary(); + + if (data != null) + { + for (int i = data.Waypoints.Count - 1; i >= 0; i--) + { + SCANwaypoint w = data.Waypoints[i]; + + if (w == null) + continue; + + Vector2 wayPos = MapPosition(w.Latitude, w.Longitude); + + if (w.LandingTarget) + { + waypoints.Add(w.Seed, new MapLabelInfo() + { + label = "", + image = SCAN_UI_Loader.MechJebIcon, + pos = wayPos, + baseColor = palette.red, + flash = false, + width = 20, + alignBottom = 0, + show = true + }); + } + else + { + waypoints.Add(w.Seed, new MapLabelInfo() + { + label = "", + image = SCAN_UI_Loader.WaypointIcon, + pos = wayPos, + baseColor = palette.white, + flash = false, + width = 20, + alignBottom = 10, + show = true + }); + } + } + } + + return waypoints; + } + } + + public KeyValuePair VesselInfo + { + get + { + if (vessel == null || vessel.mainBody != body) + return new KeyValuePair(new Guid(), new MapLabelInfo() { label = "null" }); + + return new KeyValuePair(vessel.id, new MapLabelInfo() + { + label = "", + image = SCAN_UI_Loader.VesselIcon(vessel.vesselType), + pos = VesselPosition(vessel), + baseColor = ColorToggle ? palette.white : palette.cb_skyBlue, + flashColor = palette.cb_yellow, + flash = true, + width = 28, + show = true + }); + } + } + + private Vector2d MousePosition(Vector2 pos) + { + float mx = pos.x; + float my = pos.y * -1f; + + double mlo = (mx * 360 / bigmap.MapWidth) - 180; + double mla = 90 - (my * 180 / bigmap.MapHeight); + + double mlon = bigmap.unprojectLongitude(mlo, mla); + double mlat = bigmap.unprojectLatitude(mlo, mla); + + return new Vector2d(mlon, mlat); + } + + public string MapInfo(Vector2 mapPos) + { + Vector2d pos = MousePosition(mapPos); + + double mlon = pos.x; + double mlat = pos.y; + + if (mlon >= -180 && mlon <= 180 && mlat >= -90 && mlat <= 90) + return mouseOverInfo(mlon, mlat); + else + return ""; + } + + private string mouseOverInfo(double lon, double lat) + { + infoString = StringBuilderCache.Acquire(); + + bool altimetry = SCANUtil.isCovered(lon, lat, data, SCANtype.Altimetry); + bool hires = SCANUtil.isCovered(lon, lat, data, SCANtype.AltimetryHiRes); + + if (SCANUtil.isCovered(lon, lat, data, SCANtype.AltimetryLoRes)) + { + if (body.pqsController == null) + infoString.Append(palette.coloredNoQuote(palette.c_bad, "LO ")); + else + infoString.Append(palette.coloredNoQuote(palette.c_good, "LO ")); + } + else + infoString.Append(palette.coloredNoQuote(palette.grey, "LO ")); + + if (hires) + { + if (body.pqsController == null) + infoString.Append(palette.coloredNoQuote(palette.c_bad, "HI ")); + else + infoString.Append(palette.coloredNoQuote(palette.c_good, "HI ")); + } + else + infoString.Append(palette.coloredNoQuote(palette.grey, "HI ")); + + if (SCANUtil.isCovered(lon, lat, data, SCANtype.Biome)) + { + if (body.BiomeMap == null) + infoString.Append(palette.coloredNoQuote(palette.c_bad, "MULTI")); + else + infoString.Append(palette.coloredNoQuote(palette.c_good, "MULTI")); + } + else + infoString.Append(palette.coloredNoQuote(palette.grey, "MULTI")); + + if (altimetry) + { + infoString.AppendFormat(" Terrain Height: {0}", SCANuiUtil.getMouseOverElevation(lon, lat, data, 2, hires)); + + if (hires) + { + double circum = body.Radius * 2 * Math.PI; + double eqDistancePerDegree = circum / 360; + double degreeOffset = 5 / eqDistancePerDegree; + + infoString.AppendFormat(" Slope: {0:F1}°", SCANUtil.slope(SCANUtil.getElevation(body, lon, lat), body, lon, lat, degreeOffset)); + } + } + + if (SCANUtil.isCovered(lon, lat, data, SCANtype.Biome)) + infoString.AppendFormat(" Biome: {0}", SCANUtil.getBiomeDisplayName(body, lon, lat)); + + if (bigmap.ResourceActive && SCANconfigLoader.GlobalResource && bigmap.Resource != null) + { + bool resources = false; + bool fuzzy = false; + + if (SCANUtil.isCovered(lon, lat, data, bigmap.Resource.SType)) + { + resources = true; + } + else if (SCANUtil.isCovered(lon, lat, data, SCANtype.FuzzyResources)) + { + resources = true; + fuzzy = true; + } + + if (resources) + infoString.AppendFormat(" {0}", SCANuiUtil.getResourceAbundance(bigmap.Body, lat, lon, fuzzy, bigmap.Resource)); + } + + infoString.AppendLine(); + infoString.AppendFormat("{0} (lat: {1:F2}° lon: {2:F2}°)", SCANuiUtil.toDMS(lat, lon), lat, lon); + + double range = ContractDefs.Survey.MaximumTriggerRange; + + if (SCANcontroller.controller.bigMapWaypoint) + { + for (int i = data.Waypoints.Count - 1; i >= 0; i--) + { + SCANwaypoint p = data.Waypoints[i]; + + if (!p.LandingTarget) + { + if (p.Root != null) + { + if (p.Root.ContractState != Contracts.Contract.State.Active) + continue; + } + if (p.Param != null) + { + if (p.Param.State != Contracts.ParameterState.Incomplete) + continue; + } + + if (SCANUtil.waypointDistance(lat, lon, 1000, p.Latitude, p.Longitude, 1000, body) <= range) + { + infoString.AppendFormat(" Waypoint: {0}", p.Name); + break; + } + } + else if (SCANUtil.waypointDistance(lat, lon, 1000, p.Latitude, p.Longitude, 1000, body) <= range) + { + infoString.AppendFormat(" MechJeb Target: {0}", SCANuiUtil.toDMS(p.Latitude, p.Longitude, 0)); + break; + } + } + } + + if (SCANcontroller.controller.bigMapAnomaly) + { + for (int i = data.Anomalies.Length - 1; i >= 0; i--) + { + SCANanomaly a = data.Anomalies[i]; + + if (a.Known) + { + if (SCANUtil.mapLabelDistance(lat, lon, a.Latitude, a.Longitude, body) <= range) + { + if (a.Detail) + { + infoString.Append(" Anomaly: "); + infoString.Append(a.Name); + } + else + { + infoString.Append(" Anomaly: Unknown"); + } + break; + } + } + } + } + + if (SCANcontroller.controller.bigMapFlag) + { + for (int i = mapFlags.Count - 1; i >= 0; i--) + { + Vessel flag = mapFlags[i]; + + if (SCANUtil.mapLabelDistance(lat, lon, flag.latitude, flag.longitude, body) <= range) + { + infoString.Append(" Flag: "); + infoString.Append(flag.vesselName); + break; + } + } + } + + return infoString.ToStringAndRelease(); + } + + public string TooltipText(float xPos) + { + switch (bigmap.MType) + { + case mapType.Biome: + if (body.BiomeMap == null || body.BiomeMap.Attributes == null) + return ""; + + int count = body.BiomeMap.Attributes.Length; + + int blockSize = (int)Math.Truncate(256 / (count * 1d)); + + int current = (int)Math.Truncate((xPos * 256) / (blockSize * 1d)); + + if (current >= count) + current = count - 1; + else if (current < 0) + current = 0; + + return Localizer.Format(body.BiomeMap.Attributes[current].displayname); + case mapType.Altimetry: + float terrain = xPos * data.TerrainConfig.TerrainRange + data.TerrainConfig.MinTerrain; + + return string.Format("{0:N0}m", terrain); + } + + return ""; + } + + public void SetWaypoint(string id, Vector2 pos) + { + if (string.IsNullOrEmpty(id)) + id = RandomWaypoint; + + pos.y -= bigmap.MapHeight; + + Vector2d mapPos = MousePosition(pos); + + if (mapPos.x < -180 || mapPos.x > 180 || mapPos.y < -90 || mapPos.y > 90) + return; + + Waypoint w = new Waypoint(); + + w.name = id; + w.isExplored = true; + w.isNavigatable = true; + w.isOnSurface = true; + w.celestialName = body.GetName(); + w.latitude = mapPos.y; + w.longitude = mapPos.x; + w.seed = gen.Next(0, int.MaxValue); + w.navigationId = new Guid(); + + ScenarioCustomWaypoints.AddWaypoint(w); + } + + public void SetMJWaypoint(Vector2 pos) + { + pos.y -= bigmap.MapHeight; + + Vector2d mapPos = MousePosition(pos); + + if (mapPos.x < -180 || mapPos.x > 180 || mapPos.y < -90 || mapPos.y > 90) + return; + + SCANcontroller.controller.MJTargetSet.Invoke(mapPos, body); + + SCANwaypoint w = new SCANwaypoint(mapPos.y, mapPos.x, "MechJeb Landing Target"); + data.addToWaypoints(w); + } + + public void ClickMap(Vector2 pos) + { + Vector2d mapPos = MousePosition(pos); + + if (SCANcontroller.controller.zoomMapVesselLock) + return; + + if (SCAN_UI_ZoomMap.Instance == null) + return; + + if (SCAN_UI_ZoomMap.Instance.IsVisible) + SCAN_UI_ZoomMap.Instance.Close(); + + SCAN_UI_ZoomMap.Instance.Open(false, mapPos.y, mapPos.x, bigmap); + } + + public void RefreshMap() + { + bigmap.resetMap(SCANcontroller.controller.bigMapResourceOn); + + uiElement.SetLegend(LegendToggle); + } + + public void OpenMainMap() + { + if (SCAN_UI_MainMap.Instance.IsVisible) + SCAN_UI_MainMap.Instance.Close(); + else + SCAN_UI_MainMap.Instance.Open(); + } + + public void OpenZoomMap() + { + if (SCAN_UI_ZoomMap.Instance.IsVisible) + SCAN_UI_ZoomMap.Instance.Close(); + else + SCAN_UI_ZoomMap.Instance.Open(true); + } + + public void OpenOverlay() + { + if (SCAN_UI_Overlay.Instance.IsVisible) + SCAN_UI_Overlay.Instance.Close(); + else + SCAN_UI_Overlay.Instance.Open(); + } + + public void OpenInstruments() + { + if (SCAN_UI_Instruments.Instance.IsVisible) + SCAN_UI_Instruments.Instance.Close(); + else + SCAN_UI_Instruments.Instance.Open(); + } + + public void OpenSettings() + { + if (SCAN_UI_Settings.Instance.IsVisible) + SCAN_UI_Settings.Instance.Close(); + else + SCAN_UI_Settings.Instance.Open(); + } + + public void ExportMap() + { + if (bigmap.isMapComplete()) + bigmap.exportPNG(); + } + + public void setMapWidth(int width) + { + if (bigmap == null) + return; + + bigmap.setWidth(width); + SCAN_Settings_Config.Instance.BigMapWidth = bigmap.MapWidth; + } + + public void ResetPosition() + { + SCAN_Settings_Config.Instance.BigMapPosition = new Vector2(400, -400); + + if (uiElement != null) + uiElement.SetPosition(SCAN_Settings_Config.Instance.BigMapPosition); + } + + } +} diff --git a/SCANsat/SCAN_Unity/SCAN_UI_Color.cs b/SCANsat/SCAN_Unity/SCAN_UI_Color.cs new file mode 100644 index 000000000..e10485541 --- /dev/null +++ b/SCANsat/SCAN_Unity/SCAN_UI_Color.cs @@ -0,0 +1,797 @@ +#region license +/* + * [Scientific Committee on Advanced Navigation] + * S.C.A.N. Satellite + * + * SCAN_UI_Color - UI control object for SCANsat color management window + * + * Copyright (c)2014 David Grandy ; + * Copyright (c)2014 technogeeky ; + * Copyright (c)2014 (Your Name Here) ; see LICENSE.txt for licensing details. + */ +#endregion + +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEngine; +using KSP.Localization; +using SCANsat.Unity.Interfaces; +using SCANsat.Unity.Unity; +using SCANsat.SCAN_Data; +using SCANsat.SCAN_Map; +using SCANsat.SCAN_Platform.Palettes; +using palette = SCANsat.SCAN_UI.UI_Framework.SCANpalette; + +namespace SCANsat.SCAN_Unity +{ + public class SCAN_UI_Color : ISCAN_Color + { + private string _resourceCurrent; + private string _resourcePlanet; + private string _terrainPlanet; + private string _terrainPalette; + private string _terrainPaletteStyle; + + private bool _biomeBigMapStockColor; + private bool _biomeBigMapWhiteBorder; + private bool _biomeZoomMapWhiteBorder; + private bool _biomeSmallMapStockColor; + private bool _biomeSmallMapWhiteBorder; + private bool _terrainClampOn; + private bool _terrainReverse; + private bool _terrainDiscrete; + + private float _biomeTransparency; + private float _slopeCutoff; + private float _resourceMin; + private float _resourceMax; + private float _resourceTransparency; + private float _terrainCurrentMin; + private float _terrainCurrentMax; + private float _terrainClamp; + + private int _terrainSize; + + private SCANterrainConfig currentTerrain; + private Palette currentPalette; + + private SCANresourceGlobal currentResource; + private List loadedResources; + + public SCAN_UI_Color() + { + if (HighLogic.LoadedScene == GameScenes.SPACECENTER || HighLogic.LoadedScene == GameScenes.TRACKSTATION) + _resourcePlanet = Planetarium.fetch.Home.bodyName; + else if (HighLogic.LoadedSceneIsFlight) + _resourcePlanet = FlightGlobals.currentMainBody.bodyName; + + _terrainPlanet = _resourcePlanet; + } + + public void Refresh() + { + _biomeBigMapStockColor = SCAN_Settings_Config.Instance.BigMapStockBiomes; + _biomeBigMapWhiteBorder = SCAN_Settings_Config.Instance.BigMapBiomeBorder; + _biomeZoomMapWhiteBorder = SCAN_Settings_Config.Instance.ZoomMapBiomeBorder; + _biomeSmallMapStockColor = SCAN_Settings_Config.Instance.SmallMapStockBiomes; + _biomeSmallMapWhiteBorder = SCAN_Settings_Config.Instance.SmallMapBiomeBorder; + _biomeTransparency = SCAN_Settings_Config.Instance.BiomeTransparency * 100; + + _slopeCutoff = SCAN_Settings_Config.Instance.SlopeCutoff; + + loadedResources = SCANcontroller.setLoadedResourceList(); + currentResource = new SCANresourceGlobal(loadedResources[0]); + + if (currentResource != null) + { + currentResource.CurrentBodyConfig(_resourcePlanet); + _resourceCurrent = currentResource.DisplayName; + _resourceMin = currentResource.CurrentBody.MinValue; + _resourceMax = currentResource.CurrentBody.MaxValue; + _resourceTransparency = currentResource.Transparency; + } + + currentTerrain = SCANcontroller.getTerrainNode(_terrainPlanet); + + if (currentTerrain != null) + { + currentPalette = currentTerrain.ColorPal; + + palette.CurrentPalettes = palette.setCurrentPalettesType(currentPalette.kind, currentPalette.size); + + _terrainPalette = currentTerrain.ColorPal.name; + _terrainPaletteStyle = currentTerrain.ColorPal.kind.ToString(); + + _terrainCurrentMin = currentTerrain.MinTerrain; + _terrainCurrentMax = currentTerrain.MaxTerrain; + _terrainClampOn = currentTerrain.ClampTerrain != null; + _terrainClamp = currentTerrain.ClampTerrain == null ? 0 : (float)currentTerrain.ClampTerrain; + _terrainDiscrete = currentTerrain.PalDis; + _terrainReverse = currentTerrain.PalRev; + _terrainSize = currentTerrain.PalSize; + } + } + + public string ResourcePlanet + { + get { return currentResource.CurrentBody.Body.displayName.LocalizeBodyName(); } + set + { + string body = SCANUtil.bodyFromDisplayName(value); + + _resourcePlanet = body; + + if (currentResource != null) + { + currentResource.CurrentBodyConfig(body); + + _resourceMin = currentResource.CurrentBody.MinValue; + _resourceMax = currentResource.CurrentBody.MaxValue; + } + } + } + + public string ResourceCurrent + { + get { return _resourceCurrent; } + set + { + _resourceCurrent = value; + + if (currentResource.DisplayName != value) + { + for (int i = loadedResources.Count - 1; i >= 0; i--) + { + SCANresourceGlobal res = loadedResources[i]; + + if (res.DisplayName != value) + continue; + + currentResource = res; + break; + } + + if (currentResource == null) + currentResource = SCANcontroller.GetFirstResource; + + if (currentResource != null) + { + currentResource.CurrentBodyConfig(_resourcePlanet); + + _resourceCurrent = currentResource.DisplayName; + _resourceMin = currentResource.CurrentBody.MinValue; + _resourceMax = currentResource.CurrentBody.MaxValue; + _resourceTransparency = currentResource.Transparency; + } + } + } + } + + public string TerrainPlanet + { + get { return currentTerrain.Body.displayName.LocalizeBodyName(); } + set + { + string body = SCANUtil.bodyFromDisplayName(value); + + _terrainPlanet = body; + + currentTerrain = SCANcontroller.getTerrainNode(body); + + if (currentTerrain != null) + { + currentPalette = currentTerrain.ColorPal; + + palette.CurrentPalettes = palette.setCurrentPalettesType(currentPalette.kind, currentPalette.size); + + _terrainPalette = currentTerrain.ColorPal.name; + _terrainPaletteStyle = currentTerrain.ColorPal.kind.ToString(); + + _terrainCurrentMin = currentTerrain.MinTerrain; + _terrainCurrentMax = currentTerrain.MaxTerrain; + _terrainClampOn = currentTerrain.ClampTerrain != null; + _terrainClamp = currentTerrain.ClampTerrain == null ? 0 : (float)currentTerrain.ClampTerrain; + _terrainDiscrete = currentTerrain.PalDis; + _terrainReverse = currentTerrain.PalRev; + _terrainSize = currentTerrain.PalSize; + } + } + } + + public string TerrainPalette + { + get { return _terrainPalette; } + set + { + _terrainPalette = value; + + for (int i = palette.CurrentPalettes.Length - 1; i >= 0; i--) + { + Palette p = palette.CurrentPalettes.availablePalettes[i]; + + if (p.name != value) + continue; + + currentPalette = p; + break; + } + } + } + + public string TerrainPaletteStyle + { + get { return _terrainPaletteStyle; } + set + { + _terrainPaletteStyle = value; + + Palette.Kind kind = Palette.Kind.Diverging; + + try + { + kind = (Palette.Kind)Enum.Parse(typeof(Palette.Kind), value); + } + catch (Exception e) + { + SCANUtil.SCANlog("Error in palette style type\n{0}", e); + } + + palette.CurrentPalettes = palette.setCurrentPalettesType(kind, _terrainSize); + + currentPalette = palette.CurrentPalettes.availablePalettes[0]; + + _terrainPalette = currentPalette.name; + } + } + + public bool BiomeBigMapStockColor + { + get { return _biomeBigMapStockColor; } + set { _biomeBigMapStockColor = value; } + } + + public bool BiomeBigMapWhiteBorder + { + get { return _biomeBigMapWhiteBorder; } + set { _biomeBigMapWhiteBorder = value; } + } + + public bool BiomeZoomMapWhiteBorder + { + get { return _biomeZoomMapWhiteBorder; } + set { _biomeZoomMapWhiteBorder = value; } + } + + public bool BiomeSmallMapStockColor + { + get { return _biomeSmallMapStockColor; } + set { _biomeSmallMapStockColor = value; } + } + + public bool BiomeSmallMapWhiteBorder + { + get { return _biomeSmallMapWhiteBorder; } + set { _biomeSmallMapWhiteBorder = value; } + } + + public bool TerrainClampOn + { + get { return _terrainClampOn; } + set { _terrainClampOn = value; } + } + + public bool TerrainReverse + { + get { return _terrainReverse; } + set { _terrainReverse = value; } + } + + public bool TerrainDiscrete + { + get { return _terrainDiscrete; } + set { _terrainDiscrete = value; } + } + + public bool TerrainHasSize + { + get { return currentPalette.kind != Palette.Kind.Fixed; } + } + + public float BiomeTransparency + { + get { return _biomeTransparency; } + set { _biomeTransparency = value; } + } + + public float SlopeCutoff + { + get { return _slopeCutoff; } + set { _slopeCutoff = value; } + } + + public float ResourceMin + { + get { return _resourceMin; } + set { _resourceMin = value; } + } + + public float ResourceMax + { + get { return _resourceMax; } + set { _resourceMax = value; } + } + + public float ResourceTransparency + { + get { return _resourceTransparency; } + set { _resourceTransparency = value; } + } + + public float TerrainCurrentMin + { + get { return _terrainCurrentMin; } + set { _terrainCurrentMin = value; } + } + + public float TerrainGlobalMin + { + get { return currentTerrain.DefaultMinHeight - SCANconfigLoader.SCANNode.RangeBelowMinHeight; } + } + + public float TerrainCurrentMax + { + get { return _terrainCurrentMax; } + set { _terrainCurrentMax = value; } + } + + public float TerrainGlobalMax + { + get { return currentTerrain.DefaultMaxHeight + SCANconfigLoader.SCANNode.RangeAboveMaxHeight; } + } + + public float TerrainClamp + { + get { return _terrainClamp; } + set { _terrainClamp = value; } + } + + public int TerrainSize + { + get { return _terrainSize; } + set + { + _terrainSize = value; + + palette.CurrentPalettes = palette.setCurrentPalettesType(currentPalette.kind, _terrainSize); + + for (int i = palette.CurrentPalettes.Length - 1; i >= 0; i--) + { + Palette p = palette.CurrentPalettes.availablePalettes[i]; + + if (p.name != currentPalette.name) + continue; + + currentPalette = p; + break; + } + } + } + + public int TerrainSizeMin + { + get { return 3; } + } + + public int TerrainSizeMax + { + get + { + switch(currentTerrain.ColorPal.kind) + { + case Palette.Kind.Diverging: + return 11; + case Palette.Kind.Qualitative: + return 12; + case Palette.Kind.Sequential: + return 9; + } + + return 12; + } + } + + public Color BiomeColorOne + { + get { return SCAN_Settings_Config.Instance.LowBiomeColor; } + } + + public Color BiomeColorTwo + { + get { return SCAN_Settings_Config.Instance.HighBiomeColor; } + } + + public Color SlopeColorOneLo + { + get { return SCAN_Settings_Config.Instance.BottomLowSlopeColor; } + } + + public Color SlopeColorOneHi + { + get { return SCAN_Settings_Config.Instance.BottomHighSlopeColor; } + } + + public Color SlopeColorTwoLo + { + get { return SCAN_Settings_Config.Instance.TopLowSlopeColor; } + } + + public Color SlopeColorTwoHi + { + get { return SCAN_Settings_Config.Instance.TopHighSlopeColor; } + } + + public Color ResourceColorOne + { + get { return currentResource.MinColor; } + } + + public Color ResourceColorTwo + { + get { return currentResource.MaxColor; } + } + + public Texture2D TerrainPaletteOld + { + get { return SCANmapLegend.getStaticLegend(currentTerrain); } + } + + public Texture2D TerrainPaletteNew + { + get + { + Color32[] c = currentPalette.colors; + + if (_terrainReverse) + c = currentPalette.colorsReverse; + + return SCANmapLegend.getStaticLegend(_terrainCurrentMax, _terrainCurrentMin, _terrainCurrentMax - _terrainCurrentMin, _terrainClampOn ? (float?)_terrainClamp : null, _terrainDiscrete, c); + } + } + + public IList> TerrainPalettes + { + get + { + List> values = new List>(); + + for (int i = 0; i < palette.CurrentPalettes.Length; i++) + { + Palette p = palette.CurrentPalettes.availablePalettes[i]; + + values.Add(new KeyValuePair(p.name, palette.CurrentPalettes.paletteSwatch[i])); + } + + return values; + } + } + + public IList Resources + { + get { return new List(loadedResources.Select(r => r.DisplayName)); } + } + + public IList CelestialBodies + { + get + { + List bodyList = new List(); + + var bodies = FlightGlobals.Bodies.Where(b => b.referenceBody == Planetarium.fetch.Sun && b.referenceBody != b); + + var orderedBodies = bodies.OrderBy(b => b.orbit.semiMajorAxis).ToList(); + + for (int i = 0; i < orderedBodies.Count; i++) + { + CelestialBody body = orderedBodies[i]; + + bodyList.Add(body.displayName.LocalizeBodyName()); + + for (int j = 0; j < body.orbitingBodies.Count; j++) + { + CelestialBody moon = body.orbitingBodies[j]; + + bodyList.Add(moon.displayName.LocalizeBodyName()); + + for (int k = 0; k < moon.orbitingBodies.Count; k++) + { + CelestialBody subMoon = moon.orbitingBodies[k]; + + bodyList.Add(subMoon.displayName.LocalizeBodyName()); + + for (int l = 0; l < subMoon.orbitingBodies.Count; l++) + { + CelestialBody subSubMoon = subMoon.orbitingBodies[l]; + + bodyList.Add(subSubMoon.displayName.LocalizeBodyName()); + } + } + } + } + + if (HighLogic.LoadedSceneIsFlight) + { + for (int i = bodyList.Count - 1; i >= 0; i--) + { + string b = bodyList[i]; + + if (b != FlightGlobals.currentMainBody.displayName.LocalizeBodyName()) + continue; + + bodyList.RemoveAt(i); + bodyList.Insert(0, b); + break; + } + } + + bodyList.Add(Planetarium.fetch.Sun.displayName.LocalizeBodyName()); + + return bodyList; + } + } + + public IList PaletteStyleNames + { + get { return new List(Palette.kindNames); } + } + + public void BiomeApply(Color one, Color two) + { + SCAN_Settings_Config.Instance.LowBiomeColor = one; + SCAN_Settings_Config.Instance.HighBiomeColor = two; + SCANcontroller.controller.lowBiomeColor32 = one; + SCANcontroller.controller.highBiomeColor32 = two; + + SCAN_Settings_Config.Instance.BigMapStockBiomes = _biomeBigMapStockColor; + SCAN_Settings_Config.Instance.BigMapBiomeBorder = _biomeBigMapWhiteBorder; + SCAN_Settings_Config.Instance.ZoomMapBiomeBorder = _biomeZoomMapWhiteBorder; + SCAN_Settings_Config.Instance.SmallMapStockBiomes = _biomeSmallMapStockColor; + SCAN_Settings_Config.Instance.SmallMapBiomeBorder = _biomeSmallMapWhiteBorder; + SCAN_Settings_Config.Instance.BiomeTransparency = _biomeTransparency / 100; + + if (SCAN_UI_BigMap.Instance != null && SCAN_UI_BigMap.Instance.IsVisible && SCAN_UI_BigMap.Instance.CurrentMapType == "Biome") + SCAN_UI_BigMap.Instance.RefreshMap(); + + if (SCAN_UI_MainMap.Instance != null && SCAN_UI_MainMap.Instance.IsVisible && SCAN_UI_MainMap.Instance.MapType) + SCAN_UI_MainMap.Instance.resetImages(); + + if (SCAN_UI_ZoomMap.Instance != null && SCAN_UI_ZoomMap.Instance.IsVisible && SCAN_UI_ZoomMap.Instance.CurrentMapType == "Biome") + SCAN_UI_ZoomMap.Instance.RefreshMap(); + } + + public void BiomeDefault() + { + SCAN_Settings_Config.Instance.LowBiomeColor = palette.xkcd_CamoGreen; + SCANcontroller.controller.lowBiomeColor32 = palette.xkcd_CamoGreen; + SCAN_Settings_Config.Instance.HighBiomeColor = palette.xkcd_Marigold; + SCANcontroller.controller.highBiomeColor32 = palette.xkcd_Marigold; + + SCAN_Settings_Config.Instance.BigMapStockBiomes = true; + SCAN_Settings_Config.Instance.BigMapBiomeBorder = true; + SCAN_Settings_Config.Instance.ZoomMapBiomeBorder = true; + SCAN_Settings_Config.Instance.SmallMapStockBiomes = true; + SCAN_Settings_Config.Instance.SmallMapBiomeBorder = false; + SCAN_Settings_Config.Instance.BiomeTransparency = 0.4f; + + _biomeBigMapStockColor = true; + _biomeBigMapWhiteBorder = true; + _biomeZoomMapWhiteBorder = true; + _biomeSmallMapStockColor = true; + _biomeSmallMapWhiteBorder = false; + _biomeTransparency = 40; + + if (SCAN_UI_BigMap.Instance != null && SCAN_UI_BigMap.Instance.IsVisible && SCAN_UI_BigMap.Instance.CurrentMapType == "Biome") + SCAN_UI_BigMap.Instance.RefreshMap(); + + if (SCAN_UI_MainMap.Instance != null && SCAN_UI_MainMap.Instance.IsVisible && SCAN_UI_MainMap.Instance.MapType) + SCAN_UI_MainMap.Instance.resetImages(); + + if (SCAN_UI_ZoomMap.Instance != null && SCAN_UI_ZoomMap.Instance.IsVisible && SCAN_UI_ZoomMap.Instance.CurrentMapType == "Biome") + SCAN_UI_ZoomMap.Instance.RefreshMap(); + } + + public void SlopeApply(Color oneLow, Color oneHigh, Color twoLow, Color twoHigh) + { + SCAN_Settings_Config.Instance.BottomLowSlopeColor = oneLow; + SCAN_Settings_Config.Instance.BottomHighSlopeColor = oneHigh; + SCAN_Settings_Config.Instance.TopLowSlopeColor = twoLow; + SCAN_Settings_Config.Instance.TopHighSlopeColor = twoHigh; + SCANcontroller.controller.lowSlopeColorOne32 = oneLow; + SCANcontroller.controller.highSlopeColorOne32 = oneHigh; + SCANcontroller.controller.lowSlopeColorTwo32 = twoLow; + SCANcontroller.controller.highSlopeColorTwo32 = twoHigh; + + SCAN_Settings_Config.Instance.SlopeCutoff = _slopeCutoff; + + if (SCAN_UI_BigMap.Instance != null && SCAN_UI_BigMap.Instance.IsVisible && SCAN_UI_BigMap.Instance.CurrentMapType == "Slope") + SCAN_UI_BigMap.Instance.RefreshMap(); + + if (SCAN_UI_ZoomMap.Instance != null && SCAN_UI_ZoomMap.Instance.IsVisible && SCAN_UI_ZoomMap.Instance.CurrentMapType == "Slope") + SCAN_UI_ZoomMap.Instance.RefreshMap(); + } + + public void SlopeDefault() + { + SCAN_Settings_Config.Instance.BottomLowSlopeColor = palette.xkcd_PukeGreen; + SCAN_Settings_Config.Instance.BottomHighSlopeColor = palette.xkcd_Lemon; + SCAN_Settings_Config.Instance.TopLowSlopeColor = palette.xkcd_Lemon; + SCAN_Settings_Config.Instance.TopHighSlopeColor = palette.xkcd_OrangeRed; + SCANcontroller.controller.lowSlopeColorOne32 = palette.xkcd_PukeGreen; + SCANcontroller.controller.highSlopeColorOne32 = palette.xkcd_Lemon; + SCANcontroller.controller.lowSlopeColorTwo32 = palette.xkcd_Lemon; + SCANcontroller.controller.highSlopeColorTwo32 = palette.xkcd_OrangeRed; + + SCAN_Settings_Config.Instance.SlopeCutoff = 1; + + if (SCAN_UI_BigMap.Instance != null && SCAN_UI_BigMap.Instance.IsVisible && SCAN_UI_BigMap.Instance.CurrentMapType == "Slope") + SCAN_UI_BigMap.Instance.RefreshMap(); + + if (SCAN_UI_ZoomMap.Instance != null && SCAN_UI_ZoomMap.Instance.IsVisible && SCAN_UI_ZoomMap.Instance.CurrentMapType == "Slope") + SCAN_UI_ZoomMap.Instance.RefreshMap(); + } + + public void ResourceApply(Color one, Color two) + { + currentResource.CurrentBody.MinValue = _resourceMin; + currentResource.CurrentBody.MaxValue = _resourceMax; + currentResource.MinColor = one; + currentResource.MaxColor = two; + currentResource.Transparency = _resourceTransparency; + + SCANcontroller.updateSCANresource(currentResource, false); + + if (SCAN_UI_BigMap.Instance != null && SCAN_UI_BigMap.Instance.IsVisible && SCAN_UI_BigMap.Instance.ResourceToggle) + SCAN_UI_BigMap.Instance.RefreshMap(); + + if (SCAN_UI_ZoomMap.Instance != null && SCAN_UI_ZoomMap.Instance.IsVisible && SCAN_UI_ZoomMap.Instance.ResourceToggle) + SCAN_UI_ZoomMap.Instance.RefreshMap(); + } + + public void ResourceApplyToAll(Color one, Color two) + { + currentResource.CurrentBody.MinValue = _resourceMin; + currentResource.CurrentBody.MaxValue = _resourceMax; + currentResource.MinColor = one; + currentResource.MaxColor = two; + currentResource.Transparency = _resourceTransparency; + + SCANcontroller.updateSCANresource(currentResource, true); + + if (SCAN_UI_BigMap.Instance != null && SCAN_UI_BigMap.Instance.IsVisible && SCAN_UI_BigMap.Instance.ResourceToggle) + SCAN_UI_BigMap.Instance.RefreshMap(); + + if (SCAN_UI_ZoomMap.Instance != null && SCAN_UI_ZoomMap.Instance.IsVisible && SCAN_UI_ZoomMap.Instance.ResourceToggle) + SCAN_UI_ZoomMap.Instance.RefreshMap(); + } + + public void ResourceDefault() + { + currentResource.CurrentBody.MinValue = currentResource.CurrentBody.DefaultMinValue; + currentResource.CurrentBody.MaxValue = currentResource.CurrentBody.DefaultMaxValue; + currentResource.MinColor = currentResource.DefaultLowColor; + currentResource.MaxColor = currentResource.DefaultHighColor; + currentResource.Transparency = currentResource.DefaultTrans; + + SCANcontroller.updateSCANresource(currentResource, false); + + if (SCAN_UI_BigMap.Instance != null && SCAN_UI_BigMap.Instance.IsVisible && SCAN_UI_BigMap.Instance.ResourceToggle) + SCAN_UI_BigMap.Instance.RefreshMap(); + } + + public void ResourceDefaultToAll() + { + currentResource.CurrentBody.MinValue = currentResource.CurrentBody.DefaultMinValue; + currentResource.CurrentBody.MaxValue = currentResource.CurrentBody.DefaultMaxValue; + currentResource.MinColor = currentResource.DefaultLowColor; + currentResource.MaxColor = currentResource.DefaultHighColor; + currentResource.Transparency = currentResource.DefaultTrans; + + SCANcontroller.updateSCANresource(currentResource, true); + + if (SCAN_UI_BigMap.Instance != null && SCAN_UI_BigMap.Instance.IsVisible && SCAN_UI_BigMap.Instance.ResourceToggle) + SCAN_UI_BigMap.Instance.RefreshMap(); + + if (SCAN_UI_ZoomMap.Instance != null && SCAN_UI_ZoomMap.Instance.IsVisible && SCAN_UI_ZoomMap.Instance.ResourceToggle) + SCAN_UI_ZoomMap.Instance.RefreshMap(); + } + + public void ResourceSaveToConfig(Color one, Color two) + { + currentResource.CurrentBody.MinValue = _resourceMin; + currentResource.CurrentBody.MaxValue = _resourceMax; + currentResource.MinColor = one; + currentResource.MaxColor = two; + currentResource.Transparency = _resourceTransparency; + + SCANcontroller.updateSCANresource(currentResource, false); + + if (SCAN_UI_BigMap.Instance != null && SCAN_UI_BigMap.Instance.IsVisible && SCAN_UI_BigMap.Instance.ResourceToggle) + SCAN_UI_BigMap.Instance.RefreshMap(); + + if (SCAN_UI_ZoomMap.Instance != null && SCAN_UI_ZoomMap.Instance.IsVisible && SCAN_UI_ZoomMap.Instance.ResourceToggle) + SCAN_UI_ZoomMap.Instance.RefreshMap(); + + SCANconfigLoader.SCANNode.Save(); + } + + public void TerrainApply() + { + currentTerrain.MinTerrain = _terrainCurrentMin; + currentTerrain.MaxTerrain = _terrainCurrentMax; + currentTerrain.ClampTerrain = _terrainClampOn ? (float?)_terrainClamp : null; + currentTerrain.PalDis = _terrainDiscrete; + currentTerrain.PalRev = _terrainReverse; + currentTerrain.PalSize = _terrainSize; + + currentTerrain.ColorPal = currentPalette; + + SCANcontroller.updateTerrainConfig(currentTerrain); + + if (SCAN_UI_BigMap.Instance != null && SCAN_UI_BigMap.Instance.IsVisible && SCAN_UI_BigMap.Instance.CurrentMapType == "Altimetry") + SCAN_UI_BigMap.Instance.RefreshMap(); + + if (SCAN_UI_MainMap.Instance != null && SCAN_UI_MainMap.Instance.IsVisible && !SCAN_UI_MainMap.Instance.MapType) + SCAN_UI_MainMap.Instance.resetImages(); + + if (SCAN_UI_ZoomMap.Instance != null && SCAN_UI_ZoomMap.Instance.IsVisible && SCAN_UI_ZoomMap.Instance.CurrentMapType == "Altimetry") + SCAN_UI_ZoomMap.Instance.RefreshMap(); + } + + public void TerrainDefault() + { + currentTerrain.MinTerrain = currentTerrain.DefaultMinHeight; + currentTerrain.MaxTerrain = currentTerrain.DefaultMaxHeight; + currentTerrain.ClampTerrain = currentTerrain.DefaultClampHeight; + currentTerrain.ColorPal = currentTerrain.DefaultPalette; + currentTerrain.PalRev = currentTerrain.DefaultReverse; + currentTerrain.PalDis = currentTerrain.DefaultDiscrete; + currentTerrain.PalSize = currentTerrain.DefaultPaletteSize; + + SCANcontroller.updateTerrainConfig(currentTerrain); + + Refresh(); + + if (SCAN_UI_BigMap.Instance != null && SCAN_UI_BigMap.Instance.IsVisible && SCAN_UI_BigMap.Instance.CurrentMapType == "Altimetry") + SCAN_UI_BigMap.Instance.RefreshMap(); + + if (SCAN_UI_MainMap.Instance != null && SCAN_UI_MainMap.Instance.IsVisible && !SCAN_UI_MainMap.Instance.MapType) + SCAN_UI_MainMap.Instance.resetImages(); + + if (SCAN_UI_ZoomMap.Instance != null && SCAN_UI_ZoomMap.Instance.IsVisible && SCAN_UI_ZoomMap.Instance.CurrentMapType == "Altimetry") + SCAN_UI_ZoomMap.Instance.RefreshMap(); + } + + public void TerrainSaveToConfig() + { + currentTerrain.MinTerrain = _terrainCurrentMin; + currentTerrain.MaxTerrain = _terrainCurrentMax; + currentTerrain.ClampTerrain = _terrainClampOn ? (float?)_terrainClamp : null; + currentTerrain.PalDis = _terrainDiscrete; + currentTerrain.PalRev = _terrainReverse; + currentTerrain.PalSize = _terrainSize; + + SCANcontroller.updateTerrainConfig(currentTerrain); + + SCANconfigLoader.SCANNode.Save(); + + if (SCAN_UI_BigMap.Instance != null && SCAN_UI_BigMap.Instance.IsVisible && SCAN_UI_BigMap.Instance.CurrentMapType == "Altimetry") + SCAN_UI_BigMap.Instance.RefreshMap(); + + if (SCAN_UI_MainMap.Instance != null && SCAN_UI_MainMap.Instance.IsVisible && !SCAN_UI_MainMap.Instance.MapType) + SCAN_UI_MainMap.Instance.resetImages(); + + if (SCAN_UI_ZoomMap.Instance != null && SCAN_UI_ZoomMap.Instance.IsVisible && SCAN_UI_ZoomMap.Instance.CurrentMapType == "Altimetry") + SCAN_UI_ZoomMap.Instance.RefreshMap(); + } + } +} diff --git a/SCANsat/SCAN_UI/SCANinstrumentUI.cs b/SCANsat/SCAN_Unity/SCAN_UI_Instruments.cs similarity index 50% rename from SCANsat/SCAN_UI/SCANinstrumentUI.cs rename to SCANsat/SCAN_Unity/SCAN_UI_Instruments.cs index ec038f3a9..b8bec5add 100644 --- a/SCANsat/SCAN_UI/SCANinstrumentUI.cs +++ b/SCANsat/SCAN_Unity/SCAN_UI_Instruments.cs @@ -1,41 +1,40 @@ #region license /* - * [Scientific Committee on Advanced Navigation] + * [Scientific Committee on Advanced Navigation] * S.C.A.N. Satellite * - * SCANsat - Instruments window object + * SCAN_UI_Instruments - UI control object for SCANsat instruments readout * - * Copyright (c)2013 damny; * Copyright (c)2014 David Grandy ; * Copyright (c)2014 technogeeky ; * Copyright (c)2014 (Your Name Here) ; see LICENSE.txt for licensing details. - * */ #endregion using System; using System.Collections.Generic; -using System.Linq; using System.Text; +using UnityEngine; +using SCANsat.SCAN_Toolbar; +using SCANsat.Unity.Interfaces; +using SCANsat.Unity.Unity; +using SCANsat.SCAN_Data; +using SCANsat.SCAN_UI.UI_Framework; +using SCANsat.SCAN_PartModules; using FinePrint; using FinePrint.Utilities; -using SCANsat.SCAN_Platform; -using SCANsat; -using SCANsat.SCAN_PartModules; -using SCANsat.SCAN_UI.UI_Framework; -using SCANsat.SCAN_Data; -using UnityEngine; +using KSP.UI; -using palette = SCANsat.SCAN_UI.UI_Framework.SCANpalette; - -namespace SCANsat.SCAN_UI +namespace SCANsat.SCAN_Unity { - class SCANinstrumentUI: SCAN_MBW + public class SCAN_UI_Instruments : ISCAN_Instruments { - private bool notMappingToday; //Unused out-of-power bool - private SCANremoteView anomalyView; + private bool _isVisible; + private bool _mouseInAnomaly; + private SCANremoteView _anomalyView; private SCANtype sensors; private SCANdata data; + private SCANanomaly nearest = null; private Vessel v; private List resourceScanners = new List(); private List resources = new List(); @@ -44,35 +43,31 @@ class SCANinstrumentUI: SCAN_MBW private double vlat, vlon; private float lastUpdate = 0f; private float updateInterval = 0.2f; + private double maxAnomalyDistance = 20000; private double slopeAVG; - internal readonly static Rect defaultRect = new Rect(30, 600, 260, 60); - private static Rect sessionRect = defaultRect; + private StringBuilder infoString = new StringBuilder(); + private string slopeString; - private StringBuilder infoString; - SCANanomaly nearest = null; - private string slopeString = ""; + private int oldLines; + private int lines; - protected override void Awake() - { - base.Awake(); + private Texture anomalyTex; - WindowCaption = "S.C.A.N. Instruments"; - WindowRect = sessionRect; - WindowStyle = SCANskins.SCAN_window; - WindowOptions = new GUILayoutOption[2] { GUILayout.Width(260), GUILayout.Height(60) }; - Visible = false; - DragEnabled = true; - ClampToScreenOffset = new RectOffset(-200, -200, -40, -40); + private SCAN_Instruments uiElement; + + private static SCAN_UI_Instruments instance; - SCAN_SkinsLibrary.SetCurrent("SCAN_Unity"); + public static SCAN_UI_Instruments Instance + { + get { return instance; } } - protected override void Start() + public SCAN_UI_Instruments() { - GameEvents.onVesselSOIChanged.Add(soiChange); - GameEvents.onVesselChange.Add(vesselChange); - GameEvents.onVesselWasModified.Add(vesselChange); + instance = this; + data = SCANUtil.getData(FlightGlobals.currentMainBody); + if (data == null) { data = new SCANdata(FlightGlobals.currentMainBody); @@ -83,107 +78,263 @@ protected override void Start() v = FlightGlobals.ActiveVessel; resources = SCANcontroller.setLoadedResourceList(); resetResourceList(); - infoString = new StringBuilder(); + + GameEvents.onVesselSOIChanged.Add(soiChange); + GameEvents.onVesselChange.Add(vesselChange); + GameEvents.onVesselWasModified.Add(vesselChange); } - protected override void OnDestroy() + private void soiChange(GameEvents.HostedFromToAction VC) { - GameEvents.onVesselSOIChanged.Remove(soiChange); - GameEvents.onVesselChange.Remove(vesselChange); - GameEvents.onVesselWasModified.Remove(vesselChange); + data = SCANUtil.getData(VC.to); + if (data == null) + { + data = new SCANdata(VC.to); + SCANcontroller.controller.addToBodyData(VC.to, data); + } + planetConstants(VC.to); + } + + private void vesselChange(Vessel V) + { + v = FlightGlobals.ActiveVessel; + resetResourceList(); + } + + public void SetScale(float scale) + { + if (uiElement != null) + uiElement.SetScale(scale); + } + + public void ProcessTooltips() + { + if (uiElement != null) + uiElement.ProcessTooltips(); } - protected override void DrawWindowPre(int id) + public void Update() { + if (!_isVisible || uiElement == null) + return; + vlat = SCANUtil.fixLatShift(v.latitude); vlon = SCANUtil.fixLonShift(v.longitude); - //Grab the active scanners on this vessel sensors = SCANcontroller.controller.activeSensorsOnVessel(v.id); - if (true) + if (SCANUtil.isCovered(vlon, vlat, data, SCANtype.AltimetryLoRes)) { - //Check if region below the vessel is scanned - if (SCANUtil.isCovered(vlon, vlat, data, SCANtype.AltimetryLoRes)) - { - sensors |= SCANtype.AltimetryLoRes; - } + sensors |= SCANtype.AltimetryLoRes; + } - if (SCANUtil.isCovered(vlon, vlat, data, SCANtype.AltimetryHiRes)) - { - sensors |= SCANtype.AltimetryHiRes; - } + if (SCANUtil.isCovered(vlon, vlat, data, SCANtype.AltimetryHiRes)) + { + sensors |= SCANtype.AltimetryHiRes; + } - if (SCANUtil.isCovered(vlon, vlat, data, SCANtype.Biome)) - { - sensors |= SCANtype.Biome; - } + if (SCANUtil.isCovered(vlon, vlat, data, SCANtype.Biome)) + { + sensors |= SCANtype.Biome; + } - foreach (SCANresourceGlobal s in resources) - { - if (SCANUtil.isCovered(vlon, vlat, data, s.SType)) - sensors |= s.SType; - } + if (SCANUtil.isCovered(vlon, vlat, data, SCANtype.Anomaly)) + { + sensors |= SCANtype.Anomaly; + } + + foreach (SCANresourceGlobal s in resources) + { + if (SCANUtil.isCovered(vlon, vlat, data, s.SType)) + sensors |= s.SType; + } - if (SCANUtil.isCovered(vlon, vlat, data, SCANtype.FuzzyResources)) - sensors |= SCANtype.FuzzyResources; + if (SCANUtil.isCovered(vlon, vlat, data, SCANtype.FuzzyResources)) + sensors |= SCANtype.FuzzyResources; + + infoString.Length = 0; + + locationInfo(); + altInfo(); + biomeInfo(); + resourceInfo(); + anomalyInfo(); + BTDTInfo(); + + if (oldLines != lines && ResourceButtons) + { + oldLines = lines; + uiElement.SetResourceButtons(lines); } + + uiElement.UpdateText(infoString.ToString()); } - protected override void DrawWindow(int id) + public void OnDestroy() { - versionLabel(id); /* Standard version label and close button */ - closeBox(id); + if (uiElement != null) + { + uiElement.gameObject.SetActive(false); + MonoBehaviour.Destroy(uiElement.gameObject); + } - growS(); - if (Event.current.type == EventType.Layout) - { - infoString.Length = 0; - locationInfo(id); /* always-on indicator for current lat/long */ - altInfo(id); /* show current altitude and slope */ - biomeInfo(id); /* show current biome info */ - resourceInfo(id); /* show current resource abundance */ - } - drawInfoLabel(id); /* method to actually draw the label */ - drawResourceButtons(id); /* draw the toggle buttons to change resources */ - anomalyInfo(id); /* show nearest anomaly detail */ - drawBTDTInfo(id); /* draws the BTDT anomaly viewer */ - //if (parts <= 0) noData(id); /* nothing to show */ - stopS(); + GameEvents.onVesselSOIChanged.Remove(soiChange); + GameEvents.onVesselChange.Remove(vesselChange); + GameEvents.onVesselWasModified.Remove(vesselChange); } - protected override void DrawWindowPost(int id) + public void Open() { - sessionRect = WindowRect; + if (uiElement != null) + { + uiElement.gameObject.SetActive(false); + MonoBehaviour.DestroyImmediate(uiElement.gameObject); + } + + uiElement = GameObject.Instantiate(SCAN_UI_Loader.InstrumentsPrefab).GetComponent(); + + if (uiElement == null) + return; + + uiElement.transform.SetParent(UIMasterController.Instance.dialogCanvas.transform, false); + + _isVisible = true; + + infoString = StringBuilderCache.Acquire(); + + uiElement.SetInstruments(this); + + if (HighLogic.LoadedSceneIsFlight && SCAN_Settings_Config.Instance.StockToolbar && SCAN_Settings_Config.Instance.ToolbarMenu) + { + if (SCANappLauncher.Instance != null && SCANappLauncher.Instance.UIElement != null) + SCANappLauncher.Instance.UIElement.SetInstrumentToggle(true); + } + } + + public void Close() + { + _isVisible = false; + + oldLines = 0; + + if (uiElement == null) + return; + + uiElement.FadeOut(); + + if (HighLogic.LoadedSceneIsFlight && SCAN_Settings_Config.Instance.StockToolbar && SCAN_Settings_Config.Instance.ToolbarMenu) + { + if (SCANappLauncher.Instance != null && SCANappLauncher.Instance.UIElement != null) + SCANappLauncher.Instance.UIElement.SetInstrumentToggle(false); + } + + uiElement = null; } - //Draw the version label in the upper left corner - private void versionLabel(int id) + public string Version { - Rect r = new Rect(4, 0, 50, 18); - GUI.Label(r, SCANmainMenuLoader.SCANsatVersion, SCANskins.SCAN_whiteReadoutLabel); + get { return SCANmainMenuLoader.SCANsatVersion; } } - //Draw the close button in the upper right corner - private void closeBox(int id) + public string Readout { - Rect r = new Rect(WindowRect.width - 20, 1, 18, 18); - if (GUI.Button(r, SCANcontroller.controller.closeBox, SCANskins.SCAN_closeButton)) + get { return infoString.ToString(); } + } + + public string ResourceName + { + get { return resources[currentResource].DisplayName; } + } + + public string TypingText + { + get { return ""; } + } + + public string AnomalyText + { + get { return ""; } + } + + public bool IsVisible + { + get { return _isVisible; } + set { - Visible = false; + _isVisible = value; + + if (!value) + { + Close(); + infoString.Release(); + } } } - private void noData(int id) + public bool ResourceButtons + { + get { return SCANcontroller.MasterResourceCount > 1; } + } + + public bool MouseAnomaly + { + get { return _mouseInAnomaly; } + set { _mouseInAnomaly = value; } + } + + public bool TooltipsOn + { + get { return SCAN_Settings_Config.Instance.WindowTooltips; } + } + + public float Scale + { + get { return SCAN_Settings_Config.Instance.UIScale; } + } + + public Texture AnomalyCamera + { + get { return null; } + } + + public Canvas TooltipCanvas + { + get { return UIMasterController.Instance.tooltipCanvas; } + } + + public Vector2 Position + { + get { return SCAN_Settings_Config.Instance.InstrumentsPosition; } + set { SCAN_Settings_Config.Instance.InstrumentsPosition = value; } + } + + public void ClampToScreen(RectTransform rect) + { + UIMasterController.ClampToScreen(rect, Vector2.zero); + } + + public void NextResource() + { + currentResource += 1; + + if (currentResource >= resources.Count) + currentResource = 0; + } + + public void PreviousResource() { - infoString.Append("No Data"); + currentResource -= 1; + + if (currentResource < 0) + currentResource = resources.Count - 1; } - //Displays current vessel location info - private void locationInfo(int id) + private void locationInfo() { infoString.AppendFormat("Lat: {0:F2}°, Lon: {1:F2}°", vlat, vlon); + lines = 1; + foreach (SCANwaypoint p in data.Waypoints) { if (p.LandingTarget) @@ -193,6 +344,7 @@ private void locationInfo(int id) { infoString.AppendLine(); infoString.AppendFormat("Target Dist: {0:N1}m", distance); + lines++; } continue; } @@ -218,23 +370,13 @@ private void locationInfo(int id) { infoString.AppendLine(); infoString.AppendFormat("Waypoint: {0}", p.Name); + lines++; break; } } } - //Display current biome info - private void biomeInfo(int id) - { - if ((sensors & SCANtype.Biome) != SCANtype.Nothing && v.mainBody.BiomeMap != null) - { - infoString.AppendLine(); - infoString.AppendFormat("Biome: {0}", SCANUtil.getBiomeName(v.mainBody, vlon, vlat)); - } - } - - //Display the current vessel altitude - private void altInfo(int id) + private void altInfo() { double h = v.altitude; double pqs = 0; @@ -255,6 +397,7 @@ private void altInfo(int id) case Vessel.Situations.PRELAUNCH: infoString.AppendLine(); infoString.AppendFormat("Terrain: {0:N1}m", pqs); + lines++; drawSlope = true; break; case Vessel.Situations.SPLASHED: @@ -263,12 +406,14 @@ private void altInfo(int id) { infoString.AppendLine(); infoString.AppendFormat("Depth: {0}", SCANuiUtil.distanceString(Math.Abs(d), 10000)); + lines++; } else { d = ((int)(d / 100)) * 100; infoString.AppendLine(); infoString.AppendFormat("Depth: {0}", SCANuiUtil.distanceString(Math.Abs(d), 10000)); + lines++; } drawSlope = false; break; @@ -277,6 +422,7 @@ private void altInfo(int id) { infoString.AppendLine(); infoString.AppendFormat("Altitude: {0}", SCANuiUtil.distanceString(h, 100000)); + lines++; drawSlope = true; } else if ((sensors & SCANtype.AltimetryLoRes) != SCANtype.Nothing) @@ -284,6 +430,7 @@ private void altInfo(int id) h = ((int)(h / 500)) * 500; infoString.AppendLine(); infoString.AppendFormat("Altitude: {0}", SCANuiUtil.distanceString(h, 100000)); + lines++; drawSlope = false; } break; @@ -309,17 +456,27 @@ private void altInfo(int id) infoString.AppendLine(); infoString.Append(slopeString); + lines++; } } } - //Display resource abundace info - private void resourceInfo(int id) + private void biomeInfo() + { + if ((sensors & SCANtype.Biome) != SCANtype.Nothing && v.mainBody.BiomeMap != null) + { + infoString.AppendLine(); + infoString.AppendFormat("Biome: {0}", SCANUtil.getBiomeDisplayName(v.mainBody, vlon, vlat)); + lines++; + } + } + + private void resourceInfo() { if (v.mainBody.pqsController == null) return; - if (SCANcontroller.controller.needsNarrowBand) + if (SCAN_Settings_Config.Instance.RequireNarrowBand) { bool tooHigh = false; bool scanner = false; @@ -358,132 +515,108 @@ private void resourceLabel(SCANresourceGlobal r, bool high, bool onboard) if (high || !onboard) { infoString.AppendLine(); - infoString.AppendFormat("{0}: {1:P0}", r.Name, SCANUtil.ResourceOverlay(vlat, vlon, r.Name, v.mainBody, SCANcontroller.controller.resourceBiomeLock)); + infoString.AppendFormat("{0}: {1:P0}", r.DisplayName, SCANUtil.ResourceOverlay(vlat, vlon, r.Name, v.mainBody, SCAN_Settings_Config.Instance.BiomeLock)); } else { infoString.AppendLine(); - infoString.AppendFormat("{0}: {1:P2}", r.Name, SCANUtil.ResourceOverlay(vlat, vlon, r.Name, v.mainBody, SCANcontroller.controller.resourceBiomeLock)); + infoString.AppendFormat("{0}: {1:P2}", r.DisplayName, SCANUtil.ResourceOverlay(vlat, vlon, r.Name, v.mainBody, SCAN_Settings_Config.Instance.BiomeLock)); } } else if ((sensors & SCANtype.FuzzyResources) != SCANtype.Nothing) { infoString.AppendLine(); - infoString.AppendFormat("{0}: {1:P0}", r.Name, SCANUtil.ResourceOverlay(vlat, vlon, r.Name, v.mainBody, SCANcontroller.controller.resourceBiomeLock)); + infoString.AppendFormat("{0}: {1:P0}", r.DisplayName, SCANUtil.ResourceOverlay(vlat, vlon, r.Name, v.mainBody, SCAN_Settings_Config.Instance.BiomeLock)); } - //else if (high) - //{ - // infoLabel += string.Format("\n{0}: Too High", resources[currentResource].Name); - //} - //else if (!onboard) - //{ - // infoLabel += string.Format("\n{0}: No Scanner", resources[currentResource].Name); - //} - else + else if (ResourceButtons) { infoString.AppendLine(); - infoString.AppendFormat("{0}: No Data", r.Name); + infoString.AppendFormat("{0}: No Data", r.DisplayName); } } - private void drawInfoLabel(int id) - { - GUILayout.Label(infoString.ToString(), SCANskins.SCAN_insColorLabel); - } - - private void drawResourceButtons(int id) + private void anomalyInfo() { - if (v.mainBody.pqsController == null) - return; - - if (resources.Count > 1) - { - Rect r = GUILayoutUtility.GetLastRect(); - - r.x = 8; - r.y = r.yMax - 30; - r.width = 18; - r.height = 28; - - if (GUI.Button(r, "<")) - { - currentResource -= 1; - if (currentResource < 0) - currentResource = resources.Count - 1; - } - - r.x = WindowRect.width - 24; - - if (GUI.Button(r, ">")) - { - currentResource += 1; - if (currentResource >= resources.Count) - currentResource = 0; - } - } - } - - //Display info on the nearest anomaly - private void anomalyInfo(int id) - { - if ((sensors & SCANtype.AnomalyDetail) != SCANtype.Nothing) + if ((sensors & SCANtype.Anomaly) != SCANtype.Nothing) { nearest = null; double nearest_dist = -1; + foreach (SCANanomaly a in data.Anomalies) { if (!a.Known) continue; + double d = (a.Mod.transform.position - v.transform.position).magnitude; + if (d < nearest_dist || nearest_dist < 0) { - if (d < 50000) + if (d < maxAnomalyDistance) { nearest = a; nearest_dist = d; } } } + if (nearest != null) { - string txt = ""; + infoString.AppendLine(); + if (nearest.Detail) - txt = nearest.Name; + infoString.Append(string.Format("{0}: {1}", nearest.Name, SCANuiUtil.distanceString(nearest_dist, 2000))); else - txt += "Anomaly"; - - fillS(-10); - GUILayout.Label(txt, SCANskins.SCAN_insColorLabel); + infoString.Append(string.Format("Unknown Anomaly: {0}", SCANuiUtil.distanceString(nearest_dist, 2000))); } } else nearest = null; } - private void drawBTDTInfo(int id) + private void BTDTInfo() { - if (nearest == null) + if ((sensors & SCANtype.AnomalyDetail) == SCANtype.Nothing || nearest == null || !nearest.Detail || nearest.Mod == null) + { + uiElement.SetDetailState(false); + if (_anomalyView != null) + _anomalyView.free(); + _anomalyView = null; return; + } - if (!nearest.Detail) - return; + uiElement.SetDetailState(true); - if (anomalyView == null) - anomalyView = new SCANremoteView(); - if (anomalyView != null) + if (_anomalyView == null) { - if (nearest.Mod != null) - { - if (anomalyView.lookat != nearest.Mod.gameObject) - anomalyView.setup(320, 240, nearest.Mod.gameObject); - Texture t = anomalyView.getTexture(); - if (t != null) - { - GUILayout.Label(anomalyView.getTexture()); - anomalyView.drawOverlay(GUILayoutUtility.GetLastRect(), SCANskins.SCAN_anomalyOverlay, nearest.Detail); - } - } + _anomalyView = new SCANremoteView(); + _anomalyView.setup(320, 240, nearest.Mod.gameObject);//, uiElement.EdgeDetectShader, uiElement.GrayScaleShader); + } + + if (!_anomalyView.valid(nearest.Mod.gameObject)) + { + if (_anomalyView != null) + _anomalyView.free(); + _anomalyView = null; + return; } + + anomalyTex = _anomalyView.getTexture(); + + uiElement.UpdateAnomaly(anomalyTex); + + string info = _anomalyView.getInfoString(); + string aData = _anomalyView.getAnomalyDataString(_mouseInAnomaly); + + uiElement.UpdateAnomalyText(info); + uiElement.UpdateAnomalyName(aData); + } + + private string distanceString(double dist) + { + if (dist < 5000) + return string.Format("{0:N1}m", dist); + + return string.Format("{0:N3}km", dist / 1000); } private double waypointRange(SCANwaypoint p) @@ -504,30 +637,13 @@ private double waypointRange(SCANwaypoint p) } } - private void planetConstants (CelestialBody b) + private void planetConstants(CelestialBody b) { double circum = b.Radius * 2 * Math.PI; double eqDistancePerDegree = circum / 360; degreeOffset = 5 / eqDistancePerDegree; } - private void soiChange (GameEvents.HostedFromToAction VC) - { - data = SCANUtil.getData(VC.to); - if (data == null) - { - data = new SCANdata(VC.to); - SCANcontroller.controller.addToBodyData(VC.to, data); - } - planetConstants(VC.to); - } - - private void vesselChange(Vessel V) - { - v = FlightGlobals.ActiveVessel; - resetResourceList(); - } - public void resetResourceList() { resourceScanners = new List(); @@ -547,5 +663,12 @@ public void resetResourceList() } } + public void ResetPosition() + { + SCAN_Settings_Config.Instance.InstrumentsPosition = new Vector2(100, -500); + + if (uiElement != null) + uiElement.SetPosition(SCAN_Settings_Config.Instance.InstrumentsPosition); + } } } diff --git a/SCANsat/SCAN_Unity/SCAN_UI_Loader.cs b/SCANsat/SCAN_Unity/SCAN_UI_Loader.cs new file mode 100644 index 000000000..9546d113f --- /dev/null +++ b/SCANsat/SCAN_Unity/SCAN_UI_Loader.cs @@ -0,0 +1,1057 @@ +#region license +/* + * [Scientific Committee on Advanced Navigation] + * S.C.A.N. Satellite + * + * SCAN_UI_Loader - Script for loading in all UI objects + * + * Copyright (c)2014 David Grandy ; + * Copyright (c)2014 technogeeky ; + * Copyright (c)2014 (Your Name Here) ; see LICENSE.txt for licensing details. + */ +#endregion + +using System; +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.UI; +using SCANsat.Unity; +using SCANsat.Unity.Unity; +using SCANsat.SCAN_Platform.Palettes; +using KSP.UI; +using KSP.UI.Screens; +using KSP.Localization; +using TMPro; +using palette = SCANsat.SCAN_UI.UI_Framework.SCANpalette; + +namespace SCANsat.SCAN_Unity +{ + [KSPAddon(KSPAddon.Startup.MainMenu, true)] + public class SCAN_UI_Loader : MonoBehaviour + { + private const string prefabAssetName = "scan_prefabs.scan"; + private const string unitySkinAssetName = "scan_unity_skin.scan"; + private const string iconAssetName = "scan_icons.scan"; + private const string shadersAssetName = "scan_shaders"; + private const string winShaderName = "-windows.scan"; + private const string linuxShaderName = "-linux.scan"; + private const string macShaderName = "-macosx.scan"; + + private static bool loaded; + private static bool skinLoaded; + private static bool prefabsLoaded; + private static bool spritesLoaded; + private static bool iconsLoaded; + private static bool shadersLoaded; + private static bool tmpProcessed; + private static bool tmpInputProcessed; + private static bool tooltipsProcessed; + private static bool prefabsProcessed; + private static bool clearLoaded; + private static bool toggleLoaded; + private static bool appLoaded; + + private static UISkinDef _unitySkinDef; + + private static Sprite _podIcon; + private static Sprite _planeIcon; + private static Sprite _probeIcon; + private static Sprite _debrisIcon; + private static Sprite _baseIcon; + private static Sprite _stationIcon; + private static Sprite _landerIcon; + private static Sprite _roverIcon; + private static Sprite _relayIcon; + private static Sprite _asteroidIcon; + private static Sprite _evaIcon; + private static Sprite _planetIcon; + private static Sprite _mysteryIcon; + private static Sprite _flagIcon; + private static Sprite _apMarker; + private static Sprite _peMarker; + private static Sprite _maneuverMarker; + private static Sprite _encounterMarker; + private static Sprite _exitMarker; + private static Sprite _anomalyIcon; + private static Sprite _waypointIcon; + + private static Sprite _clearSprite; + private static Sprite _toggleNormal; + private static Sprite _toggleHover; + private static Sprite _toggleActive; + private static Sprite _toggleOn; + private static Sprite _toggleOnHover; + private static Sprite _toggleOnActive; + private static Sprite _unityToggleOnHover; + + private static Sprite _appButtonNormal; + private static Sprite _appButtonHover; + private static Sprite _appButtonActive; + private static Sprite _appButtonDisabled; + private static Sprite _appBackground; + + private static Sprite _kspTooltipBackground; + private static Sprite _unityTooltipBackground; + + private static Sprite _smallMapAppIcon; + private static Sprite _bigMapAppIcon; + + private static Sprite _mechJebIcon; + + private static Shader _edgeDetectShader; + private static Shader _greyScaleShader; + + private static GameObject[] loadedPrefabs; + + private static GameObject _mainMapPrefab; + private static GameObject _bigMapPrefab; + private static GameObject _zoomMapPrefab; + private static GameObject _instrumentsPrefab; + private static GameObject _overlayPrefab; + private static GameObject _settingsPrefab; + private static GameObject _toolbarPrefab; + private static GameObject _tooltipPrefab; + + public static GameObject MainMapPrefab + { + get { return _mainMapPrefab; } + } + + public static GameObject BigMapPrefab + { + get { return _bigMapPrefab; } + } + + public static GameObject ZoomMapPrefab + { + get { return _zoomMapPrefab; } + } + + public static GameObject InstrumentsPrefab + { + get { return _instrumentsPrefab; } + } + + public static GameObject OverlayPrefab + { + get { return _overlayPrefab; } + } + + public static GameObject SettingsPrefab + { + get { return _settingsPrefab; } + } + + public static GameObject ToolbarPrefab + { + get { return _toolbarPrefab; } + } + + public static UISkinDef UnitySkinDef + { + get { return _unitySkinDef; } + } + + public static Sprite PodIcon + { + get { return _podIcon; } + } + + public static Sprite PlaneIcon + { + get { return _planeIcon; } + } + + public static Sprite ProbeIcon + { + get { return _probeIcon; } + } + + public static Sprite DebrisIcon + { + get { return _debrisIcon; } + } + + public static Sprite BaseIcon + { + get { return _baseIcon; } + } + + public static Sprite StationIcon + { + get { return _stationIcon; } + } + + public static Sprite LanderIcon + { + get { return _landerIcon; } + } + + public static Sprite RoverIcon + { + get { return _roverIcon; } + } + + public static Sprite RelayIcon + { + get { return _relayIcon; } + } + + public static Sprite AsteroidIcon + { + get { return _asteroidIcon; } + } + + public static Sprite EVAIcon + { + get { return _evaIcon; } + } + + public static Sprite PlanetIcon + { + get { return _planetIcon; } + } + + public static Sprite MysteryIcon + { + get { return _mysteryIcon; } + } + + public static Sprite FlagIcon + { + get { return _flagIcon; } + } + + public static Sprite APMarker + { + get { return _apMarker; } + } + + public static Sprite PEMarker + { + get { return _peMarker; } + } + + public static Sprite ManeuverMarker + { + get { return _maneuverMarker; } + } + + public static Sprite EncounterMarker + { + get { return _encounterMarker; } + } + + public static Sprite ExitMarker + { + get { return _exitMarker; } + } + + public static Sprite AnomalyIcon + { + get { return _anomalyIcon; } + } + + public static Sprite WaypointIcon + { + get { return _waypointIcon; } + } + + public static Sprite VesselIcon(VesselType type) + { + switch(type) + { + case VesselType.Base: + return _baseIcon; + case VesselType.Debris: + return _debrisIcon; + case VesselType.EVA: + return _evaIcon; + case VesselType.Flag: + return _flagIcon; + case VesselType.Lander: + return _landerIcon; + case VesselType.Plane: + return _planeIcon; + case VesselType.Probe: + return _probeIcon; + case VesselType.Relay: + return _relayIcon; + case VesselType.Rover: + return _roverIcon; + case VesselType.Ship: + return _podIcon; + case VesselType.SpaceObject: + return _asteroidIcon; + case VesselType.Station: + return _stationIcon; + case VesselType.Unknown: + return _mysteryIcon; + default: + return _mysteryIcon; + } + } + + public static Sprite SmallMapAppIcon + { + get { return _smallMapAppIcon; } + } + + public static Sprite BigMapAppIcon + { + get { return _bigMapAppIcon; } + } + + public static Sprite MechJebIcon + { + get { return _mechJebIcon; } + } + + public static Shader EdgeDetectShader + { + get {return _edgeDetectShader;} + } + + public static Shader GreyScaleShader + { + get { return _greyScaleShader; } + } + + public static void ResetUIStyle() + { + if (loadedPrefabs != null) + processUIPrefabs(); + } + + private static string path; + + private void Awake() + { + if (loaded) + { + Destroy(gameObject); + return; + } + + path = KSPUtil.ApplicationRootPath + "GameData/SCANsat/Resources/"; + + SCANUtil.SCANlog("Processing SCANsat asset bundles..."); + + StartCoroutine(loadResources()); + } + + private IEnumerator loadResources() + { + while (ApplicationLauncher.Instance == null) + yield return null; + + while (SCAN_Settings_Config.Instance == null) + yield return null; + + if (!shadersLoaded) + loadShaders(); + + if (!spritesLoaded) + loadTextures(); + + if (!skinLoaded) + loadUnitySkin(); + + if (!iconsLoaded) + loadIcons(); + + if (!prefabsLoaded) + loadPrefabBundle(); + + palette.CurrentPalettes = palette.setCurrentPalettesType(Palette.Kind.Diverging, 7); + + if (shadersLoaded && spritesLoaded && skinLoaded && iconsLoaded && prefabsLoaded) + SCANUtil.SCANlog("All SCANsat asset bundles loaded"); + else + SCANUtil.SCANlog("Error in loading SCANsat asset bundles\nSome UI elements may be non-functional"); + + loaded = true; + } + + private static void loadShaders() + { + string shaderPath; + + if (Application.platform == RuntimePlatform.WindowsPlayer && SystemInfo.graphicsDeviceVersion.StartsWith("OpenGL")) + shaderPath = shadersAssetName + linuxShaderName; + else if (Application.platform == RuntimePlatform.WindowsPlayer) + shaderPath = shadersAssetName + winShaderName; + else if (Application.platform == RuntimePlatform.LinuxPlayer) + shaderPath = shadersAssetName + linuxShaderName; + else + shaderPath = shadersAssetName + macShaderName; + + AssetBundle shaders = AssetBundle.LoadFromFile(path + shaderPath); + + if (shaders == null) + return; + + Shader[] loadedShaders = shaders.LoadAllAssets(); + + if (loadedShaders == null) + return; + + for (int i = loadedShaders.Length - 1; i >= 0; i--) + { + Shader s = loadedShaders[i]; + + if (s.name == "Hidden/Edge Detect X") + _edgeDetectShader = s; + else if (s.name == "Hidden/Grayscale Effect") + _greyScaleShader = s; + } + + SCANUtil.SCANlog("Shader asset bundle loaded; using platform bundle: {0}", shaderPath); + + //shaders.Unload(false); + + shadersLoaded = true; + } + + private static void loadTextures() + { + if (!clearLoaded) + { + Texture2D clear = new Texture2D(1, 1); + clear.SetPixel(1, 1, palette.clear); + clear.Apply(); + + _clearSprite = Sprite.Create(clear, new Rect(0, 0, 1, 1), new Vector2(0.5f, 0.5f)); + + clearLoaded = true; + } + + if (!toggleLoaded) + { + GUISkin skin = HighLogic.Skin; + + if (skin == null) + return; + + _toggleNormal = Sprite.Create(skin.toggle.normal.background, new Rect(16, 16, skin.toggle.normal.background.width - 32, skin.toggle.normal.background.height - 32), new Vector2(0.5f, 0.5f)); + _toggleHover = Sprite.Create(skin.toggle.hover.background, new Rect(16, 16, skin.toggle.hover.background.width - 32, skin.toggle.hover.background.height - 32), new Vector2(0.5f, 0.5f)); + _toggleActive = Sprite.Create(skin.toggle.active.background, new Rect(16, 16, skin.toggle.active.background.width - 32, skin.toggle.active.background.height - 32), new Vector2(0.5f, 0.5f)); + _toggleOn = Sprite.Create(skin.toggle.onNormal.background, new Rect(16, 16, skin.toggle.onNormal.background.width - 32, skin.toggle.onNormal.background.height - 32), new Vector2(0.5f, 0.5f)); + _toggleOnHover = Sprite.Create(skin.toggle.onHover.background, new Rect(16, 16, skin.toggle.onHover.background.width - 32, skin.toggle.onHover.background.height - 32), new Vector2(0.5f, 0.5f)); + _toggleOnActive = Sprite.Create(skin.toggle.onActive.background, new Rect(16, 16, skin.toggle.onActive.background.width - 32, skin.toggle.onActive.background.height - 32), new Vector2(0.5f, 0.5f)); + + toggleLoaded = true; + } + + if (!appLoaded) + { + if (ApplicationLauncher.Instance != null) + { + UIRadioButton button = ApplicationLauncher.Instance.listItemPrefab.toggleButton; + + _appButtonNormal = button.stateFalse.normal; + _appButtonHover = button.stateTrue.highlight; + _appButtonActive = button.stateTrue.pressed; + _appButtonDisabled = button.stateTrue.disabled; + + Image background = ApplicationLauncher.Instance.listItemPrefab.GetComponent(); + + if (background != null) + _appBackground = background.sprite; + + appLoaded = true; + } + } + + if (clearLoaded && toggleLoaded && appLoaded) + spritesLoaded = true; + } + + private static void loadUnitySkin() + { + _unitySkinDef = new UISkinDef(); + + SkinInit(_unitySkinDef); + + AssetBundle skin = AssetBundle.LoadFromFile(path + unitySkinAssetName); + + if (skin == null) + return; + + Sprite[] skinSprites = skin.LoadAllAssets(); + + if (skinSprites == null) + return; + + for (int i = skinSprites.Length - 1; i >= 0; i--) + { + Sprite s = skinSprites[i]; + + if (s.name == "window") + _unitySkinDef.window.normal.background = s; + else if (s.name == "box") + _unitySkinDef.box.normal.background = s; + else if (s.name == "button") + _unitySkinDef.button.normal.background = s; + else if (s.name == "button hover") + _unitySkinDef.button.highlight.background = s; + else if (s.name == "button on") + _unitySkinDef.button.active.background = s; + else if (s.name == "toggle_border") + _unitySkinDef.toggle.normal.background = s; + else if (s.name == "SCAN_Toggle_Hover_Border") + _unitySkinDef.toggle.highlight.background = s; + else if (s.name == "toggle active_border") + _unitySkinDef.toggle.active.background = s; + else if (s.name == "SCAN_Toggle_Border") + _unitySkinDef.toggle.disabled.background = s; + else if (s.name == "SCAN_Toggle_On_Hover_Border") + _unityToggleOnHover = s; + else if (s.name == "textfield") + _unitySkinDef.textField.normal.background = s; + else if (s.name == "textfield hover") + _unitySkinDef.textField.highlight.background = s; + else if (s.name == "textfield on") + _unitySkinDef.textField.active.background = s; + else if (s.name == "horizontal scrollbar") + _unitySkinDef.horizontalScrollbar.normal.background = s; + else if (s.name == "horizontal scrollbar thumb") + _unitySkinDef.horizontalScrollbarThumb.normal.background = s; + else if (s.name == "vertical scrollbar") + _unitySkinDef.verticalScrollbar.normal.background = s; + else if (s.name == "vertical scrollbar thumb") + _unitySkinDef.verticalScrollbarThumb.normal.background = s; + else if (s.name == "horizontalslider") + _unitySkinDef.horizontalSlider.normal.background = s; + else if (s.name == "slider thumb") + _unitySkinDef.horizontalSliderThumb.normal.background = s; + else if (s.name == "slider thumb hover") + _unitySkinDef.horizontalSliderThumb.highlight.background = s; + else if (s.name == "slider thumb active") + _unitySkinDef.horizontalSliderThumb.active.background = s; + else if (s.name == "verticalslider") + _unitySkinDef.verticalSlider.normal.background = s; + else if (s.name == "slider thumb") + _unitySkinDef.verticalSliderThumb.normal.background = s; + else if (s.name == "slider thumb hover") + _unitySkinDef.verticalSliderThumb.highlight.background = s; + else if (s.name == "slider thumb active") + _unitySkinDef.verticalSliderThumb.active.background = s; + else if (s.name == "tooltip") + _unityTooltipBackground = s; + } + + SCANUtil.SCANlog("Unity skin asset bundle loaded"); + + //images.Unload(false); + + skinLoaded = true; + } + + private static void SkinInit (UISkinDef skin) + { + skin.window = new UIStyle(); + skin.box = new UIStyle(); + skin.button = new UIStyle(); + skin.toggle = new UIStyle(); + skin.textField = new UIStyle(); + skin.horizontalScrollbar = new UIStyle(); + skin.horizontalScrollbarThumb = new UIStyle(); + skin.verticalScrollbar = new UIStyle(); + skin.verticalScrollbarThumb = new UIStyle(); + skin.horizontalSlider = new UIStyle(); + skin.horizontalSliderThumb = new UIStyle(); + skin.verticalSlider = new UIStyle(); + skin.verticalSliderThumb = new UIStyle(); + + skin.window.normal = new UIStyleState(); + skin.box.normal = new UIStyleState(); + skin.button.normal = new UIStyleState(); + skin.button.highlight = new UIStyleState(); + skin.button.active = new UIStyleState(); + skin.toggle.normal = new UIStyleState(); + skin.toggle.highlight = new UIStyleState(); + skin.toggle.active = new UIStyleState(); + skin.toggle.disabled = new UIStyleState(); + skin.textField.normal = new UIStyleState(); + skin.textField.highlight = new UIStyleState(); + skin.textField.active = new UIStyleState(); + skin.horizontalScrollbar.normal = new UIStyleState(); + skin.horizontalScrollbarThumb.normal = new UIStyleState(); + skin.verticalScrollbar.normal = new UIStyleState(); + skin.verticalScrollbarThumb.normal = new UIStyleState(); + skin.horizontalSlider.normal = new UIStyleState(); + skin.horizontalSliderThumb.normal = new UIStyleState(); + skin.horizontalSliderThumb.highlight = new UIStyleState(); + skin.horizontalSliderThumb.active = new UIStyleState(); + skin.verticalSlider.normal = new UIStyleState(); + skin.verticalSliderThumb.normal = new UIStyleState(); + skin.verticalSliderThumb.highlight = new UIStyleState(); + skin.verticalSliderThumb.active = new UIStyleState(); + } + + private static void loadIcons() + { + AssetBundle icons = AssetBundle.LoadFromFile(path + iconAssetName); + + if (icons == null) + return; + + Sprite[] iconSprites = icons.LoadAllAssets(); + + if (iconSprites == null) + return; + + for (int i = iconSprites.Length - 1; i >= 0; i--) + { + Sprite s = iconSprites[i]; + + if (s.name == "PodIcon") + _podIcon = s; + else if (s.name == "PlaneIcon") + _planeIcon = s; + else if (s.name == "ProbeIcon") + _probeIcon = s; + else if (s.name == "DebrisIcon") + _debrisIcon = s; + else if (s.name == "StationIcon") + _stationIcon = s; + else if (s.name == "LanderIcon") + _landerIcon = s; + else if (s.name == "RoverIcon") + _roverIcon = s; + else if (s.name == "RelayIcon") + _relayIcon = s; + else if (s.name == "AsteroidIcon") + _asteroidIcon = s; + else if (s.name == "EVAIcon") + _evaIcon = s; + else if (s.name == "BaseIcon") + _baseIcon = s; + else if (s.name == "PlanetIcon") + _planetIcon = s; + else if (s.name == "MysteryIcon") + _mysteryIcon = s; + else if (s.name == "FlagIcon") + _flagIcon = s; + else if (s.name == "APMarker") + _apMarker = s; + else if (s.name == "PEMarker") + _peMarker = s; + else if (s.name == "ManeuverMarker") + _maneuverMarker = s; + else if (s.name == "EncounterMarker") + _encounterMarker = s; + else if (s.name == "ExitMarker") + _exitMarker = s; + else if (s.name == "AnomalyIconOutline") + _anomalyIcon = s; + else if (s.name == "SCAN_WayPointIcon_Outline") + _waypointIcon = s; + else if (s.name == "SCANsat_AppLauncherSmall_Icon") + _smallMapAppIcon = s; + else if (s.name == "SCANsat_AppLauncherLarge_Icon") + _bigMapAppIcon = s; + else if (s.name == "SCAN_MechJebIcon") + _mechJebIcon = s; + else if (s.name == "KSP_Tooltip") + _kspTooltipBackground = s; + } + + SCANUtil.SCANlog("Icon asset bundle loaded"); + + iconsLoaded = true; + } + + private static void loadPrefabBundle() + { + AssetBundle prefabs = AssetBundle.LoadFromFile(path + prefabAssetName); + + if (prefabs == null) + return; + + loadedPrefabs = prefabs.LoadAllAssets(); + + if (loadedPrefabs == null) + return; + + if (!tmpProcessed) + processTMPPrefabs(); + + if (!tooltipsProcessed && _tooltipPrefab != null) + processTooltips(); + + if (!prefabsProcessed) + processUIPrefabs(); + + if (tmpProcessed && tooltipsProcessed && prefabsProcessed) + SCANUtil.SCANlog("UI prefab bundle loaded and processed"); + else + SCANUtil.SCANlog("Error in processing UI prefab bundle\nSome UI elements may be affected or non-functional"); + + //prefabs.Unload(false); + + prefabsLoaded = true; + } + + private static void processTMPPrefabs() + { + //foreach (var r in Resources.FindObjectsOfTypeAll()) + //{ + // SCANUtil.SCANlog("Material: {0}", r.name); + //} + + //foreach (var f in Resources.FindObjectsOfTypeAll()) + //{ + // SCANUtil.SCANlog("TMP Font: {0}", f.name); + //} + + //foreach (var f in Resources.FindObjectsOfTypeAll()) + //{ + // SCANUtil.SCANlog("Font: {0}", f.name); + //} + + for (int i = loadedPrefabs.Length - 1; i >= 0; i--) + { + GameObject o = loadedPrefabs[i]; + + if (o.name == "SCAN_MainMap") + _mainMapPrefab = o; + else if (o.name == "SCAN_BigMap") + _bigMapPrefab = o; + else if (o.name == "SCAN_ZoomMap") + _zoomMapPrefab = o; + else if (o.name == "SCAN_Instruments") + _instrumentsPrefab = o; + else if (o.name == "SCAN_Overlay") + _overlayPrefab = o; + else if (o.name == "SCAN_Settings") + _settingsPrefab = o; + else if (o.name == "SCAN_Toolbar") + _toolbarPrefab = o; + else if (o.name == "SCAN_Tooltip") + _tooltipPrefab = o; + + if (o != null) + { + processTMP(o); + + if (!tmpInputProcessed) + processInputFields(o); + } + } + + tmpProcessed = true; + tmpInputProcessed = true; + } + + private static void processTMP(GameObject obj) + { + TextHandler[] handlers = obj.GetComponentsInChildren(true); + + if (handlers == null) + return; + + for (int i = 0; i < handlers.Length; i++) + { + TextHandler handler = handlers[i]; + + if (handler.LocalizedText) + handler.SetLocalText(GetStringWithName(handler.LocalizeName)); + + TMProFromText(handler); + } + } + + private static void TMProFromText(TextHandler handler) + { + if (handler == null) + return; + + Text text = handler.GetComponent(); + + if (text == null) + return; + + string t = text.text; + Color c = text.color; + int i = text.fontSize; + bool r = text.raycastTarget; + FontStyles sty = TMPProUtil.FontStyle(text.fontStyle); + TextAlignmentOptions align = TMPProUtil.TextAlignment(text.alignment); + float spacing = text.lineSpacing; + GameObject obj = text.gameObject; + + MonoBehaviour.DestroyImmediate(text); + + SCAN_TextMeshPro tmp = obj.AddComponent(); + + tmp.text = t; + tmp.color = c; + tmp.fontSize = i; + tmp.raycastTarget = r; + tmp.alignment = align; + tmp.fontStyle = sty; + tmp.lineSpacing = spacing; + + tmp.font = UISkinManager.TMPFont; //Resources.Load("Fonts/Calibri SDF", typeof(TMP_FontAsset)) as TMP_FontAsset; + if (handler.Outline) + { + tmp.fontSharedMaterial = Resources.Load("Fonts/Materials/Calibri Dropshadow Outline", typeof(Material)) as Material; + + //TMP throws an error if we try to set the outline variables before accessing the font material + //Anything that calls the font property's Get method seems to be sufficient + if (tmp.fontMaterial) { } + + tmp.outlineColor = palette.black; + tmp.outlineWidth = handler.OutlineWidth; + } + else + tmp.fontSharedMaterial = Resources.Load("Fonts/Materials/Calibri Dropshadow", typeof(Material)) as Material; + + tmp.enableWordWrapping = true; + + tmp.isOverlay = false; + tmp.richText = true; + } + + private static void processInputFields(GameObject obj) + { + InputHandler[] handlers = obj.GetComponentsInChildren(true); + + if (handlers == null) + return; + + for (int i = 0; i < handlers.Length; i++) + TMPInputFromInput(handlers[i]); + } + + private static void TMPInputFromInput(InputHandler handler) + { + if (handler == null) + return; + + InputField input = handler.GetComponent(); + + if (input == null) + return; + + int limit = input.characterLimit; + TMP_InputField.ContentType content = GetTMPContentType(input.contentType); + float caretBlinkRate = input.caretBlinkRate; + int caretWidth = input.caretWidth; + Color selectionColor = input.selectionColor; + GameObject obj = input.gameObject; + + RectTransform viewport = handler.GetComponentInChildren().rectTransform; + SCAN_TextMeshPro placholder = handler.GetComponentsInChildren()[0]; + SCAN_TextMeshPro textComponent = handler.GetComponentsInChildren()[1]; + + if (viewport == null || placholder == null || textComponent == null) + return; + + MonoBehaviour.DestroyImmediate(input); + + SCAN_TMP_InputField tmp = obj.AddComponent(); + + tmp.textViewport = viewport; + tmp.placeholder = placholder; + tmp.textComponent = textComponent; + + tmp.characterLimit = limit; + tmp.contentType = content; + tmp.caretBlinkRate = caretBlinkRate; + tmp.caretWidth = caretWidth; + tmp.selectionColor = selectionColor; + + tmp.readOnly = false; + tmp.shouldHideMobileInput = false; + + tmp.fontAsset = UISkinManager.TMPFont; + } + + private static TMP_InputField.ContentType GetTMPContentType(InputField.ContentType type) + { + switch(type) + { + case InputField.ContentType.Alphanumeric: + return TMP_InputField.ContentType.Alphanumeric; + case InputField.ContentType.Autocorrected: + return TMP_InputField.ContentType.Autocorrected; + case InputField.ContentType.Custom: + return TMP_InputField.ContentType.Custom; + case InputField.ContentType.DecimalNumber: + return TMP_InputField.ContentType.DecimalNumber; + case InputField.ContentType.EmailAddress: + return TMP_InputField.ContentType.EmailAddress; + case InputField.ContentType.IntegerNumber: + return TMP_InputField.ContentType.IntegerNumber; + case InputField.ContentType.Name: + return TMP_InputField.ContentType.Name; + case InputField.ContentType.Password: + return TMP_InputField.ContentType.Password; + case InputField.ContentType.Pin: + return TMP_InputField.ContentType.Pin; + case InputField.ContentType.Standard: + return TMP_InputField.ContentType.Standard; + default: + return TMP_InputField.ContentType.Standard; + } + } + + private static void processTooltips() + { + for (int i = loadedPrefabs.Length - 1; i >= 0; i--) + { + GameObject o = loadedPrefabs[i]; + + TooltipHandler[] handlers = o.GetComponentsInChildren(true); + + if (handlers == null) + return; + + for (int j = 0; j < handlers.Length; j++) + processTooltip(handlers[j]); + } + + tooltipsProcessed = true; + } + + private static void processTooltip(TooltipHandler handler) + { + if (handler == null) + return; + + handler.Prefab = _tooltipPrefab; + handler.TooltipText = GetStringWithName(handler.TooltipName); + + toggleTooltip(handler, SCAN_Settings_Config.Instance.WindowTooltips); + } + + private static string GetStringWithName(string tag) + { + return Localizer.Format("#autoLOC_SCANsat_" + tag); + } + + public static void ToggleTooltips(bool isOn) + { + for (int i = loadedPrefabs.Length - 1; i >= 0; i--) + { + GameObject o = loadedPrefabs[i]; + + TooltipHandler[] handlers = o.GetComponentsInChildren(true); + + if (handlers == null) + return; + + for (int j = 0; j < handlers.Length; j++) + toggleTooltip(handlers[j], isOn); + } + } + + private static void toggleTooltip(TooltipHandler handler, bool isOn) + { + if (handler == null) + return; + + handler.IsActive = isOn && !handler.HelpTip; + } + + private static void processUIPrefabs() + { + for (int i = loadedPrefabs.Length - 1; i >= 0; i--) + { + GameObject o = loadedPrefabs[i]; + + if (o != null) + processUIComponents(o); + } + + prefabsProcessed = true; + } + + private static void processUIComponents(GameObject obj) + { + SCAN_Style[] styles = obj.GetComponentsInChildren(true); + + if (styles == null) + return; + + for (int i = 0; i < styles.Length; i++) + processComponents(styles[i]); + } + + private static void processComponents(SCAN_Style style) + { + if (style == null) + return; + + UISkinDef skin = UISkinManager.defaultSkin; + + Sprite KSPWindow = skin.window.normal.background; + + bool stock = SCAN_Settings_Config.Instance == null || SCAN_Settings_Config.Instance.StockUIStyle || _unitySkinDef == null; + + if (!stock) + skin = _unitySkinDef; + + if (skin == null) + return; + + switch (style.StlyeType) + { + case SCAN_Style.StyleTypes.Window: + style.setImage(skin.window.normal.background); + break; + case SCAN_Style.StyleTypes.KSPWindow: + style.setImage(_appBackground); + break; + case SCAN_Style.StyleTypes.Box: + style.setImage(skin.box.normal.background); + break; + case SCAN_Style.StyleTypes.HiddenBox: + style.setImage(stock ? skin.box.normal.background : _clearSprite); + break; + case SCAN_Style.StyleTypes.Button: + style.setButton(skin.button.normal.background, skin.button.highlight.background, skin.button.active.background, skin.button.active.background); + break; + case SCAN_Style.StyleTypes.HiddenButton: + style.setButton(_clearSprite, skin.button.highlight.background, skin.button.active.background, skin.button.active.background); + break; + case SCAN_Style.StyleTypes.AppButton: + style.setToggleButton(_appButtonNormal, _appButtonHover, _appButtonActive, _appButtonDisabled, _appButtonHover); + break; + case SCAN_Style.StyleTypes.Toggle: + if (stock) + style.setToggle(_toggleNormal, _toggleHover, _toggleActive, _toggleActive, _toggleOn, _toggleOnHover); + else + style.setToggle(skin.toggle.normal.background, skin.toggle.highlight.background, skin.toggle.active.background, skin.toggle.active.background, skin.toggle.disabled.background, _unityToggleOnHover); + break; + case SCAN_Style.StyleTypes.ToggleButton: + style.setToggleButton(skin.button.normal.background, skin.button.highlight.background, skin.button.active.background, skin.button.active.background, skin.button.active.background); + break; + case SCAN_Style.StyleTypes.KSPToggle: + style.setToggle(_toggleNormal, _toggleHover, _toggleActive, _toggleActive, _toggleOn, _toggleOnHover); + break; + case SCAN_Style.StyleTypes.HorizontalSlider: + style.setSlider(skin.horizontalSlider.normal.background, skin.horizontalSliderThumb.normal.background, skin.horizontalSliderThumb.highlight.background, skin.horizontalSliderThumb.active.background, skin.horizontalSliderThumb.active.background); + break; + case SCAN_Style.StyleTypes.VerticalScrollbar: + style.setScrollbar(skin.verticalScrollbar.normal.background, skin.verticalScrollbarThumb.normal.background); + break; + case SCAN_Style.StyleTypes.Tooltip: + style.setImage(stock ? _kspTooltipBackground : _unityTooltipBackground); + break; + case SCAN_Style.StyleTypes.VerticalSlider: + style.setButton(skin.horizontalSliderThumb.normal.background, skin.horizontalSliderThumb.highlight.background, skin.horizontalSliderThumb.active.background, skin.horizontalSliderThumb.active.background); + break; + case SCAN_Style.StyleTypes.Popup: + style.setImage(stock ? _kspTooltipBackground : _unityTooltipBackground); + break; + default: + break; + } + } + } +} diff --git a/SCANsat/SCAN_Unity/SCAN_UI_MainMap.cs b/SCANsat/SCAN_Unity/SCAN_UI_MainMap.cs new file mode 100644 index 000000000..2f848a524 --- /dev/null +++ b/SCANsat/SCAN_Unity/SCAN_UI_MainMap.cs @@ -0,0 +1,871 @@ +#region license +/* + * [Scientific Committee on Advanced Navigation] + * S.C.A.N. Satellite + * + * SCAN_UI_MainMap - UI control object for SCANsat main map + * + * Copyright (c)2014 David Grandy ; + * Copyright (c)2014 technogeeky ; + * Copyright (c)2014 (Your Name Here) ; see LICENSE.txt for licensing details. + */ +#endregion + +using System; +using System.Collections.Generic; +using System.Text; +using UnityEngine; +using SCANsat.SCAN_Toolbar; +using SCANsat.Unity.Interfaces; +using SCANsat.Unity; +using SCANsat.Unity.Unity; +using SCANsat.SCAN_Data; +using SCANsat.SCAN_UI.UI_Framework; +using KSP.UI; +using palette = SCANsat.SCAN_UI.UI_Framework.SCANpalette; + +namespace SCANsat.SCAN_Unity +{ + public class SCAN_UI_MainMap : ISCAN_MainMap + { + private bool _isVisible; + + private Vessel v; + private SCANdata data; + private SCANtype sensors; + private Texture2D map_small; + private Color32[] cols_height_map_small; + private Color32[] biomeCache; + private bool biomeBuilding; + private double[] biomeIndex = new double[360]; + private int scanline; + private int scanstep; + private int updateInterval = 60; + private int lastUpdate; + private bool flip; + + double sunLonCenter; + double sunLatCenter; + double gamma; + + private SCAN_MainMap uiElement; + + private static SCAN_UI_MainMap instance; + + public static SCAN_UI_MainMap Instance + { + get { return instance; } + } + + public SCAN_UI_MainMap() + { + instance = this; + + map_small = new Texture2D(360, 180, TextureFormat.ARGB32, false); + cols_height_map_small = new Color32[360]; + biomeCache = new Color32[360 * 180]; + + if (palette.small_redline == null) + { + palette.small_redline = new Color32[360]; + for (int i = 0; i < 360; i++) + palette.small_redline[i] = palette.Red; + } + + GameEvents.onVesselSOIChanged.Add(soiChange); + GameEvents.onVesselChange.Add(vesselChange); + GameEvents.onVesselWasModified.Add(vesselChange); + + if (SCANcontroller.controller.mainMapVisible) + Open(); + } + + public void OnDestroy() + { + if (uiElement != null) + { + uiElement.gameObject.SetActive(false); + MonoBehaviour.Destroy(uiElement.gameObject); + } + + GameEvents.onVesselSOIChanged.Remove(soiChange); + GameEvents.onVesselChange.Remove(vesselChange); + GameEvents.onVesselWasModified.Remove(vesselChange); + } + + private void soiChange(GameEvents.HostedFromToAction VC) + { + v = FlightGlobals.ActiveVessel; + + data = SCANUtil.getData(v.mainBody); + + if (data == null) + { + data = new SCANdata(v.mainBody); + SCANcontroller.controller.addToBodyData(v.mainBody, data); + } + + resetImages(); + + if (uiElement != null) + uiElement.RefreshVessels(); + } + + private void vesselChange(Vessel V) + { + v = FlightGlobals.ActiveVessel; + + data = SCANUtil.getData(v.mainBody); + + if (data == null) + { + data = new SCANdata(v.mainBody); + SCANcontroller.controller.addToBodyData(v.mainBody, data); + } + + resetImages(); + + if (uiElement != null) + uiElement.RefreshVessels(); + } + + public void SetScale(float scale) + { + if (uiElement != null) + uiElement.SetScale(scale); + } + + public void ProcessTooltips() + { + if (uiElement != null) + uiElement.ProcessTooltips(); + } + + public void Update() + { + if (!_isVisible || data == null) + return; + + sensors = SCANcontroller.controller.activeSensorsOnVessel(v.id); + + if (!SCANcontroller.controller.mainMapBiome) + { + if (SCAN_Settings_Config.Instance.MapGenerationSpeed > 1) + drawPartialMap(sensors, false); + + drawPartialMap(sensors, true); + } + else + { + if (SCAN_Settings_Config.Instance.MapGenerationSpeed > 1) + drawBiomeMap(sensors, false); + + drawBiomeMap(sensors, true); + } + + lastUpdate++; + + if (uiElement == null) + return; + + if (lastUpdate < updateInterval) + return; + + lastUpdate = 0; + flip = !flip; + + SCANcontroller.SCANsensor s; + + s = SCANcontroller.controller.getSensorStatus(v, SCANtype.AltimetryLoRes); + if (s == null) + uiElement.UpdateLoColor(palette.grey); + else if (!s.inRange) + uiElement.UpdateLoColor(palette.c_bad); + else if (!s.bestRange && flip) + uiElement.UpdateLoColor(palette.c_bad); + else + uiElement.UpdateLoColor(palette.c_good); + + s = SCANcontroller.controller.getSensorStatus(v, SCANtype.AltimetryHiRes); + if (s == null) + uiElement.UpdateHiColor(palette.grey); + else if (!s.inRange) + uiElement.UpdateHiColor(palette.c_bad); + else if (!s.bestRange && flip) + uiElement.UpdateHiColor(palette.c_bad); + else + uiElement.UpdateHiColor(palette.c_good); + + s = SCANcontroller.controller.getSensorStatus(v, SCANtype.Biome); + if (s == null) + uiElement.UpdateMultiColor(palette.grey); + else if (!s.inRange) + uiElement.UpdateMultiColor(palette.c_bad); + else if (!s.bestRange && flip) + uiElement.UpdateMultiColor(palette.c_bad); + else + uiElement.UpdateMultiColor(palette.c_good); + + if (ResourcesOn) + { + s = SCANcontroller.controller.getSensorStatus(v, SCANtype.FuzzyResources); + if (s == null) + uiElement.UpdateM700Color(palette.grey); + else if (!s.inRange) + uiElement.UpdateM700Color(palette.c_bad); + else if (!s.bestRange && flip) + uiElement.UpdateM700Color(palette.c_bad); + else + uiElement.UpdateM700Color(palette.c_good); + + s = SCANcontroller.controller.getSensorStatus(v, SCANtype.Ore); + if (s == null) + uiElement.UpdateOreColor(palette.grey); + else if (!s.inRange) + uiElement.UpdateOreColor(palette.c_bad); + else if (!s.bestRange && flip) + uiElement.UpdateOreColor(palette.c_bad); + else + uiElement.UpdateOreColor(palette.c_good); + } + + if (sensors != SCANtype.Nothing) + uiElement.UpdatePercentage(string.Format("{0:N1}%", SCANUtil.getCoveragePercentage(data, sensors))); + else + uiElement.UpdatePercentage("0%"); + } + + public string Version + { + get { return SCANmainMenuLoader.SCANsatVersion; } + } + + public void Open() + { + if (uiElement != null) + { + uiElement.gameObject.SetActive(false); + MonoBehaviour.DestroyImmediate(uiElement.gameObject); + } + + v = FlightGlobals.ActiveVessel; + + data = SCANUtil.getData(v.mainBody); + + if (data == null) + { + data = new SCANdata(v.mainBody); + SCANcontroller.controller.addToBodyData(v.mainBody, data); + } + + uiElement = GameObject.Instantiate(SCAN_UI_Loader.MainMapPrefab).GetComponent(); + + if (uiElement == null) + return; + + uiElement.transform.SetParent(UIMasterController.Instance.dialogCanvas.transform, false); + + uiElement.setMap(this); + + resetImages(); + + uiElement.UpdateMapTexture(map_small); + + _isVisible = true; + SCANcontroller.controller.mainMapVisible = true; + + if (HighLogic.LoadedSceneIsFlight && SCAN_Settings_Config.Instance.StockToolbar) + { + if (SCAN_Settings_Config.Instance.ToolbarMenu) + { + if (SCANappLauncher.Instance != null && SCANappLauncher.Instance.UIElement != null) + SCANappLauncher.Instance.UIElement.SetMainMapToggle(true); + } + else + { + if (SCANappLauncher.Instance != null && SCANappLauncher.Instance.SCANAppButton != null) + SCANappLauncher.Instance.SCANAppButton.SetTrue(false); + } + } + } + + public void Close() + { + _isVisible = false; + SCANcontroller.controller.mainMapVisible = false; + + if (uiElement == null) + return; + + uiElement.FadeOut(); + + if (HighLogic.LoadedSceneIsFlight && SCAN_Settings_Config.Instance.StockToolbar) + { + if (SCAN_Settings_Config.Instance.ToolbarMenu) + { + if (SCANappLauncher.Instance != null && SCANappLauncher.Instance.UIElement != null) + SCANappLauncher.Instance.UIElement.SetMainMapToggle(false); + } + else + { + if (SCANappLauncher.Instance != null && SCANappLauncher.Instance.SCANAppButton != null) + SCANappLauncher.Instance.SCANAppButton.SetFalse(false); + } + } + + uiElement = null; + } + + public bool IsVisible + { + get { return _isVisible; } + set + { + _isVisible = value; + + if (!value) + Close(); + } + } + + public bool Color + { + get { return SCANcontroller.controller.mainMapColor; } + set + { + SCANcontroller.controller.mainMapColor = value; + + resetImages(); + } + } + + public bool TerminatorToggle + { + get { return SCANcontroller.controller.mainMapTerminator; } + set + { + SCANcontroller.controller.mainMapTerminator = value; + + resetImages(); + } + } + + public bool MapType + { + get { return SCANcontroller.controller.mainMapBiome; } + set + { + SCANcontroller.controller.mainMapBiome = value; + + resetImages(); + } + } + + public bool Minimized + { + get { return SCANcontroller.controller.mainMapMinimized; } + set { SCANcontroller.controller.mainMapMinimized = value; } + } + + public bool TooltipsOn + { + get { return SCAN_Settings_Config.Instance.WindowTooltips; } + } + + public bool MapGenerating + { + get { return data == null ? false : !data.Built || data.MapBuilding || data.OverlayBuilding || data.ControllerBuilding; } + } + + public bool ResourcesOn + { + get { return SCAN_Settings_Config.Instance.DisableStockResource || !SCAN_Settings_Config.Instance.InstantScan; } + } + + public float Scale + { + get { return SCAN_Settings_Config.Instance.UIScale; } + } + + public Canvas TooltipCanvas + { + get { return UIMasterController.Instance.tooltipCanvas; } + } + + public Vector2 Position + { + get { return SCAN_Settings_Config.Instance.MainMapPosition; } + set { SCAN_Settings_Config.Instance.MainMapPosition = value; } + } + + public Sprite VesselType(Guid id) + { + SCANcontroller.SCANvessel v; + + if (!SCANcontroller.controller.knownVessels.TryGetValue(id, out v)) + v = null; + + Vessel sv; + + if (v == null) + { + if (FlightGlobals.ActiveVessel.id == id) + sv = FlightGlobals.ActiveVessel; + else + return SCAN_UI_Loader.MysteryIcon; + } + else + sv = v.vessel; + + return SCAN_UI_Loader.VesselIcon(sv.vesselType); + } + + public Vector2 VesselPosition(Guid id) + { + SCANcontroller.SCANvessel v; + + if (!SCANcontroller.controller.knownVessels.TryGetValue(id, out v)) + v = null; + + Vessel sv; + + if (v == null) + { + if (FlightGlobals.ActiveVessel.id == id) + sv = FlightGlobals.ActiveVessel; + else + return new Vector2(); + } + else + sv = v.vessel; + + double lon = SCANUtil.fixLon(sv.longitude); + double lat = SCANUtil.fixLat(sv.latitude); + + return new Vector2((float)lon, (float)lat); + } + + public Dictionary VesselInfoList + { + get + { + Dictionary vessels = new Dictionary(); + + vessels.Add(v.id, new MapLabelInfo() + { + label = Minimized ? "" : "1", + name = v.vesselName, + image = VesselType(v.id), + pos = VesselPosition(v.id), + baseColor = Color ? palette.white : palette.cb_skyBlue, + flashColor = palette.cb_yellow, + flash = true, + width = 18, + show = true + }); + + int count = 2; + + for (int i = 0; i < SCANcontroller.controller.knownVessels.Count; i++) + { + SCANcontroller.SCANvessel sv = SCANcontroller.controller.knownVessels.At(i); + + if (sv.vessel == v) + continue; + + if (sv.vessel.mainBody != v.mainBody) + continue; + + vessels.Add(sv.vessel.id, new MapLabelInfo() + { + label = Minimized ? "" : count.ToString(), + name = sv.vessel.vesselName, + image = VesselType(sv.vessel.id), + pos = VesselPosition(sv.vessel.id), + baseColor = Color ? palette.white : palette.cb_skyBlue, + flash = false, + width = 18, + show = true + }); + + count++; + } + + return vessels; + } + } + + public void ClampToScreen(RectTransform rect) + { + UIMasterController.ClampToScreen(rect, Vector2.zero); + } + + public void OpenBigMap() + { + if (SCAN_UI_BigMap.Instance.IsVisible) + SCAN_UI_BigMap.Instance.Close(); + else + SCAN_UI_BigMap.Instance.Open(); + } + + public void OpenZoomMap() + { + if (SCAN_UI_ZoomMap.Instance.IsVisible) + SCAN_UI_ZoomMap.Instance.Close(); + else + SCAN_UI_ZoomMap.Instance.Open(true); + } + + public void OpenOverlay() + { + if (SCAN_UI_Overlay.Instance.IsVisible) + SCAN_UI_Overlay.Instance.Close(); + else + SCAN_UI_Overlay.Instance.Open(); + } + + public void OpenInstruments() + { + if (SCAN_UI_Instruments.Instance.IsVisible) + SCAN_UI_Instruments.Instance.Close(); + else + SCAN_UI_Instruments.Instance.Open(); + } + + public void OpenSettings() + { + if (SCAN_UI_Settings.Instance.IsVisible) + SCAN_UI_Settings.Instance.Close(); + else + SCAN_UI_Settings.Instance.Open(); + } + + public void ChangeToVessel(Guid id) + { + if (v == null || v.id == id) + return; + + SCANcontroller.SCANvessel sv; + + if (!SCANcontroller.controller.knownVessels.TryGetValue(id, out sv)) + sv = null; + + if (sv == null) + return; + + if (!HighLogic.CurrentGame.Parameters.Flight.CanSwitchVesselsFar) + return; + + if (FlightGlobals.SetActiveVessel(sv.vessel)) + { + if (MapView.MapIsEnabled) + MapView.ExitMapView(); + + FlightInputHandler.SetNeutralControls(); + } + } + + public string VesselInfo(Guid id) + { + SCANcontroller.SCANvessel sv; + + if (!SCANcontroller.controller.knownVessels.TryGetValue(id, out sv)) + sv = null; + + Vessel ves; + + if (sv == null) + { + if (FlightGlobals.ActiveVessel.id == id) + ves = FlightGlobals.ActiveVessel; + else + return ""; + } + else + ves = sv.vessel; + + float lon = (float)SCANUtil.fixLonShift(ves.longitude); + float lat = (float)SCANUtil.fixLatShift(ves.latitude); + + string units = ""; + if (SCANcontroller.controller.mainMapBiome) + { + if (SCANUtil.isCovered(lon, lat, data, SCANtype.Biome)) + units = string.Format("; {0}", SCANUtil.getBiomeDisplayName(data.Body, lon, lat)); + } + else + { + if (SCANUtil.isCovered(lon, lat, data, SCANtype.Altimetry)) + { + if (SCANUtil.isCovered(lon, lat, data, SCANtype.AltimetryHiRes)) + { + float alt = ves.heightFromTerrain; + + if (alt < 0) + alt = (float)ves.altitude; + + units = string.Format("; {0}", SCANuiUtil.distanceString(alt, 100000, 100000000)); + } + else + { + float alt = ves.heightFromTerrain; + + if (alt < 0) + alt = (float)ves.altitude; + + alt = ((int)(alt / 500)) * 500; + + units = string.Format("; {0}", SCANuiUtil.distanceString(alt, 100000, 100000000)); + } + } + } + + return string.Format("({0:F1}°,{1:F1}°{2})", lat, lon, units); + } + + private void drawPartialMap(SCANtype type, bool apply) + { + bool pqsController = data.Body.pqsController != null; + + if (data.ControllerBuilding || data.OverlayBuilding) + return; + + if (!data.Built) + { + if (!data.MapBuilding) + { + scanline = 0; + scanstep = 0; + } + + data.MapBuilding = true; + data.generateHeightMap(ref scanline, ref scanstep, 360); + return; + } + + if (scanline == 0 && TerminatorToggle) + { + double sunLon = data.Body.GetLongitude(Planetarium.fetch.Sun.position, false); + double sunLat = data.Body.GetLatitude(Planetarium.fetch.Sun.position, false); + + sunLatCenter = SCANUtil.fixLatShift(sunLat); + + if (sunLatCenter >= 0) + sunLonCenter = SCANUtil.fixLonShift(sunLon + 90); + else + sunLonCenter = SCANUtil.fixLonShift(sunLon - 90); + + gamma = Math.Abs(sunLatCenter) < 0.55 ? 100 : Math.Tan(Mathf.Deg2Rad * (90 - Math.Abs(sunLatCenter))); + } + + for (int ilon = 0; ilon < 360; ilon++) + { + if (!pqsController) + { + cols_height_map_small[ilon] = palette.lerp(palette.black, palette.white, UnityEngine.Random.value); + continue; + } + + Color32 c = palette.Grey; + float val = data.HeightMapValue(data.Body.flightGlobalsIndex, ilon, scanline); + if (SCANUtil.isCovered(ilon, scanline, data, SCANtype.Altimetry)) + { + if (SCANUtil.isCovered(ilon, scanline, data, SCANtype.AltimetryHiRes)) + c = palette.heightToColor(val, Color, data.TerrainConfig); + else + c = palette.heightToColor(val, false, data.TerrainConfig); + } + else + { + if (scanline % 30 == 0 && ilon % 3 == 0) + { + c = palette.White; + } + else if (ilon % 30 == 0 && scanline % 3 == 0) + { + c = palette.White; + } + } + + if (TerminatorToggle) + { + double crossingLat = Math.Atan(gamma * Math.Sin(Mathf.Deg2Rad * (ilon - 180) - Mathf.Deg2Rad * sunLonCenter)); + + if (sunLatCenter >= 0) + { + if (scanline - 90 < crossingLat * Mathf.Rad2Deg) + c = palette.lerp(c, palette.Black, 0.5f); + } + else + { + if (scanline - 90 > crossingLat * Mathf.Rad2Deg) + c = palette.lerp(c, palette.Black, 0.5f); + } + } + else + { + if (type != SCANtype.Nothing) + { + if (!SCANUtil.isCoveredByAll(ilon, scanline, data, type)) + c = palette.lerp(c, palette.Black, 0.5f); + } + } + + cols_height_map_small[ilon] = c; + } + + map_small.SetPixels32(0, scanline, 360, 1, cols_height_map_small); + + if (apply) + { + if (scanline < 179) + map_small.SetPixels32(0, scanline + 1, 360, 1, palette.small_redline); + } + + scanline++; + + if (apply || scanline >= 180) + map_small.Apply(); + + if (scanline >= 180) + scanline = 0; + } + + private void drawBiomeMap(SCANtype type, bool apply) + { + bool biomeMap = data.Body.BiomeMap != null; + + if (biomeBuilding) + buildBiomeCache(); + + if (scanline == 0 && TerminatorToggle) + { + double sunLon = data.Body.GetLongitude(Planetarium.fetch.Sun.position, false); + double sunLat = data.Body.GetLatitude(Planetarium.fetch.Sun.position, false); + + sunLatCenter = SCANUtil.fixLatShift(sunLat); + + if (sunLatCenter >= 0) + sunLonCenter = SCANUtil.fixLonShift(sunLon + 90); + else + sunLonCenter = SCANUtil.fixLonShift(sunLon - 90); + + gamma = Math.Abs(sunLatCenter) < 0.55 ? 100 : Math.Tan(Mathf.Deg2Rad * (90 - Math.Abs(sunLatCenter))); + } + + for (int ilon = 0; ilon < 360; ilon++) + { + if (!biomeMap) + { + cols_height_map_small[ilon] = palette.lerp(palette.black, palette.white, UnityEngine.Random.value); + continue; + } + + Color32 c = biomeCache[scanline * 360 + ilon]; + if (!SCANUtil.isCovered(ilon, scanline, data, SCANtype.Biome)) + { + c = palette.Grey; + } + + if (TerminatorToggle) + { + double crossingLat = Math.Atan(gamma * Math.Sin(Mathf.Deg2Rad * (ilon - 180) - Mathf.Deg2Rad * sunLonCenter)); + + if (sunLatCenter >= 0) + { + if (scanline - 90 < crossingLat * Mathf.Rad2Deg) + c = palette.lerp(c, palette.Black, 0.5f); + } + else + { + if (scanline - 90 > crossingLat * Mathf.Rad2Deg) + c = palette.lerp(c, palette.Black, 0.5f); + } + } + else + { + if (type != SCANtype.Nothing) + { + if (!SCANUtil.isCoveredByAll(ilon, scanline, data, type)) + c = palette.lerp(c, palette.Black, 0.5f); + } + } + + cols_height_map_small[ilon] = c; + } + + map_small.SetPixels32(0, scanline, 360, 1, cols_height_map_small); + + if (apply) + { + if (scanline < 179) + map_small.SetPixels32(0, scanline + 1, 360, 1, palette.small_redline); + } + + scanline++; + + if (apply || scanline >= 180) + map_small.Apply(); + + if (scanline >= 180) + scanline = 0; + } + + private void buildBiomeCache() + { + for (int i = 0; i < 360; i++) + { + double index = SCANUtil.getBiomeIndexFraction(data.Body, i - 180, scanline - 90); + Color32 c = palette.Grey; + + if (SCAN_Settings_Config.Instance.SmallMapBiomeBorder && ((i > 0 && biomeIndex[i - 1] != index) || (scanline > 0 && biomeIndex[i] != index))) + c = palette.White; + else if (SCAN_Settings_Config.Instance.SmallMapStockBiomes) + c = SCANUtil.getBiome(data.Body, i - 180, scanline - 90).mapColor; + else + c = palette.lerp(SCANcontroller.controller.lowBiomeColor32, SCANcontroller.controller.highBiomeColor32, (float)index); + + biomeCache[scanline * 360 + i] = c; + + biomeIndex[i] = index; + } + + if (scanline >= 179) + biomeBuilding = false; + } + + internal void resetImages() + { + for (int y = 0; y < map_small.height; y++) + { + for (int x = 0; x < map_small.width; x++) + { + if ((x % 30 == 0 && y % 3 > 0) || (y % 30 == 0 && x % 3 > 0)) + { + map_small.SetPixel(x, y, palette.white); + } + else + { + map_small.SetPixel(x, y, palette.grey); + } + } + } + + map_small.Apply(); + + if (SCANcontroller.controller.mainMapBiome) + { + biomeBuilding = true; + scanline = 0; + } + } + + public void ResetPosition() + { + SCAN_Settings_Config.Instance.MainMapPosition = new Vector2(100, -200); + + if (uiElement != null) + uiElement.SetPosition(SCAN_Settings_Config.Instance.MainMapPosition); + } + } +} diff --git a/SCANsat/SCAN_Unity/SCAN_UI_Overlay.cs b/SCANsat/SCAN_Unity/SCAN_UI_Overlay.cs new file mode 100644 index 000000000..867660eb4 --- /dev/null +++ b/SCANsat/SCAN_Unity/SCAN_UI_Overlay.cs @@ -0,0 +1,722 @@ +#region license +/* + * [Scientific Committee on Advanced Navigation] + * S.C.A.N. Satellite + * + * SCAN_UI_Overlay - UI control object for SCANsat planetary overlay window + * + * Copyright (c)2014 David Grandy ; + * Copyright (c)2014 technogeeky ; + * Copyright (c)2014 (Your Name Here) ; see LICENSE.txt for licensing details. + */ +#endregion + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Threading; +using System.Text; +using UnityEngine; +using UnityEngine.EventSystems; +using SCANsat.SCAN_Toolbar; +using SCANsat.Unity.Interfaces; +using SCANsat.Unity.Unity; +using SCANsat.SCAN_Data; +using SCANsat.SCAN_UI.UI_Framework; +using KSP.UI; +using palette = SCANsat.SCAN_UI.UI_Framework.SCANpalette; + +namespace SCANsat.SCAN_Unity +{ + public class SCAN_UI_Overlay : ISCAN_Overlay + { + private bool _isVisible; + private bool _overlayOn; + + private CelestialBody body; + private SCANdata data; + private SCANresourceGlobal currentResource; + private List resources; + + private bool mapGenerating; + private double degreeOffset; + private int mapStep, mapStart; + private bool bodyBiome, bodyPQS; + + private int timer; + //These are read/written on multiple threads; we use volatile to ensure that cached values are not used when reading the value + private volatile bool threadRunning, threadFinished; + private volatile bool terrainGenerated; + + private StringBuilder tooltipText = new StringBuilder(); + private bool tooltipActive; + + private Texture2D mapOverlay; + private Color32[] resourcePixels; + private Color32[] biomePixels; + private Color32[] terrainPixels; + private float[,] abundanceValues; + private float[,] terrainValues; + + private SCAN_Overlay uiElement; + + private static SCAN_UI_Overlay instance; + + public static SCAN_UI_Overlay Instance + { + get { return instance; } + } + + public SCAN_UI_Overlay() + { + instance = this; + + resources = SCANcontroller.setLoadedResourceList(); + + setBody(HighLogic.LoadedSceneIsFlight ? FlightGlobals.currentMainBody : Planetarium.fetch.Home); + } + + public void OnDestroy() + { + if (uiElement != null) + { + uiElement.gameObject.SetActive(false); + MonoBehaviour.Destroy(uiElement.gameObject); + } + + removeOverlay(true); + } + + public void SetScale(float scale) + { + if (uiElement != null) + uiElement.SetScale(scale); + } + + public void ProcessTooltips() + { + if (uiElement != null) + uiElement.ProcessTooltips(); + } + + public void Update() + { + tooltipActive = false; + + if ((MapView.MapIsEnabled && HighLogic.LoadedSceneIsFlight && FlightGlobals.ready) || HighLogic.LoadedScene == GameScenes.TRACKSTATION) + { + CelestialBody mapBody = SCANUtil.getTargetBody(MapView.MapCamera.target); + + if (mapBody == null) + return; + + if (mapBody != body) + setBody(mapBody); + + if (SCAN_Settings_Config.Instance.OverlayTooltips && _overlayOn) + { + SCANUtil.SCANCoordinates coords = SCANUtil.GetMouseCoordinates(body); + + if (coords != null) + { + tooltipActive = true; + + PointerEventData pe = new PointerEventData(EventSystem.current); + pe.position = Input.mousePosition; + List hits = new List(); + + EventSystem.current.RaycastAll(pe, hits); + + for (int i = hits.Count - 1; i >= 0; i--) + { + RaycastResult r = hits[i]; + + GameObject go = r.gameObject; + + if (go.layer == 5) + { + tooltipActive = false; + break; + } + } + + if (tooltipActive) + MouseOverTooltip(coords); + } + } + + } + else if (HighLogic.LoadedSceneIsFlight && FlightGlobals.ready) + { + if (body != FlightGlobals.currentMainBody) + setBody(FlightGlobals.currentMainBody); + } + } + + private void MouseOverTooltip(SCANUtil.SCANCoordinates coords) + { + if (timer < 5) + { + timer++; + return; + } + + timer = 0; + + tooltipText.Length = 0; + + tooltipText.Append(coords.ToDMS()); + + if (body.pqsController != null) + { + if (SCANUtil.isCovered(coords.longitude, coords.latitude, data, SCANtype.Altimetry)) + { + bool hires = SCANUtil.isCovered(coords.longitude, coords.latitude, data, SCANtype.AltimetryHiRes); + + tooltipText.AppendLine(); + tooltipText.AppendFormat(string.Format("Terrain: {0}", SCANuiUtil.getMouseOverElevation(coords.longitude, coords.latitude, data, 0, hires))); + + if (hires) + { + tooltipText.AppendLine(); + tooltipText.AppendFormat(string.Format("Slope: {0:F1}°", SCANUtil.slope(SCANUtil.getElevation(body, coords.longitude, coords.latitude), body, coords.longitude, coords.latitude, degreeOffset))); + } + } + } + + if (body.BiomeMap != null) + { + if (SCANUtil.isCovered(coords.longitude, coords.latitude, data, SCANtype.Biome)) + { + tooltipText.AppendLine(); + tooltipText.AppendFormat(string.Format("Biome: {0}", SCANUtil.getBiomeDisplayName(body, coords.longitude, coords.latitude))); + } + } + + bool resources = false; + bool fuzzy = false; + + if (SCANUtil.isCovered(coords.longitude, coords.latitude, data, currentResource.SType)) + { + resources = true; + } + else if (SCANUtil.isCovered(coords.longitude, coords.latitude, data, SCANtype.FuzzyResources)) + { + resources = true; + fuzzy = true; + } + + if (resources) + { + tooltipText.AppendLine(); + tooltipText.Append(SCANuiUtil.getResourceAbundance(body, coords.latitude, coords.longitude, fuzzy, currentResource)); + } + } + + public void Open() + { + if (uiElement != null) + { + uiElement.gameObject.SetActive(false); + MonoBehaviour.DestroyImmediate(uiElement.gameObject); + } + + uiElement = GameObject.Instantiate(SCAN_UI_Loader.OverlayPrefab).GetComponent(); + + if (uiElement == null) + return; + + uiElement.transform.SetParent(UIMasterController.Instance.dialogCanvas.transform, false); + + uiElement.SetOverlay(this); + + tooltipText = StringBuilderCache.Acquire(); + + _isVisible = true; + + if (HighLogic.LoadedSceneIsFlight && SCAN_Settings_Config.Instance.StockToolbar && SCAN_Settings_Config.Instance.ToolbarMenu) + { + if (SCANappLauncher.Instance != null && SCANappLauncher.Instance.UIElement != null) + SCANappLauncher.Instance.UIElement.SetOverlayToggle(true); + } + } + + public void Close() + { + _isVisible = false; + + if (uiElement == null) + return; + + uiElement.FadeOut(); + + if (HighLogic.LoadedSceneIsFlight && SCAN_Settings_Config.Instance.StockToolbar && SCAN_Settings_Config.Instance.ToolbarMenu) + { + if (SCANappLauncher.Instance != null && SCANappLauncher.Instance.UIElement != null) + SCANappLauncher.Instance.UIElement.SetOverlayToggle(false); + } + + uiElement = null; + } + + public string Version + { + get { return SCANmainMenuLoader.SCANsatVersion; } + } + + public string CurrentResource + { + get { return currentResource == null ? "" : currentResource.DisplayName; } + } + + public string TooltipText + { + get { return tooltipText.ToString(); } + } + + public bool IsVisible + { + get { return _isVisible; } + set + { + _isVisible = value; + + if (!value) + Close(); + } + } + + public bool OverlayTooltip + { + get { return tooltipActive; } + } + + public bool DrawOverlay + { + get { return _overlayOn; } + set + { + if (value) + { + if (!_overlayOn) + refreshMap(SCANcontroller.controller.overlaySelection); + } + else + removeOverlay(); + } + } + + public bool DrawBiome + { + get { return SCANcontroller.controller.overlaySelection == 0; } + set + { + if (!value) + { + if (_overlayOn && SCANcontroller.controller.overlaySelection == 0) + removeOverlay(); + + return; + } + + SCANcontroller.controller.overlaySelection = 0; + + refreshMap(0); + } + } + + public bool DrawTerrain + { + get { return SCANcontroller.controller.overlaySelection == 1; } + set + { + if (!value) + { + if (_overlayOn && SCANcontroller.controller.overlaySelection == 1) + removeOverlay(); + + return; + } + + SCANcontroller.controller.overlaySelection = 1; + + refreshMap(1); + } + } + + public bool DrawResource + { + get { return SCANcontroller.controller.overlaySelection == 2; } + } + + public bool WindowTooltips + { + get { return SCAN_Settings_Config.Instance.WindowTooltips; } + } + + public float Scale + { + get { return SCAN_Settings_Config.Instance.UIScale; } + } + + public Canvas TooltipCanvas + { + get { return UIMasterController.Instance.tooltipCanvas; } + } + + public IList Resources + { + get { return new List(resources.Select(r => r.DisplayName)); } + } + + public Vector2 Position + { + get { return SCAN_Settings_Config.Instance.OverlayPosition; } + set { SCAN_Settings_Config.Instance.OverlayPosition = value; } + } + + public void ClampToScreen(RectTransform rect) + { + UIMasterController.ClampToScreen(rect, Vector2.zero); + } + + public void SetResource(string resource, bool isOn) + { + if (!isOn) + { + if(_overlayOn && SCANcontroller.controller.overlaySelection == 2 && currentResource != null && currentResource.DisplayName == resource) + removeOverlay(); + + return; + } + + SCANcontroller.controller.overlaySelection = 2; + + if (currentResource.DisplayName != resource) + { + for (int i = resources.Count - 1; i >= 0; i--) + { + SCANresourceGlobal r = resources[i]; + + if (r.DisplayName != resource) + continue; + + currentResource = r; + break; + } + } + + if (currentResource == null) + return; + + SCANcontroller.controller.overlayResource = SCANUtil.resourceFromDisplayName(resource); + + refreshMap(2); + } + + public void Refresh() + { + _overlayOn = true; + + refreshMap(SCANcontroller.controller.overlaySelection, false); + } + + public void OpenSettings() + { + if (SCAN_UI_Settings.Instance.IsVisible) + { + if (SCAN_UI_Settings.Instance.Page == 2) + SCAN_UI_Settings.Instance.Close(); + else + { + SCAN_UI_Settings.Instance.Close(); + SCAN_UI_Settings.Instance.Open(2, true); + } + } + else + SCAN_UI_Settings.Instance.Open(2); + } + + private void setBody(CelestialBody B) + { + body = B; + + data = SCANUtil.getData(body); + if (data == null) + { + data = new SCANdata(body); + SCANcontroller.controller.addToBodyData(body, data); + } + + if (currentResource == null) + { + if (resources.Count > 0) + { + for (int i = resources.Count - 1; i >= 0; i--) + { + SCANresourceGlobal r = resources[i]; + + if (r.Name != SCANcontroller.controller.overlayResource) + continue; + + currentResource = r; + break; + } + + if (currentResource == null) + currentResource = resources[0]; + + currentResource.CurrentBodyConfig(body.bodyName); + } + } + else + { + currentResource.CurrentBodyConfig(body.bodyName); + } + + bodyBiome = body.BiomeMap != null; + bodyPQS = body.pqsController != null; + + terrainGenerated = false; + + if (_overlayOn) + refreshMap(SCANcontroller.controller.overlaySelection); + + double circum = body.Radius * 2 * Math.PI; + double eqDistancePerDegree = circum / 360; + degreeOffset = 5 / eqDistancePerDegree; + } + + private void removeOverlay(bool immediate = false) + { + _overlayOn = false; + + OverlayGenerator.Instance.ClearDisplay(); + + if (mapOverlay != null) + MonoBehaviour.Destroy(mapOverlay); + + mapOverlay = null; + + if (immediate) + { + try + { + body.scaledBody.GetComponentInChildren().r.material.SetTexture(Shader.PropertyToID("_ResourceMap"), null); + } + catch (Exception e) + { + SCANUtil.SCANlog("Error in destroying planetary map overlay:\n{0}", e); + } + } + } + + public void refreshMap(float t, int height, int interp, int biomeHeight) + { + if (_overlayOn) + refreshMap(SCANcontroller.controller.overlaySelection); + } + + private void refreshMap(int i, bool remove = true) + { + if (remove) + removeOverlay(); + + if (mapGenerating) + return; + if (threadRunning) + return; + + _overlayOn = true; + + switch(i) + { + case 0: + body.SetResourceMap(SCANuiUtil.drawBiomeMap(ref mapOverlay, ref biomePixels, data, SCAN_Settings_Config.Instance.CoverageTransparency, SCAN_Settings_Config.Instance.BiomeMapHeight)); + break; + case 1: + SCANcontroller.controller.StartCoroutine(setTerrainMap()); + break; + case 2: + SCANcontroller.controller.StartCoroutine(setOverlayMap()); + break; + default: + break; + } + } + + private IEnumerator setOverlayMap() + { + int timer = 0; + + mapGenerating = true; + + SCANuiUtil.generateOverlayResourceValues(ref abundanceValues, SCAN_Settings_Config.Instance.ResourceMapHeight, data, currentResource, SCAN_Settings_Config.Instance.Interpolation); + + SCANdata copy = new SCANdata(data); + SCANresourceGlobal resourceCopy = new SCANresourceGlobal(currentResource); + resourceCopy.CurrentBodyConfig(body.bodyName); + + Thread t = new Thread(() => resourceThreadRun(SCAN_Settings_Config.Instance.ResourceMapHeight, SCAN_Settings_Config.Instance.Interpolation, SCAN_Settings_Config.Instance.CoverageTransparency, new System.Random(ResourceScenario.Instance.gameSettings.Seed), copy, resourceCopy)); + threadRunning = true; + threadFinished = false; + t.Start(); + + while (threadRunning && timer < 1000) + { + timer++; + yield return null; + } + + mapGenerating = false; + copy = null; + resourceCopy = null; + + if (timer >= 1000) + { + Debug.LogError("[SCANsat] Something went wrong when drawing the SCANsat resource map overlay..."); + t.Abort(); + threadRunning = false; + yield break; + } + + if (!threadFinished) + { + Debug.LogError("[SCANsat] Something went wrong when drawing the SCANsat resource map overlay..."); + yield break; + } + + if (mapOverlay == null || mapOverlay.height != SCAN_Settings_Config.Instance.ResourceMapHeight) + mapOverlay = new Texture2D(SCAN_Settings_Config.Instance.ResourceMapHeight * 2, SCAN_Settings_Config.Instance.ResourceMapHeight, TextureFormat.ARGB32, true); + + mapOverlay.SetPixels32(resourcePixels); + mapOverlay.Apply(); + + body.SetResourceMap(mapOverlay); + } + + private void resourceThreadRun(int height, int step, float transparent, System.Random r, SCANdata copyData, SCANresourceGlobal copyResource) + { + try + { + SCANuiUtil.generateOverlayResourcePixels(ref resourcePixels, ref abundanceValues, height, copyData, copyResource, r, step, transparent); + threadFinished = true; + } + catch + { + threadFinished = false; + } + finally + { + threadRunning = false; + } + } + + private IEnumerator setTerrainMap() + { + if (data.Body.pqsController == null) + yield break; + + int timer = 0; + + while (!data.Built && timer < 2000) + { + mapGenerating = true; + if (!data.ControllerBuilding && !data.MapBuilding) + { + if (!data.OverlayBuilding) + { + mapStep = 0; + mapStart = 0; + } + + data.OverlayBuilding = true; + data.generateHeightMap(ref mapStep, ref mapStart, 360); + } + timer++; + yield return null; + } + + if (timer >= 2000) + { + mapGenerating = false; + yield break; + } + + timer = 0; + + SCANdata copy = new SCANdata(data); + int index = data.Body.flightGlobalsIndex; + + Thread t = new Thread(() => terrainThreadRun(copy, index)); + threadFinished = false; + threadRunning = true; + t.Start(); + + while (threadRunning && timer < 1000) + { + timer++; + yield return null; + } + + mapGenerating = false; + copy = null; + + if (timer >= 1000) + { + Debug.LogError("[SCANsat] Something went wrong when drawing the SCANsat terrain map overlay..."); + t.Abort(); + threadRunning = false; + yield break; + } + + if (!threadFinished) + { + Debug.LogError("[SCANsat] Something went wrong when drawing the SCANsat terrain map overlay..."); + yield break; + } + + if (mapOverlay == null) + mapOverlay = new Texture2D(1440, 720, TextureFormat.ARGB32, true); + + mapOverlay.SetPixels32(terrainPixels); + mapOverlay.Apply(); + + body.SetResourceMap(mapOverlay); + } + + private void terrainThreadRun(SCANdata copyData, int i) + { + try + { + if (!terrainGenerated) + { + SCANuiUtil.generateTerrainArray(ref terrainValues, 720, 4, copyData, i); + terrainGenerated = true; + } + + SCANuiUtil.drawTerrainMap(ref terrainPixels, ref terrainValues, copyData, 720, 4); + + threadFinished = true; + } + catch + { + threadFinished = false; + } + finally + { + threadRunning = false; + } + } + + public void ResetPosition() + { + SCAN_Settings_Config.Instance.OverlayPosition = new Vector2(600, -200); + + if (uiElement != null) + uiElement.SetPosition(SCAN_Settings_Config.Instance.OverlayPosition); + } + + } +} diff --git a/SCANsat/SCAN_Unity/SCAN_UI_Settings.cs b/SCANsat/SCAN_Unity/SCAN_UI_Settings.cs new file mode 100644 index 000000000..81ae69038 --- /dev/null +++ b/SCANsat/SCAN_Unity/SCAN_UI_Settings.cs @@ -0,0 +1,791 @@ +#region license +/* + * [Scientific Committee on Advanced Navigation] + * S.C.A.N. Satellite + * + * SCAN_UI_Settings - UI control object for SCANsat settings window + * + * Copyright (c)2014 David Grandy ; + * Copyright (c)2014 technogeeky ; + * Copyright (c)2014 (Your Name Here) ; see LICENSE.txt for licensing details. + */ +#endregion + +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEngine; +using SCANsat.Unity.Interfaces; +using SCANsat.Unity.Unity; +using SCANsat.SCAN_Data; +using SCANsat.SCAN_Toolbar; +using SCANsat.SCAN_UI.UI_Framework; +using KSP.UI; +using KSP.Localization; + +namespace SCANsat.SCAN_Unity +{ + public class SCAN_UI_Settings : ISCAN_Settings + { + private bool _isVisible; + private bool _inputLock; + private string _sensorCount = ""; + private Vector2 _position; + private const string controlLock = "SCANsatSettings"; + + private string _currentData = "All Data"; + private SCANtype _currentDataType = SCANtype.Everything; + + private SCAN_Settings uiElement; + + private SCAN_UI_Color colorInterface; + + private static SCAN_UI_Settings instance; + + public static SCAN_UI_Settings Instance + { + get { return instance; } + } + + public SCAN_UI_Settings() + { + instance = this; + + colorInterface = new SCAN_UI_Color(); + } + + public int Page + { + get + { + if (uiElement != null) + return uiElement.Page; + + return 0; + } + } + + public void OnDestroy() + { + if (uiElement != null) + { + uiElement.gameObject.SetActive(false); + MonoBehaviour.Destroy(uiElement.gameObject); + } + } + + public void Update() + { + if (!_isVisible) + return; + + _sensorCount = string.Format("Vessels: {0} Sensors: {1} Passes: {2}" + , SCANcontroller.controller.ActiveVessels + , SCANcontroller.controller.ActiveSensors + , SCANcontroller.controller.ActualPasses); + } + + public void Open(int page = 0, bool savePosition = false) + { + if (uiElement != null) + { + uiElement.gameObject.SetActive(false); + MonoBehaviour.DestroyImmediate(uiElement.gameObject); + } + + uiElement = GameObject.Instantiate(SCAN_UI_Loader.SettingsPrefab).GetComponent(); + + if (uiElement == null) + return; + + uiElement.transform.SetParent(UIMasterController.Instance.dialogCanvas.transform, false); + + uiElement.setSettings(this, page); + + if (!savePosition) + _position = new Vector2(0, 100); + + uiElement.SetPosition(_position); + + _isVisible = true; + + if (HighLogic.LoadedSceneIsFlight && SCAN_Settings_Config.Instance.StockToolbar && SCAN_Settings_Config.Instance.ToolbarMenu) + { + if (SCANappLauncher.Instance != null && SCANappLauncher.Instance.UIElement != null) + SCANappLauncher.Instance.UIElement.SetSettingsToggle(true); + } + } + + public void Close() + { + _isVisible = false; + + if (uiElement == null) + return; + + uiElement.FadeOut(); + + if (HighLogic.LoadedSceneIsFlight && SCAN_Settings_Config.Instance.StockToolbar && SCAN_Settings_Config.Instance.ToolbarMenu) + { + if (SCANappLauncher.Instance != null && SCANappLauncher.Instance.UIElement != null) + SCANappLauncher.Instance.UIElement.SetSettingsToggle(false); + } + + if (_inputLock) + InputLockManager.RemoveControlLock(controlLock); + + uiElement = null; + } + + public string Version + { + get { return SCANmainMenuLoader.SCANsatVersion; } + } + + public string SensorCount + { + get { return _sensorCount; } + } + + public string DataResetCurrent + { + get { return Localizer.Format("#autoLOC_SCANsat_Warning_DataResetCurrent", _currentDataType, getTargetBody().displayName); } + } + + public string DataResetAll + { + get { return Localizer.Format("#autoLOC_SCANsat_Warning_DataResetAll", _currentDataType); } + } + + public string StockResourceResetCurrent + { + get { return Localizer.Format("#autoLOC_SCANsat_Warning_StockResourceResetCurrent", getTargetBody().displayName); } + } + + public string StockResourceResetAll + { + get { return Localizer.Format("#autoLOC_SCANsat_Warning_StockResourceResetAll"); } + } + + public string WarningMapFillCurrent + { + get { return Localizer.Format("#autoLOC_SCANsat_Warning_MapFillCurrent", _currentData, getTargetBody().displayName); } + } + + public string WarningMapFillAll + { + get { return Localizer.Format("#autoLOC_SCANsat_Warning_MapFillAll", _currentData); } + } + + public string ModuleManagerWarning + { + get { return Localizer.Format("#autoLOC_SCANsat_Warning_ModuleManagerResource"); } + } + + public string CurrentBody + { + get { return getTargetBody().displayName.LocalizeBodyName(); } + } + + public string SaveToConfig + { + get { return Localizer.Format("#autoLOC_SCANsat_Warning_SaveToConfig"); } + } + + public string CurrentMapData + { + get { return _currentData; } + set + { + _currentData = value; + + if (value == "All Data") + _currentDataType = SCANtype.Everything; + else if (value == "SCAN Data Types") + _currentDataType = SCANtype.Everything_SCAN; + else if (value == "All Resource Types") + { + _currentDataType = 0; + + List resources = SCANcontroller.setLoadedResourceList(); + + for (int i = 0; i < resources.Count; i++) + _currentDataType |= resources[i].SType; + } + else + { + try + { + _currentDataType = (SCANtype)Enum.Parse(typeof(SCANtype), value); + } + catch (Exception e) + { + SCANUtil.SCANlog("Error in parsing map fill type value: {0} - Setting fill type to Everything:\n{1}", value, e); + _currentData = "All Data"; + _currentDataType = SCANtype.Everything; + } + } + + } + } + + public int MapGenSpeed + { + get { return SCAN_Settings_Config.Instance.MapGenerationSpeed; } + set { SCAN_Settings_Config.Instance.MapGenerationSpeed = value; } + } + + public int TimeWarp + { + get { return SCAN_Settings_Config.Instance.TimeWarpResolution; } + set { SCAN_Settings_Config.Instance.TimeWarpResolution = value; } + } + + public int MapWidth + { + get { return SCAN_Settings_Config.Instance.BigMapWidth; } + set + { + SCAN_Settings_Config.Instance.BigMapWidth = value; + + if (SCAN_UI_BigMap.Instance != null && SCAN_UI_BigMap.Instance.IsVisible) + { + SCAN_UI_BigMap.Instance.Size = new Vector2(value, value / 2); + + SCAN_UI_BigMap.Instance.SetMapSize(); + + SCAN_UI_BigMap.Instance.RefreshIcons(); + } + } + } + + public int Interpolation + { + get { return SCAN_Settings_Config.Instance.Interpolation; } + set { SCAN_Settings_Config.Instance.Interpolation = value; } + } + + public int MapHeight + { + get { return SCAN_Settings_Config.Instance.ResourceMapHeight; } + set { SCAN_Settings_Config.Instance.ResourceMapHeight = value; } + } + + public int BiomeMapHeight + { + get { return SCAN_Settings_Config.Instance.BiomeMapHeight; } + set { SCAN_Settings_Config.Instance.BiomeMapHeight = value; } + } + + public float Transparency + { + get { return SCAN_Settings_Config.Instance.CoverageTransparency; } + set { SCAN_Settings_Config.Instance.CoverageTransparency = value; } + } + + public float StockThresholdValue + { + get { return SCAN_Settings_Config.Instance.StockTreshold; } + set { SCAN_Settings_Config.Instance.StockTreshold = value; } + } + + public float UIScale + { + get { return SCAN_Settings_Config.Instance.UIScale; } + set + { + SCAN_Settings_Config.Instance.UIScale = value; + + uiElement.SetScale(value); + + if (SCAN_UI_BigMap.Instance != null && SCAN_UI_BigMap.Instance.IsVisible) + SCAN_UI_BigMap.Instance.SetScale(value); + + if (SCAN_UI_MainMap.Instance != null && SCAN_UI_MainMap.Instance.IsVisible) + SCAN_UI_MainMap.Instance.SetScale(value); + + if (SCAN_UI_ZoomMap.Instance != null && SCAN_UI_ZoomMap.Instance.IsVisible) + SCAN_UI_ZoomMap.Instance.SetScale(value); + + if (SCAN_UI_Instruments.Instance != null && SCAN_UI_Instruments.Instance.IsVisible) + SCAN_UI_Instruments.Instance.SetScale(value); + + if (SCAN_UI_Overlay.Instance != null && SCAN_UI_Overlay.Instance.IsVisible) + SCAN_UI_Overlay.Instance.SetScale(value); + } + } + + public bool IsVisible + { + get { return _isVisible; } + set + { + _isVisible = value; + + if (!value) + Close(); + } + } + + public bool BackgroundScanning + { + get { return SCAN_Settings_Config.Instance.BackgroundScanning; } + set { SCAN_Settings_Config.Instance.BackgroundScanning = value; } + } + + public bool GroundTracks + { + get { return SCAN_Settings_Config.Instance.ShowGroundTracks; } + set { SCAN_Settings_Config.Instance.ShowGroundTracks = value; } + } + + public bool ActiveGround + { + get { return SCAN_Settings_Config.Instance.GroundTracksActiveOnly; } + set { SCAN_Settings_Config.Instance.GroundTracksActiveOnly = value; } + } + + public bool OverlayTooltips + { + get { return SCAN_Settings_Config.Instance.OverlayTooltips; } + set { SCAN_Settings_Config.Instance.OverlayTooltips = value; } + } + + public bool WindowTooltips + { + get { return SCAN_Settings_Config.Instance.WindowTooltips; } + set + { + SCAN_Settings_Config.Instance.WindowTooltips = value; + + SCAN_UI_Loader.ToggleTooltips(value); + + if (SCAN_UI_BigMap.Instance != null && SCAN_UI_BigMap.Instance.IsVisible) + SCAN_UI_BigMap.Instance.ProcessTooltips(); + + if (SCAN_UI_MainMap.Instance != null && SCAN_UI_MainMap.Instance.IsVisible) + SCAN_UI_MainMap.Instance.ProcessTooltips(); + + if (SCAN_UI_Instruments.Instance != null && SCAN_UI_Instruments.Instance.IsVisible) + SCAN_UI_Instruments.Instance.ProcessTooltips(); + + if (SCAN_UI_Overlay.Instance != null && SCAN_UI_Overlay.Instance.IsVisible) + SCAN_UI_Overlay.Instance.ProcessTooltips(); + + if (SCAN_Settings_Config.Instance.StockToolbar && SCAN_Settings_Config.Instance.ToolbarMenu + && SCANappLauncher.Instance != null && SCANappLauncher.Instance.IsVisible) + SCANappLauncher.Instance.ProcessTooltips(); + } + } + + public bool LegendTooltips + { + get { return SCAN_Settings_Config.Instance.LegendTooltips; } + set { SCAN_Settings_Config.Instance.LegendTooltips = value; } + } + + public bool StockToolbar + { + get { return SCAN_Settings_Config.Instance.StockToolbar; } + set + { + SCAN_Settings_Config.Instance.StockToolbar = value; + + if (value) + SCANcontroller.controller.appLauncher = SCANcontroller.controller.gameObject.AddComponent(); + else + { + MonoBehaviour.Destroy(SCANcontroller.controller.appLauncher); + SCANcontroller.controller.appLauncher = null; + } + } + } + + public bool ToolbarMenu + { + get { return SCAN_Settings_Config.Instance.ToolbarMenu; } + set + { + SCAN_Settings_Config.Instance.ToolbarMenu = value; + + if (SCANappLauncher.Instance != null) + SCANappLauncher.Instance.ToggleToolbarType(); + } + } + + public bool StockUIStyle + { + get { return SCAN_Settings_Config.Instance.StockUIStyle; } + set + { + SCAN_Settings_Config.Instance.StockUIStyle = value; + + SCAN_UI_Loader.ResetUIStyle(); + + if (SCAN_UI_BigMap.Instance != null && SCAN_UI_BigMap.Instance.IsVisible) + { + SCAN_UI_BigMap.Instance.Close(); + SCAN_UI_BigMap.Instance.Open(); + } + + if (SCAN_UI_MainMap.Instance != null && SCAN_UI_MainMap.Instance.IsVisible) + { + SCAN_UI_MainMap.Instance.Close(); + SCAN_UI_MainMap.Instance.Open(); + } + + if (SCAN_UI_ZoomMap.Instance != null && SCAN_UI_ZoomMap.Instance.IsVisible) + { + SCAN_UI_ZoomMap.Instance.Close(); + SCAN_UI_ZoomMap.Instance.Open(true); + } + + if (SCAN_UI_Instruments.Instance != null && SCAN_UI_Instruments.Instance.IsVisible) + { + SCAN_UI_Instruments.Instance.Close(); + SCAN_UI_Instruments.Instance.Open(); + } + + if (SCAN_UI_Overlay.Instance != null && SCAN_UI_Overlay.Instance.IsVisible) + { + SCAN_UI_Overlay.Instance.Close(); + SCAN_UI_Overlay.Instance.Open(); + } + + Close(); + Open(0, true); + } + } + + public bool MechJebTarget + { + get { return SCAN_Settings_Config.Instance.MechJebTarget; } + set { SCAN_Settings_Config.Instance.MechJebTarget = value; } + } + + public bool MechJebLoad + { + get { return SCAN_Settings_Config.Instance.MechJebTargetLoad; } + set { SCAN_Settings_Config.Instance.MechJebTargetLoad = value; } + } + + public bool MechJebAvailable + { + get { return SCANmainMenuLoader.MechJebLoaded; } + } + + public bool BiomeLock + { + get { return SCAN_Settings_Config.Instance.BiomeLock; } + set { SCAN_Settings_Config.Instance.BiomeLock = value; } + } + + public bool NarrowBand + { + get { return SCAN_Settings_Config.Instance.RequireNarrowBand; } + set { SCAN_Settings_Config.Instance.RequireNarrowBand = value; } + } + + public bool InstantScan + { + get { return SCAN_Settings_Config.Instance.InstantScan; } + set + { + SCAN_Settings_Config.Instance.InstantScan = value; + + if (SCAN_UI_MainMap.Instance != null && SCAN_UI_MainMap.Instance.IsVisible) + { + SCAN_UI_MainMap.Instance.Close(); + SCAN_UI_MainMap.Instance.Open(); + } + + } + } + + public bool DisableStock + { + get { return SCAN_Settings_Config.Instance.DisableStockResource; } + set + { + SCAN_Settings_Config.Instance.DisableStockResource = value; + + if (SCAN_UI_MainMap.Instance != null && SCAN_UI_MainMap.Instance.IsVisible) + { + SCAN_UI_MainMap.Instance.Close(); + SCAN_UI_MainMap.Instance.Open(); + } + + } + } + + public bool StockThreshold + { + get { return SCAN_Settings_Config.Instance.UseStockTreshold; } + set { SCAN_Settings_Config.Instance.UseStockTreshold = value; } + } + + public bool GreyScale + { + get { return SCAN_Settings_Config.Instance.TrueGreyScale; } + set { SCAN_Settings_Config.Instance.TrueGreyScale = value; } + } + + public bool ExportCSV + { + get { return SCAN_Settings_Config.Instance.ExportCSV; } + set { SCAN_Settings_Config.Instance.ExportCSV = value; } + } + + public bool ShowStockReset + { + get { return SCAN_Settings_Config.Instance.DisableStockResource || !SCAN_Settings_Config.Instance.InstantScan; } + } + + public bool ShowMapFill + { + get { return SCAN_Settings_Config.Instance.CheatMapFill; } + } + + public bool LockInput + { + get { return _inputLock; } + set + { + _inputLock = value; + + if (_inputLock) + InputLockManager.SetControlLock(controlLock); + else + InputLockManager.RemoveControlLock(controlLock); + } + } + + public bool ModuleManager + { + get { return SCANmainMenuLoader.MMLoaded; } + } + + public Canvas TooltipCanvas + { + get { return UIMasterController.Instance.tooltipCanvas; } + } + + public Vector2 Position + { + set { _position = value; } + } + + public IList BackgroundBodies + { + get + { + List bodyList = new List(); + + var bodies = SCANcontroller.controller.GetAllData.Select(d => d.Body).Where(b => b.referenceBody == Planetarium.fetch.Sun && b.referenceBody != b); + + var orderedBodies = bodies.OrderBy(b => b.orbit.semiMajorAxis).ToList(); + + for (int i = 0; i < orderedBodies.Count; i++) + { + CelestialBody body = orderedBodies[i]; + + bodyList.Add(body.displayName.LocalizeBodyName()); + + for (int j = 0; j < body.orbitingBodies.Count; j++) + { + CelestialBody moon = body.orbitingBodies[j]; + + if (SCANcontroller.controller.getData(moon.bodyName) != null) + bodyList.Add(moon.displayName.LocalizeBodyName()); + + for (int k = 0; k < moon.orbitingBodies.Count; k++) + { + CelestialBody subMoon = moon.orbitingBodies[k]; + + if (SCANcontroller.controller.getData(subMoon.bodyName) != null) + bodyList.Add(subMoon.displayName.LocalizeBodyName()); + + for (int l = 0; l < subMoon.orbitingBodies.Count; l++) + { + CelestialBody subSubMoon = subMoon.orbitingBodies[l]; + + if (SCANcontroller.controller.getData(subSubMoon.bodyName) != null) + bodyList.Add(subSubMoon.displayName.LocalizeBodyName()); + } + } + } + } + + SCANdata sun = SCANcontroller.controller.getData(Planetarium.fetch.Sun.bodyName); + + if (sun != null) + bodyList.Add(sun.Body.displayName.LocalizeBodyName()); + + return bodyList; + } + } + + public IList MapDataTypes + { + get + { + List availableTypes = new List() { 0, 1, 3, 4, 5 }; + + if (SCAN_Settings_Config.Instance.DisableStockResource || !SCAN_Settings_Config.Instance.InstantScan) + availableTypes.Add(19); + + List types = new List() { "All Data", "SCAN Data Types" }; + + for (int i = 0; i < availableTypes.Count; i++) + types.Add(((SCANtype)(1 << availableTypes[i])).ToString()); + + if (SCAN_Settings_Config.Instance.DisableStockResource || !SCAN_Settings_Config.Instance.InstantScan) + { + List resources = SCANcontroller.setLoadedResourceList(); + + if (resources.Count > 1) + types.Add("All Resource Types"); + + for (int i = 0; i < resources.Count; i++) + types.Add(resources[i].SType.ToString()); + } + + return types; + } + } + + public ISCAN_Color ColorInterface + { + get { return colorInterface; } + } + + public void ClampToScreen(RectTransform rect) + { + UIMasterController.ClampToScreen(rect, Vector2.zero); + } + + public void ResetCurrent() + { + CelestialBody thisBody = getTargetBody(); + + SCANdata data = SCANUtil.getData(thisBody); + + if (data != null) + data.reset(_currentDataType); + } + + public void ResetAll() + { + foreach (SCANdata data in SCANcontroller.controller.GetAllData) + data.reset(_currentDataType); + } + + public void ResetStockResourceCurrent() + { + CelestialBody thisBody = getTargetBody(); + + var resources = ResourceScenario.Instance.gameSettings.GetPlanetScanInfo(); + + resources.RemoveAll(a => a.PlanetId == thisBody.flightGlobalsIndex); + } + + public void ResetStockResourceAll() + { + ResourceScenario.Instance.gameSettings.GetPlanetScanInfo().Clear(); + } + + public void FillCurrent() + { + CelestialBody thisBody = getTargetBody(); + + SCANdata data = SCANUtil.getData(thisBody); + + if (data == null) + { + data = new SCANdata(thisBody); + SCANcontroller.controller.addToBodyData(thisBody, data); + } + + data.fillMap(_currentDataType); + } + + public void FillAll() + { + foreach (CelestialBody b in FlightGlobals.Bodies) + { + SCANdata data = SCANUtil.getData(b); + + if (data == null) + { + data = new SCANdata(b); + SCANcontroller.controller.addToBodyData(b, data); + } + + data.fillMap(_currentDataType); + } + } + + public void ResetWindows() + { + if (HighLogic.LoadedSceneIsFlight) + { + SCANuiUtil.resetMainMapPos(); + SCANuiUtil.resetBigMapPos(); + SCANuiUtil.resetInstUIPos(); + SCANuiUtil.resetOverlayControllerPos(); + SCANuiUtil.resetZoomMapPos(); + } + else + { + SCANuiUtil.resetBigMapPos(); + SCANuiUtil.resetZoomMapPos(); + if (HighLogic.LoadedScene == GameScenes.TRACKSTATION) + SCANuiUtil.resetOverlayControllerPos(); + } + } + + public void ToggleBody(string bodyName) + { + string body = SCANUtil.bodyFromDisplayName(bodyName); + + SCANdata data = SCANUtil.getData(body); + + if (data != null) + data.Disabled = !data.Disabled; + } + + public bool ToggleBodyActive(string bodyName) + { + string body = SCANUtil.bodyFromDisplayName(bodyName); + + SCANdata data = SCANUtil.getData(body); + + return data == null ? false : !data.Disabled; + } + + public double BodyPercentage(string bodyName) + { + SCANdata data = SCANUtil.getData(bodyName); + + if (data == null) + return 0; + + return SCANUtil.getCoveragePercentage(data, SCANtype.Nothing) / 100; + } + + private CelestialBody getTargetBody() + { + switch (HighLogic.LoadedScene) + { + case GameScenes.FLIGHT: + return FlightGlobals.currentMainBody; + case GameScenes.SPACECENTER: + return Planetarium.fetch.Home; + case GameScenes.TRACKSTATION: + return SCANUtil.getTargetBody(MapView.MapCamera.target); + default: + return null; + } + } + } +} diff --git a/SCANsat/SCAN_Unity/SCAN_UI_ZoomMap.cs b/SCANsat/SCAN_Unity/SCAN_UI_ZoomMap.cs new file mode 100644 index 000000000..e24f9064a --- /dev/null +++ b/SCANsat/SCAN_Unity/SCAN_UI_ZoomMap.cs @@ -0,0 +1,2047 @@ +#region license +/* + * [Scientific Committee on Advanced Navigation] + * S.C.A.N. Satellite + * + * SCAN_UI_ZoomMap - UI control object for SCANsat zoom map + * + * Copyright (c)2014 David Grandy ; + * Copyright (c)2014 technogeeky ; + * Copyright (c)2014 (Your Name Here) ; see LICENSE.txt for licensing details. + */ +#endregion + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using UnityEngine; +using SCANsat.SCAN_Toolbar; +using SCANsat.Unity.Interfaces; +using SCANsat.Unity; +using SCANsat.Unity.Unity; +using SCANsat.SCAN_Data; +using SCANsat.SCAN_Map; +using SCANsat.SCAN_UI.UI_Framework; +using KSP.UI; +using KSP.Localization; +using FinePrint; +using FinePrint.Utilities; +using palette = SCANsat.SCAN_UI.UI_Framework.SCANpalette; + +namespace SCANsat.SCAN_Unity +{ + public class SCAN_UI_ZoomMap : ISCAN_ZoomMap + { + private bool _isVisible; + + private static SCANmap spotmap; + private static CelestialBody body; + private SCANdata data; + private Vessel vessel; + private bool updateMap; + private bool narrowBand; + private StringBuilder infoString; + private System.Random gen; + private bool _inputLock; + private const string controlLock = "SCANsatZoom"; + + private bool initialized; + + private float terrainMin; + private float terrainMax; + + private float minZoom = 2; + private float maxZoom = 1000; + + private SCANresourceGlobal currentResource; + private List resources; + + private List biomes = new List(); + + private List mapFlags = new List(); + + private SCAN_ZoomMap uiElement; + + private const int orbitSteps = 80; + private List orbitLabels = new List(); + private Dictionary orbitMapLabels = new Dictionary(); + private const string Aplabel = "Ap"; + private const string Pelabel = "Pe"; + private const string Escapelabel = "Escape"; + private const string Encounterlabel = "Encounter"; + private const string Manlabel = "Man"; + private const string ManAplabel = "ManAp"; + private const string ManPelabel = "ManPe"; + private const string ManEscapelabel = "ManEscape"; + private const string ManEncounterlabel = "ManEncounter"; + + private static SCAN_UI_ZoomMap instance; + + public static SCAN_UI_ZoomMap Instance + { + get { return instance; } + } + + public static CelestialBody Body + { + get { return body; } + } + + public SCAN_UI_ZoomMap() + { + instance = this; + + resources = SCANcontroller.setLoadedResourceList(); + + GameEvents.onVesselChange.Add(vesselChange); + GameEvents.onVesselWasModified.Add(vesselChange); + GameEvents.onVesselSOIChanged.Add(soiChange); + + gen = new System.Random(Environment.TickCount.GetHashCode()); + + initializeMap(); + } + + private void vesselChange(Vessel V) + { + vessel = FlightGlobals.ActiveVessel; + + if (!_isVisible || uiElement == null) + return; + + uiElement.RefreshIcons(); + } + + private void soiChange(GameEvents.HostedFromToAction action) + { + if (!_isVisible || uiElement == null) + return; + + uiElement.RefreshIcons(); + + updateMap = true; + } + + public void Open(bool v, double lat = 0, double lon = 0, SCANmap m = null) + { + if (uiElement != null) + { + uiElement.gameObject.SetActive(false); + MonoBehaviour.DestroyImmediate(uiElement.gameObject); + } + + uiElement = GameObject.Instantiate(SCAN_UI_Loader.ZoomMapPrefab).GetComponent(); + + if (uiElement == null) + return; + + uiElement.transform.SetParent(UIMasterController.Instance.dialogCanvas.transform, false); + + vessel = FlightGlobals.ActiveVessel; + + if (v || VesselLock) + setToVessel(); + else + setToPosition(lat, lon, m); + + if (OrbitToggle && ShowOrbit) + { + Orbit o = vessel.orbit; + + orbitLabels.Clear(); + + for (int i = 0; i < orbitSteps * 3; i++) + { + orbitLabels.Add(new SimpleLabelInfo(10, SCAN_UI_Loader.PlanetIcon)); + } + + if (!vessel.LandedOrSplashed) + UpdateOrbitIcons(o); + } + + uiElement.setMap(this); + + updateMap = true; + + _isVisible = true; + + if (HighLogic.LoadedSceneIsFlight && SCAN_Settings_Config.Instance.StockToolbar && SCAN_Settings_Config.Instance.ToolbarMenu) + { + if (SCANappLauncher.Instance != null && SCANappLauncher.Instance.UIElement != null) + SCANappLauncher.Instance.UIElement.SetZoomMapToggle(true); + } + } + + public void Close() + { + _isVisible = false; + + if (uiElement == null) + return; + + uiElement.FadeOut(); + + if (HighLogic.LoadedSceneIsFlight && SCAN_Settings_Config.Instance.StockToolbar && SCAN_Settings_Config.Instance.ToolbarMenu) + { + if (SCANappLauncher.Instance != null && SCANappLauncher.Instance.UIElement != null) + SCANappLauncher.Instance.UIElement.SetZoomMapToggle(false); + } + + uiElement = null; + } + + private void initializeMap() + { + if (HighLogic.LoadedSceneIsFlight) + vessel = FlightGlobals.ActiveVessel; + + if (body == null) + { + if (vessel == null) + body = FlightGlobals.Bodies[1]; + else + body = vessel.mainBody; + } + + data = SCANUtil.getData(body); + + if (data == null) + { + data = new SCANdata(body); + SCANcontroller.controller.addToBodyData(body, data); + } + + if (spotmap == null) + { + spotmap = new SCANmap(body, false, mapSource.ZoomMap); + + mapType t = mapType.Altimetry; + + try + { + t = (mapType)Enum.Parse(typeof(mapType), SCANcontroller.controller.zoomMapType, true); + } + catch (Exception e) + { + SCANUtil.SCANlog("Error in parsing map projection and/or type\n{0}", e); + + t = mapType.Altimetry; + } + + spotmap.Projection = MapProjection.Orthographic; + spotmap.MType = t; + spotmap.ResourceActive = SCANcontroller.controller.zoomMapResourceOn; + spotmap.ColorMap = SCANcontroller.controller.zoomMapColor; + + if (SCAN_Settings_Config.Instance.ZoomMapSize.x % 2 != 0) + SCAN_Settings_Config.Instance.ZoomMapSize.x += 1; + if (SCAN_Settings_Config.Instance.ZoomMapSize.y % 2 != 0) + SCAN_Settings_Config.Instance.ZoomMapSize.y += 1; + + if (SCAN_Settings_Config.Instance.ZoomMapSize.x % 4 != 0) + SCAN_Settings_Config.Instance.ZoomMapSize.x += 2; + if (SCAN_Settings_Config.Instance.ZoomMapSize.y % 4 != 0) + SCAN_Settings_Config.Instance.ZoomMapSize.y += 2; + + spotmap.setSize(SCAN_Settings_Config.Instance.ZoomMapSize); + } + + spotmap.setBody(body); + + currentResource = AssignResource(SCANcontroller.controller.zoomMapResource); + + if (currentResource != null) + spotmap.Resource = currentResource; + + AddOrbitMapLabels(); + } + + private void initializeMapCenter(double lat, double lon, CelestialBody b) + { + SCANdata dat = SCANUtil.getData(b); + + if (dat == null) + dat = new SCANdata(b); + + data = dat; + body = data.Body; + + spotmap.setBody(body); + + if (SCANconfigLoader.GlobalResource) + { + currentResource = AssignResource(SCANcontroller.controller.zoomMapResource); + + if (currentResource != null) + spotmap.Resource = currentResource; + } + + if (ResourceToggle && currentResource != null) + checkForScanners(); + + spotmap.MapScale = 10; + + spotmap.centerAround(lon, lat); + + calcTerrainLimits(); + + mapType t = mapType.Altimetry; + + try + { + t = (mapType)Enum.Parse(typeof(mapType), SCANcontroller.controller.zoomMapType, true); + } + catch (Exception e) + { + SCANUtil.SCANlog("Error in parsing map projection and/or type\n{0}", e); + + t = mapType.Altimetry; + } + + spotmap.ResourceActive = SCANcontroller.controller.zoomMapResourceOn; + spotmap.ColorMap = SCANcontroller.controller.zoomMapColor; + spotmap.Terminator = SCANcontroller.controller.zoomMapTerminator; + + spotmap.resetMap(t, false, ResourceToggle, narrowBand); + } + + private void resetMap(double lat = 0, double lon = 0, bool withCenter = false) + { + if (VesselLock) + resetMapToVessel(); + else + resetMap(withCenter, lat, lon); + } + + public void resetMap(bool withCenter, double lat, double lon) + { + if (withCenter) + spotmap.centerAround(lon, lat); + else + spotmap.centerAround(spotmap.CenteredLong, spotmap.CenteredLat); + + if (ResourceToggle) + checkForScanners(); + + calcTerrainLimits(); + + spotmap.resetMap(ResourceToggle, narrowBand); + } + + public void resetMapToVessel() + { + vessel = FlightGlobals.ActiveVessel; + + body = vessel.mainBody; + + SCANdata dat = SCANUtil.getData(body); + + if (dat == null) + dat = new SCANdata(body); + + data = dat; + body = data.Body; + + spotmap.setBody(body); + + if (SCANconfigLoader.GlobalResource) + { + if (currentResource != null) + currentResource.CurrentBodyConfig(body.bodyName); + } + + resetMap(true, SCANUtil.fixLatShift(vessel.latitude), SCANUtil.fixLonShift(vessel.longitude)); + } + + protected void calcTerrainLimits() + { + if (spotmap.MType == mapType.Slope) + return; + + int w = spotmap.MapWidth / 4; + int h = spotmap.MapHeight / 4; + + terrainMax = -200000; + terrainMin = 100000; + float terrain = 0; + + for (int i = 0; i < spotmap.MapHeight; i += 4) + { + for (int j = 0; j < spotmap.MapWidth; j += 4) + { + double lat = (i * 1.0f / spotmap.MapScale) - 90f + spotmap.Lat_Offset; + double lon = (j * 1.0f / spotmap.MapScale) - 180f + spotmap.Lon_Offset; + double la = lat, lo = lon; + lat = spotmap.unprojectLatitude(lo, la); + lon = spotmap.unprojectLongitude(lo, la); + + if (lon < -180 || lon >= 180 || lat < -90 && lat >= 90 || double.IsNaN(lon) || double.IsNaN(lat)) + continue; + + terrain = (float)SCANUtil.getElevation(body, lon, lat); + + if (terrain < terrainMin) + terrainMin = terrain; + if (terrain > terrainMax) + terrainMax = terrain; + } + } + + if (terrainMin > terrainMax) + terrainMin = terrainMax - 1f; + + if (terrainMin == terrainMax) + terrainMin = terrainMax - 1f; + + spotmap.setCustomRange(terrainMin, terrainMax); + } + + private void checkForScanners() + { + narrowBand = SCANuiUtil.narrowBandInOrbit(body, Math.Abs(spotmap.CenteredLat) - 5, currentResource); + + if (!narrowBand || currentResource == null) + spotmap.Resource = null; + else + { + spotmap.Resource = currentResource; + spotmap.Resource.CurrentBodyConfig(body.bodyName); + } + } + + private void AddOrbitMapLabels() + { + orbitMapLabels.Add(Aplabel, new MapLabelInfo() + { + label = "", + image = SCAN_UI_Loader.APMarker, + pos = new Vector2(), + baseColor = palette.cb_skyBlue, + flash = false, + width = 28, + show = false + }); + + orbitMapLabels.Add(Pelabel, new MapLabelInfo() + { + label = "", + image = SCAN_UI_Loader.PEMarker, + pos = new Vector2(), + baseColor = palette.cb_skyBlue, + flash = false, + width = 28, + show = false + }); + + orbitMapLabels.Add(Escapelabel, new MapLabelInfo() + { + label = "", + image = SCAN_UI_Loader.ExitMarker, + pos = new Vector2(), + baseColor = palette.cb_skyBlue, + flash = false, + width = 26, + show = false + }); + + orbitMapLabels.Add(Encounterlabel, new MapLabelInfo() + { + label = "", + image = SCAN_UI_Loader.EncounterMarker, + pos = new Vector2(), + baseColor = palette.cb_skyBlue, + flash = false, + width = 26, + show = false + }); + + orbitMapLabels.Add(Manlabel, new MapLabelInfo() + { + label = "", + image = SCAN_UI_Loader.ManeuverMarker, + pos = new Vector2(), + baseColor = palette.cb_reddishPurple, + flash = false, + width = 24, + show = false + }); + + orbitMapLabels.Add(ManEscapelabel, new MapLabelInfo() + { + label = "", + image = SCAN_UI_Loader.ExitMarker, + pos = new Vector2(), + baseColor = palette.cb_reddishPurple, + flash = false, + width = 26, + show = false + }); + + orbitMapLabels.Add(ManEncounterlabel, new MapLabelInfo() + { + label = "", + image = SCAN_UI_Loader.EncounterMarker, + pos = new Vector2(), + baseColor = palette.cb_reddishPurple, + flash = false, + width = 26, + show = false + }); + + orbitMapLabels.Add(ManAplabel, new MapLabelInfo() + { + label = "", + image = SCAN_UI_Loader.APMarker, + pos = new Vector2(), + baseColor = palette.cb_reddishPurple, + flash = false, + width = 28, + show = false + }); + + orbitMapLabels.Add(ManPelabel, new MapLabelInfo() + { + label = "", + image = SCAN_UI_Loader.PEMarker, + pos = new Vector2(), + baseColor = palette.cb_reddishPurple, + flash = false, + width = 28, + show = false + }); + } + + public void OnDestroy() + { + SCANcontroller.controller.unloadPQS(spotmap.Body, mapSource.BigMap); + + GameEvents.onVesselChange.Remove(vesselChange); + GameEvents.onVesselWasModified.Remove(vesselChange); + GameEvents.onVesselSOIChanged.Remove(soiChange); + + if (uiElement != null) + { + uiElement.gameObject.SetActive(false); + MonoBehaviour.Destroy(uiElement.gameObject); + } + } + + public void SetScale(float scale) + { + if (uiElement != null) + uiElement.SetScale(scale); + } + + public void ProcessTooltips() + { + if (uiElement != null) + uiElement.ProcessTooltips(); + } + + public void Update() + { + if (!_isVisible || data == null || spotmap == null) + return; + + if (uiElement == null) + return; + + if (!spotmap.isMapComplete()) + { + if (SCAN_Settings_Config.Instance.MapGenerationSpeed > 2) + { + spotmap.getPartialMap(false); + spotmap.getPartialMap(false); + } + + if (SCAN_Settings_Config.Instance.MapGenerationSpeed > 1) + spotmap.getPartialMap(false); + + spotmap.getPartialMap(true); + } + + if (OrbitToggle && ShowOrbit) + { + if (vessel != null && vessel.mainBody == body && !vessel.LandedOrSplashed) + { + Orbit o = vessel.orbit; + + UpdateOrbitIcons(o); + } + } + + if (updateMap) + { + updateMap = false; + uiElement.UpdateMapTexture(spotmap.Map); + } + } + + private void UpdateOrbitIcons(Orbit o) + { + double startUT = Planetarium.GetUniversalTime(); + double UT = startUT; + Color col; + + for (int i = 0; i < orbitSteps * 2; i++) + { + if (i > orbitLabels.Count - 1) + break; + + SimpleLabelInfo info = orbitLabels[i]; + + if (info == null) + continue; + + int k = i - orbitSteps; + + if (k < 0) + UT = startUT - (orbitSteps + k) * (o.period / orbitSteps); + else + UT = startUT + k * o.period * (1f / orbitSteps); + + if (double.IsNaN(UT)) + { + info.show = false; + continue; + } + + if (UT < o.StartUT && o.StartUT != startUT) + { + info.show = false; + continue; + } + + if (UT > o.EndUT) + { + info.show = false; + continue; + } + + if (double.IsNaN(o.getObtAtUT(UT))) + { + info.show = false; + continue; + } + + Vector3d pos = o.getPositionAtUT(UT); + + double rotation = 0; + + if (body.rotates) + rotation = (360 * ((UT - startUT) / body.rotationPeriod)) % 360; + + double alt = body.GetAltitude(pos); + + if (alt < 0) + { + if (k < 0) + { + for (int j = k; j < 0; j++) + { + orbitLabels[j + orbitSteps].show = false; + } + + i = orbitSteps; + continue; + } + + for (int j = k; j < orbitSteps; j++) + { + orbitLabels[j + orbitSteps].show = false; + } + + break; + } + + double lo = body.GetLongitude(pos) - rotation; + double la = body.GetLatitude(pos); + + double lon = (spotmap.projectLongitude(lo, la) + 180) % 360; + double lat = (spotmap.projectLatitude(lo, la) + 90) % 180; + + lon = spotmap.scaleLongitude(lon); + lat = spotmap.scaleLatitude(lat); + + if (lat < 0 || lon < 0 || lat > 180 || lon > 360) + { + info.show = false; + continue; + } + + lon = lon * spotmap.MapWidth / 360; + lat = lat * spotmap.MapHeight / 180; + + if (k < 0) + col = palette.cb_orange; + else + { + if (body.atmosphere && body.atmosphereDepth >= alt) + col = palette.cb_reddishPurple; + else + col = palette.cb_skyBlue; + } + + info.show = true; + info.color = col; + info.pos = new Vector2((float)lon, (float)lat); + } + + MapLabelInfo Ap = orbitMapLabels[Aplabel]; + + Vector2 labelPos; + + if (o.ApA > 0 && mapPosAtT(o, o.timeToAp, startUT, out labelPos)) + { + Ap.show = true; + Ap.pos = labelPos; + Ap.label = o.ApA.ToString("N0"); + } + else + Ap.show = false; + + orbitMapLabels[Aplabel] = Ap; + + MapLabelInfo Pe = orbitMapLabels[Pelabel]; + + if (o.PeA > 0 && mapPosAtT(o, o.timeToPe, startUT, out labelPos)) + { + Pe.show = true; + Pe.pos = labelPos; + Pe.label = o.PeA.ToString("N0"); + } + else + Pe.show = false; + + orbitMapLabels[Pelabel] = Pe; + + if (o.patchEndTransition == Orbit.PatchTransitionType.ESCAPE && mapPosAtT(o, o.EndUT, startUT, out labelPos)) + { + MapLabelInfo Esc = orbitMapLabels[Escapelabel]; + + Esc.show = true; + Esc.pos = labelPos; + + orbitMapLabels[Escapelabel] = Esc; + } + else if (o.patchEndTransition == Orbit.PatchTransitionType.ENCOUNTER && mapPosAtT(o, o.EndUT, startUT, out labelPos)) + { + MapLabelInfo Enc = orbitMapLabels[Encounterlabel]; + + Enc.show = true; + Enc.pos = labelPos; + + orbitMapLabels[Encounterlabel] = Enc; + } + else + { + MapLabelInfo Esc = orbitMapLabels[Escapelabel]; + Esc.show = false; + orbitMapLabels[Escapelabel] = Esc; + + MapLabelInfo Enc = orbitMapLabels[Encounterlabel]; + Enc.show = false; + orbitMapLabels[Encounterlabel] = Enc; + } + + if (vessel.patchedConicSolver != null) + { + if (vessel.patchedConicSolver.maneuverNodes.Count > 0) + { + ManeuverNode n = vessel.patchedConicSolver.maneuverNodes[0]; + + if (n.patch == o && n.nextPatch != null && n.nextPatch.activePatch && n.UT > startUT - o.period && mapPosAtT(o, n.UT - startUT, startUT, out labelPos)) + { + MapLabelInfo Man = orbitMapLabels[Manlabel]; + + Man.show = true; + Man.pos = labelPos; + + orbitMapLabels[Manlabel] = Man; + + Orbit next = n.nextPatch; + + for (int i = 0; i < orbitSteps; i++) + { + SimpleLabelInfo info = orbitLabels[orbitSteps * 2 + i]; + + double T = n.UT - startUT + i * next.period / orbitSteps; + + if (T + startUT > next.EndUT) + { + for (int j = i; j < orbitSteps; j++) + { + orbitLabels[orbitSteps * 2 + j].show = false; + } + + info.show = false; + + break; + } + + if (mapPosAtT(next, T, startUT, out labelPos)) + { + info.color = palette.cb_reddishPurple; + info.show = true; + info.pos = labelPos; + } + else + { + info.show = false; + continue; + } + } + + if (next.patchEndTransition == Orbit.PatchTransitionType.ESCAPE) + { + MapLabelInfo ManEsc = orbitMapLabels[ManEscapelabel]; + + ManEsc.show = true; + ManEsc.pos = labelPos; + + orbitMapLabels[ManEscapelabel] = ManEsc; + } + else if (next.patchEndTransition == Orbit.PatchTransitionType.ENCOUNTER) + { + MapLabelInfo ManEnc = orbitMapLabels[ManEncounterlabel]; + + ManEnc.show = true; + ManEnc.pos = labelPos; + + orbitMapLabels[ManEncounterlabel] = ManEnc; + } + else + { + MapLabelInfo ManEsc = orbitMapLabels[ManEscapelabel]; + ManEsc.show = false; + orbitMapLabels[ManEscapelabel] = ManEsc; + + MapLabelInfo ManEnc = orbitMapLabels[ManEncounterlabel]; + ManEnc.show = false; + orbitMapLabels[ManEncounterlabel] = ManEnc; + } + + MapLabelInfo ManAp = orbitMapLabels[ManAplabel]; + + if (next.timeToAp > 0 && n.UT + next.timeToAp < next.EndUT && mapPosAtT(next, n.UT - startUT + next.timeToAp, startUT, out labelPos)) + { + ManAp.show = true; + ManAp.pos = labelPos; + } + else + ManAp.show = false; + + orbitMapLabels[ManAplabel] = ManAp; + + MapLabelInfo ManPe = orbitMapLabels[ManPelabel]; + + if (next.timeToPe > 0 && n.UT + next.timeToPe < next.EndUT && mapPosAtT(next, n.UT - startUT + next.timeToPe, startUT, out labelPos)) + { + ManPe.show = true; + ManPe.pos = labelPos; + } + else + ManPe.show = false; + + orbitMapLabels[ManPelabel] = ManPe; + + } + else + { + MapLabelInfo Man = orbitMapLabels[Manlabel]; + Man.show = false; + orbitMapLabels[Manlabel] = Man; + + MapLabelInfo ManEsc = orbitMapLabels[ManEscapelabel]; + ManEsc.show = false; + orbitMapLabels[ManEscapelabel] = ManEsc; + + MapLabelInfo ManEnc = orbitMapLabels[ManEncounterlabel]; + ManEnc.show = false; + orbitMapLabels[ManEncounterlabel] = ManEnc; + + MapLabelInfo ManAp = orbitMapLabels[ManAplabel]; + ManAp.show = false; + orbitMapLabels[ManAplabel] = ManAp; + + MapLabelInfo ManPe = orbitMapLabels[ManPelabel]; + ManPe.show = false; + orbitMapLabels[ManPelabel] = ManPe; + + for (int i = 0; i < orbitSteps; i++) + { + SimpleLabelInfo info = orbitLabels[orbitSteps * 2 + i]; + info.show = false; + } + } + + } + else + { + MapLabelInfo Man = orbitMapLabels[Manlabel]; + Man.show = false; + orbitMapLabels[Manlabel] = Man; + + MapLabelInfo ManEsc = orbitMapLabels[ManEscapelabel]; + ManEsc.show = false; + orbitMapLabels[ManEscapelabel] = ManEsc; + + MapLabelInfo ManEnc = orbitMapLabels[ManEncounterlabel]; + ManEnc.show = false; + orbitMapLabels[ManEncounterlabel] = ManEnc; + + MapLabelInfo ManAp = orbitMapLabels[ManAplabel]; + ManAp.show = false; + orbitMapLabels[ManAplabel] = ManAp; + + MapLabelInfo ManPe = orbitMapLabels[ManPelabel]; + ManPe.show = false; + orbitMapLabels[ManPelabel] = ManPe; + + for (int i = 0; i < orbitSteps; i++) + { + SimpleLabelInfo info = orbitLabels[orbitSteps * 2 + i]; + info.show = false; + } + } + + } + } + + private double meanForTrue(double TA, double e) + { + TA = TA * Mathf.Deg2Rad; + + double EA = Math.Acos((e + Math.Cos(TA)) / (1 + e * Math.Cos(TA))); + + if (TA > Math.PI) + EA = 2 * Math.PI - EA; + + double MA = EA - e * Math.Sin(EA); + + // the mean anomaly isn't really an angle, but I'm a simple person + return MA * Mathf.Rad2Deg; + } + + private bool mapPosAtT(Orbit o, double dT, double startUT, out Vector2 labelPos) + { + labelPos = new Vector2(); + + double UT = startUT + dT; + + if (double.IsNaN(UT)) + return false; + + try + { + if (double.IsNaN(o.getObtAtUT(UT))) + return false; + + Vector3d pos = o.getPositionAtUT(UT); + double rotation = 0; + + if (body.rotates) + rotation = (360 * (dT / vessel.mainBody.rotationPeriod)) % 360; + + double lo = (body.GetLongitude(pos) - rotation); + double la = (body.GetLatitude(pos)); + + double lon = (spotmap.projectLongitude(lo, la) + 180) % 360; + double lat = (spotmap.projectLatitude(lo, la) + 90) % 180; + + lat = spotmap.scaleLatitude(lat); + lon = spotmap.scaleLongitude(lon); + + if (lat < 0 || lon < 0 || lat > 180 || lon > 360) + return false; + + lon = lon * spotmap.MapWidth / 360; + lat = lat * spotmap.MapHeight / 180; + + labelPos = new Vector2((float)lon, (float)lat); + + return true; + } + catch (Exception) + { + return false; + } + } + + public void RefreshIcons() + { + if (uiElement != null) + uiElement.RefreshIcons(); + } + + public void setToPosition(double lat, double lon, SCANmap map) + { + SCANcontroller.controller.zoomMapType = map.MType.ToString(); + SCANcontroller.controller.zoomMapColor = map.ColorMap; + SCANcontroller.controller.zoomMapResource = map.Resource.Name; + SCANcontroller.controller.zoomMapResourceOn = map.ResourceActive; + + initializeMapCenter(SCANUtil.fixLatShift(lat), SCANUtil.fixLonShift(lon), map.Body); + + initialized = true; + } + + public void setToVessel() + { + if (vessel == null) + { + initializeMapCenter(0, 0, FlightGlobals.GetHomeBody()); + return; + } + if(initialized && !VesselLock) + return; + + initializeMapCenter(SCANUtil.fixLatShift(vessel.latitude), SCANUtil.fixLonShift(vessel.longitude), vessel.mainBody); + + initialized = true; + } + + public string Version + { + get { return SCANmainMenuLoader.SCANsatVersion; } + } + + public string CurrentMapType + { + get { return SCANcontroller.controller.zoomMapType; } + set + { + mapType t; + + try + { + t = (mapType)Enum.Parse(typeof(mapType), value, true); + + SCANcontroller.controller.zoomMapType = value; + spotmap.MType = t; + resetMap(); + } + catch (Exception e) + { + SCANUtil.SCANlog("Error in parsing map type\n{0}", e); + } + } + } + + public string CurrentResource + { + get { return SCANUtil.displayNameFromResource(SCANcontroller.controller.zoomMapResource); } + set + { + SCANcontroller.controller.zoomMapResource = SCANUtil.resourceFromDisplayName(value); + + currentResource = AssignResource(SCANcontroller.controller.zoomMapResource); + + if (currentResource == null) + spotmap.Resource = null; + else + spotmap.Resource = currentResource; + } + } + + public string ZoomLevelText + { + get + { + double zoom = spotmap.MapScale; + + return (zoom > 999 ? zoom.ToString("N0") : zoom.ToString("N2")) + "X"; + } + } + + public string MapCenterText + { + get { return SCANuiUtil.toDMS(spotmap.CenteredLat, spotmap.CenteredLong); } + } + + public string RandomWaypoint + { + get { return StringUtilities.GenerateSiteName(gen.Next(), body, false, true); } + } + + private SCANresourceGlobal AssignResource(string resource) + { + SCANresourceGlobal r = currentResource; + + if (r == null || r.Name != resource) + { + for (int i = resources.Count - 1; i >= 0; i--) + { + SCANresourceGlobal res = resources[i]; + + if (res.Name != resource) + continue; + + r = res; + break; + } + } + + if (r == null) + r = SCANcontroller.GetFirstResource; + + if (r != null) + r.CurrentBodyConfig(body.bodyName); + + return r; + } + + public bool IsVisible + { + get { return _isVisible; } + set + { + _isVisible = value; + + if (!value) + Close(); + } + } + + public bool VesselLock + { + get { return SCANcontroller.controller.zoomMapVesselLock; } + set + { + SCANcontroller.controller.zoomMapVesselLock = value; + + if (value) + VesselSync(); + } + } + + public bool ColorToggle + { + get { return SCANcontroller.controller.zoomMapColor; } + set + { + SCANcontroller.controller.zoomMapColor = value; + + spotmap.ColorMap = value; + resetMap(); + } + } + + public bool TerminatorToggle + { + get { return SCANcontroller.controller.zoomMapTerminator; } + set + { + SCANcontroller.controller.zoomMapTerminator = value; + + spotmap.Terminator = value; + resetMap(); + } + } + + public bool OrbitToggle + { + get { return SCANcontroller.controller.zoomMapOrbit; } + set + { + SCANcontroller.controller.zoomMapOrbit = value; + + if (value && ShowOrbit) + { + Orbit o = vessel.orbit; + + orbitLabels.Clear(); + + for (int i = 0; i < orbitSteps * 3; i++) + { + orbitLabels.Add(new SimpleLabelInfo(10, SCAN_UI_Loader.PlanetIcon)); + } + + if (!vessel.LandedOrSplashed) + UpdateOrbitIcons(o); + } + + updateMap = true; + } + } + + public bool IconsToggle + { + get { return SCANcontroller.controller.zoomMapIcons; } + set { SCANcontroller.controller.zoomMapIcons = value; } + } + + public bool LegendToggle + { + get { return SCANcontroller.controller.zoomMapLegend; } + set { SCANcontroller.controller.zoomMapLegend = value; } + } + + public bool LegendAvailable + { + get + { + if (WindowState != 0) + return false; + + switch(spotmap.MType) + { + case mapType.Altimetry: + return body.pqsController != null; + case mapType.Biome: + return body.BiomeMap != null && SCAN_Settings_Config.Instance.LegendTooltips; + } + + return false; + } + } + + public bool ResourceToggle + { + get { return SCANcontroller.controller.zoomMapResourceOn; } + set + { + SCANcontroller.controller.zoomMapResourceOn = value; + + resetMap(); + } + } + + public bool OrbitAvailable + { + get { return HighLogic.LoadedSceneIsFlight; } + } + + public bool ShowOrbit + { + get + { + return HighLogic.LoadedSceneIsFlight + && vessel != null + && body != null + && vessel.mainBody == body + && GameVariables.Instance.GetOrbitDisplayMode( + ScenarioUpgradeableFacilities.GetFacilityLevel( + SpaceCenterFacility.TrackingStation) + ) == GameVariables.OrbitDisplayMode.PatchedConics; + } + } + + public bool ShowWaypoint + { + get { return HighLogic.LoadedScene != GameScenes.SPACECENTER; } + } + + public bool ShowResource + { + get { return SCANcontroller.MasterResourceCount > 1; } + } + + public bool ShowVessel + { + get { return HighLogic.LoadedSceneIsFlight; } + } + + public bool MechJebAvailable + { + get { return SCANmainMenuLoader.MechJebLoaded && SCAN_Settings_Config.Instance.MechJebTarget && SCANcontroller.controller.MechJebLoaded; } + } + + public bool TooltipsOn + { + get { return SCAN_Settings_Config.Instance.WindowTooltips; } + } + + public bool LegendTooltips + { + get { return SCAN_Settings_Config.Instance.LegendTooltips; } + } + + public bool LockInput + { + get { return _inputLock; } + set + { + _inputLock = value; + + if (_inputLock) + InputLockManager.SetControlLock(controlLock); + else + InputLockManager.RemoveControlLock(controlLock); + } + } + + public int OrbitSteps + { + get { return orbitSteps * 3; } + } + + public int CurrentScene + { + get + { + switch (HighLogic.LoadedScene) + { + case GameScenes.FLIGHT: + return 0; + case GameScenes.TRACKSTATION: + return 1; + case GameScenes.SPACECENTER: + return 2; + default: + return -1; + } + } + } + + public int WindowState + { + get { return SCANcontroller.controller.zoomMapState; } + set { SCANcontroller.controller.zoomMapState = value; } + } + + public float Scale + { + get { return SCAN_Settings_Config.Instance.UIScale; } + } + + public Sprite WaypointSprite + { + get { return SCAN_UI_Loader.WaypointIcon; } + } + + public Canvas MainCanvas + { + get { return UIMasterController.Instance.dialogCanvas; } + } + + public Canvas TooltipCanvas + { + get { return UIMasterController.Instance.tooltipCanvas; } + } + + public Vector2 Position + { + get { return SCAN_Settings_Config.Instance.ZoomMapPosition; } + set { SCAN_Settings_Config.Instance.ZoomMapPosition = value; } + } + + public Vector2 Size + { + get { return SCAN_Settings_Config.Instance.ZoomMapSize; } + set + { + SCAN_Settings_Config.Instance.ZoomMapSize = value; + + double scale = spotmap.MapScale; + spotmap.setSize(value); + spotmap.MapScale = scale; + + resetMap(); + + updateMap = true; + } + } + + public Texture2D LegendImage + { + get + { + if (spotmap.MapLegend == null) + spotmap.MapLegend = new SCANmapLegend(); + + if (data == null) + return null; + + switch (spotmap.MType) + { + case mapType.Altimetry: + return spotmap.MapLegend.getLegend(SCANcontroller.controller.zoomMapColor, data.TerrainConfig); + case mapType.Biome: + if (body != null && body.BiomeMap != null && body.BiomeMap.Attributes != null) + { + biomes = new List(); + + int w = spotmap.MapWidth / 4; + int h = spotmap.MapHeight / 4; + + for (int i = 0; i < spotmap.MapHeight; i += 4) + { + for (int j = 0; j < spotmap.MapWidth; j += 4) + { + double lon = spotmap.Lon_Offset + (j * 1.0f / spotmap.MapScale) - 180; + double lat = spotmap.Lat_Offset + (i * 1.0f / spotmap.MapScale) - 90; + double la = lat, lo = lon; + lat = spotmap.unprojectLatitude(lo, la); + lon = spotmap.unprojectLongitude(lo, la); + + if (lon < -180 || lon >= 180 || lat < -90 && lat >= 90 || double.IsNaN(lon) || double.IsNaN(lat)) + continue; + + CBAttributeMapSO.MapAttribute biome = SCANUtil.getBiome(body, lon, lat); + + bool add = true; + + for (int b = biomes.Count - 1; b >= 0; b--) + { + if (biome != biomes[b]) + continue; + + add = false; + break; + } + + if (add) + biomes.Add(biome); + } + } + + + return spotmap.MapLegend.getLegend(data, SCANcontroller.controller.zoomMapColor, SCAN_Settings_Config.Instance.BigMapStockBiomes, biomes.ToArray(), true); + } + else + return null; + } + + return null; + } + } + + public IList MapTypes + { + get { return new List(3) { "Altimetry", "Slope", "Biome" }; } + } + + public IList Resources + { + get { return new List(resources.Select(r => r.DisplayName)); } + } + + public IList LegendLabels + { + get + { + if (data == null) + return null; + + string one = string.Format("|\n{0:N0}", (((int)(terrainMin / 100)) * 100)); + + string two = string.Format("|\n{0:N0}", (((int)((terrainMin + ((terrainMax - terrainMin) / 2)) / 100)) * 100)); + + string three = string.Format("|\n{0:N0}", (((int)(terrainMax / 100)) * 100)); + + return new List(3) { one, two, three }; + } + } + + public SimpleLabelInfo OrbitInfo(int index) + { + if (index < 0 || index >= orbitLabels.Count) + return null; + + return orbitLabels[index]; + } + + public MapLabelInfo OrbitIconInfo(string id) + { + MapLabelInfo info; + + if (OrbitLabelList.TryGetValue(id, out info)) + return info; + + return new MapLabelInfo(); + } + + public Vector2 VesselPosition() + { + if (vessel == null) + return new Vector2(); + + return VesselPosition(vessel); + } + + public Vector2 VesselPosition(Guid id) + { + Vessel v = null; + + for (int i = FlightGlobals.Vessels.Count - 1; i >= 0; i--) + { + v = FlightGlobals.Vessels[i]; + + if (v.id == id) + break; + } + + return VesselPosition(v); + } + + public Vector2 VesselPosition(Vessel v) + { + if (v == null) + return new Vector2(); + + double lat = SCANUtil.fixLat(spotmap.projectLatitude(v.longitude, v.latitude)); + double lon = SCANUtil.fixLon(spotmap.projectLongitude(v.longitude, v.latitude)); + lat = spotmap.scaleLatitude(lat); + lon = spotmap.scaleLongitude(lon); + + if (lat < 0 || lon < 0 || lat > 180 || lon > 360) + return new Vector2(-1, -1); + + lon = lon * spotmap.MapWidth / 360; + lat = lat * spotmap.MapHeight / 180; + + return new Vector2((float)lon, (float)lat); + } + + public Vector2 MapPosition(double lat, double lon) + { + double Lat = SCANUtil.fixLat(spotmap.projectLatitude(lon, lat)); + double Lon = SCANUtil.fixLon(spotmap.projectLongitude(lon, lat)); + Lat = spotmap.scaleLatitude(Lat); + Lon = spotmap.scaleLongitude(Lon); + + if (Lat < 0 || Lon < 0 || Lat > 180 || Lon > 360) + return new Vector2(-1, -1); + + Lon = Lon * spotmap.MapWidth / 360; + Lat = Lat * spotmap.MapHeight / 180; + + return new Vector2((float)Lon, (float)Lat); + } + + public Dictionary OrbitLabelList + { + get { return orbitMapLabels; } + } + + public Dictionary FlagInfoList + { + get + { + Dictionary vessels = new Dictionary(); + mapFlags.Clear(); + + for (int i = FlightGlobals.Vessels.Count - 1; i >= 0; i--) + { + Vessel v = FlightGlobals.Vessels[i]; + + if (v == null) + continue; + + if (v.vesselType != VesselType.Flag) + continue; + + if (v.mainBody != body) + continue; + + mapFlags.Add(v); + + Vector2 flagPos = VesselPosition(v.id); + + vessels.Add(v.id, new MapLabelInfo() + { + label = "", + image = SCAN_UI_Loader.FlagIcon, + pos = flagPos, + baseColor = ColorToggle ? palette.cb_yellow : palette.cb_skyBlue, + flash = false, + width = 32, + show = flagPos.x >= 0 && flagPos.y >= 0 + }); + } + + return vessels; + } + } + + public Dictionary AnomalyInfoList + { + get + { + Dictionary anomalies = new Dictionary(); + + if (data != null) + { + for (int i = data.Anomalies.Length - 1; i >= 0; i--) + { + SCANanomaly a = data.Anomalies[i]; + + if (a == null) + continue; + + if (!a.Known) + continue; + + Vector2 mapPos = MapPosition(a.Latitude, a.Longitude); + + anomalies.Add(a.Name, new MapLabelInfo() + { + label = "", + image = SCAN_UI_Loader.AnomalyIcon, + pos = mapPos, + baseColor = ColorToggle ? palette.cb_yellow : palette.cb_skyBlue, + flash = false, + width = 20, + alignBottom = 8, + show = mapPos.x >= 0 && mapPos.y >= 0 + }); + } + } + + return anomalies; + } + } + + public Dictionary WaypointInfoList + { + get + { + Dictionary waypoints = new Dictionary(); + + if (data != null) + { + for (int i = data.Waypoints.Count - 1; i >= 0; i--) + { + SCANwaypoint w = data.Waypoints[i]; + + if (w == null) + continue; + + Vector2 wayPos = MapPosition(w.Latitude, w.Longitude); + + if (w.LandingTarget) + { + waypoints.Add(w.Seed, new MapLabelInfo() + { + label = "", + image = SCAN_UI_Loader.MechJebIcon, + pos = wayPos, + baseColor = palette.red, + flash = false, + width = 20, + alignBottom = 0, + show = wayPos.x >= 0 && wayPos.y >= 0 + }); + } + else + { + waypoints.Add(w.Seed, new MapLabelInfo() + { + label = "", + image = SCAN_UI_Loader.WaypointIcon, + pos = wayPos, + baseColor = palette.white, + flash = false, + width = 20, + alignBottom = 10, + show = wayPos.x >= 0 && wayPos.y >= 0 + }); + } + } + } + + return waypoints; + } + } + + public KeyValuePair VesselInfo + { + get + { + if (vessel == null || vessel.mainBody != body) + return new KeyValuePair(new Guid(), new MapLabelInfo() { label = "null" }); + + Vector2 vesPos = VesselPosition(vessel); + + return new KeyValuePair(vessel.id, new MapLabelInfo() + { + label = "", + image = SCAN_UI_Loader.VesselIcon(vessel.vesselType), + pos = vesPos, + baseColor = ColorToggle ? palette.white : palette.cb_skyBlue, + flashColor = palette.cb_yellow, + flash = true, + width = 28, + show = vesPos.x >= 0 && vesPos.y >= 0 + }); + } + } + + private Vector2d MousePosition(Vector2 pos) + { + float mx = pos.x; + float my = pos.y * -1f; + + double mlo = spotmap.Lon_Offset + (mx / spotmap.MapScale) - 180; + double mla = spotmap.Lat_Offset + (spotmap.MapHeight / spotmap.MapScale) - (my / spotmap.MapScale) - 90; + + double mlon = spotmap.unprojectLongitude(mlo, mla); + double mlat = spotmap.unprojectLatitude(mlo, mla); + + return new Vector2d(mlon, mlat); + } + + public void ClampToScreen(RectTransform rect) + { + UIMasterController.ClampToScreen(rect, Vector2.zero); + } + + public string MapInfo(Vector2 mapPos) + { + Vector2d pos = MousePosition(mapPos); + + double mlon = pos.x; + double mlat = pos.y; + + if (mlon >= -180 && mlon <= 180 && mlat >= -90 && mlat <= 90) + return mouseOverInfo(mlon, mlat); + else + return ""; + } + + private string mouseOverInfo(double lon, double lat) + { + infoString = StringBuilderCache.Acquire(); + + bool altimetry = SCANUtil.isCovered(lon, lat, data, SCANtype.Altimetry); + bool hires = SCANUtil.isCovered(lon, lat, data, SCANtype.AltimetryHiRes); + + if (altimetry) + { + infoString.AppendFormat("{0} ", SCANuiUtil.getMouseOverElevation(lon, lat, data, 2, hires)); + + if (hires) + { + double circum = body.Radius * 2 * Math.PI; + double eqDistancePerDegree = circum / 360; + double degreeOffset = 5 / eqDistancePerDegree; + + infoString.AppendFormat("{0:F1}° ", SCANUtil.slope(SCANUtil.getElevation(body, lon, lat), body, lon, lat, degreeOffset)); + } + } + + if (SCANUtil.isCovered(lon, lat, data, SCANtype.Biome)) + infoString.AppendFormat("{0} ", SCANUtil.getBiomeDisplayName(body, lon, lat)); + + if (spotmap.ResourceActive && SCANconfigLoader.GlobalResource && spotmap.Resource != null) + { + bool resources = false; + bool fuzzy = false; + + if (SCANUtil.isCovered(lon, lat, data, spotmap.Resource.SType)) + { + resources = true; + } + else if (SCANUtil.isCovered(lon, lat, data, SCANtype.FuzzyResources)) + { + resources = true; + fuzzy = true; + } + + if (resources) + infoString.Append(SCANuiUtil.getResourceAbundance(spotmap.Body, lat, lon, fuzzy, spotmap.Resource)); + } + + infoString.AppendLine(); + infoString.AppendFormat("{0} (lat: {1:F2}° lon: {2:F2}°)", SCANuiUtil.toDMS(lat, lon), lat, lon); + + if (SCANcontroller.controller.zoomMapIcons) + { + infoString.AppendLine(); + + double range = ContractDefs.Survey.MaximumTriggerRange; + + for (int i = data.Waypoints.Count - 1; i >= 0; i--) + { + SCANwaypoint p = data.Waypoints[i]; + + if (!p.LandingTarget) + { + if (p.Root != null) + { + if (p.Root.ContractState != Contracts.Contract.State.Active) + continue; + } + if (p.Param != null) + { + if (p.Param.State != Contracts.ParameterState.Incomplete) + continue; + } + + if (SCANUtil.waypointDistance(lat, lon, 1000, p.Latitude, p.Longitude, 1000, body) <= range) + { + infoString.AppendFormat("Way: {0} ", p.Name); + break; + } + } + else if (SCANUtil.waypointDistance(lat, lon, 1000, p.Latitude, p.Longitude, 1000, body) <= range) + { + infoString.AppendFormat("MJ: {0} ", SCANuiUtil.toDMS(p.Latitude, p.Longitude, 0)); + break; + } + } + + for (int i = data.Anomalies.Length - 1; i >= 0; i--) + { + SCANanomaly a = data.Anomalies[i]; + + if (a.Known) + { + if (SCANUtil.mapLabelDistance(lat, lon, a.Latitude, a.Longitude, body) <= range) + { + if (a.Detail) + infoString.AppendFormat("?: {0} ", a.Name); + else + infoString.Append("?: Unknown "); + break; + } + } + } + + for (int i = mapFlags.Count - 1; i >= 0; i--) + { + Vessel flag = mapFlags[i]; + + if (SCANUtil.mapLabelDistance(lat, lon, flag.latitude, flag.longitude, body) <= range) + { + infoString.AppendFormat("Flag: {0}", flag.vesselName); + break; + } + } + } + + return infoString.ToStringAndRelease(); + } + + public string TooltipText(float xPos) + { + switch (spotmap.MType) + { + case mapType.Biome: + if (biomes.Count <= 0) + return ""; + + int count = biomes.Count; + + int blockSize = (int)Math.Truncate(256 / (count * 1d)); + + int current = (int)Math.Truncate((xPos * 256) / (blockSize * 1d)); + + if (current >= count) + current = count - 1; + else if (current < 0) + current = 0; + + return Localizer.Format(biomes[current].displayname); + case mapType.Altimetry: + float terrain = xPos * (terrainMax - terrainMin) + terrainMin; + + return string.Format("{0:N0}m", terrain); + } + + return ""; + } + + public void RefreshMap() + { + resetMap(); + + uiElement.SetLegend(LegendToggle); + } + + public void VesselSync() + { + vessel = FlightGlobals.ActiveVessel; + + if (vessel == null) + return; + + if (vessel.mainBody != body) + { + SCANdata dat = SCANUtil.getData(vessel.mainBody); + if (dat == null) + dat = new SCANdata(vessel.mainBody); + + data = dat; + body = data.Body; + + spotmap.setBody(body); + } + + resetMap(SCANUtil.fixLatShift(vessel.latitude), SCANUtil.fixLonShift(vessel.longitude), true); + } + + public void MoveMap(int i) + { + if (VesselLock) + { + resetMapToVessel(); + return; + } + + double div = 3; + + if (spotmap.MapScale < 4) + div = 5; + + double w = (spotmap.MapWidth / spotmap.MapScale) / div; + double h = (spotmap.MapHeight / spotmap.MapScale) / div; + + double lon = spotmap.CenteredLong; + + if (i == 2) + { + if (spotmap.CenteredLat + h > 90) + { + lon += 180; + lon = SCANUtil.fixLonShift(lon); + } + } + else if (i == 3) + { + if (spotmap.CenteredLat - h < -90) + { + lon += 180; + lon = SCANUtil.fixLonShift(lon); + } + } + + switch (i) + { + case 0: + w = spotmap.CenteredLong - w; + if (w < -180) + w += 360; + + resetMap(spotmap.CenteredLat, w, true); + break; + case 1: + w = spotmap.CenteredLong + w; + if (w > 180) + w -= 360; + + resetMap(spotmap.CenteredLat, w, true); + break; + case 2: + h = spotmap.CenteredLat + h; + if (h > 90) + h = 180 - h; + + resetMap(h, lon, true); + break; + case 3: + h = spotmap.CenteredLat - h; + if (h < -90) + h = -180 - h; + + resetMap(h, lon, true); + break; + } + } + + public void ZoomMap(bool zoom) + { + if (zoom) + { + spotmap.MapScale = spotmap.MapScale * 1.25f; + if (spotmap.MapScale > maxZoom) + spotmap.MapScale = maxZoom; + + resetMap(); + } + else + { + spotmap.MapScale = spotmap.MapScale / 1.25f; + if (spotmap.MapScale < minZoom) + spotmap.MapScale = minZoom; + + resetMap(); + } + } + + public void SetWaypoint(string id, Vector2 pos) + { + if (string.IsNullOrEmpty(id)) + id = RandomWaypoint; + + pos.y -= spotmap.MapHeight; + + Vector2d mapPos = MousePosition(pos); + + if (mapPos.x < -180 || mapPos.x > 180 || mapPos.y < -90 || mapPos.y > 90) + return; + + Waypoint w = new Waypoint(); + + w.name = id; + w.isExplored = true; + w.isNavigatable = true; + w.isOnSurface = true; + w.celestialName = body.GetName(); + w.latitude = mapPos.y; + w.longitude = mapPos.x; + w.seed = gen.Next(0, int.MaxValue); + w.navigationId = new Guid(); + + ScenarioCustomWaypoints.AddWaypoint(w); + } + + public void SetMJWaypoint(Vector2 pos) + { + pos.y -= spotmap.MapHeight; + + Vector2d mapPos = MousePosition(pos); + + if (mapPos.x < -180 || mapPos.x > 180 || mapPos.y < -90 || mapPos.y > 90) + return; + + SCANcontroller.controller.MJTargetSet.Invoke(mapPos, body); + + SCANwaypoint w = new SCANwaypoint(mapPos.y, mapPos.x, "MechJeb Landing Target"); + data.addToWaypoints(w); + } + + public void ClickMap(int button, Vector2 pos) + { + Vector2d mapPos = MousePosition(pos); + + switch (button) + { + case 0: + spotmap.MapScale = spotmap.MapScale / 1.25f; + + if (spotmap.MapScale < minZoom) + spotmap.MapScale = minZoom; + + resetMap(mapPos.y, mapPos.x, true); + break; + case 1: + if (GameSettings.MODIFIER_KEY.GetKey()) + resetMap(mapPos.y, mapPos.x, true); + else + { + spotmap.MapScale = spotmap.MapScale * 1.25f; + + if (spotmap.MapScale > maxZoom) + spotmap.MapScale = maxZoom; + + resetMap(mapPos.y, mapPos.x, true); + } + break; + case 2: + resetMap(mapPos.y, mapPos.x, true); + break; + } + } + + public void ResetPosition() + { + SCAN_Settings_Config.Instance.ZoomMapPosition = new Vector2(400, -400); + + if (uiElement != null) + uiElement.SetPosition(SCAN_Settings_Config.Instance.ZoomMapPosition); + } + } +} diff --git a/SCANsat/SCANconfigLoader.cs b/SCANsat/SCANconfigLoader.cs index a39d0ae03..d8595816b 100644 --- a/SCANsat/SCANconfigLoader.cs +++ b/SCANsat/SCANconfigLoader.cs @@ -31,22 +31,13 @@ public static class SCANconfigLoader private const string configFile = "SCANsat/Resources/SCANcolors"; private const string configNodeName = "SCAN_Color_Config"; - private const string localizationFile = "SCANsat/Resources/SCANlocalization"; - private const string localizationNode = "SCAN_Localization"; - private static SCAN_Color_Config SCANnode; - private static SCAN_Localization localNode; public static SCAN_Color_Config SCANNode { get { return SCANnode; } } - public static SCANlanguagePack languagePack - { - get { return localNode.ActivePack; } - } - public static bool GlobalResource { get { return globalResource; } @@ -61,8 +52,6 @@ internal static void configLoader() { loadSCANtypes(); - localNode = new SCAN_Localization(localizationFile, localizationNode); - SCANnode = new SCAN_Color_Config(configFile, configNodeName); SCANcontroller.checkLoadedTerrainNodes(); @@ -100,12 +89,16 @@ private static void loadResources() SCANresourceGlobal currentGlobal = SCANcontroller.getResourceNode(rs.ResourceName); + PartResourceDefinition pr = PartResourceLibrary.Instance.GetDefinition(rs.ResourceName); + if (currentGlobal == null) { - SCANcontroller.addToResourceData(rs.ResourceName, new SCANresourceGlobal(rs.ResourceName, 20, rs.Distribution.MinAbundance, rs.Distribution.MaxAbundance, palette.magenta, palette.cb_orange, t)); - currentGlobal = SCANcontroller.getResourceNode(rs.ResourceName); + SCANcontroller.addToResourceData(rs.ResourceName, new SCANresourceGlobal(rs.ResourceName, pr == null ? rs.ResourceName : pr.displayName, 20, rs.Distribution.MinAbundance, rs.Distribution.MaxAbundance, palette.magenta, palette.cb_orange, t)); + currentGlobal = SCANcontroller.getResourceNode(rs.ResourceName, true); } + currentGlobal.DisplayName = pr == null ? rs.ResourceName : pr.displayName; + if (rs.Distribution.MinAbundance > currentGlobal.DefaultMinValue) currentGlobal.DefaultMinValue = rs.Distribution.MinAbundance; @@ -114,10 +107,10 @@ private static void loadResources() foreach (CelestialBody body in FlightGlobals.Bodies) { - SCANresourceBody newBody = currentGlobal.getBodyConfig(body.name, false); + SCANresourceBody newBody = currentGlobal.getBodyConfig(body.bodyName, false); if (newBody == null) - currentGlobal.addToBodyConfigs(body.name, new SCANresourceBody(rs.ResourceName, body, currentGlobal.DefaultMinValue, currentGlobal.DefaultMaxValue), false); + currentGlobal.addToBodyConfigs(body.bodyName, new SCANresourceBody(rs.ResourceName, body, currentGlobal.DefaultMinValue, currentGlobal.DefaultMaxValue), false); } SCANcontroller.addToLoadedResourceNames(rs.ResourceName); @@ -137,15 +130,16 @@ private static void loadResources() if (t == null) continue; - SCANcontroller.addToResourceData(rsBody.ResourceName, new SCANresourceGlobal(rsBody.ResourceName, 20, 0, 0.001f, palette.magenta, palette.cb_orange, t)); - currentGlobal = SCANcontroller.getResourceNode(rsBody.ResourceName); + PartResourceDefinition pr = PartResourceLibrary.Instance.GetDefinition(rsBody.ResourceName); + SCANcontroller.addToResourceData(rsBody.ResourceName, new SCANresourceGlobal(rsBody.ResourceName, pr == null ? rsBody.ResourceName : pr.displayName, 20, 0, 0.001f, palette.magenta, palette.cb_orange, t)); + currentGlobal = SCANcontroller.getResourceNode(rsBody.ResourceName, true); foreach (CelestialBody body in FlightGlobals.Bodies) { - SCANresourceBody newBody = currentGlobal.getBodyConfig(body.name, false); + SCANresourceBody newBody = currentGlobal.getBodyConfig(body.bodyName, false); if (newBody == null) - currentGlobal.addToBodyConfigs(body.name, new SCANresourceBody(rsBody.ResourceName, body, 0, 0.001f), false); + currentGlobal.addToBodyConfigs(body.bodyName, new SCANresourceBody(rsBody.ResourceName, body, 0, 0.001f), false); } SCANcontroller.addToLoadedResourceNames(rsBody.ResourceName); @@ -155,7 +149,7 @@ private static void loadResources() if (currentBody == null) { - CelestialBody body = FlightGlobals.Bodies.FirstOrDefault(a => a.name == rsBody.PlanetName); + CelestialBody body = FlightGlobals.Bodies.FirstOrDefault(a => a.bodyName == rsBody.PlanetName); if (body == null) continue; diff --git a/SCANsat/SCANcontroller.cs b/SCANsat/SCANcontroller.cs index 4bcd40ca0..c9e502ebe 100644 --- a/SCANsat/SCANcontroller.cs +++ b/SCANsat/SCANcontroller.cs @@ -17,11 +17,14 @@ using System.Collections; using System.Collections.Generic; using UnityEngine; +using UnityEngine.Events; using Contracts; using FinePrint.Contracts; using FinePrint.Utilities; +using KSP.Localization; using SCANsat.SCAN_UI; using SCANsat.SCAN_UI.UI_Framework; +using SCANsat.SCAN_Unity; using SCANsat.SCAN_Data; using SCANsat.SCAN_Map; using SCANsat.SCAN_PartModules; @@ -46,106 +49,70 @@ public static SCANcontroller controller private static int minScanAlt = 5000; private static int maxScanAlt = 500000; private static int bestScanAlt = 250000; + [KSPField(isPersistant = true)] - public int colours = 0; - [KSPField(isPersistant = true)] - public bool map_markers = true; - [KSPField(isPersistant = true)] - public bool map_flags = true; - [KSPField(isPersistant = true)] - public bool map_waypoints = true; - [KSPField(isPersistant = true)] - public bool map_orbit = true; - [KSPField(isPersistant = true)] - public bool map_asteroids = true; - [KSPField(isPersistant = true)] - public bool map_grid = true; - [KSPField(isPersistant = true)] - public bool map_ResourceOverlay = false; //Is the overlay activated for the selected resource - [KSPField(isPersistant = true)] - public int projection = 0; - [KSPField(isPersistant = true)] - public int map_width = 0; - [KSPField(isPersistant = true)] - public int map_x = 100; - [KSPField(isPersistant = true)] - public int map_y = 50; - [KSPField(isPersistant = true)] - public string anomalyMarker = "X"; - public string closeBox = "X"; - [KSPField(isPersistant = true)] - public bool legend = false; - [KSPField(isPersistant = true)] - public bool scan_background = true; + public bool mainMapVisible = false; [KSPField(isPersistant = true)] - public int timeWarpResolution = 15; + public bool mainMapColor = true; [KSPField(isPersistant = true)] - public string resourceSelection; + public bool mainMapTerminator = false; [KSPField(isPersistant = true)] - public bool dataRebuild = true; + public bool mainMapBiome = false; [KSPField(isPersistant = true)] - public bool mainMapVisible = false; + public bool mainMapMinimized = false; [KSPField(isPersistant = true)] public bool bigMapVisible = false; [KSPField(isPersistant = true)] - public bool kscMapVisible = false; + public bool bigMapColor = true; [KSPField(isPersistant = true)] - public bool toolTips = true; + public bool bigMapTerminator = false; [KSPField(isPersistant = true)] - public bool useStockAppLauncher = true; + public bool bigMapGrid = true; [KSPField(isPersistant = true)] - public bool resourceBiomeLock = true; + public bool bigMapOrbit = true; [KSPField(isPersistant = true)] - public bool useStockBiomes = false; + public bool bigMapWaypoint = true; [KSPField(isPersistant = true)] - public float biomeTransparency = 40; + public bool bigMapAnomaly = true; [KSPField(isPersistant = true)] - public bool mechJebTargetSelection = false; + public bool bigMapFlag = true; [KSPField(isPersistant = true)] - public bool easyModeScanning = true; + public bool bigMapLegend = true; [KSPField(isPersistant = true)] - public bool needsNarrowBand = true; + public bool bigMapResourceOn = false; [KSPField(isPersistant = true)] - public bool biomeBorder = true; + public string bigMapProjection = "Rectangular"; [KSPField(isPersistant = true)] - public bool disableStockResource = false; + public string bigMapType = "Altimetry"; [KSPField(isPersistant = true)] - public bool hiDetailZoomMap = false; + public string bigMapResource = "Ore"; [KSPField(isPersistant = true)] - public bool planetaryOverlayTooltips = true; + public string bigMapBody = "Kerbin"; [KSPField(isPersistant = true)] - public int overlayInterpolation = 8; + public bool zoomMapVesselLock = false; [KSPField(isPersistant = true)] - public int overlayMapHeight = 256; + public bool zoomMapColor = true; [KSPField(isPersistant = true)] - public int overlayBiomeHeight = 512; + public bool zoomMapTerminator = false; [KSPField(isPersistant = true)] - public float overlayTransparency = 0; + public bool zoomMapOrbit = true; [KSPField(isPersistant = true)] - public bool trueGreyScale = false; + public bool zoomMapIcons = true; [KSPField(isPersistant = true)] - public bool groundTracks = true; + public bool zoomMapLegend = true; [KSPField(isPersistant = true)] - public bool groundTrackActiveOnly = true; + public bool zoomMapResourceOn = false; [KSPField(isPersistant = true)] - public bool exportCSV = false; + public string zoomMapType = "Altimetry"; [KSPField(isPersistant = true)] - public float scanThreshold = 0.90f; + public string zoomMapResource = "Ore"; [KSPField(isPersistant = true)] - public bool useScanThreshold = true; + public int zoomMapState = 0; [KSPField(isPersistant = true)] - public float slopeCutoff = 1f; + public int overlaySelection = 0; [KSPField(isPersistant = true)] - public float windowScale = 1f; - - /* Biome and slope colors can't be serialized properly as a KSP Field */ - public Color lowBiomeColor = new Color(0, 0.46f, 0.02345098f, 1); - public Color highBiomeColor = new Color(0.7f, 0.2388235f, 0, 1); - public Color lowSlopeColorOne = new Color(0.004705883f, 0.6f, 0.3788235f, 1); - public Color highSlopeColorOne = new Color(0.9764706f, 1, 0.4627451f, 1); - public Color lowSlopeColorTwo = new Color(0.9764706f, 1, 0.4627451f, 1); - public Color highSlopeColorTwo = new Color(0.94f, 0.2727843f, 0.007372549f, 1); - + public string overlayResource = "Ore"; + public Color32 lowBiomeColor32 = new Color(0, 0.46f, 0.02345098f, 1); public Color32 highBiomeColor32 = new Color(0.7f, 0.2388235f, 0, 1); public Color32 lowSlopeColorOne32 = new Color(0.004705883f, 0.6f, 0.3788235f, 1); @@ -171,34 +138,23 @@ public static SCANcontroller controller /* Primary SCANdata dictionary; loaded every time*/ private DictionaryValueList body_data = new DictionaryValueList(); - /* GUI draw function callbacks */ - private DictionaryValueList drawQueue = new DictionaryValueList(); - private bool showUI = true; - /* MechJeb Landing Target Integration */ - private bool mechjebLoaded, targetSelecting, targetSelectingActive; - private Vector2d landingTargetCoords; - private CelestialBody landingTargetBody; + private bool mechjebLoaded; private SCANwaypoint landingTarget; /* Kopernicus On Demand Loading Data */ private List dataBodies = new List(); - private CelestialBody bigMapBody; + private CelestialBody bigMapBodyPQS; private CelestialBody zoomMapBody; private PQSMod KopernicusOnDemand; - - /* UI window objects */ - internal SCANmainMap mainMap; - internal SCANsettingsUI settingsWindow; - internal SCANinstrumentUI instrumentsWindow; - internal SCANBigMap BigMap; - internal SCANkscMap kscMap; - internal SCANcolorSelection colorManager; - internal SCANoverlayController resourceOverlay; - internal SCANresourceSettings resourceSettings; - //internal SCANzoomHiDef hiDefMap; - internal SCANzoomWindow zoomMap; - + + private SCAN_UI_MainMap _mainMap; + private SCAN_UI_Instruments _instruments; + private SCAN_UI_BigMap _bigMap; + private SCAN_UI_ZoomMap _zoomMap; + private SCAN_UI_Overlay _overlay; + private SCAN_UI_Settings _settings; + /* App launcher object */ internal SCANappLauncher appLauncher; @@ -217,18 +173,6 @@ public static SCANcontroller controller #region Public Accessors - public void addToDrawQueue(int id, Callback c) - { - if (!drawQueue.Contains(id)) - drawQueue.Add(id, c); - } - - public void removeFromDrawQueue(int id) - { - if (drawQueue.Contains(id)) - drawQueue.Remove(id); - } - public SCANdata getData(string bodyName) { if (body_data.Contains(bodyName)) @@ -260,8 +204,8 @@ public int GetDataCount /* Use this method to protect against duplicate dictionary keys */ public void addToBodyData (CelestialBody b, SCANdata data) { - if (!body_data.Contains(b.name)) - body_data.Add(b.name, data); + if (!body_data.Contains(b.bodyName)) + body_data.Add(b.bodyName, data); else Debug.LogError("[SCANsat] Warning: SCANdata Dictionary Already Contains Key of This Type"); } @@ -305,7 +249,7 @@ public static void checkLoadedTerrainNodes() if (b == null) continue; - if (getTerrainNode(b.name) == null) + if (getTerrainNode(b.bodyName) == null) { float? clamp = null; if (b.ocean) @@ -319,13 +263,13 @@ public static void checkLoadedTerrainNodes() } catch (Exception e) { - SCANUtil.SCANlog("Error in calculating Max Height for {0}; using default value/n{1}", b.theName, e); + SCANUtil.SCANlog("Error in calculating Max Height for {0}; using default value/n{1}", b.bodyName, e); newMax = SCANconfigLoader.SCANNode.DefaultMaxHeightRange; } SCANUtil.SCANlog("Generating new SCANsat Terrain Config for [{0}] - Max Height: [{1:F0}m]", b.bodyName, newMax); - addToTerrainConfigData(b.name, new SCANterrainConfig(SCANconfigLoader.SCANNode.DefaultMinHeightRange, newMax, clamp, SCANUtil.paletteLoader(SCANconfigLoader.SCANNode.DefaultPalette, 7), 7, false, false, b)); + addToTerrainConfigData(b.bodyName, new SCANterrainConfig(SCANconfigLoader.SCANNode.DefaultMinHeightRange, newMax, clamp, SCANUtil.paletteLoader(SCANconfigLoader.SCANNode.DefaultPalette, 7), 7, false, false, b)); } } } @@ -410,11 +354,11 @@ public static void setMasterResourceNodes (List resourceConf } } - public static SCANresourceGlobal getResourceNode (string resourceName) + public static SCANresourceGlobal getResourceNode (string resourceName, bool warn = false) { if (masterResourceNodes.Contains(resourceName)) return masterResourceNodes[resourceName]; - else + else if (warn) SCANUtil.SCANlog("SCANsat resource [{0}] cannot be found in master resource storage list", resourceName); return null; @@ -435,7 +379,7 @@ public static SCANresourceGlobal GetFirstResource public static void updateSCANresource (SCANresourceGlobal r, bool all) { - SCANresourceGlobal update = getResourceNode(r.Name); + SCANresourceGlobal update = getResourceNode(r.Name, true); if (update != null) { update.MinColor = r.MinColor; @@ -536,6 +480,11 @@ public static List setLoadedResourceList() return rList; } + public static List resources() + { + return masterResourceNodes.Values.ToList(); + } + public List Known_Vessels { get { return knownVessels.Values.ToList(); } @@ -567,61 +516,22 @@ public bool MechJebLoaded set { mechjebLoaded = value; } } - public bool TargetSelecting - { - get { return targetSelecting; } - internal set { targetSelecting = value; } - } - - public bool TargetSelectingActive - { - get { return targetSelectingActive; } - internal set - { - if (targetSelecting) - targetSelectingActive = value; - else - targetSelectingActive = false; - } - } - - public Vector2d LandingTargetCoords - { - get { return landingTargetCoords; } - internal set { landingTargetCoords = value; } - } - - public CelestialBody LandingTargetBody - { - get { return landingTargetBody; } - set { landingTargetBody = value; } - } - public SCANwaypoint LandingTarget { get { return landingTarget; } set { landingTarget = value; } } + + public class OnMJTargetSet : UnityEvent { } + + public OnMJTargetSet MJTargetSet = new OnMJTargetSet(); + #endregion #region save/load public override void OnLoad(ConfigNode node) { - lowBiomeColor = node.parse("lowBiomeColor", lowBiomeColor); - highBiomeColor = node.parse("highBiomeColor", highBiomeColor); - lowSlopeColorOne = node.parse("lowSlopeColorOne", lowSlopeColorOne); - highSlopeColorOne = node.parse("highSlopeColorOne", highSlopeColorOne); - lowSlopeColorTwo = node.parse("lowSlopeColorTwo", lowSlopeColorTwo); - highSlopeColorTwo = node.parse("highSlopeColorTwo", highSlopeColorTwo); - - lowBiomeColor32 = lowBiomeColor; - highBiomeColor32 = highBiomeColor; - lowSlopeColorOne32 = lowSlopeColorOne; - highSlopeColorOne32 = highSlopeColorOne; - lowSlopeColorTwo32 = lowSlopeColorTwo; - highSlopeColorTwo32 = highSlopeColorTwo; - ConfigNode node_vessels = node.GetNode("Scanners"); if (node_vessels != null) { @@ -669,7 +579,7 @@ public override void OnLoad(ConfigNode node) CelestialBody body; try { - body = FlightGlobals.Bodies.FirstOrDefault(b => b.name == body_name); + body = FlightGlobals.Bodies.FirstOrDefault(b => b.bodyName == body_name); } catch (Exception e) { @@ -679,7 +589,7 @@ public override void OnLoad(ConfigNode node) if (body != null) { - SCANdata data = getData(body.name); + SCANdata data = getData(body.bodyName); if (data == null) data = new SCANdata(body); if (!body_data.Contains(body_name)) @@ -697,14 +607,7 @@ public override void OnLoad(ConfigNode node) continue; } - if (dataRebuild) - { //On the first load deserialize the "Map" value to both coverage arrays - data.integerDeserialize(mapdata, true); - } - else - { - data.integerDeserialize(mapdata, false); - } + data.integerDeserialize(mapdata); } catch (Exception e) { @@ -715,11 +618,13 @@ public override void OnLoad(ConfigNode node) try { - SCANwaypoint target = null; - string targetName = node_body.parse("LandingTarget", ""); + if (SCANmainMenuLoader.MechJebLoaded && SCAN_Settings_Config.Instance.MechJebTarget && SCAN_Settings_Config.Instance.MechJebTargetLoad) + { + string targetName = node_body.parse("LandingTarget", ""); - if (!string.IsNullOrEmpty(targetName)) - target = loadWaypoint(targetName); + if (!string.IsNullOrEmpty(targetName)) + loadWaypoint(targetName, body); + } data.Disabled = node_body.parse("Disabled", false); @@ -744,7 +649,7 @@ public override void OnLoad(ConfigNode node) pSize = 7; } - SCANterrainConfig dataTerrainConfig = getTerrainNode(body.name); + SCANterrainConfig dataTerrainConfig = getTerrainNode(body.bodyName); if (dataTerrainConfig == null) dataTerrainConfig = new SCANterrainConfig(min, max, clampState, dataPalette, pSize, pRev, pDis, body); @@ -752,9 +657,6 @@ public override void OnLoad(ConfigNode node) setNewTerrainConfigValues(dataTerrainConfig, min, max, clampState, dataPalette, pSize, pRev, pDis); data.TerrainConfig = dataTerrainConfig; - - if (target != null) - data.addToWaypoints(target); } catch (Exception e) { @@ -763,18 +665,7 @@ public override void OnLoad(ConfigNode node) } } } - dataRebuild = false; //Used for the one-time update to the new integer array - if (SCANconfigLoader.GlobalResource) - { - if (masterResourceNodes.Count > 0) - { - if (string.IsNullOrEmpty(resourceSelection)) - resourceSelection = masterResourceNodes.Keys.First(); - else if (!masterResourceNodes.Contains(resourceSelection)) - resourceSelection = masterResourceNodes.Keys.First(); - } - } ConfigNode node_resources = node.GetNode("SCANResources"); if (node_resources != null) { @@ -791,13 +682,6 @@ public override void OnLoad(ConfigNode node) public override void OnSave(ConfigNode node) { - node.AddValue("lowBiomeColor", ConfigNode.WriteColor(lowBiomeColor)); - node.AddValue("highBiomeColor", ConfigNode.WriteColor(highBiomeColor)); - node.AddValue("lowSlopeColorOne", ConfigNode.WriteColor(lowSlopeColorOne)); - node.AddValue("highSlopeColorOne", ConfigNode.WriteColor(highSlopeColorOne)); - node.AddValue("lowSlopeColorTwo", ConfigNode.WriteColor(lowSlopeColorTwo)); - node.AddValue("highSlopeColorTwo", ConfigNode.WriteColor(highSlopeColorTwo)); - int l = knownVessels.Count; ConfigNode node_vessels = new ConfigNode("Scanners"); @@ -830,9 +714,12 @@ public override void OnSave(ConfigNode node) SCANdata body_scan = body_data[body_name]; node_body.AddValue("Name", body_name); node_body.AddValue("Disabled", body_scan.Disabled); - SCANwaypoint w = body_scan.Waypoints.FirstOrDefault(a => a.LandingTarget); - if (w != null) - node_body.AddValue("LandingTarget", string.Format("{0:N4},{1:N4}", w.Latitude, w.Longitude)); + if (SCANmainMenuLoader.MechJebLoaded && SCAN_Settings_Config.Instance.MechJebTarget && SCAN_Settings_Config.Instance.MechJebTargetLoad) + { + SCANwaypoint w = body_scan.Waypoints.FirstOrDefault(a => a.LandingTarget); + if (w != null) + node_body.AddValue("LandingTarget", string.Format("{0:N4},{1:N4}", w.Latitude, w.Longitude)); + } node_body.AddValue("MinHeightRange", body_scan.TerrainConfig.MinTerrain / body_scan.TerrainConfig.MinHeightMultiplier); node_body.AddValue("MaxHeightRange", body_scan.TerrainConfig.MaxTerrain / body_scan.TerrainConfig.MaxHeightMultiplier); if (body_scan.TerrainConfig.ClampTerrain != null) @@ -874,30 +761,15 @@ public override void OnAwake() { instance = this; - if (SCANconfigLoader.SCANNode == null) + if (SCAN_Settings_Config.Instance == null) return; - biomeTransparency = SCANconfigLoader.SCANNode.BiomeTransparency; - biomeBorder = SCANconfigLoader.SCANNode.BiomeBorder; - useStockBiomes = SCANconfigLoader.SCANNode.StockBiomeMap; - - slopeCutoff = SCANconfigLoader.SCANNode.SlopeCutoff; - - windowScale = SCANconfigLoader.SCANNode.WindowScale; - - lowBiomeColor = SCANconfigLoader.SCANNode.LowBiomeColor; - highBiomeColor = SCANconfigLoader.SCANNode.HighBiomeColor; - lowSlopeColorOne = SCANconfigLoader.SCANNode.BottomLowSlopeColor; - highSlopeColorOne = SCANconfigLoader.SCANNode.BottomHighSlopeColor; - lowSlopeColorTwo = SCANconfigLoader.SCANNode.TopLowSlopeColor; - highSlopeColorTwo = SCANconfigLoader.SCANNode.TopHighSlopeColor; - - lowBiomeColor32 = lowBiomeColor; - highBiomeColor32 = highBiomeColor; - lowSlopeColorOne32 = lowSlopeColorOne; - highSlopeColorOne32 = highSlopeColorOne; - lowSlopeColorTwo32 = lowSlopeColorTwo; - highSlopeColorTwo32 = highSlopeColorTwo; + lowBiomeColor32 = SCAN_Settings_Config.Instance.LowBiomeColor; + highBiomeColor32 = SCAN_Settings_Config.Instance.HighBiomeColor; + lowSlopeColorOne32 = SCAN_Settings_Config.Instance.BottomLowSlopeColor; + highSlopeColorOne32 = SCAN_Settings_Config.Instance.BottomHighSlopeColor; + lowSlopeColorTwo32 = SCAN_Settings_Config.Instance.TopLowSlopeColor; + highSlopeColorTwo32 = SCAN_Settings_Config.Instance.TopHighSlopeColor; } private void Start() @@ -909,67 +781,58 @@ private void Start() finishRegistration(id); } - GameEvents.onShowUI.Add(UIShow); - GameEvents.onHideUI.Add(UIHide); - GameEvents.onGUIMissionControlSpawn.Add(UIOff); - GameEvents.onGUIMissionControlDespawn.Add(UIOn); - GameEvents.onGUIRnDComplexSpawn.Add(UIOff); - GameEvents.onGUIRnDComplexDespawn.Add(UIOn); - GameEvents.onGUIAdministrationFacilitySpawn.Add(UIOff); - GameEvents.onGUIAdministrationFacilityDespawn.Add(UIOn); - GameEvents.onGUIAstronautComplexSpawn.Add(UIOff); - GameEvents.onGUIAstronautComplexDespawn.Add(UIOn); - + GameEvents.OnScienceRecieved.Add(watcher); GameEvents.OnOrbitalSurveyCompleted.Add(onSurvey); GameEvents.onVesselSOIChanged.Add(SOIChange); GameEvents.onVesselCreate.Add(newVesselCheck); GameEvents.onPartCouple.Add(dockingEventCheck); GameEvents.Contract.onContractsLoaded.Add(contractsCheck); GameEvents.Contract.onParameterChange.Add(onParamChange); + if (HighLogic.LoadedSceneIsFlight) { - if (!body_data.Contains(FlightGlobals.currentMainBody.name)) - body_data.Add(FlightGlobals.currentMainBody.name, new SCANdata(FlightGlobals.currentMainBody)); + if (!body_data.Contains(FlightGlobals.currentMainBody.bodyName)) + body_data.Add(FlightGlobals.currentMainBody.bodyName, new SCANdata(FlightGlobals.currentMainBody)); try { - mainMap = gameObject.AddComponent(); - settingsWindow = gameObject.AddComponent(); - instrumentsWindow = gameObject.AddComponent(); - colorManager = gameObject.AddComponent(); - BigMap = gameObject.AddComponent(); - resourceOverlay = gameObject.AddComponent(); - resourceSettings = gameObject.AddComponent(); - zoomMap = gameObject.AddComponent(); + _mainMap = new SCAN_UI_MainMap(); + _bigMap = new SCAN_UI_BigMap(); + _zoomMap = new SCAN_UI_ZoomMap(); + _instruments = new SCAN_UI_Instruments(); + _overlay = new SCAN_UI_Overlay(); + _settings = new SCAN_UI_Settings(); } catch (Exception e) { - SCANUtil.SCANlog("Something Went Wrong Initializing UI Objects: {0}", e); + SCANUtil.SCANlog("Something Went Wrong Initializing UI Objects:\n{0}", e); } + + StartCoroutine(WaitForScienceUpdate()); } else if (HighLogic.LoadedSceneHasPlanetarium) { - if (!body_data.Contains(Planetarium.fetch.Home.name)) - body_data.Add(Planetarium.fetch.Home.name, new SCANdata(Planetarium.fetch.Home)); + if (!body_data.Contains(Planetarium.fetch.Home.bodyName)) + body_data.Add(Planetarium.fetch.Home.bodyName, new SCANdata(Planetarium.fetch.Home)); try { - kscMap = gameObject.AddComponent(); - settingsWindow = gameObject.AddComponent(); - colorManager = gameObject.AddComponent(); - resourceSettings = gameObject.AddComponent(); + _bigMap = new SCAN_UI_BigMap(); + _settings = new SCAN_UI_Settings(); + _zoomMap = new SCAN_UI_ZoomMap(); + if (HighLogic.LoadedScene == GameScenes.TRACKSTATION) { - resourceOverlay = gameObject.AddComponent(); + _overlay = new SCAN_UI_Overlay(); } } catch (Exception e) { - SCANUtil.SCANlog("Something Went Wrong Initializing UI Objects: {0}", e); + SCANUtil.SCANlog("Something Went Wrong Initializing UI Objects:\n{0}", e); } } - if (useStockAppLauncher) + if (SCAN_Settings_Config.Instance.StockToolbar) appLauncher = gameObject.AddComponent(); - if (disableStockResource && useScanThreshold) + if (SCAN_Settings_Config.Instance.DisableStockResource && SCAN_Settings_Config.Instance.UseStockTreshold) { for (int i = FlightGlobals.Bodies.Count - 1; i >= 0; i--) { @@ -978,7 +841,7 @@ private void Start() checkResourceScanStatus(b); } } - else if (!disableStockResource && easyModeScanning) + else if (!SCAN_Settings_Config.Instance.DisableStockResource && SCAN_Settings_Config.Instance.InstantScan) { for (int i = FlightGlobals.Bodies.Count - 1; i >= 0; i--) { @@ -991,16 +854,24 @@ private void Start() private void Update() { - if (scan_background && loaded) + if (SCAN_Settings_Config.Instance.BackgroundScanning && loaded) scanFromAllVessels(); if (!heightMapsBuilt) checkHeightMapStatus(); } + private IEnumerator WaitForScienceUpdate() + { + while (!FlightGlobals.ready || FlightGlobals.ActiveVessel == null) + yield return null; + + SCANUtil.UpdateAllVesselData(FlightGlobals.ActiveVessel); + } + public void checkStockResourceScanStatus(CelestialBody body) { - if (disableStockResource || !easyModeScanning) + if (SCAN_Settings_Config.Instance.DisableStockResource || !SCAN_Settings_Config.Instance.InstantScan) return; if (body == null) @@ -1012,7 +883,7 @@ public void checkStockResourceScanStatus(CelestialBody body) if (SCANUtil.GetCoverage((int)SCANtype.AllResources, body) >= 100) return; - SCANdata data = getData(body.name); + SCANdata data = getData(body.bodyName); if (data == null) return; @@ -1022,7 +893,7 @@ public void checkStockResourceScanStatus(CelestialBody body) public void checkResourceScanStatus(CelestialBody body) { - if (!useScanThreshold) + if (!SCAN_Settings_Config.Instance.UseStockTreshold) return; if (body == null) @@ -1031,14 +902,14 @@ public void checkResourceScanStatus(CelestialBody body) if (ResourceMap.Instance.IsPlanetScanned(body.flightGlobalsIndex)) return; - SCANdata data = getData(body.name); + SCANdata data = getData(body.bodyName); if (data == null) return; - if (SCANUtil.getCoveragePercentage(data, SCANtype.FuzzyResources) > (scanThreshold * 100)) + if (SCANUtil.getCoveragePercentage(data, SCANtype.FuzzyResources) > (SCAN_Settings_Config.Instance.StockTreshold * 100)) { - SCANUtil.SCANlog("SCANsat resource scanning for {0} meets threshold value [{1:P0}]\nConducting stock orbital resource scan...", body.theName, scanThreshold); + SCANUtil.SCANlog("SCANsat resource scanning for {0} meets threshold value [{1:P0}]\nConducting stock orbital resource scan...", body.bodyName, SCAN_Settings_Config.Instance.StockTreshold); ResourceMap.Instance.UnlockPlanet(body.flightGlobalsIndex); } } @@ -1100,41 +971,50 @@ private void checkHeightMapStatus() private void OnDestroy() { - GameEvents.onShowUI.Remove(UIShow); - GameEvents.onHideUI.Remove(UIHide); - GameEvents.onGUIMissionControlSpawn.Remove(UIOff); - GameEvents.onGUIMissionControlDespawn.Remove(UIOn); - GameEvents.onGUIRnDComplexSpawn.Remove(UIOff); - GameEvents.onGUIRnDComplexDespawn.Remove(UIOn); - GameEvents.onGUIAdministrationFacilitySpawn.Remove(UIOff); - GameEvents.onGUIAdministrationFacilityDespawn.Remove(UIOn); - GameEvents.onGUIAstronautComplexSpawn.Remove(UIOff); - GameEvents.onGUIAstronautComplexDespawn.Remove(UIOn); - + GameEvents.OnScienceRecieved.Remove(watcher); GameEvents.OnOrbitalSurveyCompleted.Remove(onSurvey); GameEvents.onVesselSOIChanged.Remove(SOIChange); GameEvents.onVesselCreate.Remove(newVesselCheck); GameEvents.onPartCouple.Remove(dockingEventCheck); GameEvents.Contract.onContractsLoaded.Remove(contractsCheck); GameEvents.Contract.onParameterChange.Remove(onParamChange); - if (mainMap != null) - Destroy(mainMap); - if (settingsWindow != null) - Destroy(settingsWindow); - if (instrumentsWindow != null) - Destroy(instrumentsWindow); - if (kscMap != null) - Destroy(kscMap); - if (BigMap != null) - Destroy(BigMap); - if (resourceOverlay != null) - Destroy(resourceOverlay); - if (resourceSettings != null) - Destroy(resourceSettings); + if (appLauncher != null) Destroy(appLauncher); - //if (hiDefMap != null) - // Destroy(hiDefMap); + + if (_mainMap != null) + { + _mainMap.OnDestroy(); + _mainMap = null; + } + if (_bigMap != null) + { + _bigMap.OnDestroy(); + _bigMap = null; + } + if (_instruments != null) + { + _instruments.OnDestroy(); + _instruments = null; + } + if (_overlay != null) + { + _overlay.OnDestroy(); + _overlay = null; + } + if (_settings != null) + { + _settings.OnDestroy(); + _settings = null; + } + if (_zoomMap != null) + { + _zoomMap.OnDestroy(); + _settings = null; + } + + if (SCAN_Settings_Config.Instance != null) + SCAN_Settings_Config.Instance.Save(); if (!heightMapsBuilt) { @@ -1147,31 +1027,26 @@ private void OnDestroy() } } - private void UIOn() + private void watcher(float sci, ScienceSubject sub, ProtoVessel v, bool b) { - showUI = true; - } + if (!HighLogic.LoadedSceneIsFlight) + return; - private void UIOff() - { - showUI = false; - } + if (FlightGlobals.ActiveVessel == null) + return; - private void UIShow() - { - if (HighLogic.LoadedSceneIsFlight) - showUI = true; - } + if (sub == null) + return; - private void UIHide() - { - if (HighLogic.LoadedSceneIsFlight) - showUI = false; + if (!sub.id.StartsWith("SCAN")) + return; + + SCANUtil.UpdateVesselData(FlightGlobals.ActiveVessel, sub); } private void onSurvey(Vessel v, CelestialBody b) { - if (!easyModeScanning || disableStockResource) + if (!SCAN_Settings_Config.Instance.InstantScan || SCAN_Settings_Config.Instance.DisableStockResource) return; if (b == null) @@ -1207,17 +1082,17 @@ internal void loadPQS(CelestialBody b, mapSource s = mapSource.Data) dataBodies.Add(b); - if (bigMapBody != null && bigMapBody == b) + if (bigMapBodyPQS != null && bigMapBodyPQS == b) return; if (zoomMapBody != null && zoomMapBody == b) return; break; case mapSource.BigMap: - if (bigMapBody != null && bigMapBody == b) + if (bigMapBodyPQS != null && bigMapBodyPQS == b) return; - bigMapBody = b; + bigMapBodyPQS = b; if (zoomMapBody != null && zoomMapBody == b) return; @@ -1232,7 +1107,7 @@ internal void loadPQS(CelestialBody b, mapSource s = mapSource.Data) zoomMapBody = b; - if (bigMapBody != null && bigMapBody == b) + if (bigMapBodyPQS != null && bigMapBodyPQS == b) return; if (dataBodies.Contains(b)) @@ -1251,7 +1126,7 @@ internal void loadPQS(CelestialBody b, mapSource s = mapSource.Data) KopernicusOnDemand = null; - SCANUtil.SCANlog("Loading Kopernicus On Demand PQSMod For {0}", b.theName); + SCANUtil.SCANlog("Loading Kopernicus On Demand PQSMod For {0}", b.bodyName); } internal void unloadPQS(CelestialBody b, mapSource s = mapSource.Data) @@ -1268,14 +1143,14 @@ internal void unloadPQS(CelestialBody b, mapSource s = mapSource.Data) if (dataBodies.Contains(b)) dataBodies.RemoveAll(a => a == b); - if (bigMapBody != null && bigMapBody == b) + if (bigMapBodyPQS != null && bigMapBodyPQS == b) return; if (zoomMapBody != null && zoomMapBody == b) return; break; case mapSource.BigMap: - bigMapBody = null; + bigMapBodyPQS = null; if (zoomMapBody != null && zoomMapBody == b) return; @@ -1287,7 +1162,7 @@ internal void unloadPQS(CelestialBody b, mapSource s = mapSource.Data) case mapSource.ZoomMap: zoomMapBody = null; - if (bigMapBody != null && bigMapBody == b) + if (bigMapBodyPQS != null && bigMapBodyPQS == b) return; if (dataBodies.Contains(b)) @@ -1326,24 +1201,11 @@ internal void unloadPQS(CelestialBody b, mapSource s = mapSource.Data) KopernicusOnDemand = null; - SCANUtil.SCANlog("Unloading Kopernicus On Demand PQSMod For {0}", b.theName); + SCANUtil.SCANlog("Unloading Kopernicus On Demand PQSMod For {0}", b.bodyName); } private void OnGUI() { - if (showUI) - { - Matrix4x4 previousGuiMatrix = GUI.matrix; - GUI.matrix = Matrix4x4.TRS(Vector3.zero, Quaternion.identity, new Vector3(windowScale, windowScale, 1)); - - for (int i = 0; i < drawQueue.Count; i++) - { - drawQueue.At(i)(); - } - - GUI.matrix = previousGuiMatrix; - } - if (HighLogic.LoadedSceneIsFlight || HighLogic.LoadedScene == GameScenes.TRACKSTATION) drawTarget(); } @@ -1358,27 +1220,20 @@ private void drawTarget() if (b == null) return; - SCANdata d = getData(b.name); + SCANdata d = getData(b.bodyName); if (d == null) return; - if (groundTracks && HighLogic.LoadedSceneIsFlight && !d.Disabled && scan_background) + if (SCAN_Settings_Config.Instance.ShowGroundTracks && HighLogic.LoadedSceneIsFlight && !d.Disabled && SCAN_Settings_Config.Instance.BackgroundScanning) drawGroundTracks(b); - if (!mechJebTargetSelection) - { - SCANwaypoint target = d.Waypoints.FirstOrDefault(a => a.LandingTarget); - if (target != null) - { - SCANuiUtil.drawTargetOverlay(b, target.Latitude, target.Longitude, XKCDColors.DarkGreen); - } - } + return; } private void drawGroundTracks(CelestialBody body) { - if (groundTrackActiveOnly) + if (SCAN_Settings_Config.Instance.GroundTracksActiveOnly) { Vessel v = FlightGlobals.ActiveVessel; @@ -1444,7 +1299,7 @@ private void drawGroundTracks(CelestialBody body) private double getFOV(SCANvessel v, CelestialBody b, out Color c) { - c = XKCDColors.DarkGreen; + c = palette.xkcd_DarkGreenAlpha; double maxFOV = 0; double alt = v.vessel.altitude; double soi_radius = b.sphereOfInfluence - b.Radius; @@ -1493,7 +1348,7 @@ private void addVessel(Vessel v) { foreach (SCANsat.SCAN_PartModules.SCANsat s in v.FindPartModulesImplementing()) { - if (s.scanningNow()) + if (s.scanningNow) registerSensor(v.id, (SCANtype)s.sensorType, s.fov, s.min_alt, s.max_alt, s.best_alt); } } @@ -1580,18 +1435,21 @@ private void onParamChange(Contract c, ContractParameter p) CelestialBody b = s.targetBody; - SCANdata data = getData(b.name); + SCANdata data = getData(b.bodyName); if (data == null) return; data.addSurveyWaypoints(b, s); + + if (_bigMap.IsVisible && _bigMap.WaypointToggle) + _bigMap.RefreshIcons(); } private void SOIChange(GameEvents.HostedFromToAction VC) { - if (!body_data.Contains(VC.to.name)) - body_data.Add(VC.to.name, new SCANdata(VC.to)); + if (!body_data.Contains(VC.to.bodyName)) + body_data.Add(VC.to.bodyName, new SCANdata(VC.to)); } private void setNewTerrainConfigValues(SCANterrainConfig terrain, float min, float max, float? clamp, Palette c, int size, bool reverse, bool discrete) @@ -1673,7 +1531,7 @@ private void loadCustomResourceValues(ConfigNode node) if (b != null) { - SCANresourceBody res = r.getBodyConfig(b.name); + SCANresourceBody res = r.getBodyConfig(b.bodyName, false); if (res != null) { if (!float.TryParse(sB[1], out min)) @@ -1683,8 +1541,8 @@ private void loadCustomResourceValues(ConfigNode node) res.MinValue = min; res.MaxValue = max; } - else - SCANUtil.SCANlog("No resources found assigned for Celestial Body: {0}, skipping...", b.name); + //else + //SCANUtil.SCANlog("No resources found assigned for Celestial Body: {0}, skipping...", b.bodyName); } else SCANUtil.SCANlog("No Celestial Body found matching this saved resource value: {0}, skipping...", j); @@ -1697,22 +1555,48 @@ private void loadCustomResourceValues(ConfigNode node) } } - private SCANwaypoint loadWaypoint(string s) + private void loadWaypoint(string s, CelestialBody b) { + if (!HighLogic.LoadedSceneIsFlight) + return; + + StartCoroutine(WaitForWaypoint(s, b)); + } + + private IEnumerator WaitForWaypoint(string s, CelestialBody b) + { + while (!FlightGlobals.ready || FlightGlobals.ActiveVessel == null) + yield return null; + + int timer = 0; + + while (timer < 5) + { + timer++; + yield return null; + } + + if (!mechjebLoaded || b != FlightGlobals.currentMainBody) + yield break; + SCANwaypoint w = null; string[] a = s.Split(','); double lat = 0; double lon = 0; + if (!double.TryParse(a[0], out lat)) - return w; + yield break; if (!double.TryParse(a[1], out lon)) - return w; + yield break; + + w = new SCANwaypoint(lat, lon, "MechJeb Landing Target"); - string name = mechJebTargetSelection ? "MechJeb Landing Target" : "Landing Target Site"; + MJTargetSet.Invoke(new Vector2d(lon, lat), b); - w = new SCANwaypoint(lat, lon, name); + SCANdata d = getData(b.bodyName); - return w; + if (d != null) + d.addToWaypoints(w); } public class SCANsensor @@ -2133,7 +2017,22 @@ private void doScanPass(SCANvessel vessel, double UT, double startUT, double las int f = (int)Math.Truncate(fov); int f1 = f + (int)Math.Round(fov - f); - for (int x = -f; x <= f1; ++x) + int w = f; + double fovW = fov; + + if (Math.Abs(lat) < 90) + { + fovW = fov * (1 / Math.Cos(Mathf.Deg2Rad * lat)); + + if (fovW > 120) + fovW = 120; + + w = (int)Math.Truncate(fovW); + } + + int w1 = w + (int)Math.Round(fovW - w); + + for (int x = -w; x <= w1; ++x) { for (int y = -f; y <= f1; ++y) { @@ -2169,7 +2068,7 @@ private void doScanPass(SCANvessel vessel, double UT, double startUT, double las return; if (v.LandedOrSplashed) return; - if (res >= timeWarpResolution) + if (res >= SCAN_Settings_Config.Instance.TimeWarpResolution) goto dequeue; if (startUT > UT) diff --git a/SCANsat/SCANmainMenuLoader.cs b/SCANsat/SCANmainMenuLoader.cs index fa8ccbdc5..fbd3ec63b 100644 --- a/SCANsat/SCANmainMenuLoader.cs +++ b/SCANsat/SCANmainMenuLoader.cs @@ -50,6 +50,7 @@ private void Start() Destroy(gameObject); return; } + loaded = true; if (orbitIconsMap == null) @@ -99,7 +100,7 @@ private void debugWriter() { foreach (AssemblyLog log in assemblyList) { - print(string.Format("[SCANlogger] Assembly: {0} found; Version: {1}; File Version: {2}; Info Version: {3}; Location: {4}", log.name, log.version, log.fileVersion, log.infoVersion, log.location)); + print(string.Format("[SCANsat] Assembly: {0} found; Version: {1}; File Version: {2}; Info Version: {3}; Location: {4}", log.name, log.version, log.fileVersion, log.infoVersion, log.location)); } } diff --git a/SCANsat/SCANquickload.cs b/SCANsat/SCANquickload.cs index 876ad6552..e0ce1c188 100644 --- a/SCANsat/SCANquickload.cs +++ b/SCANsat/SCANquickload.cs @@ -27,7 +27,7 @@ public class Debug_AutoLoadPersistentSaveOnStartup : MonoBehaviour { public static int vId = 0; public void Start () { - + return; if (first) { first = false; HighLogic.SaveFolder = "Testing_Off"; diff --git a/SCANsat/SCANsat.csproj b/SCANsat/SCANsat.csproj index d74a83127..1145d420b 100644 --- a/SCANsat/SCANsat.csproj +++ b/SCANsat/SCANsat.csproj @@ -50,6 +50,7 @@ + @@ -61,24 +62,18 @@ - + - Code - - - - - - + @@ -86,41 +81,33 @@ - - - - + - - - - - - - - - - - - - - - + + + + + + + + + + @@ -137,11 +124,6 @@ ..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Kerbal Space Program\KSP_x64_Data\Managed\Assembly-CSharp.dll False - - False - ..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Kerbal Space Program\KSP_x64_Data\Managed\Assembly-CSharp-firstpass.dll - False - ..\..\..\KSP_Data\Managed\System.dll @@ -157,5 +139,10 @@ False - + + + {4ed5e40d-273a-4643-9009-04c1dd02f3e2} + SCANsat.Unity + + \ No newline at end of file diff --git a/SCANsat/SCANutil.cs b/SCANsat/SCANutil.cs index 212434b68..3c61ad3cd 100644 --- a/SCANsat/SCANutil.cs +++ b/SCANsat/SCANutil.cs @@ -18,6 +18,7 @@ using System.Collections.Generic; using UnityEngine; using System.Linq; +using KSP.Localization; using SCANsat.SCAN_PartModules; using SCANsat.SCAN_Platform; using SCANsat.SCAN_Platform.Palettes; @@ -49,7 +50,7 @@ public static bool isCovered(double lon, double lat, CelestialBody body, int SCA int ilat = icLAT(lat); if (badLonLat (ilon, ilat)) return false; - SCANdata data = getData(body.name); + SCANdata data = getData(body.bodyName); if (data == null) return false; @@ -69,7 +70,7 @@ public static bool isCovered(int lon, int lat, CelestialBody body, int SCANtype) { if (badLonLat(lon, lat)) return false; - SCANdata data = getData(body.name); + SCANdata data = getData(body.bodyName); if (data == null) return false; @@ -85,7 +86,7 @@ public static bool isCovered(int lon, int lat, CelestialBody body, int SCANtype) /// Scanning percentage as a double from 0-100 public static double GetCoverage(int SCANtype, CelestialBody Body) { - SCANdata data = getData(Body.name); + SCANdata data = getData(Body.bodyName); if (data == null) return 0; @@ -118,13 +119,13 @@ public static int GetSCANtype(string SCANname) /// SCANdata instance for the given Celestial Body; null if none exists public static SCANdata getData(CelestialBody body) { - return getData(body.name); + return getData(body.bodyName); } /// /// For a given Celestial Body name this returns the SCANdata instance if it exists in the SCANcontroller master dictionary; return is null if the SCANdata does not exist for that body (ie it has never been visited while SCANsat has been active), or if the SCANcontroller Scenario Module has not been loaded. /// - /// Name of celestial body (do not use TheName string) + /// Name of celestial body (do not use displayName string) /// SCANdata instance for the given Celestial Body; null if none exists public static SCANdata getData(string BodyName) { @@ -140,10 +141,10 @@ public static SCANdata getData(string BodyName) /// Returns true if instant scan is enabled public static bool instantResourceScanEnabled() { - if (SCANcontroller.controller == null) + if (SCAN_Settings_Config.Instance == null) return true; - return SCANcontroller.controller.easyModeScanning; + return SCAN_Settings_Config.Instance.InstantScan; } /// @@ -152,10 +153,10 @@ public static bool instantResourceScanEnabled() /// Returns true if stock resource scanning is available public static bool stockResourceScanEnabled() { - if (SCANcontroller.controller == null) + if (SCAN_Settings_Config.Instance == null) return false; - return !SCANcontroller.controller.disableStockResource; + return !SCAN_Settings_Config.Instance.DisableStockResource; } /// @@ -164,10 +165,10 @@ public static bool stockResourceScanEnabled() /// Returns true if the biome lock is enabled public static bool resourceBiomeLockEnabled() { - if (SCANcontroller.controller == null) + if (SCAN_Settings_Config.Instance == null) return true; - return SCANcontroller.controller.resourceBiomeLock; + return SCAN_Settings_Config.Instance.BiomeLock; } /// @@ -176,10 +177,10 @@ public static bool resourceBiomeLockEnabled() /// Returns true if a narrow-band scanner is required public static bool narrowBandResourceRestrictionEnabled() { - if (SCANcontroller.controller == null) + if (SCAN_Settings_Config.Instance == null) return true; - return SCANcontroller.controller.needsNarrowBand; + return SCAN_Settings_Config.Instance.RequireNarrowBand; } /// @@ -496,6 +497,14 @@ internal static string getBiomeName(CelestialBody body, double lon , double lat) return a.name; } + internal static string getBiomeDisplayName(CelestialBody body, double lon , double lat) + { + CBAttributeMapSO.MapAttribute a = getBiome(body, lon, lat); + if (a == null) + return "unknown"; + return string.IsNullOrEmpty(a.displayname) ? a.name : Localizer.Format(a.displayname); + } + internal static int countBits(int i) { int count; @@ -503,6 +512,62 @@ internal static int countBits(int i) return count; } + internal static string bodyFromDisplayName(string display) + { + for (int i = FlightGlobals.Bodies.Count - 1; i >= 0; i--) + { + CelestialBody b = FlightGlobals.Bodies[i]; + + if (b.displayName.LocalizeBodyName() == display) + return b.bodyName; + } + + return display; + } + + internal static string displayNameFromBodyName(string body) + { + for (int i = FlightGlobals.Bodies.Count - 1; i >= 0; i--) + { + CelestialBody b = FlightGlobals.Bodies[i]; + + if (b.bodyName == body) + return b.displayName.LocalizeBodyName(); + } + + return body; + } + + internal static string resourceFromDisplayName(string display) + { + List resources = SCANcontroller.resources(); + + for (int i = resources.Count - 1; i >= 0; i--) + { + SCANresourceGlobal r = resources[i]; + + if (r.DisplayName == display) + return r.Name; + } + + return display; + } + + internal static string displayNameFromResource(string resource) + { + List resources = SCANcontroller.resources(); + + for (int i = resources.Count - 1; i >= 0; i--) + { + SCANresourceGlobal r = resources[i]; + + if (r.Name == resource) + return r.DisplayName; + } + + return resource; + } + internal static Palette paletteLoader(string name, int size) { if (name == "Default" || string.IsNullOrEmpty(name)) @@ -551,6 +616,87 @@ internal static CelestialBody getTargetBody(MapObject target) } } + internal static void UpdateAllVesselData(Vessel v) + { + List data = new List(); + + var science = v.FindPartModulesImplementing(); + + for (int i = science.Count - 1; i >= 0; i--) + { + IScienceDataContainer container = science[i]; + + data.AddRange(container.GetData()); + } + + if (data.Count <= 0) + return; + + List subjects = ResearchAndDevelopment.GetSubjects(); + + List SCANsubjects = new List(); + + for (int i = subjects.Count - 1; i >= 0; i--) + { + ScienceSubject sub = subjects[i]; + + if (sub.id.StartsWith("SCAN")) + SCANsubjects.Add(sub); + } + + for (int i = SCANsubjects.Count - 1; i >= 0; i--) + { + ScienceSubject sub = SCANsubjects[i]; + + float submittedData = (sub.science / sub.subjectValue) * sub.dataScale; + + for (int j = data.Count - 1; j >= 0; j--) + { + ScienceData d = data[j]; + + if (d.subjectID != sub.id) + continue; + + //SCANlog("Original Data: [{0}] - Amount: {1:N2} : New Subject: {2} - Adjusted Amount: {3:N0}" + //, d.title, d.dataAmount, sub.title, Math.Max(0.0000001f, d.dataAmount - submittedData)); + + d.dataAmount = Math.Max(0.0000001f, d.dataAmount - submittedData); + } + } + } + + internal static void UpdateVesselData(Vessel v, ScienceSubject sub) + { + List data = new List(); + + var science = v.FindPartModulesImplementing(); + + for (int i = science.Count - 1; i >= 0; i--) + { + IScienceDataContainer container = science[i]; + + data.AddRange(container.GetData()); + } + + if (data.Count <= 0) + return; + + float submittedData = (sub.science / sub.subjectValue) * sub.dataScale; + + for (int i = data.Count - 1; i >= 0; i--) + { + ScienceData d = data[i]; + + if (d.subjectID != sub.id) + continue; + + SCANlog("Original Data: [{0}] - Amount: {1:N2} : New Subject: {2} - Adjusted Amount: {3:N0}" + , d.title, d.dataAmount, sub.title, Math.Max(0.0000001f, d.dataAmount - submittedData)); + + d.dataAmount = Math.Max(0.0000001f, d.dataAmount - submittedData); + } + } + internal static double waypointDistance(double lat1, double lon1, double alt1, double lat2, double lon2, double alt2, CelestialBody body) { Vector3d pos1 = body.GetWorldSurfacePosition(lat1, lon1, alt1); @@ -558,6 +704,13 @@ internal static double waypointDistance(double lat1, double lon1, double alt1, d return (float)Vector3d.Distance(pos1, pos2); } + internal static double mapLabelDistance(double lat1, double lon1, double lat2, double lon2, CelestialBody body) + { + Vector3d pos1 = body.GetWorldSurfacePosition(lat1, lon1, 1000); + Vector3d pos2 = body.GetWorldSurfacePosition(lat2, lon2, 1000); + return (float)Vector3d.Distance(pos1, pos2); + } + internal static double slope(double centerElevation, CelestialBody body, double lon, double lat, double offset) { /* Slope is calculated using a nine point grid centered 5m around the vessel location @@ -633,44 +786,6 @@ internal static bool MouseIsOverWindow() Vector2 pos = new Vector2(Input.mousePosition.x, Screen.height - Input.mousePosition.y); - switch (HighLogic.LoadedScene) - { - case GameScenes.FLIGHT: - if (SCANcontroller.controller.mainMapVisible && SCANcontroller.controller.mainMap != null && SCANcontroller.controller.mainMap.GetWindowRect.Contains(pos)) - return true; - else if (SCANcontroller.controller.bigMapVisible && SCANcontroller.controller.BigMap != null && SCANcontroller.controller.BigMap.GetWindowRect.Contains(pos)) - return true; - else if (SCANcontroller.controller.zoomMap != null && SCANcontroller.controller.zoomMap.Visible && SCANcontroller.controller.zoomMap.GetWindowRect.Contains(pos)) - return true; - //else if (SCANcontroller.controller.hiDefMap != null && SCANcontroller.controller.hiDefMap.Visible && SCANcontroller.controller.hiDefMap.GetWindowRect.Contains(pos)) - // return true; - else if (SCANcontroller.controller.settingsWindow != null && SCANcontroller.controller.settingsWindow.Visible && SCANcontroller.controller.settingsWindow.GetWindowRect.Contains(pos)) - return true; - else if (SCANcontroller.controller.resourceSettings != null && SCANcontroller.controller.resourceSettings.Visible && SCANcontroller.controller.resourceSettings.GetWindowRect.Contains(pos)) - return true; - else if (SCANcontroller.controller.instrumentsWindow != null && SCANcontroller.controller.instrumentsWindow.Visible && SCANcontroller.controller.instrumentsWindow.GetWindowRect.Contains(pos)) - return true; - else if (SCANcontroller.controller.resourceOverlay != null && SCANcontroller.controller.resourceOverlay.Visible && SCANcontroller.controller.resourceOverlay.GetWindowRect.Contains(pos)) - return true; - else if (SCANcontroller.controller.colorManager != null && SCANcontroller.controller.colorManager.Visible && SCANcontroller.controller.colorManager.GetWindowRect.Contains(pos)) - return true; - break; - case GameScenes.TRACKSTATION: - if (SCANcontroller.controller.kscMapVisible && SCANcontroller.controller.kscMap != null && SCANcontroller.controller.kscMap.GetWindowRect.Contains(pos)) - return true; - else if (SCANcontroller.controller.kscMap != null && SCANcontroller.controller.kscMap.spotMap != null && SCANcontroller.controller.kscMap.spotMap.Visible && SCANcontroller.controller.kscMap.spotMap.GetWindowRect.Contains(pos)) - return true; - else if (SCANcontroller.controller.settingsWindow != null && SCANcontroller.controller.settingsWindow.Visible && SCANcontroller.controller.settingsWindow.GetWindowRect.Contains(pos)) - return true; - else if (SCANcontroller.controller.resourceSettings != null && SCANcontroller.controller.resourceSettings.Visible && SCANcontroller.controller.resourceSettings.GetWindowRect.Contains(pos)) - return true; - else if (SCANcontroller.controller.resourceOverlay != null && SCANcontroller.controller.resourceOverlay.Visible && SCANcontroller.controller.resourceOverlay.GetWindowRect.Contains(pos)) - return true; - else if (SCANcontroller.controller.colorManager != null && SCANcontroller.controller.colorManager.Visible && SCANcontroller.controller.colorManager.GetWindowRect.Contains(pos)) - return true; - break; - } - return false; } diff --git a/Unity/SCANsat/AssetBundles/AssetBundles b/Unity/SCANsat/AssetBundles/AssetBundles new file mode 100644 index 000000000..c6d3be52f Binary files /dev/null and b/Unity/SCANsat/AssetBundles/AssetBundles differ diff --git a/Unity/SCANsat/AssetBundles/AssetBundles.manifest b/Unity/SCANsat/AssetBundles/AssetBundles.manifest new file mode 100644 index 000000000..374c7d65d --- /dev/null +++ b/Unity/SCANsat/AssetBundles/AssetBundles.manifest @@ -0,0 +1,18 @@ +ManifestFileVersion: 0 +CRC: 2457020669 +AssetBundleManifest: + AssetBundleInfos: + Info_0: + Name: scan_shaders + Dependencies: {} + Info_1: + Name: scan_prefabs + Dependencies: + Dependency_0: scan_unity_skin + Dependency_1: scan_icons + Info_2: + Name: scan_unity_skin + Dependencies: {} + Info_3: + Name: scan_icons + Dependencies: {} diff --git a/Unity/SCANsat/AssetBundles/scan_ghost.ksp b/Unity/SCANsat/AssetBundles/scan_ghost.ksp new file mode 100644 index 000000000..b52533784 Binary files /dev/null and b/Unity/SCANsat/AssetBundles/scan_ghost.ksp differ diff --git a/Unity/SCANsat/AssetBundles/scan_icons.manifest b/Unity/SCANsat/AssetBundles/scan_icons.manifest new file mode 100644 index 000000000..cdf8fa91b --- /dev/null +++ b/Unity/SCANsat/AssetBundles/scan_icons.manifest @@ -0,0 +1,48 @@ +ManifestFileVersion: 0 +CRC: 1304829849 +Hashes: + AssetFileHash: + serializedVersion: 2 + Hash: 5a27b852468e71d1fbbf545bde1ffe27 + TypeTreeHash: + serializedVersion: 2 + Hash: 3a86b9bde1b930a56947f720531fa611 +HashAppended: 0 +ClassTypes: +- Class: 28 + Script: {instanceID: 0} +- Class: 49 + Script: {instanceID: 0} +- Class: 213 + Script: {instanceID: 0} +Assets: +- Assets/Images/MysteryIcon.png +- Assets/Images/AnomalyIcon.png +- Assets/Images/ManeuverMarker.png +- Assets/Images/ExitMarker.png +- Assets/Images/RoverIcon.png +- Assets/Images/EVAIcon.png +- Assets/Images/APMarker.png +- Assets/Images/SCANsat_AppLauncherSmall_Icon.png +- Assets/Images/PodIcon.png +- Assets/Images/PlaneIcon.png +- Assets/Images/DNMarker.png +- Assets/Images/AnomalyIconOutline.png +- Assets/Images/AsteroidIcon.png +- Assets/Images/DebrisIcon.png +- Assets/Images/EncounterMarker.png +- Assets/XML/scan_icons_bundle.xml +- Assets/Images/FlagIcon.png +- Assets/Images/PlanetIcon.png +- Assets/Images/SCAN_MechJebIcon.png +- Assets/Images/SCAN_WayPointIcon_Outline.png +- Assets/Images/ANMarker.png +- Assets/Images/KSP_Tooltip.png +- Assets/Images/RelayIcon.png +- Assets/Images/ProbeIcon.png +- Assets/Images/PEMarker.png +- Assets/Images/SCANsat_AppLauncherLarge_Icon.png +- Assets/Images/StationIcon.png +- Assets/Images/BaseIcon.png +- Assets/Images/LanderIcon.png +Dependencies: [] diff --git a/Unity/SCANsat/AssetBundles/scan_icons.scan b/Unity/SCANsat/AssetBundles/scan_icons.scan new file mode 100644 index 000000000..483f8e55b Binary files /dev/null and b/Unity/SCANsat/AssetBundles/scan_icons.scan differ diff --git a/Unity/SCANsat/AssetBundles/scan_images.ksp b/Unity/SCANsat/AssetBundles/scan_images.ksp new file mode 100644 index 000000000..afdc29ef9 Binary files /dev/null and b/Unity/SCANsat/AssetBundles/scan_images.ksp differ diff --git a/Unity/SCANsat/AssetBundles/scan_prefabs.manifest b/Unity/SCANsat/AssetBundles/scan_prefabs.manifest new file mode 100644 index 000000000..378e68128 --- /dev/null +++ b/Unity/SCANsat/AssetBundles/scan_prefabs.manifest @@ -0,0 +1,181 @@ +ManifestFileVersion: 0 +CRC: 3583271346 +Hashes: + AssetFileHash: + serializedVersion: 2 + Hash: 2a9f9f3bfb55f9ea23430f7263f023c0 + TypeTreeHash: + serializedVersion: 2 + Hash: 71741cdf219537d7a1c8b60c8a86fd4e +HashAppended: 0 +ClassTypes: +- Class: 1 + Script: {instanceID: 0} +- Class: 21 + Script: {instanceID: 0} +- Class: 28 + Script: {instanceID: 0} +- Class: 48 + Script: {instanceID: 0} +- Class: 49 + Script: {instanceID: 0} +- Class: 114 + Script: {fileID: -1254083943, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} +- Class: 114 + Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} +- Class: 114 + Script: {fileID: 1741964061, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} +- Class: 114 + Script: {fileID: -1862395651, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} +- Class: 114 + Script: {fileID: -2095666955, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} +- Class: 114 + Script: {fileID: -405508275, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} +- Class: 114 + Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} +- Class: 114 + Script: {fileID: 575553740, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} +- Class: 114 + Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} +- Class: 114 + Script: {fileID: -1200242548, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} +- Class: 114 + Script: {fileID: -98529514, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} +- Class: 114 + Script: {fileID: -146154839, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} +- Class: 114 + Script: {fileID: -2061169968, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} +- Class: 114 + Script: {fileID: 1367256648, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} +- Class: 114 + Script: {fileID: -113659843, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} +- Class: 114 + Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} +- Class: 114 + Script: {fileID: 2109663825, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} +- Class: 114 + Script: {fileID: -1184210157, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} +- Class: 114 + Script: {fileID: 1297475563, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} +- Class: 114 + Script: {fileID: -1744796338, guid: eb35edfa13e33ef47bd4ac62c244d6d5, type: 3} +- Class: 114 + Script: {fileID: -1301967863, guid: eb35edfa13e33ef47bd4ac62c244d6d5, type: 3} +- Class: 114 + Script: {fileID: 1621022871, guid: eb35edfa13e33ef47bd4ac62c244d6d5, type: 3} +- Class: 114 + Script: {fileID: 176419629, guid: eb35edfa13e33ef47bd4ac62c244d6d5, type: 3} +- Class: 114 + Script: {fileID: -1157388230, guid: eb35edfa13e33ef47bd4ac62c244d6d5, type: 3} +- Class: 114 + Script: {fileID: 314681444, guid: eb35edfa13e33ef47bd4ac62c244d6d5, type: 3} +- Class: 114 + Script: {fileID: -152513038, guid: eb35edfa13e33ef47bd4ac62c244d6d5, type: 3} +- Class: 114 + Script: {fileID: 342360022, guid: eb35edfa13e33ef47bd4ac62c244d6d5, type: 3} +- Class: 114 + Script: {fileID: -1299110901, guid: eb35edfa13e33ef47bd4ac62c244d6d5, type: 3} +- Class: 114 + Script: {fileID: -91837969, guid: eb35edfa13e33ef47bd4ac62c244d6d5, type: 3} +- Class: 114 + Script: {fileID: -1113957005, guid: eb35edfa13e33ef47bd4ac62c244d6d5, type: 3} +- Class: 114 + Script: {fileID: -2090660725, guid: eb35edfa13e33ef47bd4ac62c244d6d5, type: 3} +- Class: 114 + Script: {fileID: 1545030429, guid: eb35edfa13e33ef47bd4ac62c244d6d5, type: 3} +- Class: 114 + Script: {fileID: 172019213, guid: eb35edfa13e33ef47bd4ac62c244d6d5, type: 3} +- Class: 114 + Script: {fileID: 317401569, guid: eb35edfa13e33ef47bd4ac62c244d6d5, type: 3} +- Class: 114 + Script: {fileID: -578447015, guid: eb35edfa13e33ef47bd4ac62c244d6d5, type: 3} +- Class: 114 + Script: {fileID: 2111725480, guid: eb35edfa13e33ef47bd4ac62c244d6d5, type: 3} +- Class: 114 + Script: {fileID: -1147316381, guid: eb35edfa13e33ef47bd4ac62c244d6d5, type: 3} +- Class: 114 + Script: {fileID: -1680972771, guid: eb35edfa13e33ef47bd4ac62c244d6d5, type: 3} +- Class: 114 + Script: {fileID: -1457615824, guid: eb35edfa13e33ef47bd4ac62c244d6d5, type: 3} +- Class: 114 + Script: {fileID: 1937692464, guid: eb35edfa13e33ef47bd4ac62c244d6d5, type: 3} +- Class: 114 + Script: {fileID: 1770671857, guid: eb35edfa13e33ef47bd4ac62c244d6d5, type: 3} +- Class: 114 + Script: {fileID: 2043051950, guid: eb35edfa13e33ef47bd4ac62c244d6d5, type: 3} +- Class: 114 + Script: {fileID: -799789054, guid: eb35edfa13e33ef47bd4ac62c244d6d5, type: 3} +- Class: 114 + Script: {fileID: 944956827, guid: eb35edfa13e33ef47bd4ac62c244d6d5, type: 3} +- Class: 114 + Script: {fileID: -1413385512, guid: eb35edfa13e33ef47bd4ac62c244d6d5, type: 3} +- Class: 114 + Script: {fileID: -1666617751, guid: eb35edfa13e33ef47bd4ac62c244d6d5, type: 3} +- Class: 114 + Script: {fileID: -489883948, guid: eb35edfa13e33ef47bd4ac62c244d6d5, type: 3} +- Class: 114 + Script: {fileID: -2116783135, guid: eb35edfa13e33ef47bd4ac62c244d6d5, type: 3} +- Class: 114 + Script: {fileID: 972884197, guid: eb35edfa13e33ef47bd4ac62c244d6d5, type: 3} +- Class: 114 + Script: {fileID: 978662560, guid: eb35edfa13e33ef47bd4ac62c244d6d5, type: 3} +- Class: 114 + Script: {fileID: -1050060646, guid: eb35edfa13e33ef47bd4ac62c244d6d5, type: 3} +- Class: 114 + Script: {fileID: -1738240935, guid: eb35edfa13e33ef47bd4ac62c244d6d5, type: 3} +- Class: 114 + Script: {fileID: 595411226, guid: eb35edfa13e33ef47bd4ac62c244d6d5, type: 3} +- Class: 114 + Script: {fileID: -1149116721, guid: eb35edfa13e33ef47bd4ac62c244d6d5, type: 3} +- Class: 114 + Script: {fileID: -316606557, guid: eb35edfa13e33ef47bd4ac62c244d6d5, type: 3} +- Class: 114 + Script: {fileID: 283741188, guid: eb35edfa13e33ef47bd4ac62c244d6d5, type: 3} +- Class: 114 + Script: {fileID: -1663158710, guid: eb35edfa13e33ef47bd4ac62c244d6d5, type: 3} +- Class: 114 + Script: {fileID: -280585491, guid: eb35edfa13e33ef47bd4ac62c244d6d5, type: 3} +- Class: 114 + Script: {fileID: -1204792964, guid: eb35edfa13e33ef47bd4ac62c244d6d5, type: 3} +- Class: 115 + Script: {instanceID: 0} +- Class: 128 + Script: {instanceID: 0} +- Class: 213 + Script: {instanceID: 0} +- Class: 222 + Script: {instanceID: 0} +- Class: 224 + Script: {instanceID: 0} +- Class: 225 + Script: {instanceID: 0} +Assets: +- Assets/Prefabs/SCAN_PaletteButton.prefab +- Assets/Prefabs/SCAN_ColorResource.prefab +- Assets/Prefabs/SCAN_Confirmation.prefab +- Assets/Prefabs/SCAN_ColorSlope.prefab +- Assets/Prefabs/SCAN_Settings.prefab +- Assets/Prefabs/SCAN_Overlay.prefab +- Assets/Prefabs/SCAN_Tooltip.prefab +- Assets/Prefabs/SCAN_ColorTerrain.prefab +- Assets/Prefabs/SCAN_BackgroundElement.prefab +- Assets/Prefabs/SCAN_Instruments.prefab +- Assets/Prefabs/SCAN_General.prefab +- Assets/Prefabs/SCAN_Background.prefab +- Assets/Prefabs/SCAN_Toolbar.prefab +- Assets/Prefabs/SCAN_DropDown.prefab +- Assets/Prefabs/SCAN_DropDownElement.prefab +- Assets/XML/scan_prefabs_bundle.xml +- Assets/Prefabs/SCAN_ColorBiome.prefab +- Assets/Prefabs/MainMap_Vessel.prefab +- Assets/Prefabs/SCAN_Resources.prefab +- Assets/Prefabs/SCAN_Data.prefab +- Assets/Prefabs/SCAN_BigMap.prefab +- Assets/Prefabs/SCAN_ZoomMap.prefab +- Assets/Prefabs/Overlay_Resource.prefab +- Assets/Prefabs/SCAN_MainMap.prefab +- Assets/Prefabs/SCAN_ColorControl.prefab +- Assets/Prefabs/SCAN_MapLabel.prefab +Dependencies: +- AssetBundles/scan_unity_skin +- AssetBundles/scan_icons diff --git a/Unity/SCANsat/AssetBundles/scan_prefabs.scan b/Unity/SCANsat/AssetBundles/scan_prefabs.scan new file mode 100644 index 000000000..adfadaa73 Binary files /dev/null and b/Unity/SCANsat/AssetBundles/scan_prefabs.scan differ diff --git a/Unity/SCANsat/AssetBundles/scan_shaders-linux.scan b/Unity/SCANsat/AssetBundles/scan_shaders-linux.scan new file mode 100644 index 000000000..5449fd974 Binary files /dev/null and b/Unity/SCANsat/AssetBundles/scan_shaders-linux.scan differ diff --git a/Unity/SCANsat/AssetBundles/scan_shaders-macosx.scan b/Unity/SCANsat/AssetBundles/scan_shaders-macosx.scan new file mode 100644 index 000000000..40d698b67 Binary files /dev/null and b/Unity/SCANsat/AssetBundles/scan_shaders-macosx.scan differ diff --git a/Unity/SCANsat/AssetBundles/scan_shaders-windows.scan b/Unity/SCANsat/AssetBundles/scan_shaders-windows.scan new file mode 100644 index 000000000..74d26ff8b Binary files /dev/null and b/Unity/SCANsat/AssetBundles/scan_shaders-windows.scan differ diff --git a/Unity/SCANsat/AssetBundles/scan_shaders.manifest b/Unity/SCANsat/AssetBundles/scan_shaders.manifest new file mode 100644 index 000000000..304e8bf3f --- /dev/null +++ b/Unity/SCANsat/AssetBundles/scan_shaders.manifest @@ -0,0 +1,20 @@ +ManifestFileVersion: 0 +CRC: 496901763 +Hashes: + AssetFileHash: + serializedVersion: 2 + Hash: ca32c588a57db99f7dddd51e5860988f + TypeTreeHash: + serializedVersion: 2 + Hash: 3d7b65a2e1f431f53edc6b4af43c8dd3 +HashAppended: 0 +ClassTypes: +- Class: 48 + Script: {instanceID: 0} +- Class: 49 + Script: {instanceID: 0} +Assets: +- Assets/Shaders/GrayscaleEffect.shader +- Assets/Shaders/EdgeDetectX.shader +- Assets/XML/scan_shaders_bundle.xml +Dependencies: [] diff --git a/Unity/SCANsat/AssetBundles/scan_unity_skin.manifest b/Unity/SCANsat/AssetBundles/scan_unity_skin.manifest new file mode 100644 index 000000000..2d0f9b713 --- /dev/null +++ b/Unity/SCANsat/AssetBundles/scan_unity_skin.manifest @@ -0,0 +1,43 @@ +ManifestFileVersion: 0 +CRC: 1910768646 +Hashes: + AssetFileHash: + serializedVersion: 2 + Hash: fee9cd05acd3d29cae19ece3fc994a0f + TypeTreeHash: + serializedVersion: 2 + Hash: 3a86b9bde1b930a56947f720531fa611 +HashAppended: 0 +ClassTypes: +- Class: 28 + Script: {instanceID: 0} +- Class: 49 + Script: {instanceID: 0} +- Class: 213 + Script: {instanceID: 0} +Assets: +- Assets/Builtin skin/Sources/window.png +- Assets/Builtin skin/Sources/button hover.png +- Assets/Builtin skin/Sources/textfield on.png +- Assets/Builtin skin/Sources/vertical scrollbar thumb.png +- Assets/Builtin skin/Sources/toggle active_border.png +- Assets/Builtin skin/Sources/textfield hover.png +- Assets/Builtin skin/Sources/slider thumb active.png +- Assets/Builtin skin/Sources/horizontal scrollbar.png +- Assets/Builtin skin/Sources/toggle_border.png +- Assets/Images/SCAN_Toggle_On_Hover_Border.png +- Assets/XML/scan_unity_skin_bundle.xml +- Assets/Builtin skin/Sources/horizontal scrollbar thumb.png +- Assets/Builtin skin/Sources/slider thumb.png +- Assets/Builtin skin/Sources/textfield.png +- Assets/Images/SCAN_Toggle_Hover_Border.png +- Assets/Builtin skin/Sources/verticalslider.png +- Assets/Builtin skin/Sources/vertical scrollbar.png +- Assets/Builtin skin/Sources/button.png +- Assets/Builtin skin/Sources/box.png +- Assets/Builtin skin/Sources/horizontalslider.png +- Assets/Images/SCAN_Toggle_Border.png +- Assets/Builtin skin/Sources/tooltip.png +- Assets/Builtin skin/Sources/button on.png +- Assets/Builtin skin/Sources/slidert humb hover.png +Dependencies: [] diff --git a/Unity/SCANsat/AssetBundles/scan_unity_skin.scan b/Unity/SCANsat/AssetBundles/scan_unity_skin.scan new file mode 100644 index 000000000..bb92ddaf7 Binary files /dev/null and b/Unity/SCANsat/AssetBundles/scan_unity_skin.scan differ diff --git a/Unity/SCANsat/AssetBundles/scansat_prefabs.ksp b/Unity/SCANsat/AssetBundles/scansat_prefabs.ksp new file mode 100644 index 000000000..8c489ba9c Binary files /dev/null and b/Unity/SCANsat/AssetBundles/scansat_prefabs.ksp differ diff --git a/Unity/SCANsat/AssetBundles/unity_ghost.ksp b/Unity/SCANsat/AssetBundles/unity_ghost.ksp new file mode 100644 index 000000000..662827911 Binary files /dev/null and b/Unity/SCANsat/AssetBundles/unity_ghost.ksp differ diff --git a/Unity/SCANsat/Assets/Builtin skin.meta b/Unity/SCANsat/Assets/Builtin skin.meta new file mode 100644 index 000000000..014eb2dbd --- /dev/null +++ b/Unity/SCANsat/Assets/Builtin skin.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: a7bc56bd466c8a148aa97fe6a07b7c4c +folderAsset: yes +timeCreated: 1478034312 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Builtin skin/Skin.guiskin b/Unity/SCANsat/Assets/Builtin skin/Skin.guiskin new file mode 100644 index 000000000..145852503 Binary files /dev/null and b/Unity/SCANsat/Assets/Builtin skin/Skin.guiskin differ diff --git a/Unity/SCANsat/Assets/Builtin skin/Skin.guiskin.meta b/Unity/SCANsat/Assets/Builtin skin/Skin.guiskin.meta new file mode 100644 index 000000000..24a6d8e19 --- /dev/null +++ b/Unity/SCANsat/Assets/Builtin skin/Skin.guiskin.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d235ba1d10f9c6a45b428bd777b7e5b2 +timeCreated: 1470853215 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Builtin skin/Sources.meta b/Unity/SCANsat/Assets/Builtin skin/Sources.meta new file mode 100644 index 000000000..6f35c4819 --- /dev/null +++ b/Unity/SCANsat/Assets/Builtin skin/Sources.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 1e9ac78e2708a4f4aa2b27d7edbe906c +folderAsset: yes +timeCreated: 1470853215 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Builtin skin/Sources/Arial Rounded Bold.ttf b/Unity/SCANsat/Assets/Builtin skin/Sources/Arial Rounded Bold.ttf new file mode 100644 index 000000000..e69de29bb diff --git a/Unity/SCANsat/Assets/Builtin skin/Sources/Arial Rounded Bold.ttf.meta b/Unity/SCANsat/Assets/Builtin skin/Sources/Arial Rounded Bold.ttf.meta new file mode 100644 index 000000000..9c2f86268 --- /dev/null +++ b/Unity/SCANsat/Assets/Builtin skin/Sources/Arial Rounded Bold.ttf.meta @@ -0,0 +1,19 @@ +fileFormatVersion: 2 +guid: 93c51599ea7238543b44294027bab304 +timeCreated: 1470853215 +licenseType: Free +TrueTypeFontImporter: + serializedVersion: 2 + fontSize: 16 + forceTextureCase: -2 + characterSpacing: 1 + characterPadding: 0 + includeFontData: 1 + use2xBehaviour: 0 + fontNames: [] + fallbackFontReferences: [] + customCharacters: + fontRenderingMode: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Builtin skin/Sources/DropDownTex.png b/Unity/SCANsat/Assets/Builtin skin/Sources/DropDownTex.png new file mode 100644 index 000000000..48dcb17a0 Binary files /dev/null and b/Unity/SCANsat/Assets/Builtin skin/Sources/DropDownTex.png differ diff --git a/Unity/SCANsat/Assets/Builtin skin/Sources/DropDownTex.png.meta b/Unity/SCANsat/Assets/Builtin skin/Sources/DropDownTex.png.meta new file mode 100644 index 000000000..601f7b1b5 --- /dev/null +++ b/Unity/SCANsat/Assets/Builtin skin/Sources/DropDownTex.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: 0e0ae18f4594ff74a93edc01359694af +timeCreated: 1473951221 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 4, y: 4, z: 4, w: 4} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Builtin skin/Sources/box.png b/Unity/SCANsat/Assets/Builtin skin/Sources/box.png new file mode 100644 index 000000000..c218e29c2 Binary files /dev/null and b/Unity/SCANsat/Assets/Builtin skin/Sources/box.png differ diff --git a/Unity/SCANsat/Assets/Builtin skin/Sources/box.png.meta b/Unity/SCANsat/Assets/Builtin skin/Sources/box.png.meta new file mode 100644 index 000000000..cc35468b7 --- /dev/null +++ b/Unity/SCANsat/Assets/Builtin skin/Sources/box.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: 9488bd4d6b3882c4fbbf08698a6dbfd2 +timeCreated: 1472852375 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 4, y: 4, z: 4, w: 4} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: scan_unity_skin + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Builtin skin/Sources/builtin skin source.psd b/Unity/SCANsat/Assets/Builtin skin/Sources/builtin skin source.psd new file mode 100644 index 000000000..ce7afa934 Binary files /dev/null and b/Unity/SCANsat/Assets/Builtin skin/Sources/builtin skin source.psd differ diff --git a/Unity/SCANsat/Assets/Builtin skin/Sources/builtin skin source.psd.meta b/Unity/SCANsat/Assets/Builtin skin/Sources/builtin skin source.psd.meta new file mode 100644 index 000000000..f348f5c08 --- /dev/null +++ b/Unity/SCANsat/Assets/Builtin skin/Sources/builtin skin source.psd.meta @@ -0,0 +1,56 @@ +fileFormatVersion: 2 +guid: 8ed7726534327fb4bbed9fcac30e463c +timeCreated: 1470853215 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Builtin skin/Sources/button active.png b/Unity/SCANsat/Assets/Builtin skin/Sources/button active.png new file mode 100644 index 000000000..8e8596857 Binary files /dev/null and b/Unity/SCANsat/Assets/Builtin skin/Sources/button active.png differ diff --git a/Unity/SCANsat/Assets/Builtin skin/Sources/button active.png.meta b/Unity/SCANsat/Assets/Builtin skin/Sources/button active.png.meta new file mode 100644 index 000000000..db6f0202b --- /dev/null +++ b/Unity/SCANsat/Assets/Builtin skin/Sources/button active.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: b01df32de3b6f1746862a5b5d13d8244 +timeCreated: 1478034425 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 5, y: 5, z: 5, w: 5} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Builtin skin/Sources/button hover.png b/Unity/SCANsat/Assets/Builtin skin/Sources/button hover.png new file mode 100644 index 000000000..33812408f Binary files /dev/null and b/Unity/SCANsat/Assets/Builtin skin/Sources/button hover.png differ diff --git a/Unity/SCANsat/Assets/Builtin skin/Sources/button hover.png.meta b/Unity/SCANsat/Assets/Builtin skin/Sources/button hover.png.meta new file mode 100644 index 000000000..bdd0b3c97 --- /dev/null +++ b/Unity/SCANsat/Assets/Builtin skin/Sources/button hover.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: 9ea2fe418e06bbc4fa156a0a55338c62 +timeCreated: 1472844207 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 5, y: 5, z: 5, w: 5} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: scan_unity_skin + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Builtin skin/Sources/button on hover.png b/Unity/SCANsat/Assets/Builtin skin/Sources/button on hover.png new file mode 100644 index 000000000..bc6235abe Binary files /dev/null and b/Unity/SCANsat/Assets/Builtin skin/Sources/button on hover.png differ diff --git a/Unity/SCANsat/Assets/Builtin skin/Sources/button on hover.png.meta b/Unity/SCANsat/Assets/Builtin skin/Sources/button on hover.png.meta new file mode 100644 index 000000000..f2be01ddc --- /dev/null +++ b/Unity/SCANsat/Assets/Builtin skin/Sources/button on hover.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: fa99336287c44f74da45b02f32db7660 +timeCreated: 1478034439 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 5, y: 5, z: 5, w: 5} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Builtin skin/Sources/button on.png b/Unity/SCANsat/Assets/Builtin skin/Sources/button on.png new file mode 100644 index 000000000..b05fbfce5 Binary files /dev/null and b/Unity/SCANsat/Assets/Builtin skin/Sources/button on.png differ diff --git a/Unity/SCANsat/Assets/Builtin skin/Sources/button on.png.meta b/Unity/SCANsat/Assets/Builtin skin/Sources/button on.png.meta new file mode 100644 index 000000000..7c81a4151 --- /dev/null +++ b/Unity/SCANsat/Assets/Builtin skin/Sources/button on.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: 895c433ff88d41d448b007428fb56cf7 +timeCreated: 1472844221 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 5, y: 5, z: 5, w: 5} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: scan_unity_skin + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Builtin skin/Sources/button.png b/Unity/SCANsat/Assets/Builtin skin/Sources/button.png new file mode 100644 index 000000000..a6c83579c Binary files /dev/null and b/Unity/SCANsat/Assets/Builtin skin/Sources/button.png differ diff --git a/Unity/SCANsat/Assets/Builtin skin/Sources/button.png.meta b/Unity/SCANsat/Assets/Builtin skin/Sources/button.png.meta new file mode 100644 index 000000000..9aafac5f4 --- /dev/null +++ b/Unity/SCANsat/Assets/Builtin skin/Sources/button.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: 5e813a9bf4f0e824d97c05a7f264a3ba +timeCreated: 1472844128 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 5, y: 5, z: 5, w: 5} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: scan_unity_skin + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Builtin skin/Sources/horizontal scrollbar thumb.png b/Unity/SCANsat/Assets/Builtin skin/Sources/horizontal scrollbar thumb.png new file mode 100644 index 000000000..d2efff6cb Binary files /dev/null and b/Unity/SCANsat/Assets/Builtin skin/Sources/horizontal scrollbar thumb.png differ diff --git a/Unity/SCANsat/Assets/Builtin skin/Sources/horizontal scrollbar thumb.png.meta b/Unity/SCANsat/Assets/Builtin skin/Sources/horizontal scrollbar thumb.png.meta new file mode 100644 index 000000000..3840a48e6 --- /dev/null +++ b/Unity/SCANsat/Assets/Builtin skin/Sources/horizontal scrollbar thumb.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: 43eae036ac6000d4f893669e938b4439 +timeCreated: 1478034503 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 5, y: 5, z: 5, w: 5} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: scan_unity_skin + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Builtin skin/Sources/horizontal scrollbar.png b/Unity/SCANsat/Assets/Builtin skin/Sources/horizontal scrollbar.png new file mode 100644 index 000000000..bd5b6af63 Binary files /dev/null and b/Unity/SCANsat/Assets/Builtin skin/Sources/horizontal scrollbar.png differ diff --git a/Unity/SCANsat/Assets/Builtin skin/Sources/horizontal scrollbar.png.meta b/Unity/SCANsat/Assets/Builtin skin/Sources/horizontal scrollbar.png.meta new file mode 100644 index 000000000..eb2a01858 --- /dev/null +++ b/Unity/SCANsat/Assets/Builtin skin/Sources/horizontal scrollbar.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: 447fdf649aaa9394f900505b2fcb6b6e +timeCreated: 1478034470 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 7, y: 7, z: 7, w: 7} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: scan_unity_skin + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Builtin skin/Sources/horizontalslider.png b/Unity/SCANsat/Assets/Builtin skin/Sources/horizontalslider.png new file mode 100644 index 000000000..61d89b60f Binary files /dev/null and b/Unity/SCANsat/Assets/Builtin skin/Sources/horizontalslider.png differ diff --git a/Unity/SCANsat/Assets/Builtin skin/Sources/horizontalslider.png.meta b/Unity/SCANsat/Assets/Builtin skin/Sources/horizontalslider.png.meta new file mode 100644 index 000000000..a10c427ea --- /dev/null +++ b/Unity/SCANsat/Assets/Builtin skin/Sources/horizontalslider.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: bb456cad67a7b094a985b2398c43844d +timeCreated: 1473006664 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 3, y: 3, z: 3, w: 3} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: scan_unity_skin + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Builtin skin/Sources/slider thumb active.png b/Unity/SCANsat/Assets/Builtin skin/Sources/slider thumb active.png new file mode 100644 index 000000000..ec5dc672c Binary files /dev/null and b/Unity/SCANsat/Assets/Builtin skin/Sources/slider thumb active.png differ diff --git a/Unity/SCANsat/Assets/Builtin skin/Sources/slider thumb active.png.meta b/Unity/SCANsat/Assets/Builtin skin/Sources/slider thumb active.png.meta new file mode 100644 index 000000000..4acc9415f --- /dev/null +++ b/Unity/SCANsat/Assets/Builtin skin/Sources/slider thumb active.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: c2feba2496570fe478e3b40736c6ca07 +timeCreated: 1473006707 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 3, y: 4, z: 3, w: 4} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: scan_unity_skin + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Builtin skin/Sources/slider thumb.png b/Unity/SCANsat/Assets/Builtin skin/Sources/slider thumb.png new file mode 100644 index 000000000..3ef6e9cc1 Binary files /dev/null and b/Unity/SCANsat/Assets/Builtin skin/Sources/slider thumb.png differ diff --git a/Unity/SCANsat/Assets/Builtin skin/Sources/slider thumb.png.meta b/Unity/SCANsat/Assets/Builtin skin/Sources/slider thumb.png.meta new file mode 100644 index 000000000..92cdbd7e5 --- /dev/null +++ b/Unity/SCANsat/Assets/Builtin skin/Sources/slider thumb.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: 1c9cb6c6af3c09c41819447f062bebb5 +timeCreated: 1473006691 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 3, y: 4, z: 3, w: 4} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: scan_unity_skin + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Builtin skin/Sources/slidert humb hover.png b/Unity/SCANsat/Assets/Builtin skin/Sources/slidert humb hover.png new file mode 100644 index 000000000..9b9a4015f Binary files /dev/null and b/Unity/SCANsat/Assets/Builtin skin/Sources/slidert humb hover.png differ diff --git a/Unity/SCANsat/Assets/Builtin skin/Sources/slidert humb hover.png.meta b/Unity/SCANsat/Assets/Builtin skin/Sources/slidert humb hover.png.meta new file mode 100644 index 000000000..f261c4ee4 --- /dev/null +++ b/Unity/SCANsat/Assets/Builtin skin/Sources/slidert humb hover.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: 6e022ecf83711614898f353118151c0c +timeCreated: 1473006720 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 3, y: 4, z: 3, w: 4} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: scan_unity_skin + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Builtin skin/Sources/source Photoshop file.psd b/Unity/SCANsat/Assets/Builtin skin/Sources/source Photoshop file.psd new file mode 100644 index 000000000..0e8b0159a Binary files /dev/null and b/Unity/SCANsat/Assets/Builtin skin/Sources/source Photoshop file.psd differ diff --git a/Unity/SCANsat/Assets/Builtin skin/Sources/source Photoshop file.psd.meta b/Unity/SCANsat/Assets/Builtin skin/Sources/source Photoshop file.psd.meta new file mode 100644 index 000000000..f440beafe --- /dev/null +++ b/Unity/SCANsat/Assets/Builtin skin/Sources/source Photoshop file.psd.meta @@ -0,0 +1,56 @@ +fileFormatVersion: 2 +guid: fe86bff5401c09e4b9fbd217b3e828d6 +timeCreated: 1470853215 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Builtin skin/Sources/textfield hover.png b/Unity/SCANsat/Assets/Builtin skin/Sources/textfield hover.png new file mode 100644 index 000000000..92c8b78b3 Binary files /dev/null and b/Unity/SCANsat/Assets/Builtin skin/Sources/textfield hover.png differ diff --git a/Unity/SCANsat/Assets/Builtin skin/Sources/textfield hover.png.meta b/Unity/SCANsat/Assets/Builtin skin/Sources/textfield hover.png.meta new file mode 100644 index 000000000..780776ac3 --- /dev/null +++ b/Unity/SCANsat/Assets/Builtin skin/Sources/textfield hover.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: 8e39db43beb39574e9e50ada5b328219 +timeCreated: 1472853709 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 4, y: 4, z: 4, w: 4} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: scan_unity_skin + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Builtin skin/Sources/textfield on.png b/Unity/SCANsat/Assets/Builtin skin/Sources/textfield on.png new file mode 100644 index 000000000..33926b2ec Binary files /dev/null and b/Unity/SCANsat/Assets/Builtin skin/Sources/textfield on.png differ diff --git a/Unity/SCANsat/Assets/Builtin skin/Sources/textfield on.png.meta b/Unity/SCANsat/Assets/Builtin skin/Sources/textfield on.png.meta new file mode 100644 index 000000000..f3e2f2ffe --- /dev/null +++ b/Unity/SCANsat/Assets/Builtin skin/Sources/textfield on.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: 71d691a1ba90b014586b4b38a7035877 +timeCreated: 1472853722 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 4, y: 4, z: 4, w: 4} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: scan_unity_skin + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Builtin skin/Sources/textfield.png b/Unity/SCANsat/Assets/Builtin skin/Sources/textfield.png new file mode 100644 index 000000000..f3469ff0f Binary files /dev/null and b/Unity/SCANsat/Assets/Builtin skin/Sources/textfield.png differ diff --git a/Unity/SCANsat/Assets/Builtin skin/Sources/textfield.png.meta b/Unity/SCANsat/Assets/Builtin skin/Sources/textfield.png.meta new file mode 100644 index 000000000..3c2b8fe57 --- /dev/null +++ b/Unity/SCANsat/Assets/Builtin skin/Sources/textfield.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: cefb5ab793806dc48b90c065aecda727 +timeCreated: 1472853689 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 4, y: 4, z: 4, w: 4} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: scan_unity_skin + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Builtin skin/Sources/toggle active.png b/Unity/SCANsat/Assets/Builtin skin/Sources/toggle active.png new file mode 100644 index 000000000..76268253d Binary files /dev/null and b/Unity/SCANsat/Assets/Builtin skin/Sources/toggle active.png differ diff --git a/Unity/SCANsat/Assets/Builtin skin/Sources/toggle active.png.meta b/Unity/SCANsat/Assets/Builtin skin/Sources/toggle active.png.meta new file mode 100644 index 000000000..540264c0b --- /dev/null +++ b/Unity/SCANsat/Assets/Builtin skin/Sources/toggle active.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: 11c5c83d3b0ac0247b109ad870c58146 +timeCreated: 1472853964 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 5, y: 5, z: 6, w: 5} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Builtin skin/Sources/toggle active_border.png b/Unity/SCANsat/Assets/Builtin skin/Sources/toggle active_border.png new file mode 100644 index 000000000..bc1b1bfce Binary files /dev/null and b/Unity/SCANsat/Assets/Builtin skin/Sources/toggle active_border.png differ diff --git a/Unity/SCANsat/Assets/Builtin skin/Sources/toggle active_border.png.meta b/Unity/SCANsat/Assets/Builtin skin/Sources/toggle active_border.png.meta new file mode 100644 index 000000000..2f4418f88 --- /dev/null +++ b/Unity/SCANsat/Assets/Builtin skin/Sources/toggle active_border.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: b21d3833d09dd574d974c0a18749d204 +timeCreated: 1485208301 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 9, y: 9, z: 10, w: 9} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: scan_unity_skin + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Builtin skin/Sources/toggle hover.png b/Unity/SCANsat/Assets/Builtin skin/Sources/toggle hover.png new file mode 100644 index 000000000..7d5314451 Binary files /dev/null and b/Unity/SCANsat/Assets/Builtin skin/Sources/toggle hover.png differ diff --git a/Unity/SCANsat/Assets/Builtin skin/Sources/toggle hover.png.meta b/Unity/SCANsat/Assets/Builtin skin/Sources/toggle hover.png.meta new file mode 100644 index 000000000..f78ef478a --- /dev/null +++ b/Unity/SCANsat/Assets/Builtin skin/Sources/toggle hover.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: 13c5b748b138496489fc0b816a6c88d3 +timeCreated: 1472853980 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 5, y: 5, z: 6, w: 5} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Builtin skin/Sources/toggle hover_border.png b/Unity/SCANsat/Assets/Builtin skin/Sources/toggle hover_border.png new file mode 100644 index 000000000..33c5f8d6e Binary files /dev/null and b/Unity/SCANsat/Assets/Builtin skin/Sources/toggle hover_border.png differ diff --git a/Unity/SCANsat/Assets/Builtin skin/Sources/toggle hover_border.png.meta b/Unity/SCANsat/Assets/Builtin skin/Sources/toggle hover_border.png.meta new file mode 100644 index 000000000..db5dfbc55 --- /dev/null +++ b/Unity/SCANsat/Assets/Builtin skin/Sources/toggle hover_border.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: ab467d8b409343b418fffd55bff263d8 +timeCreated: 1485208314 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 9, y: 9, z: 10, w: 9} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Builtin skin/Sources/toggle on active.png b/Unity/SCANsat/Assets/Builtin skin/Sources/toggle on active.png new file mode 100644 index 000000000..49230268d Binary files /dev/null and b/Unity/SCANsat/Assets/Builtin skin/Sources/toggle on active.png differ diff --git a/Unity/SCANsat/Assets/Builtin skin/Sources/toggle on active.png.meta b/Unity/SCANsat/Assets/Builtin skin/Sources/toggle on active.png.meta new file mode 100644 index 000000000..334eb273f --- /dev/null +++ b/Unity/SCANsat/Assets/Builtin skin/Sources/toggle on active.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: a0cf4583e793b864f95a2fe0758fe2bc +timeCreated: 1472854064 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 5, y: 5, z: 6, w: 5} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Builtin skin/Sources/toggle on hover.png b/Unity/SCANsat/Assets/Builtin skin/Sources/toggle on hover.png new file mode 100644 index 000000000..9ba78ca6e Binary files /dev/null and b/Unity/SCANsat/Assets/Builtin skin/Sources/toggle on hover.png differ diff --git a/Unity/SCANsat/Assets/Builtin skin/Sources/toggle on hover.png.meta b/Unity/SCANsat/Assets/Builtin skin/Sources/toggle on hover.png.meta new file mode 100644 index 000000000..9922e0149 --- /dev/null +++ b/Unity/SCANsat/Assets/Builtin skin/Sources/toggle on hover.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: f67ef66e05e50a444a9c2067a18be37e +timeCreated: 1472854050 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 5, y: 5, z: 6, w: 5} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Builtin skin/Sources/toggle on.png b/Unity/SCANsat/Assets/Builtin skin/Sources/toggle on.png new file mode 100644 index 000000000..66420d1cd Binary files /dev/null and b/Unity/SCANsat/Assets/Builtin skin/Sources/toggle on.png differ diff --git a/Unity/SCANsat/Assets/Builtin skin/Sources/toggle on.png.meta b/Unity/SCANsat/Assets/Builtin skin/Sources/toggle on.png.meta new file mode 100644 index 000000000..837062e4a --- /dev/null +++ b/Unity/SCANsat/Assets/Builtin skin/Sources/toggle on.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: cccdfce7525b43b4b8b42b57d34ea018 +timeCreated: 1472854076 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 5, y: 5, z: 6, w: 5} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Builtin skin/Sources/toggle.png b/Unity/SCANsat/Assets/Builtin skin/Sources/toggle.png new file mode 100644 index 000000000..fae6d022a Binary files /dev/null and b/Unity/SCANsat/Assets/Builtin skin/Sources/toggle.png differ diff --git a/Unity/SCANsat/Assets/Builtin skin/Sources/toggle.png.meta b/Unity/SCANsat/Assets/Builtin skin/Sources/toggle.png.meta new file mode 100644 index 000000000..b6e8caf96 --- /dev/null +++ b/Unity/SCANsat/Assets/Builtin skin/Sources/toggle.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: b24617616f4d30941a7f98eecfc2907c +timeCreated: 1472853948 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 5, y: 5, z: 6, w: 5} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Builtin skin/Sources/toggle_border.png b/Unity/SCANsat/Assets/Builtin skin/Sources/toggle_border.png new file mode 100644 index 000000000..75e74d15b Binary files /dev/null and b/Unity/SCANsat/Assets/Builtin skin/Sources/toggle_border.png differ diff --git a/Unity/SCANsat/Assets/Builtin skin/Sources/toggle_border.png.meta b/Unity/SCANsat/Assets/Builtin skin/Sources/toggle_border.png.meta new file mode 100644 index 000000000..15fa7db54 --- /dev/null +++ b/Unity/SCANsat/Assets/Builtin skin/Sources/toggle_border.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: c37906c4bd8ded24eb8af48828f32453 +timeCreated: 1485207592 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 9, y: 8, z: 10, w: 8} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: scan_unity_skin + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Builtin skin/Sources/tooltip.png b/Unity/SCANsat/Assets/Builtin skin/Sources/tooltip.png new file mode 100644 index 000000000..77c6a134b Binary files /dev/null and b/Unity/SCANsat/Assets/Builtin skin/Sources/tooltip.png differ diff --git a/Unity/SCANsat/Assets/Builtin skin/Sources/tooltip.png.meta b/Unity/SCANsat/Assets/Builtin skin/Sources/tooltip.png.meta new file mode 100644 index 000000000..3ccdbccc2 --- /dev/null +++ b/Unity/SCANsat/Assets/Builtin skin/Sources/tooltip.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: 41cd79dedacf24744a6092362c965dbf +timeCreated: 1488399551 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 7 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 8, y: 8, z: 8, w: 8} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: scan_unity_skin + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Builtin skin/Sources/vertical scrollbar thumb.png b/Unity/SCANsat/Assets/Builtin skin/Sources/vertical scrollbar thumb.png new file mode 100644 index 000000000..f7bbb0595 Binary files /dev/null and b/Unity/SCANsat/Assets/Builtin skin/Sources/vertical scrollbar thumb.png differ diff --git a/Unity/SCANsat/Assets/Builtin skin/Sources/vertical scrollbar thumb.png.meta b/Unity/SCANsat/Assets/Builtin skin/Sources/vertical scrollbar thumb.png.meta new file mode 100644 index 000000000..2e88053f9 --- /dev/null +++ b/Unity/SCANsat/Assets/Builtin skin/Sources/vertical scrollbar thumb.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: 391e4c929e470b64d85dcb8f52fc68d8 +timeCreated: 1472850366 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 5, y: 5, z: 5, w: 5} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: scan_unity_skin + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Builtin skin/Sources/vertical scrollbar.png b/Unity/SCANsat/Assets/Builtin skin/Sources/vertical scrollbar.png new file mode 100644 index 000000000..49a47f316 Binary files /dev/null and b/Unity/SCANsat/Assets/Builtin skin/Sources/vertical scrollbar.png differ diff --git a/Unity/SCANsat/Assets/Builtin skin/Sources/vertical scrollbar.png.meta b/Unity/SCANsat/Assets/Builtin skin/Sources/vertical scrollbar.png.meta new file mode 100644 index 000000000..fa2393180 --- /dev/null +++ b/Unity/SCANsat/Assets/Builtin skin/Sources/vertical scrollbar.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: bf60c1ca7cea75c4e922adbb1555c523 +timeCreated: 1472850330 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 7, y: 7, z: 7, w: 7} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: scan_unity_skin + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Builtin skin/Sources/verticalslider.png b/Unity/SCANsat/Assets/Builtin skin/Sources/verticalslider.png new file mode 100644 index 000000000..d082763f3 Binary files /dev/null and b/Unity/SCANsat/Assets/Builtin skin/Sources/verticalslider.png differ diff --git a/Unity/SCANsat/Assets/Builtin skin/Sources/verticalslider.png.meta b/Unity/SCANsat/Assets/Builtin skin/Sources/verticalslider.png.meta new file mode 100644 index 000000000..c00ceaf24 --- /dev/null +++ b/Unity/SCANsat/Assets/Builtin skin/Sources/verticalslider.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: 90b2f35ab609b0c47885b96b4820c28d +timeCreated: 1478034529 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 3, y: 3, z: 3, w: 3} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: scan_unity_skin + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Builtin skin/Sources/window on.png b/Unity/SCANsat/Assets/Builtin skin/Sources/window on.png new file mode 100644 index 000000000..e0295e9fb Binary files /dev/null and b/Unity/SCANsat/Assets/Builtin skin/Sources/window on.png differ diff --git a/Unity/SCANsat/Assets/Builtin skin/Sources/window on.png.meta b/Unity/SCANsat/Assets/Builtin skin/Sources/window on.png.meta new file mode 100644 index 000000000..42015ef43 --- /dev/null +++ b/Unity/SCANsat/Assets/Builtin skin/Sources/window on.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: 50b97cebe3750724396523067ccc7b8f +timeCreated: 1472849467 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 7, y: 7, z: 7, w: 17} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Builtin skin/Sources/window.png b/Unity/SCANsat/Assets/Builtin skin/Sources/window.png new file mode 100644 index 000000000..3c1a66bac Binary files /dev/null and b/Unity/SCANsat/Assets/Builtin skin/Sources/window.png differ diff --git a/Unity/SCANsat/Assets/Builtin skin/Sources/window.png.meta b/Unity/SCANsat/Assets/Builtin skin/Sources/window.png.meta new file mode 100644 index 000000000..24e91ca93 --- /dev/null +++ b/Unity/SCANsat/Assets/Builtin skin/Sources/window.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: 9f2e95f0cdfe33444a502b831fca611c +timeCreated: 1470855282 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 7, y: 7, z: 7, w: 17} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: scan_unity_skin + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Bundler.cs b/Unity/SCANsat/Assets/Bundler.cs new file mode 100644 index 000000000..b3a93a629 --- /dev/null +++ b/Unity/SCANsat/Assets/Bundler.cs @@ -0,0 +1,55 @@ +using UnityEditor; + +public class Bundler +{ + const string dir = "AssetBundles"; + const string extension = ".scan"; + + [MenuItem("SCANsat/Build All Bundles")] + static void BuildAllAssetBundles() + { + BuildTarget[] platforms = { BuildTarget.StandaloneWindows + , BuildTarget.StandaloneOSXUniversal + , BuildTarget.StandaloneLinux }; + + string[] platformExts = { "-windows", "-macosx", "-linux" }; + + for (int i = 0; i < platforms.Length; i++) + { + BuildPipeline.BuildAssetBundles(dir, BuildAssetBundleOptions.UncompressedAssetBundle | BuildAssetBundleOptions.ForceRebuildAssetBundle, platforms[i]); + + string outFile = dir + "/scan_shaders" + platformExts[i] + extension; + FileUtil.ReplaceFile(dir + "/scan_shaders", outFile); + } + + BuildPipeline.BuildAssetBundles(dir, BuildAssetBundleOptions.ChunkBasedCompression | BuildAssetBundleOptions.ForceRebuildAssetBundle, BuildTarget.StandaloneWindows); + + FileUtil.ReplaceFile(dir + "/scan_prefabs", dir + "/scan_prefabs" + extension); + FileUtil.ReplaceFile(dir + "/scan_icons", dir + "/scan_icons" + extension); + FileUtil.ReplaceFile(dir + "/scan_unity_skin", dir + "/scan_unity_skin" + extension); + + FileUtil.DeleteFileOrDirectory(dir + "/scan_prefabs"); + FileUtil.DeleteFileOrDirectory(dir + "/scan_icons"); + FileUtil.DeleteFileOrDirectory(dir + "/scan_unity_skin"); + + FileUtil.DeleteFileOrDirectory(dir + "/scan_shaders"); + } + + [MenuItem("SCANsat/Build Core Bundles")] + static void BuildCoreAssetBundles() + { + BuildPipeline.BuildAssetBundles(dir, BuildAssetBundleOptions.ChunkBasedCompression | BuildAssetBundleOptions.ForceRebuildAssetBundle, BuildTarget.StandaloneWindows); + + FileUtil.ReplaceFile(dir + "/scan_prefabs", dir + "/scan_prefabs" + extension); + FileUtil.ReplaceFile(dir + "/scan_icons", dir + "/scan_icons" + extension); + FileUtil.ReplaceFile(dir + "/scan_unity_skin", dir + "/scan_unity_skin" + extension); + + FileUtil.DeleteFileOrDirectory(dir + "/scan_prefabs"); + FileUtil.DeleteFileOrDirectory(dir + "/scan_icons"); + FileUtil.DeleteFileOrDirectory(dir + "/scan_unity_skin"); + + FileUtil.DeleteFileOrDirectory(dir + "/scan_shaders"); + } + + +} diff --git a/Unity/SCANsat/Assets/Bundler.cs.meta b/Unity/SCANsat/Assets/Bundler.cs.meta new file mode 100644 index 000000000..fc4f91b1e --- /dev/null +++ b/Unity/SCANsat/Assets/Bundler.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 904d50651de8b1a408889795a8a3faa3 +timeCreated: 1488295788 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Editor.meta b/Unity/SCANsat/Assets/Editor.meta new file mode 100644 index 000000000..49b3f5220 --- /dev/null +++ b/Unity/SCANsat/Assets/Editor.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 7c0f9cbb493755045b9e90a3ccda8a02 +folderAsset: yes +timeCreated: 1487888458 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Editor/ImageEffects.meta b/Unity/SCANsat/Assets/Editor/ImageEffects.meta new file mode 100644 index 000000000..1dfb5360b --- /dev/null +++ b/Unity/SCANsat/Assets/Editor/ImageEffects.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: 225198e07aaae3547a6d1f6e7177555f +folderAsset: yes +DefaultImporter: + userData: + assetBundleName: diff --git a/Unity/SCANsat/Assets/Editor/ImageEffects/AntialiasingEditor.cs b/Unity/SCANsat/Assets/Editor/ImageEffects/AntialiasingEditor.cs new file mode 100644 index 000000000..795b9d87c --- /dev/null +++ b/Unity/SCANsat/Assets/Editor/ImageEffects/AntialiasingEditor.cs @@ -0,0 +1,75 @@ +using System; +using UnityEditor; +using UnityEngine; + +namespace UnityStandardAssets.ImageEffects +{ + [CustomEditor(typeof (Antialiasing))] + public class AntialiasingEditor : Editor + { + private SerializedObject serObj; + + private SerializedProperty mode; + + private SerializedProperty showGeneratedNormals; + private SerializedProperty offsetScale; + private SerializedProperty blurRadius; + private SerializedProperty dlaaSharp; + + private SerializedProperty edgeThresholdMin; + private SerializedProperty edgeThreshold; + private SerializedProperty edgeSharpness; + + + private void OnEnable() + { + serObj = new SerializedObject(target); + + mode = serObj.FindProperty("mode"); + + showGeneratedNormals = serObj.FindProperty("showGeneratedNormals"); + offsetScale = serObj.FindProperty("offsetScale"); + blurRadius = serObj.FindProperty("blurRadius"); + dlaaSharp = serObj.FindProperty("dlaaSharp"); + + edgeThresholdMin = serObj.FindProperty("edgeThresholdMin"); + edgeThreshold = serObj.FindProperty("edgeThreshold"); + edgeSharpness = serObj.FindProperty("edgeSharpness"); + } + + + public override void OnInspectorGUI() + { + serObj.Update(); + + GUILayout.Label("Luminance based fullscreen antialiasing", EditorStyles.miniBoldLabel); + + EditorGUILayout.PropertyField(mode, new GUIContent("Technique")); + + Material mat = (target as Antialiasing).CurrentAAMaterial(); + if (null == mat && (target as Antialiasing).enabled) + { + EditorGUILayout.HelpBox("This AA technique is currently not supported. Choose a different technique or disable the effect and use MSAA instead.", MessageType.Warning); + } + + if (mode.enumValueIndex == (int) AAMode.NFAA) + { + EditorGUILayout.PropertyField(offsetScale, new GUIContent("Edge Detect Ofs")); + EditorGUILayout.PropertyField(blurRadius, new GUIContent("Blur Radius")); + EditorGUILayout.PropertyField(showGeneratedNormals, new GUIContent("Show Normals")); + } + else if (mode.enumValueIndex == (int) AAMode.DLAA) + { + EditorGUILayout.PropertyField(dlaaSharp, new GUIContent("Sharp")); + } + else if (mode.enumValueIndex == (int) AAMode.FXAA3Console) + { + EditorGUILayout.PropertyField(edgeThresholdMin, new GUIContent("Edge Min Threshhold")); + EditorGUILayout.PropertyField(edgeThreshold, new GUIContent("Edge Threshhold")); + EditorGUILayout.PropertyField(edgeSharpness, new GUIContent("Edge Sharpness")); + } + + serObj.ApplyModifiedProperties(); + } + } +} diff --git a/Unity/SCANsat/Assets/Editor/ImageEffects/AntialiasingEditor.cs.meta b/Unity/SCANsat/Assets/Editor/ImageEffects/AntialiasingEditor.cs.meta new file mode 100644 index 000000000..bbf3d2e17 --- /dev/null +++ b/Unity/SCANsat/Assets/Editor/ImageEffects/AntialiasingEditor.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: ba15fa37442517749a3c4640a4ad4054 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Unity/SCANsat/Assets/Editor/ImageEffects/BloomAndFlaresEditor.cs b/Unity/SCANsat/Assets/Editor/ImageEffects/BloomAndFlaresEditor.cs new file mode 100644 index 000000000..2966e5ddd --- /dev/null +++ b/Unity/SCANsat/Assets/Editor/ImageEffects/BloomAndFlaresEditor.cs @@ -0,0 +1,157 @@ +using System; +using UnityEditor; +using UnityEngine; + +namespace UnityStandardAssets.ImageEffects +{ + [CustomEditor (typeof(BloomAndFlares))] + class BloomAndFlaresEditor : Editor + { + SerializedProperty tweakMode; + SerializedProperty screenBlendMode; + + SerializedObject serObj; + + SerializedProperty hdr; + SerializedProperty sepBlurSpread; + SerializedProperty useSrcAlphaAsMask; + + SerializedProperty bloomIntensity; + SerializedProperty bloomthreshold; + SerializedProperty bloomBlurIterations; + + SerializedProperty lensflares; + + SerializedProperty hollywoodFlareBlurIterations; + + SerializedProperty lensflareMode; + SerializedProperty hollyStretchWidth; + SerializedProperty lensflareIntensity; + SerializedProperty lensflarethreshold; + SerializedProperty flareColorA; + SerializedProperty flareColorB; + SerializedProperty flareColorC; + SerializedProperty flareColorD; + + SerializedProperty lensFlareVignetteMask; + + void OnEnable () { + serObj = new SerializedObject (target); + + screenBlendMode = serObj.FindProperty("screenBlendMode"); + hdr = serObj.FindProperty("hdr"); + + sepBlurSpread = serObj.FindProperty("sepBlurSpread"); + useSrcAlphaAsMask = serObj.FindProperty("useSrcAlphaAsMask"); + + bloomIntensity = serObj.FindProperty("bloomIntensity"); + bloomthreshold = serObj.FindProperty("bloomThreshold"); + bloomBlurIterations = serObj.FindProperty("bloomBlurIterations"); + + lensflares = serObj.FindProperty("lensflares"); + + lensflareMode = serObj.FindProperty("lensflareMode"); + hollywoodFlareBlurIterations = serObj.FindProperty("hollywoodFlareBlurIterations"); + hollyStretchWidth = serObj.FindProperty("hollyStretchWidth"); + lensflareIntensity = serObj.FindProperty("lensflareIntensity"); + lensflarethreshold = serObj.FindProperty("lensflareThreshold"); + flareColorA = serObj.FindProperty("flareColorA"); + flareColorB = serObj.FindProperty("flareColorB"); + flareColorC = serObj.FindProperty("flareColorC"); + flareColorD = serObj.FindProperty("flareColorD"); + lensFlareVignetteMask = serObj.FindProperty("lensFlareVignetteMask"); + + tweakMode = serObj.FindProperty("tweakMode"); + } + + + public override void OnInspectorGUI () { + serObj.Update(); + + GUILayout.Label("HDR " + (hdr.enumValueIndex == 0 ? "auto detected, " : (hdr.enumValueIndex == 1 ? "forced on, " : "disabled, ")) + (useSrcAlphaAsMask.floatValue < 0.1f ? " ignoring alpha channel glow information" : " using alpha channel glow information"), EditorStyles.miniBoldLabel); + + EditorGUILayout.PropertyField (tweakMode, new GUIContent("Tweak mode")); + EditorGUILayout.PropertyField (screenBlendMode, new GUIContent("Blend mode")); + EditorGUILayout.PropertyField (hdr, new GUIContent("HDR")); + + // display info text when screen blend mode cannot be used + Camera cam = (target as BloomAndFlares).GetComponent(); + if (cam != null) { + if (screenBlendMode.enumValueIndex==0 && ((cam.hdr && hdr.enumValueIndex==0) || (hdr.enumValueIndex==1))) { + EditorGUILayout.HelpBox("Screen blend is not supported in HDR. Using 'Add' instead.", MessageType.Info); + } + } + + if (1 == tweakMode.intValue) + EditorGUILayout.PropertyField (lensflares, new GUIContent("Cast lens flares")); + + EditorGUILayout.Separator (); + + EditorGUILayout.PropertyField (bloomIntensity, new GUIContent("Intensity")); + bloomthreshold.floatValue = EditorGUILayout.Slider ("threshold", bloomthreshold.floatValue, -0.05f, 4.0f); + bloomBlurIterations.intValue = EditorGUILayout.IntSlider ("Blur iterations", bloomBlurIterations.intValue, 1, 4); + sepBlurSpread.floatValue = EditorGUILayout.Slider ("Blur spread", sepBlurSpread.floatValue, 0.1f, 10.0f); + + if (1 == tweakMode.intValue) + useSrcAlphaAsMask.floatValue = EditorGUILayout.Slider (new GUIContent("Use alpha mask", "Make alpha channel define glowiness"), useSrcAlphaAsMask.floatValue, 0.0f, 1.0f); + else + useSrcAlphaAsMask.floatValue = 0.0f; + + if (1 == tweakMode.intValue) { + EditorGUILayout.Separator (); + + if (lensflares.boolValue) { + + // further lens flare tweakings + if (0 != tweakMode.intValue) + EditorGUILayout.PropertyField (lensflareMode, new GUIContent("Lens flare mode")); + else + lensflareMode.enumValueIndex = 0; + + EditorGUILayout.PropertyField(lensFlareVignetteMask, new GUIContent("Lens flare mask", "This mask is needed to prevent lens flare artifacts")); + + EditorGUILayout.PropertyField (lensflareIntensity, new GUIContent("Local intensity")); + lensflarethreshold.floatValue = EditorGUILayout.Slider ("Local threshold", lensflarethreshold.floatValue, 0.0f, 1.0f); + + if (lensflareMode.intValue == 0) { + // ghosting + EditorGUILayout.BeginHorizontal (); + EditorGUILayout.PropertyField (flareColorA, new GUIContent("1st Color")); + EditorGUILayout.PropertyField (flareColorB, new GUIContent("2nd Color")); + EditorGUILayout.EndHorizontal (); + + EditorGUILayout.BeginHorizontal (); + EditorGUILayout.PropertyField (flareColorC, new GUIContent("3rd Color")); + EditorGUILayout.PropertyField (flareColorD, new GUIContent("4th Color")); + EditorGUILayout.EndHorizontal (); + } + else if (lensflareMode.intValue == 1) { + // hollywood + EditorGUILayout.PropertyField (hollyStretchWidth, new GUIContent("Stretch width")); + hollywoodFlareBlurIterations.intValue = EditorGUILayout.IntSlider ("Blur iterations", hollywoodFlareBlurIterations.intValue, 1, 4); + + EditorGUILayout.PropertyField (flareColorA, new GUIContent("Tint Color")); + } + else if (lensflareMode.intValue == 2) { + // both + EditorGUILayout.PropertyField (hollyStretchWidth, new GUIContent("Stretch width")); + hollywoodFlareBlurIterations.intValue = EditorGUILayout.IntSlider ("Blur iterations", hollywoodFlareBlurIterations.intValue, 1, 4); + + EditorGUILayout.BeginHorizontal (); + EditorGUILayout.PropertyField (flareColorA, new GUIContent("1st Color")); + EditorGUILayout.PropertyField (flareColorB, new GUIContent("2nd Color")); + EditorGUILayout.EndHorizontal (); + + EditorGUILayout.BeginHorizontal (); + EditorGUILayout.PropertyField (flareColorC, new GUIContent("3rd Color")); + EditorGUILayout.PropertyField (flareColorD, new GUIContent("4th Color")); + EditorGUILayout.EndHorizontal (); + } + } + } else + lensflares.boolValue = false; // disable lens flares in simple tweak mode + + serObj.ApplyModifiedProperties(); + } + } +} diff --git a/Unity/SCANsat/Assets/Editor/ImageEffects/BloomAndFlaresEditor.cs.meta b/Unity/SCANsat/Assets/Editor/ImageEffects/BloomAndFlaresEditor.cs.meta new file mode 100644 index 000000000..a4f4e00be --- /dev/null +++ b/Unity/SCANsat/Assets/Editor/ImageEffects/BloomAndFlaresEditor.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 4deca87cb459d1642ac8f734856ca84e +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Unity/SCANsat/Assets/Editor/ImageEffects/BloomEditor.cs b/Unity/SCANsat/Assets/Editor/ImageEffects/BloomEditor.cs new file mode 100644 index 000000000..6957591fc --- /dev/null +++ b/Unity/SCANsat/Assets/Editor/ImageEffects/BloomEditor.cs @@ -0,0 +1,162 @@ +using System; +using UnityEditor; +using UnityEngine; + +namespace UnityStandardAssets.ImageEffects +{ + [CustomEditor (typeof(Bloom))] + class BloomEditor : Editor + { + SerializedProperty tweakMode; + SerializedProperty screenBlendMode; + + SerializedObject serObj; + + SerializedProperty hdr; + SerializedProperty quality; + SerializedProperty sepBlurSpread; + + SerializedProperty bloomIntensity; + SerializedProperty bloomThresholdColor; + SerializedProperty bloomThreshold; + SerializedProperty bloomBlurIterations; + + SerializedProperty hollywoodFlareBlurIterations; + + SerializedProperty lensflareMode; + SerializedProperty hollyStretchWidth; + SerializedProperty lensflareIntensity; + SerializedProperty flareRotation; + SerializedProperty lensFlareSaturation; + SerializedProperty lensflareThreshold; + SerializedProperty flareColorA; + SerializedProperty flareColorB; + SerializedProperty flareColorC; + SerializedProperty flareColorD; + + SerializedProperty lensFlareVignetteMask; + + void OnEnable () { + serObj = new SerializedObject (target); + + screenBlendMode = serObj.FindProperty("screenBlendMode"); + hdr = serObj.FindProperty("hdr"); + quality = serObj.FindProperty("quality"); + + sepBlurSpread = serObj.FindProperty("sepBlurSpread"); + + bloomIntensity = serObj.FindProperty("bloomIntensity"); + bloomThreshold = serObj.FindProperty("bloomThreshold"); + bloomThresholdColor = serObj.FindProperty("bloomThresholdColor"); + bloomBlurIterations = serObj.FindProperty("bloomBlurIterations"); + + lensflareMode = serObj.FindProperty("lensflareMode"); + hollywoodFlareBlurIterations = serObj.FindProperty("hollywoodFlareBlurIterations"); + hollyStretchWidth = serObj.FindProperty("hollyStretchWidth"); + lensflareIntensity = serObj.FindProperty("lensflareIntensity"); + lensflareThreshold = serObj.FindProperty("lensflareThreshold"); + lensFlareSaturation = serObj.FindProperty("lensFlareSaturation"); + flareRotation = serObj.FindProperty("flareRotation"); + flareColorA = serObj.FindProperty("flareColorA"); + flareColorB = serObj.FindProperty("flareColorB"); + flareColorC = serObj.FindProperty("flareColorC"); + flareColorD = serObj.FindProperty("flareColorD"); + lensFlareVignetteMask = serObj.FindProperty("lensFlareVignetteMask"); + + tweakMode = serObj.FindProperty("tweakMode"); + } + + + public override void OnInspectorGUI () { + serObj.Update(); + + EditorGUILayout.LabelField("Glow and Lens Flares for bright screen pixels", EditorStyles.miniLabel); + + EditorGUILayout.PropertyField (quality, new GUIContent("Quality", "High quality preserves high frequencies with bigger blurs and uses a better blending and down-/upsampling")); + + EditorGUILayout.Separator (); + + EditorGUILayout.PropertyField (tweakMode, new GUIContent("Mode")); + EditorGUILayout.PropertyField (screenBlendMode, new GUIContent("Blend")); + EditorGUILayout.PropertyField (hdr, new GUIContent("HDR")); + + EditorGUILayout.Separator (); + + // display info text when screen blend mode cannot be used + Camera cam = (target as Bloom).GetComponent(); + if (cam != null) { + if (screenBlendMode.enumValueIndex==0 && ((cam.hdr && hdr.enumValueIndex==0) || (hdr.enumValueIndex==1))) { + EditorGUILayout.HelpBox("Screen blend is not supported in HDR. Using 'Add' instead.", MessageType.Info); + } + } + + EditorGUILayout.PropertyField (bloomIntensity, new GUIContent("Intensity")); + bloomThreshold.floatValue = EditorGUILayout.Slider ("Threshold", bloomThreshold.floatValue, -0.05f, 4.0f); + if (1 == tweakMode.intValue) { + EditorGUILayout.PropertyField(bloomThresholdColor, new GUIContent(" RGB Threshold")); + } + EditorGUILayout.Separator (); + + bloomBlurIterations.intValue = EditorGUILayout.IntSlider ("Blur Iterations", bloomBlurIterations.intValue, 1, 4); + sepBlurSpread.floatValue = EditorGUILayout.Slider (" Sample Distance", sepBlurSpread.floatValue, 0.1f, 10.0f); + EditorGUILayout.Separator (); + + if (1 == tweakMode.intValue) { + // further lens flare tweakings + if (0 != tweakMode.intValue) + EditorGUILayout.PropertyField (lensflareMode, new GUIContent("Lens Flares")); + else + lensflareMode.enumValueIndex = 0; + + EditorGUILayout.PropertyField (lensflareIntensity, new GUIContent(" Local Intensity", "0 disables lens flares entirely (optimization)")); + lensflareThreshold.floatValue = EditorGUILayout.Slider ("Threshold", lensflareThreshold.floatValue, 0.0f, 4.0f); + + if (Mathf.Abs(lensflareIntensity.floatValue) > Mathf.Epsilon) { + if (lensflareMode.intValue == 0) { + // ghosting + EditorGUILayout.BeginHorizontal (); + EditorGUILayout.PropertyField (flareColorA, new GUIContent(" 1st Color")); + EditorGUILayout.PropertyField (flareColorB, new GUIContent(" 2nd Color")); + EditorGUILayout.EndHorizontal (); + + EditorGUILayout.BeginHorizontal (); + EditorGUILayout.PropertyField (flareColorC, new GUIContent(" 3rd Color")); + EditorGUILayout.PropertyField (flareColorD, new GUIContent(" 4th Color")); + EditorGUILayout.EndHorizontal (); + } + else if (lensflareMode.intValue == 1) { + // hollywood + EditorGUILayout.PropertyField (hollyStretchWidth, new GUIContent(" Stretch width")); + EditorGUILayout.PropertyField (flareRotation, new GUIContent( " Rotation")); + hollywoodFlareBlurIterations.intValue = EditorGUILayout.IntSlider (" Blur Iterations", hollywoodFlareBlurIterations.intValue, 1, 4); + + EditorGUILayout.PropertyField (lensFlareSaturation, new GUIContent(" Saturation")); + EditorGUILayout.PropertyField (flareColorA, new GUIContent(" Tint Color")); + } + else if (lensflareMode.intValue == 2) { + // both + EditorGUILayout.PropertyField (hollyStretchWidth, new GUIContent(" Stretch width")); + hollywoodFlareBlurIterations.intValue = EditorGUILayout.IntSlider (" Blur Iterations", hollywoodFlareBlurIterations.intValue, 1, 4); + + EditorGUILayout.PropertyField (lensFlareSaturation, new GUIContent(" Saturation")); + + EditorGUILayout.BeginHorizontal (); + EditorGUILayout.PropertyField (flareColorA, new GUIContent(" 1st Color")); + EditorGUILayout.PropertyField (flareColorB, new GUIContent(" 2nd Color")); + EditorGUILayout.EndHorizontal (); + + EditorGUILayout.BeginHorizontal (); + EditorGUILayout.PropertyField (flareColorC, new GUIContent(" 3rd Color")); + EditorGUILayout.PropertyField (flareColorD, new GUIContent(" 4th Color")); + EditorGUILayout.EndHorizontal (); + } + + EditorGUILayout.PropertyField(lensFlareVignetteMask, new GUIContent(" Mask", "This mask is needed to prevent lens flare artifacts")); + + } + } + + serObj.ApplyModifiedProperties(); + } + } +} diff --git a/Unity/SCANsat/Assets/Editor/ImageEffects/BloomEditor.cs.meta b/Unity/SCANsat/Assets/Editor/ImageEffects/BloomEditor.cs.meta new file mode 100644 index 000000000..ad4d3b3e0 --- /dev/null +++ b/Unity/SCANsat/Assets/Editor/ImageEffects/BloomEditor.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 43fcc28c40e404d4eabfc88b1dbda7b5 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Unity/SCANsat/Assets/Editor/ImageEffects/CameraMotionBlurEditor.cs b/Unity/SCANsat/Assets/Editor/ImageEffects/CameraMotionBlurEditor.cs new file mode 100644 index 000000000..bc1f5ffdb --- /dev/null +++ b/Unity/SCANsat/Assets/Editor/ImageEffects/CameraMotionBlurEditor.cs @@ -0,0 +1,99 @@ +using System; +using UnityEditor; +using UnityEngine; + +namespace UnityStandardAssets.ImageEffects +{ + [CustomEditor (typeof(CameraMotionBlur))] + class CameraMotionBlurEditor : Editor + { + SerializedObject serObj; + + SerializedProperty filterType; + SerializedProperty preview; + SerializedProperty previewScale; + SerializedProperty movementScale; + SerializedProperty jitter; + SerializedProperty rotationScale; + SerializedProperty maxVelocity; + SerializedProperty minVelocity; + SerializedProperty velocityScale; + SerializedProperty velocityDownsample; + SerializedProperty noiseTexture; + SerializedProperty showVelocity; + SerializedProperty showVelocityScale; + SerializedProperty excludeLayers; + + void OnEnable () { + serObj = new SerializedObject (target); + + filterType = serObj.FindProperty ("filterType"); + + preview = serObj.FindProperty ("preview"); + previewScale = serObj.FindProperty ("previewScale"); + + movementScale = serObj.FindProperty ("movementScale"); + rotationScale = serObj.FindProperty ("rotationScale"); + + maxVelocity = serObj.FindProperty ("maxVelocity"); + minVelocity = serObj.FindProperty ("minVelocity"); + + jitter = serObj.FindProperty ("jitter"); + + excludeLayers = serObj.FindProperty ("excludeLayers"); + + velocityScale = serObj.FindProperty ("velocityScale"); + velocityDownsample = serObj.FindProperty ("velocityDownsample"); + + noiseTexture = serObj.FindProperty ("noiseTexture"); + } + + + public override void OnInspectorGUI () { + serObj.Update (); + + EditorGUILayout.LabelField("Simulates camera based motion blur", EditorStyles.miniLabel); + + EditorGUILayout.PropertyField (filterType, new GUIContent("Technique")); + if (filterType.enumValueIndex == 3 && !(target as CameraMotionBlur).Dx11Support()) { + EditorGUILayout.HelpBox("DX11 mode not supported (need shader model 5)", MessageType.Info); + } + EditorGUILayout.PropertyField (velocityScale, new GUIContent(" Velocity Scale")); + if (filterType.enumValueIndex >= 2) { + EditorGUILayout.LabelField(" Tile size used during reconstruction filter:", EditorStyles.miniLabel); + EditorGUILayout.Slider(maxVelocity, 2.0f, 10.0f, new GUIContent(" Velocity Max")); + } + else + EditorGUILayout.Slider (maxVelocity, 2.0f, 10.0f, new GUIContent(" Velocity Max")); + EditorGUILayout.Slider(minVelocity, 0.0f, 10.0f, new GUIContent(" Velocity Min")); + + EditorGUILayout.Separator (); + + EditorGUILayout.LabelField("Technique Specific"); + + if (filterType.enumValueIndex == 0) { + // portal style motion blur + EditorGUILayout.PropertyField (rotationScale, new GUIContent(" Camera Rotation")); + EditorGUILayout.PropertyField (movementScale, new GUIContent(" Camera Movement")); + } + else { + // "plausible" blur or cheap, local blur + EditorGUILayout.PropertyField (excludeLayers, new GUIContent(" Exclude Layers")); + EditorGUILayout.PropertyField (velocityDownsample, new GUIContent(" Velocity Downsample")); + velocityDownsample.intValue = velocityDownsample.intValue < 1 ? 1 : velocityDownsample.intValue; + if (filterType.enumValueIndex >= 2) { // only display jitter for reconstruction + EditorGUILayout.PropertyField (noiseTexture, new GUIContent(" Sample Jitter")); + EditorGUILayout.Slider (jitter, 0.0f, 10.0f, new GUIContent(" Jitter Strength")); + } + } + + EditorGUILayout.Separator (); + + EditorGUILayout.PropertyField (preview, new GUIContent("Preview")); + if (preview.boolValue) + EditorGUILayout.PropertyField (previewScale, new GUIContent("")); + + serObj.ApplyModifiedProperties(); + } + } +} diff --git a/Unity/SCANsat/Assets/Editor/ImageEffects/CameraMotionBlurEditor.cs.meta b/Unity/SCANsat/Assets/Editor/ImageEffects/CameraMotionBlurEditor.cs.meta new file mode 100644 index 000000000..af6696961 --- /dev/null +++ b/Unity/SCANsat/Assets/Editor/ImageEffects/CameraMotionBlurEditor.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 80cbbe1c107bf5e43a96347d3dfc2658 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Unity/SCANsat/Assets/Editor/ImageEffects/ColorCorrectionCurvesEditor.cs b/Unity/SCANsat/Assets/Editor/ImageEffects/ColorCorrectionCurvesEditor.cs new file mode 100644 index 000000000..f37adb09e --- /dev/null +++ b/Unity/SCANsat/Assets/Editor/ImageEffects/ColorCorrectionCurvesEditor.cs @@ -0,0 +1,124 @@ +using System; +using UnityEditor; +using UnityEngine; + +namespace UnityStandardAssets.ImageEffects +{ + [CustomEditor (typeof(ColorCorrectionCurves))] + class ColorCorrectionCurvesEditor : Editor { + SerializedObject serObj; + + SerializedProperty mode; + + SerializedProperty redChannel; + SerializedProperty greenChannel; + SerializedProperty blueChannel; + + SerializedProperty useDepthCorrection; + + SerializedProperty depthRedChannel; + SerializedProperty depthGreenChannel; + SerializedProperty depthBlueChannel; + + SerializedProperty zCurveChannel; + + SerializedProperty saturation; + + SerializedProperty selectiveCc; + SerializedProperty selectiveFromColor; + SerializedProperty selectiveToColor; + + private bool applyCurveChanges = false; + + void OnEnable () { + serObj = new SerializedObject (target); + + mode = serObj.FindProperty ("mode"); + + saturation = serObj.FindProperty ("saturation"); + + redChannel = serObj.FindProperty ("redChannel"); + greenChannel = serObj.FindProperty ("greenChannel"); + blueChannel = serObj.FindProperty ("blueChannel"); + + useDepthCorrection = serObj.FindProperty ("useDepthCorrection"); + + zCurveChannel = serObj.FindProperty ("zCurve"); + + depthRedChannel = serObj.FindProperty ("depthRedChannel"); + depthGreenChannel = serObj.FindProperty ("depthGreenChannel"); + depthBlueChannel = serObj.FindProperty ("depthBlueChannel"); + + serObj.ApplyModifiedProperties (); + + selectiveCc = serObj.FindProperty ("selectiveCc"); + selectiveFromColor = serObj.FindProperty ("selectiveFromColor"); + selectiveToColor = serObj.FindProperty ("selectiveToColor"); + } + + void CurveGui ( string name, SerializedProperty animationCurve, Color color) { + // @NOTE: EditorGUILayout.CurveField is buggy and flickers, using PropertyField for now + //animationCurve.animationCurveValue = EditorGUILayout.CurveField (GUIContent (name), animationCurve.animationCurveValue, color, Rect (0.0f,0.0f,1.0f,1.0f)); + EditorGUILayout.PropertyField (animationCurve, new GUIContent (name)); + if (GUI.changed) + applyCurveChanges = true; + } + + void BeginCurves () { + applyCurveChanges = false; + } + + void ApplyCurves () { + if (applyCurveChanges) { + serObj.ApplyModifiedProperties (); + (serObj.targetObject as ColorCorrectionCurves).gameObject.SendMessage ("UpdateTextures"); + } + } + + + public override void OnInspectorGUI () { + serObj.Update (); + + GUILayout.Label ("Use curves to tweak RGB channel colors", EditorStyles.miniBoldLabel); + + saturation.floatValue = EditorGUILayout.Slider( "Saturation", saturation.floatValue, 0.0f, 5.0f); + + EditorGUILayout.PropertyField (mode, new GUIContent ("Mode")); + EditorGUILayout.Separator (); + + BeginCurves (); + + CurveGui (" Red", redChannel, Color.red); + CurveGui (" Green", greenChannel, Color.green); + CurveGui (" Blue", blueChannel, Color.blue); + + EditorGUILayout.Separator (); + + if (mode.intValue > 0) + useDepthCorrection.boolValue = true; + else + useDepthCorrection.boolValue = false; + + if (useDepthCorrection.boolValue) { + CurveGui (" Red (depth)", depthRedChannel, Color.red); + CurveGui (" Green (depth)", depthGreenChannel, Color.green); + CurveGui (" Blue (depth)", depthBlueChannel, Color.blue); + EditorGUILayout.Separator (); + CurveGui (" Blend Curve", zCurveChannel, Color.grey); + } + + EditorGUILayout.Separator (); + EditorGUILayout.PropertyField (selectiveCc, new GUIContent ("Selective")); + if (selectiveCc.boolValue) { + EditorGUILayout.PropertyField (selectiveFromColor, new GUIContent (" Key")); + EditorGUILayout.PropertyField (selectiveToColor, new GUIContent (" Target")); + } + + + ApplyCurves (); + + if (!applyCurveChanges) + serObj.ApplyModifiedProperties (); + } + } +} diff --git a/Unity/SCANsat/Assets/Editor/ImageEffects/ColorCorrectionCurvesEditor.cs.meta b/Unity/SCANsat/Assets/Editor/ImageEffects/ColorCorrectionCurvesEditor.cs.meta new file mode 100644 index 000000000..b1c7fa3ab --- /dev/null +++ b/Unity/SCANsat/Assets/Editor/ImageEffects/ColorCorrectionCurvesEditor.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: a4a9489f73e4f0344ab3fc97bdf5170b +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Unity/SCANsat/Assets/Editor/ImageEffects/ColorCorrectionLookupEditor.cs b/Unity/SCANsat/Assets/Editor/ImageEffects/ColorCorrectionLookupEditor.cs new file mode 100644 index 000000000..8e68e21ed --- /dev/null +++ b/Unity/SCANsat/Assets/Editor/ImageEffects/ColorCorrectionLookupEditor.cs @@ -0,0 +1,90 @@ +using System; +using UnityEditor; +using UnityEngine; + +namespace UnityStandardAssets.ImageEffects +{ + [CustomEditor (typeof(ColorCorrectionLookup))] + class ColorCorrectionLookupEditor : Editor + { + SerializedObject serObj; + + void OnEnable () { + serObj = new SerializedObject (target); + } + + private Texture2D tempClutTex2D; + + + public override void OnInspectorGUI () { + serObj.Update (); + + EditorGUILayout.LabelField("Converts textures into color lookup volumes (for grading)", EditorStyles.miniLabel); + + //EditorGUILayout.LabelField("Change Lookup Texture (LUT):"); + //EditorGUILayout.BeginHorizontal (); + //Rect r = GUILayoutUtility.GetAspectRect(1.0ff); + + Rect r; Texture2D t; + + //EditorGUILayout.Space(); + tempClutTex2D = EditorGUILayout.ObjectField (" Based on", tempClutTex2D, typeof(Texture2D), false) as Texture2D; + if (tempClutTex2D == null) { + t = AssetDatabase.LoadMainAssetAtPath(((ColorCorrectionLookup)target).basedOnTempTex) as Texture2D; + if (t) tempClutTex2D = t; + } + + Texture2D tex = tempClutTex2D; + + if (tex && (target as ColorCorrectionLookup).basedOnTempTex != AssetDatabase.GetAssetPath(tex)) + { + EditorGUILayout.Separator(); + if (!(target as ColorCorrectionLookup).ValidDimensions(tex)) + { + EditorGUILayout.HelpBox ("Invalid texture dimensions!\nPick another texture or adjust dimension to e.g. 256x16.", MessageType.Warning); + } + else if (GUILayout.Button ("Convert and Apply")) + { + string path = AssetDatabase.GetAssetPath (tex); + TextureImporter textureImporter = AssetImporter.GetAtPath(path) as TextureImporter; + bool doImport = textureImporter.isReadable == false; + if (textureImporter.mipmapEnabled == true) { + doImport = true; + } + if (textureImporter.textureFormat != TextureImporterFormat.AutomaticTruecolor) { + doImport = true; + } + + if (doImport) + { + textureImporter.isReadable = true; + textureImporter.mipmapEnabled = false; + textureImporter.textureFormat = TextureImporterFormat.AutomaticTruecolor; + AssetDatabase.ImportAsset (path, ImportAssetOptions.ForceUpdate); + //tex = AssetDatabase.LoadMainAssetAtPath(path); + } + + (target as ColorCorrectionLookup).Convert(tex, path); + } + } + + if ((target as ColorCorrectionLookup).basedOnTempTex != "") + { + EditorGUILayout.HelpBox("Using " + (target as ColorCorrectionLookup).basedOnTempTex, MessageType.Info); + t = AssetDatabase.LoadMainAssetAtPath(((ColorCorrectionLookup)target).basedOnTempTex) as Texture2D; + if (t) { + r = GUILayoutUtility.GetLastRect(); + r = GUILayoutUtility.GetRect(r.width, 20); + r.x += r.width * 0.05f/2.0f; + r.width *= 0.95f; + GUI.DrawTexture (r, t); + GUILayoutUtility.GetRect(r.width, 4); + } + } + + //EditorGUILayout.EndHorizontal (); + + serObj.ApplyModifiedProperties(); + } + } +} diff --git a/Unity/SCANsat/Assets/Editor/ImageEffects/ColorCorrectionLookupEditor.cs.meta b/Unity/SCANsat/Assets/Editor/ImageEffects/ColorCorrectionLookupEditor.cs.meta new file mode 100644 index 000000000..9286d0efa --- /dev/null +++ b/Unity/SCANsat/Assets/Editor/ImageEffects/ColorCorrectionLookupEditor.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 66c17be95fbf398439ea09f8892a8b43 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Unity/SCANsat/Assets/Editor/ImageEffects/CreaseShadingEditor.cs b/Unity/SCANsat/Assets/Editor/ImageEffects/CreaseShadingEditor.cs new file mode 100644 index 000000000..da5d62d6f --- /dev/null +++ b/Unity/SCANsat/Assets/Editor/ImageEffects/CreaseShadingEditor.cs @@ -0,0 +1,60 @@ +using System; +using UnityEditor; +using UnityEditor.AnimatedValues; +using UnityEngine; + +namespace UnityStandardAssets.ImageEffects +{ + [CustomEditor(typeof(CreaseShading))] + class CreaseShadingEditor : Editor { + SerializedObject serObj; + + SerializedProperty m_intensity; + SerializedProperty m_softness; + SerializedProperty m_spread; + + AnimBool m_showSoftnessWarning = new AnimBool(); + AnimBool m_showSpreadWarning = new AnimBool(); + + private bool softnessWarningValue { get { return m_softness.intValue > 4; } } + private bool spreadWarningValue { get { return m_spread.floatValue > 4; } } + + void OnEnable () { + serObj = new SerializedObject (target); + + m_intensity = serObj.FindProperty("intensity"); + m_softness = serObj.FindProperty("softness"); + m_spread = serObj.FindProperty("spread"); + + m_showSoftnessWarning.valueChanged.AddListener(Repaint); + m_showSpreadWarning.valueChanged.AddListener(Repaint); + + m_showSoftnessWarning.value = softnessWarningValue; + m_showSpreadWarning.value = spreadWarningValue; + } + + public override void OnInspectorGUI () { + serObj.Update (); + + EditorGUILayout.Slider(m_intensity, -5.0f, 5.0f, new GUIContent("Intensity")); + + EditorGUILayout.IntSlider(m_softness, 0, 15, new GUIContent("Softness")); + m_showSoftnessWarning.target = softnessWarningValue; + if (EditorGUILayout.BeginFadeGroup(m_showSoftnessWarning.faded)) + { + EditorGUILayout.HelpBox("High Softness value might reduce performance.", MessageType.Warning, false); + } + EditorGUILayout.EndFadeGroup(); + + EditorGUILayout.Slider(m_spread, 0.0f, 50.0f, new GUIContent("Spread")); + m_showSpreadWarning.target = spreadWarningValue; + if (EditorGUILayout.BeginFadeGroup(m_showSpreadWarning.faded)) + { + EditorGUILayout.HelpBox("High Spread value might introduce visual artifacts.", MessageType.Warning, false); + } + EditorGUILayout.EndFadeGroup(); + + serObj.ApplyModifiedProperties (); + } + } +} diff --git a/Unity/SCANsat/Assets/Editor/ImageEffects/CreaseShadingEditor.cs.meta b/Unity/SCANsat/Assets/Editor/ImageEffects/CreaseShadingEditor.cs.meta new file mode 100644 index 000000000..85fb4bae9 --- /dev/null +++ b/Unity/SCANsat/Assets/Editor/ImageEffects/CreaseShadingEditor.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 6788af605d2f1244789565913bb4e7f6 +timeCreated: 1434032656 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Editor/ImageEffects/DepthOfFieldDeprecatedEditor.cs b/Unity/SCANsat/Assets/Editor/ImageEffects/DepthOfFieldDeprecatedEditor.cs new file mode 100644 index 000000000..b1e5b84e1 --- /dev/null +++ b/Unity/SCANsat/Assets/Editor/ImageEffects/DepthOfFieldDeprecatedEditor.cs @@ -0,0 +1,149 @@ +using System; +using UnityEditor; +using UnityEngine; + +namespace UnityStandardAssets.ImageEffects +{ + [CustomEditor (typeof(DepthOfFieldDeprecated))] + class DepthOfFieldDeprecatedEditor : Editor + { + SerializedObject serObj; + + SerializedProperty simpleTweakMode; + + SerializedProperty focalPoint; + SerializedProperty smoothness; + + SerializedProperty focalSize; + + SerializedProperty focalZDistance; + SerializedProperty focalStartCurve; + SerializedProperty focalEndCurve; + + SerializedProperty visualizeCoc; + + SerializedProperty resolution; + SerializedProperty quality; + + SerializedProperty objectFocus; + + SerializedProperty bokeh; + SerializedProperty bokehScale; + SerializedProperty bokehIntensity; + SerializedProperty bokehThresholdLuminance; + SerializedProperty bokehThresholdContrast; + SerializedProperty bokehDownsample; + SerializedProperty bokehTexture; + SerializedProperty bokehDestination; + + SerializedProperty bluriness; + SerializedProperty maxBlurSpread; + SerializedProperty foregroundBlurExtrude; + + void OnEnable () { + serObj = new SerializedObject (target); + + simpleTweakMode = serObj.FindProperty ("simpleTweakMode"); + + // simple tweak mode + focalPoint = serObj.FindProperty ("focalPoint"); + smoothness = serObj.FindProperty ("smoothness"); + + // complex tweak mode + focalZDistance = serObj.FindProperty ("focalZDistance"); + focalStartCurve = serObj.FindProperty ("focalZStartCurve"); + focalEndCurve = serObj.FindProperty ("focalZEndCurve"); + focalSize = serObj.FindProperty ("focalSize"); + + visualizeCoc = serObj.FindProperty ("visualize"); + + objectFocus = serObj.FindProperty ("objectFocus"); + + resolution = serObj.FindProperty ("resolution"); + quality = serObj.FindProperty ("quality"); + bokehThresholdContrast = serObj.FindProperty ("bokehThresholdContrast"); + bokehThresholdLuminance = serObj.FindProperty ("bokehThresholdLuminance"); + + bokeh = serObj.FindProperty ("bokeh"); + bokehScale = serObj.FindProperty ("bokehScale"); + bokehIntensity = serObj.FindProperty ("bokehIntensity"); + bokehDownsample = serObj.FindProperty ("bokehDownsample"); + bokehTexture = serObj.FindProperty ("bokehTexture"); + bokehDestination = serObj.FindProperty ("bokehDestination"); + + bluriness = serObj.FindProperty ("bluriness"); + maxBlurSpread = serObj.FindProperty ("maxBlurSpread"); + foregroundBlurExtrude = serObj.FindProperty ("foregroundBlurExtrude"); + } + + + public override void OnInspectorGUI () { + serObj.Update (); + + GameObject go = (target as DepthOfFieldDeprecated).gameObject; + + if (!go) + return; + + if (!go.GetComponent()) + return; + + if (simpleTweakMode.boolValue) + GUILayout.Label ("Current: "+go.GetComponent().name+", near "+go.GetComponent().nearClipPlane+", far: "+go.GetComponent().farClipPlane+", focal: "+focalPoint.floatValue, EditorStyles.miniBoldLabel); + else + GUILayout.Label ("Current: "+go.GetComponent().name+", near "+go.GetComponent().nearClipPlane+", far: "+go.GetComponent().farClipPlane+", focal: "+focalZDistance.floatValue, EditorStyles.miniBoldLabel); + + EditorGUILayout.PropertyField (resolution, new GUIContent("Resolution")); + EditorGUILayout.PropertyField (quality, new GUIContent("Quality")); + + EditorGUILayout.PropertyField (simpleTweakMode, new GUIContent("Simple tweak")); + EditorGUILayout.PropertyField (visualizeCoc, new GUIContent("Visualize focus")); + EditorGUILayout.PropertyField (bokeh, new GUIContent("Enable bokeh")); + + + EditorGUILayout.Separator (); + + GUILayout.Label ("Focal Settings", EditorStyles.boldLabel); + + if (simpleTweakMode.boolValue) { + focalPoint.floatValue = EditorGUILayout.Slider ("Focal distance", focalPoint.floatValue, go.GetComponent().nearClipPlane, go.GetComponent().farClipPlane); + EditorGUILayout.PropertyField (objectFocus, new GUIContent("Transform")); + EditorGUILayout.PropertyField (smoothness, new GUIContent("Smoothness")); + focalSize.floatValue = EditorGUILayout.Slider ("Focal size", focalSize.floatValue, 0.0f, (go.GetComponent().farClipPlane - go.GetComponent().nearClipPlane)); + } + else { + focalZDistance.floatValue = EditorGUILayout.Slider ("Distance", focalZDistance.floatValue, go.GetComponent().nearClipPlane, go.GetComponent().farClipPlane); + EditorGUILayout.PropertyField (objectFocus, new GUIContent("Transform")); + focalSize.floatValue = EditorGUILayout.Slider ("Size", focalSize.floatValue, 0.0f, (go.GetComponent().farClipPlane - go.GetComponent().nearClipPlane)); + focalStartCurve.floatValue = EditorGUILayout.Slider ("Start curve", focalStartCurve.floatValue, 0.05f, 20.0f); + focalEndCurve.floatValue = EditorGUILayout.Slider ("End curve", focalEndCurve.floatValue, 0.05f, 20.0f); + } + + EditorGUILayout.Separator (); + + GUILayout.Label ("Blur (Fore- and Background)", EditorStyles.boldLabel); + EditorGUILayout.PropertyField (bluriness, new GUIContent("Blurriness")); + EditorGUILayout.PropertyField (maxBlurSpread, new GUIContent("Blur spread")); + + if (quality.enumValueIndex > 0) { + EditorGUILayout.PropertyField (foregroundBlurExtrude, new GUIContent("Foreground size")); + } + + EditorGUILayout.Separator (); + + if (bokeh.boolValue) { + EditorGUILayout.Separator (); + GUILayout.Label ("Bokeh Settings", EditorStyles.boldLabel); + EditorGUILayout.PropertyField (bokehDestination, new GUIContent("Destination")); + bokehIntensity.floatValue = EditorGUILayout.Slider ("Intensity", bokehIntensity.floatValue, 0.0f, 1.0f); + bokehThresholdLuminance.floatValue = EditorGUILayout.Slider ("Min luminance", bokehThresholdLuminance.floatValue, 0.0f, 0.99f); + bokehThresholdContrast.floatValue = EditorGUILayout.Slider ("Min contrast", bokehThresholdContrast.floatValue, 0.0f, 0.25f); + bokehDownsample.intValue = EditorGUILayout.IntSlider ("Downsample", bokehDownsample.intValue, 1, 3); + bokehScale.floatValue = EditorGUILayout.Slider ("Size scale", bokehScale.floatValue, 0.0f, 20.0f); + EditorGUILayout.PropertyField (bokehTexture , new GUIContent("Texture mask")); + } + + serObj.ApplyModifiedProperties(); + } + } +} diff --git a/Unity/SCANsat/Assets/Editor/ImageEffects/DepthOfFieldDeprecatedEditor.cs.meta b/Unity/SCANsat/Assets/Editor/ImageEffects/DepthOfFieldDeprecatedEditor.cs.meta new file mode 100644 index 000000000..cf226312b --- /dev/null +++ b/Unity/SCANsat/Assets/Editor/ImageEffects/DepthOfFieldDeprecatedEditor.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 943c59645eb905144a0990b57e13a6f9 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Unity/SCANsat/Assets/Editor/ImageEffects/DepthOfFieldEditor.cs b/Unity/SCANsat/Assets/Editor/ImageEffects/DepthOfFieldEditor.cs new file mode 100644 index 000000000..acd7aca58 --- /dev/null +++ b/Unity/SCANsat/Assets/Editor/ImageEffects/DepthOfFieldEditor.cs @@ -0,0 +1,161 @@ +using System; +using UnityEditor; +using UnityEditor.AnimatedValues; +using UnityEngine; + +namespace UnityStandardAssets.ImageEffects +{ + [CustomEditor(typeof(DepthOfField))] + class DepthOfFieldEditor : Editor + { + SerializedObject serObj; + + SerializedProperty visualizeFocus; + SerializedProperty focalLength; + SerializedProperty focalSize; + SerializedProperty aperture; + SerializedProperty focalTransform; + SerializedProperty maxBlurSize; + SerializedProperty highResolution; + + SerializedProperty blurType; + SerializedProperty blurSampleCount; + + SerializedProperty nearBlur; + SerializedProperty foregroundOverlap; + + SerializedProperty dx11BokehThreshold; + SerializedProperty dx11SpawnHeuristic; + SerializedProperty dx11BokehTexture; + SerializedProperty dx11BokehScale; + SerializedProperty dx11BokehIntensity; + + AnimBool showFocalDistance = new AnimBool(); + AnimBool showDiscBlurSettings = new AnimBool(); + AnimBool showDX11BlurSettings = new AnimBool(); + AnimBool showNearBlurOverlapSize = new AnimBool(); + + bool useFocalDistance { get { return focalTransform.objectReferenceValue == null; } } + bool useDiscBlur { get { return blurType.enumValueIndex < 1; } } + bool useDX11Blur { get { return blurType.enumValueIndex > 0; } } + bool useNearBlur { get { return nearBlur.boolValue; } } + + + void OnEnable() + { + serObj = new SerializedObject(target); + + visualizeFocus = serObj.FindProperty("visualizeFocus"); + + focalLength = serObj.FindProperty("focalLength"); + focalSize = serObj.FindProperty("focalSize"); + aperture = serObj.FindProperty("aperture"); + focalTransform = serObj.FindProperty("focalTransform"); + maxBlurSize = serObj.FindProperty("maxBlurSize"); + highResolution = serObj.FindProperty("highResolution"); + + blurType = serObj.FindProperty("blurType"); + blurSampleCount = serObj.FindProperty("blurSampleCount"); + + nearBlur = serObj.FindProperty("nearBlur"); + foregroundOverlap = serObj.FindProperty("foregroundOverlap"); + + dx11BokehThreshold = serObj.FindProperty("dx11BokehThreshold"); + dx11SpawnHeuristic = serObj.FindProperty("dx11SpawnHeuristic"); + dx11BokehTexture = serObj.FindProperty("dx11BokehTexture"); + dx11BokehScale = serObj.FindProperty("dx11BokehScale"); + dx11BokehIntensity = serObj.FindProperty("dx11BokehIntensity"); + + InitializedAnimBools(); + } + + void InitializedAnimBools() + { + showFocalDistance.valueChanged.AddListener(Repaint); + showFocalDistance.value = useFocalDistance; + + showDiscBlurSettings.valueChanged.AddListener(Repaint); + showDiscBlurSettings.value = useDiscBlur; + + showDX11BlurSettings.valueChanged.AddListener(Repaint); + showDX11BlurSettings.value = useDX11Blur; + + showNearBlurOverlapSize.valueChanged.AddListener(Repaint); + showNearBlurOverlapSize.value = useNearBlur; + } + + + void UpdateAnimBoolTargets() + { + showFocalDistance.target = useFocalDistance; + showDiscBlurSettings.target = useDiscBlur; + showDX11BlurSettings.target = useDX11Blur; + showNearBlurOverlapSize.target = useNearBlur; + } + + + public override void OnInspectorGUI() + { + serObj.Update(); + + UpdateAnimBoolTargets(); + + EditorGUILayout.LabelField("Simulates camera lens defocus", EditorStyles.miniLabel); + + GUILayout.Label("Focal Settings"); + EditorGUILayout.PropertyField(visualizeFocus, new GUIContent(" Visualize")); + EditorGUILayout.PropertyField(focalTransform, new GUIContent(" Focus on Transform")); + + if (EditorGUILayout.BeginFadeGroup(showFocalDistance.faded)) + { + EditorGUILayout.PropertyField(focalLength, new GUIContent(" Focal Distance")); + } + EditorGUILayout.EndFadeGroup(); + + EditorGUILayout.Slider(focalSize, 0.0f, 2.0f, new GUIContent(" Focal Size")); + EditorGUILayout.Slider(aperture, 0.0f, 1.0f, new GUIContent(" Aperture")); + + EditorGUILayout.Separator(); + + EditorGUILayout.PropertyField(blurType, new GUIContent("Defocus Type")); + + if (!(target as DepthOfField).Dx11Support() && blurType.enumValueIndex > 0) + { + EditorGUILayout.HelpBox("DX11 mode not supported (need shader model 5)", MessageType.Info); + } + + if (EditorGUILayout.BeginFadeGroup(showDiscBlurSettings.faded)) + { + EditorGUILayout.PropertyField(blurSampleCount, new GUIContent(" Sample Count")); + } + EditorGUILayout.EndFadeGroup(); + + EditorGUILayout.Slider(maxBlurSize, 0.1f, 2.0f, new GUIContent(" Max Blur Distance")); + EditorGUILayout.PropertyField(highResolution, new GUIContent(" High Resolution")); + + EditorGUILayout.Separator(); + + EditorGUILayout.PropertyField(nearBlur, new GUIContent("Near Blur")); + if (EditorGUILayout.BeginFadeGroup(showNearBlurOverlapSize.faded)) + { + EditorGUILayout.Slider(foregroundOverlap, 0.1f, 2.0f, new GUIContent(" Overlap Size")); + } + EditorGUILayout.EndFadeGroup(); + + EditorGUILayout.Separator(); + + if (EditorGUILayout.BeginFadeGroup(showDX11BlurSettings.faded)) + { + GUILayout.Label("DX11 Bokeh Settings"); + EditorGUILayout.PropertyField(dx11BokehTexture, new GUIContent(" Bokeh Texture")); + EditorGUILayout.Slider(dx11BokehScale, 0.0f, 50.0f, new GUIContent(" Bokeh Scale")); + EditorGUILayout.Slider(dx11BokehIntensity, 0.0f, 100.0f, new GUIContent(" Bokeh Intensity")); + EditorGUILayout.Slider(dx11BokehThreshold, 0.0f, 1.0f, new GUIContent(" Min Luminance")); + EditorGUILayout.Slider(dx11SpawnHeuristic, 0.01f, 1.0f, new GUIContent(" Spawn Heuristic")); + } + EditorGUILayout.EndFadeGroup(); + + serObj.ApplyModifiedProperties(); + } + } +} diff --git a/Unity/SCANsat/Assets/Editor/ImageEffects/DepthOfFieldEditor.cs.meta b/Unity/SCANsat/Assets/Editor/ImageEffects/DepthOfFieldEditor.cs.meta new file mode 100644 index 000000000..8d85a2e4e --- /dev/null +++ b/Unity/SCANsat/Assets/Editor/ImageEffects/DepthOfFieldEditor.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 427fdf36119bab44a9131abd19b90f57 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Unity/SCANsat/Assets/Editor/ImageEffects/EdgeDetectionEditor.cs b/Unity/SCANsat/Assets/Editor/ImageEffects/EdgeDetectionEditor.cs new file mode 100644 index 000000000..9d2d7a5da --- /dev/null +++ b/Unity/SCANsat/Assets/Editor/ImageEffects/EdgeDetectionEditor.cs @@ -0,0 +1,72 @@ +using System; +using UnityEditor; +using UnityEngine; + +namespace UnityStandardAssets.ImageEffects +{ + [CustomEditor (typeof(EdgeDetection))] + class EdgeDetectionEditor : Editor + { + SerializedObject serObj; + + SerializedProperty mode; + SerializedProperty sensitivityDepth; + SerializedProperty sensitivityNormals; + + SerializedProperty lumThreshold; + + SerializedProperty edgesOnly; + SerializedProperty edgesOnlyBgColor; + + SerializedProperty edgeExp; + SerializedProperty sampleDist; + + + void OnEnable () { + serObj = new SerializedObject (target); + + mode = serObj.FindProperty("mode"); + + sensitivityDepth = serObj.FindProperty("sensitivityDepth"); + sensitivityNormals = serObj.FindProperty("sensitivityNormals"); + + lumThreshold = serObj.FindProperty("lumThreshold"); + + edgesOnly = serObj.FindProperty("edgesOnly"); + edgesOnlyBgColor = serObj.FindProperty("edgesOnlyBgColor"); + + edgeExp = serObj.FindProperty("edgeExp"); + sampleDist = serObj.FindProperty("sampleDist"); + } + + + public override void OnInspectorGUI () { + serObj.Update (); + + GUILayout.Label("Detects spatial differences and converts into black outlines", EditorStyles.miniBoldLabel); + EditorGUILayout.PropertyField (mode, new GUIContent("Mode")); + + if (mode.intValue < 2) { + EditorGUILayout.PropertyField (sensitivityDepth, new GUIContent(" Depth Sensitivity")); + EditorGUILayout.PropertyField (sensitivityNormals, new GUIContent(" Normals Sensitivity")); + } + else if (mode.intValue < 4) { + EditorGUILayout.PropertyField (edgeExp, new GUIContent(" Edge Exponent")); + } + else { + // lum based mode + EditorGUILayout.PropertyField (lumThreshold, new GUIContent(" Luminance Threshold")); + } + + EditorGUILayout.PropertyField (sampleDist, new GUIContent(" Sample Distance")); + + EditorGUILayout.Separator (); + + GUILayout.Label ("Background Options"); + edgesOnly.floatValue = EditorGUILayout.Slider (" Edges only", edgesOnly.floatValue, 0.0f, 1.0f); + EditorGUILayout.PropertyField (edgesOnlyBgColor, new GUIContent (" Color")); + + serObj.ApplyModifiedProperties(); + } + } +} diff --git a/Unity/SCANsat/Assets/Editor/ImageEffects/EdgeDetectionEditor.cs.meta b/Unity/SCANsat/Assets/Editor/ImageEffects/EdgeDetectionEditor.cs.meta new file mode 100644 index 000000000..3ec10ca6a --- /dev/null +++ b/Unity/SCANsat/Assets/Editor/ImageEffects/EdgeDetectionEditor.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: b5f1618d14cd80f4da910f00b04af37f +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Unity/SCANsat/Assets/Editor/ImageEffects/NoiseAndGrainEditor.cs b/Unity/SCANsat/Assets/Editor/ImageEffects/NoiseAndGrainEditor.cs new file mode 100644 index 000000000..5b31336b9 --- /dev/null +++ b/Unity/SCANsat/Assets/Editor/ImageEffects/NoiseAndGrainEditor.cs @@ -0,0 +1,111 @@ +using System; +using UnityEditor; +using UnityEngine; + +namespace UnityStandardAssets.ImageEffects +{ + [CustomEditor (typeof( NoiseAndGrain))] + class NoiseAndGrainEditor : Editor + { + SerializedObject serObj; + + SerializedProperty intensityMultiplier; + SerializedProperty generalIntensity; + SerializedProperty blackIntensity; + SerializedProperty whiteIntensity; + SerializedProperty midGrey; + + SerializedProperty dx11Grain; + SerializedProperty softness; + SerializedProperty monochrome; + + SerializedProperty intensities; + SerializedProperty tiling; + SerializedProperty monochromeTiling; + + SerializedProperty noiseTexture; + SerializedProperty filterMode; + + void OnEnable () { + serObj = new SerializedObject (target); + + intensityMultiplier = serObj.FindProperty("intensityMultiplier"); + generalIntensity = serObj.FindProperty("generalIntensity"); + blackIntensity = serObj.FindProperty("blackIntensity"); + whiteIntensity = serObj.FindProperty("whiteIntensity"); + midGrey = serObj.FindProperty("midGrey"); + + dx11Grain = serObj.FindProperty("dx11Grain"); + softness = serObj.FindProperty("softness"); + monochrome = serObj.FindProperty("monochrome"); + + intensities = serObj.FindProperty("intensities"); + tiling = serObj.FindProperty("tiling"); + monochromeTiling = serObj.FindProperty("monochromeTiling"); + + noiseTexture = serObj.FindProperty("noiseTexture"); + filterMode = serObj.FindProperty("filterMode"); + } + + + public override void OnInspectorGUI () { + serObj.Update(); + + EditorGUILayout.LabelField("Overlays animated noise patterns", EditorStyles.miniLabel); + + EditorGUILayout.PropertyField(dx11Grain, new GUIContent("DirectX 11 Grain")); + + if (dx11Grain.boolValue && !(target as NoiseAndGrain).Dx11Support()) { + EditorGUILayout.HelpBox("DX11 mode not supported (need DX11 GPU and enable DX11 in PlayerSettings)", MessageType.Info); + } + + EditorGUILayout.PropertyField(monochrome, new GUIContent("Monochrome")); + + EditorGUILayout.Separator(); + + EditorGUILayout.Slider(intensityMultiplier, 0.0f, 10.0f, new GUIContent("Intensity Multiplier")); + EditorGUILayout.Slider(generalIntensity, 0.0f, 1.0f, new GUIContent(" General")); + EditorGUILayout.Slider(blackIntensity, 0.0f, 1.0f, new GUIContent(" Black Boost")); + EditorGUILayout.Slider(whiteIntensity, 0.0f, 1.0f, new GUIContent(" White Boost")); + midGrey.floatValue = EditorGUILayout.Slider( new GUIContent(" Mid Grey (for Boost)"), midGrey.floatValue, 0.0f, 1.0f); + if (monochrome.boolValue == false) { + Color c = new Color(intensities.vector3Value.x,intensities.vector3Value.y,intensities.vector3Value.z,1.0f); + c = EditorGUILayout.ColorField(new GUIContent(" Color Weights"), c); + intensities.vector3Value = new Vector3(c.r, c.g, c.b); + } + + if (!dx11Grain.boolValue) { + EditorGUILayout.Separator(); + + EditorGUILayout.LabelField("Noise Shape"); + EditorGUILayout.PropertyField(noiseTexture, new GUIContent(" Texture")); + EditorGUILayout.PropertyField(filterMode, new GUIContent(" Filter")); + } + else { + EditorGUILayout.Separator(); + EditorGUILayout.LabelField("Noise Shape"); + } + + softness.floatValue = EditorGUILayout.Slider( new GUIContent(" Softness"),softness.floatValue, 0.0f, 0.99f); + + if (!dx11Grain.boolValue) { + EditorGUILayout.Separator(); + EditorGUILayout.LabelField("Advanced"); + + if (monochrome.boolValue == false) + { + Vector3 temp = tiling.vector3Value; + temp.x = EditorGUILayout.FloatField(new GUIContent(" Tiling (Red)"), tiling.vector3Value.x); + temp.y = EditorGUILayout.FloatField(new GUIContent(" Tiling (Green)"), tiling.vector3Value.y); + temp.z = EditorGUILayout.FloatField(new GUIContent(" Tiling (Blue)"), tiling.vector3Value.z); + tiling.vector3Value = temp; + } + else { + EditorGUILayout.PropertyField(monochromeTiling, new GUIContent(" Tiling")); + } + } + + serObj.ApplyModifiedProperties(); + } + } +} diff --git a/Unity/SCANsat/Assets/Editor/ImageEffects/NoiseAndGrainEditor.cs.meta b/Unity/SCANsat/Assets/Editor/ImageEffects/NoiseAndGrainEditor.cs.meta new file mode 100644 index 000000000..1ca666a01 --- /dev/null +++ b/Unity/SCANsat/Assets/Editor/ImageEffects/NoiseAndGrainEditor.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: abd63abcc46fbcb4588164b671b52d3b +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Unity/SCANsat/Assets/Editor/ImageEffects/SunShaftsEditor.cs b/Unity/SCANsat/Assets/Editor/ImageEffects/SunShaftsEditor.cs new file mode 100644 index 000000000..51deae7ed --- /dev/null +++ b/Unity/SCANsat/Assets/Editor/ImageEffects/SunShaftsEditor.cs @@ -0,0 +1,105 @@ +using System; +using UnityEditor; +using UnityEngine; + +namespace UnityStandardAssets.ImageEffects +{ + [CustomEditor (typeof(SunShafts))] + class SunShaftsEditor : Editor + { + SerializedObject serObj; + + SerializedProperty sunTransform; + SerializedProperty radialBlurIterations; + SerializedProperty sunColor; + SerializedProperty sunThreshold; + SerializedProperty sunShaftBlurRadius; + SerializedProperty sunShaftIntensity; + SerializedProperty useDepthTexture; + SerializedProperty resolution; + SerializedProperty screenBlendMode; + SerializedProperty maxRadius; + + void OnEnable () { + serObj = new SerializedObject (target); + + screenBlendMode = serObj.FindProperty("screenBlendMode"); + + sunTransform = serObj.FindProperty("sunTransform"); + sunColor = serObj.FindProperty("sunColor"); + sunThreshold = serObj.FindProperty("sunThreshold"); + + sunShaftBlurRadius = serObj.FindProperty("sunShaftBlurRadius"); + radialBlurIterations = serObj.FindProperty("radialBlurIterations"); + + sunShaftIntensity = serObj.FindProperty("sunShaftIntensity"); + + resolution = serObj.FindProperty("resolution"); + + maxRadius = serObj.FindProperty("maxRadius"); + + useDepthTexture = serObj.FindProperty("useDepthTexture"); + } + + + public override void OnInspectorGUI () { + serObj.Update (); + + EditorGUILayout.BeginHorizontal(); + + EditorGUILayout.PropertyField (useDepthTexture, new GUIContent ("Rely on Z Buffer?")); + if ((target as SunShafts).GetComponent()) + GUILayout.Label("Current camera mode: "+ (target as SunShafts).GetComponent().depthTextureMode, EditorStyles.miniBoldLabel); + + EditorGUILayout.EndHorizontal(); + + // depth buffer need + /* + bool newVal = useDepthTexture.boolValue; + if (newVal != oldVal) { + if (newVal) + (target as SunShafts).camera.depthTextureMode |= DepthTextureMode.Depth; + else + (target as SunShafts).camera.depthTextureMode &= ~DepthTextureMode.Depth; + } + */ + + EditorGUILayout.PropertyField (resolution, new GUIContent("Resolution")); + EditorGUILayout.PropertyField (screenBlendMode, new GUIContent("Blend mode")); + + EditorGUILayout.Separator (); + + EditorGUILayout.BeginHorizontal(); + + EditorGUILayout.PropertyField (sunTransform, new GUIContent("Shafts caster", "Chose a transform that acts as a root point for the produced sun shafts")); + if ((target as SunShafts).sunTransform && (target as SunShafts).GetComponent()) { + if (GUILayout.Button("Center on " + (target as SunShafts).GetComponent().name)) { + if (EditorUtility.DisplayDialog ("Move sun shafts source?", "The SunShafts caster named "+ (target as SunShafts).sunTransform.name +"\n will be centered along "+(target as SunShafts).GetComponent().name+". Are you sure? ", "Please do", "Don't")) { + Ray ray = (target as SunShafts).GetComponent().ViewportPointToRay(new Vector3(0.5f,0.5f,0)); + (target as SunShafts).sunTransform.position = ray.origin + ray.direction * 500.0f; + (target as SunShafts).sunTransform.LookAt ((target as SunShafts).transform); + } + } + } + + EditorGUILayout.EndHorizontal(); + + EditorGUILayout.Separator (); + + EditorGUILayout.PropertyField (sunThreshold, new GUIContent ("Threshold color")); + EditorGUILayout.PropertyField (sunColor, new GUIContent ("Shafts color")); + maxRadius.floatValue = 1.0f - EditorGUILayout.Slider ("Distance falloff", 1.0f - maxRadius.floatValue, 0.1f, 1.0f); + + EditorGUILayout.Separator (); + + sunShaftBlurRadius.floatValue = EditorGUILayout.Slider ("Blur size", sunShaftBlurRadius.floatValue, 1.0f, 10.0f); + radialBlurIterations.intValue = EditorGUILayout.IntSlider ("Blur iterations", radialBlurIterations.intValue, 1, 3); + + EditorGUILayout.Separator (); + + EditorGUILayout.PropertyField (sunShaftIntensity, new GUIContent("Intensity")); + + serObj.ApplyModifiedProperties(); + } + } +} diff --git a/Unity/SCANsat/Assets/Editor/ImageEffects/SunShaftsEditor.cs.meta b/Unity/SCANsat/Assets/Editor/ImageEffects/SunShaftsEditor.cs.meta new file mode 100644 index 000000000..b8d901ffb --- /dev/null +++ b/Unity/SCANsat/Assets/Editor/ImageEffects/SunShaftsEditor.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 54f6f6313f2aecc4d81035ec0031e313 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Unity/SCANsat/Assets/Editor/ImageEffects/TonemappingEditor.cs b/Unity/SCANsat/Assets/Editor/ImageEffects/TonemappingEditor.cs new file mode 100644 index 000000000..613631f0f --- /dev/null +++ b/Unity/SCANsat/Assets/Editor/ImageEffects/TonemappingEditor.cs @@ -0,0 +1,81 @@ +using System; +using UnityEditor; +using UnityEngine; + +namespace UnityStandardAssets.ImageEffects +{ + [CustomEditor (typeof(Tonemapping))] + class TonemappingEditor : Editor + { + SerializedObject serObj; + + SerializedProperty type; + + // CURVE specific parameter + SerializedProperty remapCurve; + + SerializedProperty exposureAdjustment; + + // REINHARD specific parameter + SerializedProperty middleGrey; + SerializedProperty white; + SerializedProperty adaptionSpeed; + SerializedProperty adaptiveTextureSize; + + void OnEnable () { + serObj = new SerializedObject (target); + + type = serObj.FindProperty ("type"); + remapCurve = serObj.FindProperty ("remapCurve"); + exposureAdjustment = serObj.FindProperty ("exposureAdjustment"); + middleGrey = serObj.FindProperty ("middleGrey"); + white = serObj.FindProperty ("white"); + adaptionSpeed = serObj.FindProperty ("adaptionSpeed"); + adaptiveTextureSize = serObj.FindProperty("adaptiveTextureSize"); + } + + + public override void OnInspectorGUI () { + serObj.Update (); + + GUILayout.Label("Mapping HDR to LDR ranges since 1982", EditorStyles.miniLabel); + + Camera cam = (target as Tonemapping).GetComponent(); + if (cam != null) { + if (!cam.hdr) { + EditorGUILayout.HelpBox("The camera is not HDR enabled. This will likely break the Tonemapper.", MessageType.Warning); + } + else if (!(target as Tonemapping).validRenderTextureFormat) { + EditorGUILayout.HelpBox("The input to Tonemapper is not in HDR. Make sure that all effects prior to this are executed in HDR.", MessageType.Warning); + } + } + + EditorGUILayout.PropertyField (type, new GUIContent ("Technique")); + + if (type.enumValueIndex == (int) Tonemapping.TonemapperType.UserCurve) { + EditorGUILayout.PropertyField (remapCurve, new GUIContent ("Remap curve", "Specify the mapping of luminances yourself")); + } else if (type.enumValueIndex == (int) Tonemapping.TonemapperType.SimpleReinhard) { + EditorGUILayout.PropertyField (exposureAdjustment, new GUIContent ("Exposure", "Exposure adjustment")); + } else if (type.enumValueIndex == (int) Tonemapping.TonemapperType.Hable) { + EditorGUILayout.PropertyField (exposureAdjustment, new GUIContent ("Exposure", "Exposure adjustment")); + } else if (type.enumValueIndex == (int) Tonemapping.TonemapperType.Photographic) { + EditorGUILayout.PropertyField (exposureAdjustment, new GUIContent ("Exposure", "Exposure adjustment")); + } else if (type.enumValueIndex == (int) Tonemapping.TonemapperType.OptimizedHejiDawson) { + EditorGUILayout.PropertyField (exposureAdjustment, new GUIContent ("Exposure", "Exposure adjustment")); + } else if (type.enumValueIndex == (int) Tonemapping.TonemapperType.AdaptiveReinhard) { + EditorGUILayout.PropertyField (middleGrey, new GUIContent ("Middle grey", "Middle grey defines the average luminance thus brightening or darkening the entire image.")); + EditorGUILayout.PropertyField (white, new GUIContent ("White", "Smallest luminance value that will be mapped to white")); + EditorGUILayout.PropertyField (adaptionSpeed, new GUIContent ("Adaption Speed", "Speed modifier for the automatic adaption")); + EditorGUILayout.PropertyField (adaptiveTextureSize, new GUIContent ("Texture size", "Defines the amount of downsamples needed.")); + } else if (type.enumValueIndex == (int) Tonemapping.TonemapperType.AdaptiveReinhardAutoWhite) { + EditorGUILayout.PropertyField (middleGrey, new GUIContent ("Middle grey", "Middle grey defines the average luminance thus brightening or darkening the entire image.")); + EditorGUILayout.PropertyField (adaptionSpeed, new GUIContent ("Adaption Speed", "Speed modifier for the automatic adaption")); + EditorGUILayout.PropertyField (adaptiveTextureSize, new GUIContent ("Texture size", "Defines the amount of downsamples needed.")); + } + + GUILayout.Label("All following effects will use LDR color buffers", EditorStyles.miniBoldLabel); + + serObj.ApplyModifiedProperties(); + } + } +} diff --git a/Unity/SCANsat/Assets/Editor/ImageEffects/TonemappingEditor.cs.meta b/Unity/SCANsat/Assets/Editor/ImageEffects/TonemappingEditor.cs.meta new file mode 100644 index 000000000..40c242ad0 --- /dev/null +++ b/Unity/SCANsat/Assets/Editor/ImageEffects/TonemappingEditor.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 0f7cab214f141f642b87a5bdbd14653e +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Unity/SCANsat/Assets/Editor/ImageEffects/VignetteAndChromaticAberrationEditor.cs b/Unity/SCANsat/Assets/Editor/ImageEffects/VignetteAndChromaticAberrationEditor.cs new file mode 100644 index 000000000..7ccec20ef --- /dev/null +++ b/Unity/SCANsat/Assets/Editor/ImageEffects/VignetteAndChromaticAberrationEditor.cs @@ -0,0 +1,62 @@ +using System; +using UnityEditor; +using UnityEngine; + +namespace UnityStandardAssets.ImageEffects +{ + [CustomEditor (typeof(VignetteAndChromaticAberration))] + class VignetteAndChromaticAberrationEditor : Editor + { + private SerializedObject m_SerObj; + private SerializedProperty m_Mode; + private SerializedProperty m_Intensity; // intensity == 0 disables pre pass (optimization) + private SerializedProperty m_ChromaticAberration; + private SerializedProperty m_AxialAberration; + private SerializedProperty m_Blur; // blur == 0 disables blur pass (optimization) + private SerializedProperty m_BlurSpread; + private SerializedProperty m_BlurDistance; + private SerializedProperty m_LuminanceDependency; + + + void OnEnable () + { + m_SerObj = new SerializedObject (target); + m_Mode = m_SerObj.FindProperty ("mode"); + m_Intensity = m_SerObj.FindProperty ("intensity"); + m_ChromaticAberration = m_SerObj.FindProperty ("chromaticAberration"); + m_AxialAberration = m_SerObj.FindProperty ("axialAberration"); + m_Blur = m_SerObj.FindProperty ("blur"); + m_BlurSpread = m_SerObj.FindProperty ("blurSpread"); + m_LuminanceDependency = m_SerObj.FindProperty ("luminanceDependency"); + m_BlurDistance = m_SerObj.FindProperty ("blurDistance"); + } + + + public override void OnInspectorGUI () + { + m_SerObj.Update (); + + EditorGUILayout.LabelField("Simulates the common lens artifacts 'Vignette' and 'Aberration'", EditorStyles.miniLabel); + + EditorGUILayout.Slider(m_Intensity, 0.0f, 1.0f, new GUIContent("Vignetting")); + EditorGUILayout.Slider(m_Blur, 0.0f, 1.0f, new GUIContent(" Blurred Corners")); + if (m_Blur.floatValue>0.0f) + EditorGUILayout.Slider(m_BlurSpread, 0.0f, 1.0f, new GUIContent(" Blur Distance")); + + EditorGUILayout.Separator (); + + EditorGUILayout.PropertyField (m_Mode, new GUIContent("Aberration")); + if (m_Mode.intValue>0) + { + EditorGUILayout.Slider(m_ChromaticAberration, 0.0f, 5.0f, new GUIContent(" Tangential Aberration")); + EditorGUILayout.Slider(m_AxialAberration, 0.0f, 5.0f, new GUIContent(" Axial Aberration")); + m_LuminanceDependency.floatValue = EditorGUILayout.Slider(" Contrast Dependency", m_LuminanceDependency.floatValue, 0.001f, 1.0f); + m_BlurDistance.floatValue = EditorGUILayout.Slider(" Blur Distance", m_BlurDistance.floatValue, 0.001f, 5.0f); + } + else + EditorGUILayout.PropertyField (m_ChromaticAberration, new GUIContent(" Chromatic Aberration")); + + m_SerObj.ApplyModifiedProperties(); + } + } +} diff --git a/Unity/SCANsat/Assets/Editor/ImageEffects/VignetteAndChromaticAberrationEditor.cs.meta b/Unity/SCANsat/Assets/Editor/ImageEffects/VignetteAndChromaticAberrationEditor.cs.meta new file mode 100644 index 000000000..278b4eba3 --- /dev/null +++ b/Unity/SCANsat/Assets/Editor/ImageEffects/VignetteAndChromaticAberrationEditor.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 08126bf2baa528c4cb9c60340a24e5d6 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/Unity/SCANsat/Assets/Fonts.meta b/Unity/SCANsat/Assets/Fonts.meta new file mode 100644 index 000000000..aff0b181f --- /dev/null +++ b/Unity/SCANsat/Assets/Fonts.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: f0d58e90c62634249b9d5e547c283c3b +folderAsset: yes +timeCreated: 1478034313 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Fonts/Amaranth-Bold.ttf b/Unity/SCANsat/Assets/Fonts/Amaranth-Bold.ttf new file mode 100644 index 000000000..47fd9f4dd Binary files /dev/null and b/Unity/SCANsat/Assets/Fonts/Amaranth-Bold.ttf differ diff --git a/Unity/SCANsat/Assets/Fonts/Amaranth-Bold.ttf.meta b/Unity/SCANsat/Assets/Fonts/Amaranth-Bold.ttf.meta new file mode 100644 index 000000000..d58767298 --- /dev/null +++ b/Unity/SCANsat/Assets/Fonts/Amaranth-Bold.ttf.meta @@ -0,0 +1,19 @@ +fileFormatVersion: 2 +guid: 416d1084146041e488166d423d3aae4d +timeCreated: 1460393621 +licenseType: Free +TrueTypeFontImporter: + serializedVersion: 2 + fontSize: 16 + forceTextureCase: -2 + characterSpacing: 1 + characterPadding: 0 + includeFontData: 1 + use2xBehaviour: 0 + fontNames: [] + fallbackFontReferences: [] + customCharacters: + fontRenderingMode: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Fonts/Amaranth-BoldItalic.ttf b/Unity/SCANsat/Assets/Fonts/Amaranth-BoldItalic.ttf new file mode 100644 index 000000000..d94ed3fd3 Binary files /dev/null and b/Unity/SCANsat/Assets/Fonts/Amaranth-BoldItalic.ttf differ diff --git a/Unity/SCANsat/Assets/Fonts/Amaranth-BoldItalic.ttf.meta b/Unity/SCANsat/Assets/Fonts/Amaranth-BoldItalic.ttf.meta new file mode 100644 index 000000000..832ebf0cd --- /dev/null +++ b/Unity/SCANsat/Assets/Fonts/Amaranth-BoldItalic.ttf.meta @@ -0,0 +1,19 @@ +fileFormatVersion: 2 +guid: 63dd60cf8a200d344be8850b7200a374 +timeCreated: 1460393622 +licenseType: Free +TrueTypeFontImporter: + serializedVersion: 2 + fontSize: 16 + forceTextureCase: -2 + characterSpacing: 1 + characterPadding: 0 + includeFontData: 1 + use2xBehaviour: 0 + fontNames: [] + fallbackFontReferences: [] + customCharacters: + fontRenderingMode: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Fonts/Amaranth-Italic.ttf b/Unity/SCANsat/Assets/Fonts/Amaranth-Italic.ttf new file mode 100644 index 000000000..3797047fa Binary files /dev/null and b/Unity/SCANsat/Assets/Fonts/Amaranth-Italic.ttf differ diff --git a/Unity/SCANsat/Assets/Fonts/Amaranth-Italic.ttf.meta b/Unity/SCANsat/Assets/Fonts/Amaranth-Italic.ttf.meta new file mode 100644 index 000000000..5b2edba93 --- /dev/null +++ b/Unity/SCANsat/Assets/Fonts/Amaranth-Italic.ttf.meta @@ -0,0 +1,19 @@ +fileFormatVersion: 2 +guid: b626a88e355b6284881a16a4fd831236 +timeCreated: 1460393623 +licenseType: Free +TrueTypeFontImporter: + serializedVersion: 2 + fontSize: 16 + forceTextureCase: -2 + characterSpacing: 1 + characterPadding: 0 + includeFontData: 1 + use2xBehaviour: 0 + fontNames: [] + fallbackFontReferences: [] + customCharacters: + fontRenderingMode: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Fonts/Amaranth-Regular.ttf b/Unity/SCANsat/Assets/Fonts/Amaranth-Regular.ttf new file mode 100644 index 000000000..37b359821 Binary files /dev/null and b/Unity/SCANsat/Assets/Fonts/Amaranth-Regular.ttf differ diff --git a/Unity/SCANsat/Assets/Fonts/Amaranth-Regular.ttf.meta b/Unity/SCANsat/Assets/Fonts/Amaranth-Regular.ttf.meta new file mode 100644 index 000000000..d11fe5353 --- /dev/null +++ b/Unity/SCANsat/Assets/Fonts/Amaranth-Regular.ttf.meta @@ -0,0 +1,19 @@ +fileFormatVersion: 2 +guid: 7baf40380fc75c644b30f0fdaef9df87 +timeCreated: 1460393623 +licenseType: Free +TrueTypeFontImporter: + serializedVersion: 2 + fontSize: 16 + forceTextureCase: -2 + characterSpacing: 1 + characterPadding: 0 + includeFontData: 1 + use2xBehaviour: 0 + fontNames: [] + fallbackFontReferences: [] + customCharacters: + fontRenderingMode: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Fonts/OpenSans-Bold.ttf b/Unity/SCANsat/Assets/Fonts/OpenSans-Bold.ttf new file mode 100644 index 000000000..fd79d43be Binary files /dev/null and b/Unity/SCANsat/Assets/Fonts/OpenSans-Bold.ttf differ diff --git a/Unity/SCANsat/Assets/Fonts/OpenSans-Bold.ttf.meta b/Unity/SCANsat/Assets/Fonts/OpenSans-Bold.ttf.meta new file mode 100644 index 000000000..66d2eb7d5 --- /dev/null +++ b/Unity/SCANsat/Assets/Fonts/OpenSans-Bold.ttf.meta @@ -0,0 +1,19 @@ +fileFormatVersion: 2 +guid: 6e39034f4b892364b80b8c3c587ec7cf +timeCreated: 1460393623 +licenseType: Free +TrueTypeFontImporter: + serializedVersion: 2 + fontSize: 16 + forceTextureCase: -2 + characterSpacing: 1 + characterPadding: 0 + includeFontData: 1 + use2xBehaviour: 0 + fontNames: [] + fallbackFontReferences: [] + customCharacters: + fontRenderingMode: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Fonts/OpenSans-BoldItalic.ttf b/Unity/SCANsat/Assets/Fonts/OpenSans-BoldItalic.ttf new file mode 100644 index 000000000..9bc800958 Binary files /dev/null and b/Unity/SCANsat/Assets/Fonts/OpenSans-BoldItalic.ttf differ diff --git a/Unity/SCANsat/Assets/Fonts/OpenSans-BoldItalic.ttf.meta b/Unity/SCANsat/Assets/Fonts/OpenSans-BoldItalic.ttf.meta new file mode 100644 index 000000000..83d56d670 --- /dev/null +++ b/Unity/SCANsat/Assets/Fonts/OpenSans-BoldItalic.ttf.meta @@ -0,0 +1,19 @@ +fileFormatVersion: 2 +guid: 447176f60300d1a4f9c7b14b585d4f5a +timeCreated: 1460393621 +licenseType: Free +TrueTypeFontImporter: + serializedVersion: 2 + fontSize: 16 + forceTextureCase: -2 + characterSpacing: 1 + characterPadding: 0 + includeFontData: 1 + use2xBehaviour: 0 + fontNames: [] + fallbackFontReferences: [] + customCharacters: + fontRenderingMode: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Fonts/OpenSans-ExtraBold.ttf b/Unity/SCANsat/Assets/Fonts/OpenSans-ExtraBold.ttf new file mode 100644 index 000000000..21f6f84a0 Binary files /dev/null and b/Unity/SCANsat/Assets/Fonts/OpenSans-ExtraBold.ttf differ diff --git a/Unity/SCANsat/Assets/Fonts/OpenSans-ExtraBold.ttf.meta b/Unity/SCANsat/Assets/Fonts/OpenSans-ExtraBold.ttf.meta new file mode 100644 index 000000000..1d56a5b60 --- /dev/null +++ b/Unity/SCANsat/Assets/Fonts/OpenSans-ExtraBold.ttf.meta @@ -0,0 +1,19 @@ +fileFormatVersion: 2 +guid: 6b182b342e654ec4eaae0c63222c72c5 +timeCreated: 1460393622 +licenseType: Free +TrueTypeFontImporter: + serializedVersion: 2 + fontSize: 16 + forceTextureCase: -2 + characterSpacing: 1 + characterPadding: 0 + includeFontData: 1 + use2xBehaviour: 0 + fontNames: [] + fallbackFontReferences: [] + customCharacters: + fontRenderingMode: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Fonts/OpenSans-ExtraBoldItalic.ttf b/Unity/SCANsat/Assets/Fonts/OpenSans-ExtraBoldItalic.ttf new file mode 100644 index 000000000..31cb68834 Binary files /dev/null and b/Unity/SCANsat/Assets/Fonts/OpenSans-ExtraBoldItalic.ttf differ diff --git a/Unity/SCANsat/Assets/Fonts/OpenSans-ExtraBoldItalic.ttf.meta b/Unity/SCANsat/Assets/Fonts/OpenSans-ExtraBoldItalic.ttf.meta new file mode 100644 index 000000000..1ca486db3 --- /dev/null +++ b/Unity/SCANsat/Assets/Fonts/OpenSans-ExtraBoldItalic.ttf.meta @@ -0,0 +1,19 @@ +fileFormatVersion: 2 +guid: 2d489457baf3246419ae8083dd92c971 +timeCreated: 1460393621 +licenseType: Free +TrueTypeFontImporter: + serializedVersion: 2 + fontSize: 16 + forceTextureCase: -2 + characterSpacing: 1 + characterPadding: 0 + includeFontData: 1 + use2xBehaviour: 0 + fontNames: [] + fallbackFontReferences: [] + customCharacters: + fontRenderingMode: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Fonts/OpenSans-Italic.ttf b/Unity/SCANsat/Assets/Fonts/OpenSans-Italic.ttf new file mode 100644 index 000000000..c90da48ff Binary files /dev/null and b/Unity/SCANsat/Assets/Fonts/OpenSans-Italic.ttf differ diff --git a/Unity/SCANsat/Assets/Fonts/OpenSans-Italic.ttf.meta b/Unity/SCANsat/Assets/Fonts/OpenSans-Italic.ttf.meta new file mode 100644 index 000000000..c177f2c87 --- /dev/null +++ b/Unity/SCANsat/Assets/Fonts/OpenSans-Italic.ttf.meta @@ -0,0 +1,19 @@ +fileFormatVersion: 2 +guid: 455c0626df2121a458618be36e4cf22b +timeCreated: 1460393621 +licenseType: Free +TrueTypeFontImporter: + serializedVersion: 2 + fontSize: 16 + forceTextureCase: -2 + characterSpacing: 1 + characterPadding: 0 + includeFontData: 1 + use2xBehaviour: 0 + fontNames: [] + fallbackFontReferences: [] + customCharacters: + fontRenderingMode: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Fonts/OpenSans-Light.ttf b/Unity/SCANsat/Assets/Fonts/OpenSans-Light.ttf new file mode 100644 index 000000000..0d381897d Binary files /dev/null and b/Unity/SCANsat/Assets/Fonts/OpenSans-Light.ttf differ diff --git a/Unity/SCANsat/Assets/Fonts/OpenSans-Light.ttf.meta b/Unity/SCANsat/Assets/Fonts/OpenSans-Light.ttf.meta new file mode 100644 index 000000000..6bffd3e01 --- /dev/null +++ b/Unity/SCANsat/Assets/Fonts/OpenSans-Light.ttf.meta @@ -0,0 +1,19 @@ +fileFormatVersion: 2 +guid: 10ad36e30bf82b84a8900113b9faf427 +timeCreated: 1460393621 +licenseType: Free +TrueTypeFontImporter: + serializedVersion: 2 + fontSize: 16 + forceTextureCase: -2 + characterSpacing: 1 + characterPadding: 0 + includeFontData: 1 + use2xBehaviour: 0 + fontNames: [] + fallbackFontReferences: [] + customCharacters: + fontRenderingMode: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Fonts/OpenSans-LightItalic.ttf b/Unity/SCANsat/Assets/Fonts/OpenSans-LightItalic.ttf new file mode 100644 index 000000000..68299c4bc Binary files /dev/null and b/Unity/SCANsat/Assets/Fonts/OpenSans-LightItalic.ttf differ diff --git a/Unity/SCANsat/Assets/Fonts/OpenSans-LightItalic.ttf.meta b/Unity/SCANsat/Assets/Fonts/OpenSans-LightItalic.ttf.meta new file mode 100644 index 000000000..493c2dd80 --- /dev/null +++ b/Unity/SCANsat/Assets/Fonts/OpenSans-LightItalic.ttf.meta @@ -0,0 +1,19 @@ +fileFormatVersion: 2 +guid: ab2651154266d0c4c91734d7ceadb978 +timeCreated: 1460393623 +licenseType: Free +TrueTypeFontImporter: + serializedVersion: 2 + fontSize: 16 + forceTextureCase: -2 + characterSpacing: 1 + characterPadding: 0 + includeFontData: 1 + use2xBehaviour: 0 + fontNames: [] + fallbackFontReferences: [] + customCharacters: + fontRenderingMode: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Fonts/OpenSans-Regular.ttf b/Unity/SCANsat/Assets/Fonts/OpenSans-Regular.ttf new file mode 100644 index 000000000..db433349b Binary files /dev/null and b/Unity/SCANsat/Assets/Fonts/OpenSans-Regular.ttf differ diff --git a/Unity/SCANsat/Assets/Fonts/OpenSans-Regular.ttf.meta b/Unity/SCANsat/Assets/Fonts/OpenSans-Regular.ttf.meta new file mode 100644 index 000000000..d403d67da --- /dev/null +++ b/Unity/SCANsat/Assets/Fonts/OpenSans-Regular.ttf.meta @@ -0,0 +1,19 @@ +fileFormatVersion: 2 +guid: 0d7f916468a6b744db36c0cde00d2923 +timeCreated: 1460393621 +licenseType: Free +TrueTypeFontImporter: + serializedVersion: 2 + fontSize: 16 + forceTextureCase: -2 + characterSpacing: 1 + characterPadding: 0 + includeFontData: 1 + use2xBehaviour: 0 + fontNames: [] + fallbackFontReferences: [] + customCharacters: + fontRenderingMode: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Fonts/OpenSans-Semibold.ttf b/Unity/SCANsat/Assets/Fonts/OpenSans-Semibold.ttf new file mode 100644 index 000000000..1a7679e39 Binary files /dev/null and b/Unity/SCANsat/Assets/Fonts/OpenSans-Semibold.ttf differ diff --git a/Unity/SCANsat/Assets/Fonts/OpenSans-Semibold.ttf.meta b/Unity/SCANsat/Assets/Fonts/OpenSans-Semibold.ttf.meta new file mode 100644 index 000000000..9d5347e9a --- /dev/null +++ b/Unity/SCANsat/Assets/Fonts/OpenSans-Semibold.ttf.meta @@ -0,0 +1,19 @@ +fileFormatVersion: 2 +guid: 47381c4b358666e44876eb83c5272238 +timeCreated: 1460393622 +licenseType: Free +TrueTypeFontImporter: + serializedVersion: 2 + fontSize: 16 + forceTextureCase: -2 + characterSpacing: 1 + characterPadding: 0 + includeFontData: 1 + use2xBehaviour: 0 + fontNames: [] + fallbackFontReferences: [] + customCharacters: + fontRenderingMode: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Fonts/OpenSans-SemiboldItalic.ttf b/Unity/SCANsat/Assets/Fonts/OpenSans-SemiboldItalic.ttf new file mode 100644 index 000000000..59b6d16b0 Binary files /dev/null and b/Unity/SCANsat/Assets/Fonts/OpenSans-SemiboldItalic.ttf differ diff --git a/Unity/SCANsat/Assets/Fonts/OpenSans-SemiboldItalic.ttf.meta b/Unity/SCANsat/Assets/Fonts/OpenSans-SemiboldItalic.ttf.meta new file mode 100644 index 000000000..3c3c04a4d --- /dev/null +++ b/Unity/SCANsat/Assets/Fonts/OpenSans-SemiboldItalic.ttf.meta @@ -0,0 +1,19 @@ +fileFormatVersion: 2 +guid: 1e718c2a2cf3f834bac238bf17737cd5 +timeCreated: 1460393621 +licenseType: Free +TrueTypeFontImporter: + serializedVersion: 2 + fontSize: 16 + forceTextureCase: -2 + characterSpacing: 1 + characterPadding: 0 + includeFontData: 1 + use2xBehaviour: 0 + fontNames: [] + fallbackFontReferences: [] + customCharacters: + fontRenderingMode: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/HSVPicker.meta b/Unity/SCANsat/Assets/HSVPicker.meta new file mode 100644 index 000000000..ebb346ab2 --- /dev/null +++ b/Unity/SCANsat/Assets/HSVPicker.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 23371cc964348c240b759eeeeb4d63aa +folderAsset: yes +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/HSVPicker/Picker 2.0.prefab b/Unity/SCANsat/Assets/HSVPicker/Picker 2.0.prefab new file mode 100644 index 000000000..ec0e0db00 Binary files /dev/null and b/Unity/SCANsat/Assets/HSVPicker/Picker 2.0.prefab differ diff --git a/Unity/SCANsat/Assets/HSVPicker/Picker 2.0.prefab.meta b/Unity/SCANsat/Assets/HSVPicker/Picker 2.0.prefab.meta new file mode 100644 index 000000000..55845f468 --- /dev/null +++ b/Unity/SCANsat/Assets/HSVPicker/Picker 2.0.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 916ee089a0d7b63419075f91e1c657ec +timeCreated: 1442747914 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/HSVPicker/PickerTest.unity b/Unity/SCANsat/Assets/HSVPicker/PickerTest.unity new file mode 100644 index 000000000..a8153c284 Binary files /dev/null and b/Unity/SCANsat/Assets/HSVPicker/PickerTest.unity differ diff --git a/Unity/SCANsat/Assets/HSVPicker/PickerTest.unity.meta b/Unity/SCANsat/Assets/HSVPicker/PickerTest.unity.meta new file mode 100644 index 000000000..f7ac8702e --- /dev/null +++ b/Unity/SCANsat/Assets/HSVPicker/PickerTest.unity.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: ce46c07f0028e314ab7767577ab5e7a6 +DefaultImporter: + userData: diff --git a/Unity/SCANsat/Assets/Images.meta b/Unity/SCANsat/Assets/Images.meta new file mode 100644 index 000000000..95dfc563a --- /dev/null +++ b/Unity/SCANsat/Assets/Images.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: f6743e09e9903304384064b4965ade1e +folderAsset: yes +timeCreated: 1478034313 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Images/ANMarker.png b/Unity/SCANsat/Assets/Images/ANMarker.png new file mode 100644 index 000000000..8a8274294 Binary files /dev/null and b/Unity/SCANsat/Assets/Images/ANMarker.png differ diff --git a/Unity/SCANsat/Assets/Images/ANMarker.png.meta b/Unity/SCANsat/Assets/Images/ANMarker.png.meta new file mode 100644 index 000000000..8f28acd3d --- /dev/null +++ b/Unity/SCANsat/Assets/Images/ANMarker.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: 77ae81dbe9d9e94409ef3b3ff48d0855 +timeCreated: 1484155023 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: scan_icons + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Images/APMarker.png b/Unity/SCANsat/Assets/Images/APMarker.png new file mode 100644 index 000000000..4491b608a Binary files /dev/null and b/Unity/SCANsat/Assets/Images/APMarker.png differ diff --git a/Unity/SCANsat/Assets/Images/APMarker.png.meta b/Unity/SCANsat/Assets/Images/APMarker.png.meta new file mode 100644 index 000000000..0de35e11a --- /dev/null +++ b/Unity/SCANsat/Assets/Images/APMarker.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: 972df81609a96484eb1aac8bfcc96bc9 +timeCreated: 1484155023 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: scan_icons + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Images/AnomalyIcon.png b/Unity/SCANsat/Assets/Images/AnomalyIcon.png new file mode 100644 index 000000000..b270d1b27 Binary files /dev/null and b/Unity/SCANsat/Assets/Images/AnomalyIcon.png differ diff --git a/Unity/SCANsat/Assets/Images/AnomalyIcon.png.meta b/Unity/SCANsat/Assets/Images/AnomalyIcon.png.meta new file mode 100644 index 000000000..b37980a72 --- /dev/null +++ b/Unity/SCANsat/Assets/Images/AnomalyIcon.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: 9658b7226544a6d4e8f61950879c66b1 +timeCreated: 1484770941 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: scan_icons + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Images/AnomalyIconOutline.png b/Unity/SCANsat/Assets/Images/AnomalyIconOutline.png new file mode 100644 index 000000000..0aa5f7d3e Binary files /dev/null and b/Unity/SCANsat/Assets/Images/AnomalyIconOutline.png differ diff --git a/Unity/SCANsat/Assets/Images/AnomalyIconOutline.png.meta b/Unity/SCANsat/Assets/Images/AnomalyIconOutline.png.meta new file mode 100644 index 000000000..5fe4a5079 --- /dev/null +++ b/Unity/SCANsat/Assets/Images/AnomalyIconOutline.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: 4b6c0a486d3430542bbc233e47a367c3 +timeCreated: 1485281751 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: scan_icons + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Images/AsteroidIcon.png b/Unity/SCANsat/Assets/Images/AsteroidIcon.png new file mode 100644 index 000000000..f978913d8 Binary files /dev/null and b/Unity/SCANsat/Assets/Images/AsteroidIcon.png differ diff --git a/Unity/SCANsat/Assets/Images/AsteroidIcon.png.meta b/Unity/SCANsat/Assets/Images/AsteroidIcon.png.meta new file mode 100644 index 000000000..07819c463 --- /dev/null +++ b/Unity/SCANsat/Assets/Images/AsteroidIcon.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: 4b990d488b6989a4ba1f427f5537f1a5 +timeCreated: 1484155023 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: scan_icons + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Images/BaseIcon.png b/Unity/SCANsat/Assets/Images/BaseIcon.png new file mode 100644 index 000000000..e632437c3 Binary files /dev/null and b/Unity/SCANsat/Assets/Images/BaseIcon.png differ diff --git a/Unity/SCANsat/Assets/Images/BaseIcon.png.meta b/Unity/SCANsat/Assets/Images/BaseIcon.png.meta new file mode 100644 index 000000000..03110ccbf --- /dev/null +++ b/Unity/SCANsat/Assets/Images/BaseIcon.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: 603355ae8d09c9348b4f6cb5b2f707d4 +timeCreated: 1484155023 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: scan_icons + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Images/DNMarker.png b/Unity/SCANsat/Assets/Images/DNMarker.png new file mode 100644 index 000000000..b1ca6989e Binary files /dev/null and b/Unity/SCANsat/Assets/Images/DNMarker.png differ diff --git a/Unity/SCANsat/Assets/Images/DNMarker.png.meta b/Unity/SCANsat/Assets/Images/DNMarker.png.meta new file mode 100644 index 000000000..81f1d4fbb --- /dev/null +++ b/Unity/SCANsat/Assets/Images/DNMarker.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: 32b25ac781bae134994e48a7fbe78d22 +timeCreated: 1484155023 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: scan_icons + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Images/DebrisIcon.png b/Unity/SCANsat/Assets/Images/DebrisIcon.png new file mode 100644 index 000000000..ac916aefc Binary files /dev/null and b/Unity/SCANsat/Assets/Images/DebrisIcon.png differ diff --git a/Unity/SCANsat/Assets/Images/DebrisIcon.png.meta b/Unity/SCANsat/Assets/Images/DebrisIcon.png.meta new file mode 100644 index 000000000..45287072c --- /dev/null +++ b/Unity/SCANsat/Assets/Images/DebrisIcon.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: 57f8f3b8cb649154b9ad5263bb3b9954 +timeCreated: 1484155023 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: scan_icons + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Images/EVAIcon.png b/Unity/SCANsat/Assets/Images/EVAIcon.png new file mode 100644 index 000000000..679deb330 Binary files /dev/null and b/Unity/SCANsat/Assets/Images/EVAIcon.png differ diff --git a/Unity/SCANsat/Assets/Images/EVAIcon.png.meta b/Unity/SCANsat/Assets/Images/EVAIcon.png.meta new file mode 100644 index 000000000..d6d6e7cfd --- /dev/null +++ b/Unity/SCANsat/Assets/Images/EVAIcon.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: 3e6243b5c967a0d4bb84198432748359 +timeCreated: 1484155023 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: scan_icons + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Images/Empty_Icon.png b/Unity/SCANsat/Assets/Images/Empty_Icon.png new file mode 100644 index 000000000..5a7c50781 Binary files /dev/null and b/Unity/SCANsat/Assets/Images/Empty_Icon.png differ diff --git a/Unity/SCANsat/Assets/Images/Empty_Icon.png.meta b/Unity/SCANsat/Assets/Images/Empty_Icon.png.meta new file mode 100644 index 000000000..d01a56791 --- /dev/null +++ b/Unity/SCANsat/Assets/Images/Empty_Icon.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: 0451eb5aa04be2349a4a639757221057 +timeCreated: 1480109851 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Images/EncounterMarker.png b/Unity/SCANsat/Assets/Images/EncounterMarker.png new file mode 100644 index 000000000..8d5100a92 Binary files /dev/null and b/Unity/SCANsat/Assets/Images/EncounterMarker.png differ diff --git a/Unity/SCANsat/Assets/Images/EncounterMarker.png.meta b/Unity/SCANsat/Assets/Images/EncounterMarker.png.meta new file mode 100644 index 000000000..0385b511a --- /dev/null +++ b/Unity/SCANsat/Assets/Images/EncounterMarker.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: 148389791fa36e84d89b20b44f055eda +timeCreated: 1484155023 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: scan_icons + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Images/ExitMarker.png b/Unity/SCANsat/Assets/Images/ExitMarker.png new file mode 100644 index 000000000..6d24b3174 Binary files /dev/null and b/Unity/SCANsat/Assets/Images/ExitMarker.png differ diff --git a/Unity/SCANsat/Assets/Images/ExitMarker.png.meta b/Unity/SCANsat/Assets/Images/ExitMarker.png.meta new file mode 100644 index 000000000..31f6cb53b --- /dev/null +++ b/Unity/SCANsat/Assets/Images/ExitMarker.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: 5735bd452f63d744a99719127c00f342 +timeCreated: 1484155023 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: scan_icons + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Images/FlagIcon.png b/Unity/SCANsat/Assets/Images/FlagIcon.png new file mode 100644 index 000000000..64183d71a Binary files /dev/null and b/Unity/SCANsat/Assets/Images/FlagIcon.png differ diff --git a/Unity/SCANsat/Assets/Images/FlagIcon.png.meta b/Unity/SCANsat/Assets/Images/FlagIcon.png.meta new file mode 100644 index 000000000..4c5b44a2f --- /dev/null +++ b/Unity/SCANsat/Assets/Images/FlagIcon.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: c2df9feae76de0c4cb6c6d57606696c1 +timeCreated: 1484155024 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: scan_icons + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Images/KSP_Tooltip.png b/Unity/SCANsat/Assets/Images/KSP_Tooltip.png new file mode 100644 index 000000000..07eb8adc6 Binary files /dev/null and b/Unity/SCANsat/Assets/Images/KSP_Tooltip.png differ diff --git a/Unity/SCANsat/Assets/Images/KSP_Tooltip.png.meta b/Unity/SCANsat/Assets/Images/KSP_Tooltip.png.meta new file mode 100644 index 000000000..33a68b2fb --- /dev/null +++ b/Unity/SCANsat/Assets/Images/KSP_Tooltip.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: 0b98e00ce393eb1439435f8b864569c2 +timeCreated: 1485889591 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 11, y: 10, z: 10, w: 10} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: scan_icons + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Images/LanderIcon.png b/Unity/SCANsat/Assets/Images/LanderIcon.png new file mode 100644 index 000000000..53e21ebcf Binary files /dev/null and b/Unity/SCANsat/Assets/Images/LanderIcon.png differ diff --git a/Unity/SCANsat/Assets/Images/LanderIcon.png.meta b/Unity/SCANsat/Assets/Images/LanderIcon.png.meta new file mode 100644 index 000000000..769edbe89 --- /dev/null +++ b/Unity/SCANsat/Assets/Images/LanderIcon.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: 81f74c0f11c3f6840bb5689e3d4106b6 +timeCreated: 1484155023 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: scan_icons + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Images/ManeuverMarker.png b/Unity/SCANsat/Assets/Images/ManeuverMarker.png new file mode 100644 index 000000000..aa1a0dae0 Binary files /dev/null and b/Unity/SCANsat/Assets/Images/ManeuverMarker.png differ diff --git a/Unity/SCANsat/Assets/Images/ManeuverMarker.png.meta b/Unity/SCANsat/Assets/Images/ManeuverMarker.png.meta new file mode 100644 index 000000000..9c6ae4ab2 --- /dev/null +++ b/Unity/SCANsat/Assets/Images/ManeuverMarker.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: 269324e37ca26c04f9a7edce20d68125 +timeCreated: 1484155023 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: scan_icons + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Images/Map_Right_Icon.png b/Unity/SCANsat/Assets/Images/Map_Right_Icon.png new file mode 100644 index 000000000..6c13f9273 Binary files /dev/null and b/Unity/SCANsat/Assets/Images/Map_Right_Icon.png differ diff --git a/Unity/SCANsat/Assets/Images/Map_Right_Icon.png.meta b/Unity/SCANsat/Assets/Images/Map_Right_Icon.png.meta new file mode 100644 index 000000000..67a384736 --- /dev/null +++ b/Unity/SCANsat/Assets/Images/Map_Right_Icon.png.meta @@ -0,0 +1,56 @@ +fileFormatVersion: 2 +guid: 77e9e35a8a2ca2d4790225133fd1f09d +timeCreated: 1486057168 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Images/MysteryIcon.png b/Unity/SCANsat/Assets/Images/MysteryIcon.png new file mode 100644 index 000000000..6b904b3c7 Binary files /dev/null and b/Unity/SCANsat/Assets/Images/MysteryIcon.png differ diff --git a/Unity/SCANsat/Assets/Images/MysteryIcon.png.meta b/Unity/SCANsat/Assets/Images/MysteryIcon.png.meta new file mode 100644 index 000000000..2f1c8128d --- /dev/null +++ b/Unity/SCANsat/Assets/Images/MysteryIcon.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: 47306ae121138d14c8be159ddf854f26 +timeCreated: 1484155023 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: scan_icons + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Images/PEMarker.png b/Unity/SCANsat/Assets/Images/PEMarker.png new file mode 100644 index 000000000..d5e6f3b6f Binary files /dev/null and b/Unity/SCANsat/Assets/Images/PEMarker.png differ diff --git a/Unity/SCANsat/Assets/Images/PEMarker.png.meta b/Unity/SCANsat/Assets/Images/PEMarker.png.meta new file mode 100644 index 000000000..0d0318d39 --- /dev/null +++ b/Unity/SCANsat/Assets/Images/PEMarker.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: 1ad49fbc6a2bfb14c91506bf65263869 +timeCreated: 1484155023 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: scan_icons + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Images/PlaneIcon.png b/Unity/SCANsat/Assets/Images/PlaneIcon.png new file mode 100644 index 000000000..ae36f0d12 Binary files /dev/null and b/Unity/SCANsat/Assets/Images/PlaneIcon.png differ diff --git a/Unity/SCANsat/Assets/Images/PlaneIcon.png.meta b/Unity/SCANsat/Assets/Images/PlaneIcon.png.meta new file mode 100644 index 000000000..295a23a06 --- /dev/null +++ b/Unity/SCANsat/Assets/Images/PlaneIcon.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: bcfbf717e36253045a22c3c5d182c461 +timeCreated: 1484155023 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: scan_icons + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Images/PlanetIcon.png b/Unity/SCANsat/Assets/Images/PlanetIcon.png new file mode 100644 index 000000000..9efb97922 Binary files /dev/null and b/Unity/SCANsat/Assets/Images/PlanetIcon.png differ diff --git a/Unity/SCANsat/Assets/Images/PlanetIcon.png.meta b/Unity/SCANsat/Assets/Images/PlanetIcon.png.meta new file mode 100644 index 000000000..b70ed7586 --- /dev/null +++ b/Unity/SCANsat/Assets/Images/PlanetIcon.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: c29f350bba609ba4f89d6dcfbd742260 +timeCreated: 1484155023 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: scan_icons + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Images/PodIcon.png b/Unity/SCANsat/Assets/Images/PodIcon.png new file mode 100644 index 000000000..0d888a043 Binary files /dev/null and b/Unity/SCANsat/Assets/Images/PodIcon.png differ diff --git a/Unity/SCANsat/Assets/Images/PodIcon.png.meta b/Unity/SCANsat/Assets/Images/PodIcon.png.meta new file mode 100644 index 000000000..d837f0f6a --- /dev/null +++ b/Unity/SCANsat/Assets/Images/PodIcon.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: 5417fed680ca6654c803b39a212abb11 +timeCreated: 1484155023 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: scan_icons + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Images/ProbeIcon.png b/Unity/SCANsat/Assets/Images/ProbeIcon.png new file mode 100644 index 000000000..6fd394108 Binary files /dev/null and b/Unity/SCANsat/Assets/Images/ProbeIcon.png differ diff --git a/Unity/SCANsat/Assets/Images/ProbeIcon.png.meta b/Unity/SCANsat/Assets/Images/ProbeIcon.png.meta new file mode 100644 index 000000000..9e0aae8bf --- /dev/null +++ b/Unity/SCANsat/Assets/Images/ProbeIcon.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: f8eaebacb3f23304c936147b69a81f01 +timeCreated: 1484155024 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: scan_icons + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Images/RelayIcon.png b/Unity/SCANsat/Assets/Images/RelayIcon.png new file mode 100644 index 000000000..5ef8a0baa Binary files /dev/null and b/Unity/SCANsat/Assets/Images/RelayIcon.png differ diff --git a/Unity/SCANsat/Assets/Images/RelayIcon.png.meta b/Unity/SCANsat/Assets/Images/RelayIcon.png.meta new file mode 100644 index 000000000..a12e3f55d --- /dev/null +++ b/Unity/SCANsat/Assets/Images/RelayIcon.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: 0ea1ef8c4c0b0824a81e064453ec1e35 +timeCreated: 1484155023 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: scan_icons + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Images/RoverIcon.png b/Unity/SCANsat/Assets/Images/RoverIcon.png new file mode 100644 index 000000000..16895dfbb Binary files /dev/null and b/Unity/SCANsat/Assets/Images/RoverIcon.png differ diff --git a/Unity/SCANsat/Assets/Images/RoverIcon.png.meta b/Unity/SCANsat/Assets/Images/RoverIcon.png.meta new file mode 100644 index 000000000..f3c3245b2 --- /dev/null +++ b/Unity/SCANsat/Assets/Images/RoverIcon.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: a9fc78755c4b3fa45974263a6cb6f3df +timeCreated: 1484155023 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: scan_icons + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Images/SCAN_Asteroid_Icon.png b/Unity/SCANsat/Assets/Images/SCAN_Asteroid_Icon.png new file mode 100644 index 000000000..4c6100654 Binary files /dev/null and b/Unity/SCANsat/Assets/Images/SCAN_Asteroid_Icon.png differ diff --git a/Unity/SCANsat/Assets/Images/SCAN_Asteroid_Icon.png.meta b/Unity/SCANsat/Assets/Images/SCAN_Asteroid_Icon.png.meta new file mode 100644 index 000000000..a81302b32 --- /dev/null +++ b/Unity/SCANsat/Assets/Images/SCAN_Asteroid_Icon.png.meta @@ -0,0 +1,56 @@ +fileFormatVersion: 2 +guid: d9bb956d49caf9d43992137459d1c7fe +timeCreated: 1478036257 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Images/SCAN_ColorToggle_Icon.png b/Unity/SCANsat/Assets/Images/SCAN_ColorToggle_Icon.png new file mode 100644 index 000000000..f18aa2295 Binary files /dev/null and b/Unity/SCANsat/Assets/Images/SCAN_ColorToggle_Icon.png differ diff --git a/Unity/SCANsat/Assets/Images/SCAN_ColorToggle_Icon.png.meta b/Unity/SCANsat/Assets/Images/SCAN_ColorToggle_Icon.png.meta new file mode 100644 index 000000000..13854c3e7 --- /dev/null +++ b/Unity/SCANsat/Assets/Images/SCAN_ColorToggle_Icon.png.meta @@ -0,0 +1,56 @@ +fileFormatVersion: 2 +guid: 73e03e12e4caab048aaece61fcda68b5 +timeCreated: 1478036256 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Images/SCAN_Color_Icon.png b/Unity/SCANsat/Assets/Images/SCAN_Color_Icon.png new file mode 100644 index 000000000..ecb0b20e3 Binary files /dev/null and b/Unity/SCANsat/Assets/Images/SCAN_Color_Icon.png differ diff --git a/Unity/SCANsat/Assets/Images/SCAN_Color_Icon.png.meta b/Unity/SCANsat/Assets/Images/SCAN_Color_Icon.png.meta new file mode 100644 index 000000000..4ca38f929 --- /dev/null +++ b/Unity/SCANsat/Assets/Images/SCAN_Color_Icon.png.meta @@ -0,0 +1,56 @@ +fileFormatVersion: 2 +guid: d602537c16f9505429f142415a6b1616 +timeCreated: 1478036257 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Images/SCAN_Flag_Icon.png b/Unity/SCANsat/Assets/Images/SCAN_Flag_Icon.png new file mode 100644 index 000000000..eee8dbc8d Binary files /dev/null and b/Unity/SCANsat/Assets/Images/SCAN_Flag_Icon.png differ diff --git a/Unity/SCANsat/Assets/Images/SCAN_Flag_Icon.png.meta b/Unity/SCANsat/Assets/Images/SCAN_Flag_Icon.png.meta new file mode 100644 index 000000000..595e118c4 --- /dev/null +++ b/Unity/SCANsat/Assets/Images/SCAN_Flag_Icon.png.meta @@ -0,0 +1,56 @@ +fileFormatVersion: 2 +guid: c7953386e39eafe4fa07be140ee19838 +timeCreated: 1478036257 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Images/SCAN_Grid_Icon.png b/Unity/SCANsat/Assets/Images/SCAN_Grid_Icon.png new file mode 100644 index 000000000..4752bd2d6 Binary files /dev/null and b/Unity/SCANsat/Assets/Images/SCAN_Grid_Icon.png differ diff --git a/Unity/SCANsat/Assets/Images/SCAN_Grid_Icon.png.meta b/Unity/SCANsat/Assets/Images/SCAN_Grid_Icon.png.meta new file mode 100644 index 000000000..08be1b5e1 --- /dev/null +++ b/Unity/SCANsat/Assets/Images/SCAN_Grid_Icon.png.meta @@ -0,0 +1,56 @@ +fileFormatVersion: 2 +guid: b980c81b79c3cc24ba3dbbe55893fc95 +timeCreated: 1478036257 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Images/SCAN_Instrument_Icon.png b/Unity/SCANsat/Assets/Images/SCAN_Instrument_Icon.png new file mode 100644 index 000000000..1bddcc8f4 Binary files /dev/null and b/Unity/SCANsat/Assets/Images/SCAN_Instrument_Icon.png differ diff --git a/Unity/SCANsat/Assets/Images/SCAN_Instrument_Icon.png.meta b/Unity/SCANsat/Assets/Images/SCAN_Instrument_Icon.png.meta new file mode 100644 index 000000000..9c3b269ab --- /dev/null +++ b/Unity/SCANsat/Assets/Images/SCAN_Instrument_Icon.png.meta @@ -0,0 +1,56 @@ +fileFormatVersion: 2 +guid: a40c3a079d0f0654488a9b7321ded2cb +timeCreated: 1478036257 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Images/SCAN_Instrument_Icon_Large.png b/Unity/SCANsat/Assets/Images/SCAN_Instrument_Icon_Large.png new file mode 100644 index 000000000..29a464def Binary files /dev/null and b/Unity/SCANsat/Assets/Images/SCAN_Instrument_Icon_Large.png differ diff --git a/Unity/SCANsat/Assets/Images/SCAN_Instrument_Icon_Large.png.meta b/Unity/SCANsat/Assets/Images/SCAN_Instrument_Icon_Large.png.meta new file mode 100644 index 000000000..b2179a5ff --- /dev/null +++ b/Unity/SCANsat/Assets/Images/SCAN_Instrument_Icon_Large.png.meta @@ -0,0 +1,56 @@ +fileFormatVersion: 2 +guid: 8f40541f16841e34f97ce54b4d5b92b1 +timeCreated: 1485798700 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Images/SCAN_Legend_Icon.png b/Unity/SCANsat/Assets/Images/SCAN_Legend_Icon.png new file mode 100644 index 000000000..778e0df9a Binary files /dev/null and b/Unity/SCANsat/Assets/Images/SCAN_Legend_Icon.png differ diff --git a/Unity/SCANsat/Assets/Images/SCAN_Legend_Icon.png.meta b/Unity/SCANsat/Assets/Images/SCAN_Legend_Icon.png.meta new file mode 100644 index 000000000..c0150edb4 --- /dev/null +++ b/Unity/SCANsat/Assets/Images/SCAN_Legend_Icon.png.meta @@ -0,0 +1,56 @@ +fileFormatVersion: 2 +guid: 48b4b55d336f10a4b820ebe2c6513590 +timeCreated: 1478036256 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Images/SCAN_LockClose.png b/Unity/SCANsat/Assets/Images/SCAN_LockClose.png new file mode 100644 index 000000000..cd57db4e0 Binary files /dev/null and b/Unity/SCANsat/Assets/Images/SCAN_LockClose.png differ diff --git a/Unity/SCANsat/Assets/Images/SCAN_LockClose.png.meta b/Unity/SCANsat/Assets/Images/SCAN_LockClose.png.meta new file mode 100644 index 000000000..27f7aef9f --- /dev/null +++ b/Unity/SCANsat/Assets/Images/SCAN_LockClose.png.meta @@ -0,0 +1,56 @@ +fileFormatVersion: 2 +guid: 09f352e512206e743bc1272ca07705e7 +timeCreated: 1486496167 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Images/SCAN_LockOpen.png b/Unity/SCANsat/Assets/Images/SCAN_LockOpen.png new file mode 100644 index 000000000..5eed282d2 Binary files /dev/null and b/Unity/SCANsat/Assets/Images/SCAN_LockOpen.png differ diff --git a/Unity/SCANsat/Assets/Images/SCAN_LockOpen.png.meta b/Unity/SCANsat/Assets/Images/SCAN_LockOpen.png.meta new file mode 100644 index 000000000..a51b09640 --- /dev/null +++ b/Unity/SCANsat/Assets/Images/SCAN_LockOpen.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: f59d72623045a1445b6ac4e17635572e +timeCreated: 1486496167 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Images/SCAN_Map_Icons.png b/Unity/SCANsat/Assets/Images/SCAN_Map_Icons.png new file mode 100644 index 000000000..ea9e0e0e4 Binary files /dev/null and b/Unity/SCANsat/Assets/Images/SCAN_Map_Icons.png differ diff --git a/Unity/SCANsat/Assets/Images/SCAN_Map_Icons.png.meta b/Unity/SCANsat/Assets/Images/SCAN_Map_Icons.png.meta new file mode 100644 index 000000000..5a3ec6665 --- /dev/null +++ b/Unity/SCANsat/Assets/Images/SCAN_Map_Icons.png.meta @@ -0,0 +1,56 @@ +fileFormatVersion: 2 +guid: e5466fd25a51a6649b14782d5c463b21 +timeCreated: 1486055416 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Images/SCAN_MechJebIcon.png b/Unity/SCANsat/Assets/Images/SCAN_MechJebIcon.png new file mode 100644 index 000000000..7b1ec0a11 Binary files /dev/null and b/Unity/SCANsat/Assets/Images/SCAN_MechJebIcon.png differ diff --git a/Unity/SCANsat/Assets/Images/SCAN_MechJebIcon.png.meta b/Unity/SCANsat/Assets/Images/SCAN_MechJebIcon.png.meta new file mode 100644 index 000000000..ab7b54d90 --- /dev/null +++ b/Unity/SCANsat/Assets/Images/SCAN_MechJebIcon.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: 76cce73bbb3438a45b519fa3ae916f7c +timeCreated: 1478036257 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: scan_icons + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Images/SCAN_Orbit_Icon.png b/Unity/SCANsat/Assets/Images/SCAN_Orbit_Icon.png new file mode 100644 index 000000000..1b0dce014 Binary files /dev/null and b/Unity/SCANsat/Assets/Images/SCAN_Orbit_Icon.png differ diff --git a/Unity/SCANsat/Assets/Images/SCAN_Orbit_Icon.png.meta b/Unity/SCANsat/Assets/Images/SCAN_Orbit_Icon.png.meta new file mode 100644 index 000000000..9acc21491 --- /dev/null +++ b/Unity/SCANsat/Assets/Images/SCAN_Orbit_Icon.png.meta @@ -0,0 +1,56 @@ +fileFormatVersion: 2 +guid: ea01fb1e1adeefa488560ed7dfba2ae0 +timeCreated: 1478036257 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Images/SCAN_Overlay_Icon.png b/Unity/SCANsat/Assets/Images/SCAN_Overlay_Icon.png new file mode 100644 index 000000000..8fe53a7d6 Binary files /dev/null and b/Unity/SCANsat/Assets/Images/SCAN_Overlay_Icon.png differ diff --git a/Unity/SCANsat/Assets/Images/SCAN_Overlay_Icon.png.meta b/Unity/SCANsat/Assets/Images/SCAN_Overlay_Icon.png.meta new file mode 100644 index 000000000..b972fe7bd --- /dev/null +++ b/Unity/SCANsat/Assets/Images/SCAN_Overlay_Icon.png.meta @@ -0,0 +1,56 @@ +fileFormatVersion: 2 +guid: 9b24a85b915a76146b8d86276a6346fb +timeCreated: 1478036257 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Images/SCAN_Overlay_Icon_Large.png b/Unity/SCANsat/Assets/Images/SCAN_Overlay_Icon_Large.png new file mode 100644 index 000000000..ab3582adf Binary files /dev/null and b/Unity/SCANsat/Assets/Images/SCAN_Overlay_Icon_Large.png differ diff --git a/Unity/SCANsat/Assets/Images/SCAN_Overlay_Icon_Large.png.meta b/Unity/SCANsat/Assets/Images/SCAN_Overlay_Icon_Large.png.meta new file mode 100644 index 000000000..90eb8961b --- /dev/null +++ b/Unity/SCANsat/Assets/Images/SCAN_Overlay_Icon_Large.png.meta @@ -0,0 +1,56 @@ +fileFormatVersion: 2 +guid: c22bcd21720fb364289d35217792e94e +timeCreated: 1485798700 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Images/SCAN_Refresh_Icon.png b/Unity/SCANsat/Assets/Images/SCAN_Refresh_Icon.png new file mode 100644 index 000000000..5c87e416e Binary files /dev/null and b/Unity/SCANsat/Assets/Images/SCAN_Refresh_Icon.png differ diff --git a/Unity/SCANsat/Assets/Images/SCAN_Refresh_Icon.png.meta b/Unity/SCANsat/Assets/Images/SCAN_Refresh_Icon.png.meta new file mode 100644 index 000000000..ba6787dc5 --- /dev/null +++ b/Unity/SCANsat/Assets/Images/SCAN_Refresh_Icon.png.meta @@ -0,0 +1,56 @@ +fileFormatVersion: 2 +guid: 6c0f91a68c891bd448d569c8bf4e57d4 +timeCreated: 1478036256 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Images/SCAN_Resize_Icon.png b/Unity/SCANsat/Assets/Images/SCAN_Resize_Icon.png new file mode 100644 index 000000000..334173b83 Binary files /dev/null and b/Unity/SCANsat/Assets/Images/SCAN_Resize_Icon.png differ diff --git a/Unity/SCANsat/Assets/Images/SCAN_Resize_Icon.png.meta b/Unity/SCANsat/Assets/Images/SCAN_Resize_Icon.png.meta new file mode 100644 index 000000000..5ce580e16 --- /dev/null +++ b/Unity/SCANsat/Assets/Images/SCAN_Resize_Icon.png.meta @@ -0,0 +1,56 @@ +fileFormatVersion: 2 +guid: ed082288a9f3def4685ad08898b92293 +timeCreated: 1478036257 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Images/SCAN_Resource_Icon.png b/Unity/SCANsat/Assets/Images/SCAN_Resource_Icon.png new file mode 100644 index 000000000..320269da6 Binary files /dev/null and b/Unity/SCANsat/Assets/Images/SCAN_Resource_Icon.png differ diff --git a/Unity/SCANsat/Assets/Images/SCAN_Resource_Icon.png.meta b/Unity/SCANsat/Assets/Images/SCAN_Resource_Icon.png.meta new file mode 100644 index 000000000..f12d50a02 --- /dev/null +++ b/Unity/SCANsat/Assets/Images/SCAN_Resource_Icon.png.meta @@ -0,0 +1,56 @@ +fileFormatVersion: 2 +guid: d7a47e81f84cf5a4eb4b9be5e1c056f8 +timeCreated: 1478036257 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Images/SCAN_Screenshot_Icon.png b/Unity/SCANsat/Assets/Images/SCAN_Screenshot_Icon.png new file mode 100644 index 000000000..5f523b473 Binary files /dev/null and b/Unity/SCANsat/Assets/Images/SCAN_Screenshot_Icon.png differ diff --git a/Unity/SCANsat/Assets/Images/SCAN_Screenshot_Icon.png.meta b/Unity/SCANsat/Assets/Images/SCAN_Screenshot_Icon.png.meta new file mode 100644 index 000000000..ec3a485f2 --- /dev/null +++ b/Unity/SCANsat/Assets/Images/SCAN_Screenshot_Icon.png.meta @@ -0,0 +1,56 @@ +fileFormatVersion: 2 +guid: 0dcc7620dac6e1b4193d4e7aea604d45 +timeCreated: 1478036256 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Images/SCAN_Settings_Icon.png b/Unity/SCANsat/Assets/Images/SCAN_Settings_Icon.png new file mode 100644 index 000000000..e96bf4709 Binary files /dev/null and b/Unity/SCANsat/Assets/Images/SCAN_Settings_Icon.png differ diff --git a/Unity/SCANsat/Assets/Images/SCAN_Settings_Icon.png.meta b/Unity/SCANsat/Assets/Images/SCAN_Settings_Icon.png.meta new file mode 100644 index 000000000..f05d4c0db --- /dev/null +++ b/Unity/SCANsat/Assets/Images/SCAN_Settings_Icon.png.meta @@ -0,0 +1,56 @@ +fileFormatVersion: 2 +guid: f5e1ed61c1e31404a8a0692a5afdac5f +timeCreated: 1478036257 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Images/SCAN_Settings_Icon_Large.png b/Unity/SCANsat/Assets/Images/SCAN_Settings_Icon_Large.png new file mode 100644 index 000000000..3dbffc621 Binary files /dev/null and b/Unity/SCANsat/Assets/Images/SCAN_Settings_Icon_Large.png differ diff --git a/Unity/SCANsat/Assets/Images/SCAN_Settings_Icon_Large.png.meta b/Unity/SCANsat/Assets/Images/SCAN_Settings_Icon_Large.png.meta new file mode 100644 index 000000000..8c6191d3f --- /dev/null +++ b/Unity/SCANsat/Assets/Images/SCAN_Settings_Icon_Large.png.meta @@ -0,0 +1,56 @@ +fileFormatVersion: 2 +guid: 24bc376ff88434c41beb56b261d312e5 +timeCreated: 1485798700 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Images/SCAN_TargetIcon.png b/Unity/SCANsat/Assets/Images/SCAN_TargetIcon.png new file mode 100644 index 000000000..5e46649f1 Binary files /dev/null and b/Unity/SCANsat/Assets/Images/SCAN_TargetIcon.png differ diff --git a/Unity/SCANsat/Assets/Images/SCAN_TargetIcon.png.meta b/Unity/SCANsat/Assets/Images/SCAN_TargetIcon.png.meta new file mode 100644 index 000000000..80cc9793f --- /dev/null +++ b/Unity/SCANsat/Assets/Images/SCAN_TargetIcon.png.meta @@ -0,0 +1,56 @@ +fileFormatVersion: 2 +guid: f46f82d2b1ded3c4ba6ca65d4d16cecc +timeCreated: 1478036257 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Images/SCAN_TerminatorIcon.png b/Unity/SCANsat/Assets/Images/SCAN_TerminatorIcon.png new file mode 100644 index 000000000..afdbb6943 Binary files /dev/null and b/Unity/SCANsat/Assets/Images/SCAN_TerminatorIcon.png differ diff --git a/Unity/SCANsat/Assets/Images/SCAN_TerminatorIcon.png.meta b/Unity/SCANsat/Assets/Images/SCAN_TerminatorIcon.png.meta new file mode 100644 index 000000000..e112ecbd5 --- /dev/null +++ b/Unity/SCANsat/Assets/Images/SCAN_TerminatorIcon.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: 965dd3babd4019745ac8852ebbbcdb4d +timeCreated: 1489013148 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 7 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/SCANassets/Icons/SCAN_Toggle.png b/Unity/SCANsat/Assets/Images/SCAN_Toggle.png similarity index 100% rename from SCANassets/Icons/SCAN_Toggle.png rename to Unity/SCANsat/Assets/Images/SCAN_Toggle.png diff --git a/Unity/SCANsat/Assets/Images/SCAN_Toggle.png.meta b/Unity/SCANsat/Assets/Images/SCAN_Toggle.png.meta new file mode 100644 index 000000000..726098006 --- /dev/null +++ b/Unity/SCANsat/Assets/Images/SCAN_Toggle.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: 06a2a246979ef154195f532452e7d704 +timeCreated: 1480524502 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 5, y: 5, z: 6, w: 5} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Images/SCAN_Toggle_Border.png b/Unity/SCANsat/Assets/Images/SCAN_Toggle_Border.png new file mode 100644 index 000000000..64d9966e0 Binary files /dev/null and b/Unity/SCANsat/Assets/Images/SCAN_Toggle_Border.png differ diff --git a/Unity/SCANsat/Assets/Images/SCAN_Toggle_Border.png.meta b/Unity/SCANsat/Assets/Images/SCAN_Toggle_Border.png.meta new file mode 100644 index 000000000..87b374b39 --- /dev/null +++ b/Unity/SCANsat/Assets/Images/SCAN_Toggle_Border.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: 7e4d712ebbcaf1947b03ccbafbdcd420 +timeCreated: 1485207610 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 9, y: 9, z: 10, w: 9} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: scan_unity_skin + assetBundleVariant: diff --git a/SCANassets/Icons/SCAN_Toggle_Hover.png b/Unity/SCANsat/Assets/Images/SCAN_Toggle_Hover.png similarity index 100% rename from SCANassets/Icons/SCAN_Toggle_Hover.png rename to Unity/SCANsat/Assets/Images/SCAN_Toggle_Hover.png diff --git a/Unity/SCANsat/Assets/Images/SCAN_Toggle_Hover.png.meta b/Unity/SCANsat/Assets/Images/SCAN_Toggle_Hover.png.meta new file mode 100644 index 000000000..156f54fad --- /dev/null +++ b/Unity/SCANsat/Assets/Images/SCAN_Toggle_Hover.png.meta @@ -0,0 +1,56 @@ +fileFormatVersion: 2 +guid: 3a93b9902ee525542a31962eaa017f67 +timeCreated: 1485298565 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 5, y: 5, z: 6, w: 5} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Images/SCAN_Toggle_Hover_Border.png b/Unity/SCANsat/Assets/Images/SCAN_Toggle_Hover_Border.png new file mode 100644 index 000000000..d7e53ec2d Binary files /dev/null and b/Unity/SCANsat/Assets/Images/SCAN_Toggle_Hover_Border.png differ diff --git a/Unity/SCANsat/Assets/Images/SCAN_Toggle_Hover_Border.png.meta b/Unity/SCANsat/Assets/Images/SCAN_Toggle_Hover_Border.png.meta new file mode 100644 index 000000000..2c15ec88c --- /dev/null +++ b/Unity/SCANsat/Assets/Images/SCAN_Toggle_Hover_Border.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: 725d6049e1afeb9438e3d127eb90ef60 +timeCreated: 1485208269 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 9, y: 9, z: 10, w: 9} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: scan_unity_skin + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Images/SCAN_Toggle_On_Hover_Border.png b/Unity/SCANsat/Assets/Images/SCAN_Toggle_On_Hover_Border.png new file mode 100644 index 000000000..202a04ed5 Binary files /dev/null and b/Unity/SCANsat/Assets/Images/SCAN_Toggle_On_Hover_Border.png differ diff --git a/Unity/SCANsat/Assets/Images/SCAN_Toggle_On_Hover_Border.png.meta b/Unity/SCANsat/Assets/Images/SCAN_Toggle_On_Hover_Border.png.meta new file mode 100644 index 000000000..02a254a03 --- /dev/null +++ b/Unity/SCANsat/Assets/Images/SCAN_Toggle_On_Hover_Border.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: 754f0135b996a5548b91d97c35f4ffc0 +timeCreated: 1485298587 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 9, y: 9, z: 10, w: 9} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: scan_unity_skin + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Images/SCAN_WayPointIcon.png b/Unity/SCANsat/Assets/Images/SCAN_WayPointIcon.png new file mode 100644 index 000000000..42c070018 Binary files /dev/null and b/Unity/SCANsat/Assets/Images/SCAN_WayPointIcon.png differ diff --git a/Unity/SCANsat/Assets/Images/SCAN_WayPointIcon.png.meta b/Unity/SCANsat/Assets/Images/SCAN_WayPointIcon.png.meta new file mode 100644 index 000000000..fcc45079b --- /dev/null +++ b/Unity/SCANsat/Assets/Images/SCAN_WayPointIcon.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: 7a56f7dccead3fb4b9a92149edc6383b +timeCreated: 1478036257 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Images/SCAN_WayPointIcon_Outline.png b/Unity/SCANsat/Assets/Images/SCAN_WayPointIcon_Outline.png new file mode 100644 index 000000000..8e1b7a6aa Binary files /dev/null and b/Unity/SCANsat/Assets/Images/SCAN_WayPointIcon_Outline.png differ diff --git a/Unity/SCANsat/Assets/Images/SCAN_WayPointIcon_Outline.png.meta b/Unity/SCANsat/Assets/Images/SCAN_WayPointIcon_Outline.png.meta new file mode 100644 index 000000000..bfa7ddf9a --- /dev/null +++ b/Unity/SCANsat/Assets/Images/SCAN_WayPointIcon_Outline.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: 74be1b6b08d184a48b938f62ac01ed7a +timeCreated: 1485023677 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: scan_icons + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Images/SCAN_ZoomInIcon.png b/Unity/SCANsat/Assets/Images/SCAN_ZoomInIcon.png new file mode 100644 index 000000000..e633e8aa6 Binary files /dev/null and b/Unity/SCANsat/Assets/Images/SCAN_ZoomInIcon.png differ diff --git a/Unity/SCANsat/Assets/Images/SCAN_ZoomInIcon.png.meta b/Unity/SCANsat/Assets/Images/SCAN_ZoomInIcon.png.meta new file mode 100644 index 000000000..f473490b0 --- /dev/null +++ b/Unity/SCANsat/Assets/Images/SCAN_ZoomInIcon.png.meta @@ -0,0 +1,56 @@ +fileFormatVersion: 2 +guid: 82d69a3eb260f1240b2f1bd77c20245a +timeCreated: 1478036257 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Images/SCAN_ZoomOutIcon.png b/Unity/SCANsat/Assets/Images/SCAN_ZoomOutIcon.png new file mode 100644 index 000000000..a056a82d7 Binary files /dev/null and b/Unity/SCANsat/Assets/Images/SCAN_ZoomOutIcon.png differ diff --git a/Unity/SCANsat/Assets/Images/SCAN_ZoomOutIcon.png.meta b/Unity/SCANsat/Assets/Images/SCAN_ZoomOutIcon.png.meta new file mode 100644 index 000000000..8c6b83b5a --- /dev/null +++ b/Unity/SCANsat/Assets/Images/SCAN_ZoomOutIcon.png.meta @@ -0,0 +1,56 @@ +fileFormatVersion: 2 +guid: e3855b715f73d4d48ba1ca5563cf8730 +timeCreated: 1478036257 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Images/SCAN_Zoom_Map_Icon.png b/Unity/SCANsat/Assets/Images/SCAN_Zoom_Map_Icon.png new file mode 100644 index 000000000..f87a3b426 Binary files /dev/null and b/Unity/SCANsat/Assets/Images/SCAN_Zoom_Map_Icon.png differ diff --git a/Unity/SCANsat/Assets/Images/SCAN_Zoom_Map_Icon.png.meta b/Unity/SCANsat/Assets/Images/SCAN_Zoom_Map_Icon.png.meta new file mode 100644 index 000000000..8a0b14ca7 --- /dev/null +++ b/Unity/SCANsat/Assets/Images/SCAN_Zoom_Map_Icon.png.meta @@ -0,0 +1,56 @@ +fileFormatVersion: 2 +guid: 6413f99763adc364d80216dd42365ed8 +timeCreated: 1478036256 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Images/SCAN_Zoom_Map_Icon_Large.png b/Unity/SCANsat/Assets/Images/SCAN_Zoom_Map_Icon_Large.png new file mode 100644 index 000000000..e57b19108 Binary files /dev/null and b/Unity/SCANsat/Assets/Images/SCAN_Zoom_Map_Icon_Large.png differ diff --git a/Unity/SCANsat/Assets/Images/SCAN_Zoom_Map_Icon_Large.png.meta b/Unity/SCANsat/Assets/Images/SCAN_Zoom_Map_Icon_Large.png.meta new file mode 100644 index 000000000..63b8fd6a6 --- /dev/null +++ b/Unity/SCANsat/Assets/Images/SCAN_Zoom_Map_Icon_Large.png.meta @@ -0,0 +1,56 @@ +fileFormatVersion: 2 +guid: 6b114b2b0e687844ca15ff88308c72eb +timeCreated: 1485798700 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Images/SCAN_Zoom_Max.png b/Unity/SCANsat/Assets/Images/SCAN_Zoom_Max.png new file mode 100644 index 000000000..0419409cc Binary files /dev/null and b/Unity/SCANsat/Assets/Images/SCAN_Zoom_Max.png differ diff --git a/Unity/SCANsat/Assets/Images/SCAN_Zoom_Max.png.meta b/Unity/SCANsat/Assets/Images/SCAN_Zoom_Max.png.meta new file mode 100644 index 000000000..660f68b96 --- /dev/null +++ b/Unity/SCANsat/Assets/Images/SCAN_Zoom_Max.png.meta @@ -0,0 +1,56 @@ +fileFormatVersion: 2 +guid: b02743ab96de8a44f8538044f921be0c +timeCreated: 1486659370 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Images/SCAN_Zoom_Med.png b/Unity/SCANsat/Assets/Images/SCAN_Zoom_Med.png new file mode 100644 index 000000000..aab94d27c Binary files /dev/null and b/Unity/SCANsat/Assets/Images/SCAN_Zoom_Med.png differ diff --git a/Unity/SCANsat/Assets/Images/SCAN_Zoom_Med.png.meta b/Unity/SCANsat/Assets/Images/SCAN_Zoom_Med.png.meta new file mode 100644 index 000000000..1a876b0e0 --- /dev/null +++ b/Unity/SCANsat/Assets/Images/SCAN_Zoom_Med.png.meta @@ -0,0 +1,56 @@ +fileFormatVersion: 2 +guid: fa8b66a7efe944d4ba3ef52ef4203f9e +timeCreated: 1486659370 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Images/SCAN_Zoom_Min.png b/Unity/SCANsat/Assets/Images/SCAN_Zoom_Min.png new file mode 100644 index 000000000..65582bf36 Binary files /dev/null and b/Unity/SCANsat/Assets/Images/SCAN_Zoom_Min.png differ diff --git a/Unity/SCANsat/Assets/Images/SCAN_Zoom_Min.png.meta b/Unity/SCANsat/Assets/Images/SCAN_Zoom_Min.png.meta new file mode 100644 index 000000000..54adf4ee2 --- /dev/null +++ b/Unity/SCANsat/Assets/Images/SCAN_Zoom_Min.png.meta @@ -0,0 +1,56 @@ +fileFormatVersion: 2 +guid: add6efbc9e8ba874ca783594a0764d9a +timeCreated: 1486659370 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Images/SCANsat_AppLauncherLarge_Icon.png b/Unity/SCANsat/Assets/Images/SCANsat_AppLauncherLarge_Icon.png new file mode 100644 index 000000000..3073cc7f4 Binary files /dev/null and b/Unity/SCANsat/Assets/Images/SCANsat_AppLauncherLarge_Icon.png differ diff --git a/Unity/SCANsat/Assets/Images/SCANsat_AppLauncherLarge_Icon.png.meta b/Unity/SCANsat/Assets/Images/SCANsat_AppLauncherLarge_Icon.png.meta new file mode 100644 index 000000000..bea261c9b --- /dev/null +++ b/Unity/SCANsat/Assets/Images/SCANsat_AppLauncherLarge_Icon.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: bbe428fcd16aee74993dab6f1431c9e1 +timeCreated: 1478035958 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: scan_icons + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Images/SCANsat_AppLauncherSmall_Icon.png b/Unity/SCANsat/Assets/Images/SCANsat_AppLauncherSmall_Icon.png new file mode 100644 index 000000000..6d33ba973 Binary files /dev/null and b/Unity/SCANsat/Assets/Images/SCANsat_AppLauncherSmall_Icon.png differ diff --git a/Unity/SCANsat/Assets/Images/SCANsat_AppLauncherSmall_Icon.png.meta b/Unity/SCANsat/Assets/Images/SCANsat_AppLauncherSmall_Icon.png.meta new file mode 100644 index 000000000..1a49b0b71 --- /dev/null +++ b/Unity/SCANsat/Assets/Images/SCANsat_AppLauncherSmall_Icon.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: ccc784c67200d5247b2c2e6283d25e79 +timeCreated: 1478035958 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: scan_icons + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Images/StationIcon.png b/Unity/SCANsat/Assets/Images/StationIcon.png new file mode 100644 index 000000000..b33bab547 Binary files /dev/null and b/Unity/SCANsat/Assets/Images/StationIcon.png differ diff --git a/Unity/SCANsat/Assets/Images/StationIcon.png.meta b/Unity/SCANsat/Assets/Images/StationIcon.png.meta new file mode 100644 index 000000000..314fc18b6 --- /dev/null +++ b/Unity/SCANsat/Assets/Images/StationIcon.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: 71b9339d2d6b33e42931f96d703ee98c +timeCreated: 1484155023 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: scan_icons + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/KSPedia.meta b/Unity/SCANsat/Assets/KSPedia.meta new file mode 100644 index 000000000..3ed9c8ece --- /dev/null +++ b/Unity/SCANsat/Assets/KSPedia.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 5b588b5c0f65d24438cd35e5518da329 +folderAsset: yes +timeCreated: 1487971541 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/KSPedia/Images.meta b/Unity/SCANsat/Assets/KSPedia/Images.meta new file mode 100644 index 000000000..17bda4670 --- /dev/null +++ b/Unity/SCANsat/Assets/KSPedia/Images.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 9dd1c95633de08e4bbf840802fa6838a +folderAsset: yes +timeCreated: 1487971546 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/KSPedia/Prefabs.meta b/Unity/SCANsat/Assets/KSPedia/Prefabs.meta new file mode 100644 index 000000000..4eb96f178 --- /dev/null +++ b/Unity/SCANsat/Assets/KSPedia/Prefabs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: f40a02fed05aa81409aa717e590926e9 +folderAsset: yes +timeCreated: 1487971550 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Advanced.prefab b/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Advanced.prefab new file mode 100644 index 000000000..03ce7f9b1 Binary files /dev/null and b/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Advanced.prefab differ diff --git a/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Advanced.prefab.meta b/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Advanced.prefab.meta new file mode 100644 index 000000000..ac4d40aa8 --- /dev/null +++ b/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Advanced.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0059d5a7b3746454885658d0f88fd94d +timeCreated: 1487971664 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Basic.prefab b/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Basic.prefab new file mode 100644 index 000000000..259d4413d Binary files /dev/null and b/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Basic.prefab differ diff --git a/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Basic.prefab.meta b/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Basic.prefab.meta new file mode 100644 index 000000000..17f720057 --- /dev/null +++ b/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Basic.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c7ab9f55ac09fc8488c2693de9d8ba3e +timeCreated: 1487971664 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Colors.prefab b/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Colors.prefab new file mode 100644 index 000000000..552dd9f88 Binary files /dev/null and b/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Colors.prefab differ diff --git a/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Colors.prefab.meta b/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Colors.prefab.meta new file mode 100644 index 000000000..f582ddd81 --- /dev/null +++ b/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Colors.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 3a999eaf05d61904487ab5f61e07f650 +timeCreated: 1487971664 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Colors_Biome.prefab b/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Colors_Biome.prefab new file mode 100644 index 000000000..cd476076f Binary files /dev/null and b/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Colors_Biome.prefab differ diff --git a/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Colors_Biome.prefab.meta b/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Colors_Biome.prefab.meta new file mode 100644 index 000000000..3ba792488 --- /dev/null +++ b/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Colors_Biome.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0dcaf90783495d04bbfaa384151f4618 +timeCreated: 1487971664 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Colors_Resources.prefab b/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Colors_Resources.prefab new file mode 100644 index 000000000..730b2d45b Binary files /dev/null and b/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Colors_Resources.prefab differ diff --git a/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Colors_Resources.prefab.meta b/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Colors_Resources.prefab.meta new file mode 100644 index 000000000..e50aaa640 --- /dev/null +++ b/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Colors_Resources.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 376d276781fe9f54da393639ff880f54 +timeCreated: 1487971664 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Colors_Slope.prefab b/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Colors_Slope.prefab new file mode 100644 index 000000000..e9cefec97 Binary files /dev/null and b/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Colors_Slope.prefab differ diff --git a/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Colors_Slope.prefab.meta b/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Colors_Slope.prefab.meta new file mode 100644 index 000000000..4c7114802 --- /dev/null +++ b/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Colors_Slope.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 9d76f1b45769ba44ca549cdfb23d1aaf +timeCreated: 1487971664 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Colors_Terrain.prefab b/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Colors_Terrain.prefab new file mode 100644 index 000000000..5cfb66159 Binary files /dev/null and b/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Colors_Terrain.prefab differ diff --git a/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Colors_Terrain.prefab.meta b/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Colors_Terrain.prefab.meta new file mode 100644 index 000000000..256440b2d --- /dev/null +++ b/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Colors_Terrain.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 289b4dd2278e9f34d83d2420436eb06a +timeCreated: 1487971664 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Features.prefab b/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Features.prefab new file mode 100644 index 000000000..47da1859a Binary files /dev/null and b/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Features.prefab differ diff --git a/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Features.prefab.meta b/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Features.prefab.meta new file mode 100644 index 000000000..327894077 --- /dev/null +++ b/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Features.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 818caf5dabeacc944982692d6b72f9cb +timeCreated: 1487971664 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Header.prefab b/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Header.prefab new file mode 100644 index 000000000..d4817ec26 Binary files /dev/null and b/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Header.prefab differ diff --git a/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Header.prefab.meta b/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Header.prefab.meta new file mode 100644 index 000000000..caa232aba --- /dev/null +++ b/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Header.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 3a2b4da9511066641b0811b44589e1fe +timeCreated: 1487971664 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Intro.prefab b/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Intro.prefab new file mode 100644 index 000000000..143753e36 Binary files /dev/null and b/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Intro.prefab differ diff --git a/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Intro.prefab.meta b/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Intro.prefab.meta new file mode 100644 index 000000000..48de63add --- /dev/null +++ b/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Intro.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f9937bebb2ebece4986143c7aaad64f7 +timeCreated: 1487971664 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Parts.prefab b/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Parts.prefab new file mode 100644 index 000000000..e4c14baf0 Binary files /dev/null and b/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Parts.prefab differ diff --git a/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Parts.prefab.meta b/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Parts.prefab.meta new file mode 100644 index 000000000..26c01a8a5 --- /dev/null +++ b/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Parts.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 544bb4a3180131249ae068c4a136e7ad +timeCreated: 1487971664 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_RPM.prefab b/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_RPM.prefab new file mode 100644 index 000000000..af0ed926e Binary files /dev/null and b/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_RPM.prefab differ diff --git a/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_RPM.prefab.meta b/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_RPM.prefab.meta new file mode 100644 index 000000000..6b4529336 --- /dev/null +++ b/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_RPM.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 832215bf5e614a7408b83e39152c3a0f +timeCreated: 1487971664 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Resource_Overlay.prefab b/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Resource_Overlay.prefab new file mode 100644 index 000000000..952ad9f0c Binary files /dev/null and b/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Resource_Overlay.prefab differ diff --git a/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Resource_Overlay.prefab.meta b/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Resource_Overlay.prefab.meta new file mode 100644 index 000000000..d15c16f5e --- /dev/null +++ b/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Resource_Overlay.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: cf78f8aed0c23f4429db6d35c429b7ef +timeCreated: 1487971664 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Resource_Parts.prefab b/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Resource_Parts.prefab new file mode 100644 index 000000000..f53dc2319 Binary files /dev/null and b/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Resource_Parts.prefab differ diff --git a/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Resource_Parts.prefab.meta b/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Resource_Parts.prefab.meta new file mode 100644 index 000000000..5e9ee1c71 --- /dev/null +++ b/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Resource_Parts.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a28404db56154ec4b853914a777189a4 +timeCreated: 1487971664 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Resource_Settings.prefab b/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Resource_Settings.prefab new file mode 100644 index 000000000..c836dc88e Binary files /dev/null and b/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Resource_Settings.prefab differ diff --git a/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Resource_Settings.prefab.meta b/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Resource_Settings.prefab.meta new file mode 100644 index 000000000..24fe74c9f --- /dev/null +++ b/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Resource_Settings.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5c0bb88dccfc7c2469420cd6bb3c5755 +timeCreated: 1487971664 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Resource_Tools.prefab b/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Resource_Tools.prefab new file mode 100644 index 000000000..1eee82602 Binary files /dev/null and b/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Resource_Tools.prefab differ diff --git a/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Resource_Tools.prefab.meta b/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Resource_Tools.prefab.meta new file mode 100644 index 000000000..37a48ef1a --- /dev/null +++ b/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Resource_Tools.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 2b1d82fec71a8e74f88661877b54eac9 +timeCreated: 1487971664 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Resources.prefab b/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Resources.prefab new file mode 100644 index 000000000..835e2ae67 Binary files /dev/null and b/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Resources.prefab differ diff --git a/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Resources.prefab.meta b/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Resources.prefab.meta new file mode 100644 index 000000000..dd10a447a --- /dev/null +++ b/Unity/SCANsat/Assets/KSPedia/Prefabs/SCANsat_Resources.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: cab7ee3b6aec8364db569eb2f72a165e +timeCreated: 1487971664 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/KSPedia/Prefabs/Scanning_Advanced.prefab b/Unity/SCANsat/Assets/KSPedia/Prefabs/Scanning_Advanced.prefab new file mode 100644 index 000000000..b12b4daf3 Binary files /dev/null and b/Unity/SCANsat/Assets/KSPedia/Prefabs/Scanning_Advanced.prefab differ diff --git a/Unity/SCANsat/Assets/KSPedia/Prefabs/Scanning_Advanced.prefab.meta b/Unity/SCANsat/Assets/KSPedia/Prefabs/Scanning_Advanced.prefab.meta new file mode 100644 index 000000000..08f872755 --- /dev/null +++ b/Unity/SCANsat/Assets/KSPedia/Prefabs/Scanning_Advanced.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c15dd79a30b30a94e939de4ac1c81aeb +timeCreated: 1487971664 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/KSPedia/Prefabs/Scanning_Basic.prefab b/Unity/SCANsat/Assets/KSPedia/Prefabs/Scanning_Basic.prefab new file mode 100644 index 000000000..07863162e Binary files /dev/null and b/Unity/SCANsat/Assets/KSPedia/Prefabs/Scanning_Basic.prefab differ diff --git a/Unity/SCANsat/Assets/KSPedia/Prefabs/Scanning_Basic.prefab.meta b/Unity/SCANsat/Assets/KSPedia/Prefabs/Scanning_Basic.prefab.meta new file mode 100644 index 000000000..a7f2ecdd1 --- /dev/null +++ b/Unity/SCANsat/Assets/KSPedia/Prefabs/Scanning_Basic.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 86e45d97058cef94caca64401c5c5d35 +timeCreated: 1487971664 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Lib.meta b/Unity/SCANsat/Assets/Lib.meta new file mode 100644 index 000000000..600c487b7 --- /dev/null +++ b/Unity/SCANsat/Assets/Lib.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 6a52d514389e28b438ae8544be1ac27b +folderAsset: yes +timeCreated: 1478034312 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Lib/PartTools.dll b/Unity/SCANsat/Assets/Lib/PartTools.dll new file mode 100644 index 000000000..e49e5e509 Binary files /dev/null and b/Unity/SCANsat/Assets/Lib/PartTools.dll differ diff --git a/Unity/SCANsat/Assets/Lib/PartTools.dll.meta b/Unity/SCANsat/Assets/Lib/PartTools.dll.meta new file mode 100644 index 000000000..f2c25c0ec --- /dev/null +++ b/Unity/SCANsat/Assets/Lib/PartTools.dll.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 90118262cf80c7549ab37dd61d08c605 +PluginImporter: + serializedVersion: 1 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + platformData: + Any: + enabled: 1 + settings: {} + Editor: + enabled: 0 + settings: + DefaultValueInitialized: true + WindowsStoreApps: + enabled: 0 + settings: + CPU: AnyCPU + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Lib/PartToolsEditor.dll b/Unity/SCANsat/Assets/Lib/PartToolsEditor.dll new file mode 100644 index 000000000..3974437bf Binary files /dev/null and b/Unity/SCANsat/Assets/Lib/PartToolsEditor.dll differ diff --git a/Unity/SCANsat/Assets/Lib/PartToolsEditor.dll.meta b/Unity/SCANsat/Assets/Lib/PartToolsEditor.dll.meta new file mode 100644 index 000000000..d54144ca2 --- /dev/null +++ b/Unity/SCANsat/Assets/Lib/PartToolsEditor.dll.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: e4331bf5e4a45a4488507f28195caf59 +PluginImporter: + serializedVersion: 1 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + platformData: + Any: + enabled: 1 + settings: {} + Editor: + enabled: 0 + settings: + DefaultValueInitialized: true + WindowsStoreApps: + enabled: 0 + settings: + CPU: AnyCPU + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Plugins.meta b/Unity/SCANsat/Assets/Plugins.meta new file mode 100644 index 000000000..b973a1bbb --- /dev/null +++ b/Unity/SCANsat/Assets/Plugins.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 97b908131649fa24fa74da8a884d37cd +folderAsset: yes +timeCreated: 1478034312 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Plugins/KSPAssets.meta b/Unity/SCANsat/Assets/Plugins/KSPAssets.meta new file mode 100644 index 000000000..564a643ad --- /dev/null +++ b/Unity/SCANsat/Assets/Plugins/KSPAssets.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 7810c03ce9571f74183306825d39e103 +folderAsset: yes +timeCreated: 1456139982 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Plugins/KSPAssets/KSPAssetCompiler.dll b/Unity/SCANsat/Assets/Plugins/KSPAssets/KSPAssetCompiler.dll new file mode 100644 index 000000000..4c425b56f Binary files /dev/null and b/Unity/SCANsat/Assets/Plugins/KSPAssets/KSPAssetCompiler.dll differ diff --git a/Unity/SCANsat/Assets/Plugins/KSPAssets/KSPAssetCompiler.dll.meta b/Unity/SCANsat/Assets/Plugins/KSPAssets/KSPAssetCompiler.dll.meta new file mode 100644 index 000000000..67172a8c2 --- /dev/null +++ b/Unity/SCANsat/Assets/Plugins/KSPAssets/KSPAssetCompiler.dll.meta @@ -0,0 +1,72 @@ +fileFormatVersion: 2 +guid: 0890400b9503e704f8990f50af9b31e0 +timeCreated: 1454319587 +licenseType: Pro +PluginImporter: + serializedVersion: 1 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + platformData: + Android: + enabled: 0 + settings: + CPU: AnyCPU + Any: + enabled: 0 + settings: {} + Editor: + enabled: 1 + settings: + CPU: AnyCPU + DefaultValueInitialized: true + OS: AnyOS + Linux: + enabled: 0 + settings: + CPU: x86 + Linux64: + enabled: 0 + settings: + CPU: x86_64 + OSXIntel: + enabled: 0 + settings: + CPU: AnyCPU + OSXIntel64: + enabled: 0 + settings: + CPU: AnyCPU + SamsungTV: + enabled: 0 + settings: + STV_MODEL: STANDARD_13 + WP8: + enabled: 0 + settings: + CPU: AnyCPU + DontProcess: False + PlaceholderPath: + Win: + enabled: 0 + settings: + CPU: AnyCPU + Win64: + enabled: 0 + settings: + CPU: AnyCPU + WindowsStoreApps: + enabled: 0 + settings: + CPU: AnyCPU + DontProcess: False + PlaceholderPath: + SDK: AnySDK + iOS: + enabled: 0 + settings: + CompileFlags: + FrameworkDependencies: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Plugins/KSPAssets/KSPAssets.dll b/Unity/SCANsat/Assets/Plugins/KSPAssets/KSPAssets.dll new file mode 100644 index 000000000..05934820a Binary files /dev/null and b/Unity/SCANsat/Assets/Plugins/KSPAssets/KSPAssets.dll differ diff --git a/Unity/SCANsat/Assets/Plugins/KSPAssets/KSPAssets.dll.meta b/Unity/SCANsat/Assets/Plugins/KSPAssets/KSPAssets.dll.meta new file mode 100644 index 000000000..64f69d26e --- /dev/null +++ b/Unity/SCANsat/Assets/Plugins/KSPAssets/KSPAssets.dll.meta @@ -0,0 +1,24 @@ +fileFormatVersion: 2 +guid: 7f5bed1f9aa762b41942b1832536a846 +timeCreated: 1454319588 +licenseType: Pro +PluginImporter: + serializedVersion: 1 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + platformData: + Any: + enabled: 1 + settings: {} + Editor: + enabled: 0 + settings: + DefaultValueInitialized: true + WindowsStoreApps: + enabled: 0 + settings: + CPU: AnyCPU + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Plugins/KSPAssets/ReadMe.txt b/Unity/SCANsat/Assets/Plugins/KSPAssets/ReadMe.txt new file mode 100644 index 000000000..7d3b98f55 --- /dev/null +++ b/Unity/SCANsat/Assets/Plugins/KSPAssets/ReadMe.txt @@ -0,0 +1 @@ +KSPAssets ReadMe v1 \ No newline at end of file diff --git a/Unity/SCANsat/Assets/Plugins/KSPAssets/ReadMe.txt.meta b/Unity/SCANsat/Assets/Plugins/KSPAssets/ReadMe.txt.meta new file mode 100644 index 000000000..2e06a4a2f --- /dev/null +++ b/Unity/SCANsat/Assets/Plugins/KSPAssets/ReadMe.txt.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 3ee644d0f5d6a744f9d2f7ab6e346c0f +timeCreated: 1456140045 +licenseType: Pro +TextScriptImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Plugins/SCANsat.Unity.dll b/Unity/SCANsat/Assets/Plugins/SCANsat.Unity.dll new file mode 100644 index 000000000..fcba52f54 Binary files /dev/null and b/Unity/SCANsat/Assets/Plugins/SCANsat.Unity.dll differ diff --git a/Unity/SCANsat/Assets/Plugins/SCANsat.Unity.dll.meta b/Unity/SCANsat/Assets/Plugins/SCANsat.Unity.dll.meta new file mode 100644 index 000000000..d4dd1da90 --- /dev/null +++ b/Unity/SCANsat/Assets/Plugins/SCANsat.Unity.dll.meta @@ -0,0 +1,24 @@ +fileFormatVersion: 2 +guid: eb35edfa13e33ef47bd4ac62c244d6d5 +timeCreated: 1480603864 +licenseType: Free +PluginImporter: + serializedVersion: 1 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + platformData: + Any: + enabled: 1 + settings: {} + Editor: + enabled: 0 + settings: + DefaultValueInitialized: true + WindowsStoreApps: + enabled: 0 + settings: + CPU: AnyCPU + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Prefabs.meta b/Unity/SCANsat/Assets/Prefabs.meta new file mode 100644 index 000000000..4e92bc215 --- /dev/null +++ b/Unity/SCANsat/Assets/Prefabs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 6e531e6240274bd4da922c487b5d3ad4 +folderAsset: yes +timeCreated: 1478034312 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Prefabs/MainMap_Vessel.prefab b/Unity/SCANsat/Assets/Prefabs/MainMap_Vessel.prefab new file mode 100644 index 000000000..59c42e7e9 Binary files /dev/null and b/Unity/SCANsat/Assets/Prefabs/MainMap_Vessel.prefab differ diff --git a/Unity/SCANsat/Assets/Prefabs/MainMap_Vessel.prefab.meta b/Unity/SCANsat/Assets/Prefabs/MainMap_Vessel.prefab.meta new file mode 100644 index 000000000..8fc7ee4ad --- /dev/null +++ b/Unity/SCANsat/Assets/Prefabs/MainMap_Vessel.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7b5a334b8e9f5e74983a8ebbdd26dca0 +timeCreated: 1478039123 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: scan_prefabs + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Prefabs/Overlay_Resource.prefab b/Unity/SCANsat/Assets/Prefabs/Overlay_Resource.prefab new file mode 100644 index 000000000..bf23aae03 Binary files /dev/null and b/Unity/SCANsat/Assets/Prefabs/Overlay_Resource.prefab differ diff --git a/Unity/SCANsat/Assets/Prefabs/Overlay_Resource.prefab.meta b/Unity/SCANsat/Assets/Prefabs/Overlay_Resource.prefab.meta new file mode 100644 index 000000000..8bee988e3 --- /dev/null +++ b/Unity/SCANsat/Assets/Prefabs/Overlay_Resource.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 8a559c6f89fd56a4aa6cd1f9b793994d +timeCreated: 1480456298 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: scan_prefabs + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Prefabs/SCAN_Background.prefab b/Unity/SCANsat/Assets/Prefabs/SCAN_Background.prefab new file mode 100644 index 000000000..9887c77ef Binary files /dev/null and b/Unity/SCANsat/Assets/Prefabs/SCAN_Background.prefab differ diff --git a/Unity/SCANsat/Assets/Prefabs/SCAN_Background.prefab.meta b/Unity/SCANsat/Assets/Prefabs/SCAN_Background.prefab.meta new file mode 100644 index 000000000..071fd43c6 --- /dev/null +++ b/Unity/SCANsat/Assets/Prefabs/SCAN_Background.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c1e0b0f33597a734facf2ccf665cd029 +timeCreated: 1481132956 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: scan_prefabs + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Prefabs/SCAN_BackgroundElement.prefab b/Unity/SCANsat/Assets/Prefabs/SCAN_BackgroundElement.prefab new file mode 100644 index 000000000..4e4a9df67 Binary files /dev/null and b/Unity/SCANsat/Assets/Prefabs/SCAN_BackgroundElement.prefab differ diff --git a/Unity/SCANsat/Assets/Prefabs/SCAN_BackgroundElement.prefab.meta b/Unity/SCANsat/Assets/Prefabs/SCAN_BackgroundElement.prefab.meta new file mode 100644 index 000000000..5e3d67a95 --- /dev/null +++ b/Unity/SCANsat/Assets/Prefabs/SCAN_BackgroundElement.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b7823d424e46c7343a3c973b91ea6ec1 +timeCreated: 1481216192 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: scan_prefabs + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Prefabs/SCAN_BigMap.prefab b/Unity/SCANsat/Assets/Prefabs/SCAN_BigMap.prefab new file mode 100644 index 000000000..d6e9d65e4 Binary files /dev/null and b/Unity/SCANsat/Assets/Prefabs/SCAN_BigMap.prefab differ diff --git a/Unity/SCANsat/Assets/Prefabs/SCAN_BigMap.prefab.meta b/Unity/SCANsat/Assets/Prefabs/SCAN_BigMap.prefab.meta new file mode 100644 index 000000000..d21a8ce3e --- /dev/null +++ b/Unity/SCANsat/Assets/Prefabs/SCAN_BigMap.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0ee1415fa9dd40644bd19e2722cec2f4 +timeCreated: 1480109258 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: scan_prefabs + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Prefabs/SCAN_ColorBiome.prefab b/Unity/SCANsat/Assets/Prefabs/SCAN_ColorBiome.prefab new file mode 100644 index 000000000..afca953b3 Binary files /dev/null and b/Unity/SCANsat/Assets/Prefabs/SCAN_ColorBiome.prefab differ diff --git a/Unity/SCANsat/Assets/Prefabs/SCAN_ColorBiome.prefab.meta b/Unity/SCANsat/Assets/Prefabs/SCAN_ColorBiome.prefab.meta new file mode 100644 index 000000000..6e0cc8440 --- /dev/null +++ b/Unity/SCANsat/Assets/Prefabs/SCAN_ColorBiome.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 2b2771cafafa81443bfb763e6e3f892c +timeCreated: 1487008562 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: scan_prefabs + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Prefabs/SCAN_ColorControl.prefab b/Unity/SCANsat/Assets/Prefabs/SCAN_ColorControl.prefab new file mode 100644 index 000000000..fba16f490 Binary files /dev/null and b/Unity/SCANsat/Assets/Prefabs/SCAN_ColorControl.prefab differ diff --git a/Unity/SCANsat/Assets/Prefabs/SCAN_ColorControl.prefab.meta b/Unity/SCANsat/Assets/Prefabs/SCAN_ColorControl.prefab.meta new file mode 100644 index 000000000..0711021ba --- /dev/null +++ b/Unity/SCANsat/Assets/Prefabs/SCAN_ColorControl.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 57c0f1cfae60c6d4ea49a23d168a2bd7 +timeCreated: 1487008560 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: scan_prefabs + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Prefabs/SCAN_ColorResource.prefab b/Unity/SCANsat/Assets/Prefabs/SCAN_ColorResource.prefab new file mode 100644 index 000000000..5b17c498e Binary files /dev/null and b/Unity/SCANsat/Assets/Prefabs/SCAN_ColorResource.prefab differ diff --git a/Unity/SCANsat/Assets/Prefabs/SCAN_ColorResource.prefab.meta b/Unity/SCANsat/Assets/Prefabs/SCAN_ColorResource.prefab.meta new file mode 100644 index 000000000..a6001db9d --- /dev/null +++ b/Unity/SCANsat/Assets/Prefabs/SCAN_ColorResource.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e60a01b03447ac442b31aad84fefc1fc +timeCreated: 1487010858 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: scan_prefabs + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Prefabs/SCAN_ColorSlope.prefab b/Unity/SCANsat/Assets/Prefabs/SCAN_ColorSlope.prefab new file mode 100644 index 000000000..66b42af22 Binary files /dev/null and b/Unity/SCANsat/Assets/Prefabs/SCAN_ColorSlope.prefab differ diff --git a/Unity/SCANsat/Assets/Prefabs/SCAN_ColorSlope.prefab.meta b/Unity/SCANsat/Assets/Prefabs/SCAN_ColorSlope.prefab.meta new file mode 100644 index 000000000..fb5a45533 --- /dev/null +++ b/Unity/SCANsat/Assets/Prefabs/SCAN_ColorSlope.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 306ca8e029802b046b6d11cdb9442fc1 +timeCreated: 1487009213 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: scan_prefabs + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Prefabs/SCAN_ColorTerrain.prefab b/Unity/SCANsat/Assets/Prefabs/SCAN_ColorTerrain.prefab new file mode 100644 index 000000000..636ca2bd3 Binary files /dev/null and b/Unity/SCANsat/Assets/Prefabs/SCAN_ColorTerrain.prefab differ diff --git a/Unity/SCANsat/Assets/Prefabs/SCAN_ColorTerrain.prefab.meta b/Unity/SCANsat/Assets/Prefabs/SCAN_ColorTerrain.prefab.meta new file mode 100644 index 000000000..5fe33595d --- /dev/null +++ b/Unity/SCANsat/Assets/Prefabs/SCAN_ColorTerrain.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b5232c0231aa66b40af7b2ec4215102e +timeCreated: 1487020613 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: scan_prefabs + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Prefabs/SCAN_Confirmation.prefab b/Unity/SCANsat/Assets/Prefabs/SCAN_Confirmation.prefab new file mode 100644 index 000000000..1ac95db87 Binary files /dev/null and b/Unity/SCANsat/Assets/Prefabs/SCAN_Confirmation.prefab differ diff --git a/Unity/SCANsat/Assets/Prefabs/SCAN_Confirmation.prefab.meta b/Unity/SCANsat/Assets/Prefabs/SCAN_Confirmation.prefab.meta new file mode 100644 index 000000000..276fc3be7 --- /dev/null +++ b/Unity/SCANsat/Assets/Prefabs/SCAN_Confirmation.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 138f3cd0987326445bc959d8c5f61e94 +timeCreated: 1487626640 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: scan_prefabs + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Prefabs/SCAN_Data.prefab b/Unity/SCANsat/Assets/Prefabs/SCAN_Data.prefab new file mode 100644 index 000000000..ee9a528ca Binary files /dev/null and b/Unity/SCANsat/Assets/Prefabs/SCAN_Data.prefab differ diff --git a/Unity/SCANsat/Assets/Prefabs/SCAN_Data.prefab.meta b/Unity/SCANsat/Assets/Prefabs/SCAN_Data.prefab.meta new file mode 100644 index 000000000..9a5507ca6 --- /dev/null +++ b/Unity/SCANsat/Assets/Prefabs/SCAN_Data.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f5588afc1be070c4293d58a636869e14 +timeCreated: 1481132854 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: scan_prefabs + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Prefabs/SCAN_DropDown.prefab b/Unity/SCANsat/Assets/Prefabs/SCAN_DropDown.prefab new file mode 100644 index 000000000..e40403c82 Binary files /dev/null and b/Unity/SCANsat/Assets/Prefabs/SCAN_DropDown.prefab differ diff --git a/Unity/SCANsat/Assets/Prefabs/SCAN_DropDown.prefab.meta b/Unity/SCANsat/Assets/Prefabs/SCAN_DropDown.prefab.meta new file mode 100644 index 000000000..ade53341c --- /dev/null +++ b/Unity/SCANsat/Assets/Prefabs/SCAN_DropDown.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 2f8167d90b7a2c542a47d29bbca95c74 +timeCreated: 1481158898 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: scan_prefabs + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Prefabs/SCAN_DropDownElement.prefab b/Unity/SCANsat/Assets/Prefabs/SCAN_DropDownElement.prefab new file mode 100644 index 000000000..4a4f5f697 Binary files /dev/null and b/Unity/SCANsat/Assets/Prefabs/SCAN_DropDownElement.prefab differ diff --git a/Unity/SCANsat/Assets/Prefabs/SCAN_DropDownElement.prefab.meta b/Unity/SCANsat/Assets/Prefabs/SCAN_DropDownElement.prefab.meta new file mode 100644 index 000000000..8962594e8 --- /dev/null +++ b/Unity/SCANsat/Assets/Prefabs/SCAN_DropDownElement.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 750a642a117d6fe46b759abe8655f308 +timeCreated: 1481158892 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: scan_prefabs + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Prefabs/SCAN_General.prefab b/Unity/SCANsat/Assets/Prefabs/SCAN_General.prefab new file mode 100644 index 000000000..9a7865a5a Binary files /dev/null and b/Unity/SCANsat/Assets/Prefabs/SCAN_General.prefab differ diff --git a/Unity/SCANsat/Assets/Prefabs/SCAN_General.prefab.meta b/Unity/SCANsat/Assets/Prefabs/SCAN_General.prefab.meta new file mode 100644 index 000000000..d488b066c --- /dev/null +++ b/Unity/SCANsat/Assets/Prefabs/SCAN_General.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c57b13a325aea5644b37abd70df422d6 +timeCreated: 1481132894 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: scan_prefabs + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Prefabs/SCAN_Ghost_Skin.prefab b/Unity/SCANsat/Assets/Prefabs/SCAN_Ghost_Skin.prefab new file mode 100644 index 000000000..0c1758d14 Binary files /dev/null and b/Unity/SCANsat/Assets/Prefabs/SCAN_Ghost_Skin.prefab differ diff --git a/Unity/SCANsat/Assets/Prefabs/SCAN_Ghost_Skin.prefab.meta b/Unity/SCANsat/Assets/Prefabs/SCAN_Ghost_Skin.prefab.meta new file mode 100644 index 000000000..477caf76e --- /dev/null +++ b/Unity/SCANsat/Assets/Prefabs/SCAN_Ghost_Skin.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e2f94fdab4722d846b4fcba16621d7d9 +timeCreated: 1480700884 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Prefabs/SCAN_Instruments.prefab b/Unity/SCANsat/Assets/Prefabs/SCAN_Instruments.prefab new file mode 100644 index 000000000..350fa2374 Binary files /dev/null and b/Unity/SCANsat/Assets/Prefabs/SCAN_Instruments.prefab differ diff --git a/Unity/SCANsat/Assets/Prefabs/SCAN_Instruments.prefab.meta b/Unity/SCANsat/Assets/Prefabs/SCAN_Instruments.prefab.meta new file mode 100644 index 000000000..66ca3ab55 --- /dev/null +++ b/Unity/SCANsat/Assets/Prefabs/SCAN_Instruments.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ef675a73e5e74654887f9976c5e1a2e8 +timeCreated: 1480598396 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: scan_prefabs + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Prefabs/SCAN_MainMap.prefab b/Unity/SCANsat/Assets/Prefabs/SCAN_MainMap.prefab new file mode 100644 index 000000000..9c8b0a7d8 Binary files /dev/null and b/Unity/SCANsat/Assets/Prefabs/SCAN_MainMap.prefab differ diff --git a/Unity/SCANsat/Assets/Prefabs/SCAN_MainMap.prefab.meta b/Unity/SCANsat/Assets/Prefabs/SCAN_MainMap.prefab.meta new file mode 100644 index 000000000..9399a117d --- /dev/null +++ b/Unity/SCANsat/Assets/Prefabs/SCAN_MainMap.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c30270af487c3794f8e35e6081c40aad +timeCreated: 1478035570 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: scan_prefabs + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Prefabs/SCAN_MapLabel.prefab b/Unity/SCANsat/Assets/Prefabs/SCAN_MapLabel.prefab new file mode 100644 index 000000000..00673bdaf Binary files /dev/null and b/Unity/SCANsat/Assets/Prefabs/SCAN_MapLabel.prefab differ diff --git a/Unity/SCANsat/Assets/Prefabs/SCAN_MapLabel.prefab.meta b/Unity/SCANsat/Assets/Prefabs/SCAN_MapLabel.prefab.meta new file mode 100644 index 000000000..a6b1cf779 --- /dev/null +++ b/Unity/SCANsat/Assets/Prefabs/SCAN_MapLabel.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 9a1e8cdf7bba791419d4be0d177fa1b7 +timeCreated: 1484061925 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: scan_prefabs + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Prefabs/SCAN_Overlay.prefab b/Unity/SCANsat/Assets/Prefabs/SCAN_Overlay.prefab new file mode 100644 index 000000000..1f984e2bc Binary files /dev/null and b/Unity/SCANsat/Assets/Prefabs/SCAN_Overlay.prefab differ diff --git a/Unity/SCANsat/Assets/Prefabs/SCAN_Overlay.prefab.meta b/Unity/SCANsat/Assets/Prefabs/SCAN_Overlay.prefab.meta new file mode 100644 index 000000000..10e01bb9e --- /dev/null +++ b/Unity/SCANsat/Assets/Prefabs/SCAN_Overlay.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 12cc86819041a614fa622d9c0e801709 +timeCreated: 1480455996 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: scan_prefabs + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Prefabs/SCAN_PaletteButton.prefab b/Unity/SCANsat/Assets/Prefabs/SCAN_PaletteButton.prefab new file mode 100644 index 000000000..62655a7b7 Binary files /dev/null and b/Unity/SCANsat/Assets/Prefabs/SCAN_PaletteButton.prefab differ diff --git a/Unity/SCANsat/Assets/Prefabs/SCAN_PaletteButton.prefab.meta b/Unity/SCANsat/Assets/Prefabs/SCAN_PaletteButton.prefab.meta new file mode 100644 index 000000000..51826b931 --- /dev/null +++ b/Unity/SCANsat/Assets/Prefabs/SCAN_PaletteButton.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 430ba490d0232e840b9eed6422ea43ce +timeCreated: 1487176773 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: scan_prefabs + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Prefabs/SCAN_Resources.prefab b/Unity/SCANsat/Assets/Prefabs/SCAN_Resources.prefab new file mode 100644 index 000000000..88f833b60 Binary files /dev/null and b/Unity/SCANsat/Assets/Prefabs/SCAN_Resources.prefab differ diff --git a/Unity/SCANsat/Assets/Prefabs/SCAN_Resources.prefab.meta b/Unity/SCANsat/Assets/Prefabs/SCAN_Resources.prefab.meta new file mode 100644 index 000000000..d7d91ea77 --- /dev/null +++ b/Unity/SCANsat/Assets/Prefabs/SCAN_Resources.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 9144307c67efb2d4c974f88b0706a9e1 +timeCreated: 1481133084 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: scan_prefabs + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Prefabs/SCAN_Settings.prefab b/Unity/SCANsat/Assets/Prefabs/SCAN_Settings.prefab new file mode 100644 index 000000000..2c93f1f46 Binary files /dev/null and b/Unity/SCANsat/Assets/Prefabs/SCAN_Settings.prefab differ diff --git a/Unity/SCANsat/Assets/Prefabs/SCAN_Settings.prefab.meta b/Unity/SCANsat/Assets/Prefabs/SCAN_Settings.prefab.meta new file mode 100644 index 000000000..16085ea41 --- /dev/null +++ b/Unity/SCANsat/Assets/Prefabs/SCAN_Settings.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0f01187160db534419d10ea376c85210 +timeCreated: 1481132196 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: scan_prefabs + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Prefabs/SCAN_Settings_Old.prefab b/Unity/SCANsat/Assets/Prefabs/SCAN_Settings_Old.prefab new file mode 100644 index 000000000..e84542666 Binary files /dev/null and b/Unity/SCANsat/Assets/Prefabs/SCAN_Settings_Old.prefab differ diff --git a/Unity/SCANsat/Assets/Prefabs/SCAN_Settings_Old.prefab.meta b/Unity/SCANsat/Assets/Prefabs/SCAN_Settings_Old.prefab.meta new file mode 100644 index 000000000..936cd7cf1 --- /dev/null +++ b/Unity/SCANsat/Assets/Prefabs/SCAN_Settings_Old.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 317f9c637a63af74590fff4bff7f20ae +timeCreated: 1481132189 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Prefabs/SCAN_Toolbar.prefab b/Unity/SCANsat/Assets/Prefabs/SCAN_Toolbar.prefab new file mode 100644 index 000000000..534f0b819 Binary files /dev/null and b/Unity/SCANsat/Assets/Prefabs/SCAN_Toolbar.prefab differ diff --git a/Unity/SCANsat/Assets/Prefabs/SCAN_Toolbar.prefab.meta b/Unity/SCANsat/Assets/Prefabs/SCAN_Toolbar.prefab.meta new file mode 100644 index 000000000..ab5c0baa1 --- /dev/null +++ b/Unity/SCANsat/Assets/Prefabs/SCAN_Toolbar.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 049313d8a71126f4692ff5785b7d3bad +timeCreated: 1485644222 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: scan_prefabs + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Prefabs/SCAN_Tooltip.prefab b/Unity/SCANsat/Assets/Prefabs/SCAN_Tooltip.prefab new file mode 100644 index 000000000..ebf7975a7 Binary files /dev/null and b/Unity/SCANsat/Assets/Prefabs/SCAN_Tooltip.prefab differ diff --git a/Unity/SCANsat/Assets/Prefabs/SCAN_Tooltip.prefab.meta b/Unity/SCANsat/Assets/Prefabs/SCAN_Tooltip.prefab.meta new file mode 100644 index 000000000..c4dd8604b --- /dev/null +++ b/Unity/SCANsat/Assets/Prefabs/SCAN_Tooltip.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b673d5c1be76ca5439cba95e3a3b9018 +timeCreated: 1485820117 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: scan_prefabs + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Prefabs/SCAN_ZoomMap.prefab b/Unity/SCANsat/Assets/Prefabs/SCAN_ZoomMap.prefab new file mode 100644 index 000000000..7f8e8bfaf Binary files /dev/null and b/Unity/SCANsat/Assets/Prefabs/SCAN_ZoomMap.prefab differ diff --git a/Unity/SCANsat/Assets/Prefabs/SCAN_ZoomMap.prefab.meta b/Unity/SCANsat/Assets/Prefabs/SCAN_ZoomMap.prefab.meta new file mode 100644 index 000000000..544283f51 --- /dev/null +++ b/Unity/SCANsat/Assets/Prefabs/SCAN_ZoomMap.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 1d5d436ff2c038645bbf281daf4c7d46 +timeCreated: 1486055695 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: scan_prefabs + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/SCANpedia.unity b/Unity/SCANsat/Assets/SCANpedia.unity new file mode 100644 index 000000000..16c20420c Binary files /dev/null and b/Unity/SCANsat/Assets/SCANpedia.unity differ diff --git a/Unity/SCANsat/Assets/SCANpedia.unity.meta b/Unity/SCANsat/Assets/SCANpedia.unity.meta new file mode 100644 index 000000000..289ef3e13 --- /dev/null +++ b/Unity/SCANsat/Assets/SCANpedia.unity.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5d07b071f5024d5488ba5a9730505c48 +timeCreated: 1487972566 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/SCANsat.unity b/Unity/SCANsat/Assets/SCANsat.unity new file mode 100644 index 000000000..617c8417c Binary files /dev/null and b/Unity/SCANsat/Assets/SCANsat.unity differ diff --git a/Unity/SCANsat/Assets/SCANsat.unity.meta b/Unity/SCANsat/Assets/SCANsat.unity.meta new file mode 100644 index 000000000..e595a2eab --- /dev/null +++ b/Unity/SCANsat/Assets/SCANsat.unity.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 6064c829ff878e041ac7d1255563f5e5 +timeCreated: 1478035437 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Shaders.meta b/Unity/SCANsat/Assets/Shaders.meta new file mode 100644 index 000000000..80ddea375 --- /dev/null +++ b/Unity/SCANsat/Assets/Shaders.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 95f19472caf6c3f41926acb8935c102b +folderAsset: yes +timeCreated: 1478034312 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Shaders/Alpha.shader b/Unity/SCANsat/Assets/Shaders/Alpha.shader new file mode 100644 index 000000000..7385b6009 --- /dev/null +++ b/Unity/SCANsat/Assets/Shaders/Alpha.shader @@ -0,0 +1,80 @@ +Shader "KSP/Alpha/Translucent" +{ + Properties + { + _MainTex("MainTex (RGBA)", 2D) = "white" {} + _Color("TintColor", Color) = (1,1,1,1) + _Opacity("_Opacity", Range(0,1)) = 1 + _Fresnel("Fresnel", Range(0,10)) = 0 + [MaterialToggle] _FresnelInvert("Invert Fresnel", Float) = 0 + + _RimFalloff("Rim Falloff", Range(0.01,5) ) = 0.1 + _RimColor("Rim Color", Color) = (0,0,0,0) + + _TemperatureColor("_TemperatureColor", Color) = (0,0,0,0) + _BurnColor ("Burn Color", Color) = (1,1,1,1) + } + + SubShader + { + Tags { "Queue" = "Transparent" } + + Pass + { + ZWrite On + ColorMask 0 + } + + //ZWrite On + ZTest LEqual + Blend SrcAlpha OneMinusSrcAlpha + + CGPROGRAM + #include "LightingKSP.cginc" + #pragma surface surf BlinnPhongSmooth alpha:fade + #pragma target 3.0 + + sampler2D _MainTex; + + float _Opacity; + float _RimFalloff; + float _Fresnel; + float _FresnelInvert; + float4 _RimColor; + float4 _TemperatureColor; + float4 _BurnColor; + + + struct Input + { + float2 uv_MainTex; + float2 uv_BumpMap; + float2 uv_Emissive; + float3 viewDir; + }; + + void surf (Input IN, inout SurfaceOutput o) + { + float4 color = tex2D(_MainTex, (IN.uv_MainTex)) * _BurnColor * _Color; + + float3 normal = float3(0,0,1); + half rim = 1.0 - saturate(dot (normalize(IN.viewDir), normal)); + + float3 fresnel = (_FresnelInvert + (pow(1 - rim, _Fresnel))) * (1 - _FresnelInvert + 1 - (pow(1 - rim, _Fresnel))); + + float3 emission = (_RimColor.rgb * pow(rim, _RimFalloff)) * _RimColor.a; + emission += _TemperatureColor.rgb * _TemperatureColor.a; + + o.Albedo = color.rgb; + o.Emission = emission; + o.Gloss = 0; + o.Specular = 0; + o.Normal = normal; + o.Emission *= _Opacity; + o.Alpha = _Opacity * color.a * fresnel; + } + + ENDCG + } + Fallback "Standard" +} \ No newline at end of file diff --git a/Unity/SCANsat/Assets/Shaders/Alpha.shader.meta b/Unity/SCANsat/Assets/Shaders/Alpha.shader.meta new file mode 100644 index 000000000..67cfb7df6 --- /dev/null +++ b/Unity/SCANsat/Assets/Shaders/Alpha.shader.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 91f6e47e2b98cb344bf578969233905c +ShaderImporter: + userData: diff --git a/Unity/SCANsat/Assets/Shaders/AlphaAdditive.shader b/Unity/SCANsat/Assets/Shaders/AlphaAdditive.shader new file mode 100644 index 000000000..5bb8ea569 --- /dev/null +++ b/Unity/SCANsat/Assets/Shaders/AlphaAdditive.shader @@ -0,0 +1,62 @@ +Shader "KSP/Alpha/Translucent Additive" +{ + Properties + { + _MainTex("MainTex (RGBA)", 2D) = "white" {} + _TintColor("TintColor", Color) = (1,1,1,1) + _Fresnel("Fresnel", Range(0,10)) = 0 + //_FresnelInvert("Inverse Fresnel", Range(0,10)) = 0 + } + + + + SubShader + { + Tags{ "Queue" = "Transparent" } + + ZWrite Off + ZTest LEqual + Blend SrcAlpha One + + CGPROGRAM + + #include "LightingKSP.cginc" + #pragma surface surf NoLighting noshadow noambient novertexlights nolightmap + #pragma target 3.0 + + + sampler2D _MainTex; + float _Fresnel; + float _FresnelInvert; + float4 _TintColor; + + struct Input + { + float2 uv_MainTex; + float2 uv_BumpMap; + float2 uv_Emissive; + float3 viewDir; + }; + + void surf(Input IN, inout SurfaceOutput o) + { + float4 color = tex2D(_MainTex, (IN.uv_MainTex)) * _TintColor; + + float3 normal = float3(0,0,1); + half rim = 1.0 - saturate(dot(normalize(IN.viewDir), normal)); + + o.Albedo = 0; + //o.Emission = color.rgb*(_FresnelColor+(_FresnelInvert + (pow(1 - rim, _Fresnel))) * (1 - _FresnelInvert + 1 - (pow(1 - rim, _Fresnel)))); + //o.Emission = color.rgb*(pow(1 - rim, _Fresnel))*((pow(rim, _FresnelInvert))); + o.Emission = color.rgb * (pow(1 - rim, _Fresnel)); + + o.Normal = normal; + + + } + + ENDCG + } + Fallback "KSP/Particles/Additive" + +} diff --git a/Unity/SCANsat/Assets/Shaders/AlphaAdditive.shader.meta b/Unity/SCANsat/Assets/Shaders/AlphaAdditive.shader.meta new file mode 100644 index 000000000..34dce08fa --- /dev/null +++ b/Unity/SCANsat/Assets/Shaders/AlphaAdditive.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 6203aefd0f9f41e439681638e43b2602 +timeCreated: 1448468481 +licenseType: Free +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Shaders/AlphaSpecular.shader b/Unity/SCANsat/Assets/Shaders/AlphaSpecular.shader new file mode 100644 index 000000000..aa32848d9 --- /dev/null +++ b/Unity/SCANsat/Assets/Shaders/AlphaSpecular.shader @@ -0,0 +1,89 @@ +Shader "KSP/Alpha/Translucent Specular" +{ + Properties + { + _MainTex("MainTex (RGBA)", 2D) = "white" {} + + //_Gloss ("Gloss", Range (0.01, 1)) = 0.5 + _SpecColor ("Specular Color", Color) = (0.5, 0.5, 0.5, 1) + _Shininess ("Shininess", Range (0.03, 1)) = 0.078125 + + + _Opacity("_Opacity", Range(0,1)) = 1 + _Fresnel("Fresnel", Range(0,10)) = 0 + [MaterialToggle] _FresnelInvert("Invert Fresnel", Float) = 0 + _RimFalloff("Rim Falloff", Range(0.01,5) ) = 0.1 + _RimColor("Rim Color", Color) = (0,0,0,0) + + _TemperatureColor("_TemperatureColor", Color) = (0,0,0,0) + _BurnColor ("Burn Color", Color) = (1,1,1,1) + } + + SubShader + { + Tags { "Queue" = "Transparent" } + + Pass + { + ZWrite On + ColorMask 0 + } + + //ZWrite On + ZTest LEqual + Blend SrcAlpha OneMinusSrcAlpha + + CGPROGRAM + + #include "LightingKSP.cginc" + #pragma surface surf BlinnPhongSmooth alpha:fade + #pragma target 3.0 + + half _Shininess; + + sampler2D _MainTex; + + //float _Gloss; + + float _Opacity; + float _Fresnel; + float _FresnelInvert; + float _RimFalloff; + float4 _RimColor; + float4 _TemperatureColor; + float4 _BurnColor; + + + struct Input + { + float2 uv_MainTex; + float2 uv_BumpMap; + float2 uv_Emissive; + float3 viewDir; + }; + + void surf (Input IN, inout SurfaceOutput o) + { + float4 color = tex2D(_MainTex, (IN.uv_MainTex)) * _BurnColor; + + float3 normal = float3(0,0,1); + half rim = 1.0 - saturate(dot (normalize(IN.viewDir), normal)); + + float3 fresnel = (_FresnelInvert + (pow(1 - rim, _Fresnel))) * (1 - _FresnelInvert + 1 - (pow(1 - rim, _Fresnel))); + + float3 emission = (_RimColor.rgb * pow(rim, _RimFalloff)) * _RimColor.a; + emission += _TemperatureColor.rgb * _TemperatureColor.a; + + o.Albedo = color.rgb; + o.Emission = emission; + o.Gloss = color.a; + o.Specular = _Shininess; + o.Normal = normal; + o.Emission *= _Opacity; + o.Alpha = _Opacity * color.a * fresnel; + } + + ENDCG + } + Fallback "Standard" +} \ No newline at end of file diff --git a/Unity/SCANsat/Assets/Shaders/AlphaSpecular.shader.meta b/Unity/SCANsat/Assets/Shaders/AlphaSpecular.shader.meta new file mode 100644 index 000000000..9b8990f2a --- /dev/null +++ b/Unity/SCANsat/Assets/Shaders/AlphaSpecular.shader.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 5e5bd0c65e5edba469513d146dbd61f9 +ShaderImporter: + userData: diff --git a/Unity/SCANsat/Assets/Shaders/Bumped.shader b/Unity/SCANsat/Assets/Shaders/Bumped.shader new file mode 100644 index 000000000..5c7ca29b1 --- /dev/null +++ b/Unity/SCANsat/Assets/Shaders/Bumped.shader @@ -0,0 +1,71 @@ +Shader "KSP/Bumped" +{ + Properties + { + _MainTex("_MainTex (RGB spec(A))", 2D) = "gray" {} + _BumpMap("_BumpMap", 2D) = "bump" {} + + _Opacity("_Opacity", Range(0,1) ) = 1 + + _RimFalloff("_RimFalloff", Range(0.01,5) ) = 0.1 + _RimColor("_RimColor", Color) = (0,0,0,0) + + _TemperatureColor("_TemperatureColor", Color) = (0,0,0,0) + _BurnColor ("Burn Color", Color) = (1,1,1,1) + + } + + SubShader + { + Tags { "RenderType"="Opaque" } + ZWrite On + ZTest LEqual + Blend SrcAlpha OneMinusSrcAlpha + + CGPROGRAM + + #include "LightingKSP.cginc" + #pragma surface surf BlinnPhongSmooth keepalpha + #pragma target 3.0 + + half _Shininess; + + sampler2D _MainTex; + sampler2D _BumpMap; + + float _Opacity; + float _RimFalloff; + float4 _RimColor; + float4 _TemperatureColor; + float4 _BurnColor; + + struct Input + { + float2 uv_MainTex; + float2 uv_BumpMap; + float2 uv_Emissive; + float3 viewDir; + }; + + void surf (Input IN, inout SurfaceOutput o) + { + float4 color = tex2D(_MainTex,(IN.uv_MainTex)) * _BurnColor; + float3 normal = UnpackNormal(tex2D(_BumpMap, IN.uv_BumpMap)); + + half rim = 1.0 - saturate(dot (normalize(IN.viewDir), normal)); + + float3 emission = (_RimColor.rgb * pow(rim, _RimFalloff)) * _RimColor.a; + emission += _TemperatureColor.rgb * _TemperatureColor.a; + + o.Albedo = color.rgb; + o.Emission = emission; + o.Normal = normal; + o.Gloss = 0; + o.Specular = 0; + o.Emission *= _Opacity; + o.Alpha = _Opacity; + } + ENDCG + } + Fallback "Standard" +} \ No newline at end of file diff --git a/Unity/SCANsat/Assets/Shaders/Bumped.shader.meta b/Unity/SCANsat/Assets/Shaders/Bumped.shader.meta new file mode 100644 index 000000000..00c4373cb --- /dev/null +++ b/Unity/SCANsat/Assets/Shaders/Bumped.shader.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 32714c7f3312f3a4f8728c7ad5fbfd6e +ShaderImporter: + userData: diff --git a/Unity/SCANsat/Assets/Shaders/BumpedSpecular.shader b/Unity/SCANsat/Assets/Shaders/BumpedSpecular.shader new file mode 100644 index 000000000..eaf57af88 --- /dev/null +++ b/Unity/SCANsat/Assets/Shaders/BumpedSpecular.shader @@ -0,0 +1,74 @@ +Shader "KSP/Bumped Specular" +{ + Properties + { + _MainTex("_MainTex (RGB spec(A))", 2D) = "gray" {} + _BumpMap("_BumpMap", 2D) = "bump" {} + _Color ("Main Color", Color) = (1,1,1,1) + _SpecColor ("Specular Color", Color) = (0.5, 0.5, 0.5, 1) + _Shininess ("Shininess", Range (0.03, 1)) = 0.4 + + _Opacity("_Opacity", Range(0,1) ) = 1 + _RimFalloff("_RimFalloff", Range(0.01,5) ) = 0.1 + _RimColor("_RimColor", Color) = (0,0,0,0) + + _TemperatureColor("_TemperatureColor", Color) = (0,0,0,0) + _BurnColor ("Burn Color", Color) = (1,1,1,1) + + } + + SubShader + { + Tags { "RenderType"="Opaque" } + ZWrite On + ZTest LEqual + Blend SrcAlpha OneMinusSrcAlpha + + CGPROGRAM + + #include "LightingKSP.cginc" + #pragma surface surf BlinnPhongSmooth keepalpha + #pragma target 3.0 + + half _Shininess; + + sampler2D _MainTex; + sampler2D _BumpMap; + + float _Opacity; + float _RimFalloff; + float4 _RimColor; + float4 _TemperatureColor; + float4 _BurnColor; + + + struct Input + { + float2 uv_MainTex; + float2 uv_BumpMap; + float2 uv_Emissive; + float3 viewDir; + }; + + void surf (Input IN, inout SurfaceOutput o) + { + float4 color = tex2D(_MainTex,(IN.uv_MainTex)) * _BurnColor; + float3 normal = UnpackNormal(tex2D(_BumpMap, IN.uv_BumpMap)); + + half rim = 1.0 - saturate(dot (normalize(IN.viewDir), normal)); + + float3 emission = (_RimColor.rgb * pow(rim, _RimFalloff)) * _RimColor.a; + emission += _TemperatureColor.rgb * _TemperatureColor.a; + + o.Albedo = color.rgb; + o.Emission = emission; + o.Gloss = color.a; + o.Specular = _Shininess; + o.Normal = normal; + o.Emission *= _Opacity; + o.Alpha = _Opacity; + } + ENDCG + } + Fallback "Standard" +} \ No newline at end of file diff --git a/Unity/SCANsat/Assets/Shaders/BumpedSpecular.shader.meta b/Unity/SCANsat/Assets/Shaders/BumpedSpecular.shader.meta new file mode 100644 index 000000000..07276fe07 --- /dev/null +++ b/Unity/SCANsat/Assets/Shaders/BumpedSpecular.shader.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 03614ee71852fb74c8e7a1042975206f +ShaderImporter: + userData: diff --git a/Unity/SCANsat/Assets/Shaders/Cutoff.shader b/Unity/SCANsat/Assets/Shaders/Cutoff.shader new file mode 100644 index 000000000..5b1c553fc --- /dev/null +++ b/Unity/SCANsat/Assets/Shaders/Cutoff.shader @@ -0,0 +1,51 @@ +Shader "KSP/Alpha/Cutoff" +{ + Properties{ + _Color("Main Color", Color) = (1,1,1,1) + _MainTex("Base (RGB) Trans (A)", 2D) = "white" {} + _Cutoff("Alpha cutoff", Range(0,1)) = 0.5 + _RimFalloff("_RimFalloff", Range(0.01,5)) = 0.1 + _RimColor("_RimColor", Color) = (0,0,0,0) + + _TemperatureColor("_TemperatureColor", Color) = (0,0,0,0) + _BurnColor("Burn Color", Color) = (1,1,1,1) + } + + SubShader{ + Tags{ "Queue" = "AlphaTest" "IgnoreProjector" = "True" "RenderType" = "TransparentCutout" } + LOD 300 + + CGPROGRAM + #pragma surface surf Lambert alphatest:_Cutoff + + sampler2D _MainTex; + sampler2D _BumpMap; + fixed4 _Color; + float _RimFalloff; + float4 _RimColor; + float4 _TemperatureColor; + float4 _BurnColor; + + struct Input { + float2 uv_MainTex; + float2 uv_Emissive; + float3 viewDir; + }; + + void surf(Input IN, inout SurfaceOutput o) + { + fixed4 c = tex2D(_MainTex, IN.uv_MainTex) * _Color * _BurnColor; + float3 normal = float3(0, 0, 1); + half rim = 1.0 - saturate(dot(normalize(IN.viewDir), normal)); + float3 emission = (_RimColor.rgb * pow(rim, _RimFalloff)) * _RimColor.a; + emission += _TemperatureColor.rgb * _TemperatureColor.a; + o.Albedo = c.rgb; + o.Emission = emission; + o.Alpha = c.a; + o.Normal = normal; + } + ENDCG + } + + FallBack "Legacy Shaders/Transparent/Cutout/Diffuse" +} \ No newline at end of file diff --git a/Unity/SCANsat/Assets/Shaders/Cutoff.shader.meta b/Unity/SCANsat/Assets/Shaders/Cutoff.shader.meta new file mode 100644 index 000000000..bda206bf4 --- /dev/null +++ b/Unity/SCANsat/Assets/Shaders/Cutoff.shader.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 1559851e491ace04180a0025375a30ff +ShaderImporter: + userData: diff --git a/Unity/SCANsat/Assets/Shaders/CutoffBumped.shader b/Unity/SCANsat/Assets/Shaders/CutoffBumped.shader new file mode 100644 index 000000000..ae0e4ae76 --- /dev/null +++ b/Unity/SCANsat/Assets/Shaders/CutoffBumped.shader @@ -0,0 +1,53 @@ +Shader "KSP/Alpha/Cutoff Bumped" +{ + Properties{ + _Color("Main Color", Color) = (1,1,1,1) + _MainTex("Base (RGB) Trans (A)", 2D) = "white" {} + _BumpMap("Normalmap", 2D) = "bump" {} + _Cutoff("Alpha cutoff", Range(0,1)) = 0.5 + _RimFalloff("_RimFalloff", Range(0.01,5)) = 0.1 + _RimColor("_RimColor", Color) = (0,0,0,0) + + _TemperatureColor("_TemperatureColor", Color) = (0,0,0,0) + _BurnColor("Burn Color", Color) = (1,1,1,1) + } + + SubShader{ + Tags{ "Queue" = "AlphaTest" "IgnoreProjector" = "True" "RenderType" = "TransparentCutout" } + LOD 300 + + CGPROGRAM + #pragma surface surf Lambert alphatest:_Cutoff + + sampler2D _MainTex; + sampler2D _BumpMap; + fixed4 _Color; + float _RimFalloff; + float4 _RimColor; + float4 _TemperatureColor; + float4 _BurnColor; + + struct Input { + float2 uv_MainTex; + float2 uv_BumpMap; + float2 uv_Emissive; + float3 viewDir; + }; + + void surf(Input IN, inout SurfaceOutput o) + { + fixed4 c = tex2D(_MainTex, IN.uv_MainTex) * _Color * _BurnColor; + float3 normal = float3(0, 0, 1); + half rim = 1.0 - saturate(dot(normalize(IN.viewDir), normal)); + float3 emission = (_RimColor.rgb * pow(rim, _RimFalloff)) * _RimColor.a; + emission += _TemperatureColor.rgb * _TemperatureColor.a; + o.Albedo = c.rgb; + o.Emission = emission; + o.Alpha = c.a; + o.Normal = UnpackNormal(tex2D(_BumpMap, IN.uv_BumpMap)); + } + ENDCG + } + + FallBack "Legacy Shaders/Transparent/Cutout/Diffuse" +} \ No newline at end of file diff --git a/Unity/SCANsat/Assets/Shaders/CutoffBumped.shader.meta b/Unity/SCANsat/Assets/Shaders/CutoffBumped.shader.meta new file mode 100644 index 000000000..5cde77588 --- /dev/null +++ b/Unity/SCANsat/Assets/Shaders/CutoffBumped.shader.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 9db68454b5978314184a231e296a74c9 +ShaderImporter: + userData: diff --git a/Unity/SCANsat/Assets/Shaders/DepthMask.shader b/Unity/SCANsat/Assets/Shaders/DepthMask.shader new file mode 100644 index 000000000..fa05c2cd7 --- /dev/null +++ b/Unity/SCANsat/Assets/Shaders/DepthMask.shader @@ -0,0 +1,11 @@ +Shader "DepthMask" { + SubShader { + Tags { "Queue" = "Background" } + Lighting Off + ZTest LEqual + ZWrite On + Cull Off + ColorMask 0 + Pass {} + } +} \ No newline at end of file diff --git a/Unity/SCANsat/Assets/Shaders/DepthMask.shader.meta b/Unity/SCANsat/Assets/Shaders/DepthMask.shader.meta new file mode 100644 index 000000000..054e528b1 --- /dev/null +++ b/Unity/SCANsat/Assets/Shaders/DepthMask.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 90b3f11cfafacdb458ea8f85df8f35a0 +timeCreated: 1457700589 +licenseType: Free +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Shaders/Diffuse.shader b/Unity/SCANsat/Assets/Shaders/Diffuse.shader new file mode 100644 index 000000000..28bc7aaeb --- /dev/null +++ b/Unity/SCANsat/Assets/Shaders/Diffuse.shader @@ -0,0 +1,67 @@ +Shader "KSP/Diffuse" +{ + Properties + { + _MainTex("_MainTex (RGB)", 2D) = "gray" {} + _Color ("Main Color", Color) = (1,1,1,1) + + _Opacity("_Opacity", Range(0,1) ) = 1 + _RimFalloff("_RimFalloff", Range(0.01,5) ) = 0.1 + _RimColor("_RimColor", Color) = (0,0,0,0) + + _TemperatureColor("_TemperatureColor", Color) = (0,0,0,0) + _BurnColor ("Burn Color", Color) = (1,1,1,1) + + } + + SubShader + { + Tags { "RenderType"="Opaque" } + ZWrite On + ZTest LEqual + Blend SrcAlpha OneMinusSrcAlpha + + CGPROGRAM + + #include "LightingKSP.cginc" + #pragma surface surf BlinnPhongSmooth keepalpha + #pragma target 3.0 + + sampler2D _MainTex; + + float _Opacity; + float _RimFalloff; + float4 _RimColor; + float4 _TemperatureColor; + float4 _BurnColor; + + + struct Input + { + float2 uv_MainTex; + float2 uv_Emissive; + float3 viewDir; + }; + + void surf (Input IN, inout SurfaceOutput o) + { + float4 color = tex2D(_MainTex,(IN.uv_MainTex)) * _BurnColor; + float3 normal = float3(0,0,1); + + half rim = 1.0 - saturate(dot (normalize(IN.viewDir), normal)); + + float3 emission = (_RimColor.rgb * pow(rim, _RimFalloff)) * _RimColor.a; + emission += _TemperatureColor.rgb * _TemperatureColor.a; + + o.Albedo = color.rgb; + o.Emission = emission; + o.Normal = normal; + o.Gloss = 0; + o.Specular = 0; + o.Emission *= _Opacity; + o.Alpha = _Opacity; + } + ENDCG + } + Fallback "Standard" +} \ No newline at end of file diff --git a/Unity/SCANsat/Assets/Shaders/Diffuse.shader.meta b/Unity/SCANsat/Assets/Shaders/Diffuse.shader.meta new file mode 100644 index 000000000..f405ed837 --- /dev/null +++ b/Unity/SCANsat/Assets/Shaders/Diffuse.shader.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: dfa5576d281e6484790ed88b05bf6c15 +ShaderImporter: + userData: diff --git a/Unity/SCANsat/Assets/Shaders/EdgeDetectX.shader b/Unity/SCANsat/Assets/Shaders/EdgeDetectX.shader new file mode 100644 index 000000000..8e01c7d59 --- /dev/null +++ b/Unity/SCANsat/Assets/Shaders/EdgeDetectX.shader @@ -0,0 +1,61 @@ +Shader "Hidden/Edge Detect X" { +Properties { + _MainTex ("Base (RGB)", RECT) = "white" {} + _Treshold ("Treshold", Float) = 0.2 +} + +SubShader { + Pass { + ZTest Always Cull Off ZWrite Off + Fog { Mode off } + +CGPROGRAM +#pragma vertex vert +#pragma fragment frag +#pragma fragmentoption ARB_precision_hint_fastest +#include "UnityCG.cginc" + +uniform sampler2D _MainTex; +uniform float4 _MainTex_TexelSize; +uniform float _Treshold; + +struct v2f { + float4 pos : POSITION; + float2 uv[3] : TEXCOORD0; +}; + +v2f vert( appdata_img v ) +{ + v2f o; + o.pos = mul (UNITY_MATRIX_MVP, v.vertex); + float2 uv = MultiplyUV( UNITY_MATRIX_TEXTURE0, v.texcoord ); + o.uv[0] = uv; + o.uv[1] = uv + float2(-_MainTex_TexelSize.x, -_MainTex_TexelSize.y); + o.uv[2] = uv + float2(+_MainTex_TexelSize.x, -_MainTex_TexelSize.y); + return o; +} + + +half4 frag (v2f i) : COLOR +{ + half4 original = tex2D(_MainTex, i.uv[0]); + + // a very simple cross gradient filter + half3 p1 = original.rgb; + half3 p2 = tex2D( _MainTex, i.uv[1] ).rgb; + half3 p3 = tex2D( _MainTex, i.uv[2] ).rgb; + + half3 diff = p1 * 2 - p2 - p3; + half len = dot(diff,diff); + if( len >= _Treshold ) + original.rgb = 0; + + return original; +} +ENDCG + } +} + +Fallback off + +} \ No newline at end of file diff --git a/Unity/SCANsat/Assets/Shaders/EdgeDetectX.shader.meta b/Unity/SCANsat/Assets/Shaders/EdgeDetectX.shader.meta new file mode 100644 index 000000000..39d26bbfc --- /dev/null +++ b/Unity/SCANsat/Assets/Shaders/EdgeDetectX.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 1747e5391b7cf154cb7dd4a99033eb5f +timeCreated: 1488558165 +licenseType: Free +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: scan_shaders + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Shaders/Emissive.shader b/Unity/SCANsat/Assets/Shaders/Emissive.shader new file mode 100644 index 000000000..ec4585436 --- /dev/null +++ b/Unity/SCANsat/Assets/Shaders/Emissive.shader @@ -0,0 +1,73 @@ +Shader "KSP/Emissive/Diffuse" +{ + Properties + { + _MainTex("_MainTex (RGB)", 2D) = "gray" {} + + _EmissiveColor("_EmissiveColor", Color) = (0,0,0,1) + _Emissive("_Emissive", 2D) = "white" {} + + _Opacity("_Opacity", Range(0,1) ) = 1 + _RimFalloff("_RimFalloff", Range(0.01,5) ) = 0.1 + _RimColor("_RimColor", Color) = (0,0,0,0) + + _TemperatureColor("_TemperatureColor", Color) = (0,0,0,0) + _BurnColor ("Burn Color", Color) = (1,1,1,1) + + } + + SubShader + { + ZWrite On + ZTest LEqual + Blend SrcAlpha OneMinusSrcAlpha + + CGPROGRAM + + #include "LightingKSP.cginc" + #pragma surface surf BlinnPhongSmooth keepalpha + #pragma target 3.0 + + sampler2D _MainTex; + + float4 _EmissiveColor; + sampler2D _Emissive; + + float _Opacity; + float _RimFalloff; + float4 _RimColor; + float4 _TemperatureColor; + float4 _BurnColor; + + + struct Input + { + float2 uv_MainTex; + float2 uv_Emissive; + float3 viewDir; + }; + + void surf (Input IN, inout SurfaceOutput o) + { + float4 color = tex2D(_MainTex,(IN.uv_MainTex)) * _BurnColor; + float3 normal = float3(0,0,1); + + half rim = 1.0 - saturate(dot (normalize(IN.viewDir), normal)); + + float3 emission = (_RimColor.rgb * pow(rim, _RimFalloff)) * _RimColor.a; + emission += _TemperatureColor.rgb * _TemperatureColor.a; + emission += (tex2D(_Emissive, IN.uv_Emissive).rgb * _EmissiveColor.rgb) * _EmissiveColor.a; + + o.Albedo = color.rgb; + o.Emission = emission; + o.Gloss = 0; + o.Specular = 0; + o.Normal = normal; + + o.Emission *= _Opacity; + o.Alpha = _Opacity; + } + ENDCG + } + Fallback "Standard" +} \ No newline at end of file diff --git a/Unity/SCANsat/Assets/Shaders/Emissive.shader.meta b/Unity/SCANsat/Assets/Shaders/Emissive.shader.meta new file mode 100644 index 000000000..64a3f9a17 --- /dev/null +++ b/Unity/SCANsat/Assets/Shaders/Emissive.shader.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 37a01900db115ab4781976bceb4f7057 +ShaderImporter: + userData: diff --git a/Unity/SCANsat/Assets/Shaders/EmissiveBumpedSpecular.shader b/Unity/SCANsat/Assets/Shaders/EmissiveBumpedSpecular.shader new file mode 100644 index 000000000..f3cebe19c --- /dev/null +++ b/Unity/SCANsat/Assets/Shaders/EmissiveBumpedSpecular.shader @@ -0,0 +1,82 @@ +Shader "KSP/Emissive/Bumped Specular" +{ + Properties + { + _MainTex("_MainTex (RGB spec(A))", 2D) = "gray" {} + _BumpMap("_BumpMap", 2D) = "bump" {} + _Color ("Main Color", Color) = (1,1,1,1) + _SpecColor ("Specular Color", Color) = (0.5, 0.5, 0.5, 1) + _Shininess ("Shininess", Range (0.03, 1)) = 0.4 + + _EmissiveColor("_EmissiveColor", Color) = (0,0,0,1) + _Emissive("_Emissive", 2D) = "white" {} + + + _Opacity("_Opacity", Range(0,1) ) = 1 + _RimFalloff("_RimFalloff", Range(0.01,5) ) = 0.1 + _RimColor("_RimColor", Color) = (0,0,0,0) + + _TemperatureColor("_TemperatureColor", Color) = (0,0,0,0) + _BurnColor ("Burn Color", Color) = (1,1,1,1) + + } + + SubShader + { + Tags { "RenderType"="Opaque" } + ZWrite On + ZTest LEqual + Blend SrcAlpha OneMinusSrcAlpha + + CGPROGRAM + + #include "LightingKSP.cginc" + #pragma surface surf BlinnPhongSmooth keepalpha + #pragma target 3.0 + + half _Shininess; + + sampler2D _MainTex; + sampler2D _BumpMap; + + float4 _EmissiveColor; + sampler2D _Emissive; + + float _Opacity; + float _RimFalloff; + float4 _RimColor; + float4 _TemperatureColor; + float4 _BurnColor; + struct Input + { + float2 uv_MainTex; + float2 uv_BumpMap; + float2 uv_Emissive; + float3 viewDir; + }; + + void surf (Input IN, inout SurfaceOutput o) + { + float4 color = tex2D(_MainTex,(IN.uv_MainTex)) * _BurnColor; + float3 emissive = tex2D(_Emissive, (IN.uv_Emissive)); + float3 normal = UnpackNormal(tex2D(_BumpMap, IN.uv_BumpMap)); + + half rim = 1.0 - saturate(dot (normalize(IN.viewDir), normal)); + + float3 emission = (_RimColor.rgb * pow(rim, _RimFalloff)) * _RimColor.a; + emission += _TemperatureColor.rgb * _TemperatureColor.a; + emission += (emissive.rgb * _EmissiveColor.rgb) * _EmissiveColor.a; + + o.Albedo = color.rgb; + o.Emission = emission; + o.Gloss = color.a; + o.Specular = _Shininess; + o.Normal = normal; + + o.Emission *= _Opacity; + o.Alpha = _Opacity; + } + ENDCG + } + Fallback "Standard" +} \ No newline at end of file diff --git a/Unity/SCANsat/Assets/Shaders/EmissiveBumpedSpecular.shader.meta b/Unity/SCANsat/Assets/Shaders/EmissiveBumpedSpecular.shader.meta new file mode 100644 index 000000000..90601e4a3 --- /dev/null +++ b/Unity/SCANsat/Assets/Shaders/EmissiveBumpedSpecular.shader.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 857ba6549eff78c4e9e8faafbc93b15e +ShaderImporter: + userData: diff --git a/Unity/SCANsat/Assets/Shaders/EmissiveSpecular.shader b/Unity/SCANsat/Assets/Shaders/EmissiveSpecular.shader new file mode 100644 index 000000000..fbe4a6e27 --- /dev/null +++ b/Unity/SCANsat/Assets/Shaders/EmissiveSpecular.shader @@ -0,0 +1,81 @@ +Shader "KSP/Emissive/Specular" +{ + Properties + { + _MainTex("_MainTex (RGB spec(A))", 2D) = "gray" {} + _Color ("Main Color", Color) = (1,1,1,1) + _SpecColor ("Specular Color", Color) = (0.5, 0.5, 0.5, 1) + _Shininess ("Shininess", Range (0.03, 1)) = 0.4 + + _EmissiveColor("_EmissiveColor", Color) = (0,0,0,1) + _Emissive("_Emissive", 2D) = "white" {} + + _Opacity("_Opacity", Range(0,1) ) = 1 + _RimFalloff("_RimFalloff", Range(0.01,5) ) = 0.1 + _RimColor("_RimColor", Color) = (0,0,0,0) + + _TemperatureColor("_TemperatureColor", Color) = (0,0,0,0) + _BurnColor ("Burn Color", Color) = (1,1,1,1) + + } + + SubShader + { + Tags { "RenderType"="Opaque" } + ZWrite On + ZTest LEqual + Blend SrcAlpha OneMinusSrcAlpha + + CGPROGRAM + + #include "LightingKSP.cginc" + #pragma surface surf BlinnPhongSmooth keepalpha + #pragma target 3.0 + + half _Shininess; + + sampler2D _MainTex; + + float4 _EmissiveColor; + sampler2D _Emissive; + + float _Opacity; + float _RimFalloff; + float4 _RimColor; + float4 _TemperatureColor; + float4 _BurnColor; + + + struct Input + { + float2 uv_MainTex; + float2 uv_Emissive; + float3 viewDir; + }; + + void surf (Input IN, inout SurfaceOutput o) + { + float4 color = tex2D(_MainTex,(IN.uv_MainTex)) * _BurnColor; + float3 emissive = tex2D(_Emissive,(IN.uv_Emissive)); + float3 normal = float3(0,0,1); + + half rim = 1.0 - saturate(dot (normalize(IN.viewDir), normal)); + + float3 emission = (_RimColor.rgb * pow(rim, _RimFalloff)) * _RimColor.a; + emission += _TemperatureColor.rgb * _TemperatureColor.a; + emission += (emissive.rgb * _EmissiveColor.rgb) * _EmissiveColor.a; + + + o.Albedo = color.rgb; + o.Emission = emission; + o.Gloss = color.a; + o.Specular = _Shininess; + o.Normal = normal; + + o.Emission *= _Opacity; + o.Alpha = _Opacity; + } + ENDCG + } + Fallback "Standard" +} \ No newline at end of file diff --git a/Unity/SCANsat/Assets/Shaders/EmissiveSpecular.shader.meta b/Unity/SCANsat/Assets/Shaders/EmissiveSpecular.shader.meta new file mode 100644 index 000000000..53e48dcc2 --- /dev/null +++ b/Unity/SCANsat/Assets/Shaders/EmissiveSpecular.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 9bb4f07ad47d6044590bf8e2546a6658 +timeCreated: 1448128444 +licenseType: Free +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Shaders/GrayscaleEffect.shader b/Unity/SCANsat/Assets/Shaders/GrayscaleEffect.shader new file mode 100644 index 000000000..2d27c9d98 --- /dev/null +++ b/Unity/SCANsat/Assets/Shaders/GrayscaleEffect.shader @@ -0,0 +1,36 @@ +Shader "Hidden/Grayscale Effect" { +Properties { + _MainTex ("Base (RGB)", 2D) = "white" {} + _RampTex ("Base (RGB)", 2D) = "grayscaleRamp" {} +} + +SubShader { + Pass { + ZTest Always Cull Off ZWrite Off + +CGPROGRAM +#pragma vertex vert_img +#pragma fragment frag +#include "UnityCG.cginc" + +uniform sampler2D _MainTex; +uniform sampler2D _RampTex; +uniform half _RampOffset; + +fixed4 frag (v2f_img i) : SV_Target +{ + fixed4 original = tex2D(_MainTex, i.uv); + fixed grayscale = Luminance(original.rgb); + half2 remap = half2 (grayscale + _RampOffset, .5); + fixed4 output = tex2D(_RampTex, remap); + output.a = original.a; + return output; +} +ENDCG + + } +} + +Fallback off + +} diff --git a/Unity/SCANsat/Assets/Shaders/GrayscaleEffect.shader.meta b/Unity/SCANsat/Assets/Shaders/GrayscaleEffect.shader.meta new file mode 100644 index 000000000..a1df4790c --- /dev/null +++ b/Unity/SCANsat/Assets/Shaders/GrayscaleEffect.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 91c6bfc4cbec43141898f0b739e30e87 +timeCreated: 1488558174 +licenseType: Free +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: scan_shaders + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Shaders/InternalBumpedSpecular 1.shader b/Unity/SCANsat/Assets/Shaders/InternalBumpedSpecular 1.shader new file mode 100644 index 000000000..e26fda05a --- /dev/null +++ b/Unity/SCANsat/Assets/Shaders/InternalBumpedSpecular 1.shader @@ -0,0 +1,69 @@ +Shader "KSP/InternalSpace/Bumped Specular2" +{ + Properties + { + _MainTex("_MainTex (RGB spec(A))", 2D) = "white" {} + _BumpMap("_BumpMap", 2D) = "bump" {} + _LightMap ("_LightMap", 2D) = "gray" {} + _SpecColor ("Specular Color", Color) = (0.5, 0.5, 0.5, 1) + _Shininess ("Shininess", Range (0.03, 1)) = 0.078125 + //_EdgeColor ("Edge Color", Color) = (1,1,1,1) + //_EdgeThreshold ("Edge Threshold", Range(0.01, 3)) = 1 + _LightColor ("Internal Light Color", Color) = (1,1,1,1) + + } + + SubShader + { + ZWrite On + ZTest LEqual + Blend SrcAlpha OneMinusSrcAlpha + + CGPROGRAM + + #include "LightingKSP.cginc" + #pragma surface surf BlinnPhongSmooth + #pragma target 3.0 + + sampler2D _MainTex; + sampler2D _BumpMap; + sampler2D _LightMap; + + //uniform float _EdgeThreshold; + //uniform float4 _EdgeColor; + //uniform float _EdgeIntensity; + uniform float _AOIntensity; + uniform float _Shininess; + uniform float4 _SpecularColor; + uniform float4 _LightColor; + //uniform float4 _LightWrapping; + + struct Input + { + float2 uv_MainTex; + float2 uv_BumpMap; + float2 uv2_LightMap; + float2 uv_Emissive; + }; + + void surf (Input IN, inout SurfaceOutput o) + { + float4 color = tex2D(_MainTex,(IN.uv_MainTex)); + float4 lightmap = tex2D(_LightMap, IN.uv2_LightMap); + float3 normal = UnpackNormal(tex2D(_BumpMap, IN.uv_BumpMap)); + //float3 edge = pow(lightmap.r, _EdgeThreshold); + float3 light1 = lightmap.g * UNITY_LIGHTMODEL_AMBIENT*3; + float3 light2 = lightmap.b * _LightColor; + float3 AO = lightmap.r + light2; + + o.Albedo = color.rgb * AO; + o.Emission = (light1 + light2) * color.rgb * AO; + o.Gloss = color.a; + o.Specular = _Shininess; + o.Normal = normal; + o.Alpha = 1; + } + ENDCG + } + Fallback "Diffuse" +} \ No newline at end of file diff --git a/Unity/SCANsat/Assets/Shaders/InternalBumpedSpecular 1.shader.meta b/Unity/SCANsat/Assets/Shaders/InternalBumpedSpecular 1.shader.meta new file mode 100644 index 000000000..598bc680e --- /dev/null +++ b/Unity/SCANsat/Assets/Shaders/InternalBumpedSpecular 1.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 7c0652604e6b38842b3cdf1ee486761e +timeCreated: 1458202379 +licenseType: Free +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Shaders/InternalBumpedSpecular.shader b/Unity/SCANsat/Assets/Shaders/InternalBumpedSpecular.shader new file mode 100644 index 000000000..b9db04043 --- /dev/null +++ b/Unity/SCANsat/Assets/Shaders/InternalBumpedSpecular.shader @@ -0,0 +1,147 @@ +Shader "KSP/InternalSpace/Bumped Specular" +{ + Properties + { + [Header(Texture Maps)] + _MainTex("_MainTex (RGB spec(A))", 2D) = "white" {} + _BumpMap("_BumpMap", 2D) = "bump" {} + _LightMap ("_LightMap", 2D) = "gray" {} + + [Header(Specular)] + _SpecColor ("Specular Color", Color) = (0.5, 0.5, 0.5, 1) + _Shininess ("Shininess", Range (0.03, 1)) = 0.4 + + [Header(Lightmaps and Occlusion)] + [Toggle(LMTOGGLE)] _LMTOGGLE("Enable Lightmap", Float) = 0 + [KeywordEnum(Single Colored, Multi Grayscale)] _LM_Mode("Mode", Float) = 0 + _LightColor1 ("Internal Light Color 1", Color) = (1,1,1,1) + _LightColor2 ("Internal Light Color 2", Color) = (1,1,1,1) + _LightAmbient("Ambient Boost", Range(0, 3)) = 1 + + _Occlusion("Occlusion Tightness", Range(0, 3)) = 1 + [Space] //Im in Spaaaaaaaace + + [Header(Fog)] + [Toggle(FOGTOGGLE)] _FOGTOGGLE("Enable Fog", Float) = 0 + _FogColor("Color (RGB) Density (A)", Color) = (0.3, 0.4, 0.7, 0.5) + _FogStart("Start", Float) = 1 + _FogEnd("End", Float) = 10 + + } + + SubShader + { + Tags{ "RenderType" = "Opaque" } + LOD 200 + //ZWrite On + //ZTest LEqual + //Blend SrcAlpha OneMinusSrcAlpha + + CGPROGRAM + + #include "LightingKSP.cginc" + + #pragma surface surf BlinnPhongSmooth vertex:fogVertex finalcolor:fogColor + #pragma shader_feature LMTOGGLE + #pragma shader_feature FOGTOGGLE + #pragma multi_compile _LM_MODE_MULTI_GREYSCALE _LM_MODE_SINGLE_COLORED + + #pragma target 3.0 + + + + sampler2D _MainTex; + sampler2D _BumpMap; + #if LMTOGGLE + sampler2D _LightMap; + #endif + + + + uniform float _Shininess; + uniform float4 _SpecularColor; + + #if LMTOGGLE + uniform float4 _LightColor1; + uniform float4 _LightColor2; + uniform float _LightAmbient; + uniform float _Occlusion; + #endif + + #if FOGTOGGLE + uniform float4 _FogColor; + uniform float _FogStart; + uniform float _FogEnd; + #endif + + struct Input + { + float2 uv_MainTex; + float2 uv_BumpMap; + float4 color : COLOR; //vertex color + + #if LMTOGGLE + float2 uv2_LightMap; + #endif + + #if FOGTOGGLE + half fogFactor; + #endif + }; + + void fogVertex(inout appdata_full v, out Input data) + { + UNITY_INITIALIZE_OUTPUT(Input, data); + #if FOGTOGGLE + float cameraVertDist = length(mul(UNITY_MATRIX_MV, v.vertex).xyz); + data.fogFactor = lerp(saturate((_FogEnd.x - cameraVertDist) / (_FogEnd.x - _FogStart.x)), 1, 1 - _FogColor.a); + #endif + } + + void fogColor(Input IN, SurfaceOutput o, inout fixed4 c) + { + #if FOGTOGGLE + c.rgb = lerp(_FogColor.rgb, c.rgb, IN.fogFactor); + #endif + } + + void surf (Input IN, inout SurfaceOutput o) + { + float4 c = tex2D(_MainTex,(IN.uv_MainTex)); + float3 normal = UnpackNormal(tex2D(_BumpMap, IN.uv_BumpMap)); + + #if LMTOGGLE + + float4 lightmap = tex2D(_LightMap, IN.uv2_LightMap); + + #if _LM_MODE_SINGLE_COLORED + float3 light = lightmap.rgb * _LightColor1 + UNITY_LIGHTMODEL_AMBIENT * _LightAmbient * lightmap.rgb; + float3 AO = pow(lightmap.a, _Occlusion); + float3 finalLight = light * c.rgb * AO; + #endif + + #if _LM_MODE_MULTI_GREYSCALE + float3 light1 = lightmap.r * _LightColor1; + float3 light2 = lightmap.g * _LightColor2; + float3 light3 = lightmap.b * UNITY_LIGHTMODEL_AMBIENT * _LightAmbient; + float3 AO = lerp(pow(lightmap.a, _Occlusion), 1, light1 + light2); + float3 finalLight = (light1 + light2 + light3) * c.rgb * AO; + #endif + + #endif + + o.Albedo = c.rgb * step(0.5,IN.color.rgb); + o.Gloss = c.a; + o.Specular = _Shininess; + o.Normal = normal; + o.Alpha = 1; + + #if LMTOGGLE + o.Albedo *= AO; + o.Emission = finalLight; + #endif + } + ENDCG + } + Fallback "Diffuse" +} \ No newline at end of file diff --git a/Unity/SCANsat/Assets/Shaders/InternalBumpedSpecular.shader.meta b/Unity/SCANsat/Assets/Shaders/InternalBumpedSpecular.shader.meta new file mode 100644 index 000000000..1ad8c4d37 --- /dev/null +++ b/Unity/SCANsat/Assets/Shaders/InternalBumpedSpecular.shader.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: b53675eb8ece2834bbe8d2edd1ce3ba9 +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Shaders/KSPParticle AddSmooth.shader b/Unity/SCANsat/Assets/Shaders/KSPParticle AddSmooth.shader new file mode 100644 index 000000000..f5deb8371 --- /dev/null +++ b/Unity/SCANsat/Assets/Shaders/KSPParticle AddSmooth.shader @@ -0,0 +1,77 @@ +Shader "KSP/Particles/Additive (Soft)" { +Properties { + _MainTex ("Particle Texture", 2D) = "white" {} + _InvFade ("Soft Particles Factor", Range(0.01,3.0)) = 1.0 + _TintColor ("Tint Color", Color) = (0.5,0.5,0.5,0.5) +} + +Category { + Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" } + Blend One OneMinusSrcColor + ColorMask RGB + Cull Off Lighting Off ZWrite Off Fog { Color (0,0,0,0) } + + SubShader { + Pass { + + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_particles + + #include "UnityCG.cginc" + + sampler2D _MainTex; + fixed4 _TintColor; + + struct appdata_t { + float4 vertex : POSITION; + fixed4 color : COLOR; + float2 texcoord : TEXCOORD0; + }; + + struct v2f { + float4 vertex : POSITION; + fixed4 color : COLOR; + float2 texcoord : TEXCOORD0; + #ifdef SOFTPARTICLES_ON + float4 projPos : TEXCOORD1; + #endif + }; + + float4 _MainTex_ST; + + v2f vert (appdata_t v) + { + v2f o; + o.vertex = mul(UNITY_MATRIX_MVP, v.vertex); + #ifdef SOFTPARTICLES_ON + o.projPos = ComputeScreenPos (o.vertex); + COMPUTE_EYEDEPTH(o.projPos.z); + #endif + o.color = v.color; + o.texcoord = TRANSFORM_TEX(v.texcoord,_MainTex); + return o; + } + + sampler2D _CameraDepthTexture; + float _InvFade; + + fixed4 frag (v2f i) : COLOR + { + #ifdef SOFTPARTICLES_ON + float sceneZ = LinearEyeDepth (UNITY_SAMPLE_DEPTH(tex2Dproj(_CameraDepthTexture, UNITY_PROJ_COORD(i.projPos)))); + float partZ = i.projPos.z; + float fade = saturate (_InvFade * (sceneZ-partZ)); + i.color.a *= fade; + #endif + + half4 prev = i.color * tex2D(_MainTex, i.texcoord); + prev.rgb *= prev.a; + return prev * _TintColor; + } + ENDCG + } + } +} +} \ No newline at end of file diff --git a/Unity/SCANsat/Assets/Shaders/KSPParticle AddSmooth.shader.meta b/Unity/SCANsat/Assets/Shaders/KSPParticle AddSmooth.shader.meta new file mode 100644 index 000000000..11789c5b2 --- /dev/null +++ b/Unity/SCANsat/Assets/Shaders/KSPParticle AddSmooth.shader.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 1752db0aa4762064fa141b2b41eb3eae +ShaderImporter: + defaultTextures: [] + userData: diff --git a/Unity/SCANsat/Assets/Shaders/LightingKSP.cginc b/Unity/SCANsat/Assets/Shaders/LightingKSP.cginc new file mode 100644 index 000000000..d1b6281ee --- /dev/null +++ b/Unity/SCANsat/Assets/Shaders/LightingKSP.cginc @@ -0,0 +1,68 @@ +inline fixed4 LightingBlinnPhongSmooth(SurfaceOutput s, fixed3 lightDir, half3 viewDir, fixed atten) +{ + s.Normal = normalize(s.Normal); + half3 h = normalize(lightDir + viewDir); + + fixed diff = max(0, dot(s.Normal, lightDir)); + + float nh = max(0, dot(s.Normal, h)); + float spec = pow(nh, s.Specular*128.0) * s.Gloss; + + fixed4 c; + c.rgb = (s.Albedo * _LightColor0.rgb * diff + _LightColor0.rgb * _SpecColor.rgb * spec) * (atten); + c.a = s.Alpha + _LightColor0.a * _SpecColor.a * spec * atten; + return c; +} + + + + +inline half4 LightingUnlit(SurfaceOutput s, half3 lightDir, half atten) +{ + // half diff = max (0, dot (s.Normal, lightDir)); + + half4 c; + c.rgb = s.Albedo; + c.a = s.Alpha; + return c; +} + + + + +inline half4 LightingUnlit_PrePass(SurfaceOutput s, half4 light) +{ + half4 c; + c.rgb = s.Albedo; + c.a = s.Alpha; + return c; +} + + + + +fixed4 LightingNoLighting(SurfaceOutput s, fixed3 lightDir, fixed atten) { return fixed4(0, 0, 0, 0); } + + + + + +float4 _Color; +half _LightBoost; +half4 LightingLightWrapped(SurfaceOutput s, half3 lightDir, half3 viewDir, half atten) { + float3 w = _Color.rgb*0.5; + half3 NdotL = dot(s.Normal, lightDir); + + //Specular term + half3 h = normalize(lightDir + viewDir); + s.Normal = normalize(s.Normal); + float NdotH = dot(s.Normal, h); + float spec = pow(max(NdotH, 0), s.Specular * 128.0) * s.Gloss; + fixed3 specColor = _SpecColor.rgb * _LightColor0.rgb; + + half3 diff = NdotL * (1 - w) + w; + half4 c; + c.rgb = ((s.Albedo * _LightColor0.rgb * diff) + (specColor * spec)) * (atten * _LightBoost); + c.a = s.Alpha + (_LightColor0.a * _SpecColor.a * spec * atten); + return c; +} \ No newline at end of file diff --git a/Unity/SCANsat/Assets/Shaders/LightingKSP.cginc.meta b/Unity/SCANsat/Assets/Shaders/LightingKSP.cginc.meta new file mode 100644 index 000000000..bb254f9fb --- /dev/null +++ b/Unity/SCANsat/Assets/Shaders/LightingKSP.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 6766600fc1203e447be7a1fdcabadea5 +timeCreated: 1455115714 +licenseType: Free +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Shaders/LightwrapSpecular.shader b/Unity/SCANsat/Assets/Shaders/LightwrapSpecular.shader new file mode 100644 index 000000000..d9feb2ed5 --- /dev/null +++ b/Unity/SCANsat/Assets/Shaders/LightwrapSpecular.shader @@ -0,0 +1,68 @@ +Shader "KSP/Lightwrapped/Specular" +{ + Properties + { + _MainTex("_MainTex (RGB spec(A))", 2D) = "white" {} + _Color ("Light Wrapping", Color) = (0,0,0,0) + _SpecColor ("Specular Color", Color) = (0.5, 0.5, 0.5, 1) + _Shininess ("Shininess", Range (0.03, 1)) = 0.4 + _LightBoost("Light Boost", Range(1, 2)) = 1.0 + + _Opacity("_Opacity", Range(0,1) ) = 1 + _RimFalloff("_RimFalloff", Range(0.01,5) ) = 0.1 + _RimColor("_RimColor", Color) = (0,0,0,0) + } + + SubShader + { + ZWrite On + ZTest LEqual + Blend SrcAlpha OneMinusSrcAlpha + + CGPROGRAM + + #include "LightingKSP.cginc" + #pragma surface surf LightWrapped + #pragma target 3.0 + + + + + half _Shininess; + + + sampler2D _MainTex; + + float _Opacity; + float _RimFalloff; + float4 _RimColor; + + + struct Input + { + float2 uv_MainTex; + float3 viewDir; + }; + + void surf (Input IN, inout SurfaceOutput o) + { + float4 color = tex2D(_MainTex,(IN.uv_MainTex)); + float3 normal = float3(0,0,1); + + half rim = 1.0 - saturate(dot (normalize(IN.viewDir), normal)); + + float3 emission = (_RimColor.rgb * pow(rim, _RimFalloff)) * _RimColor.a; + + o.Albedo = color.rgb; + o.Emission = emission; + o.Gloss = color.a * _Shininess; + o.Specular = color.a * _Shininess; + o.Normal = normal; + + o.Emission *= _Opacity; + o.Alpha = _Opacity; + } + ENDCG + } + Fallback "Diffuse" +} \ No newline at end of file diff --git a/Unity/SCANsat/Assets/Shaders/LightwrapSpecular.shader.meta b/Unity/SCANsat/Assets/Shaders/LightwrapSpecular.shader.meta new file mode 100644 index 000000000..e9509c6e1 --- /dev/null +++ b/Unity/SCANsat/Assets/Shaders/LightwrapSpecular.shader.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 2563106331ba0f844b342a439bd0837b +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Shaders/PBR.meta b/Unity/SCANsat/Assets/Shaders/PBR.meta new file mode 100644 index 000000000..0278f1847 --- /dev/null +++ b/Unity/SCANsat/Assets/Shaders/PBR.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 9952cedaea0c1b84a82b97271046a88d +folderAsset: yes +timeCreated: 1448566539 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Shaders/PBR/KSP_Standard_Bumped.shader b/Unity/SCANsat/Assets/Shaders/PBR/KSP_Standard_Bumped.shader new file mode 100644 index 000000000..ad5dc736d --- /dev/null +++ b/Unity/SCANsat/Assets/Shaders/PBR/KSP_Standard_Bumped.shader @@ -0,0 +1,171 @@ +Shader "KSP/Standard_Bumped" +{ + Properties + { + [Header(Texture Maps)] + _MainTex("Map A (RGB albedo, A smoothness)", 2D) = "white" {} + _MapB("Map B (R metalness, G emission1, B emission2, A occlusion)", 2D) = "white" {} + _MapC("Map C (RGBA color mask)", 2D) = "black" {} + [KeywordEnum(UV1, UV2)] _CUV("_MapC UV set", Float) = 0 + [Space] + _BumpMap("BumpMap", 2D) = "bump" {} + + [Header(ReColor (RGB_Albedo A_Metallic))] + _Color1("Mask1", Color) = (1,1,1,0) + //[Toggle]_Metallic1("Mask1 Metallic", Float) = 0 + //[Space] + _Color2("Mask2", Color) = (1,1,1,0) + //[Toggle]_Metallic2("Mask2 Metallic", Float) = 0 + //[Space] + _Color3("Mask3", Color) = (1,1,1,0) + //[Toggle]_Metallic3("Mask3 Metallic", Float) = 0 + //[Space] + _Color4("Mask4", Color) = (1,1,1,0) + //[Toggle]_Metallic4("Mask4 Metallic", Float) = 0 + [Space] + _MetallicGloss("_MetallicGloss", Range(0,1)) = 0.25 + + [Header(Emissive)] + _EmissiveColorLow1("_EmissiveColorLow1", Color) = (0,0,0,1) + _EmissiveColorHigh1("_EmissiveColorHigh1", Color) = (0,0,0,1) + [Space] + _EmissiveColorLow2("_EmissiveColorLow2", Color) = (0,0,0,1) + _EmissiveColorHigh2("_EmissiveColorHigh2", Color) = (0,0,0,1) + + [Header(Other)] + //[Toggle(ENABLE_VC)] _VC("Vertex Colors enable", Int) = 0 + //[Toggle(ENABLE_VCAO)] _VCAO("Vertex Color R = Occlusion", Int) = 0 + [KeywordEnum(none, RGBA, Occlusion)] _VCOL("Vertex Color", Float) = 0 + + _Opacity("Opacity", Range(0,1)) = 1 + + [HideInInspector]_RimFalloff("Rim highlight falloff", Range(0.01,5)) = 0.1 + [HideInInspector]_RimColor("Rim highlight color", Color) = (0,0,0,0) + [HideInInspector]_TemperatureColor("Heat color", Color) = (0,0,0,0) + [HideInInspector]_BurnColor("Burn color", Color) = (1,1,1,1) + + } + + SubShader + { + Tags{ "RenderType" = "Opaque" } + ZWrite On + ZTest LEqual + Blend SrcAlpha OneMinusSrcAlpha + + CGPROGRAM + + #pragma surface surf Standard keepalpha + #pragma target 3.0 + #pragma multi_compile _CUV_UV1 _CUV_UV2 + #pragma multi_compile _VCOL_NONE _VCOL_RGBA _VCOL_OCCLUSION + + + //#pragma shader_feature ENABLE_VCAO + //#pragma shader_feature ENABLE_VC + + + sampler2D _MainTex; + sampler2D _MapB; + sampler2D _MapC; + sampler2D _BumpMap; + + float4 _EmissiveColorLow1; + float4 _EmissiveColorHigh1; + float4 _EmissiveColorLow2; + float4 _EmissiveColorHigh2; + + float _Opacity; + float _RimFalloff; + float4 _RimColor; + float4 _TemperatureColor; + float4 _BurnColor; + float4 _Color1; + float4 _Color2; + float4 _Color3; + float4 _Color4; + //float _Metallic1; + //float _Metallic2; + //float _Metallic3; + //float _Metallic4; + float _MetallicGloss; + + struct Input + { + float2 uv_MainTex; + float2 uv_MapB; + #if _CUV_UV1 + float2 uv_MapC; + #endif + #if _CUV_UV2 + float2 uv2_MapC; + #endif + + float2 uv_BumpMap; + float3 viewDir; + #if _VCOL_RGBA + float4 color : COLOR; //vertex color + #endif + #if _VCOL_OCCLUSION + float4 color : COLOR; //vertex color + #endif + }; + + void surf(Input IN, inout SurfaceOutputStandard o) + { + float4 mainSample = tex2D(_MainTex, (IN.uv_MainTex)); + float4 mapBSample = tex2D(_MapB, (IN.uv_MapB)); + #if _CUV_UV1 + float4 mapCSample = tex2D(_MapC, (IN.uv_MapC)); + #endif + #if _CUV_UV2 + float4 mapCSample = tex2D(_MapC, (IN.uv2_MapC)); + #endif + float3 albedo = mainSample.rgb * _BurnColor.rgb * lerp(1, _Color1, mapCSample.r) * lerp(1, _Color2, mapCSample.g) * lerp(1, _Color3, mapCSample.b) * lerp(1, _Color4, mapCSample.a); + float metallic = mapCSample.r * _Color1.a + mapCSample.g * _Color2.a + mapCSample.b * _Color3.a + mapCSample.a * _Color4.a; + float3 normal = UnpackNormal(tex2D(_BumpMap, IN.uv_BumpMap)); + + half rim = 1.0 - saturate(dot(normalize(IN.viewDir), normal)); + + float3 emission = (_RimColor.rgb * pow(rim, _RimFalloff)) * _RimColor.a; + emission += _TemperatureColor.rgb * _TemperatureColor.a; + emission += lerp(_EmissiveColorLow1.rgb, _EmissiveColorHigh1.rgb, mapBSample.g)*mapBSample.g + lerp(_EmissiveColorLow2.rgb, _EmissiveColorHigh2.rgb, mapBSample.b)*mapBSample.b; + + o.Albedo = albedo; + o.Emission = emission.rgb; + o.Smoothness = saturate(mainSample.a + _MetallicGloss * metallic) * _BurnColor.r; + o.Metallic = saturate(mapBSample.r + metallic); + o.Occlusion = mapBSample.a; + o.Normal = normal; + + o.Emission *= _Opacity; + o.Alpha = _Opacity; + + + #if _VCOL_RGBA + o.Albedo *= IN.color.rgb; + o.Occlusion *= IN.color.a; + #endif + #if _VCOL_OCCLUSION + o.Smoothness *= IN.color.r; + o.Occlusion *= IN.color.r; + #endif + +// o.Albedo *= float3(1, 0, 0); + + // #if ENABLE_VC + // #if !ENABLE_VCAO + // o.Albedo *= IN.color.rgb; + // o.Occlusion *= IN.color.a; + // #endif +// + // #if ENABLE_VCAO + // o.Smoothness *= IN.color.r; + // o.Occlusion *= IN.color.r; + // #endif + // #endif + } + ENDCG + } + Fallback "Standard" +} \ No newline at end of file diff --git a/Unity/SCANsat/Assets/Shaders/PBR/KSP_Standard_Bumped.shader.meta b/Unity/SCANsat/Assets/Shaders/PBR/KSP_Standard_Bumped.shader.meta new file mode 100644 index 000000000..d39eafadb --- /dev/null +++ b/Unity/SCANsat/Assets/Shaders/PBR/KSP_Standard_Bumped.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 9e273bc4aa80cca4aa7b1d829cece604 +timeCreated: 1456319206 +licenseType: Free +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Shaders/ParticleAdd.shader b/Unity/SCANsat/Assets/Shaders/ParticleAdd.shader new file mode 100644 index 000000000..11986bc46 --- /dev/null +++ b/Unity/SCANsat/Assets/Shaders/ParticleAdd.shader @@ -0,0 +1,114 @@ +Shader "KSP/Particles/Additive" +{ + Properties + { + _TintColor ("Tint Color", Color) = (0.5,0.5,0.5,0.5) + _MainTex ("Particle Texture", 2D) = "white" {} + _InvFade ("Soft Particles Factor", Range(0.01,3.0)) = 1.0 + } + + Category + { + Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" } + Blend SrcAlpha One + AlphaTest Greater .01 + ColorMask RGB + Cull Off Lighting Off ZWrite Off Fog { Color (0,0,0,0) } + BindChannels { + Bind "Color", color + Bind "Vertex", vertex + Bind "TexCoord", texcoord + } + + // ---- Fragment program cards + SubShader + { + Pass + { + + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + #pragma fragmentoption ARB_precision_hint_fastest + #pragma multi_compile_particles + + #include "UnityCG.cginc" + + sampler2D _MainTex; + fixed4 _TintColor; + + struct appdata_t + { + float4 vertex : POSITION; + fixed4 color : COLOR; + float2 texcoord : TEXCOORD0; + }; + + struct v2f + { + float4 vertex : POSITION; + fixed4 color : COLOR; + float2 texcoord : TEXCOORD0; + #ifdef SOFTPARTICLES_ON + float4 projPos : TEXCOORD1; + #endif + }; + + float4 _MainTex_ST; + + v2f vert (appdata_t v) + { + v2f o; + o.vertex = mul(UNITY_MATRIX_MVP, v.vertex); + #ifdef SOFTPARTICLES_ON + o.projPos = ComputeScreenPos (o.vertex); + COMPUTE_EYEDEPTH(o.projPos.z); + #endif + o.color = v.color; + o.texcoord = TRANSFORM_TEX(v.texcoord,_MainTex); + return o; + } + + sampler2D _CameraDepthTexture; + float _InvFade; + + fixed4 frag (v2f i) : COLOR + { + #ifdef SOFTPARTICLES_ON + float sceneZ = LinearEyeDepth (UNITY_SAMPLE_DEPTH(tex2Dproj(_CameraDepthTexture, UNITY_PROJ_COORD(i.projPos)))); + float partZ = i.projPos.z; + float fade = saturate (_InvFade * (sceneZ-partZ)); + i.color.a *= fade; + #endif + + return 2.0f * i.color * _TintColor * tex2D(_MainTex, i.texcoord); + } + ENDCG + } + } + + // ---- Dual texture cards + SubShader { + Pass { + SetTexture [_MainTex] { + constantColor [_TintColor] + combine constant * primary + } + SetTexture [_MainTex] { + combine texture * previous DOUBLE + } + } + } + + // ---- Single texture cards (does not do color tint) + SubShader + { + Pass + { + SetTexture [_MainTex] { + combine texture * primary + } + } + } + } +} diff --git a/Unity/SCANsat/Assets/Shaders/ParticleAdd.shader.meta b/Unity/SCANsat/Assets/Shaders/ParticleAdd.shader.meta new file mode 100644 index 000000000..1e35a88a2 --- /dev/null +++ b/Unity/SCANsat/Assets/Shaders/ParticleAdd.shader.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: a45acd8adee64ea4cac55b22bfebe6cb +ShaderImporter: + defaultTextures: [] + userData: diff --git a/Unity/SCANsat/Assets/Shaders/ParticleAdditiveFresnel.shader b/Unity/SCANsat/Assets/Shaders/ParticleAdditiveFresnel.shader new file mode 100644 index 000000000..27cb8bea1 --- /dev/null +++ b/Unity/SCANsat/Assets/Shaders/ParticleAdditiveFresnel.shader @@ -0,0 +1,87 @@ +// Upgrade NOTE: replaced '_Object2World' with 'unity_ObjectToWorld' + +// Shader created with Shader Forge v1.18 +// Shader Forge (c) Neat Corporation / Joachim Holmer - http://www.acegikmo.com/shaderforge/ +// Note: Manually altering this data may prevent you from opening it in Shader Forge +/*SF_DATA;ver:1.18;sub:START;pass:START;ps:flbk:,iptp:0,cusa:False,bamd:0,lico:1,lgpr:1,limd:0,spmd:1,trmd:0,grmd:0,uamb:True,mssp:True,bkdf:False,hqlp:False,rprd:False,enco:False,rmgx:True,rpth:0,hqsc:True,nrmq:1,nrsp:0,vomd:0,spxs:False,tesm:0,culm:2,bsrc:0,bdst:0,dpts:2,wrdp:False,dith:0,rfrpo:True,rfrpn:Refraction,coma:15,ufog:True,aust:True,igpj:True,qofs:0,qpre:3,rntp:2,fgom:False,fgoc:True,fgod:False,fgor:False,fgmd:0,fgcr:0,fgcg:0,fgcb:0,fgca:1,fgde:0.01,fgrn:0,fgrf:300,stcl:False,stva:128,stmr:255,stmw:255,stcp:6,stps:0,stfa:0,stfz:0,ofsf:0,ofsu:0,f2p0:False;n:type:ShaderForge.SFN_Final,id:4795,x:32987,y:32660,varname:node_4795,prsc:2|emission-1451-OUT;n:type:ShaderForge.SFN_Tex2d,id:6074,x:32235,y:32601,ptovrint:False,ptlb:MainTex,ptin:_MainTex,varname:_MainTex,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,ntxv:0,isnm:False;n:type:ShaderForge.SFN_Multiply,id:2393,x:32495,y:32793,varname:node_2393,prsc:2|A-6074-RGB,B-2053-RGB,C-797-RGB,D-9248-OUT,E-6554-OUT;n:type:ShaderForge.SFN_VertexColor,id:2053,x:32235,y:32772,varname:node_2053,prsc:2;n:type:ShaderForge.SFN_Color,id:797,x:32235,y:32930,ptovrint:True,ptlb:Color,ptin:_TintColor,varname:_TintColor,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,c1:0.5,c2:0.5,c3:0.5,c4:1;n:type:ShaderForge.SFN_Vector1,id:9248,x:32235,y:33081,varname:node_9248,prsc:2,v1:2;n:type:ShaderForge.SFN_Fresnel,id:3878,x:32179,y:33234,varname:node_3878,prsc:2|EXP-8837-OUT;n:type:ShaderForge.SFN_Slider,id:8837,x:31808,y:33254,ptovrint:False,ptlb:Fresnel Exponent,ptin:_FresnelExponent,varname:node_8837,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,min:1,cur:2.944261,max:4;n:type:ShaderForge.SFN_Subtract,id:6554,x:32506,y:33094,varname:node_6554,prsc:2|A-4911-OUT,B-3878-OUT;n:type:ShaderForge.SFN_Vector1,id:4911,x:32235,y:33139,varname:node_4911,prsc:2,v1:1;n:type:ShaderForge.SFN_Multiply,id:1451,x:32673,y:32885,varname:node_1451,prsc:2|A-2393-OUT,B-797-A;proporder:6074-797-8837;pass:END;sub:END;*/ + +Shader "Shader Forge/ParticleAdditiveFresnel" { + Properties { + _MainTex ("MainTex", 2D) = "white" {} + _TintColor ("Color", Color) = (0.5,0.5,0.5,1) + _FresnelExponent ("Fresnel Exponent", Range(1, 4)) = 2.944261 + } + SubShader { + Tags { + "IgnoreProjector"="True" + "Queue"="Transparent" + "RenderType"="Transparent" + } + Pass { + Name "FORWARD" + Tags { + "LightMode"="ForwardBase" + } + Blend One One + Cull Off + ZWrite Off + + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + #define UNITY_PASS_FORWARDBASE + #include "UnityCG.cginc" + #pragma multi_compile_fwdbase + #pragma multi_compile_fog + #pragma exclude_renderers gles3 metal d3d11_9x xbox360 xboxone ps3 ps4 psp2 + #pragma target 3.0 + uniform sampler2D _MainTex; uniform float4 _MainTex_ST; + uniform float4 _TintColor; + uniform float _FresnelExponent; + struct VertexInput { + float4 vertex : POSITION; + float3 normal : NORMAL; + float2 texcoord0 : TEXCOORD0; + float4 vertexColor : COLOR; + }; + struct VertexOutput { + float4 pos : SV_POSITION; + float2 uv0 : TEXCOORD0; + float4 posWorld : TEXCOORD1; + float3 normalDir : TEXCOORD2; + float4 vertexColor : COLOR; + UNITY_FOG_COORDS(3) + }; + VertexOutput vert (VertexInput v) { + VertexOutput o = (VertexOutput)0; + o.uv0 = v.texcoord0; + o.vertexColor = v.vertexColor; + o.normalDir = UnityObjectToWorldNormal(v.normal); + o.posWorld = mul(unity_ObjectToWorld, v.vertex); + o.pos = mul(UNITY_MATRIX_MVP, v.vertex); + UNITY_TRANSFER_FOG(o,o.pos); + return o; + } + float4 frag(VertexOutput i, float facing : VFACE) : COLOR { + float isFrontFace = ( facing >= 0 ? 1 : 0 ); + float faceSign = ( facing >= 0 ? 1 : -1 ); + i.normalDir = normalize(i.normalDir); + i.normalDir *= faceSign; +/////// Vectors: + float3 viewDirection = normalize(_WorldSpaceCameraPos.xyz - i.posWorld.xyz); + float3 normalDirection = i.normalDir; +////// Lighting: +////// Emissive: + float4 _MainTex_var = tex2D(_MainTex,TRANSFORM_TEX(i.uv0, _MainTex)); + float3 emissive = ((_MainTex_var.rgb*i.vertexColor.rgb*_TintColor.rgb*2.0*(1.0-pow(1.0-max(0,dot(normalDirection, viewDirection)),_FresnelExponent)))*_TintColor.a); + float3 finalColor = emissive; + fixed4 finalRGBA = fixed4(finalColor,1); + UNITY_APPLY_FOG_COLOR(i.fogCoord, finalRGBA, fixed4(0,0,0,1)); + return finalRGBA; + } + ENDCG + } + } + FallBack "Diffuse" + CustomEditor "ShaderForgeMaterialInspector" +} diff --git a/Unity/SCANsat/Assets/Shaders/ParticleAdditiveFresnel.shader.meta b/Unity/SCANsat/Assets/Shaders/ParticleAdditiveFresnel.shader.meta new file mode 100644 index 000000000..98bb2b1a3 --- /dev/null +++ b/Unity/SCANsat/Assets/Shaders/ParticleAdditiveFresnel.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 2319550d1ff59fa4c8fe967d9b6b5adc +timeCreated: 1446560191 +licenseType: Free +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Shaders/ParticleAlpha.shader b/Unity/SCANsat/Assets/Shaders/ParticleAlpha.shader new file mode 100644 index 000000000..f7e523071 --- /dev/null +++ b/Unity/SCANsat/Assets/Shaders/ParticleAlpha.shader @@ -0,0 +1,117 @@ +Shader "KSP/Particles/Alpha Blended" +{ + Properties + { + _TintColor ("Tint Color", Color) = (0.5,0.5,0.5,0.5) + _MainTex ("Particle Texture", 2D) = "white" {} + _InvFade ("Soft Particles Factor", Range(0.01,3.0)) = 1.0 + } + + Category + { + Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" } + Blend SrcAlpha OneMinusSrcAlpha + AlphaTest Greater .01 + ColorMask RGB + Cull Off Lighting Off ZWrite Off + BindChannels { + Bind "Color", color + Bind "Vertex", vertex + Bind "TexCoord", texcoord + } + + // ---- Fragment program cards + SubShader + { + Pass + { + + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + #pragma fragmentoption ARB_precision_hint_fastest + #pragma multi_compile_particles + + #include "UnityCG.cginc" + + sampler2D _MainTex; + fixed4 _TintColor; + + struct appdata_t { + float4 vertex : POSITION; + fixed4 color : COLOR; + float2 texcoord : TEXCOORD0; + }; + + struct v2f { + float4 vertex : POSITION; + fixed4 color : COLOR; + float2 texcoord : TEXCOORD0; + #ifdef SOFTPARTICLES_ON + float4 projPos : TEXCOORD1; + #endif + }; + + float4 _MainTex_ST; + + v2f vert (appdata_t v) + { + v2f o; + o.vertex = mul(UNITY_MATRIX_MVP, v.vertex); + #ifdef SOFTPARTICLES_ON + o.projPos = ComputeScreenPos (o.vertex); + COMPUTE_EYEDEPTH(o.projPos.z); + #endif + o.color = v.color; + o.texcoord = TRANSFORM_TEX(v.texcoord,_MainTex); + return o; + } + + sampler2D _CameraDepthTexture; + float _InvFade; + + fixed4 frag (v2f i) : COLOR + { + #ifdef SOFTPARTICLES_ON + float sceneZ = LinearEyeDepth (UNITY_SAMPLE_DEPTH(tex2Dproj(_CameraDepthTexture, UNITY_PROJ_COORD(i.projPos)))); + float partZ = i.projPos.z; + float fade = saturate (_InvFade * (sceneZ-partZ)); + i.color.a *= fade; + #endif + + return 2.0f * i.color * _TintColor * tex2D(_MainTex, i.texcoord); + } + ENDCG + } + } + + // ---- Dual texture cards + SubShader + { + Pass + { + SetTexture [_MainTex] + { + constantColor [_TintColor] + combine constant * primary + } + SetTexture [_MainTex] + { + combine texture * previous DOUBLE + } + } + } + + // ---- Single texture cards (does not do color tint) + SubShader + { + Pass + { + SetTexture [_MainTex] + { + combine texture * primary + } + } + } + } +} diff --git a/Unity/SCANsat/Assets/Shaders/ParticleAlpha.shader.meta b/Unity/SCANsat/Assets/Shaders/ParticleAlpha.shader.meta new file mode 100644 index 000000000..94a438d2f --- /dev/null +++ b/Unity/SCANsat/Assets/Shaders/ParticleAlpha.shader.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 0119f0967dbebbc42bc9f4a0f8224c0b +ShaderImporter: + defaultTextures: [] + userData: diff --git a/Unity/SCANsat/Assets/Shaders/ScrollingUnlit.shader b/Unity/SCANsat/Assets/Shaders/ScrollingUnlit.shader new file mode 100644 index 000000000..4db26fc57 --- /dev/null +++ b/Unity/SCANsat/Assets/Shaders/ScrollingUnlit.shader @@ -0,0 +1,109 @@ +Shader "KSP/FX/ScrollingUnlit" +{ + Properties + { + _MainTex("MainTex (RGB Alpha(A))", 2D) = "white" {} + _Color("Color (RGB Alpha(A))", Color) = (1,1,1,1) + [Space] + _SpeedX("Scroll Speed X", Float) = 0 + _SpeedY("Scroll Speed Y", Float) = 1 + [Space] + [KeywordEnum(UV, Screen Space)] _TexCoord("Texture Coordinates", Float) = 0 + _TileX("ScreenSpace Tiling X", Float) = 1 + _TileY("ScreenSpace Tiling Y", Float) = 1 + [Space] + [KeywordEnum(Off, Outer, Inner)] _Fresnel("Fresnel Fade", Float) = 0 + _FresnelPow("Fresnel Falloff", Range(0,5)) = 1 + _FresnelInt("Fresnel Intensity", Range(0,1)) = 1 + } + + SubShader + { + Tags{ "Queue" = "Transparent" "IgnoreProjector" = "True" "RenderType" = "Transparent" } + + Pass + { + ZWrite On + ColorMask 0 + } + + ZWrite On + ZTest LEqual + Blend SrcAlpha OneMinusSrcAlpha + + CGPROGRAM + + #include "LightingKSP.cginc" + #pragma surface surf Unlit noforwardadd noshadow noambient novertexlights alpha:fade + #pragma target 3.0 + #pragma multi_compile _TEXCOORD_UV _TEXCOORD_SCREEN_SPACE + #pragma multi_compile _FRESNEL_OFF _FRESNEL_OUTER _FRESNEL_INNER + + + sampler2D _MainTex; + + float _SpeedX; + float _SpeedY; + float _TileX; + float _TileY; + + #if !_FRESNEL_OFF + float _FresnelPow; + float _FresnelInt; + #endif + + struct Input + { + #if _TEXCOORD_UV + float2 uv_MainTex; + #endif + + #if _TEXCOORD_SCREEN_SPACE + float4 screenPos; + #endif + + #if !_FRESNEL_OFF + float3 viewDir; + #endif + }; + + + + void surf (Input IN, inout SurfaceOutput o) + { + #if _TEXCOORD_SCREEN_SPACE + float2 screenUV = IN.screenPos.xy / IN.screenPos.w; + screenUV.x += _Time * _SpeedX; + screenUV.y += _Time * _SpeedY; + screenUV.x *= _TileX; + screenUV.y *= _TileY; + float4 c = tex2D(_MainTex, (screenUV)); + #endif + + + #if _TEXCOORD_UV + fixed2 scrollUV = IN.uv_MainTex ; + fixed xScrollValue = _SpeedX * _Time.x; + fixed yScrollValue = _SpeedY * _Time.x; + scrollUV += fixed2(xScrollValue, yScrollValue); + half4 c = tex2D(_MainTex, scrollUV); + #endif + float3 normal = float3(0,0,1); + + o.Albedo = c.rgb * _Color.rgb; + o.Normal = normal; + o.Alpha = c.a * _Color.a; + + #if _FRESNEL_INNER + half rim = 1.0 - saturate(dot(normalize(IN.viewDir), float3(0, 0, 1))); + o.Alpha *= lerp(pow(rim, _FresnelPow), 1, 1- _FresnelInt); + #endif + #if _FRESNEL_OUTER + half rim = 1.0 - saturate(dot(normalize(IN.viewDir), float3(0, 0, 1))); + o.Alpha *= lerp(pow(1 - rim, _FresnelPow), 1, 1 - _FresnelInt); + #endif + + } + ENDCG + } +} \ No newline at end of file diff --git a/Unity/SCANsat/Assets/Shaders/ScrollingUnlit.shader.meta b/Unity/SCANsat/Assets/Shaders/ScrollingUnlit.shader.meta new file mode 100644 index 000000000..afb420b87 --- /dev/null +++ b/Unity/SCANsat/Assets/Shaders/ScrollingUnlit.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: fecf7d1b793420b42bd7aceca03cc705 +timeCreated: 1457959736 +licenseType: Free +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Shaders/SolidColorAlpha.shader b/Unity/SCANsat/Assets/Shaders/SolidColorAlpha.shader new file mode 100644 index 000000000..95b9dd597 --- /dev/null +++ b/Unity/SCANsat/Assets/Shaders/SolidColorAlpha.shader @@ -0,0 +1,49 @@ +Shader "Solid Color (Alpha)" { + Properties + { + _Color ("Color", Color) = (0.5, 0.5, 0.5, 0.5) + } + SubShader + { + + ZWrite On + GrabPass { } + Pass + { + Fog { Mode Off } + Blend SrcAlpha OneMinusSrcAlpha + + CGPROGRAM + + #pragma vertex vert + #pragma fragment frag + + fixed4 _Color; + sampler2D _GrabTexture; + + struct appdata + { + float4 vertex : POSITION; + }; + struct v2f + { + float4 pos : SV_POSITION; + float4 uv : TEXCOORD0; + }; + v2f vert (appdata v) + { + v2f o; + o.pos = mul(UNITY_MATRIX_MVP, v.vertex); + o.uv = o.pos; + return o; + } + half4 frag(v2f i) : COLOR + { + float2 coord = 0.5 + 0.5 * i.uv.xy / i.uv.w; + fixed4 tex = tex2D(_GrabTexture, float2(coord.x, 1 - coord.y)); + return fixed4(lerp(tex.rgb, _Color.rgb, _Color.a), 1); + } + ENDCG + } + } +} \ No newline at end of file diff --git a/Unity/SCANsat/Assets/Shaders/SolidColorAlpha.shader.meta b/Unity/SCANsat/Assets/Shaders/SolidColorAlpha.shader.meta new file mode 100644 index 000000000..f83f6d4c8 --- /dev/null +++ b/Unity/SCANsat/Assets/Shaders/SolidColorAlpha.shader.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 1c305ae90596a6446a4ccb724cab1d13 +ShaderImporter: + userData: diff --git a/Unity/SCANsat/Assets/Shaders/Specular.shader b/Unity/SCANsat/Assets/Shaders/Specular.shader new file mode 100644 index 000000000..69582775d --- /dev/null +++ b/Unity/SCANsat/Assets/Shaders/Specular.shader @@ -0,0 +1,71 @@ +Shader "KSP/Specular" +{ + Properties + { + _MainTex("_MainTex (RGB spec(A))", 2D) = "gray" {} + _Color ("MainColor", Color) = (1,1,1,1) + _SpecColor ("Specular Color", Color) = (0.5, 0.5, 0.5, 1) + _Shininess ("Shininess", Range (0.03, 1)) = 0.078125 + _Opacity("_Opacity", Range(0,1) ) = 1 + + + _RimFalloff("_RimFalloff", Range(0.01,5) ) = 0.1 + _RimColor("_RimColor", Color) = (0,0,0,0) + + _TemperatureColor("_TemperatureColor", Color) = (0,0,0,0) + _BurnColor ("Burn Color", Color) = (1,1,1,1) + } + + SubShader + { + Tags { "RenderType"="Opaque" } + ZWrite On + ZTest LEqual + Blend SrcAlpha OneMinusSrcAlpha + + CGPROGRAM + + + + #include "LightingKSP.cginc" + #pragma surface surf BlinnPhongSmooth keepalpha + #pragma target 3.0 + + half _Shininess; + + sampler2D _MainTex; + + float _Opacity; + float _RimFalloff; + float4 _RimColor; + float4 _TemperatureColor; + float4 _BurnColor; + + struct Input + { + float2 uv_MainTex; + float3 viewDir; + }; + + void surf (Input IN, inout SurfaceOutput o) + { + float4 color = tex2D(_MainTex,(IN.uv_MainTex)) * _BurnColor; + float3 normal = float3(0,0,1); + + half rim = 1.0 - saturate(dot (normalize(IN.viewDir), normal)); + float3 emission = (_RimColor.rgb * pow(rim, _RimFalloff)) * _RimColor.a; + emission += _TemperatureColor.rgb * _TemperatureColor.a; + + o.Albedo = color.rgb; + o.Emission = emission; + o.Gloss = color.a; + o.Specular = _Shininess; + o.Normal = normal; + + o.Emission *= _Opacity; + o.Alpha = _Opacity; + } + ENDCG + } + Fallback "Standard" +} \ No newline at end of file diff --git a/Unity/SCANsat/Assets/Shaders/Specular.shader.meta b/Unity/SCANsat/Assets/Shaders/Specular.shader.meta new file mode 100644 index 000000000..5151ca6db --- /dev/null +++ b/Unity/SCANsat/Assets/Shaders/Specular.shader.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 2ebca85d3473f60439b7ab95440e83d8 +ShaderImporter: + userData: diff --git a/Unity/SCANsat/Assets/Shaders/SpecularBumpTransparent.shader b/Unity/SCANsat/Assets/Shaders/SpecularBumpTransparent.shader new file mode 100644 index 000000000..542187616 --- /dev/null +++ b/Unity/SCANsat/Assets/Shaders/SpecularBumpTransparent.shader @@ -0,0 +1,89 @@ +Shader "KSP/Bumped Specular (Transparent)" +{ + Properties + { + _MainTex("_MainTex (RGB spec(A))", 2D) = "white" {} + _BumpMap("_BumpMap", 2D) = "bump" {} + + _MainColor ("Main Color", Color) = (1,1,1,1) + + _Shininess ("Shininess", Range (0.03, 1)) = 0.078125 + + _Opacity("_Opacity", Range(0,1) ) = 1 + _Fresnel("Fresnel", Range(0,10)) = 0 + [MaterialToggle] _FresnelInvert("Invert Fresnel", Float) = 0 + + _RimFalloff("_RimFalloff", Range(0.01,5) ) = 0.1 + _RimColor("_RimColor", Color) = (0,0,0,0) + + _TemperatureColor("_TemperatureColor", Color) = (0,0,0,0) + _BurnColor ("Burn Color", Color) = (1,1,1,1) + } + + SubShader + { + Tags {"Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent"} + + Pass + { + ZWrite On + ColorMask 0 + } + + //ZWrite On + ZTest LEqual + Blend SrcAlpha OneMinusSrcAlpha + + CGPROGRAM + + #include "LightingKSP.cginc" + #pragma surface surf BlinnPhongSmooth alpha:fade + #pragma target 3.0 + + half _Shininess; + + sampler2D _MainTex; + sampler2D _BumpMap; + + float4 _MainColor; + float _Opacity; + float _RimFalloff; + float4 _RimColor; + float4 _TemperatureColor; + float4 _BurnColor; + float _Fresnel; + float _FresnelInvert; + float _Brightness; + + struct Input + { + float2 uv_MainTex; + float2 uv_BumpMap; + float2 uv_Emissive; + float3 viewDir; + }; + + void surf (Input IN, inout SurfaceOutput o) + { + float4 color = tex2D(_MainTex,(IN.uv_MainTex)) * _MainColor * _BurnColor; + float3 normal = UnpackNormal(tex2D(_BumpMap, IN.uv_BumpMap)); + + half rim = 1.0 - saturate(dot (normalize(IN.viewDir), normal)); + + float3 fresnel = (_FresnelInvert + (pow(1 - rim, _Fresnel))) * (1 - _FresnelInvert + 1 - (pow(1 - rim, _Fresnel))); + + float3 emission = (_RimColor.rgb * pow(rim, _RimFalloff)) * _RimColor.a; + emission += _TemperatureColor.rgb * _TemperatureColor.a; + + o.Albedo = color.rgb; + o.Emission = emission; + o.Gloss = color.a; + o.Specular = _Shininess; + o.Normal = normal; + o.Emission *= _Opacity; + o.Alpha = _Opacity * color.a * fresnel; + } + ENDCG + } + Fallback "Standard" +} \ No newline at end of file diff --git a/Unity/SCANsat/Assets/Shaders/SpecularBumpTransparent.shader.meta b/Unity/SCANsat/Assets/Shaders/SpecularBumpTransparent.shader.meta new file mode 100644 index 000000000..8696d3780 --- /dev/null +++ b/Unity/SCANsat/Assets/Shaders/SpecularBumpTransparent.shader.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: a300027f5fc1d00408c43714110ed874 +ShaderImporter: + defaultTextures: [] + userData: diff --git a/Unity/SCANsat/Assets/Shaders/SpecularTransparent.shader b/Unity/SCANsat/Assets/Shaders/SpecularTransparent.shader new file mode 100644 index 000000000..b97b92a02 --- /dev/null +++ b/Unity/SCANsat/Assets/Shaders/SpecularTransparent.shader @@ -0,0 +1,82 @@ +Shader "KSP/Specular (Transparent)" +{ + Properties + { + _MainTex("_MainTex (RGB spec(A))", 2D) = "white" {} + _MainColor ("Main Color", Color) = (1,1,1,1) + + _Shininess ("Shininess", Range (0.03, 1)) = 0.078125 + + _Opacity("_Opacity", Range(0,1) ) = 1 + _Fresnel("Fresnel", Range(0,10)) = 0 + [MaterialToggle] _FresnelInvert("Invert Fresnel", Float) = 0 + + _RimFalloff("_RimFalloff", Range(0.01,5) ) = 0.1 + _RimColor("_RimColor", Color) = (0,0,0,0) + + _TemperatureColor("_TemperatureColor", Color) = (0,0,0,0) + _BurnColor ("Burn Color", Color) = (1,1,1,1) + } + + SubShader + { + Tags {"Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent"} + + Pass + { + ZWrite On + ColorMask 0 + } + + //ZWrite On + ZTest LEqual + Blend SrcAlpha OneMinusSrcAlpha + + CGPROGRAM + + #include "LightingKSP.cginc" + #pragma surface surf BlinnPhongSmooth alpha:fade + #pragma target 3.0 + + half _Shininess; + + sampler2D _MainTex; + + float4 _MainColor; + float _Opacity; + float _RimFalloff; + float4 _RimColor; + float4 _TemperatureColor; + float4 _BurnColor; + float _Fresnel; + float _FresnelInvert; + + struct Input + { + float2 uv_MainTex; + float3 viewDir; + float3 worldNormal; + }; + + void surf (Input IN, inout SurfaceOutput o) + { + float4 color = tex2D(_MainTex,(IN.uv_MainTex)) * _MainColor * _BurnColor; + half rim = 1.0 - saturate(dot (normalize(IN.viewDir), IN.worldNormal)); + + float3 fresnel = (_FresnelInvert + (pow(1 - rim, _Fresnel))) * (1 - _FresnelInvert + 1 - (pow(1 - rim, _Fresnel))); + + float3 emission = (_RimColor.rgb * pow(rim, _RimFalloff)) * _RimColor.a; + emission += _TemperatureColor.rgb * _TemperatureColor.a; + + o.Albedo = color.rgb; + o.Emission = emission; + o.Gloss = color.a; + o.Specular = _Shininess; + o.Emission *= _Opacity; + o.Alpha = _Opacity * color.a * fresnel; + } + ENDCG + + } + Fallback "Standard" +} \ No newline at end of file diff --git a/Unity/SCANsat/Assets/Shaders/SpecularTransparent.shader.meta b/Unity/SCANsat/Assets/Shaders/SpecularTransparent.shader.meta new file mode 100644 index 000000000..64cb5a2b8 --- /dev/null +++ b/Unity/SCANsat/Assets/Shaders/SpecularTransparent.shader.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 9734ff0747239d44db81bfccdd6b3eee +ShaderImporter: + defaultTextures: [] + userData: diff --git a/Unity/SCANsat/Assets/Shaders/Unlit.shader b/Unity/SCANsat/Assets/Shaders/Unlit.shader new file mode 100644 index 000000000..4fe3d0d46 --- /dev/null +++ b/Unity/SCANsat/Assets/Shaders/Unlit.shader @@ -0,0 +1,67 @@ +Shader "KSP/Unlit" +{ + Properties + { + _MainTex("_MainTex (RGB)", 2D) = "white" {} + _Color("Color", Color) = (1,1,1,1) + + _Opacity("_Opacity", Range(0,1) ) = 1 + _RimFalloff("_RimFalloff", Range(0.01,5) ) = 0.1 + _RimColor("_RimColor", Color) = (0,0,0,0) + + _TemperatureColor("_TemperatureColor", Color) = (0,0,0,0) + _BurnColor ("Burn Color", Color) = (1,1,1,1) + } + + SubShader + { + Tags { "RenderType"="Opaque" } + ZWrite On + ZTest LEqual + Blend SrcAlpha OneMinusSrcAlpha + + CGPROGRAM + #include "LightingKSP.cginc" + #pragma surface surf Unlit noforwardadd noshadow noambient novertexlights keepalpha + #pragma target 3.0 + + sampler2D _MainTex; + + float _Opacity; + float _RimFalloff; + float4 _RimColor; + float4 _TemperatureColor; + float4 _BurnColor; + + + + struct Input + { + float2 uv_MainTex; + float2 uv_Emissive; + float3 viewDir; + }; + + void surf (Input IN, inout SurfaceOutput o) + { + float4 color = tex2D(_MainTex,(IN.uv_MainTex)) * _BurnColor; + float3 normal = float3(0,0,1); + + half rim = 1.0 - saturate(dot (normalize(IN.viewDir), normal)); + + float3 emission = (_RimColor.rgb * pow(rim, _RimFalloff)) * _RimColor.a; + emission += _TemperatureColor.rgb * _TemperatureColor.a; + + o.Albedo = _Color.rgb * color.rgb + emission; + //o.Emission = emission; + o.Gloss = 0; + o.Specular = 0; + o.Normal = normal; + + o.Emission *= _Opacity; + o.Alpha = _Opacity; + } + ENDCG + } + Fallback "Standard" +} \ No newline at end of file diff --git a/Unity/SCANsat/Assets/Shaders/Unlit.shader.meta b/Unity/SCANsat/Assets/Shaders/Unlit.shader.meta new file mode 100644 index 000000000..ae0b3fb22 --- /dev/null +++ b/Unity/SCANsat/Assets/Shaders/Unlit.shader.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: bb8ca88c4046c074bb3f3af45d9c855b +ShaderImporter: + userData: diff --git a/Unity/SCANsat/Assets/Shaders/UnlitColor.shader b/Unity/SCANsat/Assets/Shaders/UnlitColor.shader new file mode 100644 index 000000000..36b7fe3cf --- /dev/null +++ b/Unity/SCANsat/Assets/Shaders/UnlitColor.shader @@ -0,0 +1,38 @@ +Shader "KSP/UnlitColor" +{ + Properties + { + _Color("Color", Color) = (1,1,1,1) + } + + SubShader + { + Tags{ "Queue" = "Transparent" "IgnoreProjector" = "True" "RenderType" = "Transparent" } + + Pass + { + ZWrite On + ColorMask 0 + } + Tags { "RenderType"="Opaque" } + ZWrite On + ZTest LEqual + Blend SrcAlpha OneMinusSrcAlpha + + CGPROGRAM + #include "LightingKSP.cginc" + #pragma surface surf Unlit noforwardadd noshadow noambient novertexlights alpha:fade + #pragma target 3.0 + struct Input + { + float4 color : COLOR; //vertex color + }; + void surf (Input IN, inout SurfaceOutput o) + { + o.Albedo = _Color.rgb * IN.color.rgb; + o.Alpha = _Color.a * IN.color.a; + } + ENDCG + } + Fallback "Unlit/Color" +} \ No newline at end of file diff --git a/Unity/SCANsat/Assets/Shaders/UnlitColor.shader.meta b/Unity/SCANsat/Assets/Shaders/UnlitColor.shader.meta new file mode 100644 index 000000000..9ed368dea --- /dev/null +++ b/Unity/SCANsat/Assets/Shaders/UnlitColor.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 37009ed9069dfce43a12d30fc381f931 +timeCreated: 1457970059 +licenseType: Free +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Shaders/UnlitTransparent.shader b/Unity/SCANsat/Assets/Shaders/UnlitTransparent.shader new file mode 100644 index 000000000..ca3e7277c --- /dev/null +++ b/Unity/SCANsat/Assets/Shaders/UnlitTransparent.shader @@ -0,0 +1,77 @@ +Shader "KSP/Alpha/Unlit Transparent" +{ + Properties + { + _MainTex("MainTex (RGB Alpha(A))", 2D) = "white" {} + _Color("Color", Color) = (1,1,1,1) + + _Opacity("_Opacity", Range(0,1) ) = 1 + _Fresnel("Fresnel", Range(0,10)) = 0 + [MaterialToggle] _FresnelInvert("Invert Fresnel", Float) = 0 + + _RimFalloff("_RimFalloff", Range(0.01,5) ) = 0.1 + _RimColor("_RimColor", Color) = (0,0,0,0) + + _TemperatureColor("_TemperatureColor", Color) = (0,0,0,0) + _BurnColor ("Burn Color", Color) = (1,1,1,1) + } + + SubShader + { + Tags{ "Queue" = "Transparent" "IgnoreProjector" = "True" "RenderType" = "Transparent" } + + Pass + { + ZWrite On + ColorMask 0 + } + + ZWrite On + ZTest LEqual + Blend SrcAlpha OneMinusSrcAlpha + + CGPROGRAM + + #include "LightingKSP.cginc" + #pragma surface surf Unlit noforwardadd noshadow noambient novertexlights alpha:fade + #pragma target 3.0 + + sampler2D _MainTex; + + float _Opacity; + float _Fresnel; + float _FresnelInvert; + float _RimFalloff; + float4 _RimColor; + float4 _TemperatureColor; + float4 _BurnColor; + + + + struct Input + { + float2 uv_MainTex; + float3 viewDir; + }; + + void surf (Input IN, inout SurfaceOutput o) + { + float4 color = tex2D(_MainTex, (IN.uv_MainTex)) * _BurnColor; + float alpha = _Color.a * color.a; + float3 normal = float3(0,0,1); + + half rim = 1.0 - saturate(dot (normalize(IN.viewDir), normal)); + float3 fresnel = (_FresnelInvert + (pow(1 - rim, _Fresnel))) * (1 - _FresnelInvert + 1 - (pow(1 - rim, _Fresnel))); + + float3 emission = (_RimColor.rgb * pow(rim, _RimFalloff)) * _RimColor.a; + emission += _TemperatureColor.rgb * _TemperatureColor.a; + + o.Albedo = _Color.rgb * color.rgb + emission; + //o.Emission = emission * _Opacity; + o.Normal = normal; + o.Alpha = _Color.a * color.a * _Opacity * fresnel; + } + ENDCG + } + Fallback "Standard" +} \ No newline at end of file diff --git a/Unity/SCANsat/Assets/Shaders/UnlitTransparent.shader.meta b/Unity/SCANsat/Assets/Shaders/UnlitTransparent.shader.meta new file mode 100644 index 000000000..17849cb31 --- /dev/null +++ b/Unity/SCANsat/Assets/Shaders/UnlitTransparent.shader.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: f7dfb55ef5c52b14c9c18cf4ac48bb24 +ShaderImporter: + userData: diff --git a/Unity/SCANsat/Assets/SquadCore.meta b/Unity/SCANsat/Assets/SquadCore.meta new file mode 100644 index 000000000..ecc2183e8 --- /dev/null +++ b/Unity/SCANsat/Assets/SquadCore.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: b82d597bbb1249f41a7ee011ea17c9e1 +folderAsset: yes +timeCreated: 1478034312 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/SquadCore/KSPedia.meta b/Unity/SCANsat/Assets/SquadCore/KSPedia.meta new file mode 100644 index 000000000..dd98e4345 --- /dev/null +++ b/Unity/SCANsat/Assets/SquadCore/KSPedia.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: ea681fdd8e1bcc2449f008a8ac4fdc92 +folderAsset: yes +timeCreated: 1448011261 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/SquadCore/KSPedia/Backgrounds.meta b/Unity/SCANsat/Assets/SquadCore/KSPedia/Backgrounds.meta new file mode 100644 index 000000000..98448d503 --- /dev/null +++ b/Unity/SCANsat/Assets/SquadCore/KSPedia/Backgrounds.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 47990fb03129e824caf678339b9eff94 +folderAsset: yes +timeCreated: 1448011267 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/SquadCore/KSPedia/Backgrounds/BackgroundBlack.png b/Unity/SCANsat/Assets/SquadCore/KSPedia/Backgrounds/BackgroundBlack.png new file mode 100644 index 000000000..16c5e63c0 Binary files /dev/null and b/Unity/SCANsat/Assets/SquadCore/KSPedia/Backgrounds/BackgroundBlack.png differ diff --git a/Unity/SCANsat/Assets/SquadCore/KSPedia/Backgrounds/BackgroundBlack.png.meta b/Unity/SCANsat/Assets/SquadCore/KSPedia/Backgrounds/BackgroundBlack.png.meta new file mode 100644 index 000000000..06bfea3ca --- /dev/null +++ b/Unity/SCANsat/Assets/SquadCore/KSPedia/Backgrounds/BackgroundBlack.png.meta @@ -0,0 +1,56 @@ +fileFormatVersion: 2 +guid: b1fc6fdc0f80cbf49b77f83ad3db33aa +timeCreated: 1455648612 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: KSPedia + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/SquadCore/KSPedia/Backgrounds/BackgroundBlue.png b/Unity/SCANsat/Assets/SquadCore/KSPedia/Backgrounds/BackgroundBlue.png new file mode 100644 index 000000000..94709e8f7 Binary files /dev/null and b/Unity/SCANsat/Assets/SquadCore/KSPedia/Backgrounds/BackgroundBlue.png differ diff --git a/Unity/SCANsat/Assets/SquadCore/KSPedia/Backgrounds/BackgroundBlue.png.meta b/Unity/SCANsat/Assets/SquadCore/KSPedia/Backgrounds/BackgroundBlue.png.meta new file mode 100644 index 000000000..b311337be --- /dev/null +++ b/Unity/SCANsat/Assets/SquadCore/KSPedia/Backgrounds/BackgroundBlue.png.meta @@ -0,0 +1,56 @@ +fileFormatVersion: 2 +guid: e8621dd15bfcce340b91d8bbc8d9f084 +timeCreated: 1455648613 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/SquadCore/KSPedia/Backgrounds/BackgroundBlueGrid.png b/Unity/SCANsat/Assets/SquadCore/KSPedia/Backgrounds/BackgroundBlueGrid.png new file mode 100644 index 000000000..934b03fcf Binary files /dev/null and b/Unity/SCANsat/Assets/SquadCore/KSPedia/Backgrounds/BackgroundBlueGrid.png differ diff --git a/Unity/SCANsat/Assets/SquadCore/KSPedia/Backgrounds/BackgroundBlueGrid.png.meta b/Unity/SCANsat/Assets/SquadCore/KSPedia/Backgrounds/BackgroundBlueGrid.png.meta new file mode 100644 index 000000000..a6a5c630a --- /dev/null +++ b/Unity/SCANsat/Assets/SquadCore/KSPedia/Backgrounds/BackgroundBlueGrid.png.meta @@ -0,0 +1,56 @@ +fileFormatVersion: 2 +guid: 647bbf5cf6c08c04c8d4b753202b0808 +timeCreated: 1455648610 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/SquadCore/KSPedia/Backgrounds/BackgroundKSC.png b/Unity/SCANsat/Assets/SquadCore/KSPedia/Backgrounds/BackgroundKSC.png new file mode 100644 index 000000000..e9f5875e8 Binary files /dev/null and b/Unity/SCANsat/Assets/SquadCore/KSPedia/Backgrounds/BackgroundKSC.png differ diff --git a/Unity/SCANsat/Assets/SquadCore/KSPedia/Backgrounds/BackgroundKSC.png.meta b/Unity/SCANsat/Assets/SquadCore/KSPedia/Backgrounds/BackgroundKSC.png.meta new file mode 100644 index 000000000..af6fe4ea0 --- /dev/null +++ b/Unity/SCANsat/Assets/SquadCore/KSPedia/Backgrounds/BackgroundKSC.png.meta @@ -0,0 +1,56 @@ +fileFormatVersion: 2 +guid: cdbc96a0c719a1d48901892fcf30182f +timeCreated: 1455648613 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/SquadCore/KSPedia/Backgrounds/BackgroundWhite.png b/Unity/SCANsat/Assets/SquadCore/KSPedia/Backgrounds/BackgroundWhite.png new file mode 100644 index 000000000..c591ffccc Binary files /dev/null and b/Unity/SCANsat/Assets/SquadCore/KSPedia/Backgrounds/BackgroundWhite.png differ diff --git a/Unity/SCANsat/Assets/SquadCore/KSPedia/Backgrounds/BackgroundWhite.png.meta b/Unity/SCANsat/Assets/SquadCore/KSPedia/Backgrounds/BackgroundWhite.png.meta new file mode 100644 index 000000000..6034a3f66 --- /dev/null +++ b/Unity/SCANsat/Assets/SquadCore/KSPedia/Backgrounds/BackgroundWhite.png.meta @@ -0,0 +1,56 @@ +fileFormatVersion: 2 +guid: 7fbafb50c77e28d49a117a7810a321bf +timeCreated: 1455648611 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: KSPedia + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/SquadCore/Shaders.meta b/Unity/SCANsat/Assets/SquadCore/Shaders.meta new file mode 100644 index 000000000..fcad7dc6f --- /dev/null +++ b/Unity/SCANsat/Assets/SquadCore/Shaders.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: bfea133dc2cd936468fd26de9985455d +folderAsset: yes +timeCreated: 1447334764 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/SquadCore/Shaders/Alpha.shader b/Unity/SCANsat/Assets/SquadCore/Shaders/Alpha.shader new file mode 100644 index 000000000..79bd274b4 --- /dev/null +++ b/Unity/SCANsat/Assets/SquadCore/Shaders/Alpha.shader @@ -0,0 +1,65 @@ +Shader "KSP/Alpha/Translucent" +{ + Properties + { + _MainTex("MainTex (RGBA)", 2D) = "white" {} + + _RimFalloff("Rim Falloff", Range(0.01,5) ) = 0.1 + _RimColor("Rim Color", Color) = (0,0,0,0) + + _TemperatureColor("_TemperatureColor", Color) = (0,0,0,0) + _BurnColor ("Burn Color", Color) = (1,1,1,1) + } + + SubShader + { + Tags { "Queue" = "Transparent" } + + ZWrite On + ZTest LEqual + Blend SrcAlpha OneMinusSrcAlpha + + CGPROGRAM + + #pragma surface surf Lambert alpha + #pragma target 3.0 + + sampler2D _MainTex; + + float _Opacity; + float _RimFalloff; + float4 _RimColor; + float4 _TemperatureColor; + float4 _BurnColor; + + struct Input + { + float2 uv_MainTex; + float2 uv_BumpMap; + float2 uv_Emissive; + float3 viewDir; + }; + + void surf (Input IN, inout SurfaceOutput o) + { + float4 color = tex2D(_MainTex, (IN.uv_MainTex)) * _BurnColor; + + float3 normal = float3(0,0,1); + half rim = 1.0 - saturate(dot (normalize(IN.viewDir), normal)); + + float3 emission = (_RimColor.rgb * pow(rim, _RimFalloff)) * _RimColor.a; + emission += _TemperatureColor.rgb * _TemperatureColor.a; + + o.Albedo = color.rgb; + o.Emission = emission; + o.Gloss = 0; + o.Specular = 0; + o.Normal = normal; + + o.Alpha = color.a; + } + + ENDCG + } + Fallback "Diffuse" +} \ No newline at end of file diff --git a/Unity/SCANsat/Assets/SquadCore/Shaders/Alpha.shader.meta b/Unity/SCANsat/Assets/SquadCore/Shaders/Alpha.shader.meta new file mode 100644 index 000000000..d9b86e20d --- /dev/null +++ b/Unity/SCANsat/Assets/SquadCore/Shaders/Alpha.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 6d85e30bba4b9974ab34d7d199c19c39 +timeCreated: 1447334820 +licenseType: Pro +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/SquadCore/Shaders/AlphaSpecular.shader b/Unity/SCANsat/Assets/SquadCore/Shaders/AlphaSpecular.shader new file mode 100644 index 000000000..78aa06c03 --- /dev/null +++ b/Unity/SCANsat/Assets/SquadCore/Shaders/AlphaSpecular.shader @@ -0,0 +1,73 @@ +Shader "KSP/Alpha/Translucent Specular" +{ + Properties + { + _MainTex("MainTex (RGBA)", 2D) = "white" {} + + _Gloss ("Gloss", Range (0.01, 1)) = 0.5 + _SpecColor ("Specular Color", Color) = (0.5, 0.5, 0.5, 1) + _Shininess ("Shininess", Range (0.03, 1)) = 0.078125 + + _RimFalloff("Rim Falloff", Range(0.01,5) ) = 0.1 + _RimColor("Rim Color", Color) = (0,0,0,0) + + _TemperatureColor("_TemperatureColor", Color) = (0,0,0,0) + _BurnColor ("Burn Color", Color) = (1,1,1,1) + } + + SubShader + { + Tags { "Queue" = "Transparent" } + + ZWrite On + ZTest LEqual + Blend SrcAlpha OneMinusSrcAlpha + + CGPROGRAM + + #pragma surface surf BlinnPhong alpha + #pragma target 3.0 + + half _Shininess; + + sampler2D _MainTex; + + float _Gloss; + + float _Opacity; + float _RimFalloff; + float4 _RimColor; + float4 _TemperatureColor; + float4 _BurnColor; + + struct Input + { + float2 uv_MainTex; + float2 uv_BumpMap; + float2 uv_Emissive; + float3 viewDir; + }; + + void surf (Input IN, inout SurfaceOutput o) + { + float4 color = tex2D(_MainTex, (IN.uv_MainTex)) * _BurnColor; + + float3 normal = float3(0,0,1); + half rim = 1.0 - saturate(dot (normalize(IN.viewDir), normal)); + + float3 emission = (_RimColor.rgb * pow(rim, _RimFalloff)) * _RimColor.a; + emission += _TemperatureColor.rgb * _TemperatureColor.a; + + o.Albedo = color.rgb; + o.Emission = emission; + o.Gloss = color.a; + o.Specular = _Shininess; + o.Normal = normal; + + o.Alpha = color.a; + } + + ENDCG + } + Fallback "Diffuse" +} \ No newline at end of file diff --git a/Unity/SCANsat/Assets/SquadCore/Shaders/AlphaSpecular.shader.meta b/Unity/SCANsat/Assets/SquadCore/Shaders/AlphaSpecular.shader.meta new file mode 100644 index 000000000..63ad77297 --- /dev/null +++ b/Unity/SCANsat/Assets/SquadCore/Shaders/AlphaSpecular.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 5342206a32fc49a44b5aa0b52a72a8b0 +timeCreated: 1447334820 +licenseType: Pro +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/SquadCore/Shaders/Bumped.shader b/Unity/SCANsat/Assets/SquadCore/Shaders/Bumped.shader new file mode 100644 index 000000000..dbf74f6cc --- /dev/null +++ b/Unity/SCANsat/Assets/SquadCore/Shaders/Bumped.shader @@ -0,0 +1,69 @@ +Shader "KSP/Bumped" +{ + Properties + { + _MainTex("_MainTex (RGB spec(A))", 2D) = "white" {} + _BumpMap("_BumpMap", 2D) = "bump" {} + + _Opacity("_Opacity", Range(0,1) ) = 1 + _RimFalloff("_RimFalloff", Range(0.01,5) ) = 0.1 + _RimColor("_RimColor", Color) = (0,0,0,0) + + _TemperatureColor("_TemperatureColor", Color) = (0,0,0,0) + _BurnColor ("Burn Color", Color) = (1,1,1,1) + } + + SubShader + { + Tags { "RenderType"="Opaque" } + ZWrite On + ZTest LEqual + Blend SrcAlpha OneMinusSrcAlpha + + CGPROGRAM + + #pragma surface surf Lambert + #pragma target 3.0 + + half _Shininess; + + sampler2D _MainTex; + sampler2D _BumpMap; + + float _Opacity; + float _RimFalloff; + float4 _RimColor; + float4 _TemperatureColor; + float4 _BurnColor; + + struct Input + { + float2 uv_MainTex; + float2 uv_BumpMap; + float2 uv_Emissive; + float3 viewDir; + }; + + void surf (Input IN, inout SurfaceOutput o) + { + float4 color = tex2D(_MainTex,(IN.uv_MainTex)) * _BurnColor; + float3 normal = UnpackNormal(tex2D(_BumpMap, IN.uv_BumpMap)); + + half rim = 1.0 - saturate(dot (normalize(IN.viewDir), normal)); + + float3 emission = (_RimColor.rgb * pow(rim, _RimFalloff)) * _RimColor.a; + emission += _TemperatureColor.rgb * _TemperatureColor.a; + + o.Albedo = color.rgb; + o.Emission = emission; + o.Gloss = 0; + o.Specular = 0; + o.Normal = normal; + + o.Emission *= _Opacity; + o.Alpha = _Opacity; + } + ENDCG + } + Fallback "Bumped Diffuse" +} \ No newline at end of file diff --git a/Unity/SCANsat/Assets/SquadCore/Shaders/Bumped.shader.meta b/Unity/SCANsat/Assets/SquadCore/Shaders/Bumped.shader.meta new file mode 100644 index 000000000..894530f80 --- /dev/null +++ b/Unity/SCANsat/Assets/SquadCore/Shaders/Bumped.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: c9da217290ee74a43907fc1205e4c146 +timeCreated: 1447334822 +licenseType: Pro +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/SquadCore/Shaders/BumpedSpecular.shader b/Unity/SCANsat/Assets/SquadCore/Shaders/BumpedSpecular.shader new file mode 100644 index 000000000..41c509928 --- /dev/null +++ b/Unity/SCANsat/Assets/SquadCore/Shaders/BumpedSpecular.shader @@ -0,0 +1,72 @@ +Shader "KSP/Bumped Specular" +{ + Properties + { + _MainTex("_MainTex (RGB spec(A))", 2D) = "white" {} + _BumpMap("_BumpMap", 2D) = "bump" {} + _Color ("Main Color", Color) = (1,1,1,1) + _SpecColor ("Specular Color", Color) = (0.5, 0.5, 0.5, 1) + _Shininess ("Shininess", Range (0.03, 1)) = 0.078125 + + _Opacity("_Opacity", Range(0,1) ) = 1 + _RimFalloff("_RimFalloff", Range(0.01,5) ) = 0.1 + _RimColor("_RimColor", Color) = (0,0,0,0) + + _TemperatureColor("_TemperatureColor", Color) = (0,0,0,0) + _BurnColor ("Burn Color", Color) = (1,1,1,1) + } + + SubShader + { + Tags { "RenderType"="Opaque" } + ZWrite On + ZTest LEqual + Blend SrcAlpha OneMinusSrcAlpha + + CGPROGRAM + + #pragma surface surf BlinnPhong + #pragma target 3.0 + + half _Shininess; + + sampler2D _MainTex; + sampler2D _BumpMap; + + float _Opacity; + float _RimFalloff; + float4 _RimColor; + float4 _TemperatureColor; + float4 _BurnColor; + + struct Input + { + float2 uv_MainTex; + float2 uv_BumpMap; + float2 uv_Emissive; + float3 viewDir; + }; + + void surf (Input IN, inout SurfaceOutput o) + { + float4 color = tex2D(_MainTex,(IN.uv_MainTex)) * _BurnColor; + float3 normal = UnpackNormal(tex2D(_BumpMap, IN.uv_BumpMap)); + + half rim = 1.0 - saturate(dot (normalize(IN.viewDir), normal)); + + float3 emission = (_RimColor.rgb * pow(rim, _RimFalloff)) * _RimColor.a; + emission += _TemperatureColor.rgb * _TemperatureColor.a; + + o.Albedo = color.rgb; + o.Emission = emission; + o.Gloss = color.a; + o.Specular = _Shininess; + o.Normal = normal; + + o.Emission *= _Opacity; + o.Alpha = _Opacity; + } + ENDCG + } + Fallback "Bumped Specular" +} \ No newline at end of file diff --git a/Unity/SCANsat/Assets/SquadCore/Shaders/BumpedSpecular.shader.meta b/Unity/SCANsat/Assets/SquadCore/Shaders/BumpedSpecular.shader.meta new file mode 100644 index 000000000..0d2e751b9 --- /dev/null +++ b/Unity/SCANsat/Assets/SquadCore/Shaders/BumpedSpecular.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: ac859b44038643d40b88f24aceac191c +timeCreated: 1447334821 +licenseType: Pro +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/SquadCore/Shaders/Cutoff.shader b/Unity/SCANsat/Assets/SquadCore/Shaders/Cutoff.shader new file mode 100644 index 000000000..f6233fbf3 --- /dev/null +++ b/Unity/SCANsat/Assets/SquadCore/Shaders/Cutoff.shader @@ -0,0 +1,67 @@ +Shader "KSP/Alpha/Cutoff" +{ + Properties + { + _Color ("Main Color", Color) = (1,1,1,1) + _MainTex("_MainTex (RGB Alpha(A))", 2D) = "white" {} + _Cutoff ("Alpha cutoff", Range(0,1)) = 0.5 + + _RimFalloff("_RimFalloff", Range(0.01,5) ) = 0.1 + _RimColor("_RimColor", Color) = (0,0,0,0) + + _TemperatureColor("_TemperatureColor", Color) = (0,0,0,0) + _BurnColor ("Burn Color", Color) = (1,1,1,1) + } + + SubShader + { + Tags {"Queue"="AlphaTest" "IgnoreProjector"="True" "RenderType"="TransparentCutout"} + ZWrite On + ZTest LEqual + Blend SrcAlpha OneMinusSrcAlpha + AlphaTest GEqual [_Cutoff] + + CGPROGRAM + + #pragma surface surf Lambert alphatest:_Cutoff + #pragma target 3.0 + + sampler2D _MainTex; + sampler2D _BumpMap; + + float _Opacity; + float _RimFalloff; + float4 _RimColor; + float4 _TemperatureColor; + float4 _BurnColor; + + struct Input + { + float2 uv_MainTex; + float2 uv_BumpMap; + float2 uv_Emissive; + float3 viewDir; + }; + + void surf (Input IN, inout SurfaceOutput o) + { + float4 color = tex2D(_MainTex, (IN.uv_MainTex)) * _BurnColor; + float3 normal = float3(0,0,1); + + half rim = 1.0 - saturate(dot (normalize(IN.viewDir), normal)); + + float3 emission = (_RimColor.rgb * pow(rim, _RimFalloff)) * _RimColor.a; + emission += _TemperatureColor.rgb * _TemperatureColor.a; + + o.Albedo = color.rgb; + o.Emission = emission; + o.Gloss = 0; + o.Specular = 0; + o.Normal = normal; + + o.Alpha = color.a; + } + ENDCG + } + Fallback "Transparent/Cutout/VertexLit" +} \ No newline at end of file diff --git a/Unity/SCANsat/Assets/SquadCore/Shaders/Cutoff.shader.meta b/Unity/SCANsat/Assets/SquadCore/Shaders/Cutoff.shader.meta new file mode 100644 index 000000000..b96fb10ca --- /dev/null +++ b/Unity/SCANsat/Assets/SquadCore/Shaders/Cutoff.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: b3b035681f285f740b32cf2bc12a8de6 +timeCreated: 1447334822 +licenseType: Pro +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/SquadCore/Shaders/CutoffBumped.shader b/Unity/SCANsat/Assets/SquadCore/Shaders/CutoffBumped.shader new file mode 100644 index 000000000..d388c3d08 --- /dev/null +++ b/Unity/SCANsat/Assets/SquadCore/Shaders/CutoffBumped.shader @@ -0,0 +1,66 @@ +Shader "KSP/Alpha/Cutoff Bumped" +{ + Properties + { + _MainTex("_MainTex (RGB Alpha(A))", 2D) = "white" {} + _BumpMap("_BumpMap", 2D) = "bump" {} + _Cutoff ("Alpha cutoff", Range(0,1)) = 0.5 + + _RimFalloff("_RimFalloff", Range(0.01,5) ) = 0.1 + _RimColor("_RimColor", Color) = (0,0,0,0) + + _TemperatureColor("_TemperatureColor", Color) = (0,0,0,0) + _BurnColor ("Burn Color", Color) = (1,1,1,1) + } + + SubShader + { + ZWrite On + ZTest LEqual + Blend SrcAlpha OneMinusSrcAlpha + AlphaTest GEqual [_Cutoff] + + CGPROGRAM + + #pragma surface surf Lambert + #pragma target 3.0 + + sampler2D _MainTex; + sampler2D _BumpMap; + + float _Opacity; + float _RimFalloff; + float4 _RimColor; + float4 _TemperatureColor; + float4 _BurnColor; + + struct Input + { + float2 uv_MainTex; + float2 uv_BumpMap; + float2 uv_Emissive; + float3 viewDir; + }; + + void surf (Input IN, inout SurfaceOutput o) + { + float4 color = tex2D(_MainTex, (IN.uv_MainTex)) * _BurnColor; + float3 normal = UnpackNormal(tex2D(_BumpMap, IN.uv_BumpMap)); + + half rim = 1.0 - saturate(dot (normalize(IN.viewDir), normal)); + + float3 emission = (_RimColor.rgb * pow(rim, _RimFalloff)) * _RimColor.a; + emission += _TemperatureColor.rgb * _TemperatureColor.a; + + o.Albedo = color.rgb; + o.Emission = emission; + o.Gloss = 0; + o.Specular = 0; + o.Normal = normal; + + o.Alpha = color.a; + } + ENDCG + } + Fallback "Diffuse" +} \ No newline at end of file diff --git a/Unity/SCANsat/Assets/SquadCore/Shaders/CutoffBumped.shader.meta b/Unity/SCANsat/Assets/SquadCore/Shaders/CutoffBumped.shader.meta new file mode 100644 index 000000000..fc5c9cb5e --- /dev/null +++ b/Unity/SCANsat/Assets/SquadCore/Shaders/CutoffBumped.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: bbe7a2e17e83a9a45bc517140d3ca1a6 +timeCreated: 1447334822 +licenseType: Pro +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/SquadCore/Shaders/Diffuse.shader b/Unity/SCANsat/Assets/SquadCore/Shaders/Diffuse.shader new file mode 100644 index 000000000..8bb3949b9 --- /dev/null +++ b/Unity/SCANsat/Assets/SquadCore/Shaders/Diffuse.shader @@ -0,0 +1,64 @@ +Shader "KSP/Diffuse" +{ + Properties + { + _MainTex("_MainTex (RGB)", 2D) = "white" {} + _Color ("Main Color", Color) = (1,1,1,1) + _Opacity("_Opacity", Range(0,1) ) = 1 + _RimFalloff("_RimFalloff", Range(0.01,5) ) = 0.1 + _RimColor("_RimColor", Color) = (0,0,0,0) + + _TemperatureColor("_TemperatureColor", Color) = (0,0,0,0) + _BurnColor ("Burn Color", Color) = (1,1,1,1) + } + + SubShader + { + Tags { "RenderType"="Opaque" } + ZWrite On + ZTest LEqual + Blend SrcAlpha OneMinusSrcAlpha + + CGPROGRAM + + #pragma surface surf Lambert + #pragma target 3.0 + + sampler2D _MainTex; + + float _Opacity; + float _RimFalloff; + float4 _RimColor; + float4 _TemperatureColor; + float4 _BurnColor; + + struct Input + { + float2 uv_MainTex; + float2 uv_Emissive; + float3 viewDir; + }; + + void surf (Input IN, inout SurfaceOutput o) + { + float4 color = tex2D(_MainTex,(IN.uv_MainTex)) * _BurnColor; + float3 normal = float3(0,0,1); + + half rim = 1.0 - saturate(dot (normalize(IN.viewDir), normal)); + + float3 emission = (_RimColor.rgb * pow(rim, _RimFalloff)) * _RimColor.a; + emission += _TemperatureColor.rgb * _TemperatureColor.a; + + o.Albedo = color.rgb; + o.Emission = emission; + o.Gloss = 0; + o.Specular = 0; + o.Normal = normal; + + o.Emission *= _Opacity; + o.Alpha = _Opacity; + } + ENDCG + } + Fallback "Diffuse" +} \ No newline at end of file diff --git a/Unity/SCANsat/Assets/SquadCore/Shaders/Diffuse.shader.meta b/Unity/SCANsat/Assets/SquadCore/Shaders/Diffuse.shader.meta new file mode 100644 index 000000000..3ebc46e06 --- /dev/null +++ b/Unity/SCANsat/Assets/SquadCore/Shaders/Diffuse.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 4eb23d6a8a22cd2408ed28ac1ce15ed3 +timeCreated: 1447334819 +licenseType: Pro +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/SquadCore/Shaders/Emissive.shader b/Unity/SCANsat/Assets/SquadCore/Shaders/Emissive.shader new file mode 100644 index 000000000..d525c579a --- /dev/null +++ b/Unity/SCANsat/Assets/SquadCore/Shaders/Emissive.shader @@ -0,0 +1,70 @@ +Shader "KSP/Emissive/Diffuse" +{ + Properties + { + _MainTex("_MainTex (RGB)", 2D) = "white" {} + + _EmissiveColor("_EmissiveColor", Color) = (0,0,0,1) + _Emissive("_Emissive", 2D) = "white" {} + + _Opacity("_Opacity", Range(0,1) ) = 1 + _RimFalloff("_RimFalloff", Range(0.01,5) ) = 0.1 + _RimColor("_RimColor", Color) = (0,0,0,0) + + _TemperatureColor("_TemperatureColor", Color) = (0,0,0,0) + _BurnColor ("Burn Color", Color) = (1,1,1,1) + } + + SubShader + { + ZWrite On + ZTest LEqual + Blend SrcAlpha OneMinusSrcAlpha + + CGPROGRAM + + #pragma surface surf Lambert + #pragma target 3.0 + + sampler2D _MainTex; + + float4 _EmissiveColor; + sampler2D _Emissive; + + float _Opacity; + float _RimFalloff; + float4 _RimColor; + float4 _TemperatureColor; + float4 _BurnColor; + + struct Input + { + float2 uv_MainTex; + float2 uv_Emissive; + float3 viewDir; + }; + + void surf (Input IN, inout SurfaceOutput o) + { + float4 color = tex2D(_MainTex,(IN.uv_MainTex)) * _BurnColor; + float3 normal = float3(0,0,1); + + half rim = 1.0 - saturate(dot (normalize(IN.viewDir), normal)); + + float3 emission = (_RimColor.rgb * pow(rim, _RimFalloff)) * _RimColor.a; + emission += _TemperatureColor.rgb * _TemperatureColor.a; + emission += (tex2D(_Emissive, IN.uv_Emissive).rgb * _EmissiveColor.rgb) * _EmissiveColor.a; + + o.Albedo = color.rgb; + o.Emission = emission; + o.Gloss = 0; + o.Specular = 0; + o.Normal = normal; + + o.Emission *= _Opacity; + o.Alpha = _Opacity; + } + ENDCG + } + Fallback "Diffuse" +} \ No newline at end of file diff --git a/Unity/SCANsat/Assets/SquadCore/Shaders/Emissive.shader.meta b/Unity/SCANsat/Assets/SquadCore/Shaders/Emissive.shader.meta new file mode 100644 index 000000000..3dfdb47ba --- /dev/null +++ b/Unity/SCANsat/Assets/SquadCore/Shaders/Emissive.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 59fa1cb2eebf7564ebb45f1250bba1d0 +timeCreated: 1447334820 +licenseType: Pro +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/SquadCore/Shaders/EmissiveBumpedSpecular.shader b/Unity/SCANsat/Assets/SquadCore/Shaders/EmissiveBumpedSpecular.shader new file mode 100644 index 000000000..e86e6c02d --- /dev/null +++ b/Unity/SCANsat/Assets/SquadCore/Shaders/EmissiveBumpedSpecular.shader @@ -0,0 +1,79 @@ +Shader "KSP/Emissive/Bumped Specular" +{ + Properties + { + _MainTex("_MainTex (RGB spec(A))", 2D) = "white" {} + _BumpMap("_BumpMap", 2D) = "bump" {} + _Color ("Main Color", Color) = (1,1,1,1) + _SpecColor ("Specular Color", Color) = (0.5, 0.5, 0.5, 1) + _Shininess ("Shininess", Range (0.03, 1)) = 0.078125 + + _EmissiveColor("_EmissiveColor", Color) = (0,0,0,1) + _Emissive("_Emissive", 2D) = "white" {} + + _Opacity("_Opacity", Range(0,1) ) = 1 + _RimFalloff("_RimFalloff", Range(0.01,5) ) = 0.1 + _RimColor("_RimColor", Color) = (0,0,0,0) + + _TemperatureColor("_TemperatureColor", Color) = (0,0,0,0) + _BurnColor ("Burn Color", Color) = (1,1,1,1) + } + + SubShader + { + Tags { "RenderType"="Opaque" } + ZWrite On + ZTest LEqual + Blend SrcAlpha OneMinusSrcAlpha + + CGPROGRAM + + #pragma surface surf BlinnPhong + #pragma target 3.0 + + half _Shininess; + + sampler2D _MainTex; + sampler2D _BumpMap; + + float4 _EmissiveColor; + sampler2D _Emissive; + + float _Opacity; + float _RimFalloff; + float4 _RimColor; + float4 _TemperatureColor; + float4 _BurnColor; + + struct Input + { + float2 uv_MainTex; + float2 uv_BumpMap; + float2 uv_Emissive; + float3 viewDir; + }; + + void surf (Input IN, inout SurfaceOutput o) + { + float4 color = tex2D(_MainTex,(IN.uv_MainTex)) * _BurnColor; + float3 normal = UnpackNormal(tex2D(_BumpMap, IN.uv_BumpMap)); + + half rim = 1.0 - saturate(dot (normalize(IN.viewDir), normal)); + + float3 emission = (_RimColor.rgb * pow(rim, _RimFalloff)) * _RimColor.a; + emission += _TemperatureColor.rgb * _TemperatureColor.a; + emission += (tex2D(_Emissive, IN.uv_Emissive).rgb * _EmissiveColor.rgb) * _EmissiveColor.a; + + o.Albedo = color.rgb; + o.Emission = emission; + o.Gloss = color.a; + o.Specular = _Shininess; + o.Normal = normal; + + o.Emission *= _Opacity; + o.Alpha = _Opacity; + } + ENDCG + } + Fallback "Self-Illumin/Bumped Specular" +} \ No newline at end of file diff --git a/Unity/SCANsat/Assets/SquadCore/Shaders/EmissiveBumpedSpecular.shader.meta b/Unity/SCANsat/Assets/SquadCore/Shaders/EmissiveBumpedSpecular.shader.meta new file mode 100644 index 000000000..47cc964d9 --- /dev/null +++ b/Unity/SCANsat/Assets/SquadCore/Shaders/EmissiveBumpedSpecular.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 8deb5d99e5582cb4fa66782c19ee43ad +timeCreated: 1447334821 +licenseType: Pro +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/SquadCore/Shaders/EmissiveSpecular.shader b/Unity/SCANsat/Assets/SquadCore/Shaders/EmissiveSpecular.shader new file mode 100644 index 000000000..ce54630b9 --- /dev/null +++ b/Unity/SCANsat/Assets/SquadCore/Shaders/EmissiveSpecular.shader @@ -0,0 +1,76 @@ +Shader "KSP/Emissive/Specular" +{ + Properties + { + _MainTex("_MainTex (RGB spec(A))", 2D) = "white" {} + _Color ("Main Color", Color) = (1,1,1,1) + _SpecColor ("Specular Color", Color) = (0.5, 0.5, 0.5, 1) + _Shininess ("Shininess", Range (0.03, 1)) = 0.078125 + + _EmissiveColor("_EmissiveColor", Color) = (0,0,0,1) + _Emissive("_Emissive", 2D) = "white" {} + + _Opacity("_Opacity", Range(0,1) ) = 1 + _RimFalloff("_RimFalloff", Range(0.01,5) ) = 0.1 + _RimColor("_RimColor", Color) = (0,0,0,0) + + _TemperatureColor("_TemperatureColor", Color) = (0,0,0,0) + _BurnColor ("Burn Color", Color) = (1,1,1,1) + } + + SubShader + { + Tags { "RenderType"="Opaque" } + ZWrite On + ZTest LEqual + Blend SrcAlpha OneMinusSrcAlpha + + CGPROGRAM + + #pragma surface surf BlinnPhong + #pragma target 3.0 + + half _Shininess; + + sampler2D _MainTex; + + float4 _EmissiveColor; + sampler2D _Emissive; + + float _Opacity; + float _RimFalloff; + float4 _RimColor; + float4 _TemperatureColor; + float4 _BurnColor; + + struct Input + { + float2 uv_MainTex; + float2 uv_Emissive; + float3 viewDir; + }; + + void surf (Input IN, inout SurfaceOutput o) + { + float4 color = tex2D(_MainTex,(IN.uv_MainTex)) * _BurnColor; + float3 normal = float3(0,0,1); + + half rim = 1.0 - saturate(dot (normalize(IN.viewDir), normal)); + + float3 emission = (_RimColor.rgb * pow(rim, _RimFalloff)) * _RimColor.a; + emission += _TemperatureColor.rgb * _TemperatureColor.a; + emission += (tex2D(_Emissive, IN.uv_Emissive).rgb * _EmissiveColor.rgb) * _EmissiveColor.a; + + o.Albedo = color.rgb; + o.Emission = emission; + o.Gloss = color.a; + o.Specular = _Shininess; + o.Normal = normal; + + o.Emission *= _Opacity; + o.Alpha = _Opacity; + } + ENDCG + } + Fallback "Self-Illumin/Specular" +} \ No newline at end of file diff --git a/Unity/SCANsat/Assets/SquadCore/Shaders/EmissiveSpecular.shader.meta b/Unity/SCANsat/Assets/SquadCore/Shaders/EmissiveSpecular.shader.meta new file mode 100644 index 000000000..66f143271 --- /dev/null +++ b/Unity/SCANsat/Assets/SquadCore/Shaders/EmissiveSpecular.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 0785b2a0f9690d44dbdf4e24de04ca3e +timeCreated: 1447334818 +licenseType: Pro +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/SquadCore/Shaders/KSPParticle AddSmooth.shader b/Unity/SCANsat/Assets/SquadCore/Shaders/KSPParticle AddSmooth.shader new file mode 100644 index 000000000..f5deb8371 --- /dev/null +++ b/Unity/SCANsat/Assets/SquadCore/Shaders/KSPParticle AddSmooth.shader @@ -0,0 +1,77 @@ +Shader "KSP/Particles/Additive (Soft)" { +Properties { + _MainTex ("Particle Texture", 2D) = "white" {} + _InvFade ("Soft Particles Factor", Range(0.01,3.0)) = 1.0 + _TintColor ("Tint Color", Color) = (0.5,0.5,0.5,0.5) +} + +Category { + Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" } + Blend One OneMinusSrcColor + ColorMask RGB + Cull Off Lighting Off ZWrite Off Fog { Color (0,0,0,0) } + + SubShader { + Pass { + + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_particles + + #include "UnityCG.cginc" + + sampler2D _MainTex; + fixed4 _TintColor; + + struct appdata_t { + float4 vertex : POSITION; + fixed4 color : COLOR; + float2 texcoord : TEXCOORD0; + }; + + struct v2f { + float4 vertex : POSITION; + fixed4 color : COLOR; + float2 texcoord : TEXCOORD0; + #ifdef SOFTPARTICLES_ON + float4 projPos : TEXCOORD1; + #endif + }; + + float4 _MainTex_ST; + + v2f vert (appdata_t v) + { + v2f o; + o.vertex = mul(UNITY_MATRIX_MVP, v.vertex); + #ifdef SOFTPARTICLES_ON + o.projPos = ComputeScreenPos (o.vertex); + COMPUTE_EYEDEPTH(o.projPos.z); + #endif + o.color = v.color; + o.texcoord = TRANSFORM_TEX(v.texcoord,_MainTex); + return o; + } + + sampler2D _CameraDepthTexture; + float _InvFade; + + fixed4 frag (v2f i) : COLOR + { + #ifdef SOFTPARTICLES_ON + float sceneZ = LinearEyeDepth (UNITY_SAMPLE_DEPTH(tex2Dproj(_CameraDepthTexture, UNITY_PROJ_COORD(i.projPos)))); + float partZ = i.projPos.z; + float fade = saturate (_InvFade * (sceneZ-partZ)); + i.color.a *= fade; + #endif + + half4 prev = i.color * tex2D(_MainTex, i.texcoord); + prev.rgb *= prev.a; + return prev * _TintColor; + } + ENDCG + } + } +} +} \ No newline at end of file diff --git a/Unity/SCANsat/Assets/SquadCore/Shaders/KSPParticle AddSmooth.shader.meta b/Unity/SCANsat/Assets/SquadCore/Shaders/KSPParticle AddSmooth.shader.meta new file mode 100644 index 000000000..d812d5dc6 --- /dev/null +++ b/Unity/SCANsat/Assets/SquadCore/Shaders/KSPParticle AddSmooth.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 57cb714d3a5ee604bb1098b92cdce428 +timeCreated: 1447334820 +licenseType: Pro +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/SquadCore/Shaders/ParticleAdd.shader b/Unity/SCANsat/Assets/SquadCore/Shaders/ParticleAdd.shader new file mode 100644 index 000000000..11986bc46 --- /dev/null +++ b/Unity/SCANsat/Assets/SquadCore/Shaders/ParticleAdd.shader @@ -0,0 +1,114 @@ +Shader "KSP/Particles/Additive" +{ + Properties + { + _TintColor ("Tint Color", Color) = (0.5,0.5,0.5,0.5) + _MainTex ("Particle Texture", 2D) = "white" {} + _InvFade ("Soft Particles Factor", Range(0.01,3.0)) = 1.0 + } + + Category + { + Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" } + Blend SrcAlpha One + AlphaTest Greater .01 + ColorMask RGB + Cull Off Lighting Off ZWrite Off Fog { Color (0,0,0,0) } + BindChannels { + Bind "Color", color + Bind "Vertex", vertex + Bind "TexCoord", texcoord + } + + // ---- Fragment program cards + SubShader + { + Pass + { + + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + #pragma fragmentoption ARB_precision_hint_fastest + #pragma multi_compile_particles + + #include "UnityCG.cginc" + + sampler2D _MainTex; + fixed4 _TintColor; + + struct appdata_t + { + float4 vertex : POSITION; + fixed4 color : COLOR; + float2 texcoord : TEXCOORD0; + }; + + struct v2f + { + float4 vertex : POSITION; + fixed4 color : COLOR; + float2 texcoord : TEXCOORD0; + #ifdef SOFTPARTICLES_ON + float4 projPos : TEXCOORD1; + #endif + }; + + float4 _MainTex_ST; + + v2f vert (appdata_t v) + { + v2f o; + o.vertex = mul(UNITY_MATRIX_MVP, v.vertex); + #ifdef SOFTPARTICLES_ON + o.projPos = ComputeScreenPos (o.vertex); + COMPUTE_EYEDEPTH(o.projPos.z); + #endif + o.color = v.color; + o.texcoord = TRANSFORM_TEX(v.texcoord,_MainTex); + return o; + } + + sampler2D _CameraDepthTexture; + float _InvFade; + + fixed4 frag (v2f i) : COLOR + { + #ifdef SOFTPARTICLES_ON + float sceneZ = LinearEyeDepth (UNITY_SAMPLE_DEPTH(tex2Dproj(_CameraDepthTexture, UNITY_PROJ_COORD(i.projPos)))); + float partZ = i.projPos.z; + float fade = saturate (_InvFade * (sceneZ-partZ)); + i.color.a *= fade; + #endif + + return 2.0f * i.color * _TintColor * tex2D(_MainTex, i.texcoord); + } + ENDCG + } + } + + // ---- Dual texture cards + SubShader { + Pass { + SetTexture [_MainTex] { + constantColor [_TintColor] + combine constant * primary + } + SetTexture [_MainTex] { + combine texture * previous DOUBLE + } + } + } + + // ---- Single texture cards (does not do color tint) + SubShader + { + Pass + { + SetTexture [_MainTex] { + combine texture * primary + } + } + } + } +} diff --git a/Unity/SCANsat/Assets/SquadCore/Shaders/ParticleAdd.shader.meta b/Unity/SCANsat/Assets/SquadCore/Shaders/ParticleAdd.shader.meta new file mode 100644 index 000000000..f745a09f1 --- /dev/null +++ b/Unity/SCANsat/Assets/SquadCore/Shaders/ParticleAdd.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: db1d6aee2b6c25c4fbf0e07e9076c6b5 +timeCreated: 1447334822 +licenseType: Pro +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/SquadCore/Shaders/ParticleAlpha.shader b/Unity/SCANsat/Assets/SquadCore/Shaders/ParticleAlpha.shader new file mode 100644 index 000000000..f7e523071 --- /dev/null +++ b/Unity/SCANsat/Assets/SquadCore/Shaders/ParticleAlpha.shader @@ -0,0 +1,117 @@ +Shader "KSP/Particles/Alpha Blended" +{ + Properties + { + _TintColor ("Tint Color", Color) = (0.5,0.5,0.5,0.5) + _MainTex ("Particle Texture", 2D) = "white" {} + _InvFade ("Soft Particles Factor", Range(0.01,3.0)) = 1.0 + } + + Category + { + Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" } + Blend SrcAlpha OneMinusSrcAlpha + AlphaTest Greater .01 + ColorMask RGB + Cull Off Lighting Off ZWrite Off + BindChannels { + Bind "Color", color + Bind "Vertex", vertex + Bind "TexCoord", texcoord + } + + // ---- Fragment program cards + SubShader + { + Pass + { + + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + #pragma fragmentoption ARB_precision_hint_fastest + #pragma multi_compile_particles + + #include "UnityCG.cginc" + + sampler2D _MainTex; + fixed4 _TintColor; + + struct appdata_t { + float4 vertex : POSITION; + fixed4 color : COLOR; + float2 texcoord : TEXCOORD0; + }; + + struct v2f { + float4 vertex : POSITION; + fixed4 color : COLOR; + float2 texcoord : TEXCOORD0; + #ifdef SOFTPARTICLES_ON + float4 projPos : TEXCOORD1; + #endif + }; + + float4 _MainTex_ST; + + v2f vert (appdata_t v) + { + v2f o; + o.vertex = mul(UNITY_MATRIX_MVP, v.vertex); + #ifdef SOFTPARTICLES_ON + o.projPos = ComputeScreenPos (o.vertex); + COMPUTE_EYEDEPTH(o.projPos.z); + #endif + o.color = v.color; + o.texcoord = TRANSFORM_TEX(v.texcoord,_MainTex); + return o; + } + + sampler2D _CameraDepthTexture; + float _InvFade; + + fixed4 frag (v2f i) : COLOR + { + #ifdef SOFTPARTICLES_ON + float sceneZ = LinearEyeDepth (UNITY_SAMPLE_DEPTH(tex2Dproj(_CameraDepthTexture, UNITY_PROJ_COORD(i.projPos)))); + float partZ = i.projPos.z; + float fade = saturate (_InvFade * (sceneZ-partZ)); + i.color.a *= fade; + #endif + + return 2.0f * i.color * _TintColor * tex2D(_MainTex, i.texcoord); + } + ENDCG + } + } + + // ---- Dual texture cards + SubShader + { + Pass + { + SetTexture [_MainTex] + { + constantColor [_TintColor] + combine constant * primary + } + SetTexture [_MainTex] + { + combine texture * previous DOUBLE + } + } + } + + // ---- Single texture cards (does not do color tint) + SubShader + { + Pass + { + SetTexture [_MainTex] + { + combine texture * primary + } + } + } + } +} diff --git a/Unity/SCANsat/Assets/SquadCore/Shaders/ParticleAlpha.shader.meta b/Unity/SCANsat/Assets/SquadCore/Shaders/ParticleAlpha.shader.meta new file mode 100644 index 000000000..96b2acd33 --- /dev/null +++ b/Unity/SCANsat/Assets/SquadCore/Shaders/ParticleAlpha.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: a785e1a01d15b0345ac27359a32c9857 +timeCreated: 1447334821 +licenseType: Pro +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/SquadCore/Shaders/SolidColorAlpha.shader b/Unity/SCANsat/Assets/SquadCore/Shaders/SolidColorAlpha.shader new file mode 100644 index 000000000..95b9dd597 --- /dev/null +++ b/Unity/SCANsat/Assets/SquadCore/Shaders/SolidColorAlpha.shader @@ -0,0 +1,49 @@ +Shader "Solid Color (Alpha)" { + Properties + { + _Color ("Color", Color) = (0.5, 0.5, 0.5, 0.5) + } + SubShader + { + + ZWrite On + GrabPass { } + Pass + { + Fog { Mode Off } + Blend SrcAlpha OneMinusSrcAlpha + + CGPROGRAM + + #pragma vertex vert + #pragma fragment frag + + fixed4 _Color; + sampler2D _GrabTexture; + + struct appdata + { + float4 vertex : POSITION; + }; + struct v2f + { + float4 pos : SV_POSITION; + float4 uv : TEXCOORD0; + }; + v2f vert (appdata v) + { + v2f o; + o.pos = mul(UNITY_MATRIX_MVP, v.vertex); + o.uv = o.pos; + return o; + } + half4 frag(v2f i) : COLOR + { + float2 coord = 0.5 + 0.5 * i.uv.xy / i.uv.w; + fixed4 tex = tex2D(_GrabTexture, float2(coord.x, 1 - coord.y)); + return fixed4(lerp(tex.rgb, _Color.rgb, _Color.a), 1); + } + ENDCG + } + } +} \ No newline at end of file diff --git a/Unity/SCANsat/Assets/SquadCore/Shaders/SolidColorAlpha.shader.meta b/Unity/SCANsat/Assets/SquadCore/Shaders/SolidColorAlpha.shader.meta new file mode 100644 index 000000000..3069e119f --- /dev/null +++ b/Unity/SCANsat/Assets/SquadCore/Shaders/SolidColorAlpha.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 28d4a56e9512d05479c0952c7b2fa008 +timeCreated: 1447334818 +licenseType: Pro +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/SquadCore/Shaders/Specular.shader b/Unity/SCANsat/Assets/SquadCore/Shaders/Specular.shader new file mode 100644 index 000000000..e5ab0a2ed --- /dev/null +++ b/Unity/SCANsat/Assets/SquadCore/Shaders/Specular.shader @@ -0,0 +1,68 @@ +Shader "KSP/Specular" +{ + Properties + { + _MainTex("_MainTex (RGB spec(A))", 2D) = "white" {} + _Color ("Main Color", Color) = (1,1,1,1) + _SpecColor ("Specular Color", Color) = (0.5, 0.5, 0.5, 1) + _Shininess ("Shininess", Range (0.03, 1)) = 0.078125 + + _Opacity("_Opacity", Range(0,1) ) = 1 + _RimFalloff("_RimFalloff", Range(0.01,5) ) = 0.1 + _RimColor("_RimColor", Color) = (0,0,0,0) + + _TemperatureColor("_TemperatureColor", Color) = (0,0,0,0) + _BurnColor ("Burn Color", Color) = (1,1,1,1) + } + + SubShader + { + Tags { "RenderType"="Opaque" } + ZWrite On + ZTest LEqual + Blend SrcAlpha OneMinusSrcAlpha + + CGPROGRAM + + #pragma surface surf BlinnPhong + #pragma target 3.0 + + half _Shininess; + + sampler2D _MainTex; + + float _Opacity; + float _RimFalloff; + float4 _RimColor; + float4 _TemperatureColor; + float4 _BurnColor; + + struct Input + { + float2 uv_MainTex; + float3 viewDir; + }; + + void surf (Input IN, inout SurfaceOutput o) + { + float4 color = tex2D(_MainTex,(IN.uv_MainTex)) * _BurnColor; + float3 normal = float3(0,0,1); + + half rim = 1.0 - saturate(dot (normalize(IN.viewDir), normal)); + + float3 emission = (_RimColor.rgb * pow(rim, _RimFalloff)) * _RimColor.a; + emission += _TemperatureColor.rgb * _TemperatureColor.a; + + o.Albedo = color.rgb; + o.Emission = emission; + o.Gloss = color.a; + o.Specular = _Shininess; + o.Normal = normal; + + o.Emission *= _Opacity; + o.Alpha = _Opacity; + } + ENDCG + } + Fallback "Specular" +} \ No newline at end of file diff --git a/Unity/SCANsat/Assets/SquadCore/Shaders/Specular.shader.meta b/Unity/SCANsat/Assets/SquadCore/Shaders/Specular.shader.meta new file mode 100644 index 000000000..d87c37e0a --- /dev/null +++ b/Unity/SCANsat/Assets/SquadCore/Shaders/Specular.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 440ec76b6cd2107448cec7a61105b099 +timeCreated: 1447334819 +licenseType: Pro +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/SquadCore/Shaders/SpecularBumpTransparent.shader b/Unity/SCANsat/Assets/SquadCore/Shaders/SpecularBumpTransparent.shader new file mode 100644 index 000000000..3257ffd22 --- /dev/null +++ b/Unity/SCANsat/Assets/SquadCore/Shaders/SpecularBumpTransparent.shader @@ -0,0 +1,80 @@ +Shader "KSP/Bumped Specular (Transparent)" +{ + Properties + { + _MainTex("_MainTex (RGB spec(A))", 2D) = "white" {} + _BumpMap("_BumpMap", 2D) = "bump" {} + + _MainColor ("Main Color", Color) = (1,1,1,1) + + _Shininess ("Shininess", Range (0.03, 1)) = 0.078125 + + _Opacity("_Opacity", Range(0,1) ) = 1 + _RimFalloff("_RimFalloff", Range(0.01,5) ) = 0.1 + _RimColor("_RimColor", Color) = (0,0,0,0) + + _TemperatureColor("_TemperatureColor", Color) = (0,0,0,0) + _BurnColor ("Burn Color", Color) = (1,1,1,1) + } + + SubShader + { + Tags {"Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent"} + + Pass + { + ZWrite On + ColorMask 0 + } + + ZWrite On + ZTest LEqual + Blend SrcAlpha OneMinusSrcAlpha + + CGPROGRAM + + #pragma surface surf BlinnPhong + #pragma target 2.0 + + half _Shininess; + + sampler2D _MainTex; + sampler2D _BumpMap; + + float4 _MainColor; + float _Opacity; + float _RimFalloff; + float4 _RimColor; + float4 _TemperatureColor; + float4 _BurnColor; + + struct Input + { + float2 uv_MainTex; + float2 uv_BumpMap; + float2 uv_Emissive; + float3 viewDir; + }; + + void surf (Input IN, inout SurfaceOutput o) + { + float4 color = tex2D(_MainTex,(IN.uv_MainTex)) * _MainColor * _BurnColor; + float3 normal = UnpackNormal(tex2D(_BumpMap, IN.uv_BumpMap)); + + half rim = 1.0 - saturate(dot (normalize(IN.viewDir), normal)); + + float3 emission = (_RimColor.rgb * pow(rim, _RimFalloff)) * _RimColor.a; + emission += _TemperatureColor.rgb * _TemperatureColor.a; + + o.Albedo = color.rgb; + o.Emission = emission; + o.Gloss = color.a; + o.Specular = _Shininess; + o.Normal = normal; + o.Emission *= _Opacity; + o.Alpha = _Opacity; + } + ENDCG + } + Fallback "Bumped Specular" +} \ No newline at end of file diff --git a/Unity/SCANsat/Assets/SquadCore/Shaders/SpecularBumpTransparent.shader.meta b/Unity/SCANsat/Assets/SquadCore/Shaders/SpecularBumpTransparent.shader.meta new file mode 100644 index 000000000..a8b80125c --- /dev/null +++ b/Unity/SCANsat/Assets/SquadCore/Shaders/SpecularBumpTransparent.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: ab0281620a104dd4ca96a6bf906f8011 +timeCreated: 1447334821 +licenseType: Pro +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/SquadCore/Shaders/SpecularTransparent.shader b/Unity/SCANsat/Assets/SquadCore/Shaders/SpecularTransparent.shader new file mode 100644 index 000000000..6bd157b9b --- /dev/null +++ b/Unity/SCANsat/Assets/SquadCore/Shaders/SpecularTransparent.shader @@ -0,0 +1,76 @@ +Shader "KSP/Specular (Transparent)" +{ + Properties + { + _MainTex("_MainTex (RGB spec(A))", 2D) = "white" {} + _MainColor ("Main Color", Color) = (1,1,1,1) + + _Shininess ("Shininess", Range (0.03, 1)) = 0.078125 + + _Opacity("_Opacity", Range(0,1) ) = 1 + _RimFalloff("_RimFalloff", Range(0.01,5) ) = 0.1 + _RimColor("_RimColor", Color) = (0,0,0,0) + + _TemperatureColor("_TemperatureColor", Color) = (0,0,0,0) + _BurnColor ("Burn Color", Color) = (1,1,1,1) + } + + SubShader + { + Tags {"Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent"} + + Pass + { + ZWrite On + ColorMask 0 + } + + ZWrite On + ZTest LEqual + Blend SrcAlpha OneMinusSrcAlpha + + CGPROGRAM + + #pragma surface surf BlinnPhong + #pragma target 2.0 + + half _Shininess; + + sampler2D _MainTex; + + float4 _MainColor; + float _Opacity; + float _RimFalloff; + float4 _RimColor; + float4 _TemperatureColor; + float4 _BurnColor; + + struct Input + { + float2 uv_MainTex; + float3 viewDir; + float3 worldNormal; + }; + + void surf (Input IN, inout SurfaceOutput o) + { + float4 color = tex2D(_MainTex,(IN.uv_MainTex)) * _MainColor * _BurnColor; + + half rim = 1.0 - saturate(dot (normalize(IN.viewDir), IN.worldNormal)); + + float3 emission = (_RimColor.rgb * pow(rim, _RimFalloff)) * _RimColor.a; + emission += _TemperatureColor.rgb * _TemperatureColor.a; + + o.Albedo = color.rgb; + o.Emission = emission; + o.Gloss = color.a; + o.Specular = _Shininess; + + o.Emission *= _Opacity * rim; + o.Alpha = _Opacity; + } + ENDCG + + } + Fallback "Specular" +} \ No newline at end of file diff --git a/Unity/SCANsat/Assets/SquadCore/Shaders/SpecularTransparent.shader.meta b/Unity/SCANsat/Assets/SquadCore/Shaders/SpecularTransparent.shader.meta new file mode 100644 index 000000000..48ef4f030 --- /dev/null +++ b/Unity/SCANsat/Assets/SquadCore/Shaders/SpecularTransparent.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 4270ab78ac4263e4dba328c5b4c6eafb +timeCreated: 1447334819 +licenseType: Pro +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/SquadCore/Shaders/Unlit.shader b/Unity/SCANsat/Assets/SquadCore/Shaders/Unlit.shader new file mode 100644 index 000000000..eae0a18af --- /dev/null +++ b/Unity/SCANsat/Assets/SquadCore/Shaders/Unlit.shader @@ -0,0 +1,84 @@ +Shader "KSP/Unlit" +{ + Properties + { + _MainTex("_MainTex (RGB)", 2D) = "white" {} + _Color("Color", Color) = (1,1,1,1) + + _Opacity("_Opacity", Range(0,1) ) = 1 + _RimFalloff("_RimFalloff", Range(0.01,5) ) = 0.1 + _RimColor("_RimColor", Color) = (0,0,0,0) + + _TemperatureColor("_TemperatureColor", Color) = (0,0,0,0) + _BurnColor ("Burn Color", Color) = (1,1,1,1) + } + + SubShader + { + Tags { "RenderType"="Opaque" } + ZWrite On + ZTest LEqual + Blend SrcAlpha OneMinusSrcAlpha + + CGPROGRAM + + #pragma surface surf Unlit + #pragma target 3.0 + + sampler2D _MainTex; + float4 _Color; + + float _Opacity; + float _RimFalloff; + float4 _RimColor; + float4 _TemperatureColor; + float4 _BurnColor; + + inline half4 LightingUnlit (SurfaceOutput s, half3 lightDir, half atten) + { + half diff = max (0, dot (s.Normal, lightDir)); + + half4 c; + c.rgb = s.Albedo; + c.a = s.Alpha; + return c; + } + + inline half4 LightingUnlit_PrePass (SurfaceOutput s, half4 light) + { + half4 c; + c.rgb = s.Albedo; + c.a = s.Alpha; + return c; + } + + struct Input + { + float2 uv_MainTex; + float2 uv_Emissive; + float3 viewDir; + }; + + void surf (Input IN, inout SurfaceOutput o) + { + float4 color = tex2D(_MainTex,(IN.uv_MainTex)) * _BurnColor; + float3 normal = float3(0,0,1); + + half rim = 1.0 - saturate(dot (normalize(IN.viewDir), normal)); + + float3 emission = (_RimColor.rgb * pow(rim, _RimFalloff)) * _RimColor.a; + emission += _TemperatureColor.rgb * _TemperatureColor.a; + + o.Albedo = _Color.rgb * color.rgb; + o.Emission = emission; + o.Gloss = 0; + o.Specular = 0; + o.Normal = normal; + + o.Emission *= _Opacity; + o.Alpha = _Opacity; + } + ENDCG + } + Fallback "Unlit/Texture" +} \ No newline at end of file diff --git a/Unity/SCANsat/Assets/SquadCore/Shaders/Unlit.shader.meta b/Unity/SCANsat/Assets/SquadCore/Shaders/Unlit.shader.meta new file mode 100644 index 000000000..d9dbfb179 --- /dev/null +++ b/Unity/SCANsat/Assets/SquadCore/Shaders/Unlit.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: ea11f8443dca92f4f816a6cddd06b775 +timeCreated: 1447334823 +licenseType: Pro +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/SquadCore/Shaders/UnlitTransparent.shader b/Unity/SCANsat/Assets/SquadCore/Shaders/UnlitTransparent.shader new file mode 100644 index 000000000..5684a2513 --- /dev/null +++ b/Unity/SCANsat/Assets/SquadCore/Shaders/UnlitTransparent.shader @@ -0,0 +1,79 @@ +Shader "KSP/Alpha/Unlit Transparent" +{ + Properties + { + _MainTex("MainTex (RGB Alpha(A))", 2D) = "white" {} + _Color("Color", Color) = (1,1,1,1) + + _Opacity("_Opacity", Range(0,1) ) = 1 + _RimFalloff("_RimFalloff", Range(0.01,5) ) = 0.1 + _RimColor("_RimColor", Color) = (0,0,0,0) + + _TemperatureColor("_TemperatureColor", Color) = (0,0,0,0) + _BurnColor ("Burn Color", Color) = (1,1,1,1) + } + + SubShader + { + ZWrite On + ZTest LEqual + Blend SrcAlpha OneMinusSrcAlpha + Cull Off + + CGPROGRAM + + #pragma surface surf Unlit alpha + #pragma target 3.0 + + sampler2D _MainTex; + float4 _Color; + + float _Opacity; + float _RimFalloff; + float4 _RimColor; + float4 _TemperatureColor; + float4 _BurnColor; + + inline half4 LightingUnlit (SurfaceOutput s, half3 lightDir, half atten) + { + half diff = max (0, dot (s.Normal, lightDir)); + + half4 c; + c.rgb = s.Albedo; + c.a = s.Alpha; + return c; + } + + inline half4 LightingUnlit_PrePass (SurfaceOutput s, half4 light) + { + half4 c; + c.rgb = s.Albedo; + c.a = s.Alpha; + return c; + } + + struct Input + { + float2 uv_MainTex; + float3 viewDir; + }; + + void surf (Input IN, inout SurfaceOutput o) + { + float4 color = tex2D(_MainTex, (IN.uv_MainTex)) * _BurnColor; + float alpha = _Color.a * color.a; + float3 normal = float3(0,0,1); + + half rim = 1.0 - saturate(dot (normalize(IN.viewDir), normal)); + + float3 emission = (_RimColor.rgb * pow(rim, _RimFalloff)) * _RimColor.a; + emission += _TemperatureColor.rgb * _TemperatureColor.a; + + o.Albedo = _Color.rgb * color.rgb; + o.Emission = emission * _Opacity; + o.Alpha = _Color.a * color.a*_Opacity; + } + ENDCG + } + Fallback "Diffuse" +} \ No newline at end of file diff --git a/Unity/SCANsat/Assets/SquadCore/Shaders/UnlitTransparent.shader.meta b/Unity/SCANsat/Assets/SquadCore/Shaders/UnlitTransparent.shader.meta new file mode 100644 index 000000000..7f9bcb073 --- /dev/null +++ b/Unity/SCANsat/Assets/SquadCore/Shaders/UnlitTransparent.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: e4d5952eef9f9814c8dddd4e0da8347a +timeCreated: 1447334823 +licenseType: Pro +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/Standard Assets.meta b/Unity/SCANsat/Assets/Standard Assets.meta new file mode 100644 index 000000000..a7867ec7a --- /dev/null +++ b/Unity/SCANsat/Assets/Standard Assets.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 49f03ebcdd1c93d46843135a1fd65563 +folderAsset: yes +timeCreated: 1487888458 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/XML.meta b/Unity/SCANsat/Assets/XML.meta new file mode 100644 index 000000000..fe01416aa --- /dev/null +++ b/Unity/SCANsat/Assets/XML.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 87454d73504bed9439b4ffa240a9d330 +folderAsset: yes +timeCreated: 1480699546 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/XML/scan_ghost_bundle.xml b/Unity/SCANsat/Assets/XML/scan_ghost_bundle.xml new file mode 100644 index 000000000..cd075ec25 --- /dev/null +++ b/Unity/SCANsat/Assets/XML/scan_ghost_bundle.xml @@ -0,0 +1,11 @@ + + + + + + + + + unity_ghost + + \ No newline at end of file diff --git a/Unity/SCANsat/Assets/XML/scan_ghost_bundle.xml.meta b/Unity/SCANsat/Assets/XML/scan_ghost_bundle.xml.meta new file mode 100644 index 000000000..6d20179ea --- /dev/null +++ b/Unity/SCANsat/Assets/XML/scan_ghost_bundle.xml.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: bc1ceb5307f483d4c9c418e5277cd78d +timeCreated: 1482253168 +licenseType: Free +TextScriptImporter: + userData: + assetBundleName: scan_ghost + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/XML/scan_icons_bundle.xml b/Unity/SCANsat/Assets/XML/scan_icons_bundle.xml new file mode 100644 index 000000000..a23cbb19b --- /dev/null +++ b/Unity/SCANsat/Assets/XML/scan_icons_bundle.xml @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Unity/SCANsat/Assets/XML/scan_icons_bundle.xml.meta b/Unity/SCANsat/Assets/XML/scan_icons_bundle.xml.meta new file mode 100644 index 000000000..236c32316 --- /dev/null +++ b/Unity/SCANsat/Assets/XML/scan_icons_bundle.xml.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 1eafadcaef8908f47b21a552eea3ba0a +timeCreated: 1488557872 +licenseType: Free +TextScriptImporter: + userData: + assetBundleName: scan_icons + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/XML/scan_images_bundle.xml b/Unity/SCANsat/Assets/XML/scan_images_bundle.xml new file mode 100644 index 000000000..a85fb7565 --- /dev/null +++ b/Unity/SCANsat/Assets/XML/scan_images_bundle.xml @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Unity/SCANsat/Assets/XML/scan_images_bundle.xml.meta b/Unity/SCANsat/Assets/XML/scan_images_bundle.xml.meta new file mode 100644 index 000000000..8eb76c2cd --- /dev/null +++ b/Unity/SCANsat/Assets/XML/scan_images_bundle.xml.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 8352fe9d461613147aeb2950364ed355 +timeCreated: 1482356297 +licenseType: Free +TextScriptImporter: + userData: + assetBundleName: scan_images + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/XML/scan_prefabs_bundle.xml b/Unity/SCANsat/Assets/XML/scan_prefabs_bundle.xml new file mode 100644 index 000000000..9aaf8784a --- /dev/null +++ b/Unity/SCANsat/Assets/XML/scan_prefabs_bundle.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Unity/SCANsat/Assets/XML/scan_prefabs_bundle.xml.meta b/Unity/SCANsat/Assets/XML/scan_prefabs_bundle.xml.meta new file mode 100644 index 000000000..50f6b7fa2 --- /dev/null +++ b/Unity/SCANsat/Assets/XML/scan_prefabs_bundle.xml.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f83e3baaed4ab8049a98bd8348e747af +timeCreated: 1488557874 +licenseType: Free +TextScriptImporter: + userData: + assetBundleName: scan_prefabs + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/XML/scan_shaders_bundle.xml b/Unity/SCANsat/Assets/XML/scan_shaders_bundle.xml new file mode 100644 index 000000000..aeeb6c7b0 --- /dev/null +++ b/Unity/SCANsat/Assets/XML/scan_shaders_bundle.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/Unity/SCANsat/Assets/XML/scan_shaders_bundle.xml.meta b/Unity/SCANsat/Assets/XML/scan_shaders_bundle.xml.meta new file mode 100644 index 000000000..52f7c9fec --- /dev/null +++ b/Unity/SCANsat/Assets/XML/scan_shaders_bundle.xml.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5fae3d6c79b2ded45afef783fb188a38 +timeCreated: 1488228420 +licenseType: Free +TextScriptImporter: + userData: + assetBundleName: scan_shaders + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/XML/scan_unity_skin_bundle.xml b/Unity/SCANsat/Assets/XML/scan_unity_skin_bundle.xml new file mode 100644 index 000000000..3336b43f4 --- /dev/null +++ b/Unity/SCANsat/Assets/XML/scan_unity_skin_bundle.xml @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Unity/SCANsat/Assets/XML/scan_unity_skin_bundle.xml.meta b/Unity/SCANsat/Assets/XML/scan_unity_skin_bundle.xml.meta new file mode 100644 index 000000000..b144edfcd --- /dev/null +++ b/Unity/SCANsat/Assets/XML/scan_unity_skin_bundle.xml.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0bd9c8e55199da2428b5f8ff155b05b4 +timeCreated: 1488557875 +licenseType: Free +TextScriptImporter: + userData: + assetBundleName: scan_unity_skin + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/XML/scansat_prefabs_bundle.xml b/Unity/SCANsat/Assets/XML/scansat_prefabs_bundle.xml new file mode 100644 index 000000000..19db3cfe6 --- /dev/null +++ b/Unity/SCANsat/Assets/XML/scansat_prefabs_bundle.xml @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + scan_images + scan_shaders + + \ No newline at end of file diff --git a/Unity/SCANsat/Assets/XML/scansat_prefabs_bundle.xml.meta b/Unity/SCANsat/Assets/XML/scansat_prefabs_bundle.xml.meta new file mode 100644 index 000000000..f1b6b19e5 --- /dev/null +++ b/Unity/SCANsat/Assets/XML/scansat_prefabs_bundle.xml.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: bb8f470fa9a094644a08f781e391e085 +timeCreated: 1482253169 +licenseType: Free +TextScriptImporter: + userData: + assetBundleName: scansat_prefabs + assetBundleVariant: diff --git a/Unity/SCANsat/Assets/XML/unity_ghost_bundle.xml b/Unity/SCANsat/Assets/XML/unity_ghost_bundle.xml new file mode 100644 index 000000000..752dc899c --- /dev/null +++ b/Unity/SCANsat/Assets/XML/unity_ghost_bundle.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Unity/SCANsat/Assets/XML/unity_ghost_bundle.xml.meta b/Unity/SCANsat/Assets/XML/unity_ghost_bundle.xml.meta new file mode 100644 index 000000000..314d02b3d --- /dev/null +++ b/Unity/SCANsat/Assets/XML/unity_ghost_bundle.xml.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ea47f33e5f86ab044bbc265933a54375 +timeCreated: 1480699546 +licenseType: Free +TextScriptImporter: + userData: + assetBundleName: unity_ghost + assetBundleVariant: diff --git a/Unity/SCANsat/Library/AnnotationManager b/Unity/SCANsat/Library/AnnotationManager new file mode 100644 index 000000000..f94864077 Binary files /dev/null and b/Unity/SCANsat/Library/AnnotationManager differ diff --git a/Unity/SCANsat/Library/AssetImportState b/Unity/SCANsat/Library/AssetImportState new file mode 100644 index 000000000..cfb43eace --- /dev/null +++ b/Unity/SCANsat/Library/AssetImportState @@ -0,0 +1 @@ +5;0;-1 \ No newline at end of file diff --git a/Unity/SCANsat/Library/AssetServerCacheV3 b/Unity/SCANsat/Library/AssetServerCacheV3 new file mode 100644 index 000000000..6b209396c Binary files /dev/null and b/Unity/SCANsat/Library/AssetServerCacheV3 differ diff --git a/Unity/SCANsat/Library/AssetVersioning.db b/Unity/SCANsat/Library/AssetVersioning.db new file mode 100644 index 000000000..2f50a7154 Binary files /dev/null and b/Unity/SCANsat/Library/AssetVersioning.db differ diff --git a/Unity/SCANsat/Library/AtlasCache/93/939ef0eec9f6d219e4da75f64cf854f2 b/Unity/SCANsat/Library/AtlasCache/93/939ef0eec9f6d219e4da75f64cf854f2 new file mode 100644 index 000000000..508065c22 Binary files /dev/null and b/Unity/SCANsat/Library/AtlasCache/93/939ef0eec9f6d219e4da75f64cf854f2 differ diff --git a/Unity/SCANsat/Library/BuildPlayer.prefs b/Unity/SCANsat/Library/BuildPlayer.prefs new file mode 100644 index 000000000..e69de29bb diff --git a/Unity/SCANsat/Library/BuildSettings.asset b/Unity/SCANsat/Library/BuildSettings.asset new file mode 100644 index 000000000..f21c4fc91 Binary files /dev/null and b/Unity/SCANsat/Library/BuildSettings.asset differ diff --git a/Unity/SCANsat/Library/CrashedAssetImports.txt b/Unity/SCANsat/Library/CrashedAssetImports.txt new file mode 100644 index 000000000..e69de29bb diff --git a/Unity/SCANsat/Library/CurrentLayout.dwlt b/Unity/SCANsat/Library/CurrentLayout.dwlt new file mode 100644 index 000000000..106445494 Binary files /dev/null and b/Unity/SCANsat/Library/CurrentLayout.dwlt differ diff --git a/Unity/SCANsat/Library/EditorUserBuildSettings.asset b/Unity/SCANsat/Library/EditorUserBuildSettings.asset new file mode 100644 index 000000000..823ff3a35 Binary files /dev/null and b/Unity/SCANsat/Library/EditorUserBuildSettings.asset differ diff --git a/Unity/SCANsat/Library/EditorUserSettings.asset b/Unity/SCANsat/Library/EditorUserSettings.asset new file mode 100644 index 000000000..e461addc8 Binary files /dev/null and b/Unity/SCANsat/Library/EditorUserSettings.asset differ diff --git a/Unity/SCANsat/Library/InspectorExpandedItems.asset b/Unity/SCANsat/Library/InspectorExpandedItems.asset new file mode 100644 index 000000000..3d93b7118 Binary files /dev/null and b/Unity/SCANsat/Library/InspectorExpandedItems.asset differ diff --git a/Unity/SCANsat/Library/LibraryFormatVersion.txt b/Unity/SCANsat/Library/LibraryFormatVersion.txt new file mode 100644 index 000000000..6185f096e --- /dev/null +++ b/Unity/SCANsat/Library/LibraryFormatVersion.txt @@ -0,0 +1,2 @@ +unityRebuildLibraryVersion: 11 +unityForwardCompatibleVersion: 40 diff --git a/Unity/SCANsat/Library/MonoManager.asset b/Unity/SCANsat/Library/MonoManager.asset new file mode 100644 index 000000000..da5255485 Binary files /dev/null and b/Unity/SCANsat/Library/MonoManager.asset differ diff --git a/Unity/SCANsat/Library/ProjectSettings.asset b/Unity/SCANsat/Library/ProjectSettings.asset new file mode 100644 index 000000000..d4e334f01 Binary files /dev/null and b/Unity/SCANsat/Library/ProjectSettings.asset differ diff --git a/Unity/SCANsat/Library/ScriptAssemblies/BuiltinAssemblies.stamp b/Unity/SCANsat/Library/ScriptAssemblies/BuiltinAssemblies.stamp new file mode 100644 index 000000000..5200d73df --- /dev/null +++ b/Unity/SCANsat/Library/ScriptAssemblies/BuiltinAssemblies.stamp @@ -0,0 +1,2 @@ +0000.566b98bc.0000 +0000.566b98e2.0000 \ No newline at end of file diff --git a/Unity/SCANsat/Library/ScriptMapper b/Unity/SCANsat/Library/ScriptMapper new file mode 100644 index 000000000..47291eba8 Binary files /dev/null and b/Unity/SCANsat/Library/ScriptMapper differ diff --git a/Unity/SCANsat/Library/ShaderCache.db b/Unity/SCANsat/Library/ShaderCache.db new file mode 100644 index 000000000..394119940 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache.db differ diff --git a/Unity/SCANsat/Library/ShaderCache/0/018fc8d5706ea605d3f5ab3240fd80ed.bin b/Unity/SCANsat/Library/ShaderCache/0/018fc8d5706ea605d3f5ab3240fd80ed.bin new file mode 100644 index 000000000..fc18bb5c0 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/0/018fc8d5706ea605d3f5ab3240fd80ed.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/0/01f245a17e13a8b1528cbcb46445327e.bin b/Unity/SCANsat/Library/ShaderCache/0/01f245a17e13a8b1528cbcb46445327e.bin new file mode 100644 index 000000000..634d0f63f Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/0/01f245a17e13a8b1528cbcb46445327e.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/0/026613a0c20af4a53b2dc03072e3bcee.bin b/Unity/SCANsat/Library/ShaderCache/0/026613a0c20af4a53b2dc03072e3bcee.bin new file mode 100644 index 000000000..263149186 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/0/026613a0c20af4a53b2dc03072e3bcee.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/0/049cab3991409ac04fc4675e93401d9b.bin b/Unity/SCANsat/Library/ShaderCache/0/049cab3991409ac04fc4675e93401d9b.bin new file mode 100644 index 000000000..5d9e99282 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/0/049cab3991409ac04fc4675e93401d9b.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/0/0621d933a7db34e82e71296aa1bae846.bin b/Unity/SCANsat/Library/ShaderCache/0/0621d933a7db34e82e71296aa1bae846.bin new file mode 100644 index 000000000..b22b84197 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/0/0621d933a7db34e82e71296aa1bae846.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/0/0626a8081055e78b5d9f51aa97255630.bin b/Unity/SCANsat/Library/ShaderCache/0/0626a8081055e78b5d9f51aa97255630.bin new file mode 100644 index 000000000..98b245ad2 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/0/0626a8081055e78b5d9f51aa97255630.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/0/06ad4056a4961faef96b3c8b433f24c0.bin b/Unity/SCANsat/Library/ShaderCache/0/06ad4056a4961faef96b3c8b433f24c0.bin new file mode 100644 index 000000000..46f8066b6 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/0/06ad4056a4961faef96b3c8b433f24c0.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/0/0771089a305e34efd58d5ef0b1388875.bin b/Unity/SCANsat/Library/ShaderCache/0/0771089a305e34efd58d5ef0b1388875.bin new file mode 100644 index 000000000..170fd5f14 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/0/0771089a305e34efd58d5ef0b1388875.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/0/07d51b6c79753322a643b2a835bccbce.bin b/Unity/SCANsat/Library/ShaderCache/0/07d51b6c79753322a643b2a835bccbce.bin new file mode 100644 index 000000000..b23e2d929 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/0/07d51b6c79753322a643b2a835bccbce.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/0/084f506e5134dc51dd5196741bee6d11.bin b/Unity/SCANsat/Library/ShaderCache/0/084f506e5134dc51dd5196741bee6d11.bin new file mode 100644 index 000000000..ebabda3ef Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/0/084f506e5134dc51dd5196741bee6d11.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/0/08850de9763354b21ed15c0702834e09.bin b/Unity/SCANsat/Library/ShaderCache/0/08850de9763354b21ed15c0702834e09.bin new file mode 100644 index 000000000..f376ba38f Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/0/08850de9763354b21ed15c0702834e09.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/0/090f1fc3bbaaf2f0ba4ad8df257752cc.bin b/Unity/SCANsat/Library/ShaderCache/0/090f1fc3bbaaf2f0ba4ad8df257752cc.bin new file mode 100644 index 000000000..e321c34c7 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/0/090f1fc3bbaaf2f0ba4ad8df257752cc.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/0/09311921814ae3b4effc153ac944b5ab.bin b/Unity/SCANsat/Library/ShaderCache/0/09311921814ae3b4effc153ac944b5ab.bin new file mode 100644 index 000000000..e3f608cc3 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/0/09311921814ae3b4effc153ac944b5ab.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/0/0945aa205beb714eb94027157a4efab4.bin b/Unity/SCANsat/Library/ShaderCache/0/0945aa205beb714eb94027157a4efab4.bin new file mode 100644 index 000000000..f75ea671e Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/0/0945aa205beb714eb94027157a4efab4.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/0/09f9ce97c4efd90ee9f91082326412bf.bin b/Unity/SCANsat/Library/ShaderCache/0/09f9ce97c4efd90ee9f91082326412bf.bin new file mode 100644 index 000000000..8060530b4 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/0/09f9ce97c4efd90ee9f91082326412bf.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/0/09fc259e880b1817f67027deb2dc83ba.bin b/Unity/SCANsat/Library/ShaderCache/0/09fc259e880b1817f67027deb2dc83ba.bin new file mode 100644 index 000000000..15affa969 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/0/09fc259e880b1817f67027deb2dc83ba.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/0/0a0a24a17970415438ecacdc5e5d3227.bin b/Unity/SCANsat/Library/ShaderCache/0/0a0a24a17970415438ecacdc5e5d3227.bin new file mode 100644 index 000000000..bc2bd0c70 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/0/0a0a24a17970415438ecacdc5e5d3227.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/0/0a0a2b1b836abb427e8b143862025e92.bin b/Unity/SCANsat/Library/ShaderCache/0/0a0a2b1b836abb427e8b143862025e92.bin new file mode 100644 index 000000000..873394db9 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/0/0a0a2b1b836abb427e8b143862025e92.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/0/0a5a2e25a303849c630bbe0fea732825.bin b/Unity/SCANsat/Library/ShaderCache/0/0a5a2e25a303849c630bbe0fea732825.bin new file mode 100644 index 000000000..9e3cee572 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/0/0a5a2e25a303849c630bbe0fea732825.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/0/0a98ffce80e37627587c154eea3a1353.bin b/Unity/SCANsat/Library/ShaderCache/0/0a98ffce80e37627587c154eea3a1353.bin new file mode 100644 index 000000000..21d8674d1 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/0/0a98ffce80e37627587c154eea3a1353.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/0/0bb3cc03c08f4de859288a6906746050.bin b/Unity/SCANsat/Library/ShaderCache/0/0bb3cc03c08f4de859288a6906746050.bin new file mode 100644 index 000000000..8dee29828 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/0/0bb3cc03c08f4de859288a6906746050.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/0/0c41fadc255482b620e51e916119baa8.bin b/Unity/SCANsat/Library/ShaderCache/0/0c41fadc255482b620e51e916119baa8.bin new file mode 100644 index 000000000..388197f72 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/0/0c41fadc255482b620e51e916119baa8.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/0/0f17effe2e3927493b66d0701a49bae9.bin b/Unity/SCANsat/Library/ShaderCache/0/0f17effe2e3927493b66d0701a49bae9.bin new file mode 100644 index 000000000..92bd18193 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/0/0f17effe2e3927493b66d0701a49bae9.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/0/0f885013280e9dad30bf2507fe2a64b9.bin b/Unity/SCANsat/Library/ShaderCache/0/0f885013280e9dad30bf2507fe2a64b9.bin new file mode 100644 index 000000000..5db674ef7 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/0/0f885013280e9dad30bf2507fe2a64b9.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/1/106ce9c03b57af01b9dba42ea9d4cace.bin b/Unity/SCANsat/Library/ShaderCache/1/106ce9c03b57af01b9dba42ea9d4cace.bin new file mode 100644 index 000000000..18ffdb879 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/1/106ce9c03b57af01b9dba42ea9d4cace.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/1/119bfac6b83e47dda31878de823ee206.bin b/Unity/SCANsat/Library/ShaderCache/1/119bfac6b83e47dda31878de823ee206.bin new file mode 100644 index 000000000..c3d4f65ef Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/1/119bfac6b83e47dda31878de823ee206.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/1/11e06f5e5f6cc797d1052bda2f0ee2c4.bin b/Unity/SCANsat/Library/ShaderCache/1/11e06f5e5f6cc797d1052bda2f0ee2c4.bin new file mode 100644 index 000000000..263149186 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/1/11e06f5e5f6cc797d1052bda2f0ee2c4.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/1/122916082e9a3159ef1609c2738798c3.bin b/Unity/SCANsat/Library/ShaderCache/1/122916082e9a3159ef1609c2738798c3.bin new file mode 100644 index 000000000..b7f80f093 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/1/122916082e9a3159ef1609c2738798c3.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/1/1255c58029934f5bd5364ed47b543438.bin b/Unity/SCANsat/Library/ShaderCache/1/1255c58029934f5bd5364ed47b543438.bin new file mode 100644 index 000000000..d218ecb41 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/1/1255c58029934f5bd5364ed47b543438.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/1/128205913f1c411df6d3470638250ba4.bin b/Unity/SCANsat/Library/ShaderCache/1/128205913f1c411df6d3470638250ba4.bin new file mode 100644 index 000000000..94393048a Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/1/128205913f1c411df6d3470638250ba4.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/1/12da9953d2bb6afbe48bf72bd0390f67.bin b/Unity/SCANsat/Library/ShaderCache/1/12da9953d2bb6afbe48bf72bd0390f67.bin new file mode 100644 index 000000000..48c52f534 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/1/12da9953d2bb6afbe48bf72bd0390f67.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/1/12eda5631fb4bf8a6eb5fec102383e34.bin b/Unity/SCANsat/Library/ShaderCache/1/12eda5631fb4bf8a6eb5fec102383e34.bin new file mode 100644 index 000000000..53b5d089a Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/1/12eda5631fb4bf8a6eb5fec102383e34.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/1/133d1d3e9b38a610877b4ee17f5c00e3.bin b/Unity/SCANsat/Library/ShaderCache/1/133d1d3e9b38a610877b4ee17f5c00e3.bin new file mode 100644 index 000000000..8d4064b9b Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/1/133d1d3e9b38a610877b4ee17f5c00e3.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/1/13aa07065e95b9070a76f9c5b503418e.bin b/Unity/SCANsat/Library/ShaderCache/1/13aa07065e95b9070a76f9c5b503418e.bin new file mode 100644 index 000000000..9e3cee572 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/1/13aa07065e95b9070a76f9c5b503418e.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/1/13ebffbaae3177a8ff9e1a1d72a6ddeb.bin b/Unity/SCANsat/Library/ShaderCache/1/13ebffbaae3177a8ff9e1a1d72a6ddeb.bin new file mode 100644 index 000000000..f8a326c04 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/1/13ebffbaae3177a8ff9e1a1d72a6ddeb.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/1/14e446fbef5c7d9fdc3218acc080d7dc.bin b/Unity/SCANsat/Library/ShaderCache/1/14e446fbef5c7d9fdc3218acc080d7dc.bin new file mode 100644 index 000000000..baf29bee0 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/1/14e446fbef5c7d9fdc3218acc080d7dc.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/1/16d98b93316950af7df5457d5d40ecd6.bin b/Unity/SCANsat/Library/ShaderCache/1/16d98b93316950af7df5457d5d40ecd6.bin new file mode 100644 index 000000000..ca034c2d4 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/1/16d98b93316950af7df5457d5d40ecd6.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/1/16e9bbfd1a8e3505b0d4177821237b7d.bin b/Unity/SCANsat/Library/ShaderCache/1/16e9bbfd1a8e3505b0d4177821237b7d.bin new file mode 100644 index 000000000..b64b921c7 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/1/16e9bbfd1a8e3505b0d4177821237b7d.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/1/16ef15e3039a2ddbe1e248c1e3a31012.bin b/Unity/SCANsat/Library/ShaderCache/1/16ef15e3039a2ddbe1e248c1e3a31012.bin new file mode 100644 index 000000000..c36f359d5 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/1/16ef15e3039a2ddbe1e248c1e3a31012.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/1/1774bcb06bb9f5c0c36eff54d7f1232a.bin b/Unity/SCANsat/Library/ShaderCache/1/1774bcb06bb9f5c0c36eff54d7f1232a.bin new file mode 100644 index 000000000..cda1ff6fa Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/1/1774bcb06bb9f5c0c36eff54d7f1232a.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/1/17992dcf0a0e67c3ba1a9a16f90e14df.bin b/Unity/SCANsat/Library/ShaderCache/1/17992dcf0a0e67c3ba1a9a16f90e14df.bin new file mode 100644 index 000000000..2974b23fa Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/1/17992dcf0a0e67c3ba1a9a16f90e14df.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/1/1835216720e982694973083acf579d9b.bin b/Unity/SCANsat/Library/ShaderCache/1/1835216720e982694973083acf579d9b.bin new file mode 100644 index 000000000..82e3cb862 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/1/1835216720e982694973083acf579d9b.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/1/18ef3ebe7e79c610156d236d15ada00b.bin b/Unity/SCANsat/Library/ShaderCache/1/18ef3ebe7e79c610156d236d15ada00b.bin new file mode 100644 index 000000000..8b27b9526 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/1/18ef3ebe7e79c610156d236d15ada00b.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/1/199ee8550a4b85f41f500c81ac284768.bin b/Unity/SCANsat/Library/ShaderCache/1/199ee8550a4b85f41f500c81ac284768.bin new file mode 100644 index 000000000..b5f9bd2fb Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/1/199ee8550a4b85f41f500c81ac284768.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/1/19ad910b5ac8ebfa77a8d0e1effee09f.bin b/Unity/SCANsat/Library/ShaderCache/1/19ad910b5ac8ebfa77a8d0e1effee09f.bin new file mode 100644 index 000000000..88959969c Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/1/19ad910b5ac8ebfa77a8d0e1effee09f.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/1/1a6b5356ed3e44a066f9def4e7cb16dc.bin b/Unity/SCANsat/Library/ShaderCache/1/1a6b5356ed3e44a066f9def4e7cb16dc.bin new file mode 100644 index 000000000..4f8538ccf Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/1/1a6b5356ed3e44a066f9def4e7cb16dc.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/1/1a9707fccc24f5b1332ed1179153fc8f.bin b/Unity/SCANsat/Library/ShaderCache/1/1a9707fccc24f5b1332ed1179153fc8f.bin new file mode 100644 index 000000000..3cba64563 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/1/1a9707fccc24f5b1332ed1179153fc8f.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/1/1b2d07fc453639b9d4683782ca87f87d.bin b/Unity/SCANsat/Library/ShaderCache/1/1b2d07fc453639b9d4683782ca87f87d.bin new file mode 100644 index 000000000..0c2e017dc Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/1/1b2d07fc453639b9d4683782ca87f87d.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/1/1b81e1cbc7fd760c46ddb60c29c297e8.bin b/Unity/SCANsat/Library/ShaderCache/1/1b81e1cbc7fd760c46ddb60c29c297e8.bin new file mode 100644 index 000000000..2cff1a1e4 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/1/1b81e1cbc7fd760c46ddb60c29c297e8.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/1/1eafa8611b6089e5de702e548a5627fb.bin b/Unity/SCANsat/Library/ShaderCache/1/1eafa8611b6089e5de702e548a5627fb.bin new file mode 100644 index 000000000..b80f1ee18 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/1/1eafa8611b6089e5de702e548a5627fb.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/1/1ef63d333ec8690212cf4cb9ee8c0f27.bin b/Unity/SCANsat/Library/ShaderCache/1/1ef63d333ec8690212cf4cb9ee8c0f27.bin new file mode 100644 index 000000000..6dbb7a005 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/1/1ef63d333ec8690212cf4cb9ee8c0f27.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/1/1f5a3a49d2b4cfcb7a67a6357572f4bd.bin b/Unity/SCANsat/Library/ShaderCache/1/1f5a3a49d2b4cfcb7a67a6357572f4bd.bin new file mode 100644 index 000000000..8ec5f5ddb Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/1/1f5a3a49d2b4cfcb7a67a6357572f4bd.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/2/215ed5b21874c6431889bc98fe950d60.bin b/Unity/SCANsat/Library/ShaderCache/2/215ed5b21874c6431889bc98fe950d60.bin new file mode 100644 index 000000000..0e5cc48bc Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/2/215ed5b21874c6431889bc98fe950d60.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/2/21af372db8e9897647cefa242055f820.bin b/Unity/SCANsat/Library/ShaderCache/2/21af372db8e9897647cefa242055f820.bin new file mode 100644 index 000000000..51c744631 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/2/21af372db8e9897647cefa242055f820.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/2/22f902516e5baa7ef606febbba235f61.bin b/Unity/SCANsat/Library/ShaderCache/2/22f902516e5baa7ef606febbba235f61.bin new file mode 100644 index 000000000..d92efa741 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/2/22f902516e5baa7ef606febbba235f61.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/2/2331c9b507ea5c4a7a687956e64a105d.bin b/Unity/SCANsat/Library/ShaderCache/2/2331c9b507ea5c4a7a687956e64a105d.bin new file mode 100644 index 000000000..bfbe317ee Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/2/2331c9b507ea5c4a7a687956e64a105d.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/2/236723815e19256a0700e470a04f8dbd.bin b/Unity/SCANsat/Library/ShaderCache/2/236723815e19256a0700e470a04f8dbd.bin new file mode 100644 index 000000000..1d7753a5e Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/2/236723815e19256a0700e470a04f8dbd.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/2/239ee37b97428aea2ea3f6e085be3118.bin b/Unity/SCANsat/Library/ShaderCache/2/239ee37b97428aea2ea3f6e085be3118.bin new file mode 100644 index 000000000..820a0ef4c Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/2/239ee37b97428aea2ea3f6e085be3118.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/2/23c4d69af478f52ac4c81ebb6ad3ac05.bin b/Unity/SCANsat/Library/ShaderCache/2/23c4d69af478f52ac4c81ebb6ad3ac05.bin new file mode 100644 index 000000000..3c98032f9 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/2/23c4d69af478f52ac4c81ebb6ad3ac05.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/2/241f1bb45fa25d6f1045bd7d609d8a31.bin b/Unity/SCANsat/Library/ShaderCache/2/241f1bb45fa25d6f1045bd7d609d8a31.bin new file mode 100644 index 000000000..9758c0021 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/2/241f1bb45fa25d6f1045bd7d609d8a31.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/2/253385188f64993be82a46299d9505d2.bin b/Unity/SCANsat/Library/ShaderCache/2/253385188f64993be82a46299d9505d2.bin new file mode 100644 index 000000000..2518d79a8 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/2/253385188f64993be82a46299d9505d2.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/2/256c92cbe25c9af2ee68e366b8d7254c.bin b/Unity/SCANsat/Library/ShaderCache/2/256c92cbe25c9af2ee68e366b8d7254c.bin new file mode 100644 index 000000000..e321c34c7 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/2/256c92cbe25c9af2ee68e366b8d7254c.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/2/257d4f651255462e10a7f54e90e9324f.bin b/Unity/SCANsat/Library/ShaderCache/2/257d4f651255462e10a7f54e90e9324f.bin new file mode 100644 index 000000000..4df457056 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/2/257d4f651255462e10a7f54e90e9324f.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/2/2736aa6ddb268ead521303e9e1651bf5.bin b/Unity/SCANsat/Library/ShaderCache/2/2736aa6ddb268ead521303e9e1651bf5.bin new file mode 100644 index 000000000..5107bd7d6 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/2/2736aa6ddb268ead521303e9e1651bf5.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/2/27e87b9015cef5113f52051183736f2e.bin b/Unity/SCANsat/Library/ShaderCache/2/27e87b9015cef5113f52051183736f2e.bin new file mode 100644 index 000000000..c0f3d1f71 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/2/27e87b9015cef5113f52051183736f2e.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/2/28fa1db7ed0d15cb36a5e8a40cc845a6.bin b/Unity/SCANsat/Library/ShaderCache/2/28fa1db7ed0d15cb36a5e8a40cc845a6.bin new file mode 100644 index 000000000..4fdc3f96c Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/2/28fa1db7ed0d15cb36a5e8a40cc845a6.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/2/2a772e24730cfd2250da88b883427c17.bin b/Unity/SCANsat/Library/ShaderCache/2/2a772e24730cfd2250da88b883427c17.bin new file mode 100644 index 000000000..8a1c38148 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/2/2a772e24730cfd2250da88b883427c17.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/2/2b1868021324fcb68d1bb0158c3c4b01.bin b/Unity/SCANsat/Library/ShaderCache/2/2b1868021324fcb68d1bb0158c3c4b01.bin new file mode 100644 index 000000000..1911140ad Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/2/2b1868021324fcb68d1bb0158c3c4b01.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/2/2bf1914548b9b3b5bff0137ab9d53773.bin b/Unity/SCANsat/Library/ShaderCache/2/2bf1914548b9b3b5bff0137ab9d53773.bin new file mode 100644 index 000000000..3b8e1264a Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/2/2bf1914548b9b3b5bff0137ab9d53773.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/2/2c760e52fad4ccda1995fc1a52a643c2.bin b/Unity/SCANsat/Library/ShaderCache/2/2c760e52fad4ccda1995fc1a52a643c2.bin new file mode 100644 index 000000000..c2763680c Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/2/2c760e52fad4ccda1995fc1a52a643c2.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/2/2dc286491531ceb8cff8a3bbf21b14db.bin b/Unity/SCANsat/Library/ShaderCache/2/2dc286491531ceb8cff8a3bbf21b14db.bin new file mode 100644 index 000000000..3724fd539 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/2/2dc286491531ceb8cff8a3bbf21b14db.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/2/2dc3cb4864b0dac9b4ddf8f91a63b74b.bin b/Unity/SCANsat/Library/ShaderCache/2/2dc3cb4864b0dac9b4ddf8f91a63b74b.bin new file mode 100644 index 000000000..c36f359d5 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/2/2dc3cb4864b0dac9b4ddf8f91a63b74b.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/2/2ddd15363b99cbe6ab4a5835c548e77d.bin b/Unity/SCANsat/Library/ShaderCache/2/2ddd15363b99cbe6ab4a5835c548e77d.bin new file mode 100644 index 000000000..070e4b6d7 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/2/2ddd15363b99cbe6ab4a5835c548e77d.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/2/2df0ab91e6f4bc1765b52f8c08d89fd1.bin b/Unity/SCANsat/Library/ShaderCache/2/2df0ab91e6f4bc1765b52f8c08d89fd1.bin new file mode 100644 index 000000000..1d7753a5e Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/2/2df0ab91e6f4bc1765b52f8c08d89fd1.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/3/30246a4f8a8f72ed1cd1ed66f6cfd144.bin b/Unity/SCANsat/Library/ShaderCache/3/30246a4f8a8f72ed1cd1ed66f6cfd144.bin new file mode 100644 index 000000000..98b27a5df Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/3/30246a4f8a8f72ed1cd1ed66f6cfd144.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/3/319b57988ef6e821200e8869db00bfda.bin b/Unity/SCANsat/Library/ShaderCache/3/319b57988ef6e821200e8869db00bfda.bin new file mode 100644 index 000000000..04ac7a7f4 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/3/319b57988ef6e821200e8869db00bfda.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/3/31a7df3fbcc89efeee2f05c254323584.bin b/Unity/SCANsat/Library/ShaderCache/3/31a7df3fbcc89efeee2f05c254323584.bin new file mode 100644 index 000000000..88959969c Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/3/31a7df3fbcc89efeee2f05c254323584.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/3/35c5a1b08371aa222031bd7961656e43.bin b/Unity/SCANsat/Library/ShaderCache/3/35c5a1b08371aa222031bd7961656e43.bin new file mode 100644 index 000000000..c60743d66 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/3/35c5a1b08371aa222031bd7961656e43.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/3/362dd3cae7f937ce067b297c9e1d04ca.bin b/Unity/SCANsat/Library/ShaderCache/3/362dd3cae7f937ce067b297c9e1d04ca.bin new file mode 100644 index 000000000..0ba79f442 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/3/362dd3cae7f937ce067b297c9e1d04ca.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/3/3658dca3bf6674a94217d9bb106b56c0.bin b/Unity/SCANsat/Library/ShaderCache/3/3658dca3bf6674a94217d9bb106b56c0.bin new file mode 100644 index 000000000..3ebf444f5 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/3/3658dca3bf6674a94217d9bb106b56c0.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/3/36de33eb59d0536eba6f66da32c033fe.bin b/Unity/SCANsat/Library/ShaderCache/3/36de33eb59d0536eba6f66da32c033fe.bin new file mode 100644 index 000000000..ea5e0ffd1 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/3/36de33eb59d0536eba6f66da32c033fe.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/3/3766b6c652b94777ae22da6592c37587.bin b/Unity/SCANsat/Library/ShaderCache/3/3766b6c652b94777ae22da6592c37587.bin new file mode 100644 index 000000000..f86f1ea08 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/3/3766b6c652b94777ae22da6592c37587.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/3/37c60ca8d1b6874dcd90954a1daa3b65.bin b/Unity/SCANsat/Library/ShaderCache/3/37c60ca8d1b6874dcd90954a1daa3b65.bin new file mode 100644 index 000000000..c2dd89ac1 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/3/37c60ca8d1b6874dcd90954a1daa3b65.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/3/3880483c8fbf3bf0adaef80778bb7c42.bin b/Unity/SCANsat/Library/ShaderCache/3/3880483c8fbf3bf0adaef80778bb7c42.bin new file mode 100644 index 000000000..53b5d089a Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/3/3880483c8fbf3bf0adaef80778bb7c42.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/3/3a1a0e579d50dc572541e3633ec15129.bin b/Unity/SCANsat/Library/ShaderCache/3/3a1a0e579d50dc572541e3633ec15129.bin new file mode 100644 index 000000000..2cff1a1e4 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/3/3a1a0e579d50dc572541e3633ec15129.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/3/3a7828a40ad90295bd4444ab92cf8dac.bin b/Unity/SCANsat/Library/ShaderCache/3/3a7828a40ad90295bd4444ab92cf8dac.bin new file mode 100644 index 000000000..f8a326c04 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/3/3a7828a40ad90295bd4444ab92cf8dac.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/3/3a9d26e25d1f288c6a189d20ccf0c7ae.bin b/Unity/SCANsat/Library/ShaderCache/3/3a9d26e25d1f288c6a189d20ccf0c7ae.bin new file mode 100644 index 000000000..bc2bd0c70 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/3/3a9d26e25d1f288c6a189d20ccf0c7ae.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/3/3aa3d54256541c20dd38f64e820a33ad.bin b/Unity/SCANsat/Library/ShaderCache/3/3aa3d54256541c20dd38f64e820a33ad.bin new file mode 100644 index 000000000..c06a4ea31 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/3/3aa3d54256541c20dd38f64e820a33ad.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/3/3abc42ea8dbc5a3745325d2c475ffb29.bin b/Unity/SCANsat/Library/ShaderCache/3/3abc42ea8dbc5a3745325d2c475ffb29.bin new file mode 100644 index 000000000..6c608975b Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/3/3abc42ea8dbc5a3745325d2c475ffb29.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/3/3b18509ec1fad2555340e2e72bd2bf42.bin b/Unity/SCANsat/Library/ShaderCache/3/3b18509ec1fad2555340e2e72bd2bf42.bin new file mode 100644 index 000000000..873394db9 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/3/3b18509ec1fad2555340e2e72bd2bf42.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/3/3b51b6c2625e8ecda1a1852687048c37.bin b/Unity/SCANsat/Library/ShaderCache/3/3b51b6c2625e8ecda1a1852687048c37.bin new file mode 100644 index 000000000..375ccfdef Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/3/3b51b6c2625e8ecda1a1852687048c37.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/3/3b5ada9b492a297fe2e6018a01e46ea7.bin b/Unity/SCANsat/Library/ShaderCache/3/3b5ada9b492a297fe2e6018a01e46ea7.bin new file mode 100644 index 000000000..d97b4a735 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/3/3b5ada9b492a297fe2e6018a01e46ea7.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/3/3c3b9decfaaf500258eb78c2f2054bed.bin b/Unity/SCANsat/Library/ShaderCache/3/3c3b9decfaaf500258eb78c2f2054bed.bin new file mode 100644 index 000000000..bf97f1a46 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/3/3c3b9decfaaf500258eb78c2f2054bed.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/3/3d28c4e6cfe58dc67b695a16134bae3d.bin b/Unity/SCANsat/Library/ShaderCache/3/3d28c4e6cfe58dc67b695a16134bae3d.bin new file mode 100644 index 000000000..8596a257e Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/3/3d28c4e6cfe58dc67b695a16134bae3d.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/3/3d3ca891851ed20edccfe47bb359327d.bin b/Unity/SCANsat/Library/ShaderCache/3/3d3ca891851ed20edccfe47bb359327d.bin new file mode 100644 index 000000000..1106439b3 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/3/3d3ca891851ed20edccfe47bb359327d.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/3/3d655c64c4cd697502260d05c521f60c.bin b/Unity/SCANsat/Library/ShaderCache/3/3d655c64c4cd697502260d05c521f60c.bin new file mode 100644 index 000000000..c2139b324 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/3/3d655c64c4cd697502260d05c521f60c.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/3/3da329991122fea0f2200fd4ae5d5b87.bin b/Unity/SCANsat/Library/ShaderCache/3/3da329991122fea0f2200fd4ae5d5b87.bin new file mode 100644 index 000000000..6da2e88cd Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/3/3da329991122fea0f2200fd4ae5d5b87.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/3/3da6a10184b5593eab546d3bbc3f108e.bin b/Unity/SCANsat/Library/ShaderCache/3/3da6a10184b5593eab546d3bbc3f108e.bin new file mode 100644 index 000000000..32f53688c Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/3/3da6a10184b5593eab546d3bbc3f108e.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/3/3f463d3b78cad54d5b82e18959703963.bin b/Unity/SCANsat/Library/ShaderCache/3/3f463d3b78cad54d5b82e18959703963.bin new file mode 100644 index 000000000..4df457056 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/3/3f463d3b78cad54d5b82e18959703963.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/3/3fbe96df71fd3f51e7475576c8fa9b43.bin b/Unity/SCANsat/Library/ShaderCache/3/3fbe96df71fd3f51e7475576c8fa9b43.bin new file mode 100644 index 000000000..fb9296aaf Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/3/3fbe96df71fd3f51e7475576c8fa9b43.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/4/41ccf08828fdef4d2c4594970f5017fb.bin b/Unity/SCANsat/Library/ShaderCache/4/41ccf08828fdef4d2c4594970f5017fb.bin new file mode 100644 index 000000000..82c1d5307 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/4/41ccf08828fdef4d2c4594970f5017fb.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/4/42c5f961c874fb57e161cdf0cd486329.bin b/Unity/SCANsat/Library/ShaderCache/4/42c5f961c874fb57e161cdf0cd486329.bin new file mode 100644 index 000000000..286fbc1a7 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/4/42c5f961c874fb57e161cdf0cd486329.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/4/433f051294b113f1cc899e2faf730d68.bin b/Unity/SCANsat/Library/ShaderCache/4/433f051294b113f1cc899e2faf730d68.bin new file mode 100644 index 000000000..1ad8b25b0 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/4/433f051294b113f1cc899e2faf730d68.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/4/4354633b95211ba8eb9fcd9d41715cb1.bin b/Unity/SCANsat/Library/ShaderCache/4/4354633b95211ba8eb9fcd9d41715cb1.bin new file mode 100644 index 000000000..3692c034a Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/4/4354633b95211ba8eb9fcd9d41715cb1.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/4/45b23ffca076d6d479666a154cab61ea.bin b/Unity/SCANsat/Library/ShaderCache/4/45b23ffca076d6d479666a154cab61ea.bin new file mode 100644 index 000000000..18ffdb879 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/4/45b23ffca076d6d479666a154cab61ea.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/4/462b0d5aa9bc5cec1eabd2a57c19a8af.bin b/Unity/SCANsat/Library/ShaderCache/4/462b0d5aa9bc5cec1eabd2a57c19a8af.bin new file mode 100644 index 000000000..297168c1b Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/4/462b0d5aa9bc5cec1eabd2a57c19a8af.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/4/46b02ff25fb75559b1856191bb6df8c0.bin b/Unity/SCANsat/Library/ShaderCache/4/46b02ff25fb75559b1856191bb6df8c0.bin new file mode 100644 index 000000000..8ee6e7690 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/4/46b02ff25fb75559b1856191bb6df8c0.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/4/47107517b3f476e9ca7a1ae469dbb0a3.bin b/Unity/SCANsat/Library/ShaderCache/4/47107517b3f476e9ca7a1ae469dbb0a3.bin new file mode 100644 index 000000000..e894f7154 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/4/47107517b3f476e9ca7a1ae469dbb0a3.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/4/484ff9b2bc72a8217389cfc4da59c5fd.bin b/Unity/SCANsat/Library/ShaderCache/4/484ff9b2bc72a8217389cfc4da59c5fd.bin new file mode 100644 index 000000000..a071273db Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/4/484ff9b2bc72a8217389cfc4da59c5fd.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/4/491f05549bb74fd27890653b55216116.bin b/Unity/SCANsat/Library/ShaderCache/4/491f05549bb74fd27890653b55216116.bin new file mode 100644 index 000000000..5584c5900 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/4/491f05549bb74fd27890653b55216116.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/4/49dd1290d346e2595c84d2bc6cf08dfe.bin b/Unity/SCANsat/Library/ShaderCache/4/49dd1290d346e2595c84d2bc6cf08dfe.bin new file mode 100644 index 000000000..293b1e021 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/4/49dd1290d346e2595c84d2bc6cf08dfe.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/4/4a12855a8fbc391ac28facb84c23d7d3.bin b/Unity/SCANsat/Library/ShaderCache/4/4a12855a8fbc391ac28facb84c23d7d3.bin new file mode 100644 index 000000000..a3fe291c4 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/4/4a12855a8fbc391ac28facb84c23d7d3.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/4/4a2e7c5a0543b916d17a18e33aa44153.bin b/Unity/SCANsat/Library/ShaderCache/4/4a2e7c5a0543b916d17a18e33aa44153.bin new file mode 100644 index 000000000..a044b90da Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/4/4a2e7c5a0543b916d17a18e33aa44153.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/4/4b4626ff535f5f32a5a3f9a3b5e83c74.bin b/Unity/SCANsat/Library/ShaderCache/4/4b4626ff535f5f32a5a3f9a3b5e83c74.bin new file mode 100644 index 000000000..53b5d089a Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/4/4b4626ff535f5f32a5a3f9a3b5e83c74.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/4/4d92083fcf0213e6938fd0c6014e2ff0.bin b/Unity/SCANsat/Library/ShaderCache/4/4d92083fcf0213e6938fd0c6014e2ff0.bin new file mode 100644 index 000000000..79667f380 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/4/4d92083fcf0213e6938fd0c6014e2ff0.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/4/4dae738fd634f0c89d368ecdab89c503.bin b/Unity/SCANsat/Library/ShaderCache/4/4dae738fd634f0c89d368ecdab89c503.bin new file mode 100644 index 000000000..b390636a7 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/4/4dae738fd634f0c89d368ecdab89c503.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/4/4f829520652ace8f54acc37b8e622f80.bin b/Unity/SCANsat/Library/ShaderCache/4/4f829520652ace8f54acc37b8e622f80.bin new file mode 100644 index 000000000..297168c1b Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/4/4f829520652ace8f54acc37b8e622f80.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/5/5054d3f217fce0441c8c8acc2cc8caf3.bin b/Unity/SCANsat/Library/ShaderCache/5/5054d3f217fce0441c8c8acc2cc8caf3.bin new file mode 100644 index 000000000..5dffa659e Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/5/5054d3f217fce0441c8c8acc2cc8caf3.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/5/51482978b7df3b2a6e4df6c125bfd750.bin b/Unity/SCANsat/Library/ShaderCache/5/51482978b7df3b2a6e4df6c125bfd750.bin new file mode 100644 index 000000000..1e6cb5917 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/5/51482978b7df3b2a6e4df6c125bfd750.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/5/51d2fc789d072d5f700e36fb55560c8e.bin b/Unity/SCANsat/Library/ShaderCache/5/51d2fc789d072d5f700e36fb55560c8e.bin new file mode 100644 index 000000000..485cd21d3 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/5/51d2fc789d072d5f700e36fb55560c8e.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/5/532dd5f44c4aa58ae4f74a8664e366db.bin b/Unity/SCANsat/Library/ShaderCache/5/532dd5f44c4aa58ae4f74a8664e366db.bin new file mode 100644 index 000000000..bc2bd0c70 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/5/532dd5f44c4aa58ae4f74a8664e366db.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/5/53bf5c034cf0c7460d198ee7c33ce8c6.bin b/Unity/SCANsat/Library/ShaderCache/5/53bf5c034cf0c7460d198ee7c33ce8c6.bin new file mode 100644 index 000000000..dc9768122 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/5/53bf5c034cf0c7460d198ee7c33ce8c6.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/5/542321136d70c464368fe73dec19bc47.bin b/Unity/SCANsat/Library/ShaderCache/5/542321136d70c464368fe73dec19bc47.bin new file mode 100644 index 000000000..88959969c Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/5/542321136d70c464368fe73dec19bc47.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/5/54475a79dce2ddb09ae44be2d7507736.bin b/Unity/SCANsat/Library/ShaderCache/5/54475a79dce2ddb09ae44be2d7507736.bin new file mode 100644 index 000000000..e70cd2396 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/5/54475a79dce2ddb09ae44be2d7507736.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/5/5491f314d592ee8b0581762587067bab.bin b/Unity/SCANsat/Library/ShaderCache/5/5491f314d592ee8b0581762587067bab.bin new file mode 100644 index 000000000..0638ef31f Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/5/5491f314d592ee8b0581762587067bab.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/5/56a45ebbd7cde4f47a11661d48752ef2.bin b/Unity/SCANsat/Library/ShaderCache/5/56a45ebbd7cde4f47a11661d48752ef2.bin new file mode 100644 index 000000000..0b33406df Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/5/56a45ebbd7cde4f47a11661d48752ef2.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/5/59f84dd433fe4e0c7d0494c19d6e030a.bin b/Unity/SCANsat/Library/ShaderCache/5/59f84dd433fe4e0c7d0494c19d6e030a.bin new file mode 100644 index 000000000..8596a257e Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/5/59f84dd433fe4e0c7d0494c19d6e030a.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/5/5a38d7dcce26dd74aa8470dec4237fb0.bin b/Unity/SCANsat/Library/ShaderCache/5/5a38d7dcce26dd74aa8470dec4237fb0.bin new file mode 100644 index 000000000..683eceaa5 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/5/5a38d7dcce26dd74aa8470dec4237fb0.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/5/5afadad00643cb7345290ce06aafa462.bin b/Unity/SCANsat/Library/ShaderCache/5/5afadad00643cb7345290ce06aafa462.bin new file mode 100644 index 000000000..ea5e0ffd1 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/5/5afadad00643cb7345290ce06aafa462.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/5/5afc90733eff63f61d728fdfe40a4bda.bin b/Unity/SCANsat/Library/ShaderCache/5/5afc90733eff63f61d728fdfe40a4bda.bin new file mode 100644 index 000000000..e20bb3bf4 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/5/5afc90733eff63f61d728fdfe40a4bda.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/5/5cb6ca099461aaed1f43a0045b3e2882.bin b/Unity/SCANsat/Library/ShaderCache/5/5cb6ca099461aaed1f43a0045b3e2882.bin new file mode 100644 index 000000000..2cff1a1e4 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/5/5cb6ca099461aaed1f43a0045b3e2882.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/5/5ecc393af3155b58c5a9eaab50cb921e.bin b/Unity/SCANsat/Library/ShaderCache/5/5ecc393af3155b58c5a9eaab50cb921e.bin new file mode 100644 index 000000000..58ba4667a Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/5/5ecc393af3155b58c5a9eaab50cb921e.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/5/5f5f6f106958372b17e1f2518570ee29.bin b/Unity/SCANsat/Library/ShaderCache/5/5f5f6f106958372b17e1f2518570ee29.bin new file mode 100644 index 000000000..ca7e2e9d0 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/5/5f5f6f106958372b17e1f2518570ee29.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/6/6147c30845c416807c04a22060509ccc.bin b/Unity/SCANsat/Library/ShaderCache/6/6147c30845c416807c04a22060509ccc.bin new file mode 100644 index 000000000..ecf004d84 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/6/6147c30845c416807c04a22060509ccc.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/6/617e9066d06ec6f44a99bd267b5b48b7.bin b/Unity/SCANsat/Library/ShaderCache/6/617e9066d06ec6f44a99bd267b5b48b7.bin new file mode 100644 index 000000000..3285effc3 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/6/617e9066d06ec6f44a99bd267b5b48b7.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/6/61da06960eccf24e6a6845d1b3df773b.bin b/Unity/SCANsat/Library/ShaderCache/6/61da06960eccf24e6a6845d1b3df773b.bin new file mode 100644 index 000000000..c1a23979e Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/6/61da06960eccf24e6a6845d1b3df773b.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/6/634de5a5d358cf23d991d9b2bf7a4c48.bin b/Unity/SCANsat/Library/ShaderCache/6/634de5a5d358cf23d991d9b2bf7a4c48.bin new file mode 100644 index 000000000..5584c5900 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/6/634de5a5d358cf23d991d9b2bf7a4c48.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/6/666432fcf575f990f30a037f9e582b37.bin b/Unity/SCANsat/Library/ShaderCache/6/666432fcf575f990f30a037f9e582b37.bin new file mode 100644 index 000000000..1d7753a5e Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/6/666432fcf575f990f30a037f9e582b37.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/6/6678c3e4f7320e9c7358544fa5bfd988.bin b/Unity/SCANsat/Library/ShaderCache/6/6678c3e4f7320e9c7358544fa5bfd988.bin new file mode 100644 index 000000000..919b31330 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/6/6678c3e4f7320e9c7358544fa5bfd988.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/6/686b9a7acb5cc66a311e6d1ce3fbabfd.bin b/Unity/SCANsat/Library/ShaderCache/6/686b9a7acb5cc66a311e6d1ce3fbabfd.bin new file mode 100644 index 000000000..08a683656 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/6/686b9a7acb5cc66a311e6d1ce3fbabfd.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/6/689719bbe389706103a277f36a0ceefe.bin b/Unity/SCANsat/Library/ShaderCache/6/689719bbe389706103a277f36a0ceefe.bin new file mode 100644 index 000000000..9e3cee572 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/6/689719bbe389706103a277f36a0ceefe.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/6/690b687bffb5084afa2742800d09d780.bin b/Unity/SCANsat/Library/ShaderCache/6/690b687bffb5084afa2742800d09d780.bin new file mode 100644 index 000000000..0d97227be Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/6/690b687bffb5084afa2742800d09d780.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/6/695e97de82dc5e8f2a3a18dfb399fa36.bin b/Unity/SCANsat/Library/ShaderCache/6/695e97de82dc5e8f2a3a18dfb399fa36.bin new file mode 100644 index 000000000..cf1c205a5 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/6/695e97de82dc5e8f2a3a18dfb399fa36.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/6/6a6578f807b04e9d312ed10e7fa5608b.bin b/Unity/SCANsat/Library/ShaderCache/6/6a6578f807b04e9d312ed10e7fa5608b.bin new file mode 100644 index 000000000..c96e044d6 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/6/6a6578f807b04e9d312ed10e7fa5608b.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/6/6b0ffb22bb1eebb15030a141dd31990e.bin b/Unity/SCANsat/Library/ShaderCache/6/6b0ffb22bb1eebb15030a141dd31990e.bin new file mode 100644 index 000000000..b038191e5 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/6/6b0ffb22bb1eebb15030a141dd31990e.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/6/6b317f6a0655521f4ca7e92db38887a1.bin b/Unity/SCANsat/Library/ShaderCache/6/6b317f6a0655521f4ca7e92db38887a1.bin new file mode 100644 index 000000000..6d5933fb6 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/6/6b317f6a0655521f4ca7e92db38887a1.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/6/6bc1a335d4d3c84fe95a740ef11eb9b9.bin b/Unity/SCANsat/Library/ShaderCache/6/6bc1a335d4d3c84fe95a740ef11eb9b9.bin new file mode 100644 index 000000000..919cf9569 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/6/6bc1a335d4d3c84fe95a740ef11eb9b9.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/6/6c03da8da5b2363a26db0369ea07200b.bin b/Unity/SCANsat/Library/ShaderCache/6/6c03da8da5b2363a26db0369ea07200b.bin new file mode 100644 index 000000000..a3493d622 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/6/6c03da8da5b2363a26db0369ea07200b.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/6/6db7554d0bb80ae2f5c9bfcaf25aeb75.bin b/Unity/SCANsat/Library/ShaderCache/6/6db7554d0bb80ae2f5c9bfcaf25aeb75.bin new file mode 100644 index 000000000..9a58de9a6 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/6/6db7554d0bb80ae2f5c9bfcaf25aeb75.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/6/6e5d5a8666ff3dcacd0798624a079c89.bin b/Unity/SCANsat/Library/ShaderCache/6/6e5d5a8666ff3dcacd0798624a079c89.bin new file mode 100644 index 000000000..d38cc3cad Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/6/6e5d5a8666ff3dcacd0798624a079c89.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/6/6fbaed094506d6944e4352b910007365.bin b/Unity/SCANsat/Library/ShaderCache/6/6fbaed094506d6944e4352b910007365.bin new file mode 100644 index 000000000..b077169d7 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/6/6fbaed094506d6944e4352b910007365.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/6/6fe12c24d885c4ad74a2958ddab9f582.bin b/Unity/SCANsat/Library/ShaderCache/6/6fe12c24d885c4ad74a2958ddab9f582.bin new file mode 100644 index 000000000..c44c99b56 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/6/6fe12c24d885c4ad74a2958ddab9f582.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/7/70d8422cf42fffa9361b6b9a322e7612.bin b/Unity/SCANsat/Library/ShaderCache/7/70d8422cf42fffa9361b6b9a322e7612.bin new file mode 100644 index 000000000..9b9f25661 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/7/70d8422cf42fffa9361b6b9a322e7612.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/7/7297e180f79b761a21f07f6f087a2679.bin b/Unity/SCANsat/Library/ShaderCache/7/7297e180f79b761a21f07f6f087a2679.bin new file mode 100644 index 000000000..2aea4de0a Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/7/7297e180f79b761a21f07f6f087a2679.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/7/744899d7b89b61e1b4a172f573a7a4ea.bin b/Unity/SCANsat/Library/ShaderCache/7/744899d7b89b61e1b4a172f573a7a4ea.bin new file mode 100644 index 000000000..3d074ad7f Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/7/744899d7b89b61e1b4a172f573a7a4ea.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/7/75a96879f3149c18815efb62f01531fb.bin b/Unity/SCANsat/Library/ShaderCache/7/75a96879f3149c18815efb62f01531fb.bin new file mode 100644 index 000000000..21d8674d1 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/7/75a96879f3149c18815efb62f01531fb.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/7/760e3afaac10d0992cab7f7dba766f11.bin b/Unity/SCANsat/Library/ShaderCache/7/760e3afaac10d0992cab7f7dba766f11.bin new file mode 100644 index 000000000..8ec5f5ddb Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/7/760e3afaac10d0992cab7f7dba766f11.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/7/76f10ef4dc1fd98ea2649c2647431b4b.bin b/Unity/SCANsat/Library/ShaderCache/7/76f10ef4dc1fd98ea2649c2647431b4b.bin new file mode 100644 index 000000000..baf29bee0 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/7/76f10ef4dc1fd98ea2649c2647431b4b.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/7/783c5692d962499a0e0816ebb3ae0f49.bin b/Unity/SCANsat/Library/ShaderCache/7/783c5692d962499a0e0816ebb3ae0f49.bin new file mode 100644 index 000000000..dad215a9c Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/7/783c5692d962499a0e0816ebb3ae0f49.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/7/79884293330d11a9f021dfcb8f7f40cf.bin b/Unity/SCANsat/Library/ShaderCache/7/79884293330d11a9f021dfcb8f7f40cf.bin new file mode 100644 index 000000000..c349b2a33 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/7/79884293330d11a9f021dfcb8f7f40cf.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/7/79b43950683e3d132ed8c56f7e6ced49.bin b/Unity/SCANsat/Library/ShaderCache/7/79b43950683e3d132ed8c56f7e6ced49.bin new file mode 100644 index 000000000..53e4c577c Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/7/79b43950683e3d132ed8c56f7e6ced49.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/7/7b42b84ea24c0a3435d1006a46964692.bin b/Unity/SCANsat/Library/ShaderCache/7/7b42b84ea24c0a3435d1006a46964692.bin new file mode 100644 index 000000000..6c6470337 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/7/7b42b84ea24c0a3435d1006a46964692.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/7/7b99fd5e1c502f9d01669231377d6252.bin b/Unity/SCANsat/Library/ShaderCache/7/7b99fd5e1c502f9d01669231377d6252.bin new file mode 100644 index 000000000..102c8553a Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/7/7b99fd5e1c502f9d01669231377d6252.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/7/7ba7fd315a1d60036fa45d711749c693.bin b/Unity/SCANsat/Library/ShaderCache/7/7ba7fd315a1d60036fa45d711749c693.bin new file mode 100644 index 000000000..135a75c3d Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/7/7ba7fd315a1d60036fa45d711749c693.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/7/7ba81af4d6d69f1c0fb06b3c952e0209.bin b/Unity/SCANsat/Library/ShaderCache/7/7ba81af4d6d69f1c0fb06b3c952e0209.bin new file mode 100644 index 000000000..0a0cb8198 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/7/7ba81af4d6d69f1c0fb06b3c952e0209.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/7/7c85903d11b779d3559b16fbc0744368.bin b/Unity/SCANsat/Library/ShaderCache/7/7c85903d11b779d3559b16fbc0744368.bin new file mode 100644 index 000000000..132688d39 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/7/7c85903d11b779d3559b16fbc0744368.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/7/7d21b1e618ee13c775a13637a8aff7a1.bin b/Unity/SCANsat/Library/ShaderCache/7/7d21b1e618ee13c775a13637a8aff7a1.bin new file mode 100644 index 000000000..c9e29787c Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/7/7d21b1e618ee13c775a13637a8aff7a1.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/7/7d490cef1b4aa7fc255fb303420d8f6a.bin b/Unity/SCANsat/Library/ShaderCache/7/7d490cef1b4aa7fc255fb303420d8f6a.bin new file mode 100644 index 000000000..43ff1a575 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/7/7d490cef1b4aa7fc255fb303420d8f6a.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/7/7dc61f0d33846c6c4dc56edf42a1154b.bin b/Unity/SCANsat/Library/ShaderCache/7/7dc61f0d33846c6c4dc56edf42a1154b.bin new file mode 100644 index 000000000..afc522fc0 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/7/7dc61f0d33846c6c4dc56edf42a1154b.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/7/7effe7d8251c4502a66f94da85e1743f.bin b/Unity/SCANsat/Library/ShaderCache/7/7effe7d8251c4502a66f94da85e1743f.bin new file mode 100644 index 000000000..88959969c Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/7/7effe7d8251c4502a66f94da85e1743f.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/7/7fc93075cc9fc5b8e57d01798e4cf2bb.bin b/Unity/SCANsat/Library/ShaderCache/7/7fc93075cc9fc5b8e57d01798e4cf2bb.bin new file mode 100644 index 000000000..89e973b36 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/7/7fc93075cc9fc5b8e57d01798e4cf2bb.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/8/8445d80fcd5a1eac76abb674b3d299df.bin b/Unity/SCANsat/Library/ShaderCache/8/8445d80fcd5a1eac76abb674b3d299df.bin new file mode 100644 index 000000000..3ebf444f5 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/8/8445d80fcd5a1eac76abb674b3d299df.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/8/8498fe499b4a5dda655fc725b2e82101.bin b/Unity/SCANsat/Library/ShaderCache/8/8498fe499b4a5dda655fc725b2e82101.bin new file mode 100644 index 000000000..aa2265719 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/8/8498fe499b4a5dda655fc725b2e82101.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/8/84be79d80d1a247a876e92b9a036d66c.bin b/Unity/SCANsat/Library/ShaderCache/8/84be79d80d1a247a876e92b9a036d66c.bin new file mode 100644 index 000000000..c3d4f65ef Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/8/84be79d80d1a247a876e92b9a036d66c.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/8/851ccff44d844b3152592d157c23e31a.bin b/Unity/SCANsat/Library/ShaderCache/8/851ccff44d844b3152592d157c23e31a.bin new file mode 100644 index 000000000..be7d986aa Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/8/851ccff44d844b3152592d157c23e31a.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/8/863302408b7e3b7a858f1e39d49aa5ab.bin b/Unity/SCANsat/Library/ShaderCache/8/863302408b7e3b7a858f1e39d49aa5ab.bin new file mode 100644 index 000000000..8b8d9bcdb Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/8/863302408b7e3b7a858f1e39d49aa5ab.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/8/8649cf7b4acd15597c25b28f194f8535.bin b/Unity/SCANsat/Library/ShaderCache/8/8649cf7b4acd15597c25b28f194f8535.bin new file mode 100644 index 000000000..b8f0a9304 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/8/8649cf7b4acd15597c25b28f194f8535.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/8/867242978136a6cb371e95e50a011ce2.bin b/Unity/SCANsat/Library/ShaderCache/8/867242978136a6cb371e95e50a011ce2.bin new file mode 100644 index 000000000..a50326d67 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/8/867242978136a6cb371e95e50a011ce2.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/8/88e4ce07b7170f39ca0ff5fb6bd301a5.bin b/Unity/SCANsat/Library/ShaderCache/8/88e4ce07b7170f39ca0ff5fb6bd301a5.bin new file mode 100644 index 000000000..bdae184d1 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/8/88e4ce07b7170f39ca0ff5fb6bd301a5.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/8/890931ffda14cfed286c626e2f05f1a3.bin b/Unity/SCANsat/Library/ShaderCache/8/890931ffda14cfed286c626e2f05f1a3.bin new file mode 100644 index 000000000..f4a6c6bf0 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/8/890931ffda14cfed286c626e2f05f1a3.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/8/8b23b430db1c1b3503ae1b97ef52da4d.bin b/Unity/SCANsat/Library/ShaderCache/8/8b23b430db1c1b3503ae1b97ef52da4d.bin new file mode 100644 index 000000000..08cbe2fa7 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/8/8b23b430db1c1b3503ae1b97ef52da4d.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/8/8ba172c1fcdf28eb1688b46ec46b9367.bin b/Unity/SCANsat/Library/ShaderCache/8/8ba172c1fcdf28eb1688b46ec46b9367.bin new file mode 100644 index 000000000..1106439b3 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/8/8ba172c1fcdf28eb1688b46ec46b9367.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/8/8ee2ee8e27a4706f50108351afffae89.bin b/Unity/SCANsat/Library/ShaderCache/8/8ee2ee8e27a4706f50108351afffae89.bin new file mode 100644 index 000000000..47cf81f40 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/8/8ee2ee8e27a4706f50108351afffae89.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/9/90f2b171263bc28b46e2ce8275eb6bdc.bin b/Unity/SCANsat/Library/ShaderCache/9/90f2b171263bc28b46e2ce8275eb6bdc.bin new file mode 100644 index 000000000..03e47ff55 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/9/90f2b171263bc28b46e2ce8275eb6bdc.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/9/939988faea7912d2ce9d7a80c9cc15bd.bin b/Unity/SCANsat/Library/ShaderCache/9/939988faea7912d2ce9d7a80c9cc15bd.bin new file mode 100644 index 000000000..ed27db3ba Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/9/939988faea7912d2ce9d7a80c9cc15bd.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/9/93a2db7eee22ba58c354285bb9111c7c.bin b/Unity/SCANsat/Library/ShaderCache/9/93a2db7eee22ba58c354285bb9111c7c.bin new file mode 100644 index 000000000..952c611ff Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/9/93a2db7eee22ba58c354285bb9111c7c.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/9/93aabe34f4568e6582443fc8da523688.bin b/Unity/SCANsat/Library/ShaderCache/9/93aabe34f4568e6582443fc8da523688.bin new file mode 100644 index 000000000..29f6f595a Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/9/93aabe34f4568e6582443fc8da523688.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/9/93f19d37984cd788941db0878690c792.bin b/Unity/SCANsat/Library/ShaderCache/9/93f19d37984cd788941db0878690c792.bin new file mode 100644 index 000000000..801222924 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/9/93f19d37984cd788941db0878690c792.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/9/942f1c4c568d1abfc1f562210f592e36.bin b/Unity/SCANsat/Library/ShaderCache/9/942f1c4c568d1abfc1f562210f592e36.bin new file mode 100644 index 000000000..ff44cb595 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/9/942f1c4c568d1abfc1f562210f592e36.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/9/9458a595a9888d3f3badcca10380d0b8.bin b/Unity/SCANsat/Library/ShaderCache/9/9458a595a9888d3f3badcca10380d0b8.bin new file mode 100644 index 000000000..e2bbf80ed Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/9/9458a595a9888d3f3badcca10380d0b8.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/9/94ccf05da210bc0445c0c9f5831dbd8d.bin b/Unity/SCANsat/Library/ShaderCache/9/94ccf05da210bc0445c0c9f5831dbd8d.bin new file mode 100644 index 000000000..8596a257e Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/9/94ccf05da210bc0445c0c9f5831dbd8d.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/9/9533a5bdd67772768a7fba6f2551b4fc.bin b/Unity/SCANsat/Library/ShaderCache/9/9533a5bdd67772768a7fba6f2551b4fc.bin new file mode 100644 index 000000000..08375f977 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/9/9533a5bdd67772768a7fba6f2551b4fc.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/9/959b363bacf26dcbd970c77fec12dd1f.bin b/Unity/SCANsat/Library/ShaderCache/9/959b363bacf26dcbd970c77fec12dd1f.bin new file mode 100644 index 000000000..e4e26e99d Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/9/959b363bacf26dcbd970c77fec12dd1f.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/9/95ba6e1689411d39f86842eabfcf7c40.bin b/Unity/SCANsat/Library/ShaderCache/9/95ba6e1689411d39f86842eabfcf7c40.bin new file mode 100644 index 000000000..43ff1a575 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/9/95ba6e1689411d39f86842eabfcf7c40.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/9/95eff8faa46c332c24765432bff7efce.bin b/Unity/SCANsat/Library/ShaderCache/9/95eff8faa46c332c24765432bff7efce.bin new file mode 100644 index 000000000..ff44cb595 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/9/95eff8faa46c332c24765432bff7efce.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/9/96dec78aac8b043173d71a982471b9f3.bin b/Unity/SCANsat/Library/ShaderCache/9/96dec78aac8b043173d71a982471b9f3.bin new file mode 100644 index 000000000..ce71028b2 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/9/96dec78aac8b043173d71a982471b9f3.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/9/988565544a87899448ab8acd6ff7bb36.bin b/Unity/SCANsat/Library/ShaderCache/9/988565544a87899448ab8acd6ff7bb36.bin new file mode 100644 index 000000000..d61802776 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/9/988565544a87899448ab8acd6ff7bb36.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/9/9a86f774f3f757696b7838093e74b294.bin b/Unity/SCANsat/Library/ShaderCache/9/9a86f774f3f757696b7838093e74b294.bin new file mode 100644 index 000000000..93e19fc6d Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/9/9a86f774f3f757696b7838093e74b294.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/9/9ae8a738bc496c27c343bd4540f5d561.bin b/Unity/SCANsat/Library/ShaderCache/9/9ae8a738bc496c27c343bd4540f5d561.bin new file mode 100644 index 000000000..32675f23d Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/9/9ae8a738bc496c27c343bd4540f5d561.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/9/9bc3de88f04d743dd92369b2bb5b51c9.bin b/Unity/SCANsat/Library/ShaderCache/9/9bc3de88f04d743dd92369b2bb5b51c9.bin new file mode 100644 index 000000000..9eb2788e2 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/9/9bc3de88f04d743dd92369b2bb5b51c9.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/9/9bca013944fecf41558c53dd66b83fd2.bin b/Unity/SCANsat/Library/ShaderCache/9/9bca013944fecf41558c53dd66b83fd2.bin new file mode 100644 index 000000000..48c5596b6 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/9/9bca013944fecf41558c53dd66b83fd2.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/9/9bf2354a735b304d754141bc1830a37c.bin b/Unity/SCANsat/Library/ShaderCache/9/9bf2354a735b304d754141bc1830a37c.bin new file mode 100644 index 000000000..9ae7d0678 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/9/9bf2354a735b304d754141bc1830a37c.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/9/9c1c482f7718661286123a07097b5b5f.bin b/Unity/SCANsat/Library/ShaderCache/9/9c1c482f7718661286123a07097b5b5f.bin new file mode 100644 index 000000000..0c16047d6 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/9/9c1c482f7718661286123a07097b5b5f.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/9/9c40edc685730c42bd05a4c0e0c483b3.bin b/Unity/SCANsat/Library/ShaderCache/9/9c40edc685730c42bd05a4c0e0c483b3.bin new file mode 100644 index 000000000..293b1e021 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/9/9c40edc685730c42bd05a4c0e0c483b3.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/9/9c70b124f54ef2f8cda5da5e3e666b65.bin b/Unity/SCANsat/Library/ShaderCache/9/9c70b124f54ef2f8cda5da5e3e666b65.bin new file mode 100644 index 000000000..15ca7eab2 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/9/9c70b124f54ef2f8cda5da5e3e666b65.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/9/9dd312981d207d431ddeab1b30336203.bin b/Unity/SCANsat/Library/ShaderCache/9/9dd312981d207d431ddeab1b30336203.bin new file mode 100644 index 000000000..660c2dc14 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/9/9dd312981d207d431ddeab1b30336203.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/9/9e62b5c84b13681589634ddcfefe559c.bin b/Unity/SCANsat/Library/ShaderCache/9/9e62b5c84b13681589634ddcfefe559c.bin new file mode 100644 index 000000000..f8be99491 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/9/9e62b5c84b13681589634ddcfefe559c.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/9/9f2ef5a1add3450aa53a158859c2a225.bin b/Unity/SCANsat/Library/ShaderCache/9/9f2ef5a1add3450aa53a158859c2a225.bin new file mode 100644 index 000000000..ef4cb147f Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/9/9f2ef5a1add3450aa53a158859c2a225.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/a/a20a21c44379f036201d5ebc6016aecd.bin b/Unity/SCANsat/Library/ShaderCache/a/a20a21c44379f036201d5ebc6016aecd.bin new file mode 100644 index 000000000..873394db9 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/a/a20a21c44379f036201d5ebc6016aecd.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/a/a359db167dd4a51e92f09642b4912655.bin b/Unity/SCANsat/Library/ShaderCache/a/a359db167dd4a51e92f09642b4912655.bin new file mode 100644 index 000000000..2aee21d10 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/a/a359db167dd4a51e92f09642b4912655.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/a/a553c614c1ec1b8d77cf825bcbf3e727.bin b/Unity/SCANsat/Library/ShaderCache/a/a553c614c1ec1b8d77cf825bcbf3e727.bin new file mode 100644 index 000000000..677b75655 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/a/a553c614c1ec1b8d77cf825bcbf3e727.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/a/a5dbad910f9fa0b363ade52a36a961e1.bin b/Unity/SCANsat/Library/ShaderCache/a/a5dbad910f9fa0b363ade52a36a961e1.bin new file mode 100644 index 000000000..92523d9b0 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/a/a5dbad910f9fa0b363ade52a36a961e1.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/a/a665009d14291d06a35d7747ffc6d3f1.bin b/Unity/SCANsat/Library/ShaderCache/a/a665009d14291d06a35d7747ffc6d3f1.bin new file mode 100644 index 000000000..c67df6d88 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/a/a665009d14291d06a35d7747ffc6d3f1.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/a/a782ac2f10f192bc4dcd5df6d17e610b.bin b/Unity/SCANsat/Library/ShaderCache/a/a782ac2f10f192bc4dcd5df6d17e610b.bin new file mode 100644 index 000000000..52e45bb3c Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/a/a782ac2f10f192bc4dcd5df6d17e610b.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/a/a7f452d42676cd397a7311b5e066c858.bin b/Unity/SCANsat/Library/ShaderCache/a/a7f452d42676cd397a7311b5e066c858.bin new file mode 100644 index 000000000..abdd03556 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/a/a7f452d42676cd397a7311b5e066c858.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/a/aa5a09133d14b13741b2ec034199011f.bin b/Unity/SCANsat/Library/ShaderCache/a/aa5a09133d14b13741b2ec034199011f.bin new file mode 100644 index 000000000..1106439b3 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/a/aa5a09133d14b13741b2ec034199011f.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/a/ab7a763a84fc345ef5515df3979b07e2.bin b/Unity/SCANsat/Library/ShaderCache/a/ab7a763a84fc345ef5515df3979b07e2.bin new file mode 100644 index 000000000..258926fdc Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/a/ab7a763a84fc345ef5515df3979b07e2.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/a/ac0c2591800712db46241bc3b2bafeb4.bin b/Unity/SCANsat/Library/ShaderCache/a/ac0c2591800712db46241bc3b2bafeb4.bin new file mode 100644 index 000000000..be1019e5a Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/a/ac0c2591800712db46241bc3b2bafeb4.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/a/ac3b296895ccd027da043e1a02f744c1.bin b/Unity/SCANsat/Library/ShaderCache/a/ac3b296895ccd027da043e1a02f744c1.bin new file mode 100644 index 000000000..d290e4fe2 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/a/ac3b296895ccd027da043e1a02f744c1.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/a/ac4bf99b43c95f3e511ae8965d3321aa.bin b/Unity/SCANsat/Library/ShaderCache/a/ac4bf99b43c95f3e511ae8965d3321aa.bin new file mode 100644 index 000000000..82a190fb9 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/a/ac4bf99b43c95f3e511ae8965d3321aa.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/a/ac772965ce8dcdff72185b9ecebe18fa.bin b/Unity/SCANsat/Library/ShaderCache/a/ac772965ce8dcdff72185b9ecebe18fa.bin new file mode 100644 index 000000000..a24628dca Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/a/ac772965ce8dcdff72185b9ecebe18fa.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/a/ad1f6f1b5240d9f57974fe10f892e7fb.bin b/Unity/SCANsat/Library/ShaderCache/a/ad1f6f1b5240d9f57974fe10f892e7fb.bin new file mode 100644 index 000000000..ca86affca Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/a/ad1f6f1b5240d9f57974fe10f892e7fb.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/b/b09ad3dc4b618867d21e08efa9a787ad.bin b/Unity/SCANsat/Library/ShaderCache/b/b09ad3dc4b618867d21e08efa9a787ad.bin new file mode 100644 index 000000000..89baab21f Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/b/b09ad3dc4b618867d21e08efa9a787ad.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/b/b0a0f1c15389963a76a7bedd20b4bc1f.bin b/Unity/SCANsat/Library/ShaderCache/b/b0a0f1c15389963a76a7bedd20b4bc1f.bin new file mode 100644 index 000000000..5fe7c83aa Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/b/b0a0f1c15389963a76a7bedd20b4bc1f.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/b/b0fe8471f7fe13f7a8f1cf21a5960d4d.bin b/Unity/SCANsat/Library/ShaderCache/b/b0fe8471f7fe13f7a8f1cf21a5960d4d.bin new file mode 100644 index 000000000..b064fac7c Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/b/b0fe8471f7fe13f7a8f1cf21a5960d4d.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/b/b17e75e6e85595a3704813f4f091bbb1.bin b/Unity/SCANsat/Library/ShaderCache/b/b17e75e6e85595a3704813f4f091bbb1.bin new file mode 100644 index 000000000..6fd89ef2c Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/b/b17e75e6e85595a3704813f4f091bbb1.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/b/b2a7df15d40f005c511dc00c6f59ecfd.bin b/Unity/SCANsat/Library/ShaderCache/b/b2a7df15d40f005c511dc00c6f59ecfd.bin new file mode 100644 index 000000000..7fa9c8631 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/b/b2a7df15d40f005c511dc00c6f59ecfd.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/b/b37511b295c59d7d0756b7d70bd6e392.bin b/Unity/SCANsat/Library/ShaderCache/b/b37511b295c59d7d0756b7d70bd6e392.bin new file mode 100644 index 000000000..135a75c3d Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/b/b37511b295c59d7d0756b7d70bd6e392.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/b/b3f486ad59c9343fb8af3abe5191928f.bin b/Unity/SCANsat/Library/ShaderCache/b/b3f486ad59c9343fb8af3abe5191928f.bin new file mode 100644 index 000000000..bad0c31ff Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/b/b3f486ad59c9343fb8af3abe5191928f.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/b/b50d798294211c3a4fadc8e774d05266.bin b/Unity/SCANsat/Library/ShaderCache/b/b50d798294211c3a4fadc8e774d05266.bin new file mode 100644 index 000000000..8596a257e Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/b/b50d798294211c3a4fadc8e774d05266.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/b/b6928e1b0ecd12fc223898561f5d6778.bin b/Unity/SCANsat/Library/ShaderCache/b/b6928e1b0ecd12fc223898561f5d6778.bin new file mode 100644 index 000000000..b508f70e0 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/b/b6928e1b0ecd12fc223898561f5d6778.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/b/b81615751b0bd5770511f4422fc0fd5f.bin b/Unity/SCANsat/Library/ShaderCache/b/b81615751b0bd5770511f4422fc0fd5f.bin new file mode 100644 index 000000000..bfe85ef12 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/b/b81615751b0bd5770511f4422fc0fd5f.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/b/b83b5f7febda23cac53ce83d8116af74.bin b/Unity/SCANsat/Library/ShaderCache/b/b83b5f7febda23cac53ce83d8116af74.bin new file mode 100644 index 000000000..6afa1daa0 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/b/b83b5f7febda23cac53ce83d8116af74.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/b/b8d8d25aa215012e963e7687d4871558.bin b/Unity/SCANsat/Library/ShaderCache/b/b8d8d25aa215012e963e7687d4871558.bin new file mode 100644 index 000000000..c7c6f0abd Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/b/b8d8d25aa215012e963e7687d4871558.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/b/bb50e634466507c855a42679e8ff23d4.bin b/Unity/SCANsat/Library/ShaderCache/b/bb50e634466507c855a42679e8ff23d4.bin new file mode 100644 index 000000000..063bc7e88 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/b/bb50e634466507c855a42679e8ff23d4.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/b/bb6b2d7e85ed88fb1c7fbf20b7b2d44e.bin b/Unity/SCANsat/Library/ShaderCache/b/bb6b2d7e85ed88fb1c7fbf20b7b2d44e.bin new file mode 100644 index 000000000..ecce74375 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/b/bb6b2d7e85ed88fb1c7fbf20b7b2d44e.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/b/bc3526f97496e90a1dcae92e70c2b617.bin b/Unity/SCANsat/Library/ShaderCache/b/bc3526f97496e90a1dcae92e70c2b617.bin new file mode 100644 index 000000000..654ef496c Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/b/bc3526f97496e90a1dcae92e70c2b617.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/b/bc5952005ef83a8aa86ef0213a749ab4.bin b/Unity/SCANsat/Library/ShaderCache/b/bc5952005ef83a8aa86ef0213a749ab4.bin new file mode 100644 index 000000000..5bc1ce62a Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/b/bc5952005ef83a8aa86ef0213a749ab4.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/b/bcbb1a2bbc44f5e87768b22d3893e930.bin b/Unity/SCANsat/Library/ShaderCache/b/bcbb1a2bbc44f5e87768b22d3893e930.bin new file mode 100644 index 000000000..250c9b49d Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/b/bcbb1a2bbc44f5e87768b22d3893e930.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/b/bcbb973ca796a0016d6a0113cab56878.bin b/Unity/SCANsat/Library/ShaderCache/b/bcbb973ca796a0016d6a0113cab56878.bin new file mode 100644 index 000000000..8667ce791 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/b/bcbb973ca796a0016d6a0113cab56878.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/b/bdaaf63fa01f15bce5b11d2e4a70484a.bin b/Unity/SCANsat/Library/ShaderCache/b/bdaaf63fa01f15bce5b11d2e4a70484a.bin new file mode 100644 index 000000000..2586abe3b Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/b/bdaaf63fa01f15bce5b11d2e4a70484a.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/b/bea468c731c8f0562afc661211ebd578.bin b/Unity/SCANsat/Library/ShaderCache/b/bea468c731c8f0562afc661211ebd578.bin new file mode 100644 index 000000000..17a738aa3 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/b/bea468c731c8f0562afc661211ebd578.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/c/c00ae37dcd742794dbc63d59ed05a375.bin b/Unity/SCANsat/Library/ShaderCache/c/c00ae37dcd742794dbc63d59ed05a375.bin new file mode 100644 index 000000000..1b707f0bf Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/c/c00ae37dcd742794dbc63d59ed05a375.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/c/c12343aed5bc69db45d43d4d1b5b0351.bin b/Unity/SCANsat/Library/ShaderCache/c/c12343aed5bc69db45d43d4d1b5b0351.bin new file mode 100644 index 000000000..7dee01677 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/c/c12343aed5bc69db45d43d4d1b5b0351.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/c/c2be506b1e9cd2eb492ccf04e8c52cb7.bin b/Unity/SCANsat/Library/ShaderCache/c/c2be506b1e9cd2eb492ccf04e8c52cb7.bin new file mode 100644 index 000000000..6da2e88cd Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/c/c2be506b1e9cd2eb492ccf04e8c52cb7.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/c/c52f3d4ad18b5db5d3a3950c18853260.bin b/Unity/SCANsat/Library/ShaderCache/c/c52f3d4ad18b5db5d3a3950c18853260.bin new file mode 100644 index 000000000..db4a338d8 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/c/c52f3d4ad18b5db5d3a3950c18853260.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/c/c5416ec0d2675cb1666b93fbc7d0bc63.bin b/Unity/SCANsat/Library/ShaderCache/c/c5416ec0d2675cb1666b93fbc7d0bc63.bin new file mode 100644 index 000000000..4d79a7468 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/c/c5416ec0d2675cb1666b93fbc7d0bc63.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/c/c5c1ae26ec3440ad67a8a61e6e827c06.bin b/Unity/SCANsat/Library/ShaderCache/c/c5c1ae26ec3440ad67a8a61e6e827c06.bin new file mode 100644 index 000000000..df2ce7ef3 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/c/c5c1ae26ec3440ad67a8a61e6e827c06.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/c/c78db3c303b349cb29178900c74dfba2.bin b/Unity/SCANsat/Library/ShaderCache/c/c78db3c303b349cb29178900c74dfba2.bin new file mode 100644 index 000000000..f82fb9ef9 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/c/c78db3c303b349cb29178900c74dfba2.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/c/c7d9e135bcb830ad7aff88a80963f08e.bin b/Unity/SCANsat/Library/ShaderCache/c/c7d9e135bcb830ad7aff88a80963f08e.bin new file mode 100644 index 000000000..d290e4fe2 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/c/c7d9e135bcb830ad7aff88a80963f08e.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/c/c82992ff97d9245fe7071e0edc2a8128.bin b/Unity/SCANsat/Library/ShaderCache/c/c82992ff97d9245fe7071e0edc2a8128.bin new file mode 100644 index 000000000..1afec9dc6 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/c/c82992ff97d9245fe7071e0edc2a8128.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/c/c88b8d1343fb079a3fd47dd2cd5cf830.bin b/Unity/SCANsat/Library/ShaderCache/c/c88b8d1343fb079a3fd47dd2cd5cf830.bin new file mode 100644 index 000000000..f86f1ea08 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/c/c88b8d1343fb079a3fd47dd2cd5cf830.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/c/c8e5bbaa44570d823f5d7e9e74a79746.bin b/Unity/SCANsat/Library/ShaderCache/c/c8e5bbaa44570d823f5d7e9e74a79746.bin new file mode 100644 index 000000000..bdae184d1 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/c/c8e5bbaa44570d823f5d7e9e74a79746.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/c/c93efbe4b169fa5014cd5a114544923c.bin b/Unity/SCANsat/Library/ShaderCache/c/c93efbe4b169fa5014cd5a114544923c.bin new file mode 100644 index 000000000..ee89bab74 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/c/c93efbe4b169fa5014cd5a114544923c.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/c/cae53216424a4e4b14f9febdb53838e0.bin b/Unity/SCANsat/Library/ShaderCache/c/cae53216424a4e4b14f9febdb53838e0.bin new file mode 100644 index 000000000..3013d266e Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/c/cae53216424a4e4b14f9febdb53838e0.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/c/cbcee086e70f7b2532e88531174d0b5b.bin b/Unity/SCANsat/Library/ShaderCache/c/cbcee086e70f7b2532e88531174d0b5b.bin new file mode 100644 index 000000000..3285effc3 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/c/cbcee086e70f7b2532e88531174d0b5b.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/c/cc38896c8ceac0166f4f4b1db9f2dd2a.bin b/Unity/SCANsat/Library/ShaderCache/c/cc38896c8ceac0166f4f4b1db9f2dd2a.bin new file mode 100644 index 000000000..27f83f24b Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/c/cc38896c8ceac0166f4f4b1db9f2dd2a.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/c/cd6353141ef90814c000bba12b26fbca.bin b/Unity/SCANsat/Library/ShaderCache/c/cd6353141ef90814c000bba12b26fbca.bin new file mode 100644 index 000000000..abe95ddd9 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/c/cd6353141ef90814c000bba12b26fbca.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/c/cde5aa0b31edd9718b6ff2845dd52c3b.bin b/Unity/SCANsat/Library/ShaderCache/c/cde5aa0b31edd9718b6ff2845dd52c3b.bin new file mode 100644 index 000000000..43da82e86 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/c/cde5aa0b31edd9718b6ff2845dd52c3b.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/c/cedd0ee46436526125e14202a2c184f1.bin b/Unity/SCANsat/Library/ShaderCache/c/cedd0ee46436526125e14202a2c184f1.bin new file mode 100644 index 000000000..135a75c3d Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/c/cedd0ee46436526125e14202a2c184f1.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/c/cf189e3a3fb5cf519fc82165c1a4ad7d.bin b/Unity/SCANsat/Library/ShaderCache/c/cf189e3a3fb5cf519fc82165c1a4ad7d.bin new file mode 100644 index 000000000..0d586a615 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/c/cf189e3a3fb5cf519fc82165c1a4ad7d.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/c/cf35605ca29755c7d5a59b5dbf62d4d6.bin b/Unity/SCANsat/Library/ShaderCache/c/cf35605ca29755c7d5a59b5dbf62d4d6.bin new file mode 100644 index 000000000..4cb5357ff Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/c/cf35605ca29755c7d5a59b5dbf62d4d6.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/c/cfeb2e2f3714fe55abcf5899edf70393.bin b/Unity/SCANsat/Library/ShaderCache/c/cfeb2e2f3714fe55abcf5899edf70393.bin new file mode 100644 index 000000000..802e7e06c Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/c/cfeb2e2f3714fe55abcf5899edf70393.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/d/d01ad637b86866b7230a3cf47dbf0d11.bin b/Unity/SCANsat/Library/ShaderCache/d/d01ad637b86866b7230a3cf47dbf0d11.bin new file mode 100644 index 000000000..eddadea0e Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/d/d01ad637b86866b7230a3cf47dbf0d11.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/d/d05500d76e56588a03c9f55391185702.bin b/Unity/SCANsat/Library/ShaderCache/d/d05500d76e56588a03c9f55391185702.bin new file mode 100644 index 000000000..afc522fc0 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/d/d05500d76e56588a03c9f55391185702.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/d/d065790efbe0295c26e67c2320de63a7.bin b/Unity/SCANsat/Library/ShaderCache/d/d065790efbe0295c26e67c2320de63a7.bin new file mode 100644 index 000000000..1fbe18c6f Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/d/d065790efbe0295c26e67c2320de63a7.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/d/d0aee320c475ffacb60d5eccbd248723.bin b/Unity/SCANsat/Library/ShaderCache/d/d0aee320c475ffacb60d5eccbd248723.bin new file mode 100644 index 000000000..be5103188 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/d/d0aee320c475ffacb60d5eccbd248723.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/d/d0ca74f3192bde43318ac2033bcb9a40.bin b/Unity/SCANsat/Library/ShaderCache/d/d0ca74f3192bde43318ac2033bcb9a40.bin new file mode 100644 index 000000000..b353af282 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/d/d0ca74f3192bde43318ac2033bcb9a40.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/d/d18b05b33be558f0fd916109339c1a7d.bin b/Unity/SCANsat/Library/ShaderCache/d/d18b05b33be558f0fd916109339c1a7d.bin new file mode 100644 index 000000000..95bb4c618 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/d/d18b05b33be558f0fd916109339c1a7d.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/d/d1a3e1113dee1b428f65256d0c84eae5.bin b/Unity/SCANsat/Library/ShaderCache/d/d1a3e1113dee1b428f65256d0c84eae5.bin new file mode 100644 index 000000000..d997344a3 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/d/d1a3e1113dee1b428f65256d0c84eae5.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/d/d1b655ce2cb741144bae1cda4f79b4e0.bin b/Unity/SCANsat/Library/ShaderCache/d/d1b655ce2cb741144bae1cda4f79b4e0.bin new file mode 100644 index 000000000..84014ef64 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/d/d1b655ce2cb741144bae1cda4f79b4e0.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/d/d1c10d710590d829f478eb46aeed3e4a.bin b/Unity/SCANsat/Library/ShaderCache/d/d1c10d710590d829f478eb46aeed3e4a.bin new file mode 100644 index 000000000..1049de63b Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/d/d1c10d710590d829f478eb46aeed3e4a.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/d/d349a9944c86df6b5fa9814f788f6b77.bin b/Unity/SCANsat/Library/ShaderCache/d/d349a9944c86df6b5fa9814f788f6b77.bin new file mode 100644 index 000000000..69bb213d2 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/d/d349a9944c86df6b5fa9814f788f6b77.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/d/d35f2b38e616466aef47dc2ec8dca875.bin b/Unity/SCANsat/Library/ShaderCache/d/d35f2b38e616466aef47dc2ec8dca875.bin new file mode 100644 index 000000000..8ec5f5ddb Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/d/d35f2b38e616466aef47dc2ec8dca875.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/d/d4b1da9a816389a550e1adc8573841a5.bin b/Unity/SCANsat/Library/ShaderCache/d/d4b1da9a816389a550e1adc8573841a5.bin new file mode 100644 index 000000000..8be373b83 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/d/d4b1da9a816389a550e1adc8573841a5.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/d/d51e500c9ede0ad09d1f4dff41add648.bin b/Unity/SCANsat/Library/ShaderCache/d/d51e500c9ede0ad09d1f4dff41add648.bin new file mode 100644 index 000000000..ec61cc0b2 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/d/d51e500c9ede0ad09d1f4dff41add648.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/d/d6cbde7f28df7ea3f8c16a071758c659.bin b/Unity/SCANsat/Library/ShaderCache/d/d6cbde7f28df7ea3f8c16a071758c659.bin new file mode 100644 index 000000000..58ba4667a Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/d/d6cbde7f28df7ea3f8c16a071758c659.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/d/d6d14152e5d30a70d8251f8030f0b3c5.bin b/Unity/SCANsat/Library/ShaderCache/d/d6d14152e5d30a70d8251f8030f0b3c5.bin new file mode 100644 index 000000000..98f50b0c0 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/d/d6d14152e5d30a70d8251f8030f0b3c5.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/d/d763bd5fe46267c6ae81ebf92d6200bd.bin b/Unity/SCANsat/Library/ShaderCache/d/d763bd5fe46267c6ae81ebf92d6200bd.bin new file mode 100644 index 000000000..d15e469e8 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/d/d763bd5fe46267c6ae81ebf92d6200bd.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/d/d76468f7762bbe2bc4e26161a775f6ce.bin b/Unity/SCANsat/Library/ShaderCache/d/d76468f7762bbe2bc4e26161a775f6ce.bin new file mode 100644 index 000000000..65e16cd47 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/d/d76468f7762bbe2bc4e26161a775f6ce.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/d/d7e098e8285213e7cb361e726b418cfd.bin b/Unity/SCANsat/Library/ShaderCache/d/d7e098e8285213e7cb361e726b418cfd.bin new file mode 100644 index 000000000..f747b5a13 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/d/d7e098e8285213e7cb361e726b418cfd.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/d/d9cadd941f341ac6c1d17766a8d14813.bin b/Unity/SCANsat/Library/ShaderCache/d/d9cadd941f341ac6c1d17766a8d14813.bin new file mode 100644 index 000000000..2ba66795a Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/d/d9cadd941f341ac6c1d17766a8d14813.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/d/d9d3edbb565c88ee2d38a4368292c2d9.bin b/Unity/SCANsat/Library/ShaderCache/d/d9d3edbb565c88ee2d38a4368292c2d9.bin new file mode 100644 index 000000000..2779a02b5 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/d/d9d3edbb565c88ee2d38a4368292c2d9.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/d/dae45a7e5d59b93c26a292652463adb3.bin b/Unity/SCANsat/Library/ShaderCache/d/dae45a7e5d59b93c26a292652463adb3.bin new file mode 100644 index 000000000..634d0f63f Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/d/dae45a7e5d59b93c26a292652463adb3.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/d/db744c91c517caa745b2c4128442c6b0.bin b/Unity/SCANsat/Library/ShaderCache/d/db744c91c517caa745b2c4128442c6b0.bin new file mode 100644 index 000000000..3c77a2ed8 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/d/db744c91c517caa745b2c4128442c6b0.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/d/dc2f39595252b34a61a63eef2b815db6.bin b/Unity/SCANsat/Library/ShaderCache/d/dc2f39595252b34a61a63eef2b815db6.bin new file mode 100644 index 000000000..5c96e94cd Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/d/dc2f39595252b34a61a63eef2b815db6.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/e/e012b11b67863a65a6098999c2afdf6e.bin b/Unity/SCANsat/Library/ShaderCache/e/e012b11b67863a65a6098999c2afdf6e.bin new file mode 100644 index 000000000..634d0f63f Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/e/e012b11b67863a65a6098999c2afdf6e.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/e/e035654ac804c4e061f061d51ad0b150.bin b/Unity/SCANsat/Library/ShaderCache/e/e035654ac804c4e061f061d51ad0b150.bin new file mode 100644 index 000000000..0ac093277 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/e/e035654ac804c4e061f061d51ad0b150.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/e/e17a9d7adf48c4937bc6d49959acc481.bin b/Unity/SCANsat/Library/ShaderCache/e/e17a9d7adf48c4937bc6d49959acc481.bin new file mode 100644 index 000000000..f86f1ea08 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/e/e17a9d7adf48c4937bc6d49959acc481.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/e/e270218b43a54d3d43fd1fe7d854794c.bin b/Unity/SCANsat/Library/ShaderCache/e/e270218b43a54d3d43fd1fe7d854794c.bin new file mode 100644 index 000000000..bb3139e5c Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/e/e270218b43a54d3d43fd1fe7d854794c.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/e/e2dcf55f36a0b3462617f8ef97329b58.bin b/Unity/SCANsat/Library/ShaderCache/e/e2dcf55f36a0b3462617f8ef97329b58.bin new file mode 100644 index 000000000..1ad8b25b0 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/e/e2dcf55f36a0b3462617f8ef97329b58.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/e/e30511ad4881ddf50a2abfe9fa68293c.bin b/Unity/SCANsat/Library/ShaderCache/e/e30511ad4881ddf50a2abfe9fa68293c.bin new file mode 100644 index 000000000..3f5ed3494 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/e/e30511ad4881ddf50a2abfe9fa68293c.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/e/e495114b06335c25221200276c1150a9.bin b/Unity/SCANsat/Library/ShaderCache/e/e495114b06335c25221200276c1150a9.bin new file mode 100644 index 000000000..250c9b49d Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/e/e495114b06335c25221200276c1150a9.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/e/e5243cdbebb5813af1c56965769123d6.bin b/Unity/SCANsat/Library/ShaderCache/e/e5243cdbebb5813af1c56965769123d6.bin new file mode 100644 index 000000000..952f50f2d Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/e/e5243cdbebb5813af1c56965769123d6.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/e/e5a3b48e62487b2b8f50da7026b6970d.bin b/Unity/SCANsat/Library/ShaderCache/e/e5a3b48e62487b2b8f50da7026b6970d.bin new file mode 100644 index 000000000..ee9f88692 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/e/e5a3b48e62487b2b8f50da7026b6970d.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/e/e5ca2dd4f02de6f6cc01aacd3db1bec6.bin b/Unity/SCANsat/Library/ShaderCache/e/e5ca2dd4f02de6f6cc01aacd3db1bec6.bin new file mode 100644 index 000000000..1f2352825 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/e/e5ca2dd4f02de6f6cc01aacd3db1bec6.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/e/e5e5c83a6dd5db07f9e3f2c13ab6cccc.bin b/Unity/SCANsat/Library/ShaderCache/e/e5e5c83a6dd5db07f9e3f2c13ab6cccc.bin new file mode 100644 index 000000000..3b71ceec9 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/e/e5e5c83a6dd5db07f9e3f2c13ab6cccc.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/e/e7cf6baa5390f26323efe04b37c73188.bin b/Unity/SCANsat/Library/ShaderCache/e/e7cf6baa5390f26323efe04b37c73188.bin new file mode 100644 index 000000000..170fd5f14 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/e/e7cf6baa5390f26323efe04b37c73188.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/e/e8c695b5d05b476b8cf4da8acebe9455.bin b/Unity/SCANsat/Library/ShaderCache/e/e8c695b5d05b476b8cf4da8acebe9455.bin new file mode 100644 index 000000000..437f4b6ba Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/e/e8c695b5d05b476b8cf4da8acebe9455.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/e/e8c8f79cf85b23f7c415359ade99e29e.bin b/Unity/SCANsat/Library/ShaderCache/e/e8c8f79cf85b23f7c415359ade99e29e.bin new file mode 100644 index 000000000..e5708b7cb Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/e/e8c8f79cf85b23f7c415359ade99e29e.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/e/ecc21dadefe01dec173dd7c75095e37f.bin b/Unity/SCANsat/Library/ShaderCache/e/ecc21dadefe01dec173dd7c75095e37f.bin new file mode 100644 index 000000000..209a8031a Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/e/ecc21dadefe01dec173dd7c75095e37f.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/e/ed1b39256b8bbf0933b60bfb055f5d3c.bin b/Unity/SCANsat/Library/ShaderCache/e/ed1b39256b8bbf0933b60bfb055f5d3c.bin new file mode 100644 index 000000000..7d6067378 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/e/ed1b39256b8bbf0933b60bfb055f5d3c.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/e/ed79b7a52133a1ce63c8699121604959.bin b/Unity/SCANsat/Library/ShaderCache/e/ed79b7a52133a1ce63c8699121604959.bin new file mode 100644 index 000000000..0f5a25f99 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/e/ed79b7a52133a1ce63c8699121604959.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/e/ee9e74aeef7020251f16e8bbebfd03bc.bin b/Unity/SCANsat/Library/ShaderCache/e/ee9e74aeef7020251f16e8bbebfd03bc.bin new file mode 100644 index 000000000..751b2ab57 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/e/ee9e74aeef7020251f16e8bbebfd03bc.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/e/eea7312d55495cf544d9282ea2f5192e.bin b/Unity/SCANsat/Library/ShaderCache/e/eea7312d55495cf544d9282ea2f5192e.bin new file mode 100644 index 000000000..0b33406df Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/e/eea7312d55495cf544d9282ea2f5192e.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/e/ef33d5c7136c8e9d801f68fe07bee1be.bin b/Unity/SCANsat/Library/ShaderCache/e/ef33d5c7136c8e9d801f68fe07bee1be.bin new file mode 100644 index 000000000..d0d827539 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/e/ef33d5c7136c8e9d801f68fe07bee1be.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/e/eff8035fc348074d721da1e257939fbc.bin b/Unity/SCANsat/Library/ShaderCache/e/eff8035fc348074d721da1e257939fbc.bin new file mode 100644 index 000000000..d303a3084 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/e/eff8035fc348074d721da1e257939fbc.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/f/f0c3d81042ff187a5e9b43ae44ecd89e.bin b/Unity/SCANsat/Library/ShaderCache/f/f0c3d81042ff187a5e9b43ae44ecd89e.bin new file mode 100644 index 000000000..bb3bfcdb3 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/f/f0c3d81042ff187a5e9b43ae44ecd89e.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/f/f0fa92792769548044e414fd012faca8.bin b/Unity/SCANsat/Library/ShaderCache/f/f0fa92792769548044e414fd012faca8.bin new file mode 100644 index 000000000..078b07979 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/f/f0fa92792769548044e414fd012faca8.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/f/f1f29d9924a967d3b395117dd9a38164.bin b/Unity/SCANsat/Library/ShaderCache/f/f1f29d9924a967d3b395117dd9a38164.bin new file mode 100644 index 000000000..5ebd33aee Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/f/f1f29d9924a967d3b395117dd9a38164.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/f/f2436b8d601281be8dfff5f8e804b140.bin b/Unity/SCANsat/Library/ShaderCache/f/f2436b8d601281be8dfff5f8e804b140.bin new file mode 100644 index 000000000..ebabda3ef Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/f/f2436b8d601281be8dfff5f8e804b140.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/f/f2d954279617689cb6fd061930bc259d.bin b/Unity/SCANsat/Library/ShaderCache/f/f2d954279617689cb6fd061930bc259d.bin new file mode 100644 index 000000000..9d8f76e80 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/f/f2d954279617689cb6fd061930bc259d.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/f/f32cb018d46914733cfa8f798f599b6f.bin b/Unity/SCANsat/Library/ShaderCache/f/f32cb018d46914733cfa8f798f599b6f.bin new file mode 100644 index 000000000..10b0c5b1b Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/f/f32cb018d46914733cfa8f798f599b6f.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/f/f343df84b29fae2bfcb53bfc47e8efd8.bin b/Unity/SCANsat/Library/ShaderCache/f/f343df84b29fae2bfcb53bfc47e8efd8.bin new file mode 100644 index 000000000..e259b1025 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/f/f343df84b29fae2bfcb53bfc47e8efd8.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/f/f386cfefc5fff0f5b7e4ee4fa18d8356.bin b/Unity/SCANsat/Library/ShaderCache/f/f386cfefc5fff0f5b7e4ee4fa18d8356.bin new file mode 100644 index 000000000..873394db9 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/f/f386cfefc5fff0f5b7e4ee4fa18d8356.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/f/f3a320baf496466d2e17b86bbd365480.bin b/Unity/SCANsat/Library/ShaderCache/f/f3a320baf496466d2e17b86bbd365480.bin new file mode 100644 index 000000000..09f695086 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/f/f3a320baf496466d2e17b86bbd365480.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/f/f4502598d46a31590d50ec7558606d25.bin b/Unity/SCANsat/Library/ShaderCache/f/f4502598d46a31590d50ec7558606d25.bin new file mode 100644 index 000000000..fc0ae61a4 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/f/f4502598d46a31590d50ec7558606d25.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/f/f6a653bd7dff17cf608497184693ca5c.bin b/Unity/SCANsat/Library/ShaderCache/f/f6a653bd7dff17cf608497184693ca5c.bin new file mode 100644 index 000000000..4d79a7468 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/f/f6a653bd7dff17cf608497184693ca5c.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/f/f6d80cd1a318e0a7dbc4083ce66cab11.bin b/Unity/SCANsat/Library/ShaderCache/f/f6d80cd1a318e0a7dbc4083ce66cab11.bin new file mode 100644 index 000000000..58af97bcb Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/f/f6d80cd1a318e0a7dbc4083ce66cab11.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/f/f76a195446c572bab6f40d282e04eccc.bin b/Unity/SCANsat/Library/ShaderCache/f/f76a195446c572bab6f40d282e04eccc.bin new file mode 100644 index 000000000..7dd160c99 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/f/f76a195446c572bab6f40d282e04eccc.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/f/f7c306c25849a577b9234fb9a174df5b.bin b/Unity/SCANsat/Library/ShaderCache/f/f7c306c25849a577b9234fb9a174df5b.bin new file mode 100644 index 000000000..0c2e017dc Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/f/f7c306c25849a577b9234fb9a174df5b.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/f/f7cdfffa5a1a138e68c441785a3711c9.bin b/Unity/SCANsat/Library/ShaderCache/f/f7cdfffa5a1a138e68c441785a3711c9.bin new file mode 100644 index 000000000..dee88a86c Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/f/f7cdfffa5a1a138e68c441785a3711c9.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/f/f9277822fad81a321950e145c166be27.bin b/Unity/SCANsat/Library/ShaderCache/f/f9277822fad81a321950e145c166be27.bin new file mode 100644 index 000000000..1301efe2f Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/f/f9277822fad81a321950e145c166be27.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/f/f930f97b54fb9a5f89961b71b4af0790.bin b/Unity/SCANsat/Library/ShaderCache/f/f930f97b54fb9a5f89961b71b4af0790.bin new file mode 100644 index 000000000..3285effc3 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/f/f930f97b54fb9a5f89961b71b4af0790.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/f/f936202f0d7cbbfeac9dd2ccc74cc0c0.bin b/Unity/SCANsat/Library/ShaderCache/f/f936202f0d7cbbfeac9dd2ccc74cc0c0.bin new file mode 100644 index 000000000..135a75c3d Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/f/f936202f0d7cbbfeac9dd2ccc74cc0c0.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/f/fa41c299df2ea174e6b8895792abbd4e.bin b/Unity/SCANsat/Library/ShaderCache/f/fa41c299df2ea174e6b8895792abbd4e.bin new file mode 100644 index 000000000..d91bd877d Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/f/fa41c299df2ea174e6b8895792abbd4e.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/f/fab125bb1e9f3a54932ed71a24f1b664.bin b/Unity/SCANsat/Library/ShaderCache/f/fab125bb1e9f3a54932ed71a24f1b664.bin new file mode 100644 index 000000000..17dfeca53 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/f/fab125bb1e9f3a54932ed71a24f1b664.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/f/fabf2279b34e1eb25be3a44c6fdb8c5c.bin b/Unity/SCANsat/Library/ShaderCache/f/fabf2279b34e1eb25be3a44c6fdb8c5c.bin new file mode 100644 index 000000000..fdc42bf4e Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/f/fabf2279b34e1eb25be3a44c6fdb8c5c.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/f/fb46b84314730a3722d74f239055014a.bin b/Unity/SCANsat/Library/ShaderCache/f/fb46b84314730a3722d74f239055014a.bin new file mode 100644 index 000000000..50b96311f Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/f/fb46b84314730a3722d74f239055014a.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/f/fc9742e4035897d6e4d08da8825015fa.bin b/Unity/SCANsat/Library/ShaderCache/f/fc9742e4035897d6e4d08da8825015fa.bin new file mode 100644 index 000000000..c6bacb9e2 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/f/fc9742e4035897d6e4d08da8825015fa.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/f/fcb0e5e6b767f910b6142c1e7fc81752.bin b/Unity/SCANsat/Library/ShaderCache/f/fcb0e5e6b767f910b6142c1e7fc81752.bin new file mode 100644 index 000000000..f8a326c04 Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/f/fcb0e5e6b767f910b6142c1e7fc81752.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/f/fcff3524bad3ab9cd8e6313d0ddd1b2e.bin b/Unity/SCANsat/Library/ShaderCache/f/fcff3524bad3ab9cd8e6313d0ddd1b2e.bin new file mode 100644 index 000000000..8ec5f5ddb Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/f/fcff3524bad3ab9cd8e6313d0ddd1b2e.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/f/fd41eabe1ffe7a0a3896ad5645cb78cb.bin b/Unity/SCANsat/Library/ShaderCache/f/fd41eabe1ffe7a0a3896ad5645cb78cb.bin new file mode 100644 index 000000000..9fe9f431b Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/f/fd41eabe1ffe7a0a3896ad5645cb78cb.bin differ diff --git a/Unity/SCANsat/Library/ShaderCache/f/fe31221361dafd6ceaa7af70a04817c0.bin b/Unity/SCANsat/Library/ShaderCache/f/fe31221361dafd6ceaa7af70a04817c0.bin new file mode 100644 index 000000000..d037b2b5d Binary files /dev/null and b/Unity/SCANsat/Library/ShaderCache/f/fe31221361dafd6ceaa7af70a04817c0.bin differ diff --git a/Unity/SCANsat/Library/assetDatabase3 b/Unity/SCANsat/Library/assetDatabase3 new file mode 100644 index 000000000..2e67b926c Binary files /dev/null and b/Unity/SCANsat/Library/assetDatabase3 differ diff --git a/Unity/SCANsat/Library/expandedItems b/Unity/SCANsat/Library/expandedItems new file mode 100644 index 000000000..811b36f01 Binary files /dev/null and b/Unity/SCANsat/Library/expandedItems differ diff --git a/Unity/SCANsat/Library/metadata/00/00000000000000001000000000000000 b/Unity/SCANsat/Library/metadata/00/00000000000000001000000000000000 new file mode 100644 index 000000000..a448295b5 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/00/00000000000000001000000000000000 differ diff --git a/Unity/SCANsat/Library/metadata/00/00000000000000001000000000000000.info b/Unity/SCANsat/Library/metadata/00/00000000000000001000000000000000.info new file mode 100644 index 000000000..c72522452 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/00/00000000000000001000000000000000.info differ diff --git a/Unity/SCANsat/Library/metadata/00/00000000000000002000000000000000 b/Unity/SCANsat/Library/metadata/00/00000000000000002000000000000000 new file mode 100644 index 000000000..abd429bef Binary files /dev/null and b/Unity/SCANsat/Library/metadata/00/00000000000000002000000000000000 differ diff --git a/Unity/SCANsat/Library/metadata/00/00000000000000002000000000000000.info b/Unity/SCANsat/Library/metadata/00/00000000000000002000000000000000.info new file mode 100644 index 000000000..82ff5c990 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/00/00000000000000002000000000000000.info differ diff --git a/Unity/SCANsat/Library/metadata/00/00000000000000003000000000000000 b/Unity/SCANsat/Library/metadata/00/00000000000000003000000000000000 new file mode 100644 index 000000000..fac0e4b6f Binary files /dev/null and b/Unity/SCANsat/Library/metadata/00/00000000000000003000000000000000 differ diff --git a/Unity/SCANsat/Library/metadata/00/00000000000000003000000000000000.info b/Unity/SCANsat/Library/metadata/00/00000000000000003000000000000000.info new file mode 100644 index 000000000..e220c12f2 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/00/00000000000000003000000000000000.info differ diff --git a/Unity/SCANsat/Library/metadata/00/00000000000000004000000000000000 b/Unity/SCANsat/Library/metadata/00/00000000000000004000000000000000 new file mode 100644 index 000000000..f5c561a3b Binary files /dev/null and b/Unity/SCANsat/Library/metadata/00/00000000000000004000000000000000 differ diff --git a/Unity/SCANsat/Library/metadata/00/00000000000000004000000000000000.info b/Unity/SCANsat/Library/metadata/00/00000000000000004000000000000000.info new file mode 100644 index 000000000..fab67de72 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/00/00000000000000004000000000000000.info differ diff --git a/Unity/SCANsat/Library/metadata/00/00000000000000004100000000000000 b/Unity/SCANsat/Library/metadata/00/00000000000000004100000000000000 new file mode 100644 index 000000000..e72ba43f7 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/00/00000000000000004100000000000000 differ diff --git a/Unity/SCANsat/Library/metadata/00/00000000000000004100000000000000.info b/Unity/SCANsat/Library/metadata/00/00000000000000004100000000000000.info new file mode 100644 index 000000000..4ed8d674d Binary files /dev/null and b/Unity/SCANsat/Library/metadata/00/00000000000000004100000000000000.info differ diff --git a/Unity/SCANsat/Library/metadata/00/00000000000000005000000000000000 b/Unity/SCANsat/Library/metadata/00/00000000000000005000000000000000 new file mode 100644 index 000000000..e62e1275a Binary files /dev/null and b/Unity/SCANsat/Library/metadata/00/00000000000000005000000000000000 differ diff --git a/Unity/SCANsat/Library/metadata/00/00000000000000005000000000000000.info b/Unity/SCANsat/Library/metadata/00/00000000000000005000000000000000.info new file mode 100644 index 000000000..d9df32d2e Binary files /dev/null and b/Unity/SCANsat/Library/metadata/00/00000000000000005000000000000000.info differ diff --git a/Unity/SCANsat/Library/metadata/00/00000000000000005100000000000000 b/Unity/SCANsat/Library/metadata/00/00000000000000005100000000000000 new file mode 100644 index 000000000..a1f8b9dd3 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/00/00000000000000005100000000000000 differ diff --git a/Unity/SCANsat/Library/metadata/00/00000000000000005100000000000000.info b/Unity/SCANsat/Library/metadata/00/00000000000000005100000000000000.info new file mode 100644 index 000000000..5660ffb33 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/00/00000000000000005100000000000000.info differ diff --git a/Unity/SCANsat/Library/metadata/00/00000000000000006000000000000000 b/Unity/SCANsat/Library/metadata/00/00000000000000006000000000000000 new file mode 100644 index 000000000..7e7bebd88 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/00/00000000000000006000000000000000 differ diff --git a/Unity/SCANsat/Library/metadata/00/00000000000000006000000000000000.info b/Unity/SCANsat/Library/metadata/00/00000000000000006000000000000000.info new file mode 100644 index 000000000..eec137494 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/00/00000000000000006000000000000000.info differ diff --git a/Unity/SCANsat/Library/metadata/00/00000000000000006100000000000000 b/Unity/SCANsat/Library/metadata/00/00000000000000006100000000000000 new file mode 100644 index 000000000..11fac35bb Binary files /dev/null and b/Unity/SCANsat/Library/metadata/00/00000000000000006100000000000000 differ diff --git a/Unity/SCANsat/Library/metadata/00/00000000000000006100000000000000.info b/Unity/SCANsat/Library/metadata/00/00000000000000006100000000000000.info new file mode 100644 index 000000000..affc8eebc Binary files /dev/null and b/Unity/SCANsat/Library/metadata/00/00000000000000006100000000000000.info differ diff --git a/Unity/SCANsat/Library/metadata/00/00000000000000007000000000000000 b/Unity/SCANsat/Library/metadata/00/00000000000000007000000000000000 new file mode 100644 index 000000000..f20c865c2 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/00/00000000000000007000000000000000 differ diff --git a/Unity/SCANsat/Library/metadata/00/00000000000000007000000000000000.info b/Unity/SCANsat/Library/metadata/00/00000000000000007000000000000000.info new file mode 100644 index 000000000..6fc5794bf Binary files /dev/null and b/Unity/SCANsat/Library/metadata/00/00000000000000007000000000000000.info differ diff --git a/Unity/SCANsat/Library/metadata/00/00000000000000008000000000000000 b/Unity/SCANsat/Library/metadata/00/00000000000000008000000000000000 new file mode 100644 index 000000000..2ec54cfa2 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/00/00000000000000008000000000000000 differ diff --git a/Unity/SCANsat/Library/metadata/00/00000000000000008000000000000000.info b/Unity/SCANsat/Library/metadata/00/00000000000000008000000000000000.info new file mode 100644 index 000000000..de5d9a3b7 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/00/00000000000000008000000000000000.info differ diff --git a/Unity/SCANsat/Library/metadata/00/00000000000000008100000000000000 b/Unity/SCANsat/Library/metadata/00/00000000000000008100000000000000 new file mode 100644 index 000000000..852d4a32d Binary files /dev/null and b/Unity/SCANsat/Library/metadata/00/00000000000000008100000000000000 differ diff --git a/Unity/SCANsat/Library/metadata/00/00000000000000008100000000000000.info b/Unity/SCANsat/Library/metadata/00/00000000000000008100000000000000.info new file mode 100644 index 000000000..39b42c9e2 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/00/00000000000000008100000000000000.info differ diff --git a/Unity/SCANsat/Library/metadata/00/00000000000000009000000000000000 b/Unity/SCANsat/Library/metadata/00/00000000000000009000000000000000 new file mode 100644 index 000000000..f4d05d164 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/00/00000000000000009000000000000000 differ diff --git a/Unity/SCANsat/Library/metadata/00/00000000000000009000000000000000.info b/Unity/SCANsat/Library/metadata/00/00000000000000009000000000000000.info new file mode 100644 index 000000000..90cbf24bf Binary files /dev/null and b/Unity/SCANsat/Library/metadata/00/00000000000000009000000000000000.info differ diff --git a/Unity/SCANsat/Library/metadata/00/00000000000000009100000000000000 b/Unity/SCANsat/Library/metadata/00/00000000000000009100000000000000 new file mode 100644 index 000000000..a65f22c17 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/00/00000000000000009100000000000000 differ diff --git a/Unity/SCANsat/Library/metadata/00/00000000000000009100000000000000.info b/Unity/SCANsat/Library/metadata/00/00000000000000009100000000000000.info new file mode 100644 index 000000000..b8864a165 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/00/00000000000000009100000000000000.info differ diff --git a/Unity/SCANsat/Library/metadata/00/0000000000000000a000000000000000 b/Unity/SCANsat/Library/metadata/00/0000000000000000a000000000000000 new file mode 100644 index 000000000..dc992f67d Binary files /dev/null and b/Unity/SCANsat/Library/metadata/00/0000000000000000a000000000000000 differ diff --git a/Unity/SCANsat/Library/metadata/00/0000000000000000a000000000000000.info b/Unity/SCANsat/Library/metadata/00/0000000000000000a000000000000000.info new file mode 100644 index 000000000..917cffe75 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/00/0000000000000000a000000000000000.info differ diff --git a/Unity/SCANsat/Library/metadata/00/0000000000000000b000000000000000 b/Unity/SCANsat/Library/metadata/00/0000000000000000b000000000000000 new file mode 100644 index 000000000..3425f277e Binary files /dev/null and b/Unity/SCANsat/Library/metadata/00/0000000000000000b000000000000000 differ diff --git a/Unity/SCANsat/Library/metadata/00/0000000000000000b000000000000000.info b/Unity/SCANsat/Library/metadata/00/0000000000000000b000000000000000.info new file mode 100644 index 000000000..bd903b2b9 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/00/0000000000000000b000000000000000.info differ diff --git a/Unity/SCANsat/Library/metadata/00/0000000000000000c000000000000000 b/Unity/SCANsat/Library/metadata/00/0000000000000000c000000000000000 new file mode 100644 index 000000000..84115e110 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/00/0000000000000000c000000000000000 differ diff --git a/Unity/SCANsat/Library/metadata/00/0000000000000000c000000000000000.info b/Unity/SCANsat/Library/metadata/00/0000000000000000c000000000000000.info new file mode 100644 index 000000000..36cd4030b Binary files /dev/null and b/Unity/SCANsat/Library/metadata/00/0000000000000000c000000000000000.info differ diff --git a/Unity/SCANsat/Library/metadata/01/0119f0967dbebbc42bc9f4a0f8224c0b b/Unity/SCANsat/Library/metadata/01/0119f0967dbebbc42bc9f4a0f8224c0b new file mode 100644 index 000000000..c02c389a2 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/01/0119f0967dbebbc42bc9f4a0f8224c0b differ diff --git a/Unity/SCANsat/Library/metadata/01/0119f0967dbebbc42bc9f4a0f8224c0b.info b/Unity/SCANsat/Library/metadata/01/0119f0967dbebbc42bc9f4a0f8224c0b.info new file mode 100644 index 000000000..fd2561390 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/01/0119f0967dbebbc42bc9f4a0f8224c0b.info differ diff --git a/Unity/SCANsat/Library/metadata/03/03614ee71852fb74c8e7a1042975206f b/Unity/SCANsat/Library/metadata/03/03614ee71852fb74c8e7a1042975206f new file mode 100644 index 000000000..04ddb14ea Binary files /dev/null and b/Unity/SCANsat/Library/metadata/03/03614ee71852fb74c8e7a1042975206f differ diff --git a/Unity/SCANsat/Library/metadata/03/03614ee71852fb74c8e7a1042975206f.info b/Unity/SCANsat/Library/metadata/03/03614ee71852fb74c8e7a1042975206f.info new file mode 100644 index 000000000..2aa8a51ad Binary files /dev/null and b/Unity/SCANsat/Library/metadata/03/03614ee71852fb74c8e7a1042975206f.info differ diff --git a/Unity/SCANsat/Library/metadata/04/0451eb5aa04be2349a4a639757221057 b/Unity/SCANsat/Library/metadata/04/0451eb5aa04be2349a4a639757221057 new file mode 100644 index 000000000..0a5fd79ad Binary files /dev/null and b/Unity/SCANsat/Library/metadata/04/0451eb5aa04be2349a4a639757221057 differ diff --git a/Unity/SCANsat/Library/metadata/04/0451eb5aa04be2349a4a639757221057.info b/Unity/SCANsat/Library/metadata/04/0451eb5aa04be2349a4a639757221057.info new file mode 100644 index 000000000..dbc3202ba Binary files /dev/null and b/Unity/SCANsat/Library/metadata/04/0451eb5aa04be2349a4a639757221057.info differ diff --git a/Unity/SCANsat/Library/metadata/06/06a2a246979ef154195f532452e7d704 b/Unity/SCANsat/Library/metadata/06/06a2a246979ef154195f532452e7d704 new file mode 100644 index 000000000..e281c3035 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/06/06a2a246979ef154195f532452e7d704 differ diff --git a/Unity/SCANsat/Library/metadata/06/06a2a246979ef154195f532452e7d704.info b/Unity/SCANsat/Library/metadata/06/06a2a246979ef154195f532452e7d704.info new file mode 100644 index 000000000..7ed87608d Binary files /dev/null and b/Unity/SCANsat/Library/metadata/06/06a2a246979ef154195f532452e7d704.info differ diff --git a/Unity/SCANsat/Library/metadata/07/0785b2a0f9690d44dbdf4e24de04ca3e b/Unity/SCANsat/Library/metadata/07/0785b2a0f9690d44dbdf4e24de04ca3e new file mode 100644 index 000000000..95b040ed2 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/07/0785b2a0f9690d44dbdf4e24de04ca3e differ diff --git a/Unity/SCANsat/Library/metadata/07/0785b2a0f9690d44dbdf4e24de04ca3e.info b/Unity/SCANsat/Library/metadata/07/0785b2a0f9690d44dbdf4e24de04ca3e.info new file mode 100644 index 000000000..9086a4d25 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/07/0785b2a0f9690d44dbdf4e24de04ca3e.info differ diff --git a/Unity/SCANsat/Library/metadata/08/0890400b9503e704f8990f50af9b31e0 b/Unity/SCANsat/Library/metadata/08/0890400b9503e704f8990f50af9b31e0 new file mode 100644 index 000000000..63824574c Binary files /dev/null and b/Unity/SCANsat/Library/metadata/08/0890400b9503e704f8990f50af9b31e0 differ diff --git a/Unity/SCANsat/Library/metadata/08/0890400b9503e704f8990f50af9b31e0.info b/Unity/SCANsat/Library/metadata/08/0890400b9503e704f8990f50af9b31e0.info new file mode 100644 index 000000000..9dde35160 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/08/0890400b9503e704f8990f50af9b31e0.info differ diff --git a/Unity/SCANsat/Library/metadata/0d/0d7f916468a6b744db36c0cde00d2923 b/Unity/SCANsat/Library/metadata/0d/0d7f916468a6b744db36c0cde00d2923 new file mode 100644 index 000000000..15841a05b Binary files /dev/null and b/Unity/SCANsat/Library/metadata/0d/0d7f916468a6b744db36c0cde00d2923 differ diff --git a/Unity/SCANsat/Library/metadata/0d/0d7f916468a6b744db36c0cde00d2923.info b/Unity/SCANsat/Library/metadata/0d/0d7f916468a6b744db36c0cde00d2923.info new file mode 100644 index 000000000..71601f84e Binary files /dev/null and b/Unity/SCANsat/Library/metadata/0d/0d7f916468a6b744db36c0cde00d2923.info differ diff --git a/Unity/SCANsat/Library/metadata/0d/0dcc7620dac6e1b4193d4e7aea604d45 b/Unity/SCANsat/Library/metadata/0d/0dcc7620dac6e1b4193d4e7aea604d45 new file mode 100644 index 000000000..d6b739f9e Binary files /dev/null and b/Unity/SCANsat/Library/metadata/0d/0dcc7620dac6e1b4193d4e7aea604d45 differ diff --git a/Unity/SCANsat/Library/metadata/0d/0dcc7620dac6e1b4193d4e7aea604d45.info b/Unity/SCANsat/Library/metadata/0d/0dcc7620dac6e1b4193d4e7aea604d45.info new file mode 100644 index 000000000..e69393a14 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/0d/0dcc7620dac6e1b4193d4e7aea604d45.info differ diff --git a/Unity/SCANsat/Library/metadata/0e/0e0ae18f4594ff74a93edc01359694af b/Unity/SCANsat/Library/metadata/0e/0e0ae18f4594ff74a93edc01359694af new file mode 100644 index 000000000..c4ee7d428 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/0e/0e0ae18f4594ff74a93edc01359694af differ diff --git a/Unity/SCANsat/Library/metadata/0e/0e0ae18f4594ff74a93edc01359694af.info b/Unity/SCANsat/Library/metadata/0e/0e0ae18f4594ff74a93edc01359694af.info new file mode 100644 index 000000000..9534e2f67 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/0e/0e0ae18f4594ff74a93edc01359694af.info differ diff --git a/Unity/SCANsat/Library/metadata/0e/0ee1415fa9dd40644bd19e2722cec2f4 b/Unity/SCANsat/Library/metadata/0e/0ee1415fa9dd40644bd19e2722cec2f4 new file mode 100644 index 000000000..4fb4f4010 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/0e/0ee1415fa9dd40644bd19e2722cec2f4 differ diff --git a/Unity/SCANsat/Library/metadata/0e/0ee1415fa9dd40644bd19e2722cec2f4.info b/Unity/SCANsat/Library/metadata/0e/0ee1415fa9dd40644bd19e2722cec2f4.info new file mode 100644 index 000000000..eb904d686 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/0e/0ee1415fa9dd40644bd19e2722cec2f4.info differ diff --git a/Unity/SCANsat/Library/metadata/0f/0f01187160db534419d10ea376c85210 b/Unity/SCANsat/Library/metadata/0f/0f01187160db534419d10ea376c85210 new file mode 100644 index 000000000..dfd158cc4 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/0f/0f01187160db534419d10ea376c85210 differ diff --git a/Unity/SCANsat/Library/metadata/0f/0f01187160db534419d10ea376c85210.info b/Unity/SCANsat/Library/metadata/0f/0f01187160db534419d10ea376c85210.info new file mode 100644 index 000000000..309278d0f Binary files /dev/null and b/Unity/SCANsat/Library/metadata/0f/0f01187160db534419d10ea376c85210.info differ diff --git a/Unity/SCANsat/Library/metadata/10/10ad36e30bf82b84a8900113b9faf427 b/Unity/SCANsat/Library/metadata/10/10ad36e30bf82b84a8900113b9faf427 new file mode 100644 index 000000000..ae9fb1dce Binary files /dev/null and b/Unity/SCANsat/Library/metadata/10/10ad36e30bf82b84a8900113b9faf427 differ diff --git a/Unity/SCANsat/Library/metadata/10/10ad36e30bf82b84a8900113b9faf427.info b/Unity/SCANsat/Library/metadata/10/10ad36e30bf82b84a8900113b9faf427.info new file mode 100644 index 000000000..a43f7103d Binary files /dev/null and b/Unity/SCANsat/Library/metadata/10/10ad36e30bf82b84a8900113b9faf427.info differ diff --git a/Unity/SCANsat/Library/metadata/11/11c5c83d3b0ac0247b109ad870c58146 b/Unity/SCANsat/Library/metadata/11/11c5c83d3b0ac0247b109ad870c58146 new file mode 100644 index 000000000..b63b5cd2b Binary files /dev/null and b/Unity/SCANsat/Library/metadata/11/11c5c83d3b0ac0247b109ad870c58146 differ diff --git a/Unity/SCANsat/Library/metadata/11/11c5c83d3b0ac0247b109ad870c58146.info b/Unity/SCANsat/Library/metadata/11/11c5c83d3b0ac0247b109ad870c58146.info new file mode 100644 index 000000000..3e889ece9 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/11/11c5c83d3b0ac0247b109ad870c58146.info differ diff --git a/Unity/SCANsat/Library/metadata/12/12cc86819041a614fa622d9c0e801709 b/Unity/SCANsat/Library/metadata/12/12cc86819041a614fa622d9c0e801709 new file mode 100644 index 000000000..ed63679f5 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/12/12cc86819041a614fa622d9c0e801709 differ diff --git a/Unity/SCANsat/Library/metadata/12/12cc86819041a614fa622d9c0e801709.info b/Unity/SCANsat/Library/metadata/12/12cc86819041a614fa622d9c0e801709.info new file mode 100644 index 000000000..d21e2fce7 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/12/12cc86819041a614fa622d9c0e801709.info differ diff --git a/Unity/SCANsat/Library/metadata/13/13c5b748b138496489fc0b816a6c88d3 b/Unity/SCANsat/Library/metadata/13/13c5b748b138496489fc0b816a6c88d3 new file mode 100644 index 000000000..004b87e9e Binary files /dev/null and b/Unity/SCANsat/Library/metadata/13/13c5b748b138496489fc0b816a6c88d3 differ diff --git a/Unity/SCANsat/Library/metadata/13/13c5b748b138496489fc0b816a6c88d3.info b/Unity/SCANsat/Library/metadata/13/13c5b748b138496489fc0b816a6c88d3.info new file mode 100644 index 000000000..93c46b8cb Binary files /dev/null and b/Unity/SCANsat/Library/metadata/13/13c5b748b138496489fc0b816a6c88d3.info differ diff --git a/Unity/SCANsat/Library/metadata/15/1559851e491ace04180a0025375a30ff b/Unity/SCANsat/Library/metadata/15/1559851e491ace04180a0025375a30ff new file mode 100644 index 000000000..9e3b15c8e Binary files /dev/null and b/Unity/SCANsat/Library/metadata/15/1559851e491ace04180a0025375a30ff differ diff --git a/Unity/SCANsat/Library/metadata/15/1559851e491ace04180a0025375a30ff.info b/Unity/SCANsat/Library/metadata/15/1559851e491ace04180a0025375a30ff.info new file mode 100644 index 000000000..3d979ac1c Binary files /dev/null and b/Unity/SCANsat/Library/metadata/15/1559851e491ace04180a0025375a30ff.info differ diff --git a/Unity/SCANsat/Library/metadata/17/1752db0aa4762064fa141b2b41eb3eae b/Unity/SCANsat/Library/metadata/17/1752db0aa4762064fa141b2b41eb3eae new file mode 100644 index 000000000..7a30a24eb Binary files /dev/null and b/Unity/SCANsat/Library/metadata/17/1752db0aa4762064fa141b2b41eb3eae differ diff --git a/Unity/SCANsat/Library/metadata/17/1752db0aa4762064fa141b2b41eb3eae.info b/Unity/SCANsat/Library/metadata/17/1752db0aa4762064fa141b2b41eb3eae.info new file mode 100644 index 000000000..563b61cb0 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/17/1752db0aa4762064fa141b2b41eb3eae.info differ diff --git a/Unity/SCANsat/Library/metadata/1c/1c305ae90596a6446a4ccb724cab1d13 b/Unity/SCANsat/Library/metadata/1c/1c305ae90596a6446a4ccb724cab1d13 new file mode 100644 index 000000000..0eda86bf8 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/1c/1c305ae90596a6446a4ccb724cab1d13 differ diff --git a/Unity/SCANsat/Library/metadata/1c/1c305ae90596a6446a4ccb724cab1d13.info b/Unity/SCANsat/Library/metadata/1c/1c305ae90596a6446a4ccb724cab1d13.info new file mode 100644 index 000000000..e7566a328 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/1c/1c305ae90596a6446a4ccb724cab1d13.info differ diff --git a/Unity/SCANsat/Library/metadata/1c/1c9cb6c6af3c09c41819447f062bebb5 b/Unity/SCANsat/Library/metadata/1c/1c9cb6c6af3c09c41819447f062bebb5 new file mode 100644 index 000000000..ecf1b6d1c Binary files /dev/null and b/Unity/SCANsat/Library/metadata/1c/1c9cb6c6af3c09c41819447f062bebb5 differ diff --git a/Unity/SCANsat/Library/metadata/1c/1c9cb6c6af3c09c41819447f062bebb5.info b/Unity/SCANsat/Library/metadata/1c/1c9cb6c6af3c09c41819447f062bebb5.info new file mode 100644 index 000000000..b044cd32e Binary files /dev/null and b/Unity/SCANsat/Library/metadata/1c/1c9cb6c6af3c09c41819447f062bebb5.info differ diff --git a/Unity/SCANsat/Library/metadata/1e/1e718c2a2cf3f834bac238bf17737cd5 b/Unity/SCANsat/Library/metadata/1e/1e718c2a2cf3f834bac238bf17737cd5 new file mode 100644 index 000000000..efb1ff5d4 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/1e/1e718c2a2cf3f834bac238bf17737cd5 differ diff --git a/Unity/SCANsat/Library/metadata/1e/1e718c2a2cf3f834bac238bf17737cd5.info b/Unity/SCANsat/Library/metadata/1e/1e718c2a2cf3f834bac238bf17737cd5.info new file mode 100644 index 000000000..9c760744c Binary files /dev/null and b/Unity/SCANsat/Library/metadata/1e/1e718c2a2cf3f834bac238bf17737cd5.info differ diff --git a/Unity/SCANsat/Library/metadata/1e/1e9ac78e2708a4f4aa2b27d7edbe906c b/Unity/SCANsat/Library/metadata/1e/1e9ac78e2708a4f4aa2b27d7edbe906c new file mode 100644 index 000000000..0cf1fdabe Binary files /dev/null and b/Unity/SCANsat/Library/metadata/1e/1e9ac78e2708a4f4aa2b27d7edbe906c differ diff --git a/Unity/SCANsat/Library/metadata/1e/1e9ac78e2708a4f4aa2b27d7edbe906c.info b/Unity/SCANsat/Library/metadata/1e/1e9ac78e2708a4f4aa2b27d7edbe906c.info new file mode 100644 index 000000000..0274f68b5 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/1e/1e9ac78e2708a4f4aa2b27d7edbe906c.info differ diff --git a/Unity/SCANsat/Library/metadata/23/2319550d1ff59fa4c8fe967d9b6b5adc b/Unity/SCANsat/Library/metadata/23/2319550d1ff59fa4c8fe967d9b6b5adc new file mode 100644 index 000000000..52c7adc82 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/23/2319550d1ff59fa4c8fe967d9b6b5adc differ diff --git a/Unity/SCANsat/Library/metadata/23/2319550d1ff59fa4c8fe967d9b6b5adc.info b/Unity/SCANsat/Library/metadata/23/2319550d1ff59fa4c8fe967d9b6b5adc.info new file mode 100644 index 000000000..2185a5237 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/23/2319550d1ff59fa4c8fe967d9b6b5adc.info differ diff --git a/Unity/SCANsat/Library/metadata/25/2563106331ba0f844b342a439bd0837b b/Unity/SCANsat/Library/metadata/25/2563106331ba0f844b342a439bd0837b new file mode 100644 index 000000000..a7d6b07c8 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/25/2563106331ba0f844b342a439bd0837b differ diff --git a/Unity/SCANsat/Library/metadata/25/2563106331ba0f844b342a439bd0837b.info b/Unity/SCANsat/Library/metadata/25/2563106331ba0f844b342a439bd0837b.info new file mode 100644 index 000000000..d4a66fd32 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/25/2563106331ba0f844b342a439bd0837b.info differ diff --git a/Unity/SCANsat/Library/metadata/28/28d4a56e9512d05479c0952c7b2fa008 b/Unity/SCANsat/Library/metadata/28/28d4a56e9512d05479c0952c7b2fa008 new file mode 100644 index 000000000..4847a66ac Binary files /dev/null and b/Unity/SCANsat/Library/metadata/28/28d4a56e9512d05479c0952c7b2fa008 differ diff --git a/Unity/SCANsat/Library/metadata/28/28d4a56e9512d05479c0952c7b2fa008.info b/Unity/SCANsat/Library/metadata/28/28d4a56e9512d05479c0952c7b2fa008.info new file mode 100644 index 000000000..cadfb88f7 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/28/28d4a56e9512d05479c0952c7b2fa008.info differ diff --git a/Unity/SCANsat/Library/metadata/2d/2d489457baf3246419ae8083dd92c971 b/Unity/SCANsat/Library/metadata/2d/2d489457baf3246419ae8083dd92c971 new file mode 100644 index 000000000..3e1d29fb2 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/2d/2d489457baf3246419ae8083dd92c971 differ diff --git a/Unity/SCANsat/Library/metadata/2d/2d489457baf3246419ae8083dd92c971.info b/Unity/SCANsat/Library/metadata/2d/2d489457baf3246419ae8083dd92c971.info new file mode 100644 index 000000000..a57e721b2 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/2d/2d489457baf3246419ae8083dd92c971.info differ diff --git a/Unity/SCANsat/Library/metadata/2e/2ebca85d3473f60439b7ab95440e83d8 b/Unity/SCANsat/Library/metadata/2e/2ebca85d3473f60439b7ab95440e83d8 new file mode 100644 index 000000000..c8bb54070 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/2e/2ebca85d3473f60439b7ab95440e83d8 differ diff --git a/Unity/SCANsat/Library/metadata/2e/2ebca85d3473f60439b7ab95440e83d8.info b/Unity/SCANsat/Library/metadata/2e/2ebca85d3473f60439b7ab95440e83d8.info new file mode 100644 index 000000000..18c95421e Binary files /dev/null and b/Unity/SCANsat/Library/metadata/2e/2ebca85d3473f60439b7ab95440e83d8.info differ diff --git a/Unity/SCANsat/Library/metadata/2f/2f8167d90b7a2c542a47d29bbca95c74 b/Unity/SCANsat/Library/metadata/2f/2f8167d90b7a2c542a47d29bbca95c74 new file mode 100644 index 000000000..66482aa8c Binary files /dev/null and b/Unity/SCANsat/Library/metadata/2f/2f8167d90b7a2c542a47d29bbca95c74 differ diff --git a/Unity/SCANsat/Library/metadata/2f/2f8167d90b7a2c542a47d29bbca95c74.info b/Unity/SCANsat/Library/metadata/2f/2f8167d90b7a2c542a47d29bbca95c74.info new file mode 100644 index 000000000..549fc9d06 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/2f/2f8167d90b7a2c542a47d29bbca95c74.info differ diff --git a/Unity/SCANsat/Library/metadata/31/317f9c637a63af74590fff4bff7f20ae b/Unity/SCANsat/Library/metadata/31/317f9c637a63af74590fff4bff7f20ae new file mode 100644 index 000000000..a8c28dc15 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/31/317f9c637a63af74590fff4bff7f20ae differ diff --git a/Unity/SCANsat/Library/metadata/31/317f9c637a63af74590fff4bff7f20ae.info b/Unity/SCANsat/Library/metadata/31/317f9c637a63af74590fff4bff7f20ae.info new file mode 100644 index 000000000..7f473033e Binary files /dev/null and b/Unity/SCANsat/Library/metadata/31/317f9c637a63af74590fff4bff7f20ae.info differ diff --git a/Unity/SCANsat/Library/metadata/32/32714c7f3312f3a4f8728c7ad5fbfd6e b/Unity/SCANsat/Library/metadata/32/32714c7f3312f3a4f8728c7ad5fbfd6e new file mode 100644 index 000000000..7c11c3d1c Binary files /dev/null and b/Unity/SCANsat/Library/metadata/32/32714c7f3312f3a4f8728c7ad5fbfd6e differ diff --git a/Unity/SCANsat/Library/metadata/32/32714c7f3312f3a4f8728c7ad5fbfd6e.info b/Unity/SCANsat/Library/metadata/32/32714c7f3312f3a4f8728c7ad5fbfd6e.info new file mode 100644 index 000000000..9f41db2f3 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/32/32714c7f3312f3a4f8728c7ad5fbfd6e.info differ diff --git a/Unity/SCANsat/Library/metadata/37/37009ed9069dfce43a12d30fc381f931 b/Unity/SCANsat/Library/metadata/37/37009ed9069dfce43a12d30fc381f931 new file mode 100644 index 000000000..9bb4e331c Binary files /dev/null and b/Unity/SCANsat/Library/metadata/37/37009ed9069dfce43a12d30fc381f931 differ diff --git a/Unity/SCANsat/Library/metadata/37/37009ed9069dfce43a12d30fc381f931.info b/Unity/SCANsat/Library/metadata/37/37009ed9069dfce43a12d30fc381f931.info new file mode 100644 index 000000000..5759c7cc3 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/37/37009ed9069dfce43a12d30fc381f931.info differ diff --git a/Unity/SCANsat/Library/metadata/37/37a01900db115ab4781976bceb4f7057 b/Unity/SCANsat/Library/metadata/37/37a01900db115ab4781976bceb4f7057 new file mode 100644 index 000000000..f22d0b111 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/37/37a01900db115ab4781976bceb4f7057 differ diff --git a/Unity/SCANsat/Library/metadata/37/37a01900db115ab4781976bceb4f7057.info b/Unity/SCANsat/Library/metadata/37/37a01900db115ab4781976bceb4f7057.info new file mode 100644 index 000000000..22420fef9 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/37/37a01900db115ab4781976bceb4f7057.info differ diff --git a/Unity/SCANsat/Library/metadata/39/391e4c929e470b64d85dcb8f52fc68d8 b/Unity/SCANsat/Library/metadata/39/391e4c929e470b64d85dcb8f52fc68d8 new file mode 100644 index 000000000..1ef870b45 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/39/391e4c929e470b64d85dcb8f52fc68d8 differ diff --git a/Unity/SCANsat/Library/metadata/39/391e4c929e470b64d85dcb8f52fc68d8.info b/Unity/SCANsat/Library/metadata/39/391e4c929e470b64d85dcb8f52fc68d8.info new file mode 100644 index 000000000..8b08c2e15 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/39/391e4c929e470b64d85dcb8f52fc68d8.info differ diff --git a/Unity/SCANsat/Library/metadata/3a/3a93b9902ee525542a31962eaa017f67 b/Unity/SCANsat/Library/metadata/3a/3a93b9902ee525542a31962eaa017f67 new file mode 100644 index 000000000..9422c6a85 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/3a/3a93b9902ee525542a31962eaa017f67 differ diff --git a/Unity/SCANsat/Library/metadata/3a/3a93b9902ee525542a31962eaa017f67.info b/Unity/SCANsat/Library/metadata/3a/3a93b9902ee525542a31962eaa017f67.info new file mode 100644 index 000000000..a2d9d17a6 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/3a/3a93b9902ee525542a31962eaa017f67.info differ diff --git a/Unity/SCANsat/Library/metadata/3e/3ee644d0f5d6a744f9d2f7ab6e346c0f b/Unity/SCANsat/Library/metadata/3e/3ee644d0f5d6a744f9d2f7ab6e346c0f new file mode 100644 index 000000000..f5868a567 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/3e/3ee644d0f5d6a744f9d2f7ab6e346c0f differ diff --git a/Unity/SCANsat/Library/metadata/3e/3ee644d0f5d6a744f9d2f7ab6e346c0f.info b/Unity/SCANsat/Library/metadata/3e/3ee644d0f5d6a744f9d2f7ab6e346c0f.info new file mode 100644 index 000000000..7d152c967 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/3e/3ee644d0f5d6a744f9d2f7ab6e346c0f.info differ diff --git a/Unity/SCANsat/Library/metadata/41/416d1084146041e488166d423d3aae4d b/Unity/SCANsat/Library/metadata/41/416d1084146041e488166d423d3aae4d new file mode 100644 index 000000000..3a389ea70 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/41/416d1084146041e488166d423d3aae4d differ diff --git a/Unity/SCANsat/Library/metadata/41/416d1084146041e488166d423d3aae4d.info b/Unity/SCANsat/Library/metadata/41/416d1084146041e488166d423d3aae4d.info new file mode 100644 index 000000000..e34444dd8 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/41/416d1084146041e488166d423d3aae4d.info differ diff --git a/Unity/SCANsat/Library/metadata/42/4270ab78ac4263e4dba328c5b4c6eafb b/Unity/SCANsat/Library/metadata/42/4270ab78ac4263e4dba328c5b4c6eafb new file mode 100644 index 000000000..82e8d89c7 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/42/4270ab78ac4263e4dba328c5b4c6eafb differ diff --git a/Unity/SCANsat/Library/metadata/42/4270ab78ac4263e4dba328c5b4c6eafb.info b/Unity/SCANsat/Library/metadata/42/4270ab78ac4263e4dba328c5b4c6eafb.info new file mode 100644 index 000000000..4ce5020af Binary files /dev/null and b/Unity/SCANsat/Library/metadata/42/4270ab78ac4263e4dba328c5b4c6eafb.info differ diff --git a/Unity/SCANsat/Library/metadata/43/43eae036ac6000d4f893669e938b4439 b/Unity/SCANsat/Library/metadata/43/43eae036ac6000d4f893669e938b4439 new file mode 100644 index 000000000..44f8de2e7 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/43/43eae036ac6000d4f893669e938b4439 differ diff --git a/Unity/SCANsat/Library/metadata/43/43eae036ac6000d4f893669e938b4439.info b/Unity/SCANsat/Library/metadata/43/43eae036ac6000d4f893669e938b4439.info new file mode 100644 index 000000000..8ca0c537a Binary files /dev/null and b/Unity/SCANsat/Library/metadata/43/43eae036ac6000d4f893669e938b4439.info differ diff --git a/Unity/SCANsat/Library/metadata/44/440ec76b6cd2107448cec7a61105b099 b/Unity/SCANsat/Library/metadata/44/440ec76b6cd2107448cec7a61105b099 new file mode 100644 index 000000000..af727a9ec Binary files /dev/null and b/Unity/SCANsat/Library/metadata/44/440ec76b6cd2107448cec7a61105b099 differ diff --git a/Unity/SCANsat/Library/metadata/44/440ec76b6cd2107448cec7a61105b099.info b/Unity/SCANsat/Library/metadata/44/440ec76b6cd2107448cec7a61105b099.info new file mode 100644 index 000000000..725b7cf39 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/44/440ec76b6cd2107448cec7a61105b099.info differ diff --git a/Unity/SCANsat/Library/metadata/44/447176f60300d1a4f9c7b14b585d4f5a b/Unity/SCANsat/Library/metadata/44/447176f60300d1a4f9c7b14b585d4f5a new file mode 100644 index 000000000..6f06680d0 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/44/447176f60300d1a4f9c7b14b585d4f5a differ diff --git a/Unity/SCANsat/Library/metadata/44/447176f60300d1a4f9c7b14b585d4f5a.info b/Unity/SCANsat/Library/metadata/44/447176f60300d1a4f9c7b14b585d4f5a.info new file mode 100644 index 000000000..4c750b899 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/44/447176f60300d1a4f9c7b14b585d4f5a.info differ diff --git a/Unity/SCANsat/Library/metadata/44/447fdf649aaa9394f900505b2fcb6b6e b/Unity/SCANsat/Library/metadata/44/447fdf649aaa9394f900505b2fcb6b6e new file mode 100644 index 000000000..910d38661 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/44/447fdf649aaa9394f900505b2fcb6b6e differ diff --git a/Unity/SCANsat/Library/metadata/44/447fdf649aaa9394f900505b2fcb6b6e.info b/Unity/SCANsat/Library/metadata/44/447fdf649aaa9394f900505b2fcb6b6e.info new file mode 100644 index 000000000..441026f3e Binary files /dev/null and b/Unity/SCANsat/Library/metadata/44/447fdf649aaa9394f900505b2fcb6b6e.info differ diff --git a/Unity/SCANsat/Library/metadata/45/455c0626df2121a458618be36e4cf22b b/Unity/SCANsat/Library/metadata/45/455c0626df2121a458618be36e4cf22b new file mode 100644 index 000000000..97bdd0660 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/45/455c0626df2121a458618be36e4cf22b differ diff --git a/Unity/SCANsat/Library/metadata/45/455c0626df2121a458618be36e4cf22b.info b/Unity/SCANsat/Library/metadata/45/455c0626df2121a458618be36e4cf22b.info new file mode 100644 index 000000000..b4af003af Binary files /dev/null and b/Unity/SCANsat/Library/metadata/45/455c0626df2121a458618be36e4cf22b.info differ diff --git a/Unity/SCANsat/Library/metadata/47/47381c4b358666e44876eb83c5272238 b/Unity/SCANsat/Library/metadata/47/47381c4b358666e44876eb83c5272238 new file mode 100644 index 000000000..bf57280ef Binary files /dev/null and b/Unity/SCANsat/Library/metadata/47/47381c4b358666e44876eb83c5272238 differ diff --git a/Unity/SCANsat/Library/metadata/47/47381c4b358666e44876eb83c5272238.info b/Unity/SCANsat/Library/metadata/47/47381c4b358666e44876eb83c5272238.info new file mode 100644 index 000000000..87776baf2 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/47/47381c4b358666e44876eb83c5272238.info differ diff --git a/Unity/SCANsat/Library/metadata/47/47990fb03129e824caf678339b9eff94 b/Unity/SCANsat/Library/metadata/47/47990fb03129e824caf678339b9eff94 new file mode 100644 index 000000000..02f1ab693 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/47/47990fb03129e824caf678339b9eff94 differ diff --git a/Unity/SCANsat/Library/metadata/47/47990fb03129e824caf678339b9eff94.info b/Unity/SCANsat/Library/metadata/47/47990fb03129e824caf678339b9eff94.info new file mode 100644 index 000000000..684169ccf Binary files /dev/null and b/Unity/SCANsat/Library/metadata/47/47990fb03129e824caf678339b9eff94.info differ diff --git a/Unity/SCANsat/Library/metadata/48/48b4b55d336f10a4b820ebe2c6513590 b/Unity/SCANsat/Library/metadata/48/48b4b55d336f10a4b820ebe2c6513590 new file mode 100644 index 000000000..1f874b279 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/48/48b4b55d336f10a4b820ebe2c6513590 differ diff --git a/Unity/SCANsat/Library/metadata/48/48b4b55d336f10a4b820ebe2c6513590.info b/Unity/SCANsat/Library/metadata/48/48b4b55d336f10a4b820ebe2c6513590.info new file mode 100644 index 000000000..786aa3dad Binary files /dev/null and b/Unity/SCANsat/Library/metadata/48/48b4b55d336f10a4b820ebe2c6513590.info differ diff --git a/Unity/SCANsat/Library/metadata/4e/4eb23d6a8a22cd2408ed28ac1ce15ed3 b/Unity/SCANsat/Library/metadata/4e/4eb23d6a8a22cd2408ed28ac1ce15ed3 new file mode 100644 index 000000000..f2a21d008 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/4e/4eb23d6a8a22cd2408ed28ac1ce15ed3 differ diff --git a/Unity/SCANsat/Library/metadata/4e/4eb23d6a8a22cd2408ed28ac1ce15ed3.info b/Unity/SCANsat/Library/metadata/4e/4eb23d6a8a22cd2408ed28ac1ce15ed3.info new file mode 100644 index 000000000..4c4ef6224 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/4e/4eb23d6a8a22cd2408ed28ac1ce15ed3.info differ diff --git a/Unity/SCANsat/Library/metadata/50/50b97cebe3750724396523067ccc7b8f b/Unity/SCANsat/Library/metadata/50/50b97cebe3750724396523067ccc7b8f new file mode 100644 index 000000000..79f7d64df Binary files /dev/null and b/Unity/SCANsat/Library/metadata/50/50b97cebe3750724396523067ccc7b8f differ diff --git a/Unity/SCANsat/Library/metadata/50/50b97cebe3750724396523067ccc7b8f.info b/Unity/SCANsat/Library/metadata/50/50b97cebe3750724396523067ccc7b8f.info new file mode 100644 index 000000000..2eb50771d Binary files /dev/null and b/Unity/SCANsat/Library/metadata/50/50b97cebe3750724396523067ccc7b8f.info differ diff --git a/Unity/SCANsat/Library/metadata/53/5342206a32fc49a44b5aa0b52a72a8b0 b/Unity/SCANsat/Library/metadata/53/5342206a32fc49a44b5aa0b52a72a8b0 new file mode 100644 index 000000000..aafc14955 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/53/5342206a32fc49a44b5aa0b52a72a8b0 differ diff --git a/Unity/SCANsat/Library/metadata/53/5342206a32fc49a44b5aa0b52a72a8b0.info b/Unity/SCANsat/Library/metadata/53/5342206a32fc49a44b5aa0b52a72a8b0.info new file mode 100644 index 000000000..9408ffc98 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/53/5342206a32fc49a44b5aa0b52a72a8b0.info differ diff --git a/Unity/SCANsat/Library/metadata/57/57cb714d3a5ee604bb1098b92cdce428 b/Unity/SCANsat/Library/metadata/57/57cb714d3a5ee604bb1098b92cdce428 new file mode 100644 index 000000000..ea7e41f45 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/57/57cb714d3a5ee604bb1098b92cdce428 differ diff --git a/Unity/SCANsat/Library/metadata/57/57cb714d3a5ee604bb1098b92cdce428.info b/Unity/SCANsat/Library/metadata/57/57cb714d3a5ee604bb1098b92cdce428.info new file mode 100644 index 000000000..fdc4ca989 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/57/57cb714d3a5ee604bb1098b92cdce428.info differ diff --git a/Unity/SCANsat/Library/metadata/59/59fa1cb2eebf7564ebb45f1250bba1d0 b/Unity/SCANsat/Library/metadata/59/59fa1cb2eebf7564ebb45f1250bba1d0 new file mode 100644 index 000000000..302dcc109 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/59/59fa1cb2eebf7564ebb45f1250bba1d0 differ diff --git a/Unity/SCANsat/Library/metadata/59/59fa1cb2eebf7564ebb45f1250bba1d0.info b/Unity/SCANsat/Library/metadata/59/59fa1cb2eebf7564ebb45f1250bba1d0.info new file mode 100644 index 000000000..4e32c454e Binary files /dev/null and b/Unity/SCANsat/Library/metadata/59/59fa1cb2eebf7564ebb45f1250bba1d0.info differ diff --git a/Unity/SCANsat/Library/metadata/5e/5e5bd0c65e5edba469513d146dbd61f9 b/Unity/SCANsat/Library/metadata/5e/5e5bd0c65e5edba469513d146dbd61f9 new file mode 100644 index 000000000..37911e679 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/5e/5e5bd0c65e5edba469513d146dbd61f9 differ diff --git a/Unity/SCANsat/Library/metadata/5e/5e5bd0c65e5edba469513d146dbd61f9.info b/Unity/SCANsat/Library/metadata/5e/5e5bd0c65e5edba469513d146dbd61f9.info new file mode 100644 index 000000000..61231002d Binary files /dev/null and b/Unity/SCANsat/Library/metadata/5e/5e5bd0c65e5edba469513d146dbd61f9.info differ diff --git a/Unity/SCANsat/Library/metadata/5e/5e813a9bf4f0e824d97c05a7f264a3ba b/Unity/SCANsat/Library/metadata/5e/5e813a9bf4f0e824d97c05a7f264a3ba new file mode 100644 index 000000000..d9ff598d0 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/5e/5e813a9bf4f0e824d97c05a7f264a3ba differ diff --git a/Unity/SCANsat/Library/metadata/5e/5e813a9bf4f0e824d97c05a7f264a3ba.info b/Unity/SCANsat/Library/metadata/5e/5e813a9bf4f0e824d97c05a7f264a3ba.info new file mode 100644 index 000000000..c426565a0 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/5e/5e813a9bf4f0e824d97c05a7f264a3ba.info differ diff --git a/Unity/SCANsat/Library/metadata/5f/5f32cd94baa94578a686d4b9d6b660f7 b/Unity/SCANsat/Library/metadata/5f/5f32cd94baa94578a686d4b9d6b660f7 new file mode 100644 index 000000000..0997ed041 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/5f/5f32cd94baa94578a686d4b9d6b660f7 differ diff --git a/Unity/SCANsat/Library/metadata/5f/5f32cd94baa94578a686d4b9d6b660f7.info b/Unity/SCANsat/Library/metadata/5f/5f32cd94baa94578a686d4b9d6b660f7.info new file mode 100644 index 000000000..8c5318ded Binary files /dev/null and b/Unity/SCANsat/Library/metadata/5f/5f32cd94baa94578a686d4b9d6b660f7.info differ diff --git a/Unity/SCANsat/Library/metadata/60/6064c829ff878e041ac7d1255563f5e5 b/Unity/SCANsat/Library/metadata/60/6064c829ff878e041ac7d1255563f5e5 new file mode 100644 index 000000000..a8886e306 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/60/6064c829ff878e041ac7d1255563f5e5 differ diff --git a/Unity/SCANsat/Library/metadata/60/6064c829ff878e041ac7d1255563f5e5.info b/Unity/SCANsat/Library/metadata/60/6064c829ff878e041ac7d1255563f5e5.info new file mode 100644 index 000000000..be5d86348 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/60/6064c829ff878e041ac7d1255563f5e5.info differ diff --git a/Unity/SCANsat/Library/metadata/62/6203aefd0f9f41e439681638e43b2602 b/Unity/SCANsat/Library/metadata/62/6203aefd0f9f41e439681638e43b2602 new file mode 100644 index 000000000..53a6eaf31 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/62/6203aefd0f9f41e439681638e43b2602 differ diff --git a/Unity/SCANsat/Library/metadata/62/6203aefd0f9f41e439681638e43b2602.info b/Unity/SCANsat/Library/metadata/62/6203aefd0f9f41e439681638e43b2602.info new file mode 100644 index 000000000..7185acfbe Binary files /dev/null and b/Unity/SCANsat/Library/metadata/62/6203aefd0f9f41e439681638e43b2602.info differ diff --git a/Unity/SCANsat/Library/metadata/63/63dd60cf8a200d344be8850b7200a374 b/Unity/SCANsat/Library/metadata/63/63dd60cf8a200d344be8850b7200a374 new file mode 100644 index 000000000..fa3f5beaf Binary files /dev/null and b/Unity/SCANsat/Library/metadata/63/63dd60cf8a200d344be8850b7200a374 differ diff --git a/Unity/SCANsat/Library/metadata/63/63dd60cf8a200d344be8850b7200a374.info b/Unity/SCANsat/Library/metadata/63/63dd60cf8a200d344be8850b7200a374.info new file mode 100644 index 000000000..a58d0187c Binary files /dev/null and b/Unity/SCANsat/Library/metadata/63/63dd60cf8a200d344be8850b7200a374.info differ diff --git a/Unity/SCANsat/Library/metadata/64/6413f99763adc364d80216dd42365ed8 b/Unity/SCANsat/Library/metadata/64/6413f99763adc364d80216dd42365ed8 new file mode 100644 index 000000000..55b4e0f50 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/64/6413f99763adc364d80216dd42365ed8 differ diff --git a/Unity/SCANsat/Library/metadata/64/6413f99763adc364d80216dd42365ed8.info b/Unity/SCANsat/Library/metadata/64/6413f99763adc364d80216dd42365ed8.info new file mode 100644 index 000000000..0a97f059e Binary files /dev/null and b/Unity/SCANsat/Library/metadata/64/6413f99763adc364d80216dd42365ed8.info differ diff --git a/Unity/SCANsat/Library/metadata/64/647bbf5cf6c08c04c8d4b753202b0808 b/Unity/SCANsat/Library/metadata/64/647bbf5cf6c08c04c8d4b753202b0808 new file mode 100644 index 000000000..56cfdd299 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/64/647bbf5cf6c08c04c8d4b753202b0808 differ diff --git a/Unity/SCANsat/Library/metadata/64/647bbf5cf6c08c04c8d4b753202b0808.info b/Unity/SCANsat/Library/metadata/64/647bbf5cf6c08c04c8d4b753202b0808.info new file mode 100644 index 000000000..cebf133a7 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/64/647bbf5cf6c08c04c8d4b753202b0808.info differ diff --git a/Unity/SCANsat/Library/metadata/67/6766600fc1203e447be7a1fdcabadea5 b/Unity/SCANsat/Library/metadata/67/6766600fc1203e447be7a1fdcabadea5 new file mode 100644 index 000000000..b1f2b1042 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/67/6766600fc1203e447be7a1fdcabadea5 differ diff --git a/Unity/SCANsat/Library/metadata/67/6766600fc1203e447be7a1fdcabadea5.info b/Unity/SCANsat/Library/metadata/67/6766600fc1203e447be7a1fdcabadea5.info new file mode 100644 index 000000000..a17b0d602 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/67/6766600fc1203e447be7a1fdcabadea5.info differ diff --git a/Unity/SCANsat/Library/metadata/6a/6a52d514389e28b438ae8544be1ac27b b/Unity/SCANsat/Library/metadata/6a/6a52d514389e28b438ae8544be1ac27b new file mode 100644 index 000000000..c3af78907 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/6a/6a52d514389e28b438ae8544be1ac27b differ diff --git a/Unity/SCANsat/Library/metadata/6a/6a52d514389e28b438ae8544be1ac27b.info b/Unity/SCANsat/Library/metadata/6a/6a52d514389e28b438ae8544be1ac27b.info new file mode 100644 index 000000000..7712c0a01 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/6a/6a52d514389e28b438ae8544be1ac27b.info differ diff --git a/Unity/SCANsat/Library/metadata/6b/6b182b342e654ec4eaae0c63222c72c5 b/Unity/SCANsat/Library/metadata/6b/6b182b342e654ec4eaae0c63222c72c5 new file mode 100644 index 000000000..c0513d851 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/6b/6b182b342e654ec4eaae0c63222c72c5 differ diff --git a/Unity/SCANsat/Library/metadata/6b/6b182b342e654ec4eaae0c63222c72c5.info b/Unity/SCANsat/Library/metadata/6b/6b182b342e654ec4eaae0c63222c72c5.info new file mode 100644 index 000000000..fd85bde93 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/6b/6b182b342e654ec4eaae0c63222c72c5.info differ diff --git a/Unity/SCANsat/Library/metadata/6c/6c0f91a68c891bd448d569c8bf4e57d4 b/Unity/SCANsat/Library/metadata/6c/6c0f91a68c891bd448d569c8bf4e57d4 new file mode 100644 index 000000000..1e402e0f9 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/6c/6c0f91a68c891bd448d569c8bf4e57d4 differ diff --git a/Unity/SCANsat/Library/metadata/6c/6c0f91a68c891bd448d569c8bf4e57d4.info b/Unity/SCANsat/Library/metadata/6c/6c0f91a68c891bd448d569c8bf4e57d4.info new file mode 100644 index 000000000..7d371198e Binary files /dev/null and b/Unity/SCANsat/Library/metadata/6c/6c0f91a68c891bd448d569c8bf4e57d4.info differ diff --git a/Unity/SCANsat/Library/metadata/6d/6d85e30bba4b9974ab34d7d199c19c39 b/Unity/SCANsat/Library/metadata/6d/6d85e30bba4b9974ab34d7d199c19c39 new file mode 100644 index 000000000..85b645a2f Binary files /dev/null and b/Unity/SCANsat/Library/metadata/6d/6d85e30bba4b9974ab34d7d199c19c39 differ diff --git a/Unity/SCANsat/Library/metadata/6d/6d85e30bba4b9974ab34d7d199c19c39.info b/Unity/SCANsat/Library/metadata/6d/6d85e30bba4b9974ab34d7d199c19c39.info new file mode 100644 index 000000000..770ab2114 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/6d/6d85e30bba4b9974ab34d7d199c19c39.info differ diff --git a/Unity/SCANsat/Library/metadata/6e/6e022ecf83711614898f353118151c0c b/Unity/SCANsat/Library/metadata/6e/6e022ecf83711614898f353118151c0c new file mode 100644 index 000000000..5a263c516 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/6e/6e022ecf83711614898f353118151c0c differ diff --git a/Unity/SCANsat/Library/metadata/6e/6e022ecf83711614898f353118151c0c.info b/Unity/SCANsat/Library/metadata/6e/6e022ecf83711614898f353118151c0c.info new file mode 100644 index 000000000..738ba0d00 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/6e/6e022ecf83711614898f353118151c0c.info differ diff --git a/Unity/SCANsat/Library/metadata/6e/6e39034f4b892364b80b8c3c587ec7cf b/Unity/SCANsat/Library/metadata/6e/6e39034f4b892364b80b8c3c587ec7cf new file mode 100644 index 000000000..85c183fb9 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/6e/6e39034f4b892364b80b8c3c587ec7cf differ diff --git a/Unity/SCANsat/Library/metadata/6e/6e39034f4b892364b80b8c3c587ec7cf.info b/Unity/SCANsat/Library/metadata/6e/6e39034f4b892364b80b8c3c587ec7cf.info new file mode 100644 index 000000000..ed4dc96f3 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/6e/6e39034f4b892364b80b8c3c587ec7cf.info differ diff --git a/Unity/SCANsat/Library/metadata/6e/6e531e6240274bd4da922c487b5d3ad4 b/Unity/SCANsat/Library/metadata/6e/6e531e6240274bd4da922c487b5d3ad4 new file mode 100644 index 000000000..1ab17c7e8 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/6e/6e531e6240274bd4da922c487b5d3ad4 differ diff --git a/Unity/SCANsat/Library/metadata/6e/6e531e6240274bd4da922c487b5d3ad4.info b/Unity/SCANsat/Library/metadata/6e/6e531e6240274bd4da922c487b5d3ad4.info new file mode 100644 index 000000000..aeb154195 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/6e/6e531e6240274bd4da922c487b5d3ad4.info differ diff --git a/Unity/SCANsat/Library/metadata/71/71d691a1ba90b014586b4b38a7035877 b/Unity/SCANsat/Library/metadata/71/71d691a1ba90b014586b4b38a7035877 new file mode 100644 index 000000000..e371b9c85 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/71/71d691a1ba90b014586b4b38a7035877 differ diff --git a/Unity/SCANsat/Library/metadata/71/71d691a1ba90b014586b4b38a7035877.info b/Unity/SCANsat/Library/metadata/71/71d691a1ba90b014586b4b38a7035877.info new file mode 100644 index 000000000..81b2ac54f Binary files /dev/null and b/Unity/SCANsat/Library/metadata/71/71d691a1ba90b014586b4b38a7035877.info differ diff --git a/Unity/SCANsat/Library/metadata/73/739bbd9f364b4268874f9fd86ab3beef b/Unity/SCANsat/Library/metadata/73/739bbd9f364b4268874f9fd86ab3beef new file mode 100644 index 000000000..032777241 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/73/739bbd9f364b4268874f9fd86ab3beef differ diff --git a/Unity/SCANsat/Library/metadata/73/739bbd9f364b4268874f9fd86ab3beef.info b/Unity/SCANsat/Library/metadata/73/739bbd9f364b4268874f9fd86ab3beef.info new file mode 100644 index 000000000..215c5c8c3 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/73/739bbd9f364b4268874f9fd86ab3beef.info differ diff --git a/Unity/SCANsat/Library/metadata/73/73e03e12e4caab048aaece61fcda68b5 b/Unity/SCANsat/Library/metadata/73/73e03e12e4caab048aaece61fcda68b5 new file mode 100644 index 000000000..0e9492328 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/73/73e03e12e4caab048aaece61fcda68b5 differ diff --git a/Unity/SCANsat/Library/metadata/73/73e03e12e4caab048aaece61fcda68b5.info b/Unity/SCANsat/Library/metadata/73/73e03e12e4caab048aaece61fcda68b5.info new file mode 100644 index 000000000..1119636cf Binary files /dev/null and b/Unity/SCANsat/Library/metadata/73/73e03e12e4caab048aaece61fcda68b5.info differ diff --git a/Unity/SCANsat/Library/metadata/75/750a642a117d6fe46b759abe8655f308 b/Unity/SCANsat/Library/metadata/75/750a642a117d6fe46b759abe8655f308 new file mode 100644 index 000000000..426ae5846 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/75/750a642a117d6fe46b759abe8655f308 differ diff --git a/Unity/SCANsat/Library/metadata/75/750a642a117d6fe46b759abe8655f308.info b/Unity/SCANsat/Library/metadata/75/750a642a117d6fe46b759abe8655f308.info new file mode 100644 index 000000000..ad90ba8d5 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/75/750a642a117d6fe46b759abe8655f308.info differ diff --git a/Unity/SCANsat/Library/metadata/76/76cce73bbb3438a45b519fa3ae916f7c b/Unity/SCANsat/Library/metadata/76/76cce73bbb3438a45b519fa3ae916f7c new file mode 100644 index 000000000..a58bbc873 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/76/76cce73bbb3438a45b519fa3ae916f7c differ diff --git a/Unity/SCANsat/Library/metadata/76/76cce73bbb3438a45b519fa3ae916f7c.info b/Unity/SCANsat/Library/metadata/76/76cce73bbb3438a45b519fa3ae916f7c.info new file mode 100644 index 000000000..288886c47 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/76/76cce73bbb3438a45b519fa3ae916f7c.info differ diff --git a/Unity/SCANsat/Library/metadata/78/7810c03ce9571f74183306825d39e103 b/Unity/SCANsat/Library/metadata/78/7810c03ce9571f74183306825d39e103 new file mode 100644 index 000000000..3855067e4 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/78/7810c03ce9571f74183306825d39e103 differ diff --git a/Unity/SCANsat/Library/metadata/78/7810c03ce9571f74183306825d39e103.info b/Unity/SCANsat/Library/metadata/78/7810c03ce9571f74183306825d39e103.info new file mode 100644 index 000000000..1b7000d29 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/78/7810c03ce9571f74183306825d39e103.info differ diff --git a/Unity/SCANsat/Library/metadata/7a/7a56f7dccead3fb4b9a92149edc6383b b/Unity/SCANsat/Library/metadata/7a/7a56f7dccead3fb4b9a92149edc6383b new file mode 100644 index 000000000..b44a920da Binary files /dev/null and b/Unity/SCANsat/Library/metadata/7a/7a56f7dccead3fb4b9a92149edc6383b differ diff --git a/Unity/SCANsat/Library/metadata/7a/7a56f7dccead3fb4b9a92149edc6383b.info b/Unity/SCANsat/Library/metadata/7a/7a56f7dccead3fb4b9a92149edc6383b.info new file mode 100644 index 000000000..72df96179 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/7a/7a56f7dccead3fb4b9a92149edc6383b.info differ diff --git a/Unity/SCANsat/Library/metadata/7b/7b5a334b8e9f5e74983a8ebbdd26dca0 b/Unity/SCANsat/Library/metadata/7b/7b5a334b8e9f5e74983a8ebbdd26dca0 new file mode 100644 index 000000000..d87c9e22b Binary files /dev/null and b/Unity/SCANsat/Library/metadata/7b/7b5a334b8e9f5e74983a8ebbdd26dca0 differ diff --git a/Unity/SCANsat/Library/metadata/7b/7b5a334b8e9f5e74983a8ebbdd26dca0.info b/Unity/SCANsat/Library/metadata/7b/7b5a334b8e9f5e74983a8ebbdd26dca0.info new file mode 100644 index 000000000..62a12cd68 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/7b/7b5a334b8e9f5e74983a8ebbdd26dca0.info differ diff --git a/Unity/SCANsat/Library/metadata/7b/7baf40380fc75c644b30f0fdaef9df87 b/Unity/SCANsat/Library/metadata/7b/7baf40380fc75c644b30f0fdaef9df87 new file mode 100644 index 000000000..6460804b5 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/7b/7baf40380fc75c644b30f0fdaef9df87 differ diff --git a/Unity/SCANsat/Library/metadata/7b/7baf40380fc75c644b30f0fdaef9df87.info b/Unity/SCANsat/Library/metadata/7b/7baf40380fc75c644b30f0fdaef9df87.info new file mode 100644 index 000000000..10ccc5e6b Binary files /dev/null and b/Unity/SCANsat/Library/metadata/7b/7baf40380fc75c644b30f0fdaef9df87.info differ diff --git a/Unity/SCANsat/Library/metadata/7c/7c0652604e6b38842b3cdf1ee486761e b/Unity/SCANsat/Library/metadata/7c/7c0652604e6b38842b3cdf1ee486761e new file mode 100644 index 000000000..c31332b29 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/7c/7c0652604e6b38842b3cdf1ee486761e differ diff --git a/Unity/SCANsat/Library/metadata/7c/7c0652604e6b38842b3cdf1ee486761e.info b/Unity/SCANsat/Library/metadata/7c/7c0652604e6b38842b3cdf1ee486761e.info new file mode 100644 index 000000000..8d3c2ec7f Binary files /dev/null and b/Unity/SCANsat/Library/metadata/7c/7c0652604e6b38842b3cdf1ee486761e.info differ diff --git a/Unity/SCANsat/Library/metadata/7f/7f5bed1f9aa762b41942b1832536a846 b/Unity/SCANsat/Library/metadata/7f/7f5bed1f9aa762b41942b1832536a846 new file mode 100644 index 000000000..b4650a11f Binary files /dev/null and b/Unity/SCANsat/Library/metadata/7f/7f5bed1f9aa762b41942b1832536a846 differ diff --git a/Unity/SCANsat/Library/metadata/7f/7f5bed1f9aa762b41942b1832536a846.info b/Unity/SCANsat/Library/metadata/7f/7f5bed1f9aa762b41942b1832536a846.info new file mode 100644 index 000000000..485f3cfdd Binary files /dev/null and b/Unity/SCANsat/Library/metadata/7f/7f5bed1f9aa762b41942b1832536a846.info differ diff --git a/Unity/SCANsat/Library/metadata/7f/7fbafb50c77e28d49a117a7810a321bf b/Unity/SCANsat/Library/metadata/7f/7fbafb50c77e28d49a117a7810a321bf new file mode 100644 index 000000000..015127521 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/7f/7fbafb50c77e28d49a117a7810a321bf differ diff --git a/Unity/SCANsat/Library/metadata/7f/7fbafb50c77e28d49a117a7810a321bf.info b/Unity/SCANsat/Library/metadata/7f/7fbafb50c77e28d49a117a7810a321bf.info new file mode 100644 index 000000000..69d32a314 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/7f/7fbafb50c77e28d49a117a7810a321bf.info differ diff --git a/Unity/SCANsat/Library/metadata/80/80a3616ca19596e4da0f10f14d241e9f b/Unity/SCANsat/Library/metadata/80/80a3616ca19596e4da0f10f14d241e9f new file mode 100644 index 000000000..a8f15ee2d Binary files /dev/null and b/Unity/SCANsat/Library/metadata/80/80a3616ca19596e4da0f10f14d241e9f differ diff --git a/Unity/SCANsat/Library/metadata/80/80a3616ca19596e4da0f10f14d241e9f.info b/Unity/SCANsat/Library/metadata/80/80a3616ca19596e4da0f10f14d241e9f.info new file mode 100644 index 000000000..f32f6de9b Binary files /dev/null and b/Unity/SCANsat/Library/metadata/80/80a3616ca19596e4da0f10f14d241e9f.info differ diff --git a/Unity/SCANsat/Library/metadata/82/82d69a3eb260f1240b2f1bd77c20245a b/Unity/SCANsat/Library/metadata/82/82d69a3eb260f1240b2f1bd77c20245a new file mode 100644 index 000000000..779fa91f6 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/82/82d69a3eb260f1240b2f1bd77c20245a differ diff --git a/Unity/SCANsat/Library/metadata/82/82d69a3eb260f1240b2f1bd77c20245a.info b/Unity/SCANsat/Library/metadata/82/82d69a3eb260f1240b2f1bd77c20245a.info new file mode 100644 index 000000000..8013f667a Binary files /dev/null and b/Unity/SCANsat/Library/metadata/82/82d69a3eb260f1240b2f1bd77c20245a.info differ diff --git a/Unity/SCANsat/Library/metadata/83/8352fe9d461613147aeb2950364ed355 b/Unity/SCANsat/Library/metadata/83/8352fe9d461613147aeb2950364ed355 new file mode 100644 index 000000000..536807761 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/83/8352fe9d461613147aeb2950364ed355 differ diff --git a/Unity/SCANsat/Library/metadata/83/8352fe9d461613147aeb2950364ed355.info b/Unity/SCANsat/Library/metadata/83/8352fe9d461613147aeb2950364ed355.info new file mode 100644 index 000000000..89eb2e1fe Binary files /dev/null and b/Unity/SCANsat/Library/metadata/83/8352fe9d461613147aeb2950364ed355.info differ diff --git a/Unity/SCANsat/Library/metadata/85/852e56802eb941638acbb491814497b0 b/Unity/SCANsat/Library/metadata/85/852e56802eb941638acbb491814497b0 new file mode 100644 index 000000000..14a92aab6 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/85/852e56802eb941638acbb491814497b0 differ diff --git a/Unity/SCANsat/Library/metadata/85/852e56802eb941638acbb491814497b0.info b/Unity/SCANsat/Library/metadata/85/852e56802eb941638acbb491814497b0.info new file mode 100644 index 000000000..986d4071a Binary files /dev/null and b/Unity/SCANsat/Library/metadata/85/852e56802eb941638acbb491814497b0.info differ diff --git a/Unity/SCANsat/Library/metadata/85/857ba6549eff78c4e9e8faafbc93b15e b/Unity/SCANsat/Library/metadata/85/857ba6549eff78c4e9e8faafbc93b15e new file mode 100644 index 000000000..813fc0e6d Binary files /dev/null and b/Unity/SCANsat/Library/metadata/85/857ba6549eff78c4e9e8faafbc93b15e differ diff --git a/Unity/SCANsat/Library/metadata/85/857ba6549eff78c4e9e8faafbc93b15e.info b/Unity/SCANsat/Library/metadata/85/857ba6549eff78c4e9e8faafbc93b15e.info new file mode 100644 index 000000000..6dc0a7e8c Binary files /dev/null and b/Unity/SCANsat/Library/metadata/85/857ba6549eff78c4e9e8faafbc93b15e.info differ diff --git a/Unity/SCANsat/Library/metadata/87/870353891bb340e2b2a9c8707e7419ba b/Unity/SCANsat/Library/metadata/87/870353891bb340e2b2a9c8707e7419ba new file mode 100644 index 000000000..9ba8483c0 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/87/870353891bb340e2b2a9c8707e7419ba differ diff --git a/Unity/SCANsat/Library/metadata/87/870353891bb340e2b2a9c8707e7419ba.info b/Unity/SCANsat/Library/metadata/87/870353891bb340e2b2a9c8707e7419ba.info new file mode 100644 index 000000000..369e8738c Binary files /dev/null and b/Unity/SCANsat/Library/metadata/87/870353891bb340e2b2a9c8707e7419ba.info differ diff --git a/Unity/SCANsat/Library/metadata/87/87454d73504bed9439b4ffa240a9d330 b/Unity/SCANsat/Library/metadata/87/87454d73504bed9439b4ffa240a9d330 new file mode 100644 index 000000000..6f45f05af Binary files /dev/null and b/Unity/SCANsat/Library/metadata/87/87454d73504bed9439b4ffa240a9d330 differ diff --git a/Unity/SCANsat/Library/metadata/87/87454d73504bed9439b4ffa240a9d330.info b/Unity/SCANsat/Library/metadata/87/87454d73504bed9439b4ffa240a9d330.info new file mode 100644 index 000000000..62f177655 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/87/87454d73504bed9439b4ffa240a9d330.info differ diff --git a/Unity/SCANsat/Library/metadata/89/895c433ff88d41d448b007428fb56cf7 b/Unity/SCANsat/Library/metadata/89/895c433ff88d41d448b007428fb56cf7 new file mode 100644 index 000000000..80293632d Binary files /dev/null and b/Unity/SCANsat/Library/metadata/89/895c433ff88d41d448b007428fb56cf7 differ diff --git a/Unity/SCANsat/Library/metadata/89/895c433ff88d41d448b007428fb56cf7.info b/Unity/SCANsat/Library/metadata/89/895c433ff88d41d448b007428fb56cf7.info new file mode 100644 index 000000000..8446db097 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/89/895c433ff88d41d448b007428fb56cf7.info differ diff --git a/Unity/SCANsat/Library/metadata/8a/8a559c6f89fd56a4aa6cd1f9b793994d b/Unity/SCANsat/Library/metadata/8a/8a559c6f89fd56a4aa6cd1f9b793994d new file mode 100644 index 000000000..1201bda32 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/8a/8a559c6f89fd56a4aa6cd1f9b793994d differ diff --git a/Unity/SCANsat/Library/metadata/8a/8a559c6f89fd56a4aa6cd1f9b793994d.info b/Unity/SCANsat/Library/metadata/8a/8a559c6f89fd56a4aa6cd1f9b793994d.info new file mode 100644 index 000000000..e16cc7518 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/8a/8a559c6f89fd56a4aa6cd1f9b793994d.info differ diff --git a/Unity/SCANsat/Library/metadata/8d/8deb5d99e5582cb4fa66782c19ee43ad b/Unity/SCANsat/Library/metadata/8d/8deb5d99e5582cb4fa66782c19ee43ad new file mode 100644 index 000000000..9e949e304 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/8d/8deb5d99e5582cb4fa66782c19ee43ad differ diff --git a/Unity/SCANsat/Library/metadata/8d/8deb5d99e5582cb4fa66782c19ee43ad.info b/Unity/SCANsat/Library/metadata/8d/8deb5d99e5582cb4fa66782c19ee43ad.info new file mode 100644 index 000000000..0ffbb25e9 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/8d/8deb5d99e5582cb4fa66782c19ee43ad.info differ diff --git a/Unity/SCANsat/Library/metadata/8e/8e39db43beb39574e9e50ada5b328219 b/Unity/SCANsat/Library/metadata/8e/8e39db43beb39574e9e50ada5b328219 new file mode 100644 index 000000000..7f51488f1 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/8e/8e39db43beb39574e9e50ada5b328219 differ diff --git a/Unity/SCANsat/Library/metadata/8e/8e39db43beb39574e9e50ada5b328219.info b/Unity/SCANsat/Library/metadata/8e/8e39db43beb39574e9e50ada5b328219.info new file mode 100644 index 000000000..777667c03 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/8e/8e39db43beb39574e9e50ada5b328219.info differ diff --git a/Unity/SCANsat/Library/metadata/8e/8ed7726534327fb4bbed9fcac30e463c b/Unity/SCANsat/Library/metadata/8e/8ed7726534327fb4bbed9fcac30e463c new file mode 100644 index 000000000..938e0b501 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/8e/8ed7726534327fb4bbed9fcac30e463c differ diff --git a/Unity/SCANsat/Library/metadata/8e/8ed7726534327fb4bbed9fcac30e463c.info b/Unity/SCANsat/Library/metadata/8e/8ed7726534327fb4bbed9fcac30e463c.info new file mode 100644 index 000000000..b6797680d Binary files /dev/null and b/Unity/SCANsat/Library/metadata/8e/8ed7726534327fb4bbed9fcac30e463c.info differ diff --git a/Unity/SCANsat/Library/metadata/90/90118262cf80c7549ab37dd61d08c605 b/Unity/SCANsat/Library/metadata/90/90118262cf80c7549ab37dd61d08c605 new file mode 100644 index 000000000..1f56789a8 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/90/90118262cf80c7549ab37dd61d08c605 differ diff --git a/Unity/SCANsat/Library/metadata/90/90118262cf80c7549ab37dd61d08c605.info b/Unity/SCANsat/Library/metadata/90/90118262cf80c7549ab37dd61d08c605.info new file mode 100644 index 000000000..4f8652bdc Binary files /dev/null and b/Unity/SCANsat/Library/metadata/90/90118262cf80c7549ab37dd61d08c605.info differ diff --git a/Unity/SCANsat/Library/metadata/90/90b2f35ab609b0c47885b96b4820c28d b/Unity/SCANsat/Library/metadata/90/90b2f35ab609b0c47885b96b4820c28d new file mode 100644 index 000000000..1b7b659f6 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/90/90b2f35ab609b0c47885b96b4820c28d differ diff --git a/Unity/SCANsat/Library/metadata/90/90b2f35ab609b0c47885b96b4820c28d.info b/Unity/SCANsat/Library/metadata/90/90b2f35ab609b0c47885b96b4820c28d.info new file mode 100644 index 000000000..af480f107 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/90/90b2f35ab609b0c47885b96b4820c28d.info differ diff --git a/Unity/SCANsat/Library/metadata/90/90b3f11cfafacdb458ea8f85df8f35a0 b/Unity/SCANsat/Library/metadata/90/90b3f11cfafacdb458ea8f85df8f35a0 new file mode 100644 index 000000000..e68587fa0 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/90/90b3f11cfafacdb458ea8f85df8f35a0 differ diff --git a/Unity/SCANsat/Library/metadata/90/90b3f11cfafacdb458ea8f85df8f35a0.info b/Unity/SCANsat/Library/metadata/90/90b3f11cfafacdb458ea8f85df8f35a0.info new file mode 100644 index 000000000..be8db6aff Binary files /dev/null and b/Unity/SCANsat/Library/metadata/90/90b3f11cfafacdb458ea8f85df8f35a0.info differ diff --git a/Unity/SCANsat/Library/metadata/91/9144307c67efb2d4c974f88b0706a9e1 b/Unity/SCANsat/Library/metadata/91/9144307c67efb2d4c974f88b0706a9e1 new file mode 100644 index 000000000..38b1b8a23 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/91/9144307c67efb2d4c974f88b0706a9e1 differ diff --git a/Unity/SCANsat/Library/metadata/91/9144307c67efb2d4c974f88b0706a9e1.info b/Unity/SCANsat/Library/metadata/91/9144307c67efb2d4c974f88b0706a9e1.info new file mode 100644 index 000000000..67352b64a Binary files /dev/null and b/Unity/SCANsat/Library/metadata/91/9144307c67efb2d4c974f88b0706a9e1.info differ diff --git a/Unity/SCANsat/Library/metadata/91/91f6e47e2b98cb344bf578969233905c b/Unity/SCANsat/Library/metadata/91/91f6e47e2b98cb344bf578969233905c new file mode 100644 index 000000000..d2edfa38b Binary files /dev/null and b/Unity/SCANsat/Library/metadata/91/91f6e47e2b98cb344bf578969233905c differ diff --git a/Unity/SCANsat/Library/metadata/91/91f6e47e2b98cb344bf578969233905c.info b/Unity/SCANsat/Library/metadata/91/91f6e47e2b98cb344bf578969233905c.info new file mode 100644 index 000000000..0a1524790 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/91/91f6e47e2b98cb344bf578969233905c.info differ diff --git a/Unity/SCANsat/Library/metadata/93/93c51599ea7238543b44294027bab304 b/Unity/SCANsat/Library/metadata/93/93c51599ea7238543b44294027bab304 new file mode 100644 index 000000000..bbd5e5db4 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/93/93c51599ea7238543b44294027bab304 differ diff --git a/Unity/SCANsat/Library/metadata/93/93c51599ea7238543b44294027bab304.info b/Unity/SCANsat/Library/metadata/93/93c51599ea7238543b44294027bab304.info new file mode 100644 index 000000000..98d31a37f Binary files /dev/null and b/Unity/SCANsat/Library/metadata/93/93c51599ea7238543b44294027bab304.info differ diff --git a/Unity/SCANsat/Library/metadata/94/9488bd4d6b3882c4fbbf08698a6dbfd2 b/Unity/SCANsat/Library/metadata/94/9488bd4d6b3882c4fbbf08698a6dbfd2 new file mode 100644 index 000000000..aa565907b Binary files /dev/null and b/Unity/SCANsat/Library/metadata/94/9488bd4d6b3882c4fbbf08698a6dbfd2 differ diff --git a/Unity/SCANsat/Library/metadata/94/9488bd4d6b3882c4fbbf08698a6dbfd2.info b/Unity/SCANsat/Library/metadata/94/9488bd4d6b3882c4fbbf08698a6dbfd2.info new file mode 100644 index 000000000..adbde0737 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/94/9488bd4d6b3882c4fbbf08698a6dbfd2.info differ diff --git a/Unity/SCANsat/Library/metadata/95/95f19472caf6c3f41926acb8935c102b b/Unity/SCANsat/Library/metadata/95/95f19472caf6c3f41926acb8935c102b new file mode 100644 index 000000000..7c32e06fe Binary files /dev/null and b/Unity/SCANsat/Library/metadata/95/95f19472caf6c3f41926acb8935c102b differ diff --git a/Unity/SCANsat/Library/metadata/95/95f19472caf6c3f41926acb8935c102b.info b/Unity/SCANsat/Library/metadata/95/95f19472caf6c3f41926acb8935c102b.info new file mode 100644 index 000000000..7f67d5224 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/95/95f19472caf6c3f41926acb8935c102b.info differ diff --git a/Unity/SCANsat/Library/metadata/97/9734ff0747239d44db81bfccdd6b3eee b/Unity/SCANsat/Library/metadata/97/9734ff0747239d44db81bfccdd6b3eee new file mode 100644 index 000000000..19c7c9bc6 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/97/9734ff0747239d44db81bfccdd6b3eee differ diff --git a/Unity/SCANsat/Library/metadata/97/9734ff0747239d44db81bfccdd6b3eee.info b/Unity/SCANsat/Library/metadata/97/9734ff0747239d44db81bfccdd6b3eee.info new file mode 100644 index 000000000..9c85a4271 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/97/9734ff0747239d44db81bfccdd6b3eee.info differ diff --git a/Unity/SCANsat/Library/metadata/97/97b908131649fa24fa74da8a884d37cd b/Unity/SCANsat/Library/metadata/97/97b908131649fa24fa74da8a884d37cd new file mode 100644 index 000000000..30f2eda39 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/97/97b908131649fa24fa74da8a884d37cd differ diff --git a/Unity/SCANsat/Library/metadata/97/97b908131649fa24fa74da8a884d37cd.info b/Unity/SCANsat/Library/metadata/97/97b908131649fa24fa74da8a884d37cd.info new file mode 100644 index 000000000..0410b7145 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/97/97b908131649fa24fa74da8a884d37cd.info differ diff --git a/Unity/SCANsat/Library/metadata/97/97decbdab0634cdd991f8d23ddf0dead b/Unity/SCANsat/Library/metadata/97/97decbdab0634cdd991f8d23ddf0dead new file mode 100644 index 000000000..d5a8a9aca Binary files /dev/null and b/Unity/SCANsat/Library/metadata/97/97decbdab0634cdd991f8d23ddf0dead differ diff --git a/Unity/SCANsat/Library/metadata/97/97decbdab0634cdd991f8d23ddf0dead.info b/Unity/SCANsat/Library/metadata/97/97decbdab0634cdd991f8d23ddf0dead.info new file mode 100644 index 000000000..4cbe3c711 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/97/97decbdab0634cdd991f8d23ddf0dead.info differ diff --git a/Unity/SCANsat/Library/metadata/99/9952cedaea0c1b84a82b97271046a88d b/Unity/SCANsat/Library/metadata/99/9952cedaea0c1b84a82b97271046a88d new file mode 100644 index 000000000..483a69e31 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/99/9952cedaea0c1b84a82b97271046a88d differ diff --git a/Unity/SCANsat/Library/metadata/99/9952cedaea0c1b84a82b97271046a88d.info b/Unity/SCANsat/Library/metadata/99/9952cedaea0c1b84a82b97271046a88d.info new file mode 100644 index 000000000..8d788a2bb Binary files /dev/null and b/Unity/SCANsat/Library/metadata/99/9952cedaea0c1b84a82b97271046a88d.info differ diff --git a/Unity/SCANsat/Library/metadata/9b/9b24a85b915a76146b8d86276a6346fb b/Unity/SCANsat/Library/metadata/9b/9b24a85b915a76146b8d86276a6346fb new file mode 100644 index 000000000..72218dd81 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/9b/9b24a85b915a76146b8d86276a6346fb differ diff --git a/Unity/SCANsat/Library/metadata/9b/9b24a85b915a76146b8d86276a6346fb.info b/Unity/SCANsat/Library/metadata/9b/9b24a85b915a76146b8d86276a6346fb.info new file mode 100644 index 000000000..43296ab52 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/9b/9b24a85b915a76146b8d86276a6346fb.info differ diff --git a/Unity/SCANsat/Library/metadata/9b/9bb4f07ad47d6044590bf8e2546a6658 b/Unity/SCANsat/Library/metadata/9b/9bb4f07ad47d6044590bf8e2546a6658 new file mode 100644 index 000000000..d8f9cafcf Binary files /dev/null and b/Unity/SCANsat/Library/metadata/9b/9bb4f07ad47d6044590bf8e2546a6658 differ diff --git a/Unity/SCANsat/Library/metadata/9b/9bb4f07ad47d6044590bf8e2546a6658.info b/Unity/SCANsat/Library/metadata/9b/9bb4f07ad47d6044590bf8e2546a6658.info new file mode 100644 index 000000000..5bdce9a4b Binary files /dev/null and b/Unity/SCANsat/Library/metadata/9b/9bb4f07ad47d6044590bf8e2546a6658.info differ diff --git a/Unity/SCANsat/Library/metadata/9d/9db68454b5978314184a231e296a74c9 b/Unity/SCANsat/Library/metadata/9d/9db68454b5978314184a231e296a74c9 new file mode 100644 index 000000000..53df27815 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/9d/9db68454b5978314184a231e296a74c9 differ diff --git a/Unity/SCANsat/Library/metadata/9d/9db68454b5978314184a231e296a74c9.info b/Unity/SCANsat/Library/metadata/9d/9db68454b5978314184a231e296a74c9.info new file mode 100644 index 000000000..b9ccfe20e Binary files /dev/null and b/Unity/SCANsat/Library/metadata/9d/9db68454b5978314184a231e296a74c9.info differ diff --git a/Unity/SCANsat/Library/metadata/9e/9e273bc4aa80cca4aa7b1d829cece604 b/Unity/SCANsat/Library/metadata/9e/9e273bc4aa80cca4aa7b1d829cece604 new file mode 100644 index 000000000..9eb31a5d2 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/9e/9e273bc4aa80cca4aa7b1d829cece604 differ diff --git a/Unity/SCANsat/Library/metadata/9e/9e273bc4aa80cca4aa7b1d829cece604.info b/Unity/SCANsat/Library/metadata/9e/9e273bc4aa80cca4aa7b1d829cece604.info new file mode 100644 index 000000000..ea6a02703 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/9e/9e273bc4aa80cca4aa7b1d829cece604.info differ diff --git a/Unity/SCANsat/Library/metadata/9e/9ea2fe418e06bbc4fa156a0a55338c62 b/Unity/SCANsat/Library/metadata/9e/9ea2fe418e06bbc4fa156a0a55338c62 new file mode 100644 index 000000000..a4d0665ae Binary files /dev/null and b/Unity/SCANsat/Library/metadata/9e/9ea2fe418e06bbc4fa156a0a55338c62 differ diff --git a/Unity/SCANsat/Library/metadata/9e/9ea2fe418e06bbc4fa156a0a55338c62.info b/Unity/SCANsat/Library/metadata/9e/9ea2fe418e06bbc4fa156a0a55338c62.info new file mode 100644 index 000000000..f5aadaa58 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/9e/9ea2fe418e06bbc4fa156a0a55338c62.info differ diff --git a/Unity/SCANsat/Library/metadata/9f/9f2e95f0cdfe33444a502b831fca611c b/Unity/SCANsat/Library/metadata/9f/9f2e95f0cdfe33444a502b831fca611c new file mode 100644 index 000000000..765d19826 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/9f/9f2e95f0cdfe33444a502b831fca611c differ diff --git a/Unity/SCANsat/Library/metadata/9f/9f2e95f0cdfe33444a502b831fca611c.info b/Unity/SCANsat/Library/metadata/9f/9f2e95f0cdfe33444a502b831fca611c.info new file mode 100644 index 000000000..90240be4f Binary files /dev/null and b/Unity/SCANsat/Library/metadata/9f/9f2e95f0cdfe33444a502b831fca611c.info differ diff --git a/Unity/SCANsat/Library/metadata/a0/a0cf4583e793b864f95a2fe0758fe2bc b/Unity/SCANsat/Library/metadata/a0/a0cf4583e793b864f95a2fe0758fe2bc new file mode 100644 index 000000000..04d552812 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/a0/a0cf4583e793b864f95a2fe0758fe2bc differ diff --git a/Unity/SCANsat/Library/metadata/a0/a0cf4583e793b864f95a2fe0758fe2bc.info b/Unity/SCANsat/Library/metadata/a0/a0cf4583e793b864f95a2fe0758fe2bc.info new file mode 100644 index 000000000..273119456 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/a0/a0cf4583e793b864f95a2fe0758fe2bc.info differ diff --git a/Unity/SCANsat/Library/metadata/a3/a300027f5fc1d00408c43714110ed874 b/Unity/SCANsat/Library/metadata/a3/a300027f5fc1d00408c43714110ed874 new file mode 100644 index 000000000..a0cfb721a Binary files /dev/null and b/Unity/SCANsat/Library/metadata/a3/a300027f5fc1d00408c43714110ed874 differ diff --git a/Unity/SCANsat/Library/metadata/a3/a300027f5fc1d00408c43714110ed874.info b/Unity/SCANsat/Library/metadata/a3/a300027f5fc1d00408c43714110ed874.info new file mode 100644 index 000000000..76faaad5a Binary files /dev/null and b/Unity/SCANsat/Library/metadata/a3/a300027f5fc1d00408c43714110ed874.info differ diff --git a/Unity/SCANsat/Library/metadata/a4/a40c3a079d0f0654488a9b7321ded2cb b/Unity/SCANsat/Library/metadata/a4/a40c3a079d0f0654488a9b7321ded2cb new file mode 100644 index 000000000..4e46f0e2a Binary files /dev/null and b/Unity/SCANsat/Library/metadata/a4/a40c3a079d0f0654488a9b7321ded2cb differ diff --git a/Unity/SCANsat/Library/metadata/a4/a40c3a079d0f0654488a9b7321ded2cb.info b/Unity/SCANsat/Library/metadata/a4/a40c3a079d0f0654488a9b7321ded2cb.info new file mode 100644 index 000000000..23d0e552a Binary files /dev/null and b/Unity/SCANsat/Library/metadata/a4/a40c3a079d0f0654488a9b7321ded2cb.info differ diff --git a/Unity/SCANsat/Library/metadata/a4/a45acd8adee64ea4cac55b22bfebe6cb b/Unity/SCANsat/Library/metadata/a4/a45acd8adee64ea4cac55b22bfebe6cb new file mode 100644 index 000000000..52c1bfb1c Binary files /dev/null and b/Unity/SCANsat/Library/metadata/a4/a45acd8adee64ea4cac55b22bfebe6cb differ diff --git a/Unity/SCANsat/Library/metadata/a4/a45acd8adee64ea4cac55b22bfebe6cb.info b/Unity/SCANsat/Library/metadata/a4/a45acd8adee64ea4cac55b22bfebe6cb.info new file mode 100644 index 000000000..c6a29e553 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/a4/a45acd8adee64ea4cac55b22bfebe6cb.info differ diff --git a/Unity/SCANsat/Library/metadata/a7/a785e1a01d15b0345ac27359a32c9857 b/Unity/SCANsat/Library/metadata/a7/a785e1a01d15b0345ac27359a32c9857 new file mode 100644 index 000000000..aa9a293bf Binary files /dev/null and b/Unity/SCANsat/Library/metadata/a7/a785e1a01d15b0345ac27359a32c9857 differ diff --git a/Unity/SCANsat/Library/metadata/a7/a785e1a01d15b0345ac27359a32c9857.info b/Unity/SCANsat/Library/metadata/a7/a785e1a01d15b0345ac27359a32c9857.info new file mode 100644 index 000000000..b2b5174ed Binary files /dev/null and b/Unity/SCANsat/Library/metadata/a7/a785e1a01d15b0345ac27359a32c9857.info differ diff --git a/Unity/SCANsat/Library/metadata/a7/a7bc56bd466c8a148aa97fe6a07b7c4c b/Unity/SCANsat/Library/metadata/a7/a7bc56bd466c8a148aa97fe6a07b7c4c new file mode 100644 index 000000000..985006c81 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/a7/a7bc56bd466c8a148aa97fe6a07b7c4c differ diff --git a/Unity/SCANsat/Library/metadata/a7/a7bc56bd466c8a148aa97fe6a07b7c4c.info b/Unity/SCANsat/Library/metadata/a7/a7bc56bd466c8a148aa97fe6a07b7c4c.info new file mode 100644 index 000000000..d4113a22f Binary files /dev/null and b/Unity/SCANsat/Library/metadata/a7/a7bc56bd466c8a148aa97fe6a07b7c4c.info differ diff --git a/Unity/SCANsat/Library/metadata/ab/ab0281620a104dd4ca96a6bf906f8011 b/Unity/SCANsat/Library/metadata/ab/ab0281620a104dd4ca96a6bf906f8011 new file mode 100644 index 000000000..09e5837ac Binary files /dev/null and b/Unity/SCANsat/Library/metadata/ab/ab0281620a104dd4ca96a6bf906f8011 differ diff --git a/Unity/SCANsat/Library/metadata/ab/ab0281620a104dd4ca96a6bf906f8011.info b/Unity/SCANsat/Library/metadata/ab/ab0281620a104dd4ca96a6bf906f8011.info new file mode 100644 index 000000000..c26566a72 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/ab/ab0281620a104dd4ca96a6bf906f8011.info differ diff --git a/Unity/SCANsat/Library/metadata/ab/ab2651154266d0c4c91734d7ceadb978 b/Unity/SCANsat/Library/metadata/ab/ab2651154266d0c4c91734d7ceadb978 new file mode 100644 index 000000000..6255877e7 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/ab/ab2651154266d0c4c91734d7ceadb978 differ diff --git a/Unity/SCANsat/Library/metadata/ab/ab2651154266d0c4c91734d7ceadb978.info b/Unity/SCANsat/Library/metadata/ab/ab2651154266d0c4c91734d7ceadb978.info new file mode 100644 index 000000000..d54dbd7e0 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/ab/ab2651154266d0c4c91734d7ceadb978.info differ diff --git a/Unity/SCANsat/Library/metadata/ac/ac859b44038643d40b88f24aceac191c b/Unity/SCANsat/Library/metadata/ac/ac859b44038643d40b88f24aceac191c new file mode 100644 index 000000000..2d5bfcf82 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/ac/ac859b44038643d40b88f24aceac191c differ diff --git a/Unity/SCANsat/Library/metadata/ac/ac859b44038643d40b88f24aceac191c.info b/Unity/SCANsat/Library/metadata/ac/ac859b44038643d40b88f24aceac191c.info new file mode 100644 index 000000000..d508e1ef2 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/ac/ac859b44038643d40b88f24aceac191c.info differ diff --git a/Unity/SCANsat/Library/metadata/b0/b01df32de3b6f1746862a5b5d13d8244 b/Unity/SCANsat/Library/metadata/b0/b01df32de3b6f1746862a5b5d13d8244 new file mode 100644 index 000000000..afc7a704d Binary files /dev/null and b/Unity/SCANsat/Library/metadata/b0/b01df32de3b6f1746862a5b5d13d8244 differ diff --git a/Unity/SCANsat/Library/metadata/b0/b01df32de3b6f1746862a5b5d13d8244.info b/Unity/SCANsat/Library/metadata/b0/b01df32de3b6f1746862a5b5d13d8244.info new file mode 100644 index 000000000..43956f066 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/b0/b01df32de3b6f1746862a5b5d13d8244.info differ diff --git a/Unity/SCANsat/Library/metadata/b1/b1fc6fdc0f80cbf49b77f83ad3db33aa b/Unity/SCANsat/Library/metadata/b1/b1fc6fdc0f80cbf49b77f83ad3db33aa new file mode 100644 index 000000000..9da473f87 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/b1/b1fc6fdc0f80cbf49b77f83ad3db33aa differ diff --git a/Unity/SCANsat/Library/metadata/b1/b1fc6fdc0f80cbf49b77f83ad3db33aa.info b/Unity/SCANsat/Library/metadata/b1/b1fc6fdc0f80cbf49b77f83ad3db33aa.info new file mode 100644 index 000000000..d34b71b54 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/b1/b1fc6fdc0f80cbf49b77f83ad3db33aa.info differ diff --git a/Unity/SCANsat/Library/metadata/b2/b24617616f4d30941a7f98eecfc2907c b/Unity/SCANsat/Library/metadata/b2/b24617616f4d30941a7f98eecfc2907c new file mode 100644 index 000000000..296bd9395 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/b2/b24617616f4d30941a7f98eecfc2907c differ diff --git a/Unity/SCANsat/Library/metadata/b2/b24617616f4d30941a7f98eecfc2907c.info b/Unity/SCANsat/Library/metadata/b2/b24617616f4d30941a7f98eecfc2907c.info new file mode 100644 index 000000000..7cf36f174 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/b2/b24617616f4d30941a7f98eecfc2907c.info differ diff --git a/Unity/SCANsat/Library/metadata/b3/b3b035681f285f740b32cf2bc12a8de6 b/Unity/SCANsat/Library/metadata/b3/b3b035681f285f740b32cf2bc12a8de6 new file mode 100644 index 000000000..987eabd59 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/b3/b3b035681f285f740b32cf2bc12a8de6 differ diff --git a/Unity/SCANsat/Library/metadata/b3/b3b035681f285f740b32cf2bc12a8de6.info b/Unity/SCANsat/Library/metadata/b3/b3b035681f285f740b32cf2bc12a8de6.info new file mode 100644 index 000000000..76ed68067 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/b3/b3b035681f285f740b32cf2bc12a8de6.info differ diff --git a/Unity/SCANsat/Library/metadata/b5/b53675eb8ece2834bbe8d2edd1ce3ba9 b/Unity/SCANsat/Library/metadata/b5/b53675eb8ece2834bbe8d2edd1ce3ba9 new file mode 100644 index 000000000..429391d6f Binary files /dev/null and b/Unity/SCANsat/Library/metadata/b5/b53675eb8ece2834bbe8d2edd1ce3ba9 differ diff --git a/Unity/SCANsat/Library/metadata/b5/b53675eb8ece2834bbe8d2edd1ce3ba9.info b/Unity/SCANsat/Library/metadata/b5/b53675eb8ece2834bbe8d2edd1ce3ba9.info new file mode 100644 index 000000000..e6f24b4a8 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/b5/b53675eb8ece2834bbe8d2edd1ce3ba9.info differ diff --git a/Unity/SCANsat/Library/metadata/b6/b626a88e355b6284881a16a4fd831236 b/Unity/SCANsat/Library/metadata/b6/b626a88e355b6284881a16a4fd831236 new file mode 100644 index 000000000..059762e5a Binary files /dev/null and b/Unity/SCANsat/Library/metadata/b6/b626a88e355b6284881a16a4fd831236 differ diff --git a/Unity/SCANsat/Library/metadata/b6/b626a88e355b6284881a16a4fd831236.info b/Unity/SCANsat/Library/metadata/b6/b626a88e355b6284881a16a4fd831236.info new file mode 100644 index 000000000..ac89cd678 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/b6/b626a88e355b6284881a16a4fd831236.info differ diff --git a/Unity/SCANsat/Library/metadata/b7/b7823d424e46c7343a3c973b91ea6ec1 b/Unity/SCANsat/Library/metadata/b7/b7823d424e46c7343a3c973b91ea6ec1 new file mode 100644 index 000000000..02fc2392e Binary files /dev/null and b/Unity/SCANsat/Library/metadata/b7/b7823d424e46c7343a3c973b91ea6ec1 differ diff --git a/Unity/SCANsat/Library/metadata/b7/b7823d424e46c7343a3c973b91ea6ec1.info b/Unity/SCANsat/Library/metadata/b7/b7823d424e46c7343a3c973b91ea6ec1.info new file mode 100644 index 000000000..3ba36120d Binary files /dev/null and b/Unity/SCANsat/Library/metadata/b7/b7823d424e46c7343a3c973b91ea6ec1.info differ diff --git a/Unity/SCANsat/Library/metadata/b8/b82d597bbb1249f41a7ee011ea17c9e1 b/Unity/SCANsat/Library/metadata/b8/b82d597bbb1249f41a7ee011ea17c9e1 new file mode 100644 index 000000000..9f1feda82 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/b8/b82d597bbb1249f41a7ee011ea17c9e1 differ diff --git a/Unity/SCANsat/Library/metadata/b8/b82d597bbb1249f41a7ee011ea17c9e1.info b/Unity/SCANsat/Library/metadata/b8/b82d597bbb1249f41a7ee011ea17c9e1.info new file mode 100644 index 000000000..a592bceba Binary files /dev/null and b/Unity/SCANsat/Library/metadata/b8/b82d597bbb1249f41a7ee011ea17c9e1.info differ diff --git a/Unity/SCANsat/Library/metadata/b9/b980c81b79c3cc24ba3dbbe55893fc95 b/Unity/SCANsat/Library/metadata/b9/b980c81b79c3cc24ba3dbbe55893fc95 new file mode 100644 index 000000000..cf324e812 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/b9/b980c81b79c3cc24ba3dbbe55893fc95 differ diff --git a/Unity/SCANsat/Library/metadata/b9/b980c81b79c3cc24ba3dbbe55893fc95.info b/Unity/SCANsat/Library/metadata/b9/b980c81b79c3cc24ba3dbbe55893fc95.info new file mode 100644 index 000000000..3248abdd1 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/b9/b980c81b79c3cc24ba3dbbe55893fc95.info differ diff --git a/Unity/SCANsat/Library/metadata/bb/bb456cad67a7b094a985b2398c43844d b/Unity/SCANsat/Library/metadata/bb/bb456cad67a7b094a985b2398c43844d new file mode 100644 index 000000000..8681203c6 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/bb/bb456cad67a7b094a985b2398c43844d differ diff --git a/Unity/SCANsat/Library/metadata/bb/bb456cad67a7b094a985b2398c43844d.info b/Unity/SCANsat/Library/metadata/bb/bb456cad67a7b094a985b2398c43844d.info new file mode 100644 index 000000000..f4ae13383 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/bb/bb456cad67a7b094a985b2398c43844d.info differ diff --git a/Unity/SCANsat/Library/metadata/bb/bb8ca88c4046c074bb3f3af45d9c855b b/Unity/SCANsat/Library/metadata/bb/bb8ca88c4046c074bb3f3af45d9c855b new file mode 100644 index 000000000..e1d944bb9 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/bb/bb8ca88c4046c074bb3f3af45d9c855b differ diff --git a/Unity/SCANsat/Library/metadata/bb/bb8ca88c4046c074bb3f3af45d9c855b.info b/Unity/SCANsat/Library/metadata/bb/bb8ca88c4046c074bb3f3af45d9c855b.info new file mode 100644 index 000000000..ed106bf6e Binary files /dev/null and b/Unity/SCANsat/Library/metadata/bb/bb8ca88c4046c074bb3f3af45d9c855b.info differ diff --git a/Unity/SCANsat/Library/metadata/bb/bb8f470fa9a094644a08f781e391e085 b/Unity/SCANsat/Library/metadata/bb/bb8f470fa9a094644a08f781e391e085 new file mode 100644 index 000000000..c3b60ee74 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/bb/bb8f470fa9a094644a08f781e391e085 differ diff --git a/Unity/SCANsat/Library/metadata/bb/bb8f470fa9a094644a08f781e391e085.info b/Unity/SCANsat/Library/metadata/bb/bb8f470fa9a094644a08f781e391e085.info new file mode 100644 index 000000000..2d9ef326b Binary files /dev/null and b/Unity/SCANsat/Library/metadata/bb/bb8f470fa9a094644a08f781e391e085.info differ diff --git a/Unity/SCANsat/Library/metadata/bb/bbe428fcd16aee74993dab6f1431c9e1 b/Unity/SCANsat/Library/metadata/bb/bbe428fcd16aee74993dab6f1431c9e1 new file mode 100644 index 000000000..91cfba517 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/bb/bbe428fcd16aee74993dab6f1431c9e1 differ diff --git a/Unity/SCANsat/Library/metadata/bb/bbe428fcd16aee74993dab6f1431c9e1.info b/Unity/SCANsat/Library/metadata/bb/bbe428fcd16aee74993dab6f1431c9e1.info new file mode 100644 index 000000000..8b6222da6 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/bb/bbe428fcd16aee74993dab6f1431c9e1.info differ diff --git a/Unity/SCANsat/Library/metadata/bb/bbe7a2e17e83a9a45bc517140d3ca1a6 b/Unity/SCANsat/Library/metadata/bb/bbe7a2e17e83a9a45bc517140d3ca1a6 new file mode 100644 index 000000000..9565f74b5 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/bb/bbe7a2e17e83a9a45bc517140d3ca1a6 differ diff --git a/Unity/SCANsat/Library/metadata/bb/bbe7a2e17e83a9a45bc517140d3ca1a6.info b/Unity/SCANsat/Library/metadata/bb/bbe7a2e17e83a9a45bc517140d3ca1a6.info new file mode 100644 index 000000000..4a7008d88 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/bb/bbe7a2e17e83a9a45bc517140d3ca1a6.info differ diff --git a/Unity/SCANsat/Library/metadata/bc/bc1ceb5307f483d4c9c418e5277cd78d b/Unity/SCANsat/Library/metadata/bc/bc1ceb5307f483d4c9c418e5277cd78d new file mode 100644 index 000000000..9e58067f6 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/bc/bc1ceb5307f483d4c9c418e5277cd78d differ diff --git a/Unity/SCANsat/Library/metadata/bc/bc1ceb5307f483d4c9c418e5277cd78d.info b/Unity/SCANsat/Library/metadata/bc/bc1ceb5307f483d4c9c418e5277cd78d.info new file mode 100644 index 000000000..e9c9f85f5 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/bc/bc1ceb5307f483d4c9c418e5277cd78d.info differ diff --git a/Unity/SCANsat/Library/metadata/bf/bf60c1ca7cea75c4e922adbb1555c523 b/Unity/SCANsat/Library/metadata/bf/bf60c1ca7cea75c4e922adbb1555c523 new file mode 100644 index 000000000..8ea862762 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/bf/bf60c1ca7cea75c4e922adbb1555c523 differ diff --git a/Unity/SCANsat/Library/metadata/bf/bf60c1ca7cea75c4e922adbb1555c523.info b/Unity/SCANsat/Library/metadata/bf/bf60c1ca7cea75c4e922adbb1555c523.info new file mode 100644 index 000000000..045dc3a8b Binary files /dev/null and b/Unity/SCANsat/Library/metadata/bf/bf60c1ca7cea75c4e922adbb1555c523.info differ diff --git a/Unity/SCANsat/Library/metadata/bf/bfea133dc2cd936468fd26de9985455d b/Unity/SCANsat/Library/metadata/bf/bfea133dc2cd936468fd26de9985455d new file mode 100644 index 000000000..f98a190c6 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/bf/bfea133dc2cd936468fd26de9985455d differ diff --git a/Unity/SCANsat/Library/metadata/bf/bfea133dc2cd936468fd26de9985455d.info b/Unity/SCANsat/Library/metadata/bf/bfea133dc2cd936468fd26de9985455d.info new file mode 100644 index 000000000..c57426baf Binary files /dev/null and b/Unity/SCANsat/Library/metadata/bf/bfea133dc2cd936468fd26de9985455d.info differ diff --git a/Unity/SCANsat/Library/metadata/c1/c1e0b0f33597a734facf2ccf665cd029 b/Unity/SCANsat/Library/metadata/c1/c1e0b0f33597a734facf2ccf665cd029 new file mode 100644 index 000000000..986e560a4 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/c1/c1e0b0f33597a734facf2ccf665cd029 differ diff --git a/Unity/SCANsat/Library/metadata/c1/c1e0b0f33597a734facf2ccf665cd029.info b/Unity/SCANsat/Library/metadata/c1/c1e0b0f33597a734facf2ccf665cd029.info new file mode 100644 index 000000000..9acce4f1a Binary files /dev/null and b/Unity/SCANsat/Library/metadata/c1/c1e0b0f33597a734facf2ccf665cd029.info differ diff --git a/Unity/SCANsat/Library/metadata/c2/c2feba2496570fe478e3b40736c6ca07 b/Unity/SCANsat/Library/metadata/c2/c2feba2496570fe478e3b40736c6ca07 new file mode 100644 index 000000000..6737e261f Binary files /dev/null and b/Unity/SCANsat/Library/metadata/c2/c2feba2496570fe478e3b40736c6ca07 differ diff --git a/Unity/SCANsat/Library/metadata/c2/c2feba2496570fe478e3b40736c6ca07.info b/Unity/SCANsat/Library/metadata/c2/c2feba2496570fe478e3b40736c6ca07.info new file mode 100644 index 000000000..beaf1e25c Binary files /dev/null and b/Unity/SCANsat/Library/metadata/c2/c2feba2496570fe478e3b40736c6ca07.info differ diff --git a/Unity/SCANsat/Library/metadata/c3/c30270af487c3794f8e35e6081c40aad b/Unity/SCANsat/Library/metadata/c3/c30270af487c3794f8e35e6081c40aad new file mode 100644 index 000000000..10d92bacc Binary files /dev/null and b/Unity/SCANsat/Library/metadata/c3/c30270af487c3794f8e35e6081c40aad differ diff --git a/Unity/SCANsat/Library/metadata/c3/c30270af487c3794f8e35e6081c40aad.info b/Unity/SCANsat/Library/metadata/c3/c30270af487c3794f8e35e6081c40aad.info new file mode 100644 index 000000000..dde999aff Binary files /dev/null and b/Unity/SCANsat/Library/metadata/c3/c30270af487c3794f8e35e6081c40aad.info differ diff --git a/Unity/SCANsat/Library/metadata/c5/c57b13a325aea5644b37abd70df422d6 b/Unity/SCANsat/Library/metadata/c5/c57b13a325aea5644b37abd70df422d6 new file mode 100644 index 000000000..ccd88a7d3 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/c5/c57b13a325aea5644b37abd70df422d6 differ diff --git a/Unity/SCANsat/Library/metadata/c5/c57b13a325aea5644b37abd70df422d6.info b/Unity/SCANsat/Library/metadata/c5/c57b13a325aea5644b37abd70df422d6.info new file mode 100644 index 000000000..99f0dcf21 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/c5/c57b13a325aea5644b37abd70df422d6.info differ diff --git a/Unity/SCANsat/Library/metadata/c7/c7953386e39eafe4fa07be140ee19838 b/Unity/SCANsat/Library/metadata/c7/c7953386e39eafe4fa07be140ee19838 new file mode 100644 index 000000000..58ab942bd Binary files /dev/null and b/Unity/SCANsat/Library/metadata/c7/c7953386e39eafe4fa07be140ee19838 differ diff --git a/Unity/SCANsat/Library/metadata/c7/c7953386e39eafe4fa07be140ee19838.info b/Unity/SCANsat/Library/metadata/c7/c7953386e39eafe4fa07be140ee19838.info new file mode 100644 index 000000000..85fb08a7d Binary files /dev/null and b/Unity/SCANsat/Library/metadata/c7/c7953386e39eafe4fa07be140ee19838.info differ diff --git a/Unity/SCANsat/Library/metadata/c9/c9da217290ee74a43907fc1205e4c146 b/Unity/SCANsat/Library/metadata/c9/c9da217290ee74a43907fc1205e4c146 new file mode 100644 index 000000000..3dd2e15e4 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/c9/c9da217290ee74a43907fc1205e4c146 differ diff --git a/Unity/SCANsat/Library/metadata/c9/c9da217290ee74a43907fc1205e4c146.info b/Unity/SCANsat/Library/metadata/c9/c9da217290ee74a43907fc1205e4c146.info new file mode 100644 index 000000000..de4d5c3a1 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/c9/c9da217290ee74a43907fc1205e4c146.info differ diff --git a/Unity/SCANsat/Library/metadata/cc/ccc784c67200d5247b2c2e6283d25e79 b/Unity/SCANsat/Library/metadata/cc/ccc784c67200d5247b2c2e6283d25e79 new file mode 100644 index 000000000..63025027a Binary files /dev/null and b/Unity/SCANsat/Library/metadata/cc/ccc784c67200d5247b2c2e6283d25e79 differ diff --git a/Unity/SCANsat/Library/metadata/cc/ccc784c67200d5247b2c2e6283d25e79.info b/Unity/SCANsat/Library/metadata/cc/ccc784c67200d5247b2c2e6283d25e79.info new file mode 100644 index 000000000..1fc6b8c8e Binary files /dev/null and b/Unity/SCANsat/Library/metadata/cc/ccc784c67200d5247b2c2e6283d25e79.info differ diff --git a/Unity/SCANsat/Library/metadata/cc/cccdfce7525b43b4b8b42b57d34ea018 b/Unity/SCANsat/Library/metadata/cc/cccdfce7525b43b4b8b42b57d34ea018 new file mode 100644 index 000000000..0bcf7e000 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/cc/cccdfce7525b43b4b8b42b57d34ea018 differ diff --git a/Unity/SCANsat/Library/metadata/cc/cccdfce7525b43b4b8b42b57d34ea018.info b/Unity/SCANsat/Library/metadata/cc/cccdfce7525b43b4b8b42b57d34ea018.info new file mode 100644 index 000000000..d1af251ad Binary files /dev/null and b/Unity/SCANsat/Library/metadata/cc/cccdfce7525b43b4b8b42b57d34ea018.info differ diff --git a/Unity/SCANsat/Library/metadata/cd/cdbc96a0c719a1d48901892fcf30182f b/Unity/SCANsat/Library/metadata/cd/cdbc96a0c719a1d48901892fcf30182f new file mode 100644 index 000000000..28b2bae63 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/cd/cdbc96a0c719a1d48901892fcf30182f differ diff --git a/Unity/SCANsat/Library/metadata/cd/cdbc96a0c719a1d48901892fcf30182f.info b/Unity/SCANsat/Library/metadata/cd/cdbc96a0c719a1d48901892fcf30182f.info new file mode 100644 index 000000000..1cd5bf1c7 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/cd/cdbc96a0c719a1d48901892fcf30182f.info differ diff --git a/Unity/SCANsat/Library/metadata/ce/cefb5ab793806dc48b90c065aecda727 b/Unity/SCANsat/Library/metadata/ce/cefb5ab793806dc48b90c065aecda727 new file mode 100644 index 000000000..cc8665f8a Binary files /dev/null and b/Unity/SCANsat/Library/metadata/ce/cefb5ab793806dc48b90c065aecda727 differ diff --git a/Unity/SCANsat/Library/metadata/ce/cefb5ab793806dc48b90c065aecda727.info b/Unity/SCANsat/Library/metadata/ce/cefb5ab793806dc48b90c065aecda727.info new file mode 100644 index 000000000..fa1fb1546 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/ce/cefb5ab793806dc48b90c065aecda727.info differ diff --git a/Unity/SCANsat/Library/metadata/d2/d235ba1d10f9c6a45b428bd777b7e5b2 b/Unity/SCANsat/Library/metadata/d2/d235ba1d10f9c6a45b428bd777b7e5b2 new file mode 100644 index 000000000..0faeef58e Binary files /dev/null and b/Unity/SCANsat/Library/metadata/d2/d235ba1d10f9c6a45b428bd777b7e5b2 differ diff --git a/Unity/SCANsat/Library/metadata/d2/d235ba1d10f9c6a45b428bd777b7e5b2.info b/Unity/SCANsat/Library/metadata/d2/d235ba1d10f9c6a45b428bd777b7e5b2.info new file mode 100644 index 000000000..a48f2def0 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/d2/d235ba1d10f9c6a45b428bd777b7e5b2.info differ diff --git a/Unity/SCANsat/Library/metadata/d6/d602537c16f9505429f142415a6b1616 b/Unity/SCANsat/Library/metadata/d6/d602537c16f9505429f142415a6b1616 new file mode 100644 index 000000000..0ac70a0a2 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/d6/d602537c16f9505429f142415a6b1616 differ diff --git a/Unity/SCANsat/Library/metadata/d6/d602537c16f9505429f142415a6b1616.info b/Unity/SCANsat/Library/metadata/d6/d602537c16f9505429f142415a6b1616.info new file mode 100644 index 000000000..a28acf0f1 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/d6/d602537c16f9505429f142415a6b1616.info differ diff --git a/Unity/SCANsat/Library/metadata/d7/d7a47e81f84cf5a4eb4b9be5e1c056f8 b/Unity/SCANsat/Library/metadata/d7/d7a47e81f84cf5a4eb4b9be5e1c056f8 new file mode 100644 index 000000000..452ec4a82 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/d7/d7a47e81f84cf5a4eb4b9be5e1c056f8 differ diff --git a/Unity/SCANsat/Library/metadata/d7/d7a47e81f84cf5a4eb4b9be5e1c056f8.info b/Unity/SCANsat/Library/metadata/d7/d7a47e81f84cf5a4eb4b9be5e1c056f8.info new file mode 100644 index 000000000..e5c7e8a43 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/d7/d7a47e81f84cf5a4eb4b9be5e1c056f8.info differ diff --git a/Unity/SCANsat/Library/metadata/d9/d9bb956d49caf9d43992137459d1c7fe b/Unity/SCANsat/Library/metadata/d9/d9bb956d49caf9d43992137459d1c7fe new file mode 100644 index 000000000..aa30e9f8f Binary files /dev/null and b/Unity/SCANsat/Library/metadata/d9/d9bb956d49caf9d43992137459d1c7fe differ diff --git a/Unity/SCANsat/Library/metadata/d9/d9bb956d49caf9d43992137459d1c7fe.info b/Unity/SCANsat/Library/metadata/d9/d9bb956d49caf9d43992137459d1c7fe.info new file mode 100644 index 000000000..0c124c4ee Binary files /dev/null and b/Unity/SCANsat/Library/metadata/d9/d9bb956d49caf9d43992137459d1c7fe.info differ diff --git a/Unity/SCANsat/Library/metadata/db/db1d6aee2b6c25c4fbf0e07e9076c6b5 b/Unity/SCANsat/Library/metadata/db/db1d6aee2b6c25c4fbf0e07e9076c6b5 new file mode 100644 index 000000000..6bd2b6b26 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/db/db1d6aee2b6c25c4fbf0e07e9076c6b5 differ diff --git a/Unity/SCANsat/Library/metadata/db/db1d6aee2b6c25c4fbf0e07e9076c6b5.info b/Unity/SCANsat/Library/metadata/db/db1d6aee2b6c25c4fbf0e07e9076c6b5.info new file mode 100644 index 000000000..08f86f6a6 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/db/db1d6aee2b6c25c4fbf0e07e9076c6b5.info differ diff --git a/Unity/SCANsat/Library/metadata/df/dfa5576d281e6484790ed88b05bf6c15 b/Unity/SCANsat/Library/metadata/df/dfa5576d281e6484790ed88b05bf6c15 new file mode 100644 index 000000000..dd0a76279 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/df/dfa5576d281e6484790ed88b05bf6c15 differ diff --git a/Unity/SCANsat/Library/metadata/df/dfa5576d281e6484790ed88b05bf6c15.info b/Unity/SCANsat/Library/metadata/df/dfa5576d281e6484790ed88b05bf6c15.info new file mode 100644 index 000000000..0ce839320 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/df/dfa5576d281e6484790ed88b05bf6c15.info differ diff --git a/Unity/SCANsat/Library/metadata/e2/e2f94fdab4722d846b4fcba16621d7d9 b/Unity/SCANsat/Library/metadata/e2/e2f94fdab4722d846b4fcba16621d7d9 new file mode 100644 index 000000000..f39893a7f Binary files /dev/null and b/Unity/SCANsat/Library/metadata/e2/e2f94fdab4722d846b4fcba16621d7d9 differ diff --git a/Unity/SCANsat/Library/metadata/e2/e2f94fdab4722d846b4fcba16621d7d9.info b/Unity/SCANsat/Library/metadata/e2/e2f94fdab4722d846b4fcba16621d7d9.info new file mode 100644 index 000000000..22d31fcc6 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/e2/e2f94fdab4722d846b4fcba16621d7d9.info differ diff --git a/Unity/SCANsat/Library/metadata/e3/e3855b715f73d4d48ba1ca5563cf8730 b/Unity/SCANsat/Library/metadata/e3/e3855b715f73d4d48ba1ca5563cf8730 new file mode 100644 index 000000000..b387b4883 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/e3/e3855b715f73d4d48ba1ca5563cf8730 differ diff --git a/Unity/SCANsat/Library/metadata/e3/e3855b715f73d4d48ba1ca5563cf8730.info b/Unity/SCANsat/Library/metadata/e3/e3855b715f73d4d48ba1ca5563cf8730.info new file mode 100644 index 000000000..0ec963439 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/e3/e3855b715f73d4d48ba1ca5563cf8730.info differ diff --git a/Unity/SCANsat/Library/metadata/e4/e4331bf5e4a45a4488507f28195caf59 b/Unity/SCANsat/Library/metadata/e4/e4331bf5e4a45a4488507f28195caf59 new file mode 100644 index 000000000..6c5cba765 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/e4/e4331bf5e4a45a4488507f28195caf59 differ diff --git a/Unity/SCANsat/Library/metadata/e4/e4331bf5e4a45a4488507f28195caf59.info b/Unity/SCANsat/Library/metadata/e4/e4331bf5e4a45a4488507f28195caf59.info new file mode 100644 index 000000000..980dad4c9 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/e4/e4331bf5e4a45a4488507f28195caf59.info differ diff --git a/Unity/SCANsat/Library/metadata/e4/e4d5952eef9f9814c8dddd4e0da8347a b/Unity/SCANsat/Library/metadata/e4/e4d5952eef9f9814c8dddd4e0da8347a new file mode 100644 index 000000000..8346faf73 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/e4/e4d5952eef9f9814c8dddd4e0da8347a differ diff --git a/Unity/SCANsat/Library/metadata/e4/e4d5952eef9f9814c8dddd4e0da8347a.info b/Unity/SCANsat/Library/metadata/e4/e4d5952eef9f9814c8dddd4e0da8347a.info new file mode 100644 index 000000000..31a1bd6a2 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/e4/e4d5952eef9f9814c8dddd4e0da8347a.info differ diff --git a/Unity/SCANsat/Library/metadata/e8/e8621dd15bfcce340b91d8bbc8d9f084 b/Unity/SCANsat/Library/metadata/e8/e8621dd15bfcce340b91d8bbc8d9f084 new file mode 100644 index 000000000..2f5afd538 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/e8/e8621dd15bfcce340b91d8bbc8d9f084 differ diff --git a/Unity/SCANsat/Library/metadata/e8/e8621dd15bfcce340b91d8bbc8d9f084.info b/Unity/SCANsat/Library/metadata/e8/e8621dd15bfcce340b91d8bbc8d9f084.info new file mode 100644 index 000000000..6a46cd4b6 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/e8/e8621dd15bfcce340b91d8bbc8d9f084.info differ diff --git a/Unity/SCANsat/Library/metadata/ea/ea01fb1e1adeefa488560ed7dfba2ae0 b/Unity/SCANsat/Library/metadata/ea/ea01fb1e1adeefa488560ed7dfba2ae0 new file mode 100644 index 000000000..847b5f67d Binary files /dev/null and b/Unity/SCANsat/Library/metadata/ea/ea01fb1e1adeefa488560ed7dfba2ae0 differ diff --git a/Unity/SCANsat/Library/metadata/ea/ea01fb1e1adeefa488560ed7dfba2ae0.info b/Unity/SCANsat/Library/metadata/ea/ea01fb1e1adeefa488560ed7dfba2ae0.info new file mode 100644 index 000000000..2cb1108ea Binary files /dev/null and b/Unity/SCANsat/Library/metadata/ea/ea01fb1e1adeefa488560ed7dfba2ae0.info differ diff --git a/Unity/SCANsat/Library/metadata/ea/ea11f8443dca92f4f816a6cddd06b775 b/Unity/SCANsat/Library/metadata/ea/ea11f8443dca92f4f816a6cddd06b775 new file mode 100644 index 000000000..3eaf48a6a Binary files /dev/null and b/Unity/SCANsat/Library/metadata/ea/ea11f8443dca92f4f816a6cddd06b775 differ diff --git a/Unity/SCANsat/Library/metadata/ea/ea11f8443dca92f4f816a6cddd06b775.info b/Unity/SCANsat/Library/metadata/ea/ea11f8443dca92f4f816a6cddd06b775.info new file mode 100644 index 000000000..87f05cb7f Binary files /dev/null and b/Unity/SCANsat/Library/metadata/ea/ea11f8443dca92f4f816a6cddd06b775.info differ diff --git a/Unity/SCANsat/Library/metadata/ea/ea47f33e5f86ab044bbc265933a54375 b/Unity/SCANsat/Library/metadata/ea/ea47f33e5f86ab044bbc265933a54375 new file mode 100644 index 000000000..6d87b3a48 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/ea/ea47f33e5f86ab044bbc265933a54375 differ diff --git a/Unity/SCANsat/Library/metadata/ea/ea47f33e5f86ab044bbc265933a54375.info b/Unity/SCANsat/Library/metadata/ea/ea47f33e5f86ab044bbc265933a54375.info new file mode 100644 index 000000000..3e0b8a26e Binary files /dev/null and b/Unity/SCANsat/Library/metadata/ea/ea47f33e5f86ab044bbc265933a54375.info differ diff --git a/Unity/SCANsat/Library/metadata/ea/ea681fdd8e1bcc2449f008a8ac4fdc92 b/Unity/SCANsat/Library/metadata/ea/ea681fdd8e1bcc2449f008a8ac4fdc92 new file mode 100644 index 000000000..9caf9095b Binary files /dev/null and b/Unity/SCANsat/Library/metadata/ea/ea681fdd8e1bcc2449f008a8ac4fdc92 differ diff --git a/Unity/SCANsat/Library/metadata/ea/ea681fdd8e1bcc2449f008a8ac4fdc92.info b/Unity/SCANsat/Library/metadata/ea/ea681fdd8e1bcc2449f008a8ac4fdc92.info new file mode 100644 index 000000000..31f5dda85 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/ea/ea681fdd8e1bcc2449f008a8ac4fdc92.info differ diff --git a/Unity/SCANsat/Library/metadata/eb/eb35edfa13e33ef47bd4ac62c244d6d5 b/Unity/SCANsat/Library/metadata/eb/eb35edfa13e33ef47bd4ac62c244d6d5 new file mode 100644 index 000000000..27dd8d768 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/eb/eb35edfa13e33ef47bd4ac62c244d6d5 differ diff --git a/Unity/SCANsat/Library/metadata/eb/eb35edfa13e33ef47bd4ac62c244d6d5.info b/Unity/SCANsat/Library/metadata/eb/eb35edfa13e33ef47bd4ac62c244d6d5.info new file mode 100644 index 000000000..6cd2c8833 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/eb/eb35edfa13e33ef47bd4ac62c244d6d5.info differ diff --git a/Unity/SCANsat/Library/metadata/ed/ed082288a9f3def4685ad08898b92293 b/Unity/SCANsat/Library/metadata/ed/ed082288a9f3def4685ad08898b92293 new file mode 100644 index 000000000..a08616e9d Binary files /dev/null and b/Unity/SCANsat/Library/metadata/ed/ed082288a9f3def4685ad08898b92293 differ diff --git a/Unity/SCANsat/Library/metadata/ed/ed082288a9f3def4685ad08898b92293.info b/Unity/SCANsat/Library/metadata/ed/ed082288a9f3def4685ad08898b92293.info new file mode 100644 index 000000000..8cd63ea71 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/ed/ed082288a9f3def4685ad08898b92293.info differ diff --git a/Unity/SCANsat/Library/metadata/ef/ef675a73e5e74654887f9976c5e1a2e8 b/Unity/SCANsat/Library/metadata/ef/ef675a73e5e74654887f9976c5e1a2e8 new file mode 100644 index 000000000..527cafc70 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/ef/ef675a73e5e74654887f9976c5e1a2e8 differ diff --git a/Unity/SCANsat/Library/metadata/ef/ef675a73e5e74654887f9976c5e1a2e8.info b/Unity/SCANsat/Library/metadata/ef/ef675a73e5e74654887f9976c5e1a2e8.info new file mode 100644 index 000000000..832466bac Binary files /dev/null and b/Unity/SCANsat/Library/metadata/ef/ef675a73e5e74654887f9976c5e1a2e8.info differ diff --git a/Unity/SCANsat/Library/metadata/f0/f0d58e90c62634249b9d5e547c283c3b b/Unity/SCANsat/Library/metadata/f0/f0d58e90c62634249b9d5e547c283c3b new file mode 100644 index 000000000..7fbf233ab Binary files /dev/null and b/Unity/SCANsat/Library/metadata/f0/f0d58e90c62634249b9d5e547c283c3b differ diff --git a/Unity/SCANsat/Library/metadata/f0/f0d58e90c62634249b9d5e547c283c3b.info b/Unity/SCANsat/Library/metadata/f0/f0d58e90c62634249b9d5e547c283c3b.info new file mode 100644 index 000000000..dd435972b Binary files /dev/null and b/Unity/SCANsat/Library/metadata/f0/f0d58e90c62634249b9d5e547c283c3b.info differ diff --git a/Unity/SCANsat/Library/metadata/f4/f46f82d2b1ded3c4ba6ca65d4d16cecc b/Unity/SCANsat/Library/metadata/f4/f46f82d2b1ded3c4ba6ca65d4d16cecc new file mode 100644 index 000000000..a3ebe1e6d Binary files /dev/null and b/Unity/SCANsat/Library/metadata/f4/f46f82d2b1ded3c4ba6ca65d4d16cecc differ diff --git a/Unity/SCANsat/Library/metadata/f4/f46f82d2b1ded3c4ba6ca65d4d16cecc.info b/Unity/SCANsat/Library/metadata/f4/f46f82d2b1ded3c4ba6ca65d4d16cecc.info new file mode 100644 index 000000000..9747b0e59 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/f4/f46f82d2b1ded3c4ba6ca65d4d16cecc.info differ diff --git a/Unity/SCANsat/Library/metadata/f5/f5588afc1be070c4293d58a636869e14 b/Unity/SCANsat/Library/metadata/f5/f5588afc1be070c4293d58a636869e14 new file mode 100644 index 000000000..e4023385a Binary files /dev/null and b/Unity/SCANsat/Library/metadata/f5/f5588afc1be070c4293d58a636869e14 differ diff --git a/Unity/SCANsat/Library/metadata/f5/f5588afc1be070c4293d58a636869e14.info b/Unity/SCANsat/Library/metadata/f5/f5588afc1be070c4293d58a636869e14.info new file mode 100644 index 000000000..140a2740c Binary files /dev/null and b/Unity/SCANsat/Library/metadata/f5/f5588afc1be070c4293d58a636869e14.info differ diff --git a/Unity/SCANsat/Library/metadata/f5/f5e1ed61c1e31404a8a0692a5afdac5f b/Unity/SCANsat/Library/metadata/f5/f5e1ed61c1e31404a8a0692a5afdac5f new file mode 100644 index 000000000..be09f7d67 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/f5/f5e1ed61c1e31404a8a0692a5afdac5f differ diff --git a/Unity/SCANsat/Library/metadata/f5/f5e1ed61c1e31404a8a0692a5afdac5f.info b/Unity/SCANsat/Library/metadata/f5/f5e1ed61c1e31404a8a0692a5afdac5f.info new file mode 100644 index 000000000..927167db3 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/f5/f5e1ed61c1e31404a8a0692a5afdac5f.info differ diff --git a/Unity/SCANsat/Library/metadata/f5/f5f67c52d1564df4a8936ccd202a3bd8 b/Unity/SCANsat/Library/metadata/f5/f5f67c52d1564df4a8936ccd202a3bd8 new file mode 100644 index 000000000..18581fb8a Binary files /dev/null and b/Unity/SCANsat/Library/metadata/f5/f5f67c52d1564df4a8936ccd202a3bd8 differ diff --git a/Unity/SCANsat/Library/metadata/f5/f5f67c52d1564df4a8936ccd202a3bd8.info b/Unity/SCANsat/Library/metadata/f5/f5f67c52d1564df4a8936ccd202a3bd8.info new file mode 100644 index 000000000..7b08f1cd2 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/f5/f5f67c52d1564df4a8936ccd202a3bd8.info differ diff --git a/Unity/SCANsat/Library/metadata/f6/f6743e09e9903304384064b4965ade1e b/Unity/SCANsat/Library/metadata/f6/f6743e09e9903304384064b4965ade1e new file mode 100644 index 000000000..f5a410cf1 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/f6/f6743e09e9903304384064b4965ade1e differ diff --git a/Unity/SCANsat/Library/metadata/f6/f6743e09e9903304384064b4965ade1e.info b/Unity/SCANsat/Library/metadata/f6/f6743e09e9903304384064b4965ade1e.info new file mode 100644 index 000000000..aaf7e1ec2 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/f6/f6743e09e9903304384064b4965ade1e.info differ diff --git a/Unity/SCANsat/Library/metadata/f6/f67ef66e05e50a444a9c2067a18be37e b/Unity/SCANsat/Library/metadata/f6/f67ef66e05e50a444a9c2067a18be37e new file mode 100644 index 000000000..d607ec320 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/f6/f67ef66e05e50a444a9c2067a18be37e differ diff --git a/Unity/SCANsat/Library/metadata/f6/f67ef66e05e50a444a9c2067a18be37e.info b/Unity/SCANsat/Library/metadata/f6/f67ef66e05e50a444a9c2067a18be37e.info new file mode 100644 index 000000000..e79ce1845 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/f6/f67ef66e05e50a444a9c2067a18be37e.info differ diff --git a/Unity/SCANsat/Library/metadata/f7/f7dfb55ef5c52b14c9c18cf4ac48bb24 b/Unity/SCANsat/Library/metadata/f7/f7dfb55ef5c52b14c9c18cf4ac48bb24 new file mode 100644 index 000000000..3d431b20d Binary files /dev/null and b/Unity/SCANsat/Library/metadata/f7/f7dfb55ef5c52b14c9c18cf4ac48bb24 differ diff --git a/Unity/SCANsat/Library/metadata/f7/f7dfb55ef5c52b14c9c18cf4ac48bb24.info b/Unity/SCANsat/Library/metadata/f7/f7dfb55ef5c52b14c9c18cf4ac48bb24.info new file mode 100644 index 000000000..b0a744f44 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/f7/f7dfb55ef5c52b14c9c18cf4ac48bb24.info differ diff --git a/Unity/SCANsat/Library/metadata/fa/fa99336287c44f74da45b02f32db7660 b/Unity/SCANsat/Library/metadata/fa/fa99336287c44f74da45b02f32db7660 new file mode 100644 index 000000000..b22301e2b Binary files /dev/null and b/Unity/SCANsat/Library/metadata/fa/fa99336287c44f74da45b02f32db7660 differ diff --git a/Unity/SCANsat/Library/metadata/fa/fa99336287c44f74da45b02f32db7660.info b/Unity/SCANsat/Library/metadata/fa/fa99336287c44f74da45b02f32db7660.info new file mode 100644 index 000000000..e9be2c885 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/fa/fa99336287c44f74da45b02f32db7660.info differ diff --git a/Unity/SCANsat/Library/metadata/fe/fe86bff5401c09e4b9fbd217b3e828d6 b/Unity/SCANsat/Library/metadata/fe/fe86bff5401c09e4b9fbd217b3e828d6 new file mode 100644 index 000000000..d791eae12 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/fe/fe86bff5401c09e4b9fbd217b3e828d6 differ diff --git a/Unity/SCANsat/Library/metadata/fe/fe86bff5401c09e4b9fbd217b3e828d6.info b/Unity/SCANsat/Library/metadata/fe/fe86bff5401c09e4b9fbd217b3e828d6.info new file mode 100644 index 000000000..cfa0dd703 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/fe/fe86bff5401c09e4b9fbd217b3e828d6.info differ diff --git a/Unity/SCANsat/Library/metadata/fe/fecf7d1b793420b42bd7aceca03cc705 b/Unity/SCANsat/Library/metadata/fe/fecf7d1b793420b42bd7aceca03cc705 new file mode 100644 index 000000000..f46b97fcd Binary files /dev/null and b/Unity/SCANsat/Library/metadata/fe/fecf7d1b793420b42bd7aceca03cc705 differ diff --git a/Unity/SCANsat/Library/metadata/fe/fecf7d1b793420b42bd7aceca03cc705.info b/Unity/SCANsat/Library/metadata/fe/fecf7d1b793420b42bd7aceca03cc705.info new file mode 100644 index 000000000..8341c0807 Binary files /dev/null and b/Unity/SCANsat/Library/metadata/fe/fecf7d1b793420b42bd7aceca03cc705.info differ diff --git a/Unity/SCANsat/ProjectSettings/AudioManager.asset b/Unity/SCANsat/ProjectSettings/AudioManager.asset new file mode 100644 index 000000000..847b1555b Binary files /dev/null and b/Unity/SCANsat/ProjectSettings/AudioManager.asset differ diff --git a/Unity/SCANsat/ProjectSettings/DynamicsManager.asset b/Unity/SCANsat/ProjectSettings/DynamicsManager.asset new file mode 100644 index 000000000..765cc6473 Binary files /dev/null and b/Unity/SCANsat/ProjectSettings/DynamicsManager.asset differ diff --git a/Unity/SCANsat/ProjectSettings/EditorBuildSettings.asset b/Unity/SCANsat/ProjectSettings/EditorBuildSettings.asset new file mode 100644 index 000000000..aba192466 Binary files /dev/null and b/Unity/SCANsat/ProjectSettings/EditorBuildSettings.asset differ diff --git a/Unity/SCANsat/ProjectSettings/EditorSettings.asset b/Unity/SCANsat/ProjectSettings/EditorSettings.asset new file mode 100644 index 000000000..014b6c086 Binary files /dev/null and b/Unity/SCANsat/ProjectSettings/EditorSettings.asset differ diff --git a/Unity/SCANsat/ProjectSettings/GraphicsSettings.asset b/Unity/SCANsat/ProjectSettings/GraphicsSettings.asset new file mode 100644 index 000000000..faaf586dc Binary files /dev/null and b/Unity/SCANsat/ProjectSettings/GraphicsSettings.asset differ diff --git a/Unity/SCANsat/ProjectSettings/InputManager.asset b/Unity/SCANsat/ProjectSettings/InputManager.asset new file mode 100644 index 000000000..1de159a61 Binary files /dev/null and b/Unity/SCANsat/ProjectSettings/InputManager.asset differ diff --git a/Unity/SCANsat/ProjectSettings/NavMeshAreas.asset b/Unity/SCANsat/ProjectSettings/NavMeshAreas.asset new file mode 100644 index 000000000..1d9abdd78 Binary files /dev/null and b/Unity/SCANsat/ProjectSettings/NavMeshAreas.asset differ diff --git a/Unity/SCANsat/ProjectSettings/NetworkManager.asset b/Unity/SCANsat/ProjectSettings/NetworkManager.asset new file mode 100644 index 000000000..e6413dcb1 Binary files /dev/null and b/Unity/SCANsat/ProjectSettings/NetworkManager.asset differ diff --git a/Unity/SCANsat/ProjectSettings/Physics2DSettings.asset b/Unity/SCANsat/ProjectSettings/Physics2DSettings.asset new file mode 100644 index 000000000..260034dd2 Binary files /dev/null and b/Unity/SCANsat/ProjectSettings/Physics2DSettings.asset differ diff --git a/Unity/SCANsat/ProjectSettings/ProjectSettings.asset b/Unity/SCANsat/ProjectSettings/ProjectSettings.asset new file mode 100644 index 000000000..d4e334f01 Binary files /dev/null and b/Unity/SCANsat/ProjectSettings/ProjectSettings.asset differ diff --git a/Unity/SCANsat/ProjectSettings/ProjectVersion.txt b/Unity/SCANsat/ProjectSettings/ProjectVersion.txt new file mode 100644 index 000000000..dfca03ea1 --- /dev/null +++ b/Unity/SCANsat/ProjectSettings/ProjectVersion.txt @@ -0,0 +1,2 @@ +m_EditorVersion: 5.2.4f1 +m_StandardAssetsVersion: 0 diff --git a/Unity/SCANsat/ProjectSettings/QualitySettings.asset b/Unity/SCANsat/ProjectSettings/QualitySettings.asset new file mode 100644 index 000000000..b1d6e1e05 Binary files /dev/null and b/Unity/SCANsat/ProjectSettings/QualitySettings.asset differ diff --git a/Unity/SCANsat/ProjectSettings/TagManager.asset b/Unity/SCANsat/ProjectSettings/TagManager.asset new file mode 100644 index 000000000..801fdd7b7 Binary files /dev/null and b/Unity/SCANsat/ProjectSettings/TagManager.asset differ diff --git a/Unity/SCANsat/ProjectSettings/TimeManager.asset b/Unity/SCANsat/ProjectSettings/TimeManager.asset new file mode 100644 index 000000000..da50994c6 Binary files /dev/null and b/Unity/SCANsat/ProjectSettings/TimeManager.asset differ diff --git a/Unity/SCANsat/ProjectSettings/UnityAdsSettings.asset b/Unity/SCANsat/ProjectSettings/UnityAdsSettings.asset new file mode 100644 index 000000000..abc478ff2 Binary files /dev/null and b/Unity/SCANsat/ProjectSettings/UnityAdsSettings.asset differ diff --git a/Unity/SCANsat/ProjectSettings/UnityAnalyticsManager.asset b/Unity/SCANsat/ProjectSettings/UnityAnalyticsManager.asset new file mode 100644 index 000000000..c92abdcf8 Binary files /dev/null and b/Unity/SCANsat/ProjectSettings/UnityAnalyticsManager.asset differ diff --git a/Unity/SCANsat/Temp/compressedData b/Unity/SCANsat/Temp/compressedData new file mode 100644 index 000000000..cf6ab2794 Binary files /dev/null and b/Unity/SCANsat/Temp/compressedData differ diff --git a/Unity/SCANsat/Temp/uncompressedData b/Unity/SCANsat/Temp/uncompressedData new file mode 100644 index 000000000..5fcb41929 Binary files /dev/null and b/Unity/SCANsat/Temp/uncompressedData differ