├── .gitattributes ├── .gitignore ├── BumpBuildNumber ├── BumpBuildNumber.cs ├── BumpBuildNumber.csproj └── Properties │ └── AssemblyInfo.cs ├── FAQ.md ├── FormatterTests ├── FormatterTests.cs ├── FormatterTests.csproj └── Properties │ └── AssemblyInfo.cs ├── GameData └── JSI │ ├── Agencies │ ├── Agents.cfg │ ├── JSI.png │ └── JSI_scaled.truecolor │ ├── RPMPodPatches │ ├── BasicMFD │ │ ├── MFD40x20.cfg │ │ ├── PlaneHUD.cfg │ │ ├── graphset.cfg │ │ ├── p0_home40x20.txt │ │ ├── p0_test.txt │ │ ├── p1_landing40x20.txt │ │ ├── p2_orbit40x20.txt │ │ ├── p2_orbit_graphical.txt │ │ ├── p3_target40x20.txt │ │ ├── p4_shipinfo40x20.txt │ │ ├── p5_crew40x20.txt │ │ ├── p6_resources40x20.txt │ │ ├── pa_HUDPFD.txt │ │ ├── pa_PFD.txt │ │ └── pb_graphs.txt │ ├── PatchesMod │ │ ├── kp0110-pod-patch.cfg │ │ ├── kp0110-remade-internal.cfg │ │ ├── orbital-orb-patch.cfg │ │ └── orbital-orb-remade-internal.cfg │ └── PatchesStock │ │ ├── crew-cabin-patch.cfg │ │ ├── cupola-patch.cfg │ │ ├── cupola-remade-internal.cfg │ │ ├── generic3-cockpit-patch.cfg │ │ ├── mk1-inline-patch.nocfg │ │ ├── mk1-inline-remade-internal.nocfg │ │ ├── mk1-patch.cfg │ │ ├── mk1-remade-internal.cfg │ │ ├── mk12pod-patch.cfg │ │ ├── mk12pod-remade-internal.cfg │ │ ├── mk1cockpit-patch.cfg │ │ ├── mk1cockpit-remade-internal.cfg │ │ ├── mk1lander-remade-internal.cfg │ │ ├── mk1landercan-patch.cfg │ │ ├── mk2-sh-cockpit-remade-internal.cfg │ │ ├── mk2-spp-cockpits.cfg │ │ ├── mk2-stock-cockpit-patch.cfg │ │ ├── mk2landercan-patch.cfg │ │ ├── mk2landercan-remade-internal.cfg │ │ └── mk3cockpit-patch.cfg │ └── RasterPropMonitor │ ├── Library │ ├── Components │ │ ├── HUD │ │ │ ├── heading.dds │ │ │ ├── hud-overlay.dds │ │ │ ├── ladder.dds │ │ │ ├── leftscale.dds │ │ │ ├── model.mu │ │ │ ├── planeHUDdiffuse.png │ │ │ ├── rightscale.dds │ │ │ └── screen.png │ │ ├── MFD40x20v2 │ │ │ ├── MFD40x15v2-Diffuse.dds │ │ │ ├── MFD40x15v2-Emissive.dds │ │ │ ├── model.mu │ │ │ ├── screen-emissive.png │ │ │ └── screen.png │ │ └── NavBall │ │ │ ├── HDG.png │ │ │ ├── NavBall.mu │ │ │ ├── NavBall000.dds │ │ │ └── StaticMask.dds │ ├── Fonts │ │ ├── baseFont.png │ │ ├── extraFont1.png │ │ ├── fontDefinition.txt │ │ └── hudfont.png │ ├── Parts │ │ └── ExternalCameraPart │ │ │ ├── external-camera.cfg │ │ │ └── model000.dds │ ├── Props │ │ ├── CockpitHandle │ │ │ ├── OpenHandle.mu │ │ │ ├── OpenHandleDiffuse.dds │ │ │ └── eva-hatch.cfg │ │ ├── IndicatorPanelReplacement │ │ │ ├── model000.dds │ │ │ ├── model001.dds │ │ │ └── prop.cfg │ │ ├── InternalAirlock │ │ │ ├── InternalAirLock.mu │ │ │ ├── InternalAirLockDiffuse.dds │ │ │ └── eva-hatch-with-model.cfg │ │ ├── InternalFlagPlate │ │ │ ├── FlagPlate.mu │ │ │ ├── FlagPlate000.png │ │ │ └── prop.cfg │ │ ├── InternalHatch │ │ │ ├── CubeCollider.mu │ │ │ └── eva-hatch.cfg │ │ ├── SimpleProps │ │ │ ├── ActionGroupLabelledButtons.cfg │ │ │ ├── AxisIndicator.cfg │ │ │ ├── Blinkenlichten.cfg │ │ │ ├── JSISwitchable.cfg │ │ │ ├── SASModeButtons.cfg │ │ │ ├── SquareButtons.cfg │ │ │ └── TrimmerKnobs.cfg │ │ └── SwitchWCover │ │ │ ├── SwitchIcons.tga │ │ │ ├── SwitchWCover.mu │ │ │ ├── Switch_w_cover_Diff.dds │ │ │ └── mechSwitch.cfg │ ├── Sounds │ │ └── buttonbeep.ogg │ └── Textures │ │ ├── bg01.png │ │ ├── graphgrid.png │ │ ├── noscansat.png │ │ ├── nosignal.png │ │ ├── scaleLabels.png │ │ └── scalebar.png │ ├── Plugins │ ├── 3rdPartyLicenses │ │ ├── digital-7-readme.txt │ │ └── repetition-scrolling-ReadMe.txt │ ├── PluginData │ │ └── rpm-config.cfg │ └── reduce-iva-cpu-usage.cfg │ ├── RasterPropMonitor.version │ ├── rasterpropmonitor-font.assetbundle │ ├── rasterpropmonitor-linux.assetbundle │ ├── rasterpropmonitor-osx.assetbundle │ └── rasterpropmonitor-windows.assetbundle ├── LICENSE.md ├── MechJebRPM ├── MechJebRPM.cs ├── MechJebRPM.csproj ├── MechJebRPMButtons.cs └── Properties │ └── AssemblyInfo.cs ├── PLANS.md ├── README.md ├── RasterPropMonitor.sln ├── RasterPropMonitor ├── Auxiliary modules │ ├── InternalCameraTargetHelper.cs │ ├── JSIActionGroupSwitch.cs │ ├── JSICallbackAnimator.cs │ ├── JSIExternalCameraSelector.cs │ ├── JSIFlashModule.cs │ ├── JSIInternalBackgroundNoise.cs │ ├── JSIInternalEVAHatch.cs │ ├── JSIInternalFlagDecal.cs │ ├── JSILabel.cs │ ├── JSINavBall.cs │ ├── JSINumericInput.cs │ ├── JSIPropIDFinder.cs │ ├── JSIPropTextureShift.cs │ ├── JSIRadar.cs │ ├── JSISelectivelyVisibleProp.cs │ ├── JSISetInternalCameraFOV.cs │ ├── JSISwitchableVariableLabel.cs │ ├── JSIThrustReverser.cs │ ├── JSIVariableAnimator.cs │ └── JSIVariableLabel.cs ├── Core │ ├── AeroExtensions.cs │ ├── ButtonHandler.cs │ ├── CelestialBodyExtensions.cs │ ├── CustomVariable.cs │ ├── FlyingCamera.cs │ ├── JSITextMesh.cs │ ├── MappedVariable.cs │ ├── MathExtensions.cs │ ├── MathVariable.cs │ ├── MonitorPage.cs │ ├── OrbitExtensions.cs │ ├── Protractor.cs │ ├── RPMCEvaluators.cs │ ├── RPMCPersistence.cs │ ├── RPMCTriggeredEvent.cs │ ├── RPMGlobals.cs │ ├── RPMVCEvaluators.cs │ ├── RPMVCPerModule.cs │ ├── RPMVCVariableToObject.cs │ ├── RPMVesselComputer.cs │ ├── RasterPropMonitor.cs │ ├── RasterPropMonitorComputer.cs │ ├── ResourceDataStorage.cs │ ├── SIFormatter.cs │ ├── SelectVariable.cs │ ├── StringProcessor.cs │ ├── TextMenu.cs │ ├── TextRenderer.cs │ ├── UtilityFunctions.cs │ ├── VariableHandler.cs │ └── VariableOrNumber.cs ├── Handlers │ ├── IJSIModule.cs │ ├── JSIChatterer.cs │ ├── JSIEngine.cs │ ├── JSIFAR.cs │ ├── JSIFlightLog.cs │ ├── JSIGraphingBackground.cs │ ├── JSIHeadsUpDisplay.cs │ ├── JSIInternalRPMButtons.cs │ ├── JSIKAC.cs │ ├── JSIMechJeb.cs │ ├── JSIOdometer.cs │ ├── JSIOrbitDisplay.cs │ ├── JSIParachute.cs │ ├── JSIPilotAssistant.cs │ ├── JSIPrimaryFlightDisplay.cs │ ├── JSISASMenu.cs │ ├── JSISteerableCamera.cs │ ├── JSITargetMenu.cs │ ├── JSIVariableGraph.cs │ ├── JSIVariablePageTextSwitcher.cs │ ├── KACWrapper.cs │ └── MechJebRPM.cs ├── Properties │ └── AssemblyInfo.cs ├── RasterPropMonitor.csproj └── Shaders │ ├── RPM-CroppedDisplayShader.shader │ ├── RPM-DisplayShader.shader │ ├── RPM-FontShader.shader │ ├── RPM-JSILabel.shader │ ├── RPM-blur.shader │ ├── RPM-grayscale.shader │ ├── RPM-greenscale.shader │ └── RPM-noise.shader ├── SCANsatRPM ├── JSISCANsatRPM.cs ├── Properties │ └── AssemblyInfo.cs ├── README.md └── SCANsatRPM.csproj └── SharedAssemblyInfo.cs /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | *.sln merge=union 7 | *.csproj merge=union 8 | *.vbproj merge=union 9 | *.fsproj merge=union 10 | *.dbproj merge=union 11 | 12 | # Standard to msysgit 13 | *.doc diff=astextplain 14 | *.DOC diff=astextplain 15 | *.docx diff=astextplain 16 | *.DOCX diff=astextplain 17 | *.dot diff=astextplain 18 | *.DOT diff=astextplain 19 | *.pdf diff=astextplain 20 | *.PDF diff=astextplain 21 | *.rtf diff=astextplain 22 | *.RTF diff=astextplain 23 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Why isn't this ignored anyway?.. 2 | *.userprefs 3 | 4 | ################# 5 | ## Eclipse 6 | ################# 7 | 8 | *.pydevproject 9 | .project 10 | .metadata 11 | bin/ 12 | tmp/ 13 | *.tmp 14 | *.bak 15 | *.swp 16 | *~.nib 17 | local.properties 18 | .classpath 19 | .settings/ 20 | .loadpath 21 | 22 | # External tool builders 23 | .externalToolBuilders/ 24 | 25 | # Locally stored "Eclipse launch configurations" 26 | *.launch 27 | 28 | # CDT-specific 29 | .cproject 30 | 31 | # PDT-specific 32 | .buildpath 33 | 34 | 35 | ################# 36 | ## Visual Studio 37 | ################# 38 | 39 | ## Ignore Visual Studio temporary files, build results, and 40 | ## files generated by popular Visual Studio add-ons. 41 | 42 | # User-specific files 43 | *.suo 44 | *.user 45 | *.sln.docstates 46 | 47 | # Build results 48 | 49 | [Dd]ebug/ 50 | [Rr]elease/ 51 | x64/ 52 | build/ 53 | [Bb]in/ 54 | [Oo]bj/ 55 | 56 | # MSTest test Results 57 | [Tt]est[Rr]esult*/ 58 | [Bb]uild[Ll]og.* 59 | 60 | *_i.c 61 | *_p.c 62 | *.ilk 63 | *.meta 64 | *.obj 65 | *.pch 66 | *.pdb 67 | *.pgc 68 | *.pgd 69 | *.rsp 70 | *.sbr 71 | *.tlb 72 | *.tli 73 | *.tlh 74 | *.tmp 75 | *.tmp_proj 76 | *.log 77 | *.vspscc 78 | *.vssscc 79 | .builds 80 | *.pidb 81 | *.log 82 | *.scc 83 | 84 | # Visual C++ cache files 85 | ipch/ 86 | *.aps 87 | *.ncb 88 | *.opensdf 89 | *.sdf 90 | *.cachefile 91 | 92 | # Visual Studio profiler 93 | *.psess 94 | *.vsp 95 | *.vspx 96 | 97 | # Guidance Automation Toolkit 98 | *.gpState 99 | 100 | # ReSharper is a .NET coding add-in 101 | _ReSharper*/ 102 | *.[Rr]e[Ss]harper 103 | 104 | # TeamCity is a build add-in 105 | _TeamCity* 106 | 107 | # DotCover is a Code Coverage Tool 108 | *.dotCover 109 | 110 | # NCrunch 111 | *.ncrunch* 112 | .*crunch*.local.xml 113 | 114 | # Installshield output folder 115 | [Ee]xpress/ 116 | 117 | # DocProject is a documentation generator add-in 118 | DocProject/buildhelp/ 119 | DocProject/Help/*.HxT 120 | DocProject/Help/*.HxC 121 | DocProject/Help/*.hhc 122 | DocProject/Help/*.hhk 123 | DocProject/Help/*.hhp 124 | DocProject/Help/Html2 125 | DocProject/Help/html 126 | 127 | # Click-Once directory 128 | publish/ 129 | 130 | # Publish Web Output 131 | *.Publish.xml 132 | *.pubxml 133 | 134 | # NuGet Packages Directory 135 | ## TODO: If you have NuGet Package Restore enabled, uncomment the next line 136 | #packages/ 137 | 138 | # Windows Azure Build Output 139 | csx 140 | *.build.csdef 141 | 142 | # Windows Store app package directory 143 | AppPackages/ 144 | 145 | # Others 146 | sql/ 147 | *.Cache 148 | ClientBin/ 149 | [Ss]tyle[Cc]op.* 150 | ~$* 151 | *~ 152 | *.dbmdl 153 | *.[Pp]ublish.xml 154 | *.pfx 155 | *.publishsettings 156 | 157 | # RIA/Silverlight projects 158 | Generated_Code/ 159 | 160 | # Backup & report files from converting an old project file to a newer 161 | # Visual Studio version. Backup files are not needed, because we have git ;-) 162 | _UpgradeReport_Files/ 163 | Backup*/ 164 | UpgradeLog*.XML 165 | UpgradeLog*.htm 166 | 167 | # SQL Server files 168 | App_Data/*.mdf 169 | App_Data/*.ldf 170 | 171 | ############# 172 | ## Windows detritus 173 | ############# 174 | 175 | # Windows image file caches 176 | Thumbs.db 177 | ehthumbs.db 178 | 179 | # Folder config file 180 | Desktop.ini 181 | 182 | # Recycle Bin used on file shares 183 | $RECYCLE.BIN/ 184 | 185 | # Mac crap 186 | .DS_Store 187 | 188 | 189 | ############# 190 | ## Python 191 | ############# 192 | 193 | *.py[co] 194 | 195 | # Packages 196 | *.egg 197 | *.egg-info 198 | dist/ 199 | build/ 200 | eggs/ 201 | parts/ 202 | # Mihara: Well damn. GameData contains Parts... 203 | !GameData/**/* 204 | var/ 205 | sdist/ 206 | develop-eggs/ 207 | .installed.cfg 208 | 209 | # Installer logs 210 | pip-log.txt 211 | 212 | # Unit test / coverage reports 213 | .coverage 214 | .tox 215 | 216 | #Translations 217 | *.mo 218 | 219 | #Mr Developer 220 | .mr.developer.cfg 221 | GameData/JSI/RasterPropMonitor/Plugins/RasterPropMonitor.dll 222 | GameData/JSI/RasterPropMonitor/Plugins/MechJebRPM.dll 223 | dev_README.txt 224 | *.zip 225 | GameData/ModuleManager.*.dll 226 | GameData/JSI/JSIAdvTransparentPods/Plugins/JSIAdvTransparentPods.dll 227 | -------------------------------------------------------------------------------- /BumpBuildNumber/BumpBuildNumber.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | using System.Text.RegularExpressions; 3 | 4 | // This is a neat little idea I found of how to deal with the problem of non-incrementing file version on StackOverflow 5 | // It has the advantage of not relying on a particular build system and being completely optional. 6 | 7 | namespace BumpBuildNumber 8 | { 9 | class BumpBuildNumber 10 | { 11 | public static void Main(string[] args) 12 | { 13 | try { 14 | string FILE = @"SharedAssemblyInfo.cs"; 15 | string text = File.ReadAllText(FILE); 16 | var regex = new Regex(@"(?\[assembly: AssemblyFileVersion\(""\d+\.\d+\.\d+\.)(?\d+)(?""\)\])"); 17 | var match = regex.Match(text); 18 | int buildNumber = int.Parse(match.Groups["BUILD"].Value) + 1; 19 | string newText = regex.Replace(text, "${STATIC}" + buildNumber + "${TRAILER}", 1); 20 | File.WriteAllText(FILE, newText); 21 | } catch { 22 | } 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /BumpBuildNumber/BumpBuildNumber.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Debug 5 | AnyCPU 6 | 8.0.30703 7 | 2.0 8 | {059C7AF3-35D8-4F54-B1C9-8914E59CB5A6} 9 | Exe 10 | BumpBuildNumber 11 | BumpBuildNumber 12 | 0.19.2 13 | v3.5 14 | 15 | 16 | true 17 | full 18 | false 19 | ..\bin\Debug 20 | DEBUG; 21 | prompt 22 | 4 23 | true 24 | 25 | 26 | true 27 | ..\bin\Release 28 | prompt 29 | 4 30 | true 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /BumpBuildNumber/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | 4 | // Information about this assembly is defined by the following attributes. 5 | // Change them to the values specific to your project. 6 | 7 | [assembly: AssemblyTitle("BumpBuildNumber")] 8 | [assembly: AssemblyDescription("A simple build utility to automate bumping build numbers without learning MSBuild tricks under Xamarin.")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("")] 12 | [assembly: AssemblyCopyright("Eugene Medvedev")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". 17 | // The form "{Major}.{Minor}.*" will automatically update the build and revision, 18 | // and "{Major}.{Minor}.{Build}.*" will update just the revision. 19 | 20 | [assembly: AssemblyVersion("1.0.*")] 21 | 22 | // The following attributes are used to specify the signing key for the assembly, 23 | // if desired. See the Mono documentation for more information about signing. 24 | 25 | //[assembly: AssemblyDelaySign(false)] 26 | //[assembly: AssemblyKeyFile("")] 27 | 28 | -------------------------------------------------------------------------------- /FormatterTests/FormatterTests.cs: -------------------------------------------------------------------------------- 1 | /* This is a crude imitation of a formal testing methodology, 2 | * but it might suffice. 3 | */ 4 | using System; 5 | using JSI; 6 | 7 | namespace FormatterTests 8 | { 9 | class MainClass 10 | { 11 | private static readonly SIFormatProvider fp = new SIFormatProvider(); 12 | 13 | // Analysis disable once UnusedParameter 14 | public static void Main(string[] args) 15 | { 16 | 17 | double[] bars = { 18 | 1d, 19 | -0.0123, 20 | 4923, 21 | 58794.2435, 22 | 0, 23 | 99999.9999999999, 24 | double.NaN, 25 | double.PositiveInfinity, 26 | double.NegativeInfinity, 27 | 100019.9999, 28 | 0.2, 29 | }; 30 | 31 | foreach (double value in bars) { 32 | Console.WriteLine(string.Format(fp, "BAR,10,100,10000 :>{0:BAR,10,100,10000}<| {0}", value)); 33 | Console.WriteLine(string.Format(fp, "BAR,-10,100,10000 :>{0:BAR,-10,100,10000}<| {0}", value)); 34 | Console.WriteLine(string.Format(fp, "BAR= |,10,100,10000 :>{0:BAR= |,10,100,10000}<| {0}", value)); 35 | Console.WriteLine(string.Format(fp, "BAR= |,-10,100,10000:>{0:BAR= |,-10,100,10000}<| {0}", value)); 36 | Console.WriteLine(string.Format(fp, "BAR~,10,100,10000 :>{0:BAR~,10,100,10000}<| {0}", value)); 37 | Console.WriteLine(string.Format(fp, "BAR ~,10,100,10000 :>{0:BAR ~,10,100,10000}<| {0}", value)); 38 | Console.WriteLine(string.Format(fp, "BAR= ,10,0,1 :>{0:BAR= ,10,0,1}<| {0}", value)); 39 | Console.WriteLine(string.Format(fp, "BAR= ,10 :>{0:BAR= ,10}<| {0}", value)); 40 | Console.WriteLine(string.Format(fp, "BAR,10 :>{0:BAR,10}<| {0}", value)); 41 | } 42 | Console.WriteLine("BAR tests done, press any key to start SIP tests"); 43 | Console.ReadKey(); 44 | Console.WriteLine(); 45 | 46 | 47 | double[] values = { 48 | 1d, 49 | 1000000d, 50 | 0.1234567, 51 | 123456.7, 52 | 1234567890.3, 53 | 11234567890.2, 54 | 90148.3, 55 | -123.45, 56 | -123456.7, 57 | -0.0001234, 58 | 0.0123, 59 | -0.0123, 60 | 0, 61 | double.NaN, 62 | double.PositiveInfinity, 63 | double.NegativeInfinity, 64 | 100019.9999, 65 | }; 66 | 67 | foreach (double value in values) { 68 | // If the formatter is working correctly, all of the '|' 69 | // characters will line up under the 'v'. 70 | Console.WriteLine("\nUnformatted: {0}\nAlignment Mark v", value); 71 | Console.WriteLine(string.Format(fp, "SIP_6 :>{0:SIP_6}< |", value)); 72 | Console.WriteLine(string.Format(fp, "SIP_6;\"Q\" :>{0:SIP_6;\"Q\"}< |", value)); 73 | Console.WriteLine(string.Format(fp, "SIP_6;\"Q\";0:>{0:SIP_6;\"Q\";0}< |", value)); 74 | Console.WriteLine(string.Format(fp, "SIP_06 :>{0:SIP_06}< |", value)); 75 | Console.WriteLine(string.Format(fp, "SIP_6.3 :>{0:SIP_6.3}< |", value)); 76 | Console.WriteLine(string.Format(fp, "SIP_6.2 :>{0:SIP_6.2}< |", value)); 77 | Console.WriteLine(string.Format(fp, "SIP6 :>{0:SIP6}< |", value)); 78 | Console.WriteLine(string.Format(fp, "SIP6.3 :>{0:SIP6.3}< |", value)); 79 | Console.WriteLine(string.Format(fp, "SIP_9 :>{0:SIP_9}<|", value)); 80 | Console.WriteLine(string.Format(fp, "SIP_9.3 :>{0:SIP_9.3}<|", value)); 81 | Console.WriteLine(string.Format(fp, "SIP9.3 :>{0:SIP9.3}<|", value)); 82 | Console.WriteLine(string.Format(fp, "SIP09.3 :>{0:SIP09.3}<|", value)); 83 | Console.WriteLine(string.Format(fp, "SIP_10 :>{0:SIP_10}|", value)); 84 | } 85 | Console.WriteLine("SIP tests done, press any key to start DMS tests"); 86 | Console.ReadKey(); 87 | Console.WriteLine(); 88 | 89 | double[] degrees = { 90 | 123.45, 91 | -123.45, 92 | 1.234, 93 | 0.1234, 94 | 0, 95 | double.NaN, 96 | double.PositiveInfinity, 97 | double.NegativeInfinity, 98 | }; 99 | 100 | 101 | foreach (double value in degrees) { 102 | Console.WriteLine(string.Format(fp,"DMSd°m's\": {0:DMSd°m's\"} ({0})",value)); 103 | Console.WriteLine(string.Format(fp,"DMSdd+m+s+E: {0:DMSdd+m+s+E} ({0})",value)); 104 | Console.WriteLine(string.Format(fp,"DMSdd+mm+ss+E: {0:DMSdd+mm+ss+E} ({0})",value)); 105 | Console.WriteLine(string.Format(fp,"DMSddNm+s+: {0:DMSddNm+s+} ({0})",value)); 106 | // The string as it was previously returned is... 107 | Console.WriteLine(string.Format(fp,"DMSd+ mm+ ss+ N: {0:DMSd+ mm+ ss+ N} ({0})",value)); 108 | } 109 | Console.WriteLine("DMS tests done, press any key to start KDT tests"); 110 | Console.ReadKey(); 111 | Console.WriteLine(); 112 | 113 | double[] seconds = { 114 | 0, 115 | 12, 116 | -12, 117 | 1234, 118 | -1234, 119 | 123456, 120 | -123456, 121 | 12345.6789, 122 | -12345.6789, 123 | 12345.95, 124 | -12345.95, 125 | double.NaN, 126 | double.PositiveInfinity, 127 | double.NegativeInfinity, 128 | }; 129 | 130 | foreach (double value in seconds) { 131 | // The full time format is... 132 | Console.WriteLine(string.Format(fp,"KDT+y:ddd:hh:mm:ss >{0:KDT+y:ddd:hh:mm:ss} ({0})",value)); 133 | Console.WriteLine(string.Format(fp,"KDT-y:ddd:hh:mm:ss >{0:KDT-y:ddd:hh:mm:ss} ({0})",value)); 134 | Console.WriteLine(string.Format(fp,"KDTy:d:h:m:s >{0:KDTy:d:h:m:s} ({0})",value)); 135 | Console.WriteLine(string.Format(fp,"KDTS.f >{0:KDTS.f} ({0})",value)); 136 | Console.WriteLine(string.Format(fp,"KDTS.fff >{0:KDTS.fff} ({0})",value)); 137 | } 138 | 139 | 140 | } 141 | } 142 | } 143 | -------------------------------------------------------------------------------- /FormatterTests/FormatterTests.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Debug 5 | AnyCPU 6 | 8.0.30703 7 | 2.0 8 | {7FF5F186-3C9C-4E75-B71A-B0C248365D75} 9 | Exe 10 | FormatterTests 11 | FormatterTests 12 | 0.19.4 13 | True 14 | 65001 15 | v3.5 16 | 17 | 18 | true 19 | full 20 | false 21 | ..\bin\Debug 22 | DEBUG; 23 | prompt 24 | 4 25 | true 26 | 4 27 | 28 | 29 | true 30 | ..\bin\Release 31 | prompt 32 | 4 33 | true 34 | 4 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | Properties\SharedAssemblyInfo.cs 44 | 45 | 46 | 47 | 48 | 49 | {F19C7AB4-50C2-4378-9673-CC039CA12E10} 50 | RasterPropMonitor 51 | 52 | 53 | -------------------------------------------------------------------------------- /FormatterTests/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | 4 | // Information about this assembly is defined by the following attributes. 5 | // Change them to the values specific to your project. 6 | [assembly: AssemblyTitle("FormatterTests")] 7 | [assembly: AssemblyDescription("")] -------------------------------------------------------------------------------- /GameData/JSI/Agencies/Agents.cfg: -------------------------------------------------------------------------------- 1 | AGENT 2 | { 3 | name = Junk Systems Inc. 4 | title = Junk Systems Inc. 5 | 6 | description = Junk Systems Inc. is a purveyor of advanced flight instruments, used by many other companies to outfit their equipment. Rumours that these have mostly been assembled from components found in the trash are vehemently denied these days, even though the word "junk" remains within the corporation's very name. 7 | 8 | mentality = EasyGoing 0.25 9 | mentality = Pioneer 10 | mentality = Scientific 11 | 12 | logoURL = JSI/Agencies/JSI 13 | logoScaledURL = JSI/Agencies/JSI_scaled 14 | } 15 | -------------------------------------------------------------------------------- /GameData/JSI/Agencies/JSI.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mihara/RasterPropMonitor/acf5fb8086c332728d103aae6926abde0a87d1ee/GameData/JSI/Agencies/JSI.png -------------------------------------------------------------------------------- /GameData/JSI/Agencies/JSI_scaled.truecolor: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mihara/RasterPropMonitor/acf5fb8086c332728d103aae6926abde0a87d1ee/GameData/JSI/Agencies/JSI_scaled.truecolor -------------------------------------------------------------------------------- /GameData/JSI/RPMPodPatches/BasicMFD/PlaneHUD.cfg: -------------------------------------------------------------------------------- 1 | 2 | PROP 3 | { 4 | name = RasterPropMonitorBasicHUD 5 | 6 | MODEL 7 | { 8 | model = JSI/RasterPropMonitor/Library/Components/HUD/model 9 | texture = planeHUDdiffuse,JSI/RasterPropMonitor/Library/Components/HUD/planeHUDdiffuse 10 | texture = screen,JSI/RasterPropMonitor/Library/Components/HUD/screen 11 | } 12 | 13 | MODULE 14 | { 15 | name = RasterPropMonitor 16 | screenTransform = HUDScreenObj 17 | fontTransform = JSI/RasterPropMonitor/Library/Fonts/hudfont 18 | textureLayerID = _MainTex // Name of texture layer to work with on the screen surface. 19 | screenWidth = 40 // Screen width in letters. 20 | screenHeight = 20 // Screen height in lines. 21 | screenPixelWidth = 640 // Width of the generated screen texture in pixels. 22 | screenPixelHeight = 640 // Height of the generated screen texture in pixels. 23 | fontLetterWidth = 16 // Width of a font character. 24 | fontLetterHeight = 32 // Height of a font character. 25 | cameraAspect = 1.0 26 | fontDefinition = JSI/RasterPropMonitor/Library/Fonts/fontDefinition.txt 27 | 28 | extraFont = JSI/RasterPropMonitor/Library/Fonts/hudfont 29 | 30 | refreshDrawRate = 2 31 | refreshTextRate = 5 32 | refreshDataRate = 20 33 | 34 | buttonClickSound = Squad/Sounds/sound_click_latch 35 | buttonClickVolume = 0.6 36 | 37 | noSignalTextureURL = JSI/RasterPropMonitor/Library/textures/nosignal 38 | 39 | PAGE 40 | { 41 | name = aviapfd 42 | default = yes 43 | text = JSI/RPMPodPatches/BasicMFD/pa_HUDPFD.txt 44 | defaultFontTint = 0,255,0,255 45 | button = HUDScreenObj 46 | BACKGROUNDHANDLER 47 | { 48 | name = JSIHeadsUpDisplay 49 | method = RenderHUD 50 | backgroundColor = 0,255,0,20 51 | 52 | horizonTexture = JSI/RasterPropMonitor/Library/Components/HUD/ladder 53 | use360horizon = true 54 | horizonSize = 320,320 55 | horizonTextureSize = 480,480 56 | 57 | headingBar = JSI/RasterPropMonitor/Library/Components/HUD/heading 58 | headingBarPosition = 160,122,320,38 59 | headingBarWidth = 320 60 | 61 | verticalBar = RadarAltOceanBar;VSIBar 62 | 63 | staticOverlay = JSI/RasterPropMonitor/Library/Components/HUD/hud-overlay 64 | } 65 | } 66 | 67 | PAGE 68 | { 69 | name = blank 70 | button = HUDScreenObj 71 | } 72 | } 73 | } 74 | 75 | JSIHUD_VERTICAL_BAR 76 | { 77 | name = RadarAltOceanBar 78 | texture = JSI/RasterPropMonitor/Library/Components/HUD/rightscale 79 | useLog10 = true 80 | variableName = RADARALTOCEAN 81 | position = 480,160,64,320 82 | scale = 0, 10000 83 | textureLimit = 855,170 84 | textureSize = 640 85 | } 86 | 87 | JSIHUD_VERTICAL_BAR 88 | { 89 | name = VSIBar 90 | texture = JSI/RasterPropMonitor/Library/Components/HUD/leftscale 91 | useLog10 = true 92 | variableName = VERTSPEED 93 | position = 96,160,64,320 94 | scale = -10000, 10000 95 | textureLimit = 1845, 208 96 | textureSize = 640 97 | } 98 | -------------------------------------------------------------------------------- /GameData/JSI/RPMPodPatches/BasicMFD/graphset.cfg: -------------------------------------------------------------------------------- 1 | JSIGRAPHSET 2 | { 3 | name = ExperimentalGraphSet 4 | GRAPH 5 | { 6 | variableName = ALTITUDE 7 | color = 255,0,0,255 8 | } 9 | GRAPH 10 | { 11 | variableName = RADARALTOCEAN 12 | color = 0,255,0,255 13 | } 14 | } -------------------------------------------------------------------------------- /GameData/JSI/RPMPodPatches/BasicMFD/p0_home40x20.txt: -------------------------------------------------------------------------------- 1 | [hw] ATT | GRAPH | TRGT | AUTO | VESSEL | IGNITOR | DPAI 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Junk Systems Inc. 10 | Advanced flight instruments 11 | for every conceivable occasion 12 | 13 | 14 | 15 | 16 | 17 | 18 | -[hw] HOME[/hw] RPM v{0} $&$ RPMVERSION 19 | 20 | [hw] NAV | ORB | DOCK | DATA | CREW | RSRC | EXT 21 | -------------------------------------------------------------------------------- /GameData/JSI/RPMPodPatches/BasicMFD/p0_test.txt: -------------------------------------------------------------------------------- 1 |  2 | [@x38][@y20]This page intentionally left blank 3 | 4 | 5 | Testing character generation system... 6 | µ is mu. €Δ is delta. ☊ is DN, ☋ is AN 7 | 8 | ☊¡¢£¤¥¦§¨©ª«¬☋®¯ 9 | °±²³´µ¶·¸¹º»¼½¾¿ 10 | 11 | The system is also capable of[sup]superscript[/sup] 12 | as well as[sub]subscript[/sub]. 13 | Also [hw]halfwidth[/hw] [dw]and double.[/dw] 14 | and [hw][sup]both sub/superscript and width at once[/hw][/sup] 15 | 16 | And [font1]multiple different fonts at once.[font0] 17 | 18 | Remember: All pages are user-editable! 19 | -------------------------------------------------------------------------------- /GameData/JSI/RPMPodPatches/BasicMFD/p1_landing40x20.txt: -------------------------------------------------------------------------------- 1 | Asc/Des Mode Body: {0} $&$ ORBITBODY 2 | R.Alt [#00ffffff]{0:SIP_6.3}m [#ffffffff]Roll: [#00ffffff]{1,7:0.00}° $&$RADARALTOCEAN ROLL 3 | V.Spd [#00ffffff]{0:SIP_6.3}m/s [#ffffffff]Pitch:[#00ffffff]{1,7:0.00}° $&$VERTSPEED PITCH 4 | H.Spd [#00ffffff]{0:SIP_6.3}m/s [#ffffffff]Hdg: [#00ffffff]{1,7:0.00}° $&$HORZVELOCITY HEADING 5 | TWR:[#00ffffff]{0,4:0.00}[#ffffffff]/[#0099ffff]{1,4:0.0} [#ffffffff]Thr:[#00ffffff]{2,6:0.00}[#ffffffff]/[#0099ffff]{3,6:0.0}kN $&$TWR TWRMAX THRUST THRUSTMAX 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | {0:" Slope: "0.0°; } $&$ SLOPEANGLE 17 | [#ffffff70]Lat:[#ffffffff]{0:DMSdd+mm+ss+N} [#ffffff70]Lon:[#ffffffff]{1:DMSdd+mm+ss+E}$&$LATITUDE LONGITUDE 18 | {2:;" ";""}[#ffffff70]T.Lat:[#ffffffff]{0:DMSdd+mm+ss+N} [#ffffff70]T.Lon:[#ffffffff]{1:DMSdd+mm+ss+E}$&$LATITUDETGT LONGITUDETGT TARGETEXISTS 19 | {1:"Ascent ";"[#ff9999ff]!Descent![#ffffffff] ";""} {0:; }Est. {0:METMM:ss.f}s $&$TIMETOIMPACTSECS VERTSPEEDROUNDED 20 | SAS:{0,-3:"[#00ff00ff]On [#ffffffff]";0;Off}| RCS:{1,-3:"[#00ff00ff]On [#ffffffff]";0;Off}/{2:####.##;;"[#ff0000ff]!Empty![#ffffffff]"}| LF:{3:#####.##;;"[#ff0000ff]!Empty!"}$&$ SAS RCS SYSR_MONOPROPELLANT SYSR_LIQUIDFUEL 21 | -------------------------------------------------------------------------------- /GameData/JSI/RPMPodPatches/BasicMFD/p2_orbit40x20.txt: -------------------------------------------------------------------------------- 1 | ----Orbit: {1,-15} Stage {0:00}---- $&$STAGE ORBITBODY 2 | Vel: {0:SIP_10.1}m/s Alt: {1:SIP_8.3}m $&$ORBTSPEED ALTITUDE 3 | ------Node in T-----------ΔV:---THROTTLE--------------------------- 4 | {0,17:MET+yy:ddd:hh:mm:ss.f} |{1,9:0.00} | {2,5:P0} $&$ MNODETIMESECS MNODEDV THROTTLE 5 | ---------------------------------------------- 6 | ApA: {0:SIP_6.1}m INC: {1,7:0.000}° $&$APOAPSIS INCLINATION 7 | PeA: {0:SIP_6.1}m ECC: {1,7:0.000} $&$PERIAPSIS ECCENTRICITY 8 | ApT: {0:METyy:ddd:hh:mm:ss.f} $&$TIMETOAPSECS 9 | PeT:{0:MET-yy:ddd:hh:mm:ss.f} $&$TIMETOPESECS 10 | OP: {0:METyy:ddd:hh:mm:ss.f}$&$ORBPERIODSECS 11 | 12 | {1:"Target: ";"";""}{0}{1:;" ";""} $&$ TARGETNAME TARGETEXISTS 13 | {1:;" ";""}Relative inclination: {0:0.000}° $&$RELATIVEINCLINATION TARGETEXISTS 14 | {1:;" ";""}To ☋: {0:MET-yy:ddd:hh:mm:ss.f} $&$ TIMETOANWITHTARGETSECS TARGETEXISTS 15 | {1:;" ";""}To ☊: {0:MET-yy:ddd:hh:mm:ss.f} $&$ TIMETODNWITHTARGETSECS TARGETEXISTS 16 | {1:;" ";""}T. OP: {0:METyy:ddd:hh:mm:ss.f} $&$ TARGETORBPERIODSECS TARGETEXISTS 17 | {1:;" ";""}Time to AP: {0:METyy:ddd:hh:mm:ss.f} $&$ TARGETTIMETOAPSECS TARGETEXISTS 18 | {1:;" ";""}Time to PE: {0:MET-yy:ddd:hh:mm:ss.f} $&$ TARGETTIMETOPESECS TARGETEXISTS 19 | {0:;" ";""}Target AP: {1:SIP_8}m PE: {2:SIP_8}m$&$ TARGETEXISTS TARGETAPOAPSIS TARGETPERIAPSIS 20 | {0:;" ";""} ECC: {1:0.000} Vel: {2:SIP_8}m/s$&$ TARGETEXISTS TARGETECCENTRICITY TARGETORBITALVEL -------------------------------------------------------------------------------- /GameData/JSI/RPMPodPatches/BasicMFD/p2_orbit_graphical.txt: -------------------------------------------------------------------------------- 1 | ----Orbit: {1,-15} Stage {0:00}---- $&$STAGE ORBITBODY 2 | Vel: {0:SIP_10.1}m/s Alt: {1:SIP_8.3}m $&$ORBTSPEED ALTITUDE 3 | ApA: {0:SIP_6.1}m INC: {1,7:0.000}° $&$APOAPSIS INCLINATION 4 | PeA: {0:SIP_6.1}m ECC: {1,7:0.000} $&$PERIAPSIS ECCENTRICITY 5 | ApT: {0:METyy:ddd:hh:mm:ss.f} $&$TIMETOAPSECS 6 | PeT:{0:MET-yy:ddd:hh:mm:ss.f} $&$TIMETOPESECS 7 | OP: {0:METyy:ddd:hh:mm:ss.f}$&$ORBPERIODSECS -------------------------------------------------------------------------------- /GameData/JSI/RPMPodPatches/BasicMFD/p3_target40x20.txt: -------------------------------------------------------------------------------- 1 | {1:"Target: ";"";""}{0}{1:;"Target: [#ffffff30]NO TARGET";""} $&$ TARGETNAME TARGETEXISTS 2 | {2:;" ";""}Dist: {0:SIP_6.3}m Vel: {1:SIP_6.3}m/s $&$ TARGETDISTANCE APPROACHSPEED TARGETEXISTS 3 | {3:;" ";""}R.Ang X: {0,6:0.00}° Y:{1,6:0.00}° Z: {2,6:0.00}° $&$TARGETANGLEX TARGETANGLEY TARGETANGLEZ TARGETEXISTS 4 | {0:;;" Please select a reference part "} $&$ ISREMOTEREFERENCE 5 | {0:;;" in target management menu. "} $&$ ISREMOTEREFERENCE 6 | 7 | 8 | 9 | {0:;" ";""} [#ffffff77][@x-{1:0.0}][@y-{1:0.0}]¢ [@x{1:0.0}][@y-{1:0.0}]¡ $&$ TARGETEXISTS TARGETANGLEDEV 10 | 11 | 12 | {0:;" ";""} [#ffffff77][@x-{1:0.0}][@y{1:0.0}]¤ [@x{1:0.0}][@y{1:0.0}]£ $&$ TARGETEXISTS TARGETANGLEDEV 13 | 14 | 15 | {0:;" ";""} R.Velocity R.Distance $&$ TARGETEXISTS 16 | {2:;" ";""} X:{0:SIP_8.3}m/s X:{1:SIP_6.3}m $&$TGTRELX TARGETDISTANCEX TARGETEXISTS 17 | {2:;" ";""} Y:{0:SIP_8.3}m/s Y:{1:SIP_6.3}m $&$TGTRELY TARGETDISTANCEY TARGETEXISTS 18 | {2:;" ";""} Z:{0:SIP_8.3}m/s Z:{1:SIP_6.3}m $&$TGTRELZ TARGETDISTANCEZ TARGETEXISTS 19 | ________________________________________ 20 | SAS:{0,-6:"[#00ff00ff]Active[#ffffffff]";0;Off}| RCS:{1,-6:"[#00ff00ff]Active[#ffffffff]";0;Off}| {2:####.##;;"[#ff0000ff]!Empty!"}$&$ SAS RCS SYSR_MONOPROPELLANT 21 | -------------------------------------------------------------------------------- /GameData/JSI/RPMPodPatches/BasicMFD/p4_shipinfo40x20.txt: -------------------------------------------------------------------------------- 1 | ------"{0}" INFO--------------$&$ NAME 2 | Body: {0} Status: {1} $&$ORBITBODY SITUATION 3 | 4 | Commander: {0}$&$CREW_0_FULL 5 | 6 | UT : {0:KDTyy:ddd:hh:mm:ss.f} $&$ UTSECS 7 | MET: {0:METyy:ddd:hh:mm:ss.f} $&$ METSECS 8 | 9 | Lat: {0:000.00000"°N";000.00000"°S"} Lon:{1:000.00000"°E";000.00000"°W"}$&$LATITUDE LONGITUDE 10 | Mass(W): {1,5:0.00}t Mass(D): {0,4:0.00}t $&$MASSDRY MASSWET 11 | G: {0,4:0.00} ACCL: {1,4:0.00}/{2,4:0.00} $&$GFORCE ACCEL MAXACCEL 12 | Stage ΔV: {1:0.0} Isp: {0:0.0}s $&$ REALISP DELTAVSTAGE 13 | 14 | Stage: {0}. Temperature: {1:0.0}°C $&$ STAGE PODTEMPERATURE 15 | {0:Atmosphere depth: 00.0%;;} $&$ ATMOSPHEREDEPTH 16 | Biome: 17 | {0} $&$ BIOMENAME 18 | Science: {0:0.0} Mits $&$SCIENCEDATA 19 | 20 | SAS:{0,-6:"[#00ff00ff]Active[#ffffffff]";0;Off} LIGHT:{1,-3:"[#00ff00ff]On [#ffffffff]";0;Off} L.LEG:{2,-8:"[#00ff00ff]Deployed";0;Retracted} $&$SAS LIGHTS GEAR -------------------------------------------------------------------------------- /GameData/JSI/RPMPodPatches/BasicMFD/p5_crew40x20.txt: -------------------------------------------------------------------------------- 1 | "{0}" Crew roster: $&$ NAME 2 | {2}{1:":"; ; } {0}$&$CREW_0_FULL CREW_0_PRESENT CREW_0_TITLE 3 | {2}{1:":"; ; } {0}$&$CREW_1_FULL CREW_1_PRESENT CREW_1_TITLE 4 | {2}{1:":"; ; } {0}$&$CREW_2_FULL CREW_2_PRESENT CREW_2_TITLE 5 | {2}{1:":"; ; } {0}$&$CREW_3_FULL CREW_3_PRESENT CREW_3_TITLE 6 | {2}{1:":"; ; } {0}$&$CREW_4_FULL CREW_4_PRESENT CREW_4_TITLE 7 | {2}{1:":"; ; } {0}$&$CREW_5_FULL CREW_5_PRESENT CREW_5_TITLE 8 | {2}{1:":"; ; } {0}$&$CREW_6_FULL CREW_6_PRESENT CREW_6_TITLE 9 | {2}{1:":"; ; } {0}$&$CREW_7_FULL CREW_7_PRESENT CREW_7_TITLE 10 | {2}{1:":"; ; } {0}$&$CREW_8_FULL CREW_8_PRESENT CREW_8_TITLE 11 | {2}{1:":"; ; } {0}$&$CREW_9_FULL CREW_9_PRESENT CREW_9_TITLE 12 | {2}{1:":"; ; } {0}$&$CREW_10_FULL CREW_10_PRESENT CREW_10_TITLE 13 | {2}{1:":"; ; } {0}$&$CREW_11_FULL CREW_11_PRESENT CREW_11_TITLE 14 | -------------------------------------------------------------------------------- /GameData/JSI/RPMPodPatches/BasicMFD/p6_resources40x20.txt: -------------------------------------------------------------------------------- 1 | Resources: 2 | {0,14}{2:\:;;}{1,8:0.0/;;}{2,-8:0.00;;}{2:;; }{3,8:"("00.0%")"}$&$LISTR_0_NAME LISTR_0_VAL LISTR_0_MAX LISTR_0_PERCENT 3 | {0,14}{2:\:;;}{1,8:0.0/;;}{2,-8:0.00;;}{2:;; }{3,8:"("00.0%")"}$&$LISTR_1_NAME LISTR_1_VAL LISTR_1_MAX LISTR_1_PERCENT 4 | {0,14}{2:\:;;}{1,8:0.0/;;}{2,-8:0.00;;}{2:;; }{3,8:"("00.0%")"}$&$LISTR_2_NAME LISTR_2_VAL LISTR_2_MAX LISTR_2_PERCENT 5 | {0,14}{2:\:;;}{1,8:0.0/;;}{2,-8:0.00;;}{2:;; }{3,8:"("00.0%")"}$&$LISTR_3_NAME LISTR_3_VAL LISTR_3_MAX LISTR_3_PERCENT 6 | {0,14}{2:\:;;}{1,8:0.0/;;}{2,-8:0.00;;}{2:;; }{3,8:"("00.0%")"}$&$LISTR_4_NAME LISTR_4_VAL LISTR_4_MAX LISTR_4_PERCENT 7 | {0,14}{2:\:;;}{1,8:0.0/;;}{2,-8:0.00;;}{2:;; }{3,8:"("00.0%")"}$&$LISTR_5_NAME LISTR_5_VAL LISTR_5_MAX LISTR_5_PERCENT 8 | {0,14}{2:\:;;}{1,8:0.0/;;}{2,-8:0.00;;}{2:;; }{3,8:"("00.0%")"}$&$LISTR_6_NAME LISTR_6_VAL LISTR_6_MAX LISTR_6_PERCENT 9 | {0,14}{2:\:;;}{1,8:0.0/;;}{2,-8:0.00;;}{2:;; }{3,8:"("00.0%")"}$&$LISTR_7_NAME LISTR_7_VAL LISTR_7_MAX LISTR_7_PERCENT 10 | {0,14}{2:\:;;}{1,8:0.0/;;}{2,-8:0.00;;}{2:;; }{3,8:"("00.0%")"}$&$LISTR_8_NAME LISTR_8_VAL LISTR_8_MAX LISTR_8_PERCENT 11 | {0,14}{2:\:;;}{1,8:0.0/;;}{2,-8:0.00;;}{2:;; }{3,8:"("00.0%")"}$&$LISTR_9_NAME LISTR_9_VAL LISTR_9_MAX LISTR_9_PERCENT 12 | {0,14}{2:\:;;}{1,8:0.0/;;}{2,-8:0.00;;}{2:;; }{3,8:"("00.0%")"}$&$LISTR_10_NAME LISTR_10_VAL LISTR_10_MAX LISTR_10_PERCENT 13 | {0,14}{2:\:;;}{1,8:0.0/;;}{2,-8:0.00;;}{2:;; }{3,8:"("00.0%")"}$&$LISTR_11_NAME LISTR_11_VAL LISTR_11_MAX LISTR_11_PERCENT 14 | {0,14}{2:\:;;}{1,8:0.0/;;}{2,-8:0.00;;}{2:;; }{3,8:"("00.0%")"}$&$LISTR_12_NAME LISTR_12_VAL LISTR_12_MAX LISTR_12_PERCENT 15 | {0,14}{2:\:;;}{1,8:0.0/;;}{2,-8:0.00;;}{2:;; }{3,8:"("00.0%")"}$&$LISTR_13_NAME LISTR_13_VAL LISTR_13_MAX LISTR_13_PERCENT 16 | {0,14}{2:\:;;}{1,8:0.0/;;}{2,-8:0.00;;}{2:;; }{3,8:"("00.0%")"}$&$LISTR_14_NAME LISTR_14_VAL LISTR_14_MAX LISTR_14_PERCENT 17 | {0,14}{2:\:;;}{1,8:0.0/;;}{2,-8:0.00;;}{2:;; }{3,8:"("00.0%")"}$&$LISTR_15_NAME LISTR_15_VAL LISTR_15_MAX LISTR_15_PERCENT 18 | {0,14}{2:\:;;}{1,8:0.0/;;}{2,-8:0.00;;}{2:;; }{3,8:"("00.0%")"}$&$LISTR_16_NAME LISTR_16_VAL LISTR_16_MAX LISTR_16_PERCENT 19 | 20 | Total mass:{0,9:0.000} t. $&$MASSRESOURCES -------------------------------------------------------------------------------- /GameData/JSI/RPMPodPatches/BasicMFD/pa_HUDPFD.txt: -------------------------------------------------------------------------------- 1 | 2 | PRS: {1,7:0.000}kPa ASL: {0:SIP6}m $&$ ALTITUDE DYNAMICPRESSURE 3 | ATM: {0,5:00.0%} TER: {1:SIP6}m $&$ ATMOSPHEREDEPTH TERRAINHEIGHT 4 | [@y-3][@x2]{0,6:000.0}° $&$ HEADING 5 | [@y4] [hw]{0:SIP6}m/s[/hw] [hw]{1:SIP6}m[/hw] $&$ VERTSPEED RADARALTOCEAN 6 | {0,6:"SAS";;} {1:"HEAT!";;}$&$ SAS ENGINEOVERHEATALARM 7 | {0,6:"GEAR";;} {1:"GEAR!";;}$&$ GEAR GROUNDPROXIMITYALARM 8 | {0,6:"BRAKE";;} {1:"SLOPE!";;} $&$ BRAKES SLOPEALARM 9 | {0,6:"LIGHT";;} $&$ LIGHTS 10 | 11 | 12 | 13 | 14 | 15 | 16 | [@y3] [hw]P: {0,6:000.0}° R: {1,6:000.0}°$&$ PITCH ROLL 17 | SPD: {0:SIP6}m/s TRIM $&$ SURFSPEED 18 | EAS: {0:SIP6}m/s P:{1,6:00.0%} $&$ EASPEED STICKPITCHTRIM 19 | HRZ: {0:SIP6}m/s R:{1,6:00.0%} $&$ HORZVELOCITY STICKROLLTRIM 20 | THR: {0,6:00.0%} ({1,6:00.0%}) Y:{2,6:00.0%} $&$ THROTTLE EFFECTIVETHROTTLE STICKYAWTRIM 21 | 22 | ALTITUDE DYNAMICPRESSURE ATMDENSITY ATMOSPHEREDEPTH 23 | -------------------------------------------------------------------------------- /GameData/JSI/RPMPodPatches/BasicMFD/pa_PFD.txt: -------------------------------------------------------------------------------- 1 | [@y5] {0:SIP_6.1}m {1:SIP4}m/s $&$ ALTITUDE SURFSPEED 2 | 3 | [@x2]{0,6:000.0}° $&$ HEADING 4 | {0:SIP_6.1}m {1:SIP4}m/s $&$ ORBTSPEED ACCEL 5 | 6 | {0:ORB;TGT;SRF} $&$ SPEEDDISPLAYMODE 7 | 8 | [@x-3]{0,6:000.0}° [@x2]{1,6:000.0}° $&$ ROLL PITCH 9 | [@y8] SAS: [hw] Gear:[/hw] 10 | {0,-3:"[#00ff00ff]On [#ffffffff]";0;Off} [@x8]{1,-4:"[#00ff00ff]Down [#ffffffff]";0;Up} $&$ SAS GEAR 11 | [@y8] RCS: [hw] Brakes:[/hw] 12 | {0,-3:"[#00ff00ff]On [#ffffffff]";0;Off} [@x8]{1,-3:"[#00ff00ff]On [#ffffffff]";0;Off} $&$ RCS BRAKES 13 | [@y8] [hw]Throttle: [/hw] [hw] Lights: [/hw] 14 | {0,5:P0} [@x8]{1,-3:"[#00ff00ff]On [#ffffffff]";0;Off} $&$ THROTTLE LIGHTS 15 | {0:;" ";""} Burn T:$&$ MNODEEXISTS 16 | {0:;" ";""} {1:METS.f}s $&$ MNODEEXISTS MNODEBURNTIMESECS 17 | {0:;" ";""} Node in T ΔV $&$ MNODEEXISTS 18 | {2:;" ";}{0,17:MET+yy:ddd:hh:mm:ss.f} {1:SIP_6.3}m/s $&$ MNODETIMESECS MNODEDV MNODEEXISTS 19 | 20 | {0:SIP_6.3}m {1:SIP_6.3}m/s {2:SIP_6.3}m/s $&$RADARALTOCEAN HORZVELOCITY VERTSPEED -------------------------------------------------------------------------------- /GameData/JSI/RPMPodPatches/BasicMFD/pb_graphs.txt: -------------------------------------------------------------------------------- 1 |  [#00ff00]Radar altitude 2 | [hw][sub]70km[/sub][/hw] [#ff0000]ASL altitude 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | [hw][sub]0[/sub] 19 | [hw][sup]T-700 seconds T-0[/sup] 20 | MET: {0:METyy:ddd:hh:mm:ss.f} $&$ METSECS -------------------------------------------------------------------------------- /GameData/JSI/RPMPodPatches/PatchesMod/kp0110-pod-patch.cfg: -------------------------------------------------------------------------------- 1 | // This adds an RPM-based instrument layout into the K-P0110 2 | // by Ledenko. 3 | 4 | @PART[*]:HAS[@INTERNAL[KP0110internal]] 5 | { 6 | MODULE 7 | { 8 | name = RasterPropMonitorComputer 9 | } 10 | @INTERNAL 11 | { 12 | @name = KP0110internalRPM 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /GameData/JSI/RPMPodPatches/PatchesMod/orbital-orb-patch.cfg: -------------------------------------------------------------------------------- 1 | // This adds an RPM-based instrument layout into the Orbital Orb 2 | // from the Habitat Pack: http://forum.kerbalspaceprogram.com/threads/64442 3 | 4 | @PART[*]:HAS[@INTERNAL[orbitalOrbInternals]] 5 | { 6 | MODULE 7 | { 8 | name = RasterPropMonitorComputer 9 | } 10 | @INTERNAL 11 | { 12 | @name = orbitalOrbInternalsRPM 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /GameData/JSI/RPMPodPatches/PatchesMod/orbital-orb-remade-internal.cfg: -------------------------------------------------------------------------------- 1 | INTERNAL 2 | { 3 | name = orbitalOrbInternalsRPM 4 | MODEL 5 | { 6 | model = HabitatPack/Spaces/orbitalOrbInternals/model 7 | } 8 | MODULE 9 | { 10 | name = InternalCameraTargetHelper 11 | } 12 | MODULE 13 | { 14 | name = InternalSeat 15 | seatTransformName = Seat1 16 | portraitCameraName = pilot_camera 17 | allowCrewHelmet = false 18 | } 19 | MODULE 20 | { 21 | name = InternalSeat 22 | seatTransformName = Seat2 23 | allowCrewHelmet = false 24 | } 25 | MODULE 26 | { 27 | name = InternalCameraSwitch 28 | colliderTransformName = Cam1 29 | cameraTransformName = Cam1 30 | } 31 | MODULE 32 | { 33 | name = InternalCameraSwitch 34 | colliderTransformName = Cam2 35 | cameraTransformName = Cam2 36 | } 37 | PROP 38 | { 39 | name = IndicatorPanelRPM 40 | position = 0.1526378,-0.5076971,0.2497 41 | rotation = 0.353027,0,-2.294823E-07,0.9356132 42 | scale = 1,0.9999998,0.9999998 43 | } 44 | PROP 45 | { 46 | name = JSIEvaHatch 47 | position = 0,0.922047,0.6258945 48 | rotation = 0,0,0,1 49 | scale = 0.2218108,0.05002288,0.07007596 50 | } 51 | PROP 52 | { 53 | name = JSIStockSquareBlinkenlichten 54 | position = 0.3637466,-0.6322324,0.3760676 55 | rotation = 0.353027,0,-2.294823E-07,0.9356132 56 | scale = 1,1,1 57 | } 58 | PROP 59 | { 60 | name = JSIStockSquareBlinkenlichten 61 | position = 0.363747,-0.6482133,0.3942289 62 | rotation = 0.353027,0,0,0.9356132 63 | scale = 1,1,0.9999998 64 | } 65 | PROP 66 | { 67 | name = JSIStockSquareBlinkenlichten 68 | position = 0.363747,-0.6641689,0.4123617 69 | rotation = 0.353027,0,0,0.9356132 70 | scale = 1,1,0.9999998 71 | } 72 | PROP 73 | { 74 | name = JSIStockSquareBlinkenlichten 75 | position = 0.332494,-0.6641687,0.4123614 76 | rotation = 0.353027,0,0,0.9356132 77 | scale = 1,1,0.9999998 78 | } 79 | PROP 80 | { 81 | name = JSIStockSquareBlinkenlichten 82 | position = 0.332494,-0.6482136,0.3942284 83 | rotation = 0.353027,0,0,0.9356132 84 | scale = 1,1,0.9999998 85 | } 86 | PROP 87 | { 88 | name = JSIStockSquareBlinkenlichten 89 | position = 0.332494,-0.6322326,0.3760674 90 | rotation = 0.353027,0,0,0.9356132 91 | scale = 1,1,0.9999998 92 | } 93 | PROP 94 | { 95 | name = JSIStockSquareBlinkenlichten 96 | position = 0.2711269,-0.6322326,0.3760674 97 | rotation = 0.353027,0,0,0.9356132 98 | scale = 1,1,0.9999998 99 | } 100 | PROP 101 | { 102 | name = JSIStockSquareBlinkenlichten 103 | position = 0.2711269,-0.6482136,0.3942284 104 | rotation = 0.353027,0,0,0.9356132 105 | scale = 1,1,0.9999998 106 | } 107 | PROP 108 | { 109 | name = JSIStockSquareBlinkenlichten 110 | position = 0.2711269,-0.6641687,0.4123614 111 | rotation = 0.353027,0,0,0.9356132 112 | scale = 1,1,0.9999998 113 | } 114 | PROP 115 | { 116 | name = JSIStockSquareBlinkenlichten 117 | position = 0.3023799,-0.6641687,0.4123614 118 | rotation = 0.353027,0,0,0.9356132 119 | scale = 1,1,0.9999998 120 | } 121 | PROP 122 | { 123 | name = JSIStockSquareBlinkenlichten 124 | position = 0.3023799,-0.6482136,0.3942284 125 | rotation = 0.353027,0,0,0.9356132 126 | scale = 1,1,0.9999998 127 | } 128 | PROP 129 | { 130 | name = JSIStockSquareBlinkenlichten 131 | position = 0.3023799,-0.6322326,0.3760674 132 | rotation = 0.353027,0,0,0.9356132 133 | scale = 1,1,0.9999998 134 | } 135 | PROP 136 | { 137 | name = JSIStockSquareBlinkenlichten 138 | position = 0.2400035,-0.6322326,0.3760674 139 | rotation = 0.353027,0,0,0.9356132 140 | scale = 1,1,0.9999998 141 | } 142 | PROP 143 | { 144 | name = JSIStockSquareBlinkenlichten 145 | position = 0.2400035,-0.6482136,0.3942284 146 | rotation = 0.353027,0,0,0.9356132 147 | scale = 1,1,0.9999998 148 | } 149 | PROP 150 | { 151 | name = JSIStockSquareBlinkenlichten 152 | position = 0.2400035,-0.6641687,0.4123614 153 | rotation = 0.353027,0,0,0.9356132 154 | scale = 1,1,0.9999998 155 | } 156 | PROP 157 | { 158 | name = JSIStockSquareButtonGear 159 | position = 0.1388332,-0.5893143,0.327293 160 | rotation = 0.353027,0,-2.294823E-07,0.9356132 161 | scale = 1,1,1 162 | } 163 | PROP 164 | { 165 | name = JSIStockSquareButtonLight 166 | position = 0.1686486,-0.5738091,0.3096717 167 | rotation = 0.353027,0,-2.294823E-07,0.9356132 168 | scale = 1,1,1 169 | } 170 | PROP 171 | { 172 | name = JSIStockSquareButtonRCS 173 | position = 0.1686486,-0.5890815,0.3270284 174 | rotation = 0.353027,0,-2.294823E-07,0.9356132 175 | scale = 1,1,1 176 | } 177 | PROP 178 | { 179 | name = JSIStockSquareButtonSAS 180 | position = 0.1388068,-0.5738091,0.3096717 181 | rotation = 0.353027,0,-2.294823E-07,0.9356132 182 | scale = 1,1,1 183 | } 184 | PROP 185 | { 186 | name = RasterPropMonitorBasicMFD 187 | position = 0.2998753,-0.5115483,0.3089512 188 | rotation = -0.295497,-0.00144417,0.001334668,0.9553416 189 | scale = 0.7,0.7,0.7 190 | } 191 | PROP 192 | { 193 | name = RasterPropMonitorBasicMFD 194 | position = 0.1540478,-0.6446412,0.3992446 195 | rotation = -0.399588,1.600588E-07,-1.644485E-07,0.9166949 196 | scale = 0.3,0.3,0.3 197 | } 198 | PROP 199 | { 200 | name = RasterPropMonitorBasicMFD 201 | position = 0.4916345,-0.6190413,0.3716917 202 | rotation = -0.3995879,0,0,0.9166949 203 | scale = 0.5,0.5,0.5 204 | } 205 | PROP 206 | { 207 | name = RasterPropMonitorBasicMFD 208 | position = 0.491635,-0.5181342,0.263085 209 | rotation = -0.3995879,0,0,0.9166949 210 | scale = 0.5,0.5,0.5 211 | } 212 | } 213 | -------------------------------------------------------------------------------- /GameData/JSI/RPMPodPatches/PatchesStock/crew-cabin-patch.cfg: -------------------------------------------------------------------------------- 1 | // The stock crew cabin, of course, needs no monitors nor contains any. 2 | // However, it can benefit from a doubleclick-hatch-to-EVA feature, which is what this patch adds. 3 | 4 | @INTERNAL[crewCabinInternals] 5 | { 6 | PROP 7 | { 8 | name = JSIEvaHatch 9 | position = 0,1.078847,-0.01337123 10 | rotation = 0,0,0,1 11 | scale = 0.1025633,0.01758143,0.1160343 12 | } 13 | } -------------------------------------------------------------------------------- /GameData/JSI/RPMPodPatches/PatchesStock/cupola-patch.cfg: -------------------------------------------------------------------------------- 1 | @PART[*]:HAS[@INTERNAL[cupolaInternal]]{ 2 | MODULE 3 | { 4 | name = RasterPropMonitorComputer 5 | } 6 | 7 | @INTERNAL { 8 | @name = cupolaInternalRPM 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /GameData/JSI/RPMPodPatches/PatchesStock/mk1-inline-patch.nocfg: -------------------------------------------------------------------------------- 1 | //Patches / cockpit by Enceos 2 | 3 | @PART[*]:HAS[@INTERNAL[MK1_Inline_Int]] 4 | { 5 | MODULE 6 | { 7 | name = RasterPropMonitorComputer 8 | } 9 | 10 | @INTERNAL 11 | { 12 | @name = MK1_Inline_Int_RPM 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /GameData/JSI/RPMPodPatches/PatchesStock/mk1-inline-remade-internal.nocfg: -------------------------------------------------------------------------------- 1 | //Patches / cockpit by Enceos 2 | 3 | INTERNAL 4 | { 5 | name = MK1_Inline_Int_RPM 6 | MODEL 7 | { 8 | model = Squad/Spaces/MK1_Inline_Int/MK1_Inline_Int 9 | } 10 | 11 | MODULE 12 | { 13 | name = InternalSeat 14 | seatTransformName = Seat_Left 15 | portraitCameraName = Camera_Left 16 | allowCrewHelmet = False 17 | } 18 | MODULE 19 | { 20 | name = InternalCameraSwitch 21 | colliderTransformName = Focus_W1 22 | cameraTransformName = Camera_Focus_W1 23 | } 24 | MODULE 25 | { 26 | name = InternalCameraSwitch 27 | colliderTransformName = Focus_W2 28 | cameraTransformName = Camera_Focus_W2 29 | } 30 | MODULE 31 | { 32 | name = InternalCameraSwitch 33 | colliderTransformName = Focus_Hud 34 | cameraTransformName = Camera_Focus_Hud 35 | } 36 | PROP 37 | { 38 | name = AltimeterThreeHands 39 | position = 0.09279801,0.7346388,-0.2758837 40 | rotation = 0.6216567,-0.0006843077,0.008919313,0.7832389 41 | scale = 0.5,0.4999999,0.4999999 42 | } 43 | PROP 44 | { 45 | name = AtmosphereDepth 46 | position = -0.09946452,0.7395564,-0.2804852 47 | rotation = 0.4348262,0.5576076,0.4348262,0.5576076 48 | scale = 0.6000006,0.6000006,0.6 49 | } 50 | PROP 51 | { 52 | name = AxisIndicatorPitch 53 | position = 0.08079599,0.6423717,-0.2573757 54 | rotation = 1.781572E-08,0.7885762,0.6149371,-3.991599E-08 55 | scale = 0.4999999,0.4999996,0.3623883 56 | } 57 | PROP 58 | { 59 | name = AxisIndicatorRoll 60 | position = 0.1064492,0.649483,-0.2590895 61 | rotation = 0.4250284,-0.5651115,-0.4250284,0.5651115 62 | scale = 0.4999997,0.4999997,0.4999999 63 | } 64 | PROP 65 | { 66 | name = AxisIndicatorYaw 67 | position = 0.1064492,0.6353438,-0.2557154 68 | rotation = 0.4250284,-0.5651115,-0.4250284,0.5651115 69 | scale = 0.4999997,0.4999997,0.4999999 70 | } 71 | PROP 72 | { 73 | name = circularButton 74 | position = -0.1719691,0.6362662,-0.255517 75 | rotation = 0.6195079,-0.006466978,-0.005103968,0.7849473 76 | scale = 0.5,0.4999999,0.5 77 | } 78 | PROP 79 | { 80 | name = Compass 81 | position = 0.09685593,0.6757883,-0.2730373 82 | rotation = -0.4399559,0.5535696,0.4399572,-0.5535676 83 | scale = 0.3411347,0.4110054,0.4110055 84 | } 85 | PROP 86 | { 87 | name = IndicatorPanelRPM 88 | position = 0.1574446,0.671946,-0.2611895 89 | rotation = 0.618785,4.053396E-05,-0.0005283224,0.7855603 90 | scale = 0.5,0.4999997,0.4999996 91 | } 92 | PROP 93 | { 94 | name = JSIEvaCockpitHandle 95 | position = -0.2918394,0.6818695,-0.2030285 96 | rotation = -0.1093984,-0.6209837,0.1451393,-0.7624604 97 | scale = 0.5500002,0.55,0.5500004 98 | } 99 | PROP 100 | { 101 | name = JSIInternalFlagPlate 102 | position = 0.241912,0.6199297,-0.1924969 103 | rotation = 0.04198984,0.06626775,-0.002491935,0.9969149 104 | scale = 1,1,1 105 | } 106 | PROP 107 | { 108 | name = JSIStockFuelPanel 109 | position = -0.2271537,0.6167122,-0.2055225 110 | rotation = 0.06494185,-0.04084115,0.002660143,0.9970495 111 | scale = 0.9999995,0.9999995,1 112 | } 113 | PROP 114 | { 115 | name = JSIStockPower 116 | position = -0.2245788,0.6175192,-0.2354103 117 | rotation = 0.0483977,-0.04087965,0.001982461,0.9979893 118 | scale = 1,0.9999999,1 119 | } 120 | PROP 121 | { 122 | name = JSIStockSquareBlinkenlichten 123 | position = -0.1846413,0.6626353,-0.2618183 124 | rotation = 0.6195079,-0.006466978,-0.005103968,0.7849473 125 | scale = 1,0.9999998,0.9999999 126 | } 127 | PROP 128 | { 129 | name = JSIStockSquareButtonBRAKES 130 | position = -0.1474917,0.6356201,-0.2553635 131 | rotation = 0.6195078,-0.006466976,-0.005103968,0.7849473 132 | scale = 0.5,0.5,0.5000001 133 | } 134 | PROP 135 | { 136 | name = JSIStockSquareButtonGear 137 | position = -0.1105635,0.6350286,-0.2552223 138 | rotation = 0.6195078,-0.006466977,-0.005103968,0.7849473 139 | scale = 0.5,0.5,0.5000001 140 | } 141 | PROP 142 | { 143 | name = JSIStockSquareButtonLight 144 | position = -0.09229074,0.6347356,-0.2551527 145 | rotation = 0.6195079,-0.006466978,-0.005103968,0.7849473 146 | scale = 0.5,0.4999999,0.5 147 | } 148 | PROP 149 | { 150 | name = JSIStockSquareButtonSAS 151 | position = -0.1288379,0.6353209,-0.2552919 152 | rotation = 0.6195078,-0.006466976,-0.005103968,0.7849473 153 | scale = 0.5,0.5,0.5000001 154 | } 155 | PROP 156 | { 157 | name = JSITrimKnobPitch 158 | position = 0.1982786,0.6886182,-0.2673864 159 | rotation = 0.057696,-0.7968579,-0.6012338,-0.01437576 160 | scale = 0.6999987,0.7,0.6999993 161 | } 162 | PROP 163 | { 164 | name = JSITrimKnobRoll 165 | position = 0.199403,0.6691728,-0.2617607 166 | rotation = 0.057696,-0.7968579,-0.6012338,-0.01437576 167 | scale = 0.6999987,0.7,0.6999993 168 | } 169 | PROP 170 | { 171 | name = JSITrimKnobYaw 172 | position = 0.2003078,0.6504843,-0.2563763 173 | rotation = 0.057696,-0.7968579,-0.6012338,-0.01437576 174 | scale = 0.6999987,0.7,0.6999993 175 | } 176 | PROP 177 | { 178 | name = ledPanelSpeed 179 | position = 0.1562243,0.7185833,-0.2787943 180 | rotation = 0.6195289,0,0,0.7849739 181 | scale = 0.8,0.7999995,0.8000001 182 | } 183 | PROP 184 | { 185 | name = RasterPropMonitorBasicHUD 186 | position = 0,0.8082898,-0.2959124 187 | rotation = 0.2311058,0,0,0.9729286 188 | scale = 0.4550576,0.4215209,0.4 189 | } 190 | PROP 191 | { 192 | name = RasterPropMonitorBasicMFD 193 | position = 0,0.5904863,-0.2403536 194 | rotation = -0.1192247,0,0,0.9928674 195 | scale = 0.42,0.42,0.42 196 | } 197 | PROP 198 | { 199 | name = RasterPropMonitorBasicMFD 200 | position = 0,0.7115269,-0.2698488 201 | rotation = -0.1192244,0,0,0.9928674 202 | scale = 0.42,0.4199999,0.42 203 | } 204 | PROP 205 | { 206 | name = RasterPropMonitorBasicMFD 207 | position = -0.120894,0.6883984,-0.2642126 208 | rotation = -0.1192247,0,0,0.9928674 209 | scale = 0.3,0.3,0.2999997 210 | } 211 | PROP 212 | { 213 | name = standingSwitch 214 | position = 0.1911417,0.6055588,-0.1597577 215 | rotation = 0.02867062,0.02325465,0.7077265,0.7055215 216 | scale = 0.9999995,1,0.9999995 217 | } 218 | PROP 219 | { 220 | name = standingSwitch 221 | position = 0.1880513,0.6057883,-0.1845508 222 | rotation = 0.02638623,0.01948597,0.7256029,0.6873315 223 | scale = 1,1,1 224 | } 225 | PROP 226 | { 227 | name = standingSwitch 228 | position = 0.1857581,0.6059461,-0.2078904 229 | rotation = 0.01557464,0.007235532,0.7197477,0.6940233 230 | scale = 0.9999995,1,1 231 | } 232 | PROP 233 | { 234 | name = switchWithGuards 235 | position = -0.1842494,0.7095656,-0.2730799 236 | rotation = 0.6213003,-0.002688764,-0.001609399,0.7835664 237 | scale = 0.600001,0.6000001,0.6000004 238 | } 239 | PROP 240 | { 241 | name = switchWithGuards 242 | position = -0.1843701,0.6906683,-0.2686567 243 | rotation = 0.6212998,-0.00268854,-0.001609254,0.7835668 244 | scale = 0.600001,0.6000001,0.5999997 245 | } 246 | PROP 247 | { 248 | name = throttle 249 | position = -0.2580802,0.5102,-0.01085026 250 | rotation = 0,-0.05745133,0,0.9983483 251 | scale = 0.8017157,0.8017157,0.8017151 252 | } 253 | PROP 254 | { 255 | name = VSI 256 | position = 0.09291355,0.7011359,-0.27005 257 | rotation = 0.618785,4.053396E-05,-0.0005283224,0.7855603 258 | scale = 0.5,0.4999997,0.4999997 259 | } 260 | } 261 | -------------------------------------------------------------------------------- /GameData/JSI/RPMPodPatches/PatchesStock/mk1-patch.cfg: -------------------------------------------------------------------------------- 1 | @PART[*]:HAS[@INTERNAL[mk1PodCockpit],!MODULE[LifeBoat]] 2 | { 3 | MODULE 4 | { 5 | name = RasterPropMonitorComputer 6 | } 7 | 8 | @INTERNAL { 9 | @name = mk1PodCockpitRPM 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /GameData/JSI/RPMPodPatches/PatchesStock/mk12pod-patch.cfg: -------------------------------------------------------------------------------- 1 | @PART[*]:HAS[@INTERNAL[PodCockpit]] 2 | { 3 | MODULE 4 | { 5 | name = RasterPropMonitorComputer 6 | } 7 | @INTERNAL { 8 | @name = PodCockpitRPM 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /GameData/JSI/RPMPodPatches/PatchesStock/mk1cockpit-patch.cfg: -------------------------------------------------------------------------------- 1 | @PART[*]:HAS[@INTERNAL[mk1CockpitInternal]] 2 | { 3 | MODULE 4 | { 5 | name = RasterPropMonitorComputer 6 | } 7 | 8 | @INTERNAL { 9 | @name = mk1CockpitInternalRPM 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /GameData/JSI/RPMPodPatches/PatchesStock/mk1landercan-patch.cfg: -------------------------------------------------------------------------------- 1 | @PART[*]:HAS[@INTERNAL[landerCabinSmallInternal]] 2 | { 3 | MODULE 4 | { 5 | name = RasterPropMonitorComputer 6 | } 7 | @INTERNAL { 8 | @name = landerCabinSmallInternalRPM 9 | 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /GameData/JSI/RPMPodPatches/PatchesStock/mk2landercan-patch.cfg: -------------------------------------------------------------------------------- 1 | @PART[*]:HAS[@INTERNAL[landerCabinInternals]] 2 | { 3 | MODULE 4 | { 5 | name = RasterPropMonitorComputer 6 | } 7 | @INTERNAL 8 | { 9 | @name = landerCabinInternalsRPM 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /GameData/JSI/RPMPodPatches/PatchesStock/mk3cockpit-patch.cfg: -------------------------------------------------------------------------------- 1 | //Patches / cockpit by Enceos 2 | @PART[mk3Cockpit_Shuttle]:NEEDS[RasterPropMonitor] 3 | { 4 | MODULE 5 | { 6 | name = RasterPropMonitorComputer 7 | } 8 | } 9 | 10 | 11 | @INTERNAL[MK3_Cockpit_Int]:NEEDS[RasterPropMonitor] 12 | { 13 | 14 | PROP 15 | { 16 | name = RasterPropMonitorBasicMFD 17 | position = 0.141196,0.7468129,-0.7244574 18 | rotation = -0.2079117,0,0,0.9781476 19 | scale = 0.42,0.385,0.3999999 20 | } 21 | PROP 22 | { 23 | name = RasterPropMonitorBasicMFD 24 | position = 0.141196,0.6299283,-0.6712881 25 | rotation = -0.2079119,0,0,0.9781476 26 | scale = 0.42,0.385,0.4 27 | } 28 | PROP 29 | { 30 | name = RasterPropMonitorBasicMFD 31 | position = -0.1415714,0.6299283,-0.6712881 32 | rotation = -0.2079119,0,0,0.9781476 33 | scale = 0.42,0.385,0.4 34 | } 35 | PROP 36 | { 37 | name = RasterPropMonitorBasicMFD 38 | position = -0.2937711,0.688472,-0.6960356 39 | rotation = -0.2079119,0,0,0.9781476 40 | scale = 0.4829898,0.4699768,0.4 41 | } 42 | PROP 43 | { 44 | name = RasterPropMonitorBasicMFD 45 | position = 0.2931954,0.688472,-0.696036 46 | rotation = -0.2079119,0,0,0.9781476 47 | scale = 0.48299,0.469977,0.4 48 | } 49 | PROP 50 | { 51 | name = RasterPropMonitorBasicMFD 52 | position = -0.1416073,0.7468129,-0.7244574 53 | rotation = -0.2079119,0,0,0.9781476 54 | scale = 0.42,0.385,0.4 55 | } 56 | PROP 57 | { 58 | name = RasterPropMonitorBasicMFD 59 | position = 0.6538006,0.7342677,-0.6513167 60 | rotation = -0.1344974,-0.08531353,-0.02405801,0.9869414 61 | scale = 0.42,0.385,0.4000001 62 | } 63 | PROP 64 | { 65 | name = RasterPropMonitorBasicMFD 66 | position = 0.6445985,0.6120232,-0.6163632 67 | rotation = -0.137479,-0.07833308,-0.02524862,0.9870796 68 | scale = 0.42,0.3849999,0.3999999 69 | } 70 | PROP 71 | { 72 | name = RasterPropMonitorBasicMFD 73 | position = -0.6399357,0.6118765,-0.6165132 74 | rotation = -0.1479711,0.09920985,0.0144046,0.9838976 75 | scale = 0.42,0.385,0.3999999 76 | } 77 | PROP 78 | { 79 | name = RasterPropMonitorBasicMFD 80 | position = -0.646588,0.7353145,-0.6527447 81 | rotation = -0.1491914,0.09926638,0.01494914,0.9836995 82 | scale = 0.42,0.3850001,0.4 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /GameData/JSI/RasterPropMonitor/Library/Components/HUD/heading.dds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mihara/RasterPropMonitor/acf5fb8086c332728d103aae6926abde0a87d1ee/GameData/JSI/RasterPropMonitor/Library/Components/HUD/heading.dds -------------------------------------------------------------------------------- /GameData/JSI/RasterPropMonitor/Library/Components/HUD/hud-overlay.dds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mihara/RasterPropMonitor/acf5fb8086c332728d103aae6926abde0a87d1ee/GameData/JSI/RasterPropMonitor/Library/Components/HUD/hud-overlay.dds -------------------------------------------------------------------------------- /GameData/JSI/RasterPropMonitor/Library/Components/HUD/ladder.dds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mihara/RasterPropMonitor/acf5fb8086c332728d103aae6926abde0a87d1ee/GameData/JSI/RasterPropMonitor/Library/Components/HUD/ladder.dds -------------------------------------------------------------------------------- /GameData/JSI/RasterPropMonitor/Library/Components/HUD/leftscale.dds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mihara/RasterPropMonitor/acf5fb8086c332728d103aae6926abde0a87d1ee/GameData/JSI/RasterPropMonitor/Library/Components/HUD/leftscale.dds -------------------------------------------------------------------------------- /GameData/JSI/RasterPropMonitor/Library/Components/HUD/model.mu: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mihara/RasterPropMonitor/acf5fb8086c332728d103aae6926abde0a87d1ee/GameData/JSI/RasterPropMonitor/Library/Components/HUD/model.mu -------------------------------------------------------------------------------- /GameData/JSI/RasterPropMonitor/Library/Components/HUD/planeHUDdiffuse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mihara/RasterPropMonitor/acf5fb8086c332728d103aae6926abde0a87d1ee/GameData/JSI/RasterPropMonitor/Library/Components/HUD/planeHUDdiffuse.png -------------------------------------------------------------------------------- /GameData/JSI/RasterPropMonitor/Library/Components/HUD/rightscale.dds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mihara/RasterPropMonitor/acf5fb8086c332728d103aae6926abde0a87d1ee/GameData/JSI/RasterPropMonitor/Library/Components/HUD/rightscale.dds -------------------------------------------------------------------------------- /GameData/JSI/RasterPropMonitor/Library/Components/HUD/screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mihara/RasterPropMonitor/acf5fb8086c332728d103aae6926abde0a87d1ee/GameData/JSI/RasterPropMonitor/Library/Components/HUD/screen.png -------------------------------------------------------------------------------- /GameData/JSI/RasterPropMonitor/Library/Components/MFD40x20v2/MFD40x15v2-Diffuse.dds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mihara/RasterPropMonitor/acf5fb8086c332728d103aae6926abde0a87d1ee/GameData/JSI/RasterPropMonitor/Library/Components/MFD40x20v2/MFD40x15v2-Diffuse.dds -------------------------------------------------------------------------------- /GameData/JSI/RasterPropMonitor/Library/Components/MFD40x20v2/MFD40x15v2-Emissive.dds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mihara/RasterPropMonitor/acf5fb8086c332728d103aae6926abde0a87d1ee/GameData/JSI/RasterPropMonitor/Library/Components/MFD40x20v2/MFD40x15v2-Emissive.dds -------------------------------------------------------------------------------- /GameData/JSI/RasterPropMonitor/Library/Components/MFD40x20v2/model.mu: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mihara/RasterPropMonitor/acf5fb8086c332728d103aae6926abde0a87d1ee/GameData/JSI/RasterPropMonitor/Library/Components/MFD40x20v2/model.mu -------------------------------------------------------------------------------- /GameData/JSI/RasterPropMonitor/Library/Components/MFD40x20v2/screen-emissive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mihara/RasterPropMonitor/acf5fb8086c332728d103aae6926abde0a87d1ee/GameData/JSI/RasterPropMonitor/Library/Components/MFD40x20v2/screen-emissive.png -------------------------------------------------------------------------------- /GameData/JSI/RasterPropMonitor/Library/Components/MFD40x20v2/screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mihara/RasterPropMonitor/acf5fb8086c332728d103aae6926abde0a87d1ee/GameData/JSI/RasterPropMonitor/Library/Components/MFD40x20v2/screen.png -------------------------------------------------------------------------------- /GameData/JSI/RasterPropMonitor/Library/Components/NavBall/HDG.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mihara/RasterPropMonitor/acf5fb8086c332728d103aae6926abde0a87d1ee/GameData/JSI/RasterPropMonitor/Library/Components/NavBall/HDG.png -------------------------------------------------------------------------------- /GameData/JSI/RasterPropMonitor/Library/Components/NavBall/NavBall.mu: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mihara/RasterPropMonitor/acf5fb8086c332728d103aae6926abde0a87d1ee/GameData/JSI/RasterPropMonitor/Library/Components/NavBall/NavBall.mu -------------------------------------------------------------------------------- /GameData/JSI/RasterPropMonitor/Library/Components/NavBall/NavBall000.dds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mihara/RasterPropMonitor/acf5fb8086c332728d103aae6926abde0a87d1ee/GameData/JSI/RasterPropMonitor/Library/Components/NavBall/NavBall000.dds -------------------------------------------------------------------------------- /GameData/JSI/RasterPropMonitor/Library/Components/NavBall/StaticMask.dds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mihara/RasterPropMonitor/acf5fb8086c332728d103aae6926abde0a87d1ee/GameData/JSI/RasterPropMonitor/Library/Components/NavBall/StaticMask.dds -------------------------------------------------------------------------------- /GameData/JSI/RasterPropMonitor/Library/Fonts/baseFont.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mihara/RasterPropMonitor/acf5fb8086c332728d103aae6926abde0a87d1ee/GameData/JSI/RasterPropMonitor/Library/Fonts/baseFont.png -------------------------------------------------------------------------------- /GameData/JSI/RasterPropMonitor/Library/Fonts/extraFont1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mihara/RasterPropMonitor/acf5fb8086c332728d103aae6926abde0a87d1ee/GameData/JSI/RasterPropMonitor/Library/Fonts/extraFont1.png -------------------------------------------------------------------------------- /GameData/JSI/RasterPropMonitor/Library/Fonts/fontDefinition.txt: -------------------------------------------------------------------------------- 1 |  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~Δ☊¡¢£¤¥¦§¨©ª«¬☋®¯°±²³´µ¶·¸¹º»¼½¾¿ -------------------------------------------------------------------------------- /GameData/JSI/RasterPropMonitor/Library/Fonts/hudfont.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mihara/RasterPropMonitor/acf5fb8086c332728d103aae6926abde0a87d1ee/GameData/JSI/RasterPropMonitor/Library/Fonts/hudfont.png -------------------------------------------------------------------------------- /GameData/JSI/RasterPropMonitor/Library/Parts/ExternalCameraPart/external-camera.cfg: -------------------------------------------------------------------------------- 1 | PART 2 | { 3 | // --- general parameters --- 4 | name = JSIPrimitiveExternalCamera 5 | module = Part 6 | author = C. Jenkins / Mihara 7 | 8 | // --- asset parameters --- 9 | MODEL 10 | { 11 | model = Squad/Parts/Utility/linearRCS/model 12 | texture = rcs,JSI/RasterPropMonitor/Library/Parts/ExternalCameraPart/model000 13 | scale = 0.4,0.8,0.4 14 | } 15 | 16 | 17 | // --- node definitions --- 18 | // definition format is Position X, Position Y, Position Z, Up X, Up Y, Up Z 19 | node_attach = 0.0, -0.06, 0.0, 0.0, -1, 0.0 20 | 21 | // --- editor parameters --- 22 | TechRequired = basicScience 23 | entryCost = 4200 24 | cost = 400 25 | category = Utility 26 | subcategory = 0 27 | title = JSI External Radial-mount Camera 28 | manufacturer = Junk Systems Inc. 29 | description = Customers who like multi-function displays with JSI software keep looking around for simple external camera options. This is a most primitive camera, but it works fine when you don't have a better one. No, it's not just an RCS thruster with lens painted on, we have standards here! 30 | 31 | // attachment rules: stack, srfAttach, allowStack, allowSrfAttach, allowCollision 32 | attachRules = 0,1,0,0,0 33 | 34 | // --- standard part parameters --- 35 | mass = 0.004 36 | dragModelType = default 37 | maximum_drag = 0.05 38 | minimum_drag = 0.05 39 | angularDrag = 1 40 | crashTolerance = 8 41 | maxTemp = 1200 42 | 43 | MODULE 44 | { 45 | name = JSIExternalCameraSelector 46 | cameraContainer = RCSthruster 47 | rotateCamera = -90,0,0 48 | cameraIDPrefix = ExtCam 49 | } 50 | 51 | } 52 | -------------------------------------------------------------------------------- /GameData/JSI/RasterPropMonitor/Library/Parts/ExternalCameraPart/model000.dds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mihara/RasterPropMonitor/acf5fb8086c332728d103aae6926abde0a87d1ee/GameData/JSI/RasterPropMonitor/Library/Parts/ExternalCameraPart/model000.dds -------------------------------------------------------------------------------- /GameData/JSI/RasterPropMonitor/Library/Props/CockpitHandle/OpenHandle.mu: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mihara/RasterPropMonitor/acf5fb8086c332728d103aae6926abde0a87d1ee/GameData/JSI/RasterPropMonitor/Library/Props/CockpitHandle/OpenHandle.mu -------------------------------------------------------------------------------- /GameData/JSI/RasterPropMonitor/Library/Props/CockpitHandle/OpenHandleDiffuse.dds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mihara/RasterPropMonitor/acf5fb8086c332728d103aae6926abde0a87d1ee/GameData/JSI/RasterPropMonitor/Library/Props/CockpitHandle/OpenHandleDiffuse.dds -------------------------------------------------------------------------------- /GameData/JSI/RasterPropMonitor/Library/Props/CockpitHandle/eva-hatch.cfg: -------------------------------------------------------------------------------- 1 | PROP 2 | { 3 | name = JSIEvaCockpitHandle 4 | MODULE 5 | { 6 | name = JSIInternalEVAHatch 7 | hatchTransform = HandleCollider 8 | } 9 | } -------------------------------------------------------------------------------- /GameData/JSI/RasterPropMonitor/Library/Props/IndicatorPanelReplacement/model000.dds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mihara/RasterPropMonitor/acf5fb8086c332728d103aae6926abde0a87d1ee/GameData/JSI/RasterPropMonitor/Library/Props/IndicatorPanelReplacement/model000.dds -------------------------------------------------------------------------------- /GameData/JSI/RasterPropMonitor/Library/Props/IndicatorPanelReplacement/model001.dds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mihara/RasterPropMonitor/acf5fb8086c332728d103aae6926abde0a87d1ee/GameData/JSI/RasterPropMonitor/Library/Props/IndicatorPanelReplacement/model001.dds -------------------------------------------------------------------------------- /GameData/JSI/RasterPropMonitor/Library/Props/IndicatorPanelReplacement/prop.cfg: -------------------------------------------------------------------------------- 1 | PROP 2 | { 3 | 4 | name = IndicatorPanelRPM 5 | 6 | MODEL 7 | { 8 | model = Squad/Props/IndicatorPanel/model 9 | texture = model000,JSI/RasterPropMonitor/Library/Props/IndicatorPanelReplacement/model000 10 | texture = model001,JSI/RasterPropMonitor/Library/Props/IndicatorPanelReplacement/model001 11 | } 12 | 13 | MODULE 14 | { 15 | name = JSIVariableAnimator 16 | refreshRate = 10 17 | // RCS 18 | VARIABLESET 19 | { 20 | coloredObject = indicator01 21 | passiveColor = 0,0,0,255 22 | activeColor = 0,255,58,255 23 | variableName = RCS 24 | scale = 0,1 25 | threshold = 0.5,1.1 26 | } 27 | // SAS 28 | VARIABLESET 29 | { 30 | coloredObject = indicator02 31 | passiveColor = 0,0,0,255 32 | activeColor = 0,255,58,255 33 | variableName = SAS 34 | scale = 0,1 35 | threshold = 0.5,1.1 36 | } 37 | // Gear 38 | VARIABLESET 39 | { 40 | coloredObject = indicator03 41 | passiveColor = 0,0,0,255 42 | activeColor = 0,255,58,255 43 | variableName = GEAR 44 | scale = 0,1 45 | threshold = 0.5,1.1 46 | } 47 | // Light 48 | VARIABLESET 49 | { 50 | coloredObject = indicator04 51 | passiveColor = 0,0,0,255 52 | activeColor = 0,255,58,255 53 | variableName = LIGHTS 54 | scale = 0,1 55 | threshold = 0.5,1.1 56 | } 57 | // Contact 58 | VARIABLESET 59 | { 60 | coloredObject = indicator05 61 | passiveColor = 0,0,0,255 62 | activeColor = 0,255,150,255 63 | variableName = ALTITUDEBOTTOM 64 | scale = 0,10 65 | // Apollo probes were 1676mm long. 66 | // Which is actually quite long! 67 | threshold = -1,0.1676 68 | } 69 | // MECO 70 | VARIABLESET 71 | { 72 | coloredObject = indicator06 73 | passiveColor = 0,0,0,255 74 | activeColor = 0,255,58,255 75 | variableName = THRUST 76 | scale = 0,1 77 | threshold = -1,0.01 78 | } 79 | // Stage 80 | VARIABLESET 81 | { 82 | coloredObject = indicator07 83 | passiveColor = 0,0,0,255 84 | activeColor = 0,255,58,255 85 | variableName = STAGEREADY 86 | scale = 0,1 87 | threshold = 0.5,1.1 88 | } 89 | // TWR 90 | VARIABLESET 91 | { 92 | coloredObject = indicator08 93 | passiveColor = 0,0,0,255 94 | activeColor = 255,140,0,255 95 | reverse = true 96 | variableName = TWR 97 | scale = 0.8,1 98 | } 99 | // Ascent/Descent 100 | VARIABLESET 101 | { 102 | coloredObject = indicator09 103 | passiveColor = 0,255,0,255 104 | activeColor = 255,0,0,255 105 | variableName = VERTSPEED 106 | scale = 5,-5 107 | } 108 | // Heat 109 | VARIABLESET 110 | { 111 | coloredObject = indicator10 112 | passiveColor = 0,0,0,255 113 | activeColor = 255,0,0,255 114 | variableName = PODTEMPERATURE 115 | scale = 0,1700 116 | threshold = 0.85,1.1 117 | flashingDelay = 0.3 118 | } 119 | // Fuel 120 | VARIABLESET 121 | { 122 | coloredObject = indicator11 123 | passiveColor = 0,0,0,255 124 | activeColor = 255,0,0,255 125 | variableName = SYSR_LIQUIDFUELPERCENT 126 | scale = 0,1 127 | threshold = -1,0.05 128 | } 129 | // High G 130 | VARIABLESET 131 | { 132 | coloredObject = indicator12 133 | passiveColor = 0,0,0,255 134 | activeColor = 255,0,0,255 135 | variableName = GFORCE 136 | scale = 0,10 137 | flashingDelay = 0.3 138 | threshold = 0.5,1.1 139 | } 140 | } 141 | } 142 | 143 | -------------------------------------------------------------------------------- /GameData/JSI/RasterPropMonitor/Library/Props/InternalAirlock/InternalAirLock.mu: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mihara/RasterPropMonitor/acf5fb8086c332728d103aae6926abde0a87d1ee/GameData/JSI/RasterPropMonitor/Library/Props/InternalAirlock/InternalAirLock.mu -------------------------------------------------------------------------------- /GameData/JSI/RasterPropMonitor/Library/Props/InternalAirlock/InternalAirLockDiffuse.dds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mihara/RasterPropMonitor/acf5fb8086c332728d103aae6926abde0a87d1ee/GameData/JSI/RasterPropMonitor/Library/Props/InternalAirlock/InternalAirLockDiffuse.dds -------------------------------------------------------------------------------- /GameData/JSI/RasterPropMonitor/Library/Props/InternalAirlock/eva-hatch-with-model.cfg: -------------------------------------------------------------------------------- 1 | PROP 2 | { 3 | name = JSIEvaHatchFull 4 | MODULE 5 | { 6 | name = JSIInternalEVAHatch 7 | hatchTransform = AirLockCollider 8 | internalAnimation = InternalAirLockOpenAnim 9 | } 10 | } -------------------------------------------------------------------------------- /GameData/JSI/RasterPropMonitor/Library/Props/InternalFlagPlate/FlagPlate.mu: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mihara/RasterPropMonitor/acf5fb8086c332728d103aae6926abde0a87d1ee/GameData/JSI/RasterPropMonitor/Library/Props/InternalFlagPlate/FlagPlate.mu -------------------------------------------------------------------------------- /GameData/JSI/RasterPropMonitor/Library/Props/InternalFlagPlate/FlagPlate000.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mihara/RasterPropMonitor/acf5fb8086c332728d103aae6926abde0a87d1ee/GameData/JSI/RasterPropMonitor/Library/Props/InternalFlagPlate/FlagPlate000.png -------------------------------------------------------------------------------- /GameData/JSI/RasterPropMonitor/Library/Props/InternalFlagPlate/prop.cfg: -------------------------------------------------------------------------------- 1 | PROP 2 | { 3 | name = JSIInternalFlagPlate 4 | 5 | MODULE 6 | { 7 | name = JSIInternalFlagDecal 8 | transformName = FlagPlateObj 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /GameData/JSI/RasterPropMonitor/Library/Props/InternalHatch/CubeCollider.mu: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mihara/RasterPropMonitor/acf5fb8086c332728d103aae6926abde0a87d1ee/GameData/JSI/RasterPropMonitor/Library/Props/InternalHatch/CubeCollider.mu -------------------------------------------------------------------------------- /GameData/JSI/RasterPropMonitor/Library/Props/InternalHatch/eva-hatch.cfg: -------------------------------------------------------------------------------- 1 | PROP 2 | { 3 | name = JSIEvaHatch 4 | MODULE 5 | { 6 | name = JSIInternalEVAHatch 7 | hatchTransform = generalPurposeCollider 8 | } 9 | } -------------------------------------------------------------------------------- /GameData/JSI/RasterPropMonitor/Library/Props/SimpleProps/ActionGroupLabelledButtons.cfg: -------------------------------------------------------------------------------- 1 | PROP 2 | { 3 | name = JSIActionGroupLabelButton01 4 | MODEL 5 | { 6 | model = Squad/Props/ledPanelSpeed/model 7 | } 8 | MODULE 9 | { 10 | name = JSIActionGroupSwitch 11 | actionName = custom01 12 | switchTransform = toggleButton 13 | switchSound = Squad/Sounds/sound_click_tock 14 | coloredObject = toggleButton 15 | disabledColor = 0,0,0,255 16 | enabledColor = 0,0,255,255 17 | } 18 | MODULE 19 | { 20 | name = JSIVariableLabel 21 | labelText = <=0=>$&$AGMEMO1 22 | transformName = textLabel 23 | fontSize = 0.008 24 | } 25 | } 26 | 27 | PROP 28 | { 29 | name = JSIActionGroupLabelButton02 30 | MODEL 31 | { 32 | model = Squad/Props/ledPanelSpeed/model 33 | } 34 | MODULE 35 | { 36 | name = JSIActionGroupSwitch 37 | actionName = custom02 38 | switchTransform = toggleButton 39 | switchSound = Squad/Sounds/sound_click_tock 40 | coloredObject = toggleButton 41 | disabledColor = 0,0,0,255 42 | enabledColor = 0,0,255,255 43 | } 44 | MODULE 45 | { 46 | name = JSIVariableLabel 47 | labelText = <=0=>$&$AGMEMO2 48 | transformName = textLabel 49 | fontSize = 0.008 50 | } 51 | } 52 | 53 | PROP 54 | { 55 | name = JSIActionGroupLabelButton03 56 | MODEL 57 | { 58 | model = Squad/Props/ledPanelSpeed/model 59 | } 60 | MODULE 61 | { 62 | name = JSIActionGroupSwitch 63 | actionName = custom03 64 | switchTransform = toggleButton 65 | switchSound = Squad/Sounds/sound_click_tock 66 | coloredObject = toggleButton 67 | disabledColor = 0,0,0,255 68 | enabledColor = 0,0,255,255 69 | } 70 | MODULE 71 | { 72 | name = JSIVariableLabel 73 | labelText = <=0=>$&$AGMEMO3 74 | transformName = textLabel 75 | fontSize = 0.008 76 | } 77 | } 78 | 79 | PROP 80 | { 81 | name = JSIActionGroupLabelButton04 82 | MODEL 83 | { 84 | model = Squad/Props/ledPanelSpeed/model 85 | } 86 | MODULE 87 | { 88 | name = JSIActionGroupSwitch 89 | actionName = custom04 90 | switchTransform = toggleButton 91 | switchSound = Squad/Sounds/sound_click_tock 92 | coloredObject = toggleButton 93 | disabledColor = 0,0,0,255 94 | enabledColor = 0,0,255,255 95 | } 96 | MODULE 97 | { 98 | name = JSIVariableLabel 99 | labelText = <=0=>$&$AGMEMO4 100 | transformName = textLabel 101 | fontSize = 0.008 102 | } 103 | } 104 | 105 | PROP 106 | { 107 | name = JSIActionGroupLabelButton05 108 | MODEL 109 | { 110 | model = Squad/Props/ledPanelSpeed/model 111 | } 112 | MODULE 113 | { 114 | name = JSIActionGroupSwitch 115 | actionName = custom05 116 | switchTransform = toggleButton 117 | switchSound = Squad/Sounds/sound_click_tock 118 | coloredObject = toggleButton 119 | disabledColor = 0,0,0,255 120 | enabledColor = 0,0,255,255 121 | } 122 | MODULE 123 | { 124 | name = JSIVariableLabel 125 | labelText = <=0=>$&$AGMEMO5 126 | transformName = textLabel 127 | fontSize = 0.008 128 | } 129 | } 130 | 131 | PROP 132 | { 133 | name = JSIActionGroupLabelButton06 134 | MODEL 135 | { 136 | model = Squad/Props/ledPanelSpeed/model 137 | } 138 | MODULE 139 | { 140 | name = JSIActionGroupSwitch 141 | actionName = custom06 142 | switchTransform = toggleButton 143 | switchSound = Squad/Sounds/sound_click_tock 144 | coloredObject = toggleButton 145 | disabledColor = 0,0,0,255 146 | enabledColor = 0,0,255,255 147 | } 148 | MODULE 149 | { 150 | name = JSIVariableLabel 151 | labelText = <=0=>$&$AGMEMO6 152 | transformName = textLabel 153 | fontSize = 0.008 154 | } 155 | } 156 | 157 | PROP 158 | { 159 | name = JSIActionGroupLabelButton07 160 | MODEL 161 | { 162 | model = Squad/Props/ledPanelSpeed/model 163 | } 164 | MODULE 165 | { 166 | name = JSIActionGroupSwitch 167 | actionName = custom07 168 | switchTransform = toggleButton 169 | switchSound = Squad/Sounds/sound_click_tock 170 | coloredObject = toggleButton 171 | disabledColor = 0,0,0,255 172 | enabledColor = 0,0,255,255 173 | } 174 | MODULE 175 | { 176 | name = JSIVariableLabel 177 | labelText = <=0=>$&$AGMEMO7 178 | transformName = textLabel 179 | fontSize = 0.008 180 | } 181 | } 182 | 183 | PROP 184 | { 185 | name = JSIActionGroupLabelButton08 186 | MODEL 187 | { 188 | model = Squad/Props/ledPanelSpeed/model 189 | } 190 | MODULE 191 | { 192 | name = JSIActionGroupSwitch 193 | actionName = custom08 194 | switchTransform = toggleButton 195 | switchSound = Squad/Sounds/sound_click_tock 196 | coloredObject = toggleButton 197 | disabledColor = 0,0,0,255 198 | enabledColor = 0,0,255,255 199 | } 200 | MODULE 201 | { 202 | name = JSIVariableLabel 203 | labelText = <=0=>$&$AGMEMO8 204 | transformName = textLabel 205 | fontSize = 0.008 206 | } 207 | } 208 | 209 | PROP 210 | { 211 | name = JSIActionGroupLabelButton09 212 | MODEL 213 | { 214 | model = Squad/Props/ledPanelSpeed/model 215 | } 216 | MODULE 217 | { 218 | name = JSIActionGroupSwitch 219 | actionName = custom09 220 | switchTransform = toggleButton 221 | switchSound = Squad/Sounds/sound_click_tock 222 | coloredObject = toggleButton 223 | disabledColor = 0,0,0,255 224 | enabledColor = 0,0,255,255 225 | } 226 | MODULE 227 | { 228 | name = JSIVariableLabel 229 | labelText = <=0=>$&$AGMEMO9 230 | transformName = textLabel 231 | fontSize = 0.008 232 | } 233 | } 234 | 235 | PROP 236 | { 237 | name = JSIActionGroupLabelButton10 238 | MODEL 239 | { 240 | model = Squad/Props/ledPanelSpeed/model 241 | } 242 | MODULE 243 | { 244 | name = JSIActionGroupSwitch 245 | actionName = custom10 246 | switchTransform = toggleButton 247 | switchSound = Squad/Sounds/sound_click_tock 248 | coloredObject = toggleButton 249 | disabledColor = 0,0,0,255 250 | enabledColor = 0,0,255,255 251 | } 252 | MODULE 253 | { 254 | name = JSIVariableLabel 255 | labelText = <=0=>$&$AGMEMO0 256 | transformName = textLabel 257 | fontSize = 0.008 258 | } 259 | } 260 | -------------------------------------------------------------------------------- /GameData/JSI/RasterPropMonitor/Library/Props/SimpleProps/AxisIndicator.cfg: -------------------------------------------------------------------------------- 1 | // Props using the axis indicator as a linear analog gauge 2 | 3 | PROP 4 | { 5 | // Throttle position indicator 6 | name = JSIAA_Throttle 7 | MODEL 8 | { 9 | model = Squad/Props/AxisIndicator/model 10 | } 11 | MODULE 12 | { 13 | name = JSIVariableAnimator 14 | refreshRate = 5 15 | VARIABLESET 16 | { 17 | variableName = THROTTLE 18 | scale = 0.0,1.0 19 | controlledTransform = BarIndicator 20 | localTranslationStart = 0, 0.001, 0.066 21 | localTranslationEnd = 0, 0.001, 0.000 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /GameData/JSI/RasterPropMonitor/Library/Props/SimpleProps/Blinkenlichten.cfg: -------------------------------------------------------------------------------- 1 | PROP 2 | { 3 | name = JSIStockSquareBlinkenlichten 4 | MODEL 5 | { 6 | model = Squad/Props/squareButton/model 7 | } 8 | MODULE 9 | { 10 | name = JSIVariableAnimator 11 | refreshRate = 1200 12 | coloredObject = button 13 | passiveColor = 0,0,0,255 14 | activeColor = 255,238,147,255 15 | variableName = RANDOM 16 | scale = 0,1 17 | } 18 | } -------------------------------------------------------------------------------- /GameData/JSI/RasterPropMonitor/Library/Props/SimpleProps/JSISwitchable.cfg: -------------------------------------------------------------------------------- 1 | PROP 2 | { 3 | // Altimeter. Switches between ALTITUDE and RADARALTOCEAN. The button 4 | // button switches color to indicate mode. 5 | name = JSIStockAltimeter 6 | MODEL 7 | { 8 | model = Squad/Props/ledPanelSpeed/model 9 | } 10 | MODULE 11 | { 12 | name = JSISwitchableVariableLabel 13 | 14 | labelTransform = textLabel 15 | fontSize = 0.009 16 | refreshRate = 12 17 | 18 | switchSound = Squad/Sounds/sound_click_tock 19 | switchTransform = toggleButton 20 | coloredObject = toggleButton 21 | 22 | VARIABLESET 23 | { 24 | labelText = ASL: <=0:SIP7.1=>m $&$ ALTITUDE 25 | color = 0,0,255,255 26 | } 27 | VARIABLESET 28 | { 29 | labelText = AGL: <=0:SIP7.1=>m $&$ RADARALTOCEAN 30 | color = 0,255,128,255 31 | } 32 | } 33 | } 34 | 35 | PROP 36 | { 37 | // Fuel display. Toggles between FUEL and FUELPERCENT. Button 38 | // color shifts depending on fuel level. 39 | name = JSIStockFuelPanel 40 | MODEL 41 | { 42 | model = Squad/Props/ledPanelSpeed/model 43 | } 44 | MODULE 45 | { 46 | name = JSIVariableAnimator 47 | refreshRate = 12 48 | coloredObject = toggleButton 49 | passiveColor = 255,0,0,255 50 | activeColor = 0,255,58,255 51 | variableName = FUELPERCENT 52 | scale = 0.1,0.45 53 | } 54 | 55 | MODULE 56 | { 57 | name = JSISwitchableVariableLabel 58 | 59 | labelTransform = textLabel 60 | fontSize = 0.009 61 | refreshRate = 12 62 | 63 | switchSound = Squad/Sounds/sound_click_tock 64 | switchTransform = toggleButton 65 | 66 | VARIABLESET 67 | { 68 | labelText = FUEL: <=0,6:f0=> $&$ SYSR_LIQUIDFUEL 69 | } 70 | VARIABLESET 71 | { 72 | labelText = FUEL: <=0,4:0%=> $&$ SYSR_LIQUIDFUELPERCENT 73 | } 74 | } 75 | } 76 | 77 | PROP 78 | { 79 | // Same as JSIStockFuel, but for monoprop 80 | name = JSIStockMono 81 | MODEL 82 | { 83 | model = Squad/Props/ledPanelSpeed/model 84 | } 85 | MODULE 86 | { 87 | name = JSIVariableAnimator 88 | refreshRate = 12 89 | coloredObject = toggleButton 90 | passiveColor = 255,0,0,255 91 | activeColor = 0,255,58,255 92 | variableName = SYSR_MONOPROPELLANTPERCENT 93 | scale = 0.1,0.45 94 | } 95 | 96 | MODULE 97 | { 98 | name = JSISwitchableVariableLabel 99 | 100 | labelTransform = textLabel 101 | fontSize = 0.009 102 | refreshRate = 12 103 | 104 | switchSound = Squad/Sounds/sound_click_tock 105 | switchTransform = toggleButton 106 | 107 | VARIABLESET 108 | { 109 | labelText = MONO: <=0,6:f0=> $&$ SYSR_MONOPROPELLANT 110 | } 111 | VARIABLESET 112 | { 113 | labelText = MONO: <=0,4:0%=> $&$ SYSR_MONOPROPELLANTPERCENT 114 | } 115 | } 116 | } 117 | 118 | PROP 119 | { 120 | // Same as JSIStockFuel, but for electric 121 | name = JSIStockPower 122 | MODEL 123 | { 124 | model = Squad/Props/ledPanelSpeed/model 125 | } 126 | MODULE 127 | { 128 | name = JSIVariableAnimator 129 | refreshRate = 12 130 | coloredObject = toggleButton 131 | passiveColor = 255,0,0,255 132 | activeColor = 0,255,58,255 133 | variableName = SYSR_ELECTRICCHARGEPERCENT 134 | scale = 0.1,0.45 135 | } 136 | 137 | MODULE 138 | { 139 | name = JSISwitchableVariableLabel 140 | 141 | labelTransform = textLabel 142 | fontSize = 0.009 143 | refreshRate = 12 144 | 145 | switchSound = Squad/Sounds/sound_click_tock 146 | switchTransform = toggleButton 147 | 148 | VARIABLESET 149 | { 150 | labelText = ELEC: <=0,6:f0=> $&$ SYSR_ELECTRICCHARGE 151 | } 152 | VARIABLESET 153 | { 154 | labelText = ELEC: <=0,4:0%=> $&$ SYSR_ELECTRICCHARGEPERCENT 155 | } 156 | } 157 | } 158 | 159 | PROP 160 | { 161 | // A gratuitous button that color changes when pressed, but does 162 | // nothing else 163 | name = JSIMulticolorButton 164 | MODEL 165 | { 166 | model = Squad/Props/squareButton/model 167 | } 168 | MODULE 169 | { 170 | name = JSISwitchableVariableLabel 171 | 172 | refreshRate = 120 173 | 174 | switchTransform = button 175 | coloredObject = button 176 | 177 | VARIABLESET 178 | { 179 | color = 0,255,0,255 180 | } 181 | VARIABLESET 182 | { 183 | color = 0,0,255,255 184 | } 185 | VARIABLESET 186 | { 187 | color = 255,0,255,255 188 | } 189 | VARIABLESET 190 | { 191 | color = 255,255,0,255 192 | } 193 | VARIABLESET 194 | { 195 | color = 255,255,255,255 196 | } 197 | VARIABLESET 198 | { 199 | color = 0,0,0,255 200 | } 201 | } 202 | } 203 | -------------------------------------------------------------------------------- /GameData/JSI/RasterPropMonitor/Library/Props/SimpleProps/SquareButtons.cfg: -------------------------------------------------------------------------------- 1 | PROP 2 | { 3 | name = JSIStockSquareButtonLight 4 | MODEL 5 | { 6 | model = Squad/Props/squareButton/model 7 | } 8 | 9 | MODULE 10 | { 11 | name = JSIActionGroupSwitch 12 | actionName = lights 13 | switchSound = Squad/Sounds/sound_click_latch 14 | switchTransform = button 15 | coloredObject = button 16 | disabledColor = 0,0,0,255 17 | enabledColor = 250,250,12,255 18 | } 19 | } 20 | 21 | PROP 22 | { 23 | name = JSIStockSquareButtonGear 24 | MODEL 25 | { 26 | model = Squad/Props/squareButton/model 27 | } 28 | 29 | MODULE 30 | { 31 | name = JSIActionGroupSwitch 32 | actionName = gear 33 | switchSound = Squad/Sounds/sound_click_latch 34 | switchTransform = button 35 | coloredObject = button 36 | disabledColor = 0,0,0,255 37 | enabledColor = 54,9,235,255 38 | } 39 | } 40 | 41 | PROP 42 | { 43 | name = JSIStockSquareButtonRCS 44 | MODEL 45 | { 46 | model = Squad/Props/squareButton/model 47 | } 48 | 49 | MODULE 50 | { 51 | name = JSIActionGroupSwitch 52 | actionName = rcs 53 | switchSound = Squad/Sounds/sound_click_latch 54 | switchTransform = button 55 | coloredObject = button 56 | disabledColor = 0,0,0,255 57 | enabledColor = 255,145,0,255 58 | } 59 | } 60 | 61 | PROP 62 | { 63 | name = JSIStockSquareButtonSAS 64 | MODEL 65 | { 66 | model = Squad/Props/squareButton/model 67 | } 68 | 69 | MODULE 70 | { 71 | name = JSIActionGroupSwitch 72 | actionName = sas 73 | switchSound = Squad/Sounds/sound_click_latch 74 | switchTransform = button 75 | coloredObject = button 76 | disabledColor = 0,0,0,255 77 | enabledColor = 19,236,240,255 78 | } 79 | } 80 | 81 | PROP 82 | { 83 | name = JSIStockSquareButtonBRAKES 84 | MODEL 85 | { 86 | model = Squad/Props/squareButton/model 87 | } 88 | 89 | MODULE 90 | { 91 | name = JSIActionGroupSwitch 92 | actionName = brakes 93 | switchSound = Squad/Sounds/sound_click_latch 94 | switchTransform = button 95 | coloredObject = button 96 | disabledColor = 0,0,0,255 97 | enabledColor = 255,0,0,255 98 | } 99 | } 100 | 101 | PROP 102 | { 103 | // Staging button 104 | name = JSIStockSquareButtonStage 105 | MODEL 106 | { 107 | model = Squad/Props/squareButton/model 108 | } 109 | MODULE 110 | { 111 | name = JSIVariableAnimator 112 | refreshRate = 15 113 | coloredObject = button 114 | passiveColor = 64,0,0,255 115 | activeColor = 255,0,0,255 116 | variableName = STAGEREADY 117 | scale = 0.8,1.0 118 | } 119 | MODULE 120 | { 121 | name = JSIActionGroupSwitch 122 | switchTransform = button 123 | actionName = stage 124 | switchSound = Squad/Sounds/sound_click_latch 125 | } 126 | } 127 | -------------------------------------------------------------------------------- /GameData/JSI/RasterPropMonitor/Library/Props/SimpleProps/TrimmerKnobs.cfg: -------------------------------------------------------------------------------- 1 | PROP 2 | { 3 | name = JSITrimKnobPitch 4 | 5 | MODEL 6 | { 7 | model = Squad/Props/directionalKnob/model 8 | } 9 | 10 | MODULE 11 | { 12 | name = JSIVariableAnimator 13 | refreshRate = 3 14 | VARIABLESET 15 | { 16 | controlledTransform = Knob 17 | localRotationStart = 0,0,157 18 | localRotationEnd = 0,0,-157 19 | longPath = yes 20 | variableName = STICKPITCHTRIM 21 | scale = -1,1 22 | } 23 | } 24 | } 25 | 26 | PROP 27 | { 28 | name = JSITrimKnobYaw 29 | 30 | MODEL 31 | { 32 | model = Squad/Props/directionalKnob/model 33 | } 34 | 35 | MODULE 36 | { 37 | name = JSIVariableAnimator 38 | refreshRate = 3 39 | VARIABLESET 40 | { 41 | controlledTransform = Knob 42 | localRotationStart = 0,0,157 43 | localRotationEnd = 0,0,-157 44 | longPath = yes 45 | variableName = STICKYAWTRIM 46 | scale = -1,1 47 | } 48 | } 49 | } 50 | 51 | PROP 52 | { 53 | name = JSITrimKnobRoll 54 | 55 | MODEL 56 | { 57 | model = Squad/Props/directionalKnob/model 58 | } 59 | 60 | MODULE 61 | { 62 | name = JSIVariableAnimator 63 | refreshRate = 3 64 | VARIABLESET 65 | { 66 | controlledTransform = Knob 67 | localRotationStart = 0,0,157 68 | localRotationEnd = 0,0,-157 69 | longPath = yes 70 | variableName = STICKROLLTRIM 71 | scale = -1,1 72 | } 73 | } 74 | } 75 | 76 | -------------------------------------------------------------------------------- /GameData/JSI/RasterPropMonitor/Library/Props/SwitchWCover/SwitchIcons.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mihara/RasterPropMonitor/acf5fb8086c332728d103aae6926abde0a87d1ee/GameData/JSI/RasterPropMonitor/Library/Props/SwitchWCover/SwitchIcons.tga -------------------------------------------------------------------------------- /GameData/JSI/RasterPropMonitor/Library/Props/SwitchWCover/SwitchWCover.mu: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mihara/RasterPropMonitor/acf5fb8086c332728d103aae6926abde0a87d1ee/GameData/JSI/RasterPropMonitor/Library/Props/SwitchWCover/SwitchWCover.mu -------------------------------------------------------------------------------- /GameData/JSI/RasterPropMonitor/Library/Props/SwitchWCover/Switch_w_cover_Diff.dds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mihara/RasterPropMonitor/acf5fb8086c332728d103aae6926abde0a87d1ee/GameData/JSI/RasterPropMonitor/Library/Props/SwitchWCover/Switch_w_cover_Diff.dds -------------------------------------------------------------------------------- /GameData/JSI/RasterPropMonitor/Library/Props/SwitchWCover/mechSwitch.cfg: -------------------------------------------------------------------------------- 1 | PROP 2 | { 3 | name = JSIswitch_GEAR 4 | 5 | MODULE 6 | { 7 | name = JSIActionGroupSwitch 8 | animationName = SwitchWCoverAnim 9 | switchTransform = SwitchColider 10 | actionName = gear 11 | } 12 | 13 | MODULE 14 | { 15 | name = JSIPropTextureShift 16 | transformToShift = SwitchNamePlate 17 | layerToShift = _MainTex _Emissive 18 | x = 0.00 19 | y = 0.75 20 | } 21 | 22 | } 23 | 24 | PROP 25 | { 26 | name = JSIswitch_LIGHTS 27 | 28 | MODULE 29 | { 30 | name = JSIActionGroupSwitch 31 | animationName = SwitchWCoverAnim 32 | switchTransform = SwitchColider 33 | actionName = lights 34 | } 35 | 36 | MODULE 37 | { 38 | name = JSIPropTextureShift 39 | transformToShift = SwitchNamePlate 40 | layerToShift = _MainTex _Emissive 41 | x = 0.00 42 | y = 0.5 43 | } 44 | 45 | } 46 | 47 | PROP 48 | { 49 | name = JSIswitch_RCS 50 | 51 | MODULE 52 | { 53 | name = JSIActionGroupSwitch 54 | animationName = SwitchWCoverAnim 55 | switchTransform = SwitchColider 56 | actionName = rcs 57 | } 58 | 59 | MODULE 60 | { 61 | name = JSIPropTextureShift 62 | transformToShift = SwitchNamePlate 63 | layerToShift = _MainTex _Emissive 64 | x = 0.00 65 | y = 0.25 66 | } 67 | 68 | } 69 | 70 | PROP 71 | { 72 | name = JSIswitch_SAS 73 | 74 | MODULE 75 | { 76 | name = JSIActionGroupSwitch 77 | animationName = SwitchWCoverAnim 78 | switchTransform = SwitchColider 79 | actionName = sas 80 | } 81 | 82 | MODULE 83 | { 84 | name = JSIPropTextureShift 85 | transformToShift = SwitchNamePlate 86 | layerToShift = _MainTex _Emissive 87 | x = 0.00 88 | y = 0.00 89 | } 90 | 91 | } 92 | 93 | 94 | PROP 95 | { 96 | name = JSIswitch_BRAKE 97 | 98 | MODULE 99 | { 100 | name = JSIActionGroupSwitch 101 | animationName = SwitchWCoverAnim 102 | switchTransform = SwitchColider 103 | actionName = brakes 104 | } 105 | 106 | MODULE 107 | { 108 | name = JSIPropTextureShift 109 | transformToShift = SwitchNamePlate 110 | layerToShift = _MainTex _Emissive 111 | x = 0.25 112 | y = 0.00 113 | } 114 | 115 | } 116 | 117 | PROP 118 | { 119 | name = JSIswitch_StageLock 120 | 121 | MODULE 122 | { 123 | name = JSIActionGroupSwitch 124 | animationName = SwitchWCoverAnim 125 | switchTransform = SwitchColider 126 | actionName = plugin 127 | switchSound = Squad/Sounds/sound_click_latch 128 | PLUGINACTION 129 | { 130 | name = JSIInternalRPMButtons 131 | actionMethod = ButtonStageLock 132 | stateMethod = ButtonStageLockState 133 | } 134 | } 135 | 136 | MODULE 137 | { 138 | name = JSIPropTextureShift 139 | transformToShift = SwitchNamePlate 140 | layerToShift = _MainTex _Emissive 141 | x = 0.25 142 | y = 0.25 143 | } 144 | 145 | } 146 | -------------------------------------------------------------------------------- /GameData/JSI/RasterPropMonitor/Library/Sounds/buttonbeep.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mihara/RasterPropMonitor/acf5fb8086c332728d103aae6926abde0a87d1ee/GameData/JSI/RasterPropMonitor/Library/Sounds/buttonbeep.ogg -------------------------------------------------------------------------------- /GameData/JSI/RasterPropMonitor/Library/Textures/bg01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mihara/RasterPropMonitor/acf5fb8086c332728d103aae6926abde0a87d1ee/GameData/JSI/RasterPropMonitor/Library/Textures/bg01.png -------------------------------------------------------------------------------- /GameData/JSI/RasterPropMonitor/Library/Textures/graphgrid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mihara/RasterPropMonitor/acf5fb8086c332728d103aae6926abde0a87d1ee/GameData/JSI/RasterPropMonitor/Library/Textures/graphgrid.png -------------------------------------------------------------------------------- /GameData/JSI/RasterPropMonitor/Library/Textures/noscansat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mihara/RasterPropMonitor/acf5fb8086c332728d103aae6926abde0a87d1ee/GameData/JSI/RasterPropMonitor/Library/Textures/noscansat.png -------------------------------------------------------------------------------- /GameData/JSI/RasterPropMonitor/Library/Textures/nosignal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mihara/RasterPropMonitor/acf5fb8086c332728d103aae6926abde0a87d1ee/GameData/JSI/RasterPropMonitor/Library/Textures/nosignal.png -------------------------------------------------------------------------------- /GameData/JSI/RasterPropMonitor/Library/Textures/scaleLabels.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mihara/RasterPropMonitor/acf5fb8086c332728d103aae6926abde0a87d1ee/GameData/JSI/RasterPropMonitor/Library/Textures/scaleLabels.png -------------------------------------------------------------------------------- /GameData/JSI/RasterPropMonitor/Library/Textures/scalebar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mihara/RasterPropMonitor/acf5fb8086c332728d103aae6926abde0a87d1ee/GameData/JSI/RasterPropMonitor/Library/Textures/scalebar.png -------------------------------------------------------------------------------- /GameData/JSI/RasterPropMonitor/Plugins/3rdPartyLicenses/digital-7-readme.txt: -------------------------------------------------------------------------------- 1 | True Type Fonts: DIGITAL-7 version 1.02 2 | 3 | 4 | EULA 5 | -==- 6 | The fonts Digital-7 is freeware for home using. 7 | 8 | 9 | DESCRIPTION 10 | -=========- 11 | 12 | This font created specially for program Calculator-7 (download shareware version: http://www.styleseven.com/ and use 7 days fo free). 13 | 14 | The program Calculator-7 offers you the following possibilities: 15 | * calculate using seven operator: addition, subtraction, multiply, divide, percent, square root, 1 divide to X; 16 | * set decimal position (0, 2, 3, float) and round type (up, mathematical, down); 17 | * customize an appearance of work window: scale, fonts for digital panel and buttons, background color; 18 | * customize an appearance of number in digital panel: leading zero for decimal, thousand separator, decimal separator, digit grouping; 19 | * calculate total from clipboard (copy data to clipboard from table or text and press one button). 20 | 21 | 22 | Files in digital-7_font.zip: 23 | readme.txt this file; 24 | digital-7.ttf digital-7 regular font; 25 | digital-7 (italic).ttf digital-7 italic font; 26 | digital-7 (mono).ttf digital-7 mono font; 27 | digital-7 (mono italic).ttf digital-7 mono font. 28 | 29 | Please visit http://www.styleseven.com/ for download our other products as freeware as shareware. 30 | We will welcome any useful suggestions and comments; please send them to ms-7@styleseven.com 31 | 32 | 33 | FREEWARE USE (NOTES) 34 | -=================- 35 | Also you may: 36 | * Use the font in freeware software (credit needed); 37 | * Use the font for your education process. 38 | 39 | 40 | COMMERCIAL OR BUSINESS USE 41 | -========================- 42 | 43 | You can buy font for commercial use here ($24.95): http://store.esellerate.net/s.aspx?s=STR0331655240 44 | You may: 45 | * Include the font to your installation; 46 | * Use one license up to 100 computers in your office. 47 | Please contact us for any questions. 48 | 49 | 50 | WHAT IS NEW? 51 | -==========- 52 | 53 | Version 1.01 April 05 2009 54 | -------------------------- 55 | * Change Typeface name for fonts "Digital-7 (mono)" and "Digital-7 (italic)" (now available all fonts for select in application, for example Word Pad). 56 | * Corrected symbol ':'. 57 | 58 | Version 1.01 April 07 2011 59 | -------------------------- 60 | * Embedding is allowed. 61 | 62 | Version 1.1 June 07 2013 63 | -------------------------- 64 | * Mono Italic font is added. 65 | 66 | 67 | AUTHOR 68 | -====- 69 | 70 | Sizenko Alexander 71 | Style-7 72 | http://www.styleseven.com 73 | Created: October 7 2008 -------------------------------------------------------------------------------- /GameData/JSI/RasterPropMonitor/Plugins/3rdPartyLicenses/repetition-scrolling-ReadMe.txt: -------------------------------------------------------------------------------- 1 | T E P I D M O N K E Y F O N T S 2 | freeware fonts for a freeware world 3 | 4 | Site: http://www.fontframe.com/tepidmonkey 5 | E-mail: tepidmonkey@yahoo.com 6 | 7 | Thanks for your interest in my fonts! 8 | 9 | For help on how to unzip, unstuff or install one of my 10 | fonts, please visit my site at 11 | http://www.fontframe.com/tepidmonkey and go to the Help section. 12 | If you have any comments or questions, you can e-mail 13 | me at tepidmonkey@yahoo.com and I'll try to reply as 14 | soon as possible. 15 | 16 | Every week, I present a brand new original font for 17 | your downloading pleasure, so be sure to visit my web 18 | site every Sunday. 19 | 20 | You may use this font(s) for non-commercial and 21 | commercial purposes. You are not allowed to sell this 22 | font for any fee at all. You are allowed to 23 | redistribute it as long as you don't charge ANYTHING 24 | for it (at all) and if you include this unaltered 25 | Read Me file. You may not change any aspect of the font 26 | file or this file. 27 | For the full set of terms of use (which override what 28 | is listed here), go to http://www.fontframe.com/tepidmonkey 29 | and visit the Terms Of Use section. -------------------------------------------------------------------------------- /GameData/JSI/RasterPropMonitor/Plugins/PluginData/rpm-config.cfg: -------------------------------------------------------------------------------- 1 | RasterPropMonitorSettings 2 | { 3 | DebugLogging = False 4 | ShowCallCount = False 5 | DefaultRefreshRate = 5 6 | MinimumRefreshRate = 1 7 | } 8 | -------------------------------------------------------------------------------- /GameData/JSI/RasterPropMonitor/Plugins/reduce-iva-cpu-usage.cfg: -------------------------------------------------------------------------------- 1 | // To the best of my knowledge, the InternalButtonLight module does not actually work, 2 | // and becomes a useless resource drain. It definitely isn't actually being used anywhere. 3 | // The internalGeneric module is likewise unnecessary for normal IVA function and explicitly doesn't do anything 4 | // -- yet Unity wastes resources enumerating it, not much, but why do it at all? 5 | 6 | // This patch cuts both of them out of all the stock props to reduce component count. 7 | 8 | @PROP[*]:HAS[@MODULE[InternalButtonLight]]:FINAL 9 | { 10 | !MODULE[InternalButtonLight] {} 11 | } 12 | 13 | @PROP[*]:HAS[@MODULE[internalGeneric]]:FINAL 14 | { 15 | !MODULE[internalGeneric] {} 16 | } 17 | -------------------------------------------------------------------------------- /GameData/JSI/RasterPropMonitor/RasterPropMonitor.version: -------------------------------------------------------------------------------- 1 | { 2 | "NAME": "RasterPropMonitor", 3 | "URL": "https://raw.githubusercontent.com/Mihara/RasterPropMonitor/master/GameData/JSI/RasterPropMonitor/RasterPropMonitor.version", 4 | "DOWNLOAD": "https://github.com/Mihara/RasterPropMonitor/releases", 5 | "VERSION": 6 | { 7 | "MAJOR": 0, 8 | "MINOR": 30, 9 | "PATCH": 6 10 | }, 11 | "KSP_VERSION": 12 | { 13 | "MAJOR": 1, 14 | "MINOR": 6, 15 | "PATCH": 0 16 | }, 17 | "KSP_VERSION_MIN": 18 | { 19 | "MAJOR": 1, 20 | "MINOR": 4, 21 | "PATCH": 0 22 | }, 23 | "KSP_VERSION_MAX": 24 | { 25 | "MAJOR": 1, 26 | "MINOR": 6, 27 | "PATCH": 99 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /GameData/JSI/RasterPropMonitor/rasterpropmonitor-font.assetbundle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mihara/RasterPropMonitor/acf5fb8086c332728d103aae6926abde0a87d1ee/GameData/JSI/RasterPropMonitor/rasterpropmonitor-font.assetbundle -------------------------------------------------------------------------------- /GameData/JSI/RasterPropMonitor/rasterpropmonitor-linux.assetbundle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mihara/RasterPropMonitor/acf5fb8086c332728d103aae6926abde0a87d1ee/GameData/JSI/RasterPropMonitor/rasterpropmonitor-linux.assetbundle -------------------------------------------------------------------------------- /GameData/JSI/RasterPropMonitor/rasterpropmonitor-osx.assetbundle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mihara/RasterPropMonitor/acf5fb8086c332728d103aae6926abde0a87d1ee/GameData/JSI/RasterPropMonitor/rasterpropmonitor-osx.assetbundle -------------------------------------------------------------------------------- /GameData/JSI/RasterPropMonitor/rasterpropmonitor-windows.assetbundle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mihara/RasterPropMonitor/acf5fb8086c332728d103aae6926abde0a87d1ee/GameData/JSI/RasterPropMonitor/rasterpropmonitor-windows.assetbundle -------------------------------------------------------------------------------- /MechJebRPM/MechJebRPM.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Debug 5 | AnyCPU 6 | 8.0.30703 7 | 2.0 8 | {272BB11D-C8A8-4CA8-8C18-58324670C68C} 9 | Library 10 | MechJebRPM 11 | MechJebRPM 12 | 0.20.0 13 | 65001 14 | v3.5 15 | 16 | 17 | true 18 | full 19 | false 20 | ..\bin\Debug 21 | DEBUG; 22 | prompt 23 | 4 24 | false 25 | 4 26 | 27 | 28 | true 29 | ..\bin\Release 30 | prompt 31 | 4 32 | false 33 | 4 34 | 35 | 36 | 37 | 38 | ..\..\..\..\..\Games\Steam\steamapps\common\Kerbal Space Program\KSP_Data\Managed\Assembly-CSharp.dll 39 | False 40 | 41 | 42 | ..\..\..\..\..\Games\Steam\steamapps\common\Kerbal Space Program\KSP_Data\Managed\UnityEngine.dll 43 | False 44 | 45 | 46 | ..\..\..\..\..\Games\Steam\steamapps\common\Kerbal Space Program\GameData\MechJeb2\Plugins\MechJeb2.dll 47 | False 48 | 49 | 50 | 51 | 52 | 53 | 54 | Properties\SharedAssemblyInfo.cs 55 | 56 | 57 | 58 | 59 | 60 | 61 | {F19C7AB4-50C2-4378-9673-CC039CA12E10} 62 | RasterPropMonitor 63 | False 64 | 65 | 66 | 67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /MechJebRPM/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | 4 | // Information about this assembly is defined by the following attributes. 5 | // Change them to the values specific to your project. 6 | [assembly: AssemblyTitle("MechJebRPM")] 7 | [assembly: AssemblyDescription("RasterPropMonitor / MechJeb2 interface plugin for Kerbal Space Program")] 8 | 9 | // For KSP purposes we are MechJebRPM version 0.18, because 10 | // 0.17 depended on KSPAssembly version 2.2. 11 | [assembly: KSPAssembly("MechJebRPM", 0, 18)] 12 | // Depends on RPM 0.17 and MechJeb 2.3. 13 | // Supposedly these help avoid the problems of plugin loading order. 14 | [assembly: KSPAssemblyDependency("RasterPropMonitor", 0, 17)] 15 | [assembly: KSPAssemblyDependency("MechJeb2", 2, 3)] -------------------------------------------------------------------------------- /PLANS.md: -------------------------------------------------------------------------------- 1 | # Potential future features currently in research phase 2 | 3 | For things already in the pipeline, see [project issues page](https://github.com/Mihara/RasterPropMonitor/issues) 4 | 5 | ## Minor new features 6 | 7 | * BobCat wants markers on graph lines denoting things like staging events, but I'm not clear on how to set this up nicely. 8 | * A key combination to reseat the current kerbal in the same pod so that he can take the pilot's seat if the pilot went out. (This is proving to be difficult...) 9 | 10 | ## Major new features 11 | 12 | * Moving-in-IVA: 13 | * Make an InternalModule that detects doubleclicks on a transform. Place that collider over an internal hatch. 14 | * When in IVA player clicks on that hatch, search the rest of the ship for a habitable capsule with IVA in the direction of the click (Somewhat non-trivial as it will require intelligently navigating the part tree). 15 | * Locate a part which has an IVA and a free InternalSeat. (That can be handed off to ConnectedLivingSpaces now that it exists and is widely supported.) 16 | * Detect which kerbal we're currently looking with. (Well, that is now it's own static function) 17 | * Move that kerbal to the seat found. (Despawn/spawn should work, but somehow the entire internal is getting borked in the attempt.) 18 | Voila, we have moving-in-iva, or at least as close as it ever gets. 19 | -------------------------------------------------------------------------------- /RasterPropMonitor/Auxiliary modules/InternalCameraTargetHelper.cs: -------------------------------------------------------------------------------- 1 | namespace JSI 2 | { 3 | public class InternalCameraTargetHelper: InternalModule 4 | { 5 | private ITargetable target; 6 | private bool needsRestoring; 7 | private static Part referencePart; 8 | private bool wasOutsideOnPreviousFrame = true; 9 | 10 | public override void OnUpdate() 11 | { 12 | if (!JUtil.VesselIsInIVA(vessel)) { 13 | wasOutsideOnPreviousFrame = true; 14 | return; 15 | } 16 | 17 | // Restoring target. 18 | if (needsRestoring && target != null && FlightGlobals.fetch.VesselTarget == null) { 19 | FlightGlobals.fetch.SetVesselTarget(target); 20 | } else { 21 | target = FlightGlobals.fetch.VesselTarget; 22 | } 23 | needsRestoring = false; 24 | 25 | // Restoring reference. 26 | if (wasOutsideOnPreviousFrame && referencePart != null && referencePart.vessel == vessel && vessel.GetReferenceTransformPart() == part) { 27 | referencePart.MakeReferencePart(); 28 | } 29 | if (!GameSettings.CAMERA_NEXT.GetKey()) { 30 | referencePart = vessel.GetReferenceTransformPart(); 31 | wasOutsideOnPreviousFrame = false; 32 | } else { 33 | wasOutsideOnPreviousFrame = true; 34 | } 35 | 36 | } 37 | 38 | public void LateUpdate() 39 | { 40 | if (!JUtil.VesselIsInIVA(vessel)) 41 | return; 42 | 43 | needsRestoring |= Mouse.Left.GetDoubleClick(); 44 | } 45 | } 46 | } 47 | 48 | -------------------------------------------------------------------------------- /RasterPropMonitor/Auxiliary modules/JSIFlashModule.cs: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * RasterPropMonitor 3 | * ================= 4 | * Plugin for Kerbal Space Program 5 | * 6 | * by Mihara (Eugene Medvedev), MOARdV, and other contributors 7 | * 8 | * RasterPropMonitor is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, revision 11 | * date 29 June 2007, or (at your option) any later version. 12 | * 13 | * RasterPropMonitor is distributed in the hope that it will be useful, but 14 | * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 15 | * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 16 | * for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with RasterPropMonitor. If not, see . 20 | ****************************************************************************/ 21 | using System; 22 | using System.Collections; 23 | using UnityEngine; 24 | 25 | namespace JSI 26 | { 27 | /// 28 | /// JSIFlashModule is a very basic class for managing flashing behavior in 29 | /// multiple props without everyone needing their own counters. It uses the 30 | /// Unity coroutine functionality to approximate the requested flashRate, 31 | /// accounting for timewarp (although if the warp is high enough or the rate 32 | /// is low enough, it'll use the FixedUpdate interval instead). 33 | /// 34 | /// TODO: Is FixedUpdate the right interval, or should I use something like 35 | /// render update? 36 | /// 37 | public class JSIFlashModule : PartModule 38 | { 39 | /// 40 | /// Flash toggle rate in Hz (1/2 of the duty cycle) 41 | /// 42 | [KSPField] 43 | public float flashRate = 0.0f; 44 | 45 | /// 46 | /// Current state 47 | /// 48 | private bool flashToggle; 49 | 50 | /// 51 | /// Who cares about this? 52 | /// 53 | public event Action flashSubscribers; 54 | 55 | /// 56 | /// Start the coroutine 57 | /// 58 | public void Start() 59 | { 60 | if (!HighLogic.LoadedSceneIsEditor && flashRate > 0.0f) 61 | { 62 | StartCoroutine(FlashCoroutine()); 63 | } 64 | } 65 | 66 | /// 67 | /// Clear out flashRate (probably not needed) 68 | /// 69 | public void OnDestroy() 70 | { 71 | flashRate = 0.0f; 72 | } 73 | 74 | /// 75 | /// Coroutine for toggling the flash boolean. 76 | /// 77 | /// 78 | private IEnumerator FlashCoroutine() 79 | { 80 | while (flashRate > 0.0f) 81 | { 82 | float delay = 0.0f; 83 | try 84 | { 85 | flashToggle = !flashToggle; 86 | 87 | flashSubscribers(flashToggle); 88 | 89 | delay = flashRate / TimeWarp.CurrentRate; 90 | } 91 | catch 92 | { 93 | } 94 | if (delay == 0.0f) 95 | { 96 | yield return null; 97 | } 98 | else if (delay < TimeWarp.fixedDeltaTime) 99 | { 100 | yield return new WaitForFixedUpdate(); 101 | } 102 | else 103 | { 104 | yield return new WaitForSeconds(delay); 105 | } 106 | 107 | } 108 | 109 | yield return null; 110 | 111 | } 112 | } 113 | } 114 | -------------------------------------------------------------------------------- /RasterPropMonitor/Auxiliary modules/JSIInternalBackgroundNoise.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace JSI 4 | { 5 | public class JSIInternalBackgroundNoise : InternalModule 6 | { 7 | [KSPField] 8 | public string soundURL; 9 | [KSPField] 10 | public float soundVolume = 0.1f; 11 | [KSPField] 12 | public bool needsElectricCharge = true; 13 | [KSPField] 14 | public string resourceName = "SYSR_ELECTRICCHARGE"; 15 | private float electricChargeReserve; 16 | private FXGroup audioOutput; 17 | private bool isPlaying; 18 | private const int soundCheckRate = 60; 19 | private int soundCheckCountdown; 20 | private RasterPropMonitorComputer rpmComp; 21 | 22 | public void Start() 23 | { 24 | if (HighLogic.LoadedSceneIsEditor) 25 | { 26 | return; 27 | } 28 | 29 | rpmComp = RasterPropMonitorComputer.Instantiate(internalProp, true); 30 | if (string.IsNullOrEmpty(soundURL)) 31 | { 32 | JUtil.LogMessage(this, "JSIInternalBackgroundNoise called with no soundURL"); 33 | Destroy(this); 34 | return; 35 | } 36 | 37 | if (needsElectricCharge) 38 | { 39 | rpmComp.UpdateDataRefreshRate(soundCheckRate); 40 | RPMVesselComputer comp = RPMVesselComputer.Instance(vessel.id); 41 | electricChargeReserve = rpmComp.ProcessVariable(resourceName, comp).MassageToFloat(); 42 | } 43 | audioOutput = new FXGroup("RPM" + internalModel.internalName + vessel.id); 44 | audioOutput.audio = internalModel.gameObject.AddComponent(); 45 | audioOutput.audio.clip = GameDatabase.Instance.GetAudioClip(soundURL.EnforceSlashes()); 46 | audioOutput.audio.Stop(); 47 | audioOutput.audio.volume = GameSettings.SHIP_VOLUME * soundVolume; 48 | audioOutput.audio.rolloffMode = AudioRolloffMode.Logarithmic; 49 | audioOutput.audio.maxDistance = 10f; 50 | audioOutput.audio.minDistance = 8f; 51 | audioOutput.audio.dopplerLevel = 0f; 52 | audioOutput.audio.panStereo = 0f; 53 | audioOutput.audio.playOnAwake = false; 54 | audioOutput.audio.priority = 255; 55 | audioOutput.audio.loop = true; 56 | audioOutput.audio.pitch = 1f; 57 | } 58 | 59 | private void StopPlaying() 60 | { 61 | if (isPlaying) 62 | { 63 | audioOutput.audio.Stop(); 64 | isPlaying = false; 65 | } 66 | } 67 | 68 | private void StartPlaying() 69 | { 70 | if (!isPlaying && (!needsElectricCharge || electricChargeReserve > 0.01f)) 71 | { 72 | audioOutput.audio.Play(); 73 | isPlaying = true; 74 | } 75 | } 76 | 77 | public override void OnUpdate() 78 | { 79 | if (!JUtil.UserIsInPod(part)) 80 | { 81 | StopPlaying(); 82 | return; 83 | } 84 | 85 | if (needsElectricCharge) 86 | { 87 | soundCheckCountdown--; 88 | if (soundCheckCountdown <= 0) 89 | { 90 | soundCheckCountdown = soundCheckRate; 91 | RPMVesselComputer comp = RPMVesselComputer.Instance(vessel.id); 92 | electricChargeReserve = rpmComp.ProcessVariable(resourceName, comp).MassageToFloat(); 93 | if (electricChargeReserve < 0.01f) 94 | { 95 | StopPlaying(); 96 | return; 97 | } 98 | } 99 | } 100 | 101 | StartPlaying(); 102 | } 103 | } 104 | } 105 | 106 | -------------------------------------------------------------------------------- /RasterPropMonitor/Auxiliary modules/JSIInternalEVAHatch.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace JSI 4 | { 5 | public class JSIInternalEVAHatch : InternalModule 6 | { 7 | [KSPField] 8 | public string hatchTransform = string.Empty; 9 | [KSPField] 10 | public string internalAnimation = string.Empty; 11 | private Kerbal activeKerbal; 12 | private Animation intAnim; 13 | private bool intAnimStarted; 14 | 15 | public void Start() 16 | { 17 | if (string.IsNullOrEmpty(hatchTransform)) 18 | { 19 | JUtil.LogMessage(this, "Where's my transform?"); 20 | return; 21 | } 22 | Transform actualTransform; 23 | if (internalProp == null) 24 | { 25 | actualTransform = internalModel.FindModelTransform(hatchTransform); 26 | if (!string.IsNullOrEmpty(internalAnimation)) 27 | { 28 | intAnim = internalModel.FindModelAnimators(internalAnimation)[0]; 29 | } 30 | } 31 | else 32 | { 33 | actualTransform = internalProp.FindModelTransform(hatchTransform); 34 | if (!string.IsNullOrEmpty(internalAnimation)) 35 | { 36 | intAnim = internalProp.FindModelAnimators(internalAnimation)[0]; 37 | } 38 | } 39 | if (!string.IsNullOrEmpty(internalAnimation) && intAnim == null) 40 | JUtil.LogErrorMessage(this, "Animation name was not found."); 41 | // Switching to using the stock button class because right now SmarterButton can't correctly handle doubleclick. 42 | InternalButton.Create(actualTransform.gameObject).OnDoubleTap(new InternalButton.InternalButtonDelegate(EVAClick)); 43 | 44 | } 45 | 46 | private void GoEva() 47 | { 48 | if (activeKerbal != null) 49 | { 50 | FlightEVA.SpawnEVA(activeKerbal); 51 | CameraManager.Instance.SetCameraFlight(); 52 | activeKerbal = null; 53 | } 54 | } 55 | // ..I don't feel like using coroutines. 56 | public override void OnUpdate() 57 | { 58 | if (intAnimStarted) 59 | { 60 | if (!intAnim.isPlaying) 61 | { 62 | // The animation completed, so we kick the kerbal out now. 63 | intAnimStarted = false; 64 | GoEva(); 65 | // And immediately reset the animation. 66 | intAnim[internalAnimation].normalizedTime = 0; 67 | intAnim.Stop(); 68 | } 69 | } 70 | } 71 | 72 | public void EVAClick() 73 | { 74 | Kerbal thatKerbal = part.FindCurrentKerbal(); 75 | 76 | float acLevel = ScenarioUpgradeableFacilities.GetFacilityLevel(SpaceCenterFacility.AstronautComplex); 77 | bool evaUnlocked = GameVariables.Instance.UnlockedEVA(acLevel); 78 | bool evaPossible = GameVariables.Instance.EVAIsPossible(evaUnlocked, vessel); 79 | if (evaPossible && thatKerbal != null && HighLogic.CurrentGame.Parameters.Flight.CanEVA) 80 | { 81 | if (thatKerbal.protoCrewMember.type != ProtoCrewMember.KerbalType.Tourist) 82 | { 83 | activeKerbal = thatKerbal; 84 | if (intAnim != null) 85 | { 86 | intAnim.enabled = true; 87 | intAnim[internalAnimation].speed = 1; 88 | intAnim.Play(); 89 | intAnimStarted = true; 90 | } 91 | else 92 | { 93 | GoEva(); 94 | } 95 | JUtil.LogMessage(this, "{0} has opened the internal EVA hatch.", thatKerbal.name); 96 | } 97 | else 98 | { 99 | JUtil.LogMessage(this, "{0}, a tourist, tried to open the EVA hatch.", thatKerbal.name); 100 | } 101 | } 102 | else 103 | { 104 | if (evaPossible) 105 | { 106 | JUtil.LogMessage(this, "Could not open the internal EVA hatch, not sure why."); 107 | } 108 | else 109 | { 110 | JUtil.LogMessage(this, "EVA hatches can not be opened - is the astronaut complex upgraded yet?"); 111 | } 112 | } 113 | } 114 | } 115 | } 116 | 117 | -------------------------------------------------------------------------------- /RasterPropMonitor/Auxiliary modules/JSIInternalFlagDecal.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace JSI 4 | { 5 | public class JSIInternalFlagDecal: InternalModule 6 | { 7 | [KSPField] 8 | public string transformName = string.Empty; 9 | [KSPField] 10 | public string textureLayer = "_MainTex"; 11 | 12 | public void Start() 13 | { 14 | Transform quad; 15 | quad = internalProp != null ? internalProp.FindModelTransform(transformName) : internalModel.FindModelTransform(transformName); 16 | Renderer mat = quad.GetComponent(); 17 | mat.material.SetTexture(textureLayer, GameDatabase.Instance.GetTexture(part.flagURL, false)); 18 | Destroy(this); 19 | } 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /RasterPropMonitor/Auxiliary modules/JSINavBall.cs: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * RasterPropMonitor 3 | * ================= 4 | * Plugin for Kerbal Space Program 5 | * 6 | * by Mihara (Eugene Medvedev), MOARdV, and other contributors 7 | * 8 | * RasterPropMonitor is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, revision 11 | * date 29 June 2007, or (at your option) any later version. 12 | * 13 | * RasterPropMonitor is distributed in the hope that it will be useful, but 14 | * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 15 | * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 16 | * for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with RasterPropMonitor. If not, see . 20 | ****************************************************************************/ 21 | using System; 22 | using UnityEngine; 23 | 24 | namespace JSI 25 | { 26 | class JSINavBall : InternalNavBall 27 | { 28 | /// 29 | /// Name of the enabling variable. Required. 30 | /// 31 | [KSPField] 32 | public string variableName = string.Empty; 33 | 34 | /// 35 | /// vec2 containing the 'enabled' range. May be numeric or varibles. Required. 36 | /// 37 | [KSPField] 38 | public string range = string.Empty; 39 | 40 | /// 41 | /// Maximum angle that the navball can change per second, in degrees. Defaults to 180. 42 | /// 43 | [KSPField] 44 | public float maxAngleChange = 180.0f; 45 | 46 | private VariableOrNumberRange enablingVariable; 47 | private RasterPropMonitorComputer rpmComp; 48 | 49 | private Quaternion lastOrientation; 50 | 51 | public void Start() 52 | { 53 | if (HighLogic.LoadedSceneIsEditor) 54 | { 55 | return; 56 | } 57 | 58 | rpmComp = RasterPropMonitorComputer.Instantiate(internalProp, true); 59 | 60 | lastOrientation = navBall.rotation; 61 | 62 | if (string.IsNullOrEmpty(variableName) || string.IsNullOrEmpty(range)) 63 | { 64 | JUtil.LogErrorMessage(this, "variableName or range was null!"); 65 | return; 66 | } 67 | string[] tokens = range.Split(','); 68 | if (tokens.Length != 2) 69 | { 70 | JUtil.LogErrorMessage(this, "range '{0}' did not have exactly two values!", range); 71 | return; 72 | } 73 | 74 | enablingVariable = new VariableOrNumberRange(rpmComp, variableName, tokens[0], tokens[1]); 75 | } 76 | 77 | public override void OnUpdate() 78 | { 79 | if (enablingVariable == null) 80 | { 81 | return; 82 | } 83 | 84 | if (enablingVariable.IsInRange()) 85 | { 86 | base.OnUpdate(); 87 | Quaternion post = navBall.rotation; 88 | float deltaAngle = Quaternion.Angle(lastOrientation, post); 89 | float maxAngle = maxAngleChange * Time.deltaTime; 90 | 91 | // If the rotation angle exceeds what we can do, slow it down 92 | if (deltaAngle > maxAngle) 93 | { 94 | Quaternion newRotation = Quaternion.Slerp(lastOrientation, post, maxAngle / deltaAngle); 95 | lastOrientation = newRotation; 96 | navBall.rotation = newRotation; 97 | } 98 | else 99 | { 100 | lastOrientation = post; 101 | } 102 | } 103 | } 104 | } 105 | } 106 | -------------------------------------------------------------------------------- /RasterPropMonitor/Auxiliary modules/JSIPropIDFinder.cs: -------------------------------------------------------------------------------- 1 | 2 | namespace JSI 3 | { 4 | public class JSIPropIDFinder: InternalModule 5 | { 6 | public void Start() 7 | { 8 | JUtil.LogMessage(this, "I am in prop named {0} and it has prop ID {1}", internalProp.name, internalProp.propID); 9 | // And just in case the user forgets. 10 | Destroy(this); 11 | } 12 | } 13 | } 14 | 15 | -------------------------------------------------------------------------------- /RasterPropMonitor/Auxiliary modules/JSIPropTextureShift.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | namespace JSI 5 | { 6 | public class JSIPropTextureShift : InternalModule 7 | { 8 | [KSPField] 9 | public string transformToShift = ""; 10 | [KSPField] 11 | public string layerToShift = "_MainTex"; 12 | [KSPField] 13 | public float x; 14 | [KSPField] 15 | public float y; 16 | 17 | public void Start() 18 | { 19 | var shiftval = new Vector2(x, y); 20 | 21 | try 22 | { 23 | Transform xform = internalProp.FindModelTransform(transformToShift); 24 | // MOARdV TODO: Accessing and changing .material causes it to 25 | // become a copy, according to Unity. Must destroy it. Which 26 | // means this method can't self-destruct; it must use OnDestroy. 27 | Material shifted = xform.GetComponent().material; 28 | foreach (string layer in layerToShift.Split()) 29 | { 30 | shifted.SetTextureOffset(layer.Trim(), shiftval + shifted.GetTextureOffset(layer.Trim())); 31 | } 32 | } 33 | catch (Exception) 34 | { 35 | JUtil.LogErrorMessage(this, "Exception configuring prop {1} (#{2}) with transform {0}. Check its configuration.", transformToShift, internalProp.propName, internalProp.propID); 36 | } 37 | Destroy(this); 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /RasterPropMonitor/Auxiliary modules/JSISelectivelyVisibleProp.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace JSI 4 | { 5 | public class JSISelectivelyVisibleProp: InternalModule 6 | { 7 | [KSPField] 8 | public string visibleFromSeats = string.Empty; 9 | 10 | private readonly List seatNumbers = new List(); 11 | 12 | public void Start() 13 | { 14 | foreach (string seatNumberString in visibleFromSeats.Split(',')) { 15 | int result; 16 | if (int.TryParse(seatNumberString.Trim(), out result) && result >= 0) { 17 | JUtil.LogMessage(this, "Running in prop '{2}' with ID {1}, will be visible from seat {0}", result, internalProp.propID, internalProp.name); 18 | seatNumbers.Add(result); 19 | } 20 | JUtil.HideShowProp(internalProp, false); 21 | } 22 | } 23 | 24 | public override void OnUpdate() 25 | { 26 | if (JUtil.UserIsInPod(part)) { 27 | JUtil.HideShowProp(internalProp,seatNumbers.Contains(part.CurrentActiveSeat())); 28 | } 29 | } 30 | } 31 | } 32 | 33 | -------------------------------------------------------------------------------- /RasterPropMonitor/Auxiliary modules/JSIThrustReverser.cs: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * RasterPropMonitor 3 | * ================= 4 | * Plugin for Kerbal Space Program 5 | * 6 | * by Mihara (Eugene Medvedev), MOARdV, and other contributors 7 | * 8 | * RasterPropMonitor is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, revision 11 | * date 29 June 2007, or (at your option) any later version. 12 | * 13 | * RasterPropMonitor is distributed in the hope that it will be useful, but 14 | * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 15 | * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 16 | * for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with RasterPropMonitor. If not, see . 20 | ****************************************************************************/ 21 | using System; 22 | using UnityEngine; 23 | 24 | namespace JSI 25 | { 26 | /// 27 | /// The JSIThrustReverser is intended to be added to an engine that contains 28 | /// a thrust reverser animation in its ModuleAnimateGeneric. It is based 29 | /// on the assumption that only a single ModuleAnimateGeneric is found on 30 | /// the part. It does *not* look for an engine, as well, so it could be 31 | /// attached to other animated parts such that those parts trigger with the 32 | /// RPM thrust reverser trigger. 33 | /// 34 | public class JSIThrustReverser : PartModule 35 | { 36 | internal ModuleAnimateGeneric thrustReverser; 37 | 38 | /// 39 | /// Startup - look for the first ModuleAnimateGeneric. Keep a 40 | /// reference to it. 41 | /// 42 | public void Start() 43 | { 44 | if (HighLogic.LoadedSceneIsFlight) 45 | { 46 | foreach (var module in part.Modules) 47 | { 48 | if (module is ModuleAnimateGeneric) 49 | { 50 | thrustReverser = module as ModuleAnimateGeneric; 51 | JUtil.LogMessage(this, "Found my thrust reverser"); 52 | break; 53 | } 54 | } 55 | 56 | if (thrustReverser == null) 57 | { 58 | isEnabled = false; 59 | } 60 | } 61 | } 62 | 63 | /// 64 | /// Tear down - null our reference to thrustReverser. 65 | /// 66 | public void OnDestroy() 67 | { 68 | thrustReverser = null; 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /RasterPropMonitor/Core/AeroExtensions.cs: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * RasterPropMonitor 3 | * ================= 4 | * Plugin for Kerbal Space Program 5 | * 6 | * by Mihara (Eugene Medvedev), MOARdV, and other contributors 7 | * 8 | * RasterPropMonitor is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, revision 11 | * date 29 June 2007, or (at your option) any later version. 12 | * 13 | * RasterPropMonitor is distributed in the hope that it will be useful, but 14 | * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 15 | * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 16 | * for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with RasterPropMonitor. If not, see . 20 | ****************************************************************************/ 21 | /* 22 | Ferram Aerospace Research v0.15.3.1 "Garabedian" 23 | ========================= 24 | Aerodynamics model for Kerbal Space Program 25 | 26 | Copyright 2015, Michael Ferrara, aka Ferram4 27 | 28 | This file is part of Ferram Aerospace Research. 29 | 30 | Ferram Aerospace Research is free software: you can redistribute it and/or modify 31 | it under the terms of the GNU General Public License as published by 32 | the Free Software Foundation, either version 3 of the License, or 33 | (at your option) any later version. 34 | 35 | Ferram Aerospace Research is distributed in the hope that it will be useful, 36 | but WITHOUT ANY WARRANTY; without even the implied warranty of 37 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 38 | GNU General Public License for more details. 39 | 40 | You should have received a copy of the GNU General Public License 41 | along with Ferram Aerospace Research. If not, see . 42 | 43 | Serious thanks: a.g., for tons of bugfixes and code-refactorings 44 | stupid_chris, for the RealChuteLite implementation 45 | Taverius, for correcting a ton of incorrect values 46 | Tetryds, for finding lots of bugs and issues and not letting me get away with them, and work on example crafts 47 | sarbian, for refactoring code for working with MechJeb, and the Module Manager updates 48 | ialdabaoth (who is awesome), who originally created Module Manager 49 | Regex, for adding RPM support 50 | DaMichel, for some ferramGraph updates and some control surface-related features 51 | Duxwing, for copy editing the readme 52 | 53 | CompatibilityChecker by Majiir, BSD 2-clause http://opensource.org/licenses/BSD-2-Clause 54 | 55 | Part.cfg changes powered by sarbian & ialdabaoth's ModuleManager plugin; used with permission 56 | http://forum.kerbalspaceprogram.com/threads/55219 57 | 58 | ModularFLightIntegrator by Sarbian, Starwaster and Ferram4, MIT: http://opensource.org/licenses/MIT 59 | http://forum.kerbalspaceprogram.com/threads/118088 60 | 61 | Toolbar integration powered by blizzy78's Toolbar plugin; used with permission 62 | http://forum.kerbalspaceprogram.com/threads/60863 63 | */ 64 | 65 | using System; 66 | 67 | namespace JSI 68 | { 69 | // Imported from FerramAerospaceResearch FARAeroUtil.cs versions 0.15.3.1 and later 70 | public static class AeroExtensions 71 | { 72 | //Based on ratio of density of water to density of air at SL 73 | //private const double UNDERWATER_DENSITY_FACTOR_MINUS_ONE = 814.51020408163265306122448979592; 74 | 75 | // Updated method from FAR v0.15.5.4 76 | public static double GetCurrentDensity(Vessel v) 77 | { 78 | double density = 0.0d; 79 | int counter = 0; 80 | for (int i = 0; i < v.parts.Count; i++) 81 | { 82 | if (v.parts[i].physicalSignificance != Part.PhysicalSignificance.NONE) 83 | { 84 | density += v.parts[i].dynamicPressurekPa * (1.0 - v.parts[i].submergedPortion); 85 | density += v.parts[i].submergedDynamicPressurekPa * v.parts[i].submergedPortion; 86 | ++counter; 87 | } 88 | } 89 | 90 | if (counter > 0) 91 | { 92 | density /= (double)counter; 93 | } 94 | density *= 2000.0; //need answers in Pa, not kPa 95 | density /= (v.srfSpeed * v.srfSpeed); 96 | 97 | return density; 98 | } 99 | 100 | public static double StagnationPressureCalc(CelestialBody body, double M) 101 | { 102 | double gamma = body.atmosphereAdiabaticIndex; 103 | 104 | double ratio; 105 | ratio = M * M; 106 | ratio *= (gamma - 1.0); 107 | ratio *= 0.5; 108 | ratio++; 109 | 110 | ratio = Math.Pow(ratio, gamma / (gamma - 1.0)); 111 | return ratio; 112 | } 113 | } 114 | } 115 | -------------------------------------------------------------------------------- /RasterPropMonitor/Core/CelestialBodyExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | namespace JSI 5 | { 6 | // This class was imported wholesale from MechJeb. 7 | public static class CelestialBodyExtensions 8 | { 9 | public static double TerrainAltitude(this CelestialBody body, Vector3d worldPosition) 10 | { 11 | return body.TerrainAltitude(body.GetLatitude(worldPosition), body.GetLongitude(worldPosition)); 12 | } 13 | 14 | 15 | //CelestialBody.maxAtmosphereAltitude doesn't actually give the upper edge of 16 | //the atmosphere. Use this function instead. 17 | public static double RealMaxAtmosphereAltitude(this CelestialBody body) 18 | { 19 | //#warning check if atmosphereDepth = 0 when !body.atmosphere and remove the whole ext 20 | if (!body.atmosphere) 21 | return 0; 22 | return body.atmosphereDepth; 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /RasterPropMonitor/Core/MappedVariable.cs: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * RasterPropMonitor 3 | * ================= 4 | * Plugin for Kerbal Space Program 5 | * 6 | * by Mihara (Eugene Medvedev), MOARdV, and other contributors 7 | * 8 | * RasterPropMonitor is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, revision 11 | * date 29 June 2007, or (at your option) any later version. 12 | * 13 | * RasterPropMonitor is distributed in the hope that it will be useful, but 14 | * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 15 | * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 16 | * for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with RasterPropMonitor. If not, see . 20 | ****************************************************************************/ 21 | using System; 22 | using UnityEngine; 23 | 24 | namespace JSI 25 | { 26 | class MappedVariable : IComplexVariable 27 | { 28 | private readonly VariableOrNumberRange sourceVariable; 29 | public readonly string mappedVariable; 30 | private readonly VariableOrNumber mappedExtent1, mappedExtent2; 31 | 32 | public MappedVariable(ConfigNode node, RasterPropMonitorComputer rpmComp) 33 | { 34 | if (!node.HasValue("mappedVariable") || !node.HasValue("mappedRange") || !node.HasValue("sourceVariable") || !node.HasValue("sourceRange")) 35 | { 36 | throw new ArgumentException("MappedVariable missing required values"); 37 | } 38 | 39 | string sourceVariableStr = node.GetValue("sourceVariable"); 40 | string sourceRange = node.GetValue("sourceRange"); 41 | string[] sources = sourceRange.Split(','); 42 | if (sources.Length != 2) 43 | { 44 | throw new ArgumentException("MappedVariable sourceRange does not have exactly two values"); 45 | } 46 | 47 | sourceVariable = new VariableOrNumberRange(rpmComp, sourceVariableStr, sources[0], sources[1]); 48 | 49 | mappedVariable = node.GetValue("mappedVariable"); 50 | string[] destinations = node.GetValue("mappedRange").Split(','); 51 | if (destinations.Length != 2) 52 | { 53 | throw new ArgumentException("MappedVariable mappedRange does not have exactly two values"); 54 | } 55 | mappedExtent1 = rpmComp.InstantiateVariableOrNumber(destinations[0]); 56 | mappedExtent2 = rpmComp.InstantiateVariableOrNumber(destinations[1]); 57 | } 58 | 59 | public object Evaluate() 60 | { 61 | float lerp = sourceVariable.InverseLerp(); 62 | float extent1 = mappedExtent1.AsFloat(); 63 | float extent2 = mappedExtent2.AsFloat(); 64 | 65 | return Mathf.Lerp(extent1, extent2, lerp); 66 | } 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /RasterPropMonitor/Core/MathExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | namespace JSI 5 | { 6 | // This entire class is imported wholesale from MechJeb. 7 | public static class MathExtensions 8 | { 9 | public static Vector3d Sign(this Vector3d vector) 10 | { 11 | return new Vector3d(Math.Sign(vector.x), Math.Sign(vector.y), Math.Sign(vector.z)); 12 | } 13 | 14 | /*public static Vector3d Reorder(this Vector3d vector, int order) 15 | { 16 | switch (order) { 17 | case 123: 18 | return new Vector3d(vector.x, vector.y, vector.z); 19 | case 132: 20 | return new Vector3d(vector.x, vector.z, vector.y); 21 | case 213: 22 | return new Vector3d(vector.y, vector.x, vector.z); 23 | case 231: 24 | return new Vector3d(vector.y, vector.z, vector.x); 25 | case 312: 26 | return new Vector3d(vector.z, vector.x, vector.y); 27 | case 321: 28 | return new Vector3d(vector.z, vector.y, vector.x); 29 | } 30 | throw new ArgumentException("Invalid order", "order"); 31 | }*/ 32 | 33 | public static Vector3d Invert(this Vector3d vector) 34 | { 35 | return new Vector3d(1 / vector.x, 1 / vector.y, 1 / vector.z); 36 | } 37 | 38 | public static Vector3 ProjectIntoPlane(this Vector3 vector, Vector3 planeNormal) 39 | { 40 | return vector - Vector3.Project(vector, planeNormal); 41 | } 42 | 43 | public static float AngleInPlane(this Vector3 vector, Vector3 planeNormal, Vector3 other) 44 | { 45 | Vector3 v1 = vector.ProjectIntoPlane(planeNormal); 46 | Vector3 v2 = other.ProjectIntoPlane(planeNormal); 47 | 48 | 49 | // Analysis disable CompareOfFloatsByEqualityOperator 50 | if ((v1.magnitude == 0) || (v2.magnitude == 0)) 51 | { // Analysis restore CompareOfFloatsByEqualityOperator 52 | return float.NaN; 53 | } 54 | 55 | v1.Normalize(); 56 | v2.Normalize(); 57 | 58 | Quaternion rot = Quaternion.FromToRotation(planeNormal, new Vector3(0, 0, 1)); 59 | 60 | Vector3 r1 = rot * v1; 61 | Vector3 r2 = rot * v2; 62 | 63 | return (float)((Math.Atan2(r1.y, r1.x) - Math.Atan2(r2.y, r2.x)) * 180.0 / Math.PI); 64 | } 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /RasterPropMonitor/Core/RPMCPersistence.cs: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * RasterPropMonitor 3 | * ================= 4 | * Plugin for Kerbal Space Program 5 | * 6 | * by Mihara (Eugene Medvedev), MOARdV, and other contributors 7 | * 8 | * RasterPropMonitor is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, revision 11 | * date 29 June 2007, or (at your option) any later version. 12 | * 13 | * RasterPropMonitor is distributed in the hope that it will be useful, but 14 | * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 15 | * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 16 | * for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with RasterPropMonitor. If not, see . 20 | ****************************************************************************/ 21 | using System; 22 | using System.Collections.Generic; 23 | using UnityEngine; 24 | 25 | namespace JSI 26 | { 27 | public partial class RasterPropMonitorComputer : PartModule 28 | { 29 | /// 30 | /// Per-pod persistence. This code was devolved from RPMVC due to 31 | /// difficulties handling docking and undocking. 32 | /// 33 | internal Dictionary persistentVars = new Dictionary(); 34 | 35 | /// 36 | /// Returns the named persistent value, or the default provided if 37 | /// it's not set. The persistent value is initialized to the default 38 | /// if the default is used. If 'broadcast' is set, other RPMC on the 39 | /// same vessel are queried, as well. 40 | /// 41 | /// Name of the persistent 42 | /// The default value 43 | /// Broadcast the request to other parts of the same craft? 44 | /// 45 | internal object GetPersistentVariable(string name, object defaultValue, bool broadcast) 46 | { 47 | object val; 48 | if (persistentVars.ContainsKey(name)) 49 | { 50 | val = persistentVars[name]; 51 | } 52 | else if (broadcast) 53 | { 54 | RPMVesselComputer comp = RPMVesselComputer.Instance(vessel); 55 | val = comp.GetPersistentVariable(name, defaultValue); 56 | persistentVars[name] = val; 57 | } 58 | else 59 | { 60 | val = defaultValue; 61 | persistentVars[name] = defaultValue; 62 | } 63 | 64 | return val; 65 | } 66 | 67 | /// 68 | /// Return the persistent variable, pre-treated as a boolean. 69 | /// 70 | /// 71 | /// 72 | /// Broadcast the request to other parts of the same craft? 73 | /// 74 | internal bool GetPersistentVariable(string name, bool defaultValue, bool broadcast) 75 | { 76 | object val; 77 | if (persistentVars.ContainsKey(name)) 78 | { 79 | val = persistentVars[name]; 80 | } 81 | else if (broadcast) 82 | { 83 | RPMVesselComputer comp = RPMVesselComputer.Instance(vessel); 84 | val = comp.GetPersistentVariable(name, defaultValue); 85 | if (val.GetType() == typeof(System.Boolean)) 86 | { 87 | persistentVars[name] = val; 88 | } 89 | } 90 | else 91 | { 92 | val = defaultValue; 93 | persistentVars[name] = defaultValue; 94 | } 95 | 96 | return (val.GetType() == typeof(System.Boolean)) ? (bool)val : false; 97 | } 98 | 99 | 100 | /// 101 | /// Indicates whether the named persistent variable is present in the 102 | /// dictionary. 103 | /// 104 | /// 105 | /// Broadcast the request to other parts of the same craft? 106 | /// 107 | internal bool HasPersistentVariable(string name, bool broadcast) 108 | { 109 | if(persistentVars.ContainsKey(name)) 110 | { 111 | return true; 112 | } 113 | else if(broadcast) 114 | { 115 | RPMVesselComputer comp = RPMVesselComputer.Instance(vessel); 116 | return comp.HasPersistentVariable(name); 117 | } 118 | else 119 | { 120 | return false; 121 | } 122 | } 123 | 124 | /// 125 | /// Set the named persistent variable to the value provided. 126 | /// 127 | /// 128 | /// 129 | /// Broadcast the request to other parts of the same craft? 130 | internal void SetPersistentVariable(string name, object value, bool broadcast) 131 | { 132 | if (name.Trim().Length == 0) 133 | { 134 | JUtil.LogErrorMessage(this, "Trying to set an empty variable name!"); 135 | return; 136 | } 137 | persistentVars[name] = value; 138 | 139 | if(broadcast) 140 | { 141 | RPMVesselComputer comp = RPMVesselComputer.Instance(vessel); 142 | comp.SetPersistentVariable(name, value); 143 | } 144 | } 145 | } 146 | } 147 | -------------------------------------------------------------------------------- /RasterPropMonitor/Core/RPMGlobals.cs: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * RasterPropMonitor 3 | * ================= 4 | * Plugin for Kerbal Space Program 5 | * 6 | * by Mihara (Eugene Medvedev), MOARdV, and other contributors 7 | * 8 | * RasterPropMonitor is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, revision 11 | * date 29 June 2007, or (at your option) any later version. 12 | * 13 | * RasterPropMonitor is distributed in the hope that it will be useful, but 14 | * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 15 | * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 16 | * for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with RasterPropMonitor. If not, see . 20 | ****************************************************************************/ 21 | using System; 22 | using System.Collections.Generic; 23 | 24 | namespace JSI 25 | { 26 | /// 27 | /// The RPMGlobals class contains various statically-defined global values. 28 | /// These are generally loaded in by the RPMShaderLoader class in the main 29 | /// menu. 30 | /// 31 | internal static class RPMGlobals 32 | { 33 | internal static readonly string configFileName = "GameData/JSI/RasterPropMonitor/Plugins/PluginData/rpm-config.cfg"; 34 | internal const float KelvinToCelsius = -273.15f; 35 | internal const float MetersToFeet = 3.2808399f; 36 | internal const float MetersPerSecondToKnots = 1.94384449f; 37 | internal const float MetersPerSecondToFeetPerMinute = 196.850394f; 38 | internal const float gee = 9.81f; 39 | internal static readonly double upperAtmosphereLimit = Math.Log(100000.0); 40 | 41 | /// 42 | /// Should JUtil.LogMessage write to the log? 43 | /// 44 | internal static bool debugLoggingEnabled = false; 45 | 46 | /// 47 | /// Should we show the variable call count profiling info? 48 | /// 49 | internal static bool debugShowVariableCallCount = false; 50 | 51 | internal static bool useNewVariableAnimator = false; 52 | 53 | /// 54 | /// What is the minimum setting we want to allow for our variable 55 | /// refresh? 56 | /// 57 | internal static int minimumRefreshRate = 1; 58 | 59 | /// 60 | /// What should the initial refresh rate be? 61 | /// 62 | internal static int defaultRefreshRate = 10; 63 | 64 | internal static List debugShowOnly = new List(); 65 | 66 | internal static Dictionary customVariables = new Dictionary(); 67 | internal static List knownLoadedAssemblies = new List(); 68 | internal static SortedDictionary systemNamedResources = new SortedDictionary(); 69 | internal static List triggeredEvents = new List(); 70 | 71 | /// List of parts where all PartModule should be ignored. 72 | internal static List ignoreAllPartModules = new List(); 73 | /// List of parts where some PartModules should be ignored. Part names are the Key, list of module names is the Value. 74 | internal static Dictionary> ignorePartModules = new Dictionary>(); 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /RasterPropMonitor/Core/SelectVariable.cs: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * RasterPropMonitor 3 | * ================= 4 | * Plugin for Kerbal Space Program 5 | * 6 | * by Mihara (Eugene Medvedev), MOARdV, and other contributors 7 | * 8 | * RasterPropMonitor is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, revision 11 | * date 29 June 2007, or (at your option) any later version. 12 | * 13 | * RasterPropMonitor is distributed in the hope that it will be useful, but 14 | * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 15 | * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 16 | * for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with RasterPropMonitor. If not, see . 20 | ****************************************************************************/ 21 | using System; 22 | using System.Collections.Generic; 23 | using System.Text; 24 | 25 | namespace JSI 26 | { 27 | // A SelectVariable defines a user-defined variable that consists of one or 28 | // more RPM variables. Separate variables and ranges determine which result 29 | // is returned when the Select variable is chosen. 30 | class SelectVariable : IComplexVariable 31 | { 32 | public readonly string name; 33 | 34 | private List sourceVariables = new List(); 35 | private List reverse = new List(); 36 | private List result = new List(); 37 | 38 | internal SelectVariable(ConfigNode node, RasterPropMonitorComputer rpmComp) 39 | { 40 | name = node.GetValue("name"); 41 | 42 | foreach (ConfigNode sourceVarNode in node.GetNodes("VARIABLE_DEFINITION")) 43 | { 44 | bool reverseVal; 45 | VariableOrNumberRange vonr = ProcessSourceNode(sourceVarNode, rpmComp, out reverseVal); 46 | 47 | sourceVariables.Add(vonr); 48 | reverse.Add(reverseVal); 49 | 50 | VariableOrNumber val = rpmComp.InstantiateVariableOrNumber(sourceVarNode.GetValue("value")); 51 | result.Add(val); 52 | } 53 | 54 | if (node.HasValue("defaultValue")) 55 | { 56 | VariableOrNumber val = rpmComp.InstantiateVariableOrNumber(node.GetValue("defaultValue")); 57 | result.Add(val); 58 | } 59 | else 60 | { 61 | throw new Exception(string.Format("Select variable {0} is missing its defaultValue", name)); 62 | } 63 | 64 | if (sourceVariables.Count == 0) 65 | { 66 | throw new ArgumentException("Did not find any VARIABLE_DEFINITION nodes in RPM_SELECT_VARIABLE", name); 67 | } 68 | 69 | } 70 | 71 | public object Evaluate() 72 | { 73 | int i = 0; 74 | for (; i < sourceVariables.Count; ++i) 75 | { 76 | if (sourceVariables[i].IsInRange() ^ reverse[i]) 77 | { 78 | break; 79 | } 80 | } 81 | 82 | return result[i].Get(); 83 | } 84 | 85 | private static VariableOrNumberRange ProcessSourceNode(ConfigNode node, RasterPropMonitorComputer rpmComp, out bool reverse) 86 | { 87 | VariableOrNumberRange range; 88 | if (node.HasValue("range")) 89 | { 90 | string[] tokens = { }; 91 | tokens = node.GetValue("range").Split(','); 92 | if (tokens.Length != 2) 93 | { 94 | throw new ArgumentException("Found an unparseable value reading custom SOURCE_VARIABLE range"); 95 | } 96 | range = new VariableOrNumberRange(rpmComp, node.GetValue("name").Trim(), tokens[0].Trim(), tokens[1].Trim()); 97 | } 98 | else 99 | { 100 | range = new VariableOrNumberRange(rpmComp, node.GetValue("name").Trim(), float.MinValue.ToString(), float.MaxValue.ToString()); 101 | } 102 | 103 | if (node.HasValue("reverse")) 104 | { 105 | if (!bool.TryParse(node.GetValue("reverse"), out reverse)) 106 | { 107 | throw new ArgumentException("So is 'reverse' true or false?"); 108 | } 109 | } 110 | else 111 | { 112 | reverse = false; 113 | } 114 | 115 | return range; 116 | } 117 | } 118 | } 119 | -------------------------------------------------------------------------------- /RasterPropMonitor/Core/StringProcessor.cs: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * RasterPropMonitor 3 | * ================= 4 | * Plugin for Kerbal Space Program 5 | * 6 | * by Mihara (Eugene Medvedev), MOARdV, and other contributors 7 | * 8 | * RasterPropMonitor is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, revision 11 | * date 29 June 2007, or (at your option) any later version. 12 | * 13 | * RasterPropMonitor is distributed in the hope that it will be useful, but 14 | * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 15 | * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 16 | * for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with RasterPropMonitor. If not, see . 20 | ****************************************************************************/ 21 | using System; 22 | 23 | namespace JSI 24 | { 25 | public class StringProcessorFormatter 26 | { 27 | // The formatString or plain text (if usesComp is false). 28 | public readonly string formatString; 29 | // An array of source variables 30 | public readonly VariableOrNumber[] sourceVariables; 31 | // An array holding evaluants 32 | public readonly object[] sourceValues; 33 | 34 | // Indicates that the SPF uses RPMVesselComputer to process variables 35 | public readonly bool usesComp; 36 | 37 | // TODO: Add support for multi-line processed support. 38 | public StringProcessorFormatter(string input, RasterPropMonitorComputer rpmComp) 39 | { 40 | if(string.IsNullOrEmpty(input)) 41 | { 42 | formatString = ""; 43 | usesComp = false; 44 | } 45 | else if (input.IndexOf(JUtil.VariableListSeparator[0], StringComparison.Ordinal) >= 0) 46 | { 47 | string[] tokens = input.Split(JUtil.VariableListSeparator, StringSplitOptions.RemoveEmptyEntries); 48 | if (tokens.Length != 2) 49 | { 50 | throw new ArgumentException(string.Format("Invalid format string: {0}", input)); 51 | } 52 | else 53 | { 54 | string[] sourceVarStrings = tokens[1].Split(JUtil.VariableSeparator, StringSplitOptions.RemoveEmptyEntries); 55 | sourceVariables = new VariableOrNumber[sourceVarStrings.Length]; 56 | for (int i = 0; i < sourceVarStrings.Length; ++i ) 57 | { 58 | sourceVariables[i] = rpmComp.InstantiateVariableOrNumber(sourceVarStrings[i]); 59 | } 60 | sourceValues = new object[sourceVariables.Length]; 61 | formatString = tokens[0].TrimEnd(); 62 | 63 | usesComp = true; 64 | } 65 | } 66 | else 67 | { 68 | formatString = input.TrimEnd(); 69 | usesComp = false; 70 | } 71 | } 72 | } 73 | 74 | public static class StringProcessor 75 | { 76 | private static readonly SIFormatProvider fp = new SIFormatProvider(); 77 | 78 | public static string ProcessString(StringProcessorFormatter formatter, RasterPropMonitorComputer rpmComp) 79 | { 80 | if (formatter.usesComp) 81 | { 82 | try 83 | { 84 | RPMVesselComputer comp = RPMVesselComputer.Instance(rpmComp.vessel); 85 | for (int i = 0; i < formatter.sourceVariables.Length; ++i) 86 | { 87 | formatter.sourceValues[i] = formatter.sourceVariables[i].Get(); 88 | } 89 | 90 | return string.Format(fp, formatter.formatString, formatter.sourceValues); 91 | } 92 | catch(Exception e) 93 | { 94 | JUtil.LogErrorMessage(formatter, "Exception trapped in ProcessString for {1}: {0}", e, formatter.formatString); 95 | } 96 | } 97 | 98 | return formatter.formatString; 99 | } 100 | 101 | public static string ProcessString(string input, RasterPropMonitorComputer rpmComp) 102 | { 103 | try 104 | { 105 | if (input.IndexOf(JUtil.VariableListSeparator[0], StringComparison.Ordinal) >= 0) 106 | { 107 | string[] tokens = input.Split(JUtil.VariableListSeparator, StringSplitOptions.RemoveEmptyEntries); 108 | if (tokens.Length != 2) 109 | { 110 | return "FORMAT ERROR"; 111 | } 112 | else 113 | { 114 | RPMVesselComputer comp = RPMVesselComputer.Instance(rpmComp.vessel); 115 | string[] vars = tokens[1].Split(JUtil.VariableSeparator, StringSplitOptions.RemoveEmptyEntries); 116 | 117 | var variables = new object[vars.Length]; 118 | for (int i = 0; i < vars.Length; i++) 119 | { 120 | variables[i] = rpmComp.ProcessVariable(vars[i].Trim(), comp); 121 | } 122 | string output = string.Format(fp, tokens[0], variables); 123 | return output.TrimEnd(); 124 | } 125 | } 126 | 127 | } 128 | catch (Exception e) 129 | { 130 | JUtil.LogErrorMessage(rpmComp, "Bad format on string {0}: {1}", input, e); 131 | } 132 | 133 | return input.TrimEnd(); 134 | } 135 | } 136 | } 137 | -------------------------------------------------------------------------------- /RasterPropMonitor/Core/TextMenu.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using UnityEngine; 5 | 6 | namespace JSI 7 | { 8 | public class TextMenu : List 9 | { 10 | public int currentSelection; 11 | public string labelColor = JUtil.ColorToColorTag(Color.white); 12 | public string rightTextColor = JUtil.ColorToColorTag(Color.cyan); 13 | public string selectedColor = JUtil.ColorToColorTag(Color.green); 14 | public string disabledColor = JUtil.ColorToColorTag(Color.gray); 15 | public string menuTitle = string.Empty; 16 | public int rightColumnWidth; 17 | 18 | public string ShowMenu(int width, int height) 19 | { 20 | var menuString = new StringBuilder(); 21 | 22 | if (!string.IsNullOrEmpty(menuTitle)) 23 | { 24 | menuString.AppendLine(menuTitle); 25 | --height; 26 | } 27 | 28 | // figure out which entries are visible. 29 | int numEntries = Count; 30 | // Sanity check: clamp the current selection 31 | currentSelection = Math.Min(currentSelection, numEntries - 1); 32 | 33 | // Pick the half-way point of the list 34 | int midPoint = height >> 1; 35 | 36 | int firstPoint; 37 | if (midPoint > currentSelection) 38 | { 39 | // Menu entry is near the top of the list 40 | firstPoint = 0; 41 | } 42 | else if ((currentSelection + height - midPoint) >= numEntries) 43 | { 44 | // Menu entry is near the end of the list. Account for short 45 | // lists by clamping to zero. 46 | firstPoint = Math.Max(0, numEntries - height); 47 | } 48 | else 49 | { 50 | // Long list, current selection is not near the middle 51 | firstPoint = currentSelection - midPoint; 52 | } 53 | 54 | int endPoint = Math.Min(firstPoint + height, numEntries); 55 | // -2 to account for the first column ' ' or '> ' characters 56 | int textWidth = width - rightColumnWidth - 2; 57 | 58 | var textItem = new StringBuilder(); 59 | for (int index = firstPoint; index < endPoint; ++index) 60 | { 61 | // Clear the string builder 62 | int strLen = textItem.Length; 63 | textItem.Remove(0, strLen); 64 | 65 | // Add color strings 66 | textItem.Append(labelColor); 67 | if (index == currentSelection) 68 | { 69 | textItem.Append("> "); 70 | } 71 | else 72 | { 73 | textItem.Append(" "); 74 | } 75 | if (this[index].isDisabled) 76 | { 77 | textItem.Append(disabledColor); 78 | } 79 | else if (this[index].isSelected) 80 | { 81 | textItem.Append(selectedColor); 82 | } 83 | 84 | if (!string.IsNullOrEmpty(this[index].labelText)) 85 | { 86 | textItem.Append(this[index].labelText.PadRight(textWidth).Substring(0, textWidth)); 87 | 88 | // Only allow a 'right text' to be added if we already have text. 89 | if (!string.IsNullOrEmpty(this[index].rightText) && rightColumnWidth > 0) 90 | { 91 | if (!this[index].isDisabled && !this[index].isSelected) 92 | { 93 | textItem.Append(rightTextColor); 94 | } 95 | 96 | textItem.Append(this[index].rightText.PadLeft(rightColumnWidth).Substring(0, rightColumnWidth)); 97 | } 98 | } 99 | 100 | menuString.AppendLine(textItem.ToString()); 101 | } 102 | 103 | return menuString.ToString(); 104 | } 105 | 106 | public void NextItem() 107 | { 108 | currentSelection = Math.Min(currentSelection + 1, Count - 1); 109 | } 110 | 111 | public void PreviousItem() 112 | { 113 | currentSelection = Math.Max(currentSelection - 1, 0); 114 | } 115 | 116 | public void SelectItem() 117 | { 118 | // Do callback 119 | if (!this[currentSelection].isDisabled && this[currentSelection].action != null) 120 | { 121 | this[currentSelection].action(currentSelection, this[currentSelection]); 122 | } 123 | } 124 | 125 | public Item GetCurrentItem() 126 | { 127 | return this[currentSelection]; 128 | } 129 | 130 | public int GetCurrentIndex() 131 | { 132 | return currentSelection; 133 | } 134 | 135 | // Set the isSelected flag for the index menu item. If "exclusive" 136 | // is set, all other isSelected flags are cleared. 137 | public void SetSelected(int index, bool exclusive) 138 | { 139 | if (exclusive) 140 | { 141 | for (int i = 0; i < Count; ++i ) 142 | { 143 | this[i].isSelected = false; 144 | } 145 | } 146 | 147 | if (index >= 0 && index < Count) 148 | { 149 | this[index].isSelected = true; 150 | } 151 | } 152 | 153 | public class Item 154 | { 155 | public string labelText = string.Empty; 156 | public string rightText = string.Empty; 157 | public int id; 158 | public bool isDisabled; 159 | public bool isSelected; 160 | public Action action; 161 | // Mihara: This can be much more terse to use if there is a constructor with optional parameters. 162 | // Even if it's finicky about "" rather than string.Empty. 163 | public Item(string labelText = "", Action action = null, bool isSelected = false, string rightText = "", bool isDisabled = false) 164 | { 165 | this.labelText = labelText; 166 | this.rightText = rightText; 167 | this.action = action; 168 | this.isDisabled = isDisabled; 169 | this.isSelected = isSelected; 170 | this.id = -1; 171 | } 172 | // Consolidated/simple constructor - set most things to their 173 | // defaults, and require three fields to be supplied. 174 | public Item(string labelText, Action action, int id) 175 | { 176 | this.labelText = labelText; 177 | this.rightText = ""; 178 | this.action = action; 179 | this.isDisabled = false; 180 | this.isSelected = false; 181 | this.id = id; 182 | } 183 | } 184 | } 185 | } 186 | -------------------------------------------------------------------------------- /RasterPropMonitor/Handlers/JSIChatterer.cs: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * RasterPropMonitor 3 | * ================= 4 | * Plugin for Kerbal Space Program 5 | * 6 | * by Mihara (Eugene Medvedev), MOARdV, and other contributors 7 | * 8 | * RasterPropMonitor is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, revision 11 | * date 29 June 2007, or (at your option) any later version. 12 | * 13 | * RasterPropMonitor is distributed in the hope that it will be useful, but 14 | * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 15 | * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 16 | * for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with RasterPropMonitor. If not, see . 20 | ****************************************************************************/ 21 | using System; 22 | using System.Linq; 23 | using System.Reflection; 24 | using UnityEngine; 25 | 26 | namespace JSI 27 | { 28 | public class JSIChatterer : IJSIModule 29 | { 30 | private static readonly Type chatterer_t; 31 | private static readonly DynamicFuncBool chattererTx; 32 | private static readonly DynamicFuncBool chattererRx; 33 | private static readonly DynamicAction chattererStartTalking; 34 | 35 | private static readonly bool chattererFound; 36 | 37 | private Guid lastVessel; 38 | private UnityEngine.Object chatterer; 39 | 40 | static JSIChatterer() 41 | { 42 | try 43 | { 44 | var loadedChattererAssy = AssemblyLoader.loadedAssemblies.FirstOrDefault(a => a.name == "Chatterer"); 45 | 46 | if (loadedChattererAssy == null) 47 | { 48 | chattererFound = false; 49 | 50 | return; 51 | } 52 | 53 | //--- Process all the reflection info 54 | // MechJebCore 55 | chatterer_t = loadedChattererAssy.assembly.GetExportedTypes() 56 | .SingleOrDefault(t => t.FullName == "Chatterer.chatterer"); 57 | if (chatterer_t == null) 58 | { 59 | JUtil.LogErrorMessage(null, "Did not find Chatterer.chatterer"); 60 | return; 61 | } 62 | 63 | MethodInfo txMethod = chatterer_t.GetMethod("VesselIsTransmitting", BindingFlags.Instance | BindingFlags.Public); 64 | if (txMethod == null) 65 | { 66 | throw new NotImplementedException("txMethod"); 67 | } 68 | chattererTx = DynamicMethodDelegateFactory.CreateFuncBool(txMethod); 69 | 70 | MethodInfo rxMethod = chatterer_t.GetMethod("VesselIsReceiving", BindingFlags.Instance | BindingFlags.Public); 71 | if (rxMethod == null) 72 | { 73 | throw new NotImplementedException("rxMethod"); 74 | } 75 | chattererRx = DynamicMethodDelegateFactory.CreateFuncBool(rxMethod); 76 | 77 | MethodInfo chatterMethod = chatterer_t.GetMethod("InitiateChatter", BindingFlags.Instance | BindingFlags.Public); 78 | if (chatterMethod == null) 79 | { 80 | throw new NotImplementedException("chatterMethod"); 81 | } 82 | chattererStartTalking = DynamicMethodDelegateFactory.CreateAction(chatterMethod); 83 | } 84 | catch (Exception e) 85 | { 86 | chatterer_t = null; 87 | JUtil.LogMessage(null, "Exception initializing JSIChatterer: {0}", e); 88 | } 89 | 90 | if (chatterer_t != null && chattererStartTalking != null) 91 | { 92 | chattererFound = true; 93 | } 94 | else 95 | { 96 | chattererFound = false; 97 | } 98 | } 99 | 100 | public JSIChatterer(Vessel myVessel) 101 | { 102 | vessel = myVessel; 103 | JUtil.LogMessage(this, "A supported version of Chatterer is {0}", (chattererFound) ? "present" : "not available"); 104 | lastVessel = Guid.Empty; 105 | } 106 | 107 | private void updateChatterer() 108 | { 109 | // Is this needed? 110 | if (lastVessel != vessel.id) 111 | { 112 | lastVessel = vessel.id; 113 | chatterer = UnityEngine.Object.FindObjectOfType(chatterer_t); 114 | } 115 | } 116 | 117 | public bool VesselXmit() 118 | { 119 | if (chattererFound) 120 | { 121 | updateChatterer(); 122 | return chattererTx(chatterer); 123 | } 124 | else 125 | { 126 | return false; 127 | } 128 | } 129 | 130 | public bool VesselRecv() 131 | { 132 | if (chattererFound) 133 | { 134 | updateChatterer(); 135 | return chattererRx(chatterer); 136 | } 137 | else 138 | { 139 | return false; 140 | } 141 | } 142 | 143 | public bool RadioIdle() 144 | { 145 | if (chattererFound) 146 | { 147 | updateChatterer(); 148 | return !(chattererRx(chatterer) || chattererTx(chatterer)); 149 | } 150 | else 151 | { 152 | return true; 153 | } 154 | } 155 | 156 | public void InitiateChatter(bool state) 157 | { 158 | if (chattererFound) 159 | { 160 | updateChatterer(); 161 | chattererStartTalking(chatterer); 162 | } 163 | } 164 | } 165 | } 166 | -------------------------------------------------------------------------------- /RasterPropMonitor/Handlers/JSIEngine.cs: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * RasterPropMonitor 3 | * ================= 4 | * Plugin for Kerbal Space Program 5 | * 6 | * by Mihara (Eugene Medvedev), MOARdV, and other contributors 7 | * 8 | * RasterPropMonitor is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, revision 11 | * date 29 June 2007, or (at your option) any later version. 12 | * 13 | * RasterPropMonitor is distributed in the hope that it will be useful, but 14 | * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 15 | * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 16 | * for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with RasterPropMonitor. If not, see . 20 | ****************************************************************************/ 21 | using System; 22 | using System.Collections.Generic; 23 | using System.Linq; 24 | using System.Text; 25 | #if ENABLE_ENGINE_MONITOR 26 | namespace JSI 27 | { 28 | public class JSIEngine:IJSIModule 29 | { 30 | public JSIEngine() 31 | { 32 | 33 | } 34 | 35 | public bool GetRunningPrimary() 36 | { 37 | // TODO: select which engine 38 | bool runningPrimary = true; 39 | foreach (JSIEngineMonitor mon in FindEngineMonitorIn(vessel)) 40 | { 41 | if(!mon.GetRunningPrimary()) 42 | { 43 | runningPrimary = false; 44 | break; 45 | } 46 | } 47 | 48 | return runningPrimary; 49 | } 50 | 51 | public void SetRunningPrimary(bool state) 52 | { 53 | foreach(JSIEngineMonitor mon in FindEngineMonitorIn(vessel)) 54 | { 55 | mon.SetRunningPrimary(state); 56 | } 57 | } 58 | 59 | private static IEnumerable FindEngineMonitorIn(Vessel vessel) 60 | { 61 | for (int i = 0; i < vessel.Parts.Count; ++i ) 62 | { 63 | for (int j = 0; j < vessel.Parts[i].Modules.Count; ++j ) 64 | { 65 | if (vessel.Parts[i].Modules[j] is JSIEngineMonitor) 66 | { 67 | yield return vessel.Parts[i].Modules[j] as JSIEngineMonitor; 68 | } 69 | } 70 | } 71 | } 72 | } 73 | } 74 | #endif 75 | -------------------------------------------------------------------------------- /RasterPropMonitor/Handlers/JSIFlightLog.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | // This is the recommended method to drive a PropMonitor from a foreign plugin, 4 | // because I'm using it myself and now I have to make sure it works. :) 5 | // This module is both a nice gimmick and an example. 6 | // 7 | // This method has the advantage of letting you make use of the variable processing and you don't 8 | // need to copy a page of boilerplate either -- instead, you just need an InternalModule 9 | // with a method that returns a string. That's it. 10 | // 11 | // RasterPropMonitor module can, beyond the usual types of page read from a text file, 12 | // and defined directly in the config file, request a page text from an InternalModule 13 | // living in the same prop as it does. To do this, configure the page like this: 14 | // 15 | // PAGE 16 | // { 17 | // PAGEHANDLER 18 | // { 19 | // name = Name of your module 20 | // method = Method name to be called in your module. 21 | // } 22 | // 23 | // Method name must exist in your module and must be a function that takes two int parameters 24 | // and returns a string. Any other parameters you include in the PAGEHANDLER block 25 | // will be passed to your InternalModule as KSPFields. 26 | // 27 | // RasterPropMonitor will load your module, attach it to the prop it lives in and 28 | // poll this function every time it decides the page needs to be refreshed. You need 29 | // to return a string, that will then be processed just like a page definition text file. 30 | // You will obviously want your own namespace. 31 | namespace JSI 32 | { 33 | // It needs to be an InternalModule. 34 | public class JSIFlightLog: InternalModule 35 | { 36 | // These KSPFields will actually be loaded from the PAGEHANDLER block 37 | [KSPField] 38 | public string pageTitle; 39 | // We can keep our response buffered and only return it upon request. 40 | private string response; 41 | // We only update the response when the number of lines in the flight log changes. 42 | private int lastCount = -1; 43 | // This method will be found by RasterPropMonitorGenerator and called to provide a page. 44 | // You must return a string. Environment.Newline is the carriage return, nothing fancy. 45 | public string ShowLog(int screenWidth, int screenHeight) 46 | { 47 | if (FlightLogger.eventLog.Count != lastCount) { 48 | LogToBuffer(screenWidth, screenHeight); 49 | } 50 | return response; 51 | 52 | } 53 | // I honestly have no clue why InternalModules need to be initialised 54 | // like this, and not with a proper constructor or an OnAwake, but that one always works. 55 | // Even a very simple OnAwake can sometimes get the entire IVA to choke. 56 | public void Start() 57 | { 58 | if (!string.IsNullOrEmpty(pageTitle)) 59 | // Notice that UnMangleConfigText is an extension method defined in JUtil class. 60 | // To your module, it won't be available without hardlinking to RPM, which is what you want to avoid. 61 | // It's nothing you couldn't replace with .Replace("<=", "{").Replace("=>", "}").Replace("$$$", Environment.NewLine); though 62 | pageTitle = pageTitle.UnMangleConfigText(); 63 | } 64 | // You can have an OnUpdate in this module, this particular one doesn't need it. 65 | private void LogToBuffer(int screenWidth, int screenHeight) 66 | { 67 | // I think I coded this one backwards somehow, but eh, it's a gimmick. 68 | int activeScreenHeight = screenHeight; 69 | if (!string.IsNullOrEmpty(pageTitle)) { 70 | activeScreenHeight--; 71 | } 72 | lastCount = FlightLogger.eventLog.Count; 73 | if (lastCount > 0) { 74 | string fullLog = JUtil.WordWrap(string.Join(Environment.NewLine, FlightLogger.eventLog.ToArray()), screenWidth); 75 | var tempBuffer = fullLog.Split(Environment.NewLine.ToCharArray(), StringSplitOptions.RemoveEmptyEntries); 76 | var screenBuffer = new string[activeScreenHeight]; 77 | if (tempBuffer.Length <= activeScreenHeight) { 78 | screenBuffer = tempBuffer; 79 | } else { 80 | for (int i = 0; i < screenBuffer.Length; i++) { 81 | screenBuffer[i] = tempBuffer[tempBuffer.Length - activeScreenHeight + i]; 82 | 83 | } 84 | } 85 | response = string.Join(Environment.NewLine, screenBuffer); 86 | } else 87 | response = "No records in log."; 88 | if (!string.IsNullOrEmpty(pageTitle)) { 89 | response = pageTitle + Environment.NewLine + response; 90 | } 91 | } 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /RasterPropMonitor/Handlers/JSIKAC.cs: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * RasterPropMonitor 3 | * ================= 4 | * Plugin for Kerbal Space Program 5 | * 6 | * by Mihara (Eugene Medvedev), MOARdV, and other contributors 7 | * 8 | * RasterPropMonitor is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, revision 11 | * date 29 June 2007, or (at your option) any later version. 12 | * 13 | * RasterPropMonitor is distributed in the hope that it will be useful, but 14 | * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 15 | * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 16 | * for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with RasterPropMonitor. If not, see . 20 | ****************************************************************************/ 21 | using System; 22 | using System.Collections.Generic; 23 | 24 | namespace JSI 25 | { 26 | class JSIKAC : IJSIModule 27 | { 28 | private static readonly bool kacFound; 29 | 30 | static JSIKAC() 31 | { 32 | kacFound = KACWrapper.InitKACWrapper(); 33 | } 34 | 35 | public JSIKAC(Vessel myVessel) 36 | { 37 | vessel = myVessel; 38 | JUtil.LogMessage(this, "A supported version of Kerbal Alarm Clock is {0}", (kacFound) ? "present" : "not available"); 39 | } 40 | 41 | public double ActiveVesselAlarms() 42 | { 43 | double count = 0.0; 44 | 45 | if (kacFound) 46 | { 47 | var alarms = KACWrapper.KAC.Alarms; 48 | 49 | string id = vessel.id.ToString(); 50 | int vesselAlarmCount = 0; 51 | for (int i = 0; i < alarms.Count; ++i) 52 | { 53 | if (alarms[i].VesselID == id) 54 | { 55 | ++vesselAlarmCount; 56 | } 57 | } 58 | 59 | count = (double)vesselAlarmCount; 60 | } 61 | return count; 62 | } 63 | 64 | public double NextAlarmTime() 65 | { 66 | double time = double.MaxValue; 67 | 68 | if (kacFound) 69 | { 70 | var alarms = KACWrapper.KAC.Alarms; 71 | string id = vessel.id.ToString(); 72 | for (int i = 0; i < alarms.Count; ++i) 73 | { 74 | if (alarms[i].VesselID == id && alarms[i].AlarmTime > Planetarium.fetch.time && alarms[i].AlarmTime < time) 75 | { 76 | time = alarms[i].AlarmTime; 77 | } 78 | } 79 | } 80 | 81 | return (time < double.MaxValue) ? (time - Planetarium.fetch.time) : 0.0; 82 | } 83 | 84 | public string NextAlarmType() 85 | { 86 | double time = double.MaxValue; 87 | string type = string.Empty; 88 | 89 | if (kacFound) 90 | { 91 | var alarms = KACWrapper.KAC.Alarms; 92 | string id = vessel.id.ToString(); 93 | for (int i = 0; i < alarms.Count; ++i) 94 | { 95 | if (alarms[i].VesselID == id && alarms[i].AlarmTime > Planetarium.fetch.time && alarms[i].AlarmTime < time) 96 | { 97 | time = alarms[i].AlarmTime; 98 | type = alarms[i].AlarmType.ToString(); 99 | } 100 | } 101 | } 102 | 103 | return type; 104 | } 105 | 106 | public string NextAlarmName() 107 | { 108 | double time = double.MaxValue; 109 | string name = string.Empty; 110 | 111 | if (kacFound) 112 | { 113 | var alarms = KACWrapper.KAC.Alarms; 114 | string id = vessel.id.ToString(); 115 | for (int i = 0; i < alarms.Count; ++i) 116 | { 117 | if (alarms[i].VesselID == id && alarms[i].AlarmTime > Planetarium.fetch.time && alarms[i].AlarmTime < time) 118 | { 119 | time = alarms[i].AlarmTime; 120 | name = alarms[i].Name; 121 | } 122 | } 123 | } 124 | 125 | return name; 126 | } 127 | } 128 | } 129 | -------------------------------------------------------------------------------- /RasterPropMonitor/Handlers/JSIVariablePageTextSwitcher.cs: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * RasterPropMonitor 3 | * ================= 4 | * Plugin for Kerbal Space Program 5 | * 6 | * by Mihara (Eugene Medvedev), MOARdV, and other contributors 7 | * 8 | * RasterPropMonitor is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, revision 11 | * date 29 June 2007, or (at your option) any later version. 12 | * 13 | * RasterPropMonitor is distributed in the hope that it will be useful, but 14 | * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 15 | * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 16 | * for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with RasterPropMonitor. If not, see . 20 | ****************************************************************************/ 21 | using System.Collections.Generic; 22 | using UnityEngine; 23 | 24 | namespace JSI 25 | { 26 | public class JSIVariablePageTextSwitcher : InternalModule 27 | { 28 | private struct PageDefinition 29 | { 30 | internal readonly string variableName; 31 | internal readonly string range; 32 | internal readonly string page; 33 | internal PageDefinition(string variableName, string range, string page) 34 | { 35 | this.variableName = variableName; 36 | this.range = range; 37 | this.page = page; 38 | } 39 | }; 40 | 41 | [KSPField] 42 | public string variableName; 43 | [KSPField] 44 | public string scale; 45 | [KSPField] 46 | public Vector2 threshold; 47 | [KSPField] 48 | public string definitionOut = string.Empty; 49 | [KSPField] 50 | public string definitionIn = string.Empty; 51 | [KSPField] 52 | public int refreshRate = 10; 53 | private int activePage; 54 | private PageDefinition[] definitions = null; 55 | private List text = new List(); 56 | private List range = new List(); 57 | private VariableOrNumberRange legacyRange; 58 | private bool pageActiveState; 59 | private bool initialized = false; 60 | private int updateCountdown; 61 | private RasterPropMonitorComputer rpmComp; 62 | 63 | // Analysis disable UnusedParameter 64 | public string ShowPage(int width, int height) 65 | { 66 | return text[activePage]; 67 | } 68 | 69 | public void PageActive(bool active, int pageNumber) 70 | { 71 | pageActiveState = active; 72 | if (active) 73 | { 74 | updateCountdown = 0; 75 | } 76 | } 77 | // Analysis restore UnusedParameter 78 | private bool UpdateCheck() 79 | { 80 | if (updateCountdown <= 0) 81 | { 82 | updateCountdown = refreshRate; 83 | return true; 84 | } 85 | updateCountdown--; 86 | return false; 87 | } 88 | 89 | // I don't like this mess of copypaste, but how can I improve it away?... 90 | public override void OnUpdate() 91 | { 92 | if (!pageActiveState || !initialized || !JUtil.VesselIsInIVA(vessel) || !UpdateCheck()) 93 | { 94 | return; 95 | } 96 | 97 | if (legacyRange != null) 98 | { 99 | float scaledValue = legacyRange.InverseLerp(); 100 | 101 | activePage = (scaledValue >= threshold.x && scaledValue <= threshold.y) ? 0 : 1; 102 | } 103 | else 104 | { 105 | activePage = 0; 106 | for (activePage = 0; activePage < range.Count; ++activePage) 107 | { 108 | if (range[activePage].IsInRange()) 109 | { 110 | break; 111 | } 112 | } 113 | } 114 | } 115 | 116 | public void Configure(ConfigNode node) 117 | { 118 | ConfigNode[] pages = node.GetNodes("PAGE_DEFINITION"); 119 | 120 | if (pages != null && pages.Length > 0) 121 | { 122 | definitions = new PageDefinition[pages.Length]; 123 | 124 | for (int i = 0; i < pages.Length; ++i) 125 | { 126 | string variableName = pages[i].GetValue("variableName"); 127 | string range = pages[i].GetValue("range"); 128 | string page = pages[i].GetValue("page"); 129 | if (string.IsNullOrEmpty(variableName) || string.IsNullOrEmpty(range) || string.IsNullOrEmpty(page)) 130 | { 131 | JUtil.LogErrorMessage(this, "Incorrect page definition for page {0}", i); 132 | definitions = null; 133 | if (string.IsNullOrEmpty(definitionIn)) 134 | { 135 | // Make sure we aren't crashing later. 136 | definitionIn = definitionOut; 137 | } 138 | return; 139 | } 140 | definitions[i] = new PageDefinition(variableName, range, page); 141 | } 142 | } 143 | } 144 | 145 | public void Start() 146 | { 147 | if (HighLogic.LoadedSceneIsEditor) 148 | { 149 | return; 150 | } 151 | 152 | rpmComp = RasterPropMonitorComputer.Instantiate(internalProp, true); 153 | 154 | if (string.IsNullOrEmpty(definitionIn) && definitions != null) 155 | { 156 | for (int i = 0; i < definitions.Length; ++i) 157 | { 158 | string[] varrange = definitions[i].range.Split(','); 159 | range.Add(new VariableOrNumberRange(rpmComp, definitions[i].variableName, varrange[0], varrange[1])); 160 | text.Add(JUtil.LoadPageDefinition(definitions[i].page)); 161 | } 162 | definitions = null; 163 | initialized = true; 164 | } 165 | else 166 | { 167 | string[] tokens = scale.Split(','); 168 | 169 | if (tokens.Length == 2) 170 | { 171 | legacyRange = new VariableOrNumberRange(rpmComp, variableName, tokens[0], tokens[1]); 172 | 173 | float min = Mathf.Min(threshold.x, threshold.y); 174 | float max = Mathf.Max(threshold.x, threshold.y); 175 | threshold.x = min; 176 | threshold.y = max; 177 | 178 | text.Add(JUtil.LoadPageDefinition(definitionIn)); 179 | 180 | initialized = true; 181 | } 182 | else 183 | { 184 | JUtil.LogErrorMessage(this, "Could not parse the 'scale' parameter: {0}", scale); 185 | } 186 | } 187 | 188 | text.Add(JUtil.LoadPageDefinition(definitionOut)); 189 | } 190 | 191 | public void OnDestroy() 192 | { 193 | //JUtil.LogMessage(this, "OnDestroy()"); 194 | } 195 | } 196 | } 197 | -------------------------------------------------------------------------------- /RasterPropMonitor/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | 4 | // Information about this assembly is defined by the following attributes. 5 | // Change them to the values specific to your project. 6 | [assembly: AssemblyTitle ("RasterPropMonitor")] 7 | [assembly: AssemblyDescription ("RasterPropMonitor plugin for Kerbal Space Program")] 8 | 9 | // This supposedly helps avoid plugin depencency problems. 10 | [assembly: KSPAssembly("RasterPropMonitor", 0, 17)] -------------------------------------------------------------------------------- /RasterPropMonitor/Shaders/RPM-CroppedDisplayShader.shader: -------------------------------------------------------------------------------- 1 |  2 | Shader "RPM/CroppedDisplayShader" 3 | { 4 | Properties 5 | { 6 | _MainTex ("Texture", 2D) = "white" {} 7 | _Opacity("_Opacity", Range(0,1) ) = 1 8 | _Color ("_Color", Color) = (1,1,1,1) 9 | _CropBound ("_CropBound", Vector) = (-1,-1,1,1) 10 | } 11 | 12 | SubShader { 13 | 14 | Tags { "RenderType"="Overlay" "Queue" = "Transparent" } 15 | 16 | // Premultiplied Alpha shader for rendering/coloring textures. 17 | // Includes cropping values in normalized device coordinates 18 | 19 | Lighting Off 20 | Blend One OneMinusSrcAlpha 21 | Cull Back 22 | Fog { Mode Off } 23 | ZWrite Off 24 | ZTest Always 25 | 26 | Pass { 27 | CGPROGRAM 28 | #pragma vertex vert 29 | #pragma fragment frag 30 | #pragma target 3.0 31 | 32 | #include "UnityCG.cginc" 33 | 34 | struct appdata_t { 35 | float4 vertex : POSITION; 36 | float2 texcoord : TEXCOORD0; 37 | }; 38 | 39 | struct v2f_cropped { 40 | float4 vertex : SV_POSITION; 41 | float2 texcoord : TEXCOORD0; 42 | float2 pixelPos : TEXCOORD1; 43 | }; 44 | 45 | UNITY_DECLARE_TEX2D(_MainTex); 46 | 47 | uniform float4 _MainTex_ST; 48 | // Color modulation 49 | uniform float4 _Color; 50 | // Cropping window in device normalized coordinates 51 | uniform float4 _CropBound; 52 | // Overall opacity scalar 53 | uniform float _Opacity; 54 | 55 | v2f_cropped vert (appdata_t v) 56 | { 57 | v2f_cropped o; 58 | o.vertex = mul(UNITY_MATRIX_MVP, v.vertex); 59 | o.texcoord = TRANSFORM_TEX(v.texcoord,_MainTex); 60 | o.pixelPos = float2(o.vertex.xy / o.vertex.w); 61 | return o; 62 | } 63 | 64 | float4 frag (v2f_cropped i) : COLOR 65 | { 66 | if(i.pixelPos.x < _CropBound.x || i.pixelPos.y < _CropBound.y || i.pixelPos.x > _CropBound.z || i.pixelPos.y > _CropBound.w) 67 | { 68 | discard; 69 | return float4(0,0,0,0); 70 | } 71 | else 72 | { 73 | float4 diffuse = UNITY_SAMPLE_TEX2D(_MainTex, i.texcoord); 74 | diffuse.a *= _Color.a * _Opacity; 75 | diffuse.rgb = (diffuse.rgb * _Color.rgb) * diffuse.a; 76 | return diffuse; 77 | } 78 | } 79 | ENDCG 80 | } 81 | } 82 | 83 | Fallback off 84 | } 85 | -------------------------------------------------------------------------------- /RasterPropMonitor/Shaders/RPM-DisplayShader.shader: -------------------------------------------------------------------------------- 1 |  2 | Shader "RPM/DisplayShader" 3 | { 4 | Properties 5 | { 6 | _MainTex ("Texture", 2D) = "white" {} 7 | _Opacity("_Opacity", Range(0,1) ) = 1 8 | _Color ("_Color", Color) = (1,1,1,1) 9 | } 10 | 11 | SubShader { 12 | 13 | Tags { "RenderType"="Overlay" "Queue" = "Transparent" } 14 | 15 | // Premultiplied Alpha shader for rendering/coloring textures. 16 | 17 | Lighting Off 18 | Blend One OneMinusSrcAlpha 19 | Cull Back 20 | Fog { Mode Off } 21 | ZWrite Off 22 | ZTest Always 23 | 24 | Pass { 25 | CGPROGRAM 26 | #pragma vertex vert 27 | #pragma fragment frag 28 | #pragma target 3.0 29 | 30 | #include "UnityCG.cginc" 31 | 32 | struct appdata_t { 33 | float4 vertex : POSITION; 34 | float2 texcoord : TEXCOORD0; 35 | }; 36 | 37 | struct v2f_displayshader { 38 | float4 vertex : SV_POSITION; 39 | float2 texcoord : TEXCOORD0; 40 | }; 41 | 42 | UNITY_DECLARE_TEX2D(_MainTex); 43 | 44 | uniform float4 _MainTex_ST; 45 | uniform float4 _Color; 46 | uniform float _Opacity; 47 | 48 | v2f_displayshader vert (appdata_t v) 49 | { 50 | v2f_displayshader o; 51 | o.vertex = mul(UNITY_MATRIX_MVP, v.vertex); 52 | o.texcoord = TRANSFORM_TEX(v.texcoord,_MainTex); 53 | return o; 54 | } 55 | 56 | float4 frag (v2f_displayshader i) : COLOR 57 | { 58 | float4 diffuse = UNITY_SAMPLE_TEX2D(_MainTex, i.texcoord); 59 | diffuse.a *= _Color.a * _Opacity; 60 | diffuse.rgb = (diffuse.rgb * _Color.rgb) * diffuse.a; 61 | return diffuse; 62 | } 63 | ENDCG 64 | } 65 | } 66 | 67 | Fallback off 68 | } 69 | -------------------------------------------------------------------------------- /RasterPropMonitor/Shaders/RPM-FontShader.shader: -------------------------------------------------------------------------------- 1 | Shader "RPM/FontShader" 2 | { 3 | Properties 4 | { 5 | _MainTex ("Texture", 2D) = "white" {} 6 | } 7 | 8 | SubShader 9 | { 10 | 11 | Tags { "RenderType"="Overlay" "Queue" = "Transparent" } 12 | 13 | //Lighting Off 14 | Blend One OneMinusSrcAlpha 15 | //Cull Off 16 | //Fog { Mode Off } 17 | ZWrite Off 18 | ZTest Always 19 | 20 | // Premultiplied Alpha shader for rendering text on displays. 21 | Pass 22 | { 23 | CGPROGRAM 24 | #pragma vertex vert 25 | #pragma fragment frag 26 | #pragma target 3.0 27 | 28 | struct appdata_t 29 | { 30 | float4 vertex : POSITION; 31 | fixed4 color : COLOR; 32 | float2 texcoord : TEXCOORD0; 33 | }; 34 | 35 | struct v2f_fontshader 36 | { 37 | float4 vertex : SV_POSITION; 38 | fixed4 color : COLOR; 39 | float2 texcoord : TEXCOORD0; 40 | }; 41 | 42 | UNITY_DECLARE_TEX2D(_MainTex); 43 | 44 | v2f_fontshader vert (appdata_t v) 45 | { 46 | v2f_fontshader dataOut; 47 | 48 | // Unfortunately, the original font implementation used a 49 | // Unity shader that used 0.5 as full brightness, which skews 50 | // everything. Doubling alpha appears to fix the problem for 51 | // both DX and OGL paths. 52 | dataOut.color = fixed4(v.color.rgb, v.color.a * 2.0); 53 | 54 | dataOut.vertex = mul(UNITY_MATRIX_MVP, v.vertex); 55 | dataOut.texcoord = v.texcoord; 56 | 57 | return dataOut; 58 | } 59 | 60 | fixed4 frag (v2f_fontshader dataIn) : SV_Target 61 | { 62 | fixed4 diffuse = UNITY_SAMPLE_TEX2D(_MainTex, dataIn.texcoord); 63 | diffuse.a *= dataIn.color.a; 64 | diffuse.rgb = (diffuse.rgb * dataIn.color.rgb) * diffuse.a; 65 | return diffuse; 66 | } 67 | 68 | ENDCG 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /RasterPropMonitor/Shaders/RPM-JSILabel.shader: -------------------------------------------------------------------------------- 1 | Shader "RPM/JSILabel" 2 | { 3 | // Derived from KSP Alpha / Transparent 4 | Properties 5 | { 6 | [Header(Texture Maps)] 7 | _MainTex("MainTex (RGBA)", 2D) = "white" {} 8 | _Color("_Color", Color) = (1,1,1,1) 9 | [Header(Specularity)] 10 | _SpecColor ("_SpecColor", Color) = (0.5, 0.5, 0.5, 1) 11 | _Shininess ("_Shininess", Range (0.03, 1)) = 0.078125 12 | [Header(Transparency)] 13 | _Opacity("_Opacity", Range(0,1)) = 1 14 | _Fresnel("_Fresnel", Range(0,10)) = 0 15 | [Header(Effects)] 16 | _RimFalloff("Rim Falloff", Range(0.01,5) ) = 0.1 17 | _RimColor("Rim Color", Color) = (0,0,0,0) 18 | _TemperatureColor("_TemperatureColor", Color) = (0,0,0,0) 19 | _BurnColor ("Burn Color", Color) = (1,1,1,1) 20 | _UnderwaterFogFactor("Underwater Fog Factor", Range(0,1)) = 0 21 | [Header(RPM)] 22 | _EmissiveFactor ("_EmissiveFactor", Range(0,1)) = 1 23 | _Cutoff ("Alpha cutoff", Range(0,1)) = 0.35 24 | } 25 | 26 | SubShader 27 | { 28 | Tags {"Queue"="AlphaTest"} 29 | 30 | Pass 31 | { 32 | ZWrite On 33 | ColorMask 0 34 | } 35 | 36 | ZWrite Off 37 | ZTest LEqual 38 | Blend SrcAlpha OneMinusSrcAlpha 39 | Cull Back 40 | 41 | CGPROGRAM 42 | 43 | #pragma surface surf Lambert alpha 44 | #pragma target 3.0 45 | 46 | half _Shininess; 47 | 48 | UNITY_DECLARE_TEX2D(_MainTex); 49 | 50 | float _Opacity; 51 | float _Fresnel; 52 | float _RimFalloff; 53 | float4 _RimColor; 54 | float4 _TemperatureColor; 55 | float4 _BurnColor; 56 | float _EmissiveFactor; 57 | 58 | 59 | struct Input 60 | { 61 | float2 uv_MainTex; 62 | float2 uv_BumpMap; 63 | float2 uv_Emissive; 64 | float3 viewDir; 65 | float3 worldPos; 66 | 67 | fixed4 color : COLOR; 68 | }; 69 | 70 | void surf (Input IN, inout SurfaceOutput o) 71 | { 72 | float4 color = IN.color * _BurnColor; 73 | 74 | float alpha = UNITY_SAMPLE_TEX2D(_MainTex, (IN.uv_MainTex)).a * IN.color.a; 75 | 76 | float3 normal = float3(0.0,0.0,1.0); 77 | half rim = 1.0 - saturate(dot (normalize(IN.viewDir), normal)); 78 | 79 | float3 fresnel = pow(1 - rim, _Fresnel); 80 | 81 | float3 emission = (_RimColor.rgb * pow(rim, _RimFalloff)) * _RimColor.a; 82 | emission += _TemperatureColor.rgb * _TemperatureColor.a; 83 | 84 | o.Albedo = color.rgb; 85 | o.Emission = emission * (1.0 - _EmissiveFactor) + (_EmissiveFactor * color.rgb) * alpha; 86 | o.Normal = normal; 87 | o.Emission *= _Opacity;// * fog.a; 88 | o.Alpha = alpha; 89 | } 90 | 91 | ENDCG 92 | } 93 | Fallback "Standard" 94 | } 95 | -------------------------------------------------------------------------------- /RasterPropMonitor/Shaders/RPM-blur.shader: -------------------------------------------------------------------------------- 1 | // 5x5 gaussian blur shader for rentex 2 | Shader "RPM/Blur" 3 | { 4 | Properties 5 | { 6 | _MainTex ("Render Input", 2D) = "white" {} 7 | _Gain ("_Gain", float) = 1.0 8 | _ImageDims ("_ImageDims", Vector) = (512,512,0.001953125,0.001953125) 9 | } 10 | SubShader { 11 | ZTest Always Cull Off ZWrite Off Fog { Mode Off } 12 | Pass 13 | { 14 | CGPROGRAM 15 | #pragma vertex vert_img 16 | #pragma fragment frag 17 | #pragma target 3.0 18 | 19 | #include "UnityCG.cginc" 20 | 21 | UNITY_DECLARE_TEX2D(_MainTex); 22 | uniform float _Gain; 23 | uniform float4 _ImageDims; 24 | 25 | float4 frag(v2f_img IN) : COLOR 26 | { 27 | // 5x5 gaussian filter written longhand.... 28 | // and assuming a 512x512 ish texture size 29 | float4 color; 30 | 31 | // (-2, -2) wt 1/273 32 | float2 uv = saturate(IN.uv + float2(-2.0 * _ImageDims.z, -2.0 * _ImageDims.w)); 33 | color = UNITY_SAMPLE_TEX2D(_MainTex, uv) * 0.003663003; 34 | // (-1, -2) wt 4/273 35 | uv = saturate(IN.uv + float2(-1.0 * _ImageDims.z, -2.0 * _ImageDims.w)); 36 | color += UNITY_SAMPLE_TEX2D(_MainTex, uv) * 0.014652014; 37 | // (+0, -2) wt 7/273 38 | uv = saturate(IN.uv + float2(+0.0 * _ImageDims.z, -2.0 * _ImageDims.w)); 39 | color += UNITY_SAMPLE_TEX2D(_MainTex, uv) * 0.025641025; 40 | // (+1, -2) wt 4/273 41 | uv = saturate(IN.uv + float2(+1.0 * _ImageDims.z, -2.0 * _ImageDims.w)); 42 | color += UNITY_SAMPLE_TEX2D(_MainTex, uv) * 0.014652014; 43 | // (+2, -2) wt 1/273 44 | uv = saturate(IN.uv + float2(+2.0 * _ImageDims.z, -2.0 * _ImageDims.w)); 45 | color += UNITY_SAMPLE_TEX2D(_MainTex, uv) * 0.003663003; 46 | 47 | // (-2, -1) wt 4/273 48 | uv = saturate(IN.uv + float2(-2.0 * _ImageDims.z, -1.0 * _ImageDims.w)); 49 | color += UNITY_SAMPLE_TEX2D(_MainTex, uv) * 0.014652014; 50 | // (-1, -1) wt 16/273 51 | uv = saturate(IN.uv + float2(-1.0 * _ImageDims.z, -1.0 * _ImageDims.w)); 52 | color += UNITY_SAMPLE_TEX2D(_MainTex, uv) * 0.058608058; 53 | // (+0, -1) wt 24/273 54 | uv = saturate(IN.uv + float2(+0.0 * _ImageDims.z, -1.0 * _ImageDims.w)); 55 | color += UNITY_SAMPLE_TEX2D(_MainTex, uv) * 0.087912087; 56 | // (+1, -1) wt 16/273 57 | uv = saturate(IN.uv + float2(+1.0 * _ImageDims.z, -1.0 * _ImageDims.w)); 58 | color += UNITY_SAMPLE_TEX2D(_MainTex, uv) * 0.058608058; 59 | // (+2, -1) wt 4/273 60 | uv = saturate(IN.uv + float2(+2.0 * _ImageDims.z, -1.0 * _ImageDims.w)); 61 | color += UNITY_SAMPLE_TEX2D(_MainTex, uv) * 0.014652014; 62 | 63 | // (-2, 0) wt 6/273 64 | uv = saturate(IN.uv + float2(-2.0 * _ImageDims.z, +0.0 * _ImageDims.w)); 65 | color += UNITY_SAMPLE_TEX2D(_MainTex, uv) * 0.021978021; 66 | // (-1, -1) wt 24/273 67 | uv = saturate(IN.uv + float2(-1.0 * _ImageDims.z, +0.0 * _ImageDims.w)); 68 | color += UNITY_SAMPLE_TEX2D(_MainTex, uv) * 0.087912087; 69 | // (+0, 0) wt 41/273 70 | uv = saturate(IN.uv + float2(+0.0 * _ImageDims.z, +0.0 * _ImageDims.w)); 71 | color += UNITY_SAMPLE_TEX2D(_MainTex, uv) * 0.15018315; 72 | // (+1, 0) wt 2473 73 | uv = saturate(IN.uv + float2(+1.0 * _ImageDims.z, +0.0 * _ImageDims.w)); 74 | color += UNITY_SAMPLE_TEX2D(_MainTex, uv) * 0.087912087; 75 | // (+2, 0) wt 6/273 76 | uv = saturate(IN.uv + float2(+2.0 * _ImageDims.z, +0.0 * _ImageDims.w)); 77 | color += UNITY_SAMPLE_TEX2D(_MainTex, uv) * 0.021978021; 78 | 79 | // (-2, +1) wt 4/273 80 | uv = saturate(IN.uv + float2(-2.0 * _ImageDims.z, +1.0 * _ImageDims.w)); 81 | color += UNITY_SAMPLE_TEX2D(_MainTex, uv) * 0.014652014; 82 | // (-1, +1) wt 16/273 83 | uv = saturate(IN.uv + float2(-1.0 * _ImageDims.z, +1.0 * _ImageDims.w)); 84 | color += UNITY_SAMPLE_TEX2D(_MainTex, uv) * 0.058608058; 85 | // (+0, +1) wt 24/273 86 | uv = saturate(IN.uv + float2(+0.0 * _ImageDims.z, +1.0 * _ImageDims.w)); 87 | color += UNITY_SAMPLE_TEX2D(_MainTex, uv) * 0.087912087; 88 | // (+1, +1) wt 16/273 89 | uv = saturate(IN.uv + float2(+1.0 * _ImageDims.z, +1.0 * _ImageDims.w)); 90 | color += UNITY_SAMPLE_TEX2D(_MainTex, uv) * 0.058608058; 91 | // (+2, +1) wt 4/273 92 | uv = saturate(IN.uv + float2(+2.0 * _ImageDims.z, +1.0 * _ImageDims.w)); 93 | color += UNITY_SAMPLE_TEX2D(_MainTex, uv) * 0.014652014; 94 | 95 | // (-2, +2) wt 1/273 96 | uv = saturate(IN.uv + float2(-2.0 * _ImageDims.z, +2.0 * _ImageDims.w)); 97 | color += UNITY_SAMPLE_TEX2D(_MainTex, uv) * 0.003663003; 98 | // (-1, +2) wt 4/273 99 | uv = saturate(IN.uv + float2(-1.0 * _ImageDims.z, +2.0 * _ImageDims.w)); 100 | color += UNITY_SAMPLE_TEX2D(_MainTex, uv) * 0.014652014; 101 | // (+0, +2) wt 7/273 102 | uv = saturate(IN.uv + float2(+0.0 * _ImageDims.z, +2.0 * _ImageDims.w)); 103 | color += UNITY_SAMPLE_TEX2D(_MainTex, uv) * 0.025641025; 104 | // (+1, +2) wt 4/273 105 | uv = saturate(IN.uv + float2(+1.0 * _ImageDims.z, +2.0 * _ImageDims.w)); 106 | color += UNITY_SAMPLE_TEX2D(_MainTex, uv) * 0.014652014; 107 | // (+2, +2) wt 1/273 108 | uv = saturate(IN.uv + float2(+2.0 * _ImageDims.z, +2.0 * _ImageDims.w)); 109 | color += UNITY_SAMPLE_TEX2D(_MainTex, uv) * 0.003663003; 110 | 111 | float gainBoost = max(0.0, _Gain - 1.0) * 0.15; 112 | color.r = saturate((color.r * _Gain) + gainBoost); 113 | color.g = saturate((color.g * _Gain) + gainBoost); 114 | color.b = saturate((color.b * _Gain) + gainBoost); 115 | 116 | return color; 117 | } 118 | ENDCG 119 | } 120 | } 121 | } 122 | -------------------------------------------------------------------------------- /RasterPropMonitor/Shaders/RPM-grayscale.shader: -------------------------------------------------------------------------------- 1 | // Grayscale shader for rentex 2 | Shader "RPM/Grayscale" 3 | { 4 | Properties 5 | { 6 | _MainTex ("Render Input", 2D) = "white" {} 7 | _Gain ("_Gain", float) = 1.0 8 | _Opacity ("_Opacity", float) = 1.0 9 | } 10 | SubShader 11 | { 12 | ZTest Always Cull Off ZWrite Off Fog { Mode Off } 13 | Blend SrcAlpha OneMinusSrcAlpha 14 | Pass 15 | { 16 | CGPROGRAM 17 | #pragma vertex vert_img 18 | #pragma fragment frag 19 | #pragma target 3.0 20 | #include "UnityCG.cginc" 21 | 22 | UNITY_DECLARE_TEX2D(_MainTex); 23 | uniform float _Gain; 24 | uniform float _Opacity; 25 | 26 | float4 frag(v2f_img IN) : COLOR 27 | { 28 | float4 c = UNITY_SAMPLE_TEX2D (_MainTex, IN.uv); 29 | 30 | // CIE 1931 conversion of linear color to luminance 31 | float Y = c.r * 0.2126 + c.g * 0.7152 + c.b * 0.0722; 32 | // Apply gain 33 | float gainBoost = max(0.0, _Gain - 1.0) * 0.15; 34 | Y = saturate(Y * _Gain + gainBoost); 35 | return half4(Y, Y, Y, saturate(_Opacity)); 36 | } 37 | ENDCG 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /RasterPropMonitor/Shaders/RPM-greenscale.shader: -------------------------------------------------------------------------------- 1 | // Greenscale shader for rentex 2 | Shader "RPM/Greenscale" 3 | { 4 | Properties 5 | { 6 | _MainTex ("Render Input", 2D) = "white" {} 7 | _Gain ("_Gain", float) = 1.0 8 | _Opacity ("_Opacity", float) = 1.0 9 | } 10 | SubShader 11 | { 12 | ZTest Always Cull Off ZWrite Off Fog { Mode Off } 13 | Blend SrcAlpha OneMinusSrcAlpha 14 | Pass 15 | { 16 | CGPROGRAM 17 | #pragma vertex vert_img 18 | #pragma fragment frag 19 | #pragma target 3.0 20 | #include "UnityCG.cginc" 21 | 22 | UNITY_DECLARE_TEX2D(_MainTex); 23 | uniform float _Gain; 24 | uniform float _Opacity; 25 | 26 | fixed4 frag(v2f_img IN) : SV_TARGET 27 | { 28 | float4 c = UNITY_SAMPLE_TEX2D (_MainTex, IN.uv); 29 | 30 | // CIE 1931 conversion of linear color to luminance 31 | float Y = c.r * 0.2126 + c.g * 0.7152 + c.b * 0.0722; 32 | // Apply gain 33 | float gainBoost = max(0.0, _Gain - 1.0) * 0.15; 34 | Y = saturate(Y * _Gain + gainBoost); 35 | return fixed4(0.0, Y, 0.0, saturate(_Opacity)); 36 | } 37 | ENDCG 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /RasterPropMonitor/Shaders/RPM-noise.shader: -------------------------------------------------------------------------------- 1 | // Textured noise shader for rentex 2 | Shader "RPM/Noise" 3 | { 4 | Properties 5 | { 6 | _MainTex ("Render Input", 2D) = "white" {} 7 | _Noise ("_Noise", 2D) = "white" {} 8 | _Gain ("_Gain", float) = 1.0 9 | _Blend ("_Blend", float) = 1.0 10 | _NoiseOffset ("_NoiseOffset", float) = 0.0 11 | } 12 | SubShader 13 | { 14 | ZTest Always Cull Off ZWrite Off Fog { Mode Off } 15 | Pass 16 | { 17 | CGPROGRAM 18 | #pragma vertex vert_img 19 | #pragma fragment frag 20 | #pragma target 3.0 21 | 22 | #include "UnityCG.cginc" 23 | 24 | UNITY_DECLARE_TEX2D(_MainTex); 25 | UNITY_DECLARE_TEX2D(_Noise); 26 | uniform float _Gain; 27 | uniform float _Blend; 28 | uniform float _NoiseOffset; 29 | 30 | fixed4 frag(v2f_img IN) : SV_TARGET 31 | { 32 | // Fetch color 33 | float2 uv = IN.uv; 34 | float4 color = UNITY_SAMPLE_TEX2D(_MainTex, uv); 35 | 36 | // Apply gain 37 | float gainBoost = max(0.0, _Gain - 1.0) * 0.15; 38 | color.r = saturate((color.r * _Gain) + gainBoost); 39 | color.g = saturate((color.g * _Gain) + gainBoost); 40 | color.b = saturate((color.b * _Gain) + gainBoost); 41 | 42 | // Fetch noise, including offset 43 | uv.y = frac(uv.y + _NoiseOffset); 44 | float4 noise = UNITY_SAMPLE_TEX2D(_Noise, uv); 45 | 46 | // Blend RGB 47 | color.r = lerp(noise.r, color.r, _Blend); 48 | color.g = lerp(noise.g, color.g, _Blend); 49 | color.b = lerp(noise.b, color.b, _Blend); 50 | 51 | return color; 52 | } 53 | ENDCG 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /SCANsatRPM/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | 4 | // Information about this assembly is defined by the following attributes. 5 | // Change them to the values specific to your project. 6 | [assembly: AssemblyTitle("SCANsatRPM")] 7 | [assembly: AssemblyDescription ("RasterPropMonitor / SCANsat interface plugin for Kerbal Space Program")] 8 | 9 | // For KSP purposes we are SCANsatRPM version 0.17... 10 | [assembly: KSPAssembly("SCANsatRPM", 0, 17)] 11 | 12 | // This depends on RPM 0.17... 13 | [assembly: KSPAssemblyDependency("RasterPropMonitor", 0, 17)] 14 | // And it depends on SCANsat, but the current version does not have a KSPAssembly statement... 15 | -------------------------------------------------------------------------------- /SCANsatRPM/README.md: -------------------------------------------------------------------------------- 1 | ### SCANsatRPM 2 | 3 | This subproject is historical and only kept here for posterity. 4 | 5 | SCANsatRPM has been integrated into SCANsat and I suppose a few versions later I'll delete the files as well. 6 | -------------------------------------------------------------------------------- /SCANsatRPM/SCANsatRPM.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Debug 5 | AnyCPU 6 | 8.0.30703 7 | 2.0 8 | {E7E75333-EE44-4F51-A14D-CFB075525D7D} 9 | Library 10 | SCANsatRPM 11 | SCANsatRPM 12 | 0.18 13 | 65001 14 | v3.5 15 | 16 | 17 | true 18 | full 19 | false 20 | ..\bin\Debug 21 | DEBUG; 22 | prompt 23 | 4 24 | false 25 | 4 26 | 27 | 28 | true 29 | ..\bin\Release 30 | prompt 31 | 4 32 | false 33 | 4 34 | 35 | 36 | 37 | 38 | ..\..\..\..\..\..\Steam\SteamApps\common\Kerbal Space Program\KSP_Data\Managed\Assembly-CSharp.dll 39 | False 40 | 41 | 42 | ..\..\..\..\..\..\Steam\SteamApps\common\Kerbal Space Program\KSP_Data\Managed\UnityEngine.dll 43 | False 44 | 45 | 46 | ..\..\..\..\..\..\KSP\Testing\0.23.5\GameData\SCANsat\SCANsat.dll 47 | False 48 | 49 | 50 | 51 | 52 | 53 | 54 | Properties\SharedAssemblyInfo.cs 55 | 56 | 57 | 58 | 59 | 60 | {F19C7AB4-50C2-4378-9673-CC039CA12E10} 61 | RasterPropMonitor 62 | 63 | 64 | -------------------------------------------------------------------------------- /SharedAssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | 4 | [assembly: AssemblyConfiguration("")] 5 | [assembly: AssemblyCompany("")] 6 | [assembly: AssemblyProduct ("RasterPropMonitor")] 7 | [assembly: AssemblyCopyright ("Copyright ©2013-2018 by Mihara, MOARdV, and other contributors, released under the terms of GNU GPLv3")] 8 | [assembly: AssemblyTrademark("")] 9 | [assembly: AssemblyCulture("")] 10 | 11 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". 12 | // The form "{Major}.{Minor}.*" will automatically update the build and revision, 13 | // and "{Major}.{Minor}.{Build}.*" will update just the revision. 14 | // Revision number is altered automatically. 15 | [assembly: AssemblyVersion("0.30.6.*")] 16 | 17 | // The following attributes are used to specify the signing key for the assembly, 18 | // if desired. See the Mono documentation for more information about signing. 19 | //[assembly: AssemblyDelaySign(false)] 20 | //[assembly: AssemblyKeyFile("")] 21 | --------------------------------------------------------------------------------