├── .gitattributes ├── .gitignore ├── CHANGES.md ├── CI ├── .travis.yml ├── build.remotetech.sh ├── github.build.deploy.sh └── travis.osx.install.deps.sh ├── CONTRIBUTING.md ├── GameData ├── MM_LICENSE.md ├── ModuleManager.4.2.1.dll └── RemoteTech │ ├── Default_Settings.cfg │ ├── Localization │ ├── en-us.cfg │ └── zh-cn.cfg │ ├── Parts │ ├── GigaDish1 │ │ ├── model.mu │ │ ├── model000.dds │ │ ├── model001.dds │ │ ├── model002.dds │ │ ├── model003.dds │ │ ├── model004.dds │ │ ├── model005.dds │ │ ├── model006.dds │ │ └── part.cfg │ ├── GigaDish2 │ │ ├── model.mu │ │ ├── model000.dds │ │ └── part.cfg │ ├── LongAntenna2 │ │ └── part.cfg │ ├── LongAntenna3 │ │ ├── model.mu │ │ ├── part.cfg │ │ └── tex.dds │ ├── LongDish1 │ │ ├── model.mu │ │ ├── model000.dds │ │ └── part.cfg │ ├── LongDish2 │ │ ├── newll5.mu │ │ ├── newll5000.dds │ │ └── part.cfg │ ├── ShortAntenna1 │ │ ├── model.mu │ │ ├── model000.dds │ │ └── part.cfg │ ├── ShortDish1 │ │ ├── model.mu │ │ ├── model000.dds │ │ └── part.cfg │ └── ShortDish2 │ │ ├── newss5.mu │ │ ├── newss5000.dds │ │ └── part.cfg │ ├── RemoteTech.version │ ├── RemoteTech_AIES_Antennas.cfg │ ├── RemoteTech_AIES_Probes.cfg │ ├── RemoteTech_Antennas.cfg │ ├── RemoteTech_B9_Probes.cfg │ ├── RemoteTech_CactEye_Probes.cfg │ ├── RemoteTech_FASA_Antennas.cfg │ ├── RemoteTech_FASA_Probes.cfg │ ├── RemoteTech_HGR.cfg │ ├── RemoteTech_LLL_Antennas.cfg │ ├── RemoteTech_LLL_Probes.cfg │ ├── RemoteTech_MarkIV_System.cfg │ ├── RemoteTech_MechJeb.cfg │ ├── RemoteTech_NearFutureExploration_Antennas.cfg │ ├── RemoteTech_NearFutureExploration_Probes.cfg │ ├── RemoteTech_NearFuture_Probes.cfg │ ├── RemoteTech_NovaPunch_Antennas.cfg │ ├── RemoteTech_NovaPunch_Probes.cfg │ ├── RemoteTech_Procedural_Probes.cfg │ ├── RemoteTech_RLA_Probes.cfg │ ├── RemoteTech_RestockPlus_Antennas.cfg │ ├── RemoteTech_Restock_Antennas.cfg │ ├── RemoteTech_SoundingRockets_Probes.cfg │ ├── RemoteTech_Squad_Antennas.cfg │ ├── RemoteTech_Squad_Deployable_Stations.cfg │ ├── RemoteTech_Squad_Probes.cfg │ ├── RemoteTech_StationPartsExpansion_Probes.cfg │ ├── RemoteTech_Tech_Node.cfg │ ├── RemoteTech_UniversalStorage2_Probes.cfg │ ├── RemoteTech_VDS_Hull_Camera.cfg │ ├── RemoteTech_VensStockRevamp.cfg │ └── Textures │ ├── TimeQuadrantFcStatus.png │ ├── buttons_fc_add.png │ ├── buttons_fc_add_hover.png │ ├── buttons_fc_del.png │ ├── buttons_fc_del_hover.png │ ├── gitpagessat.png │ ├── headline.jpg │ ├── mark.png │ ├── texAll.png │ ├── texBackground.png │ ├── texBackground_left.png │ ├── texButton.png │ ├── texButtonGray.png │ ├── texButtonGreen.png │ ├── texButtonRed.png │ ├── texButtonYellow.png │ ├── texCone.png │ ├── texCone.xcf │ ├── texDish.png │ ├── texEmpty.png │ ├── texFlightGreen.png │ ├── texFlightGreenDown.png │ ├── texFlightGreenOver.png │ ├── texFlightRed.png │ ├── texFlightRedDown.png │ ├── texFlightRedOver.png │ ├── texFlightYellow.png │ ├── texFlightYellowDown.png │ ├── texFlightYellowOver.png │ ├── texKnowledgeActive.png │ ├── texKnowledgeHover.png │ ├── texKnowledgeNormal.png │ ├── texMultiPath.png │ ├── texNoCone.png │ ├── texNoOmniDish.png │ ├── texNoPath.png │ ├── texOmni.png │ ├── texOmniDish.png │ ├── texOmniDish.xcf │ ├── texPath.png │ ├── texPath.xcf │ ├── texPlanet.png │ └── texSatellite.png ├── LICENSE.txt ├── README.md ├── appveyor.yml ├── buildscripts ├── UnityDebug │ ├── Mono.Cecil.dll │ ├── Mono.CompilerServices.SymbolWriter.dll │ ├── PlayerConnectionConfigFile │ ├── pdb2mdb.exe │ └── prepare-debug.bat ├── UnityDebug_2019 │ ├── Mono.Cecil.dll │ ├── Mono.CompilerServices.SymbolWriter.dll │ ├── System.Core.dll │ ├── System.dll │ ├── instructions.txt │ ├── mono-2.0-sgen.dll │ ├── mono.exe │ ├── pdb2mdb.exe │ └── prepare-debug.bat ├── ZipPack │ ├── 7za-License.txt │ ├── 7za.dll │ ├── 7za.exe │ └── build-package.bat └── lib │ └── mono │ └── 4.5 │ └── mscorlib.dll ├── saves ├── RemoteTech KSP1_0 Testbed │ ├── Ships │ │ ├── SPH │ │ │ └── Auto-Saved Ship.craft │ │ └── VAB │ │ │ └── Auto-Saved Ship.craft │ └── persistent.sfs ├── RemoteTech KSP1_3 Testbed │ ├── Ships │ │ └── VAB │ │ │ ├── Dish One.craft │ │ │ ├── Dumb Relay.craft │ │ │ ├── GO.craft │ │ │ ├── RC Rocket.craft │ │ │ ├── Smart SAS.craft │ │ │ └── Wide Dish.craft │ └── persistent.sfs ├── RemoteTech KSP1_4 Testbed │ ├── Ships │ │ ├── SPH │ │ │ ├── Auto-Saved Ship.craft │ │ │ └── Car.craft │ │ └── VAB │ │ │ ├── Auto-Saved Ship.craft │ │ │ ├── Car.craft │ │ │ ├── Dish 75Mm Range.craft │ │ │ ├── Dish Sat.craft │ │ │ ├── Disk 20Mm Range.craft │ │ │ ├── GO.craft │ │ │ ├── Ion Fly.craft │ │ │ ├── Manned Test.craft │ │ │ ├── Omni 5Mm Range.craft │ │ │ ├── Omni Relay.craft │ │ │ ├── RCS Test.craft │ │ │ ├── RSC Test.craft │ │ │ ├── Rocket.craft │ │ │ ├── Stack Test.craft │ │ │ ├── Test.craft │ │ │ └── Untitled Space Craft.craft │ └── persistent.sfs ├── RemoteTech KSP1_5 Testbed │ ├── Ships │ │ ├── SPH │ │ │ └── Rover.craft │ │ └── VAB │ │ │ ├── Dish 20Mm Limit.craft │ │ │ ├── Dish 75Mm Limit.craft │ │ │ ├── Dumb Relay.craft │ │ │ ├── Inner Dish.craft │ │ │ ├── Omni 2_5Mm Limit.craft │ │ │ ├── Rocket 2.craft │ │ │ ├── Rocket.craft │ │ │ └── Science Toy.craft │ └── persistent.sfs └── RemoteTech KSP1_8 Testbed │ ├── RemoteTech_Settings.cfg │ ├── Ships │ ├── SPH │ │ ├── Rover (Original).craft │ │ ├── Rover (Original).loadmeta │ │ ├── Rover (RT).craft │ │ ├── Rover (RT).loadmeta │ │ ├── Rover 2.craft │ │ └── Rover 2.loadmeta │ └── VAB │ │ ├── Dish 20Mm Limit.craft │ │ ├── Dish 20Mm Limit.loadmeta │ │ ├── Dish 75Mm Limit.craft │ │ ├── Dish 75Mm Limit.loadmeta │ │ ├── Dish Gateway M.craft │ │ ├── Dish Gateway M.loadmeta │ │ ├── Dish Gateway.craft │ │ ├── Dish Gateway.loadmeta │ │ ├── Dumb Relay.craft │ │ ├── Dumb Relay.loadmeta │ │ ├── Maneuver Rocket.craft │ │ ├── Maneuver Rocket.loadmeta │ │ ├── Omni 2_5Mm Limit.craft │ │ ├── Omni 2_5Mm Limit.loadmeta │ │ ├── Rover Rocket.craft │ │ ├── Rover Rocket.loadmeta │ │ ├── Science Container.craft │ │ └── Science Container.loadmeta │ ├── persistent.loadmeta │ └── persistent.sfs └── src └── RemoteTech ├── API └── API.cs ├── AddOns ├── KerbalAlarmClockAPI.cs └── Kerbalism.cs ├── AntennaManager.cs ├── FlightComputer ├── Commands │ ├── AbstractCommand.cs │ ├── ActionGroupCommand.cs │ ├── AttitudeCommand.cs │ ├── AxisGroupCommand.cs │ ├── BurnCommand.cs │ ├── CancelCommand.cs │ ├── DriveCommand.cs │ ├── EventCommand.cs │ ├── ExternalAPICommand.cs │ ├── FlightControlCommand.cs │ ├── HibernationCommand.cs │ ├── ICommand.cs │ ├── ManeuverCommand.cs │ ├── PIDCommand.cs │ ├── PartActionCommand.cs │ ├── PartActionFieldCommand.cs │ ├── StockAutopilotCommand.cs │ └── TargetCommand.cs ├── DelayedCommand.cs ├── FlightComputer.cs ├── FlightCore.cs ├── PIDController.cs ├── RoverComputer.cs └── UIPartActionMenuPatcher.cs ├── IAntenna.cs ├── ISatellite.cs ├── ISignalProcessor.cs ├── Modules ├── MissionControlAntenna.cs ├── ModuleRTAntenna.cs ├── ModuleRTAntennaPassive.cs ├── ModuleRTDataTransmitter.cs ├── ModuleSPU.cs ├── ModuleSPUPassive.cs ├── ProtoAntenna.cs └── ProtoSignalProcessor.cs ├── NetworkFeedback.cs ├── NetworkManager.cs ├── NetworkPathfinder.cs ├── NetworkRenderer.cs ├── Properties └── AssemblyInfo.cs ├── RTCore.cs ├── RTDebugUnit.cs ├── RTEditor.cs ├── RTLog.cs ├── RTPartInfoReloader.cs ├── RTSettings.cs ├── RTSpaceCentre.cs ├── RTUtil.cs ├── RangeModel ├── AbstractRangeModel.cs ├── RangeModel.cs ├── RangeModelExtensions.cs ├── RangeModelRoot.cs └── RangeModelStandard.cs ├── RemoteTech.csproj ├── RemoteTech.sln ├── SatelliteManager.cs ├── SimpleTypes ├── AddOn.cs ├── BidirectionalEdge.cs ├── BinaryHeap.cs ├── CachedField.cs ├── ComputerModeMapper.cs ├── Dish.cs ├── GUITextureButtonFactory.cs ├── NetworkLink.cs ├── NetworkRoute.cs ├── PriorityQueue.cs └── TimeStringConverter.cs ├── UI ├── AbstractWindow.cs ├── AntennaFragment.cs ├── AntennaWindow.cs ├── AntennaWindowStandalone.cs ├── AttitudeFragment.cs ├── DebugWindow.cs ├── FilterOverlay.cs ├── FlightComputerWindow.cs ├── FlightUIPatcher.cs ├── FocusFragment.cs ├── FocusOverlay.cs ├── IFragment.cs ├── ManeuverNodeOverlay.cs ├── NetworkCone.cs ├── NetworkLine.cs ├── OptionWindow.cs ├── PIDControllerFragment.cs ├── PowerFragment.cs ├── QueueFragment.cs ├── RoverFragment.cs ├── SatelliteFragment.cs ├── TargetInfoFragment.cs ├── TargetInfoWindow.cs └── TimeWarpDecorator.cs ├── VesselExtension.cs └── VesselSatellite.cs /.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to automatically normalize line endings. 3 | ############################################################################### 4 | * text=auto 5 | *.cfg text eol=crlf 6 | *.version text eol=crlf 7 | *.txt text eol=crlf 8 | 9 | ############################################################################### 10 | # Set default behavior for command prompt diff. 11 | # 12 | # This is need for earlier builds of msysgit that does not have it on by 13 | # default for csharp files. 14 | # Note: This is only used by command line 15 | ############################################################################### 16 | #*.cs diff=csharp 17 | 18 | ############################################################################### 19 | # Set the merge driver for project and solution files 20 | # 21 | # Merging from the command prompt will add diff markers to the files if there 22 | # are conflicts (Merging from VS is not affected by the settings below, in VS 23 | # the diff markers are never inserted). Diff markers may cause the following 24 | # file extensions to fail to load in VS. An alternative would be to treat 25 | # these files as binary and thus will always conflict and require user 26 | # intervention with every merge. To do so, just uncomment the entries below 27 | ############################################################################### 28 | #*.sln merge=binary 29 | #*.csproj merge=binary 30 | #*.vbproj merge=binary 31 | #*.vcxproj merge=binary 32 | #*.vcproj merge=binary 33 | #*.dbproj merge=binary 34 | #*.fsproj merge=binary 35 | #*.lsproj merge=binary 36 | #*.wixproj merge=binary 37 | #*.modelproj merge=binary 38 | #*.sqlproj merge=binary 39 | #*.wwaproj merge=binary 40 | 41 | ############################################################################### 42 | # behavior for image files 43 | # 44 | # image files are treated as binary by default. 45 | ############################################################################### 46 | #*.jpg binary 47 | #*.png binary 48 | #*.gif binary 49 | 50 | ############################################################################### 51 | # diff behavior for common document formats 52 | # 53 | # Convert binary document formats to text before diffing them. This feature 54 | # is only available from the command line. Turn it on by uncommenting the 55 | # entries below. 56 | ############################################################################### 57 | #*.doc diff=astextplain 58 | #*.DOC diff=astextplain 59 | #*.docx diff=astextplain 60 | #*.DOCX diff=astextplain 61 | #*.dot diff=astextplain 62 | #*.DOT diff=astextplain 63 | #*.pdf diff=astextplain 64 | #*.PDF diff=astextplain 65 | #*.rtf diff=astextplain 66 | #*.RTF diff=astextplain 67 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | 4 | # User-specific files 5 | *.suo 6 | *.user 7 | *.sln.docstates 8 | 9 | # Build results 10 | 11 | [Dd]ebug/ 12 | [Rr]elease/ 13 | x64/ 14 | build/ 15 | [Bb]in/ 16 | [Oo]bj/ 17 | 18 | # Enable "build/" folder in the NuGet Packages folder since NuGet packages use it for MSBuild targets 19 | !packages/*/build/ 20 | 21 | # MSTest test Results 22 | [Tt]est[Rr]esult*/ 23 | [Bb]uild[Ll]og.* 24 | 25 | *_i.c 26 | *_p.c 27 | *.ilk 28 | *.meta 29 | *.obj 30 | *.pch 31 | *.pdb 32 | *.pgc 33 | *.pgd 34 | *.rsp 35 | *.sbr 36 | *.tlb 37 | *.tli 38 | *.tlh 39 | *.tmp 40 | *.tmp_proj 41 | *.log 42 | *.vspscc 43 | *.vssscc 44 | .builds 45 | *.pidb 46 | *.log 47 | *.scc 48 | 49 | # Visual Studio 2015 cache/options directory 50 | .vs/ 51 | 52 | # Visual C++ cache files 53 | ipch/ 54 | *.aps 55 | *.ncb 56 | *.opensdf 57 | *.sdf 58 | *.cachefile 59 | 60 | # Visual Studio profiler 61 | *.psess 62 | *.vsp 63 | *.vspx 64 | 65 | # Guidance Automation Toolkit 66 | *.gpState 67 | 68 | # ReSharper is a .NET coding add-in 69 | _ReSharper*/ 70 | *.[Rr]e[Ss]harper 71 | 72 | # TeamCity is a build add-in 73 | _TeamCity* 74 | 75 | # DotCover is a Code Coverage Tool 76 | *.dotCover 77 | 78 | # NCrunch 79 | *.ncrunch* 80 | .*crunch*.local.xml 81 | 82 | # Installshield output folder 83 | [Ee]xpress/ 84 | 85 | # DocProject is a documentation generator add-in 86 | DocProject/buildhelp/ 87 | DocProject/Help/*.HxT 88 | DocProject/Help/*.HxC 89 | DocProject/Help/*.hhc 90 | DocProject/Help/*.hhk 91 | DocProject/Help/*.hhp 92 | DocProject/Help/Html2 93 | DocProject/Help/html 94 | 95 | # Click-Once directory 96 | publish/ 97 | 98 | # Publish Web Output 99 | *.Publish.xml 100 | 101 | # NuGet Packages Directory 102 | ## TODO: If you have NuGet Package Restore enabled, uncomment the next line 103 | #packages/ 104 | 105 | # Windows Azure Build Output 106 | csx 107 | *.build.csdef 108 | 109 | # Windows Store app package directory 110 | AppPackages/ 111 | 112 | # Others 113 | sql/ 114 | *.Cache 115 | ClientBin/ 116 | [Ss]tyle[Cc]op.* 117 | ~$* 118 | *~ 119 | *.dbmdl 120 | *.[Pp]ublish.xml 121 | *.pfx 122 | *.publishsettings 123 | 124 | # RIA/Silverlight projects 125 | Generated_Code/ 126 | 127 | # Backup & report files from converting an old project file to a newer 128 | # Visual Studio version. Backup files are not needed, because we have git ;-) 129 | _UpgradeReport_Files/ 130 | Backup*/ 131 | UpgradeLog*.XML 132 | UpgradeLog*.htm 133 | 134 | # SQL Server files 135 | App_Data/*.mdf 136 | App_Data/*.ldf 137 | 138 | 139 | #LightSwitch generated files 140 | GeneratedArtifacts/ 141 | _Pvt_Extensions/ 142 | ModelManifest.xml 143 | 144 | # ========================= 145 | # Windows detritus 146 | # ========================= 147 | 148 | # Windows image file caches 149 | Thumbs.db 150 | ehthumbs.db 151 | 152 | # Folder config file 153 | Desktop.ini 154 | 155 | # Recycle Bin used on file shares 156 | $RECYCLE.BIN/ 157 | 158 | # Mac desktop service store files 159 | .DS_Store 160 | 161 | # Ignore dependencies and builds 162 | src/RemoteTech/*.dll 163 | *.zip 164 | GameData/RemoteTech/Plugins/RemoteTech.dll 165 | GameData/build.txt 166 | src/RemoteTech/RemoteTech.sln.ide/ 167 | -------------------------------------------------------------------------------- /CI/.travis.yml: -------------------------------------------------------------------------------- 1 | language: objective-c # force osx machines 2 | 3 | os: 4 | - osx 5 | 6 | env: 7 | global: 8 | - secure: OYC9Mq33uGyJTp/yb9IzXDzYRXuO2M29uXTpRYGJgfWlZaas73hVX1O4LBjHAdXXxPvo53XtGzA/1j5dP/PPRJqddowx0yxSIsUVXIRNNiWLXg2yN88qNn0GuiFwK3a1YRVFPQ9MjjFXvLB96TzNRJJBZW+gQvHKwI9g5cYtYvk= 9 | - secure: J/M1/WIRgP4GssMr9HS9k7Wr9XUqlo0S+olIVWvr8eY8jxxVbx+ONZbkkjKey2BvC1BRVtRXpbBe+YcPLYe7V1jG5mmm3Lc1B/x5WC54q4KKfoV53m+ARAtaHFYrJY2h4O+GLaysQoCwCG/tAt0GhJmgJgy9IojH4ojJjDOGHCE= 10 | 11 | notifications: 12 | slack: remotetech:UMyObqwkLCHGWqwBQ6ZVznxF 13 | 14 | before_install: 15 | - date -u 16 | - uname -a 17 | - export BUILDTAG=`git describe --abbrev=0 --tags` 18 | - env | sort | grep -v ZIPPASSWORD | grep -v GITHUB_TOKEN 19 | 20 | install: 21 | - if [ "${TRAVIS_OS_NAME}" = "linux" ]; then echo "Should only be on OSX"; exit 1; fi 22 | - ./CI/travis.osx.install.deps.sh # it appears TRAVIS_OS_NAME is unset often, assume we're OSX if not linux 23 | 24 | script: 25 | - ./build.remotetech.sh 26 | 27 | # Custom deploy 28 | after_success: 29 | - ./CI/github.build.deploy.sh -------------------------------------------------------------------------------- /CI/build.remotetech.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SRCDIR=src/RemoteTech 4 | 5 | if [ ! -f "$SRCDIR/Assembly-CSharp-firstpass.dll" ] \ 6 | || [ ! -f "$SRCDIR/Assembly-CSharp.dll" ] \ 7 | || [ ! -f "$SRCDIR/UnityEngine.UI.dll" ] \ 8 | || [ ! -f "$SRCDIR/UnityEngine.dll" ]; 9 | then 10 | if [ "$TRAVIS_SECURE_ENV_VARS" = "false" ]; then 11 | # this should only happen for pull requests 12 | echo "Unable to build as the env vars have not been set. Can't decrypt the zip." 13 | exit 1; # can't decide if this should error 14 | fi 15 | 16 | if [[ ! -f dlls.zip ]]; then 17 | echo "Need to get dependency .dll's" 18 | wget -O dlls.zip "https://docs.google.com/uc?authuser=0&id=0B4Q6xg6PGh9vZ2RHNTh0ajFVbUE&export=download" 19 | fi 20 | 21 | if [ -z "$ZIPPASSWORD" ]; then 22 | if [ "$TRAVIS" = "true" ]; then 23 | echo "Password not set, on travis and DLL's missing, can't build"; 24 | exit 1; 25 | else 26 | echo "Password required to decrypt the zip"; 27 | unzip dlls.zip -d src/RemoteTech/ # this will prompt for a password 28 | fi 29 | else 30 | unzip -P "$ZIPPASSWORD" dlls.zip -d src/RemoteTech/ 31 | fi 32 | 33 | rm -f dlls.zip 34 | fi 35 | 36 | cd src/RemoteTech && xbuild /p:Configuration=Release 37 | 38 | -------------------------------------------------------------------------------- /CI/github.build.deploy.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # These should be set by Travis 4 | #TRAVIS_BUILD_NUMBER=1 5 | #TRAVIS_BRANCH=master 6 | #TRAVIS_REPO_SLUG="RemoteTechnologiesGroup/RemoteTech" 7 | #TRAVIS_COMMIT=master 8 | #GITHUB_TOKEN="Personal access token from https://github.com/settings/applications" 9 | #TRAVIS_PULL_REQUEST=false 10 | 11 | VERSION="build-${TRAVIS_BRANCH}-${TRAVIS_BUILD_NUMBER}" 12 | FILENAME=$(echo "${VERSION}.zip" | tr '/' '_') # else it will fail on branches like chore/travis 13 | 14 | python_parse_json() { 15 | # python errors are surpressed for when the key doesn't exist 16 | cat | python -c 'import sys,json;obj=json.load(sys.stdin);print obj[sys.argv[1]];' $1 2>/dev/null 17 | } 18 | 19 | if [ -z "$GITHUB_TOKEN" ] || [ -z "$TRAVIS_REPO_SLUG" ] \ 20 | || [ -z "$TRAVIS_BUILD_NUMBER" ] || [ -z "$TRAVIS_BRANCH" ] \ 21 | || [ -z "$TRAVIS_COMMIT" ] 22 | then 23 | echo "GITHUB_TOKEN, TRAVIS_REPO_SLUG, TRAVIS_BUILD_NUMBER and TRAVIS_COMMIT must be set in order to deploy"; 24 | echo "Skipping deploy for now"; 25 | exit 0; # prevent build failing if unset 26 | fi 27 | 28 | if [ "$TRAVIS_PULL_REQUEST" != "false" ] 29 | then 30 | echo "This is a pull request build, it doesn't need to be released." 31 | exit 0; # prevent build fail 32 | fi 33 | 34 | if [[ "$TRAVIS_BRANCH" == build* ]] 35 | then 36 | echo "We're already on a 'build branch' (or tag), don't need to deploy again"; 37 | exit 0; 38 | fi 39 | 40 | echo "Copy the licence to the gamedata folder" 41 | cp "LICENSE.txt" "GameData/RemoteTech/LICENSE.txt" 42 | 43 | echo "Build ${TRAVIS_BUILD_NUMBER} from branch ${TRAVIS_BRANCH} in ${TRAVIS_REPO_SLUG}" > GameData/build.txt 44 | echo "Built from commit ${TRAVIS_COMMIT} with tag ${BUILDTAG}" >> GameData/build.txt 45 | echo "Creating ${FILENAME}" 46 | zip -r "${FILENAME}" GameData/ 47 | 48 | echo "Attempting to create tag ${VERSION} on ${TRAVIS_REPO_SLUG}" 49 | API_JSON=$(printf '{"tag_name": "%s","target_commitish": "%s","name": "%s","body": "Automated pre-release of branch %s build %s","draft": false,"prerelease": true}' \ 50 | $VERSION $TRAVIS_COMMIT $VERSION $TRAVIS_BRANCH $TRAVIS_BUILD_NUMBER) 51 | ADDRESS=$(printf 'https://api.github.com/repos/%s/releases?access_token=%s' $TRAVIS_REPO_SLUG $GITHUB_TOKEN) 52 | 53 | REPLY=$(curl --data "$API_JSON" "$ADDRESS"); 54 | UPLOAD_ID=$(echo $REPLY | python_parse_json "id") 55 | ERRORS=$(echo $REPLY | python_parse_json "errors"); 56 | 57 | if [ -n "$ERRORS" ] || [ -z "$REPLY" ] || [ -z "$UPLOAD_ID" ] 58 | then 59 | echo "ERROR: An error occured while setting the tag"; 60 | echo $REPLY; 61 | exit 1; 62 | fi 63 | 64 | UPLOAD_URL="https://uploads.github.com/repos/${TRAVIS_REPO_SLUG}/releases/${UPLOAD_ID}/assets" 65 | 66 | echo "Uploading ${FILENAME} to GitHub repo ${UPLOAD_ID} (tag ${VERSION} on ${TRAVIS_REPO_SLUG})" 67 | REPLY=$(curl -H "Authorization: token ${GITHUB_TOKEN}" \ 68 | -H "Accept: application/vnd.github.manifold-preview" \ 69 | -H "Content-Type: application/zip" \ 70 | --data-binary @${FILENAME} \ 71 | "${UPLOAD_URL}?name=${FILENAME}") 72 | 73 | ERRORS=$(echo $REPLY | python_parse_json "errors") 74 | ASSET_ID=$(echo $REPLY | python_parse_json "id" ) 75 | 76 | if [ -n "$ERRORS" ] || [ -z "$REPLY" ] || [ -z "$ASSET_ID" ] 77 | then 78 | echo "ERROR: An error occured while uploading the file to GitHub"; 79 | echo $REPLY; 80 | exit 1; 81 | fi 82 | 83 | echo "Uploaded ${FILENAME} to ${TRAVIS_REPO_SLUG} as asset id ${ASSET_ID}" 84 | -------------------------------------------------------------------------------- /CI/travis.osx.install.deps.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -ev 3 | 4 | MONO_VERSION="3.4.0" 5 | 6 | echo "Installing Mono ${MONO_VERSION}" 7 | wget "http://download.mono-project.com/archive/${MONO_VERSION}/macos-10-x86/MonoFramework-MDK-${MONO_VERSION}.macos10.xamarin.x86.pkg" 8 | sudo installer -pkg "MonoFramework-MDK-${MONO_VERSION}.macos10.xamarin.x86.pkg" -target / -------------------------------------------------------------------------------- /GameData/MM_LICENSE.md: -------------------------------------------------------------------------------- 1 | ModuleManager 2 | ============= 3 | 4 | 5 | Original (c) from Ialdabaoth ( https://github.com/Ialdabaoth ) 6 | 7 | Modified by // Modifications by // Maintained by sarbian ( https://github.com/sarbian ) 8 | 9 | 10 | The original licence requirement was: 11 | 12 | --- 13 | 14 | under a CC share-alike license. Anyone is free to do anything they like with ModuleManager's source, with two caveats: 15 | 16 | 1. You credit me as the original creator that your code is based on 17 | 2. You make it ABSOLUTELY CLEAR that your code is not the original ModuleManager, and that any problems that people have with your fork should be taken up with YOU, not me. 18 | 19 | --- 20 | 21 | 22 | THIS IS NOT THE ORIGINAL MODULEMANAGER CODE. 23 | 24 | Do not bother Ialdabaoth about any problems with it. 25 | 26 | ## Dependencies 27 | 28 | - mono resgen2 29 | - Fedora: `sudo dnf install mono-devel` 30 | - Mono C# Compiler 31 | - Fedora: `sudo ln -s /usr/bin/mcs /usr/bin/gmcs` 32 | 33 | -------------------------------------------------------------------------------- /GameData/ModuleManager.4.2.1.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RemoteTechnologiesGroup/RemoteTech/89cfdcffb1f8f4ea38cc2095fd8ca1eb9ffb486c/GameData/ModuleManager.4.2.1.dll -------------------------------------------------------------------------------- /GameData/RemoteTech/Default_Settings.cfg: -------------------------------------------------------------------------------- 1 | RemoteTechSettings 2 | { 3 | RemoteTechEnabled = True 4 | CommNetEnabled = False 5 | ConsumptionMultiplier = 1 6 | RangeMultiplier = 1 7 | MissionControlRangeMultiplier = 1 8 | OmniRangeClampFactor = 100 9 | DishRangeClampFactor = 1000 10 | ActiveVesselGuid = 35b89a0d664c43c6bec8d0840afc97b2 11 | NoTargetGuid = 00000000-0000-0000-0000-000000000000 12 | SpeedOfLight = 3E+08 13 | MapFilter = Omni, Cone, Path 14 | EnableSignalDelay = True 15 | RangeModelType = Standard 16 | MultipleAntennaMultiplier = 0 17 | ThrottleTimeWarp = True 18 | ThrottleZeroOnNoConnection = True 19 | StopTimeWrapOnReConnection = False 20 | HideGroundStationsBehindBody = True 21 | ControlAntennaWithoutConnection = False 22 | UpgradeableMissionControlAntennas = True 23 | HideGroundStationsOnDistance = True 24 | ShowMouseOverInfoGroundStations = True 25 | AutoInsertKaCAlerts = True 26 | FCLeadTime = 180 27 | FCOffAfterExecute = False 28 | DistanceToHideGroundStations = 3E+07 29 | DishConnectionColor = 0.996078372,0.701960802,0.0313725509,1 30 | OmniConnectionColor = 0.552941203,0.517647088,0.407843113,1 31 | ActiveConnectionColor = 0.65882349,1,0.0156862792,1 32 | RemoteStationColorDot = 0.996078014,0,0,1 33 | DirectConnectionColor = 0,0.749,0.952,1 34 | SignalRelayEnabled = False 35 | IgnoreLineOfSight = False 36 | FCWinPosX = 100 37 | FCWinPosY = 100 38 | FlightTermP = 2.0 39 | FlightTermI = 0.8 40 | FlightTermD = 1.0 41 | GroundStations 42 | { 43 | STATION 44 | { 45 | Guid = 5105f5a9-d628-41c6-ad4b-21154e8fc488 46 | Name = #RT_MissionControl 47 | Latitude = -0.13133150339126601 48 | Longitude = -74.594841003417997 49 | Height = 75 50 | Body = 1 51 | MarkColor = 0.996078014,0,0,1 52 | Antennas 53 | { 54 | ANTENNA 55 | { 56 | Omni = 75000000 57 | Dish = 0 58 | CosAngle = 1 59 | UpgradeableOmni = 4E+06;3.0E+07;7.5E+07 60 | UpgradeableDish = 61 | UpgradeableCosAngle = 62 | } 63 | } 64 | } 65 | } 66 | PreSets 67 | { 68 | PRESETS = RemoteTech/Default_Settings/RemoteTechSettings 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /GameData/RemoteTech/Parts/GigaDish1/model.mu: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RemoteTechnologiesGroup/RemoteTech/89cfdcffb1f8f4ea38cc2095fd8ca1eb9ffb486c/GameData/RemoteTech/Parts/GigaDish1/model.mu -------------------------------------------------------------------------------- /GameData/RemoteTech/Parts/GigaDish1/model000.dds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RemoteTechnologiesGroup/RemoteTech/89cfdcffb1f8f4ea38cc2095fd8ca1eb9ffb486c/GameData/RemoteTech/Parts/GigaDish1/model000.dds -------------------------------------------------------------------------------- /GameData/RemoteTech/Parts/GigaDish1/model001.dds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RemoteTechnologiesGroup/RemoteTech/89cfdcffb1f8f4ea38cc2095fd8ca1eb9ffb486c/GameData/RemoteTech/Parts/GigaDish1/model001.dds -------------------------------------------------------------------------------- /GameData/RemoteTech/Parts/GigaDish1/model002.dds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RemoteTechnologiesGroup/RemoteTech/89cfdcffb1f8f4ea38cc2095fd8ca1eb9ffb486c/GameData/RemoteTech/Parts/GigaDish1/model002.dds -------------------------------------------------------------------------------- /GameData/RemoteTech/Parts/GigaDish1/model003.dds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RemoteTechnologiesGroup/RemoteTech/89cfdcffb1f8f4ea38cc2095fd8ca1eb9ffb486c/GameData/RemoteTech/Parts/GigaDish1/model003.dds -------------------------------------------------------------------------------- /GameData/RemoteTech/Parts/GigaDish1/model004.dds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RemoteTechnologiesGroup/RemoteTech/89cfdcffb1f8f4ea38cc2095fd8ca1eb9ffb486c/GameData/RemoteTech/Parts/GigaDish1/model004.dds -------------------------------------------------------------------------------- /GameData/RemoteTech/Parts/GigaDish1/model005.dds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RemoteTechnologiesGroup/RemoteTech/89cfdcffb1f8f4ea38cc2095fd8ca1eb9ffb486c/GameData/RemoteTech/Parts/GigaDish1/model005.dds -------------------------------------------------------------------------------- /GameData/RemoteTech/Parts/GigaDish1/model006.dds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RemoteTechnologiesGroup/RemoteTech/89cfdcffb1f8f4ea38cc2095fd8ca1eb9ffb486c/GameData/RemoteTech/Parts/GigaDish1/model006.dds -------------------------------------------------------------------------------- /GameData/RemoteTech/Parts/GigaDish1/part.cfg: -------------------------------------------------------------------------------- 1 | PART 2 | { 3 | name = RTGigaDish1 4 | module = Part 5 | author = JDP 6 | 7 | mesh = model.mu 8 | scale = 0.1 9 | 10 | node_stack_bottom = 0, 0, 0, 0.0, -1.0, 0.0 11 | node_attach = 0, 0, 0, 0.0, -1.0, 0.0, 1 12 | 13 | entryCost = 38500 14 | cost = 11000 15 | category = Communication 16 | subcategory = 0 17 | title = #RT_RTGigaDish1_title//Reflectron GX-128 18 | manufacturer = #RT_RTGigaDish1_manufacturer//Parabolic Industries 19 | description = #RT_RTGigaDish1_desc//A massive medium-interplanetary class dish. Wherever you are in the Kerbol system, you'll be able to stay in contact with this. 20 | 21 | attachRules = 1,1,1,0,0 22 | 23 | mass = 0.24 24 | dragModelType = default 25 | maximum_drag = 0.2 26 | minimum_drag = 0.2 27 | angularDrag = 2 28 | crashTolerance = 12 29 | maxTemp = 2900 30 | bulkheadProfiles = size1,srf 31 | 32 | MODULE 33 | { 34 | name = ModuleAnimateGeneric 35 | animationName = Default Take 36 | isOneShot = false 37 | 38 | startEventGUIName = #RemoteTech_Extend//Extend 39 | endEventGUIName = #RemoteTech_Retract//Retract 40 | actionGUIName = #RemoteTech_Toggle//Toggle Antenna 41 | } 42 | } -------------------------------------------------------------------------------- /GameData/RemoteTech/Parts/GigaDish2/model.mu: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RemoteTechnologiesGroup/RemoteTech/89cfdcffb1f8f4ea38cc2095fd8ca1eb9ffb486c/GameData/RemoteTech/Parts/GigaDish2/model.mu -------------------------------------------------------------------------------- /GameData/RemoteTech/Parts/GigaDish2/model000.dds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RemoteTechnologiesGroup/RemoteTech/89cfdcffb1f8f4ea38cc2095fd8ca1eb9ffb486c/GameData/RemoteTech/Parts/GigaDish2/model000.dds -------------------------------------------------------------------------------- /GameData/RemoteTech/Parts/GigaDish2/part.cfg: -------------------------------------------------------------------------------- 1 | PART 2 | { 3 | name = RTGigaDish2 4 | module = Part 5 | author = Carmics 6 | 7 | mesh = model.mu 8 | scale = 0.1 9 | specPower = 0.1 10 | rimFalloff = 3 11 | alphaCutoff = 0.5 12 | 13 | node_stack_bottom = 0, 0, 0, 0.0, -1.0, 0.0 14 | node_attach = 0, 0, 0, 0.0, -1.0, 0.0, 1 15 | 16 | entryCost = 33000 17 | cost = 9500 18 | category = Communication 19 | subcategory = 0 20 | title = #RT_GigaDish2_title//CommTech-1 21 | manufacturer = #RT_GigaDish2_manufacturer//AIES Aerospace 22 | description = #RT_GigaDish2_desc//A powerful high-gain fixed dish. It can reach almost anything in the solar system. 23 | 24 | attachRules = 1,1,1,0,0 25 | 26 | mass = 0.3 27 | dragModelType = default 28 | maximum_drag = 0.2 29 | minimum_drag = 0.2 30 | angularDrag = 2 31 | crashTolerance = 12 32 | maxTemp = 2900 33 | bulkheadProfiles = size3,srf 34 | } -------------------------------------------------------------------------------- /GameData/RemoteTech/Parts/LongAntenna2/part.cfg: -------------------------------------------------------------------------------- 1 | PART 2 | { 3 | MODEL 4 | { 5 | model = Squad/Parts/Utility/commsDish16/model 6 | position = 0.0, 0.0, 0.0 7 | scale = 1.0, 2.0, 1.0 8 | rotation = 0.0, 0.0, 0.0 9 | } 10 | 11 | name = RTLongAntenna2 12 | module = Part 13 | author = NovaSilisko 14 | 15 | mesh = model.mu 16 | scale = 1 17 | rescaleFactor = 1 18 | 19 | node_stack_bottom = 0.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0 20 | node_attach = 0.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0 21 | 22 | entryCost = 1500 23 | cost = 600 24 | category = Communication 25 | subcategory = 0 26 | title = #RT_LongAntenna2_title//Communotron 32 27 | manufacturer = #RT_LongAntenna2_manufacturer//Ionic Protonic Electronics 28 | description = #RT_LongAntenna2_desc//The Communotron 32 is a longer range version of the last generation, now with even more spying potential. If you don't believe us, ask the Kerbal Security Agency. 29 | attachRules = 1,1,0,0,1 30 | 31 | mass = 0.01 32 | dragModelType = default 33 | maximum_drag = 0.2 34 | minimum_drag = 0.2 35 | angularDrag = 2 36 | crashTolerance = 7 37 | maxTemp = 2000 38 | PhysicsSignificance = 1 39 | bulkheadProfiles = size0,srf 40 | tags = aerial antenna radio signal transmi 41 | 42 | MODULE 43 | { 44 | name = ModuleAnimateGeneric 45 | animationName = antenna 46 | isOneShot = false 47 | 48 | startEventGUIName = #RemoteTech_Extend//Extend 49 | endEventGUIName = #RemoteTech_Retract//Retract 50 | actionGUIName = #RemoteTech_Toggle//Toggle Antenna 51 | } 52 | 53 | MODULE 54 | { 55 | name = ModuleCargoPart 56 | stackableQuantity = 4 57 | packedVolume = 2 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /GameData/RemoteTech/Parts/LongAntenna3/model.mu: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RemoteTechnologiesGroup/RemoteTech/89cfdcffb1f8f4ea38cc2095fd8ca1eb9ffb486c/GameData/RemoteTech/Parts/LongAntenna3/model.mu -------------------------------------------------------------------------------- /GameData/RemoteTech/Parts/LongAntenna3/part.cfg: -------------------------------------------------------------------------------- 1 | PART 2 | { 3 | name = RTLongAntenna3 4 | module = Part 5 | author = Carmics 6 | 7 | mesh = model.mu 8 | scale = 1 9 | specPower = 0.1 10 | rimFalloff = 3 11 | alphaCutoff = 0.5 12 | 13 | node_attach = 0.0, 0.0, 0.0, 0.0, -1.0, 0.0 14 | 15 | entryCost = 1000 16 | cost = 400 17 | category = Communication 18 | subcategory = 0 19 | title = #RT_LongAntenna3_title//CommTech EXP-VR-2T 20 | manufacturer = #RT_LongAntenna3_manufacturer//AIES Aerospace 21 | description = #RT_LongAntenna3_desc//This effective and compact folding antenna is highly recommended for your research missions. 22 | 23 | attachRules = 0,1,0,0,1 24 | 25 | mass = 0.02 26 | dragModelType = default 27 | maximum_drag = 0.2 28 | minimum_drag = 0.2 29 | angularDrag = 2 30 | crashTolerance = 8 31 | maxTemp = 1200 32 | PhysicsSignificance = 1 33 | bulkheadProfiles = size0,srf 34 | tags = aerial antenna radio signal transmi 35 | 36 | MODULE 37 | { 38 | name = ModuleAnimateGeneric 39 | animationName = EXTantenna 40 | isOneShot = false 41 | 42 | startEventGUIName = #RemoteTech_Extend//Extend 43 | endEventGUIName = #RemoteTech_Retract//Retract 44 | actionGUIName = #RemoteTech_Toggle//Toggle Antenna 45 | } 46 | 47 | MODULE 48 | { 49 | name = ModuleCargoPart 50 | stackableQuantity = 4 51 | packedVolume = 1 52 | } 53 | } -------------------------------------------------------------------------------- /GameData/RemoteTech/Parts/LongAntenna3/tex.dds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RemoteTechnologiesGroup/RemoteTech/89cfdcffb1f8f4ea38cc2095fd8ca1eb9ffb486c/GameData/RemoteTech/Parts/LongAntenna3/tex.dds -------------------------------------------------------------------------------- /GameData/RemoteTech/Parts/LongDish1/model.mu: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RemoteTechnologiesGroup/RemoteTech/89cfdcffb1f8f4ea38cc2095fd8ca1eb9ffb486c/GameData/RemoteTech/Parts/LongDish1/model.mu -------------------------------------------------------------------------------- /GameData/RemoteTech/Parts/LongDish1/model000.dds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RemoteTechnologiesGroup/RemoteTech/89cfdcffb1f8f4ea38cc2095fd8ca1eb9ffb486c/GameData/RemoteTech/Parts/LongDish1/model000.dds -------------------------------------------------------------------------------- /GameData/RemoteTech/Parts/LongDish1/part.cfg: -------------------------------------------------------------------------------- 1 | PART 2 | { 3 | name = RTLongDish1 4 | module = Part 5 | author = JDP | rkman 6 | 7 | mesh = model.mu 8 | scale = 0.1 9 | specPower = 0.1 10 | rimFalloff = 3 11 | alphaCutoff = 0.5 12 | 13 | node_stack_bottom = 0.0, -0.2, 0.0, 0.0, -1.0, 0.0, 0 14 | node_attach = 0.0, -0.2, 0.0, 0.0, -1.0, 0.0 15 | 16 | entryCost = 6000 17 | cost = 2000 18 | category = -1 19 | subcategory = 0 20 | title = #RT_LongDish1_title//Reflectron LL-5 21 | manufacturer = #RT_LongDish1_manufacturer//Parabolic Industries 22 | description = #RT_LongDish1_desc//This dish will carry your signal out as far as Duna. But don't count on it working further out. Warranty void if used as a salad bowl. 23 | 24 | attachRules = 1,1,0,0,1 25 | 26 | mass = 1.0 27 | dragModelType = default 28 | maximum_drag = 0.2 29 | minimum_drag = 0.2 30 | angularDrag = 2 31 | crashTolerance = 8 32 | maxTemp = 1200 33 | bulkheadProfiles = size1,srf 34 | } -------------------------------------------------------------------------------- /GameData/RemoteTech/Parts/LongDish2/newll5.mu: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RemoteTechnologiesGroup/RemoteTech/89cfdcffb1f8f4ea38cc2095fd8ca1eb9ffb486c/GameData/RemoteTech/Parts/LongDish2/newll5.mu -------------------------------------------------------------------------------- /GameData/RemoteTech/Parts/LongDish2/newll5000.dds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RemoteTechnologiesGroup/RemoteTech/89cfdcffb1f8f4ea38cc2095fd8ca1eb9ffb486c/GameData/RemoteTech/Parts/LongDish2/newll5000.dds -------------------------------------------------------------------------------- /GameData/RemoteTech/Parts/LongDish2/part.cfg: -------------------------------------------------------------------------------- 1 | PART 2 | { 3 | name = RTLongDish2 4 | module = Part 5 | author = kommit 6 | 7 | mesh = newll5.mu 8 | scale = 0.1 9 | specPower = 0.1 10 | rimFalloff = 3 11 | alphaCutoff = 0.5 12 | 13 | node_stack_bottom = 0.0, -0.2, 0.0, 0.0, -1.0, 0.0, 0 14 | node_attach = 0.0, -0.75, 0.0, 0.0, -1.0, 0.0 15 | 16 | entryCost = 6000 17 | cost = 2000 18 | category = Communication 19 | subcategory = 0 20 | title = #RT_LongDish2_title//Reflectron KR-14 21 | manufacturer = #RT_LongDish2_manufacturer//Parabolic Industries 22 | description = #RT_LongDish2_desc//Replacing the LL-5, this dish will carry your signal beyond Duna looking fancier than ever. 23 | 24 | attachRules = 1,1,0,0,1 25 | 26 | mass = 0.2 27 | dragModelType = default 28 | maximum_drag = 0.2 29 | minimum_drag = 0.2 30 | angularDrag = 2 31 | crashTolerance = 8 32 | maxTemp = 1200 33 | bulkheadProfiles = size2,srf 34 | } -------------------------------------------------------------------------------- /GameData/RemoteTech/Parts/ShortAntenna1/model.mu: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RemoteTechnologiesGroup/RemoteTech/89cfdcffb1f8f4ea38cc2095fd8ca1eb9ffb486c/GameData/RemoteTech/Parts/ShortAntenna1/model.mu -------------------------------------------------------------------------------- /GameData/RemoteTech/Parts/ShortAntenna1/model000.dds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RemoteTechnologiesGroup/RemoteTech/89cfdcffb1f8f4ea38cc2095fd8ca1eb9ffb486c/GameData/RemoteTech/Parts/ShortAntenna1/model000.dds -------------------------------------------------------------------------------- /GameData/RemoteTech/Parts/ShortAntenna1/part.cfg: -------------------------------------------------------------------------------- 1 | PART 2 | { 3 | name = RTShortAntenna1 4 | module = Part 5 | author = JDP | rkman 6 | 7 | mesh = model.mu 8 | scale = 0.1 9 | specPower = 0.1 10 | rimFalloff = 3 11 | alphaCutoff = 0.5 12 | 13 | node_attach = 0.21, 0.0, 0.0, 1.0, 0.0, 0.0 14 | 15 | entryCost = 200 16 | cost = 60 17 | category = Communication 18 | subcategory = 0 19 | title = #RT_ShortAntenna1_title//Reflectron DP-10 20 | manufacturer = #RT_ShortAntenna1_manufacturer//Parabolic Industries 21 | description = #RT_ShortAntenna1_desc//When moving this antenna to a test site, engineers always forgot to turn it on. Frustrated with having to walk back and forth, they had this antenna be active by default. 22 | 23 | attachRules = 0,1,0,0,0 24 | 25 | mass = 0.015 26 | dragModelType = default 27 | maximum_drag = 0.2 28 | minimum_drag = 0.2 29 | angularDrag = 2 30 | crashTolerance = 7 31 | maxTemp = 2000 // = 3000 32 | PhysicsSignificance = 1 33 | bulkheadProfiles = size0,srf 34 | tags = aerial antenna radio signal transmi 35 | 36 | MODULE 37 | { 38 | name = ModuleCargoPart 39 | stackableQuantity = 4 40 | packedVolume = 5 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /GameData/RemoteTech/Parts/ShortDish1/model.mu: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RemoteTechnologiesGroup/RemoteTech/89cfdcffb1f8f4ea38cc2095fd8ca1eb9ffb486c/GameData/RemoteTech/Parts/ShortDish1/model.mu -------------------------------------------------------------------------------- /GameData/RemoteTech/Parts/ShortDish1/model000.dds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RemoteTechnologiesGroup/RemoteTech/89cfdcffb1f8f4ea38cc2095fd8ca1eb9ffb486c/GameData/RemoteTech/Parts/ShortDish1/model000.dds -------------------------------------------------------------------------------- /GameData/RemoteTech/Parts/ShortDish1/part.cfg: -------------------------------------------------------------------------------- 1 | PART 2 | { 3 | name = RTShortDish1 4 | module = Part 5 | author = JDP 6 | 7 | mesh = model.mu 8 | scale = 0.1 9 | specPower = 0.1 10 | rimFalloff = 3 11 | alphaCutoff = 0.5 12 | 13 | node_stack_bottom = 0.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0 14 | node_attach = 0.0, 0.0, 0.0, 0.0, -1.0, 0.0 15 | 16 | entryCost = 2000 17 | cost = 800 18 | category = -1 19 | subcategory = 0 20 | title = #RT_ShortDish1_title//Reflectron SS-5 21 | manufacturer = #RT_ShortDish1_manufacturer//Parabolic Industries. 22 | description = #RT_ShortDish1_desc//If you want to break the surly bonds of Kerbin, you will need some serious range. What once was considered a mere garbage can lid is now the cornerstone of Münar communication. 23 | 24 | attachRules = 1,1,0,0,1 25 | 26 | mass = 0.5 27 | dragModelType = default 28 | maximum_drag = 0.2 29 | minimum_drag = 0.2 30 | angularDrag = 2 31 | crashTolerance = 8 32 | maxTemp = 1200 33 | bulkheadProfiles = size1,srf 34 | } -------------------------------------------------------------------------------- /GameData/RemoteTech/Parts/ShortDish2/newss5.mu: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RemoteTechnologiesGroup/RemoteTech/89cfdcffb1f8f4ea38cc2095fd8ca1eb9ffb486c/GameData/RemoteTech/Parts/ShortDish2/newss5.mu -------------------------------------------------------------------------------- /GameData/RemoteTech/Parts/ShortDish2/newss5000.dds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RemoteTechnologiesGroup/RemoteTech/89cfdcffb1f8f4ea38cc2095fd8ca1eb9ffb486c/GameData/RemoteTech/Parts/ShortDish2/newss5000.dds -------------------------------------------------------------------------------- /GameData/RemoteTech/Parts/ShortDish2/part.cfg: -------------------------------------------------------------------------------- 1 | PART 2 | { 3 | name = RTShortDish2 4 | module = Part 5 | author = kommit 6 | 7 | mesh = newss5.mu 8 | scale = 0.1 9 | specPower = 0.1 10 | rimFalloff = 3 11 | alphaCutoff = 0.5 12 | 13 | node_stack_bottom = 0.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0 14 | node_attach = 0.0, -0.225, 0.0, 0.0, -1.0, 0.0 15 | 16 | entryCost = 2000 17 | cost = 800 18 | category = Communication 19 | subcategory = 0 20 | title = #RT_ShortDish2_title// Reflectron KR-7 21 | manufacturer = #RT_ShortDish2_manufacturer//Parabolic Industries. 22 | description = #RT_ShortDish2_desc//Locals complained about their missing garbage lids, so our engineers quickly developed an alternative. Matching performance with the SS-5 for only double the cost! 23 | 24 | attachRules = 1,1,0,0,1 25 | 26 | mass = 0.05 27 | dragModelType = default 28 | maximum_drag = 0.2 29 | minimum_drag = 0.2 30 | angularDrag = 2 31 | crashTolerance = 8 32 | maxTemp = 1200 33 | bulkheadProfiles = size1,srf 34 | 35 | MODULE 36 | { 37 | name = ModuleCargoPart 38 | packedVolume = 650 39 | } 40 | } -------------------------------------------------------------------------------- /GameData/RemoteTech/RemoteTech.version: -------------------------------------------------------------------------------- 1 | { 2 | "NAME": "RemoteTech", 3 | "URL": "https://raw.githubusercontent.com/RemoteTechnologiesGroup/RemoteTech/master/GameData/RemoteTech/RemoteTech.version", 4 | "CHANGE_LOG_URL": "https://raw.githubusercontent.com/RemoteTechnologiesGroup/RemoteTech/master/CHANGES.md", 5 | "DOWNLOAD": "http://spacedock.info/mod/520/RemoteTech", 6 | "GITHUB": 7 | { 8 | "USERNAME": "RemoteTechnologiesGroup", 9 | "REPOSITORY": "RemoteTech", 10 | "ALLOW_PRE_RELEASE": false 11 | }, 12 | "VERSION":{ 13 | "MAJOR":1, 14 | "MINOR":9, 15 | "PATCH":12, 16 | "BUILD":0 17 | }, 18 | "KSP_VERSION":{ 19 | "MAJOR":1, 20 | "MINOR":12, 21 | "PATCH":1 22 | }, 23 | "KSP_VERSION_MIN":{ 24 | "MAJOR":1, 25 | "MINOR":12, 26 | "PATCH":0 27 | }, 28 | "KSP_VERSION_MAX":{ 29 | "MAJOR":1, 30 | "MINOR":12, 31 | "PATCH":1 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /GameData/RemoteTech/RemoteTech_AIES_Probes.cfg: -------------------------------------------------------------------------------- 1 | // Support for AIES probe cores 2 | // Original config by deepfield 3 | 4 | // Explon 6D 5 | @PART[explonpod]:AFTER[AIES_Aerospace]:NEEDS[RemoteTech] 6 | { 7 | %MODULE[ModuleSPU] { 8 | %IsRTCommandStation = true 9 | %RTCommandMinCrew = 6 10 | } 11 | 12 | %MODULE[ModuleRTAntennaPassive] { 13 | %TechRequired = unmannedTech 14 | %OmniRange = 3000 15 | 16 | %TRANSMITTER { 17 | %PacketInterval = 0.3 18 | %PacketSize = 2 19 | %PacketResourceCost = 15.0 20 | } 21 | } 22 | } 23 | 24 | // RC7 'Invest' 25 | @PART[investpod]:AFTER[AIES_Aerospace]:NEEDS[RemoteTech] 26 | { 27 | %MODULE[ModuleSPU] {} 28 | 29 | %MODULE[ModuleRTAntennaPassive] { 30 | %TechRequired = unmannedTech 31 | %OmniRange = 3000 32 | 33 | %TRANSMITTER { 34 | %PacketInterval = 0.3 35 | %PacketSize = 2 36 | %PacketResourceCost = 15.0 37 | } 38 | } 39 | } 40 | 41 | // RC3 'Maxur' 42 | @PART[Maxurpod]:AFTER[AIES_Aerospace]:NEEDS[RemoteTech] 43 | { 44 | %MODULE[ModuleSPU] {} 45 | 46 | %MODULE[ModuleRTAntennaPassive] { 47 | %TechRequired = unmannedTech 48 | %OmniRange = 3000 49 | 50 | %TRANSMITTER { 51 | %PacketInterval = 0.3 52 | %PacketSize = 2 53 | %PacketResourceCost = 15.0 54 | } 55 | } 56 | } 57 | 58 | // C2 'Neptuno' 59 | @PART[neptuno]:AFTER[AIES_Aerospace]:NEEDS[RemoteTech] 60 | { 61 | %MODULE[ModuleSPU] { 62 | %IsRTCommandStation = true 63 | %RTCommandMinCrew = 6 64 | } 65 | 66 | %MODULE[ModuleRTAntennaPassive] { 67 | %TechRequired = unmannedTech 68 | %OmniRange = 3000 69 | 70 | %TRANSMITTER { 71 | %PacketInterval = 0.3 72 | %PacketSize = 2 73 | %PacketResourceCost = 15.0 74 | } 75 | } 76 | } 77 | 78 | // G1 'Nova' 79 | @PART[novapod]:AFTER[AIES_Aerospace]:NEEDS[RemoteTech] 80 | { 81 | %MODULE[ModuleSPU] {} 82 | 83 | %MODULE[ModuleRTAntennaPassive] { 84 | %TechRequired = unmannedTech 85 | %OmniRange = 3000 86 | 87 | %TRANSMITTER { 88 | %PacketInterval = 0.3 89 | %PacketSize = 2 90 | %PacketResourceCost = 15.0 91 | } 92 | } 93 | } 94 | 95 | // VR2 'Sondex' 96 | @PART[sondex2pod]:AFTER[AIES_Aerospace]:NEEDS[RemoteTech] 97 | { 98 | %MODULE[ModuleSPU] {} 99 | 100 | %MODULE[ModuleRTAntennaPassive] { 101 | %TechRequired = unmannedTech 102 | %OmniRange = 3000 103 | 104 | %TRANSMITTER { 105 | %PacketInterval = 0.3 106 | %PacketSize = 2 107 | %PacketResourceCost = 15.0 108 | } 109 | } 110 | } 111 | 112 | // R350 'TOR' 113 | @PART[torpod]:AFTER[AIES_Aerospace]:NEEDS[RemoteTech] 114 | { 115 | %MODULE[ModuleSPU] {} 116 | 117 | %MODULE[ModuleRTAntennaPassive] { 118 | %TechRequired = unmannedTech 119 | %OmniRange = 3000 120 | 121 | %TRANSMITTER { 122 | %PacketInterval = 0.3 123 | %PacketSize = 2 124 | %PacketResourceCost = 15.0 125 | } 126 | } 127 | } 128 | 129 | // UAE 'Cubeplate' 130 | @PART[UAEcubplate]:AFTER[AIES_Aerospace]:NEEDS[RemoteTech] 131 | { 132 | %MODULE[ModuleSPU] {} 133 | 134 | %MODULE[ModuleRTAntennaPassive] { 135 | %TechRequired = unmannedTech 136 | %OmniRange = 3000 137 | 138 | %TRANSMITTER { 139 | %PacketInterval = 0.3 140 | %PacketSize = 2 141 | %PacketResourceCost = 15.0 142 | } 143 | } 144 | } 145 | -------------------------------------------------------------------------------- /GameData/RemoteTech/RemoteTech_Antennas.cfg: -------------------------------------------------------------------------------- 1 | // Centralized configuration of new antenna properties 2 | // Original config by Cilph 3 | 4 | @PART[RTShortAntenna1]:FOR[RemoteTech] 5 | { 6 | %TechRequired = start 7 | %MODULE[ModuleRTAntenna] { 8 | %IsRTActive = true 9 | %Mode0OmniRange = 0 10 | %Mode1OmniRange = 500000 11 | %EnergyCost = 0.01 12 | 13 | %TRANSMITTER { 14 | %PacketInterval = 0.3 15 | %PacketSize = 2 16 | %PacketResourceCost = 15.0 17 | } 18 | } 19 | 20 | %MODULE[ModuleSPUPassive] {} 21 | } 22 | 23 | @PART[RTLongAntenna2]:FOR[RemoteTech] 24 | { 25 | %TechRequired = largeElectrics 26 | @MODULE[ModuleAnimateGeneric] 27 | { 28 | %allowManualControl = false 29 | %actionAvailable = false 30 | %eventAvailableFlight = false 31 | %eventAvailableEditor = false 32 | %eventAvailableEVA = false 33 | } 34 | 35 | %MODULE[ModuleRTAntenna] { 36 | %Mode0OmniRange = 0 37 | %Mode1OmniRange = 5000000 38 | %MaxQ = 3000 39 | %EnergyCost = 0.6 40 | 41 | %DeployFxModules = 0 42 | 43 | %TRANSMITTER { 44 | %PacketInterval = 0.3 45 | %PacketSize = 2 46 | %PacketResourceCost = 15.0 47 | } 48 | } 49 | 50 | %MODULE[ModuleSPUPassive] {} 51 | } 52 | 53 | @PART[RTLongAntenna3]:FOR[RemoteTech] 54 | { 55 | %TechRequired = specializedElectrics 56 | @MODULE[ModuleAnimateGeneric] 57 | { 58 | %allowManualControl = false 59 | %actionAvailable = false 60 | %eventAvailableFlight = false 61 | %eventAvailableEditor = false 62 | %eventAvailableEVA = false 63 | } 64 | 65 | %MODULE[ModuleRTAntenna] { 66 | %Mode0OmniRange = 0 67 | %Mode1OmniRange = 3000000 68 | %MaxQ = 6000 69 | %EnergyCost = 0.18 70 | 71 | %DeployFxModules = 0 72 | 73 | %TRANSMITTER { 74 | %PacketInterval = 0.3 75 | %PacketSize = 2 76 | %PacketResourceCost = 15.0 77 | } 78 | } 79 | 80 | %MODULE[ModuleSPUPassive] {} 81 | } 82 | 83 | @PART[RTShortDish1]:FOR[RemoteTech] 84 | { 85 | %MODULE[ModuleRTAntenna] { 86 | %Mode0DishRange = 0 87 | %Mode1DishRange = 90000000 88 | %EnergyCost = 0.82 89 | %DishAngle = 25.0 90 | 91 | %TRANSMITTER { 92 | %PacketInterval = 0.3 93 | %PacketSize = 2 94 | %PacketResourceCost = 15.0 95 | } 96 | } 97 | 98 | %MODULE[ModuleSPUPassive] {} 99 | } 100 | 101 | @PART[RTShortDish2]:FOR[RemoteTech] 102 | { 103 | %TechRequired = electrics 104 | %MODULE[ModuleRTAntenna] { 105 | %Mode0DishRange = 0 106 | %Mode1DishRange = 90000000 107 | %EnergyCost = 0.82 108 | %DishAngle = 25.0 109 | 110 | %TRANSMITTER { 111 | %PacketInterval = 0.3 112 | %PacketSize = 2 113 | %PacketResourceCost = 15.0 114 | } 115 | } 116 | 117 | %MODULE[ModuleSPUPassive] {} 118 | } 119 | 120 | @PART[RTLongDish1]:FOR[RemoteTech] 121 | { 122 | %MODULE[ModuleRTAntenna] { 123 | %Mode0DishRange = 0 124 | %Mode1DishRange = 60000000000 125 | %EnergyCost = 0.93 126 | %DishAngle = 0.04 127 | 128 | %TRANSMITTER { 129 | %PacketInterval = 0.3 130 | %PacketSize = 2 131 | %PacketResourceCost = 15.0 132 | } 133 | } 134 | 135 | %MODULE[ModuleSPUPassive] {} 136 | } 137 | 138 | @PART[RTLongDish2]:FOR[RemoteTech] 139 | { 140 | %TechRequired = largeElectrics 141 | %MODULE[ModuleRTAntenna] { 142 | %Mode0DishRange = 0 143 | %Mode1DishRange = 60000000000 144 | %EnergyCost = 0.93 145 | %DishAngle = 0.04 146 | 147 | %TRANSMITTER { 148 | %PacketInterval = 0.3 149 | %PacketSize = 2 150 | %PacketResourceCost = 15.0 151 | } 152 | } 153 | 154 | %MODULE[ModuleSPUPassive] {} 155 | } 156 | 157 | @PART[RTGigaDish1]:FOR[RemoteTech] 158 | { 159 | %TechRequired = advScienceTech 160 | @MODULE[ModuleAnimateGeneric] 161 | { 162 | %allowManualControl = false 163 | %actionAvailable = false 164 | %eventAvailableFlight = false 165 | %eventAvailableEditor = false 166 | %eventAvailableEVA = false 167 | } 168 | 169 | %MODULE[ModuleRTAntenna] { 170 | %Mode0DishRange = 0 171 | %Mode1DishRange = 400000000000 172 | %EnergyCost = 2.80 173 | %MaxQ = 6000 174 | %DishAngle = 0.005 175 | 176 | %DeployFxModules = 0 177 | 178 | %TRANSMITTER { 179 | %PacketInterval = 0.3 180 | %PacketSize = 2 181 | %PacketResourceCost = 15.0 182 | } 183 | } 184 | 185 | %MODULE[ModuleSPUPassive] {} 186 | } 187 | 188 | @PART[RTGigaDish2]:FOR[RemoteTech] 189 | { 190 | %TechRequired = specializedElectrics 191 | %MODULE[ModuleRTAntenna] { 192 | %Mode0DishRange = 0 193 | %Mode1DishRange = 350000000000 194 | %EnergyCost = 2.60 195 | %DishAngle = 0.006 196 | 197 | %TRANSMITTER { 198 | %PacketInterval = 0.3 199 | %PacketSize = 2 200 | %PacketResourceCost = 15.0 201 | } 202 | } 203 | 204 | %MODULE[ModuleSPUPassive] {} 205 | } -------------------------------------------------------------------------------- /GameData/RemoteTech/RemoteTech_B9_Probes.cfg: -------------------------------------------------------------------------------- 1 | // Support for B9 probe cores 2 | // Original config by Starstrider42 3 | 4 | @PART[B9_Cockpit_D25]:AFTER[B9_Aerospace]:NEEDS[RemoteTech] 5 | { 6 | %MODULE[ModuleSPU] { 7 | %IsRTCommandStation = true 8 | %RTCommandMinCrew = 6 9 | } 10 | 11 | %MODULE[ModuleRTAntennaPassive] { 12 | %TechRequired = unmannedTech 13 | %OmniRange = 3000 14 | 15 | %TRANSMITTER { 16 | %PacketInterval = 0.3 17 | %PacketSize = 2 18 | %PacketResourceCost = 15.0 19 | } 20 | } 21 | } 22 | 23 | @PART[B9_Cockpit_MK1_Control_ACU]:AFTER[B9_Aerospace]:NEEDS[RemoteTech] 24 | { 25 | %MODULE[ModuleSPU] { 26 | } 27 | 28 | %MODULE[ModuleRTAntennaPassive] { 29 | %TechRequired = unmannedTech 30 | %OmniRange = 3000 31 | 32 | %TRANSMITTER { 33 | %PacketInterval = 0.3 34 | %PacketSize = 2 35 | %PacketResourceCost = 15.0 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /GameData/RemoteTech/RemoteTech_CactEye_Probes.cfg: -------------------------------------------------------------------------------- 1 | // Support for stock probe cores 2 | // Original config by xZise 3 | 4 | @PART[probeCoreSlim]:FOR[RemoteTech] 5 | { 6 | %MODULE[ModuleSPU] { 7 | } 8 | 9 | %MODULE[ModuleRTAntennaPassive] { 10 | %TechRequired = unmannedTech 11 | %OmniRange = 3000 12 | 13 | %TRANSMITTER { 14 | %PacketInterval = 0.3 15 | %PacketSize = 2 16 | %PacketResourceCost = 15.0 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /GameData/RemoteTech/RemoteTech_FASA_Probes.cfg: -------------------------------------------------------------------------------- 1 | // Support for FASA probe cores 2 | // Original config by reignerok, used with permission 3 | 4 | @PART[FASAExplorerProbe]:AFTER[FASA]:NEEDS[RemoteTech] // Explorer Probe Core 5 | { 6 | %MODULE[ModuleSPU] { 7 | } 8 | 9 | // Probe core has a standard omni antenna; passive antenna is redundant 10 | } 11 | 12 | @PART[FASAApolloIU]:AFTER[FASA]:NEEDS[RemoteTech] // Apollo Instrument Unit 13 | { 14 | %MODULE[ModuleSPU] { 15 | } 16 | 17 | %MODULE[ModuleRTAntennaPassive] { 18 | %TechRequired = unmannedTech 19 | %OmniRange = 3000 20 | 21 | %TRANSMITTER { 22 | %PacketInterval = 0.3 23 | %PacketSize = 2 24 | %PacketResourceCost = 15.0 25 | } 26 | } 27 | } 28 | 29 | @PART[FASAAgenaProbe]:AFTER[FASA]:NEEDS[RemoteTech] // Agena Probe Core 30 | { 31 | %MODULE[ModuleSPU] { 32 | } 33 | 34 | %MODULE[ModuleRTAntennaPassive] { 35 | %TechRequired = unmannedTech 36 | %OmniRange = 3000 37 | 38 | %TRANSMITTER { 39 | %PacketInterval = 0.3 40 | %PacketSize = 2 41 | %PacketResourceCost = 15.0 42 | } 43 | } 44 | } 45 | 46 | @PART[FASAICBMProbe]:AFTER[FASA]:NEEDS[RemoteTech] // MIRV Computer Core 47 | { 48 | %MODULE[ModuleSPU] { 49 | } 50 | 51 | %MODULE[ModuleRTAntennaPassive] { 52 | %TechRequired = unmannedTech 53 | %OmniRange = 3000 54 | 55 | %TRANSMITTER { 56 | %PacketInterval = 0.3 57 | %PacketSize = 2 58 | %PacketResourceCost = 15.0 59 | } 60 | } 61 | } 62 | 63 | @PART[FASA_Gemini_ASAS_Comp]:AFTER[FASA]:NEEDS[RemoteTech] // Gemini ASAS Mini Computer 64 | { 65 | %MODULE[ModuleSPU] { 66 | } 67 | 68 | %MODULE[ModuleRTAntennaPassive] { 69 | %TechRequired = unmannedTech 70 | %OmniRange = 3000 71 | 72 | %TRANSMITTER { 73 | %PacketInterval = 0.3 74 | %PacketSize = 2 75 | %PacketResourceCost = 15.0 76 | } 77 | } 78 | } 79 | 80 | @PART[FASAPioneerProbe]:AFTER[FASA]:NEEDS[RemoteTech] // Pioneer probe 81 | { 82 | %MODULE[ModuleSPU] { 83 | } 84 | 85 | %MODULE[ModuleRTAntennaPassive] { 86 | %TechRequired = unmannedTech 87 | %OmniRange = 3000 88 | 89 | %TRANSMITTER { 90 | %PacketInterval = 0.3 91 | %PacketSize = 2 92 | %PacketResourceCost = 15.0 93 | } 94 | } 95 | } -------------------------------------------------------------------------------- /GameData/RemoteTech/RemoteTech_HGR.cfg: -------------------------------------------------------------------------------- 1 | // Speedwaystar's RemoteTech patch for HGRSolarPanels 2 | // omni antenna, ranges = 100km undeployed and 1500km deployed 3 | @PART[HGRSolarPanels1]:NEEDS[RemoteTech]:FIRST 4 | { 5 | !MODULE[ModuleDataTransmitter] {} 6 | %MODULE[ModuleRTAntenna] 7 | { 8 | %Mode0OmniRange = 100000 9 | %Mode1OmniRange = 1500000 10 | %EnergyCost = 0.05 11 | %DeployFxModules = 1 12 | %TRANSMITTER 13 | { 14 | %PacketInterval = 0.4 15 | %PacketSize = 2 16 | %PacketResourceCost = 12.0 17 | } 18 | } 19 | %MODULE[ModuleSPUPassive] {} 20 | } -------------------------------------------------------------------------------- /GameData/RemoteTech/RemoteTech_LLL_Antennas.cfg: -------------------------------------------------------------------------------- 1 | // Support for LackLuster Labs antennas 2 | // Original config by Starstrider42 3 | 4 | //---------------------------------------------------------- 5 | // Omni Antennas 6 | 7 | // Communotron 32 8 | // Heavier than RT's Communotron 32 9 | @PART[LLLCommPole2]:AFTER[LLL]:NEEDS[RemoteTech] 10 | { 11 | !MODULE[ModuleDataTransmitter] {} 12 | 13 | %MODULE[ModuleRTAntenna] { 14 | %Mode0OmniRange = 0 15 | %Mode1OmniRange = 7000000 16 | %EnergyCost = 0.50 17 | 18 | %TRANSMITTER 19 | { 20 | %PacketInterval = 0.3 21 | %PacketSize = 2 22 | %PacketResourceCost = 15.0 23 | } 24 | } 25 | 26 | %MODULE[ModuleSPUPassive] {} 27 | } 28 | 29 | // Communotron 64 30 | // Same mass as LLL's Communotron 32 31 | @PART[LLLCommPole]:AFTER[LLL]:NEEDS[RemoteTech] 32 | { 33 | !MODULE[ModuleDataTransmitter] {} 34 | 35 | %MODULE[ModuleRTAntenna] { 36 | %Mode0OmniRange = 0 37 | %Mode1OmniRange = 15000000 38 | %EnergyCost = 1.50 39 | 40 | %TRANSMITTER 41 | { 42 | %PacketInterval = 0.3 43 | %PacketSize = 2 44 | %PacketResourceCost = 15.0 45 | } 46 | } 47 | 48 | %MODULE[ModuleSPUPassive] {} 49 | } 50 | 51 | // Comm Tower 52 | // As heavy as an interplanetary dish 53 | @PART[Commtow]:AFTER[LLL]:NEEDS[RemoteTech] 54 | { 55 | !MODULE[ModuleDataTransmitter] {} 56 | 57 | %MODULE[ModuleRTAntenna] { 58 | %Mode0OmniRange = 0 59 | %Mode1OmniRange = 50000000 60 | %EnergyCost = 10.0 61 | 62 | %TRANSMITTER 63 | { 64 | %PacketInterval = 0.3 65 | %PacketSize = 2 66 | %PacketResourceCost = 15.0 67 | } 68 | } 69 | 70 | %MODULE[ModuleSPUPassive] {} 71 | } 72 | 73 | //---------------------------------------------------------- 74 | // Dishes 75 | 76 | // Small Fixed Satellite Dish 77 | // Much smaller than any other dish, and as light as an omni 78 | @PART[LLLAttchDishSmall]:AFTER[LLL]:NEEDS[RemoteTech] 79 | { 80 | !MODULE[ModuleDataTransmitter] {} 81 | 82 | %MODULE[ModuleRTAntenna] { 83 | %Mode0DishRange = 0 84 | %Mode1DishRange = 5000000 85 | %EnergyCost = 0.30 86 | %DishAngle = 120.0 87 | 88 | %TRANSMITTER 89 | { 90 | %PacketInterval = 0.3 91 | %PacketSize = 2 92 | %PacketResourceCost = 15.0 93 | } 94 | } 95 | 96 | %MODULE[ModuleSPUPassive] {} 97 | } 98 | 99 | // Fixed Satellite Dish 100 | // Somewhat lighter than the KR-7, but bigger 101 | @PART[LLLAttchDish]:AFTER[LLL]:NEEDS[RemoteTech] 102 | { 103 | !MODULE[ModuleDataTransmitter] {} 104 | 105 | %MODULE[ModuleRTAntenna] { 106 | %Mode0DishRange = 0 107 | %Mode1DishRange = 90000000 108 | %EnergyCost = 0.50 109 | %DishAngle = 15.0 110 | 111 | %TRANSMITTER 112 | { 113 | %PacketInterval = 0.3 114 | %PacketSize = 2 115 | %PacketResourceCost = 15.0 116 | } 117 | } 118 | 119 | %MODULE[ModuleSPUPassive] {} 120 | } 121 | 122 | // Scanning Dish Satellite 123 | // Comparable to Fixed Satellite Dish in size 124 | // Give it a wider cone and a MUCH higher power consumption 125 | @PART[LLLRotDish]:AFTER[LLL]:NEEDS[RemoteTech] 126 | { 127 | !MODULE[ModuleDataTransmitter] {} 128 | 129 | %MODULE[ModuleRTAntenna] { 130 | %Mode0DishRange = 0 131 | %Mode1DishRange = 90000000 132 | %EnergyCost = 1.50 133 | %DishAngle = 45.0 134 | 135 | %TRANSMITTER 136 | { 137 | %PacketInterval = 0.3 138 | %PacketSize = 2 139 | %PacketResourceCost = 15.0 140 | } 141 | } 142 | 143 | %MODULE[ModuleSPUPassive] {} 144 | } 145 | 146 | // Large Scanning Dish Satellite 147 | // As big as the GX-128 148 | // Give it a wider cone and a MUCH higher power consumption 149 | @PART[LLLRotDish2-5]:AFTER[LLL]:NEEDS[RemoteTech] 150 | { 151 | !MODULE[ModuleDataTransmitter] {} 152 | 153 | %MODULE[ModuleRTAntenna] { 154 | %Mode0DishRange = 0 155 | %Mode1DishRange = 400000000000 156 | %EnergyCost = 20.0 157 | %DishAngle = 0.03 158 | 159 | %TRANSMITTER 160 | { 161 | %PacketInterval = 0.3 162 | %PacketSize = 2 163 | %PacketResourceCost = 15.0 164 | } 165 | } 166 | 167 | %MODULE[ModuleSPUPassive] {} 168 | } 169 | 170 | // Omni Radar 171 | // Data transmission is not its main strength, so make it basic 172 | @PART[PolyRadar]:AFTER[LLL]:NEEDS[RemoteTech] 173 | { 174 | !MODULE[ModuleDataTransmitter] {} 175 | 176 | %MODULE[ModuleRTAntenna] { 177 | %Mode0DishRange = 0 178 | %Mode1DishRange = 35000000 179 | %EnergyCost = 0.80 180 | %DishAngle = 15.0 181 | 182 | %TRANSMITTER 183 | { 184 | %PacketInterval = 0.3 185 | %PacketSize = 2 186 | %PacketResourceCost = 15.0 187 | } 188 | } 189 | 190 | %MODULE[ModuleSPUPassive] {} 191 | } 192 | -------------------------------------------------------------------------------- /GameData/RemoteTech/RemoteTech_LLL_Probes.cfg: -------------------------------------------------------------------------------- 1 | // Support for LackLuster Labs probe cores 2 | // Original config by Starstrider42 3 | 4 | @PART[2x1Probe]:AFTER[LLL]:NEEDS[RemoteTech] 5 | { 6 | %MODULE[ModuleSPU] { 7 | } 8 | 9 | %MODULE[ModuleRTAntennaPassive] { 10 | %TechRequired = unmannedTech 11 | %OmniRange = 3000 12 | 13 | %TRANSMITTER { 14 | %PacketInterval = 0.3 15 | %PacketSize = 2 16 | %PacketResourceCost = 15.0 17 | } 18 | } 19 | } 20 | 21 | @PART[4x2Probe]:AFTER[LLL]:NEEDS[RemoteTech] 22 | { 23 | %MODULE[ModuleSPU] { 24 | %IsRTCommandStation = true 25 | %RTCommandMinCrew = 6 26 | } 27 | 28 | %MODULE[ModuleRTAntennaPassive] { 29 | %TechRequired = unmannedTech 30 | %OmniRange = 3000 31 | 32 | %TRANSMITTER { 33 | %PacketInterval = 0.3 34 | %PacketSize = 2 35 | %PacketResourceCost = 15.0 36 | } 37 | } 38 | } 39 | 40 | @PART[BERTY3]:AFTER[LLL]:NEEDS[RemoteTech] 41 | { 42 | %MODULE[ModuleSPU] { 43 | } 44 | 45 | %MODULE[ModuleRTAntennaPassive] { 46 | %TechRequired = unmannedTech 47 | %OmniRange = 3000 48 | 49 | %TRANSMITTER { 50 | %PacketInterval = 0.3 51 | %PacketSize = 2 52 | %PacketResourceCost = 15.0 53 | } 54 | } 55 | } 56 | 57 | @PART[LLL1x1NoseProbe]:AFTER[LLL]:NEEDS[RemoteTech] 58 | { 59 | %MODULE[ModuleSPU] { 60 | } 61 | 62 | %MODULE[ModuleRTAntennaPassive] { 63 | %TechRequired = unmannedTech 64 | %OmniRange = 3000 65 | 66 | %TRANSMITTER { 67 | %PacketInterval = 0.3 68 | %PacketSize = 2 69 | %PacketResourceCost = 15.0 70 | } 71 | } 72 | } 73 | 74 | @PART[LLLMicrochip] 75 | { 76 | MODULE 77 | { 78 | name = ModuleSPU 79 | IsRTCommandStation = true 80 | } 81 | 82 | MODULE 83 | { 84 | name = ModuleRTAntennaPassive 85 | TechRequired = unmannedTech 86 | OmniRange = 2 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /GameData/RemoteTech/RemoteTech_MarkIV_System.cfg: -------------------------------------------------------------------------------- 1 | // RemoteTech Compatibility Patch For Mark IV Spaceplane System 2 | // Author: Sandriell (http://forum.kerbalspaceprogram.com/index.php?/profile/165509-sandriell/) 3 | 4 | // Mk4 Drone Core 5 | @PART[mk4drone-1]:NEEDS[RemoteTech] 6 | { 7 | %MODULE[ModuleSPU] { 8 | } 9 | 10 | %MODULE[ModuleRTAntennaPassive] { 11 | %TechRequired = unmannedTech 12 | %OmniRange = 3000 13 | 14 | %TRANSMITTER { 15 | %PacketInterval = 0.3 16 | %PacketSize = 2 17 | %PacketResourceCost = 15.0 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /GameData/RemoteTech/RemoteTech_MechJeb.cfg: -------------------------------------------------------------------------------- 1 | // Support for MechJeb probe core 2 | // Original config by Cilph 3 | 4 | @PART[mumech_MJ2_AR202]:HAS[!MODULE[ModuleSPU]]:AFTER[MechJeb2]:NEEDS[RemoteTech] 5 | { 6 | // Append tag to the existing part name 7 | @title ^= :$: (ModuleSPU): 8 | 9 | MODULE 10 | { 11 | name = ModuleSPU 12 | } 13 | } -------------------------------------------------------------------------------- /GameData/RemoteTech/RemoteTech_NearFutureExploration_Probes.cfg: -------------------------------------------------------------------------------- 1 | // Support for Near-Future Exploration probes 2 | // Credit: the_television 3 | 4 | @PART[nfex-probe*]:FOR[NearFutureExploration]:NEEDS[RemoteTech] 5 | { 6 | %MODULE[ModuleSPU] { 7 | } 8 | 9 | %MODULE[ModuleRTAntennaPassive] { 10 | %TechRequired = unmannedTech 11 | %OmniRange = 3000 12 | 13 | %TRANSMITTER 14 | { 15 | %PacketInterval = 0.3 16 | %PacketSize = 2 17 | %PacketResourceCost = 15.0 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /GameData/RemoteTech/RemoteTech_NearFuture_Probes.cfg: -------------------------------------------------------------------------------- 1 | // Support for Near-Future automatable craft 2 | // Original config by Starstrider42 3 | 4 | // Mk3-9 Orbital Command Pod 5 | @PART[mk3-9pod]:AFTER[NearFutureSpacecraft]:NEEDS[RemoteTech] 6 | { 7 | %MODULE[ModuleSPU] { 8 | } 9 | 10 | // This is a manned vessel with automation tech, not a probe core 11 | // So don't give it a passive antenna to reflect its multirole use 12 | } 13 | 14 | // Modular Octo-Girder Guidance Unit 15 | @PART[truss-octo-drone-01]:AFTER[NearFutureConstruction]:NEEDS[RemoteTech] 16 | { 17 | %MODULE[ModuleSPU] { 18 | } 19 | 20 | %MODULE[ModuleRTAntennaPassive] { 21 | %TechRequired = unmannedTech 22 | %OmniRange = 3000 23 | 24 | %TRANSMITTER { 25 | %PacketInterval = 0.3 26 | %PacketSize = 2 27 | %PacketResourceCost = 15.0 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /GameData/RemoteTech/RemoteTech_NovaPunch_Antennas.cfg: -------------------------------------------------------------------------------- 1 | //Support for Novapunch Antennas 2 | //Started by blnk2007 3 | 4 | //Thor Lander RCS Antenna 5 | @PART[NP_ThorLanderRCS]:AFTER[NovaPunch2]:NEEDS[RemoteTech] 6 | { 7 | !MODULE[ModuleDataTransmitter] {} 8 | @MODULE[ModuleAnimateGeneric] 9 | { 10 | %allowManualControl = false 11 | } 12 | 13 | %MODULE[ModuleRTAntenna] { 14 | %Mode0OmniRange = 0 15 | %Mode1OmniRange = 2500000 16 | %MaxQ = 3000 17 | %EnergyCost = 0.13 18 | 19 | %DeployFxModules = 0 20 | 21 | %TRANSMITTER { 22 | %PacketInterval = 0.3 23 | %PacketSize = 2 24 | %PacketResourceCost = 15.0 25 | } 26 | } 27 | 28 | %MODULE[ModuleSPUPassive] {} 29 | } 30 | -------------------------------------------------------------------------------- /GameData/RemoteTech/RemoteTech_NovaPunch_Probes.cfg: -------------------------------------------------------------------------------- 1 | // Support for NovaPunch probe cores 2 | // Original config submitted by Noio via the forums, used with permission 3 | // (http://forum.kerbalspaceprogram.com/threads/83305?p=1481621#post1481621) 4 | 5 | // M-38 Unoccupied Guidance System 6 | @PART[NP_Capsule_Unmanned]:AFTER[NovaPunch2]:NEEDS[RemoteTech] 7 | { 8 | %MODULE[ModuleSPU] { 9 | } 10 | 11 | %MODULE[ModuleRTAntennaPassive] { 12 | %TechRequired = unmannedTech 13 | %OmniRange = 3000 14 | 15 | %TRANSMITTER { 16 | %PacketInterval = 0.3 17 | %PacketSize = 2 18 | %PacketResourceCost = 15.0 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /GameData/RemoteTech/RemoteTech_Procedural_Probes.cfg: -------------------------------------------------------------------------------- 1 | // Support for procedural probe cores 2 | 3 | @PART[proceduralProbe]:FOR[RemoteTech] 4 | { 5 | %MODULE[ModuleSPU] { 6 | } 7 | 8 | %MODULE[ModuleRTAntennaPassive] { 9 | %TechRequired = unmannedTech 10 | %OmniRange = 3000 11 | 12 | %TRANSMITTER { 13 | %PacketInterval = 0.3 14 | %PacketSize = 2 15 | %PacketResourceCost = 15.0 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /GameData/RemoteTech/RemoteTech_RLA_Probes.cfg: -------------------------------------------------------------------------------- 1 | // Support for RLA probe cores 2 | // issue submitted by marosciacchitano; config made by kitoma. 3 | 4 | @PART[RLA_*]:HAS[@MODULE[ModuleCommand],!MODULE[ModuleSPU]]:FOR[RemoteTech] 5 | { 6 | %MODULE[ModuleSPU] { 7 | } 8 | 9 | %MODULE[ModuleRTAntennaPassive] { 10 | %TechRequired = unmannedTech 11 | %OmniRange = 3000 12 | 13 | %TRANSMITTER { 14 | %PacketInterval = 0.3 15 | %PacketSize = 2 16 | %PacketResourceCost = 15.0 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /GameData/RemoteTech/RemoteTech_RestockPlus_Antennas.cfg: -------------------------------------------------------------------------------- 1 | //Support for ReStockPlus's additional antennas 2 | //Contributed by xdreaper15 3 | 4 | //A fixed mount version of DTS-M1 antenna without hinges, No stats changes. 5 | @PART[restock-antenna-stack-2]:FOR[RemoteTech] 6 | { 7 | %MODULE[ModuleRTAntenna] { 8 | %Mode0DishRange = 0 9 | %Mode1DishRange = 75000000 10 | %EnergyCost = 0.82 11 | %MaxQ = 6000 12 | %DishAngle = 45.0 13 | 14 | %TRANSMITTER { 15 | %PacketInterval = 0.3 16 | %PacketSize = 2 17 | %PacketResourceCost = 15.0 18 | } 19 | } 20 | 21 | %MODULE[ModuleSPUPassive] {} 22 | } 23 | 24 | //A non-hinged verson of the HG-55, no changes to stats here. 25 | @PART[restock-antenna-stack-3]:FOR[RemoteTech] 26 | { 27 | @MODULE[ModuleDeployableAntenna] 28 | { 29 | %name=ModuleAnimateGeneric 30 | %allowManualControl = false 31 | %actionAvailable = false 32 | %eventAvailableFlight = false 33 | %eventAvailableEditor = false 34 | %eventAvailableEVA = false 35 | } 36 | 37 | %MODULE[ModuleRTAntenna] { 38 | %Mode0DishRange = 0 39 | %Mode1DishRange = 25000000000 40 | %EnergyCost = 1.04 41 | %MaxQ = 6000 42 | %DishAngle = 0.12 43 | 44 | %DeployFxModules = 0 45 | 46 | %TRANSMITTER { 47 | %PacketInterval = 0.15 48 | %PacketSize = 3 49 | %PacketResourceCost = 20.0 50 | } 51 | } 52 | 53 | %MODULE[ModuleSPUPassive] {} 54 | } 55 | 56 | //This is 4 HighGain5 antennae stuck together, so I just multiplied the range by 4 and the EnergyCost by 2 57 | @PART[restock-relay-radial-2]:FOR[RemoteTech] 58 | { 59 | @MODULE[ModuleDeployableAntenna] 60 | { 61 | %name=ModuleAnimateGeneric 62 | %allowManualControl = false 63 | %actionAvailable = false 64 | %eventAvailableFlight = false 65 | %eventAvailableEditor = false 66 | %eventAvailableEVA = false 67 | } 68 | 69 | %MODULE[ModuleRTAntenna] { 70 | %Mode0DishRange = 0 71 | %Mode1DishRange = 80000000 72 | %EnergyCost = 1.10 73 | %MaxQ = 6000 74 | %DishAngle = 90.0 75 | 76 | %DeployFxModules = 0 77 | 78 | %TRANSMITTER { 79 | %PacketInterval = 0.15 80 | %PacketSize = 3 81 | %PacketResourceCost = 20.0 82 | } 83 | } 84 | 85 | %MODULE[ModuleSPUPassive] {} 86 | } 87 | 88 | //This is 4 HighGain5 antennae stuck together, so I just multiplied the range by 4 and the EnergyCost by 2 89 | //Name updated for KSP 1.11 compatability 90 | @PART[restock-relay-radial-2_v2]:FOR[RemoteTech] 91 | { 92 | @MODULE[ModuleDeployableAntenna] 93 | { 94 | %name=ModuleAnimateGeneric 95 | %allowManualControl = false 96 | %actionAvailable = false 97 | %eventAvailableFlight = false 98 | %eventAvailableEditor = false 99 | %eventAvailableEVA = false 100 | } 101 | 102 | %MODULE[ModuleRTAntenna] { 103 | %Mode0DishRange = 0 104 | %Mode1DishRange = 80000000 105 | %EnergyCost = 1.10 106 | %MaxQ = 6000 107 | %DishAngle = 90.0 108 | 109 | %DeployFxModules = 0 110 | 111 | %TRANSMITTER { 112 | %PacketInterval = 0.15 113 | %PacketSize = 3 114 | %PacketResourceCost = 20.0 115 | } 116 | } 117 | 118 | %MODULE[ModuleSPUPassive] {} 119 | } 120 | -------------------------------------------------------------------------------- /GameData/RemoteTech/RemoteTech_Restock_Antennas.cfg: -------------------------------------------------------------------------------- 1 | //RemoteTech Correction due to ReStock's antenna changes 2 | //Contributed by TaxiService, ChrisAdderley 3 | 4 | //Update RemoteTech Comm-32 to utilise Restock's Comm-16 model 5 | @PART[RTLongAntenna2]:AFTER[Restock]:NEEDS[RemoteTech] 6 | { 7 | @MODEL 8 | { 9 | //link to Restock's new model mesh 10 | %model = ReStock/Assets/Communication/restock-antenna-stack-1 11 | %position = 0.0, 0.0, 0.0 12 | %scale = 1.0, 2.0, 1.0 13 | %rotation = 0.0, 0.0, 0.0 14 | } 15 | 16 | @MODULE[ModuleDeployableAntenna] 17 | { 18 | //remove Restock animation control 19 | !animationName 20 | !pivotName 21 | } 22 | 23 | @MODULE[ModuleAnimateGeneric] 24 | { 25 | //link to Restock's animation trigger 26 | @animationName = Deploy 27 | } 28 | } 29 | 30 | //Update RemoteTech 3-km-range tech node to utilise Restock's Stayputnik model 31 | @PART[RTPassiveAntennaTech]:AFTER[Restock]:NEEDS[RemoteTech] 32 | { 33 | @MODEL 34 | { 35 | //link to Restock's new model mesh 36 | %model = ReStock/Assets/Command/restock-probe-sphere-1 37 | } 38 | } 39 | 40 | //Update Communotron 16 41 | @PART[longAntenna]:AFTER[ReStock]:NEEDS[RemoteTech] 42 | { 43 | @MODULE[ModuleAnimateGeneric] 44 | { 45 | @animationName = Deploy 46 | } 47 | } 48 | 49 | //Update HG-5 50 | @PART[HighGainAntenna5]:AFTER[ReStock]:NEEDS[RemoteTech] 51 | { 52 | @MODULE[ModuleAnimateGeneric] 53 | { 54 | @animationName = Deploy 55 | } 56 | } 57 | 58 | //Update Communotron HG-55 59 | @PART[HighGainAntenna]:AFTER[ReStock]:NEEDS[RemoteTech] 60 | { 61 | @MODULE[ModuleAnimateGeneric] 62 | { 63 | @animationName = Deploy_Radial 64 | } 65 | } 66 | 67 | //Update Communotron 88-88 68 | @PART[commDish]:AFTER[ReStock]:NEEDS[RemoteTech] 69 | { 70 | @MODULE[ModuleAnimateGeneric] 71 | { 72 | @animationName = Deploy 73 | } 74 | } 75 | 76 | -------------------------------------------------------------------------------- /GameData/RemoteTech/RemoteTech_SoundingRockets_Probes.cfg: -------------------------------------------------------------------------------- 1 | // RTSoundingRockets 2 | // This is free and unencumbered software released into the public domain. 3 | // All the code from RemoteTech is in GPLv2 4 | 5 | @PART[SR_Nosecone_*]:AFTER[UmbraSpaceIndustries]:NEEDS[RemoteTech,UmbraSpaceIndustries] 6 | { 7 | %MODULE[ModuleRTAntennaPassive] { 8 | %TechRequired = start 9 | %OmniRange = 100000 10 | 11 | %TRANSMITTER { 12 | %PacketInterval = 0.3 13 | %PacketSize = 2 14 | %PacketResourceCost = 15.0 15 | } 16 | } 17 | } 18 | 19 | @PART[SR_ProbeCore]:AFTER[UmbraSpaceIndustries]:NEEDS[RemoteTech,UmbraSpaceIndustries] 20 | { 21 | //control for probe core 22 | %MODULE[ModuleSPU] {} 23 | } 24 | 25 | @PART[SR_InlineProbe]:AFTER[UmbraSpaceIndustries]:NEEDS[RemoteTech,UmbraSpaceIndustries] 26 | { 27 | //control for probe core 28 | %MODULE[ModuleSPU] {} 29 | } 30 | 31 | @PART[RTPassiveAntennaTech]:AFTER[UmbraSpaceIndustries]:NEEDS[RemoteTech,UmbraSpaceIndustries] 32 | { 33 | %TechRequired = start 34 | } 35 | 36 | @PART[*]:HAS[MODULE[ModuleRTAntennaPassive]]:AFTER[UmbraSpaceIndustries]:NEEDS[RemoteTech,UmbraSpaceIndustries] 37 | { 38 | %MODULE[ModuleRTAntennaPassive] 39 | { 40 | %TechRequired = start 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /GameData/RemoteTech/RemoteTech_Squad_Deployable_Stations.cfg: -------------------------------------------------------------------------------- 1 | // Support for deployable science parts 2 | 3 | // Unworkable due to physical separation between sat dish and controller 4 | //@PART[DeployedSatDish]:FOR[RemoteTech] 5 | //{ 6 | //%MODULE[ModuleRTAntenna] { 7 | //%Mode0DishRange = 0 8 | //%Mode1DishRange = 15000000000 9 | //%EnergyCost = 1.0 10 | //%DishAngle = 0.2 11 | 12 | //%TRANSMITTER { 13 | //%PacketInterval = 0.3 14 | //%PacketSize = 2 15 | //%PacketResourceCost = 15.0 16 | //} 17 | //} 18 | 19 | //%MODULE[ModuleSPUPassive] {} 20 | //} 21 | 22 | @PART[DeployedCentralStation]:FOR[RemoteTech] 23 | { 24 | %MODULE[ModuleSPU] { 25 | } 26 | 27 | %MODULE[ModuleRTAntennaPassive] { 28 | %TechRequired = spaceExploration 29 | %OmniRange = 400000 30 | 31 | %TRANSMITTER { 32 | %PacketInterval = 0.3 33 | %PacketSize = 2 34 | %PacketResourceCost = 15.0 35 | } 36 | } 37 | } -------------------------------------------------------------------------------- /GameData/RemoteTech/RemoteTech_StationPartsExpansion_Probes.cfg: -------------------------------------------------------------------------------- 1 | // Support for Stockalike Station Parts Expansion station cores 2 | // Original config by Darkenator 3 | 4 | // Kerbalmax RGB-003 'Intercedor' Station Core 5 | @PART[crewtube-hub-125]:AFTER[StationPartsExpansion]:NEEDS[RemoteTech] 6 | { 7 | %MODULE[ModuleSPU] { 8 | } 9 | 10 | %MODULE[ModuleRTAntennaPassive] { 11 | %TechRequired = unmannedTech 12 | %OmniRange = 3000 13 | 14 | %TRANSMITTER { 15 | %PacketInterval = 0.3 16 | %PacketSize = 2 17 | %PacketResourceCost = 15.0 18 | } 19 | } 20 | } 21 | 22 | // Kerbalmax RGB-2 'Distributor' Station Core 23 | @PART[crewtube-hub-25]:AFTER[StationPartsExpansion]:NEEDS[RemoteTech] 24 | { 25 | %MODULE[ModuleSPU] { 26 | %IsRTCommandStation = true 27 | %RTCommandMinCrew = 6 28 | } 29 | 30 | %MODULE[ModuleRTAntennaPassive] { 31 | %TechRequired = unmannedTech 32 | %OmniRange = 3000 33 | 34 | %TRANSMITTER { 35 | %PacketInterval = 0.3 36 | %PacketSize = 2 37 | %PacketResourceCost = 15.0 38 | } 39 | } 40 | } -------------------------------------------------------------------------------- /GameData/RemoteTech/RemoteTech_Tech_Node.cfg: -------------------------------------------------------------------------------- 1 | PART { 2 | name = RTPassiveAntennaTech 3 | module = Part 4 | author = Starstrider42 (config), NovaSilisko (model) 5 | 6 | MODEL 7 | { 8 | model = Squad/Parts/Command/probeStackSphere/model 9 | } 10 | 11 | TechRequired = unmannedTech 12 | entryCost = 0 13 | cost = 0 14 | category = -1 15 | 16 | title = Probe Core Upgrade 17 | description = Allows RemoteTech probe cores to contact ships within 3 km without the need for a dedicated antenna. 18 | bulkheadProfiles = 19 | } 20 | -------------------------------------------------------------------------------- /GameData/RemoteTech/RemoteTech_UniversalStorage2_Probes.cfg: -------------------------------------------------------------------------------- 1 | // Support for Universal Storage 2 probes 2 | // Contributed by NullSnapshot 3 | 4 | 5 | // Universal Storage: Remote Operations System 6 | @PART[USDoubleProbeCore]:AFTER[UniversalStorage2]:NEEDS[RemoteTech] 7 | { 8 | %MODULE[ModuleSPU] { 9 | } 10 | 11 | %MODULE[ModuleRTAntennaPassive] { 12 | %TechRequired = unmannedTech 13 | %OmniRange = 3000 14 | 15 | %TRANSMITTER { 16 | %PacketInterval = 0.3 17 | %PacketSize = 2 18 | %PacketResourceCost = 15.0 19 | } 20 | } 21 | } 22 | 23 | // Universal Storage: Remote Operations System MKII 24 | @PART[USSingleProbeCore]:AFTER[UniversalStorage2]:NEEDS[RemoteTech] 25 | { 26 | %MODULE[ModuleSPU] { 27 | } 28 | 29 | %MODULE[ModuleRTAntennaPassive] { 30 | %TechRequired = unmannedTech 31 | %OmniRange = 3000 32 | 33 | %TRANSMITTER { 34 | %PacketInterval = 0.3 35 | %PacketSize = 2 36 | %PacketResourceCost = 15.0 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /GameData/RemoteTech/RemoteTech_VDS_Hull_Camera.cfg: -------------------------------------------------------------------------------- 1 | // Support for the Pictozoom 2000 from the VDS Hull Camera mod 2 | // This config made by schnip 3 | 4 | @PART[Pictozoom*2000]:FOR[RemoteTech] 5 | { 6 | %MODULE[ModuleSPU] { 7 | } 8 | 9 | %MODULE[ModuleRTAntennaPassive] { 10 | %TechRequired = unmannedTech 11 | %OmniRange = 3000 12 | 13 | %TRANSMITTER { 14 | %PacketInterval = 0.3 15 | %PacketSize = 2 16 | %PacketResourceCost = 15.0 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /GameData/RemoteTech/RemoteTech_VensStockRevamp.cfg: -------------------------------------------------------------------------------- 1 | // RemoteTech Compatibility Patch For Ven's Stock Revamp 2 | // Author: Sandriell (http://forum.kerbalspaceprogram.com/index.php?/profile/165509-sandriell/) 3 | 4 | // Communotron 32 (Renamed: Communotron DTS-M2) 5 | @PART[LongDeployableAntenna]:NEEDS[RemoteTech] 6 | { 7 | @title = Communotron DTS-M2 8 | @description = The bigger brother of the Communotron DTS-M1, the DTS-M2 is a deployable, power-hungry solution to most of your medium-range communications needs. Held together with extra-reflective ductape! 9 | @cost = 900 10 | !MODULE[ModuleDataTransmitter] {} 11 | 12 | %MODULE[ModuleRTAntenna] { 13 | %Mode0DishRange = 0 14 | %Mode1DishRange = 1000000000 15 | %DishAngle = 20.0 16 | %EnergyCost = 0.95 17 | %MaxQ = 3000 18 | 19 | %DeployFxModules = 0 20 | %ProgressFxModules = 1 21 | 22 | %TRANSMITTER 23 | { 24 | %PacketInterval = 0.3 25 | %PacketSize = 2 26 | %PacketResourceCost = 15.0 27 | } 28 | } 29 | 30 | %MODULE[ModuleSPUPassive] {} 31 | } 32 | 33 | // Comms DTS-M5 (Renamed: Communotron DTS-M5) 34 | @PART[SmallFixedAntenna]:NEEDS[RemoteTech] 35 | { 36 | @title = Communotron DTS-M5 37 | @description = The Communotron DTS-M5 is a fixed, medium-range dish with a very narrow cone angle and high electric cost. The fancy, totally not made of from one of Jeb's mother's good bed sheets, covering will allow higher temperature tolerances. 38 | @cost = 1000 39 | @maxTemp = 2200 40 | @mass = 0.55 41 | !MODULE[ModuleDataTransmitter] {} 42 | 43 | %MODULE[ModuleRTAntenna] { 44 | %Mode0DishRange = 0 45 | %Mode1DishRange = 5000000000 46 | %DishAngle = .05 47 | %EnergyCost = 1.0 48 | 49 | %TRANSMITTER 50 | { 51 | %PacketInterval = 0.3 52 | %PacketSize = 2 53 | %PacketResourceCost = 15.0 54 | } 55 | } 56 | 57 | %MODULE[ModuleSPUPassive] {} 58 | } 59 | 60 | // Comms DTS-M7 (Renamed: Communotron DTS-M7) 61 | @PART[mediumFixedAntenna]:NEEDS[RemoteTech] 62 | { 63 | @title = Communotron DTS-M7 64 | @description = The Communotron DTS-M7 is a medium-range dish that offers a decent cone-angle at the cost of extra weight and electric cost. 65 | @mass = 1.10 66 | !MODULE[ModuleDataTransmitter] {} 67 | 68 | %MODULE[ModuleRTAntenna] { 69 | %Mode0DishRange = 0 70 | %Mode1DishRange = 45000000000 71 | %EnergyCost = 1.10 72 | %DishAngle = .10 73 | 74 | %TRANSMITTER 75 | { 76 | %PacketInterval = 0.3 77 | %PacketSize = 2 78 | %PacketResourceCost = 15.0 79 | } 80 | } 81 | 82 | %MODULE[ModuleSPUPassive] {} 83 | } 84 | 85 | // Communotron 88-X 86 | @PART[largeFixedAntenna]:NEEDS[RemoteTech] 87 | { 88 | @description = The Communotron 88-X is the chubby hotrod of antennas, fast, long-range communications can be yours in a bulky 3 meter package. 89 | @mass = 2.0 90 | @cost = 11000 91 | @crashTolerance = 10 92 | @maxTemp = 2800 93 | !MODULE[ModuleDataTransmitter] {} 94 | 95 | %MODULE[ModuleRTAntenna] { 96 | %Mode0DishRange = 0 97 | %Mode1DishRange = 500000000000 98 | %EnergyCost = 3.40 99 | %DishAngle = 0.0065 100 | 101 | %TRANSMITTER 102 | { 103 | %PacketInterval = 0.3 104 | %PacketSize = 2 105 | %PacketResourceCost = 15.0 106 | } 107 | } 108 | 109 | %MODULE[ModuleSPUPassive] {} 110 | } 111 | 112 | 113 | // Communotron 88-88-V 114 | @PART[commDishVSR]:NEEDS[RemoteTech]:AFTER[zzzVSRPathPatch] 115 | { 116 | !MODULE[ModuleDataTransmitter] {} 117 | 118 | %MODULE[ModuleRTAntenna] { 119 | %Mode0DishRange = 0 120 | %Mode1DishRange = 40000000000 121 | %EnergyCost = 0.93 122 | %MaxQ = 2000 123 | %DishAngle = 0.06 124 | 125 | %TRANSMITTER { 126 | %PacketInterval = 0.3 127 | %PacketSize = 2 128 | %PacketResourceCost = 15.0 129 | } 130 | } 131 | 132 | %MODULE[ModuleSPUPassive] {} 133 | } 134 | -------------------------------------------------------------------------------- /GameData/RemoteTech/Textures/TimeQuadrantFcStatus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RemoteTechnologiesGroup/RemoteTech/89cfdcffb1f8f4ea38cc2095fd8ca1eb9ffb486c/GameData/RemoteTech/Textures/TimeQuadrantFcStatus.png -------------------------------------------------------------------------------- /GameData/RemoteTech/Textures/buttons_fc_add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RemoteTechnologiesGroup/RemoteTech/89cfdcffb1f8f4ea38cc2095fd8ca1eb9ffb486c/GameData/RemoteTech/Textures/buttons_fc_add.png -------------------------------------------------------------------------------- /GameData/RemoteTech/Textures/buttons_fc_add_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RemoteTechnologiesGroup/RemoteTech/89cfdcffb1f8f4ea38cc2095fd8ca1eb9ffb486c/GameData/RemoteTech/Textures/buttons_fc_add_hover.png -------------------------------------------------------------------------------- /GameData/RemoteTech/Textures/buttons_fc_del.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RemoteTechnologiesGroup/RemoteTech/89cfdcffb1f8f4ea38cc2095fd8ca1eb9ffb486c/GameData/RemoteTech/Textures/buttons_fc_del.png -------------------------------------------------------------------------------- /GameData/RemoteTech/Textures/buttons_fc_del_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RemoteTechnologiesGroup/RemoteTech/89cfdcffb1f8f4ea38cc2095fd8ca1eb9ffb486c/GameData/RemoteTech/Textures/buttons_fc_del_hover.png -------------------------------------------------------------------------------- /GameData/RemoteTech/Textures/gitpagessat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RemoteTechnologiesGroup/RemoteTech/89cfdcffb1f8f4ea38cc2095fd8ca1eb9ffb486c/GameData/RemoteTech/Textures/gitpagessat.png -------------------------------------------------------------------------------- /GameData/RemoteTech/Textures/headline.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RemoteTechnologiesGroup/RemoteTech/89cfdcffb1f8f4ea38cc2095fd8ca1eb9ffb486c/GameData/RemoteTech/Textures/headline.jpg -------------------------------------------------------------------------------- /GameData/RemoteTech/Textures/mark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RemoteTechnologiesGroup/RemoteTech/89cfdcffb1f8f4ea38cc2095fd8ca1eb9ffb486c/GameData/RemoteTech/Textures/mark.png -------------------------------------------------------------------------------- /GameData/RemoteTech/Textures/texAll.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RemoteTechnologiesGroup/RemoteTech/89cfdcffb1f8f4ea38cc2095fd8ca1eb9ffb486c/GameData/RemoteTech/Textures/texAll.png -------------------------------------------------------------------------------- /GameData/RemoteTech/Textures/texBackground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RemoteTechnologiesGroup/RemoteTech/89cfdcffb1f8f4ea38cc2095fd8ca1eb9ffb486c/GameData/RemoteTech/Textures/texBackground.png -------------------------------------------------------------------------------- /GameData/RemoteTech/Textures/texBackground_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RemoteTechnologiesGroup/RemoteTech/89cfdcffb1f8f4ea38cc2095fd8ca1eb9ffb486c/GameData/RemoteTech/Textures/texBackground_left.png -------------------------------------------------------------------------------- /GameData/RemoteTech/Textures/texButton.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RemoteTechnologiesGroup/RemoteTech/89cfdcffb1f8f4ea38cc2095fd8ca1eb9ffb486c/GameData/RemoteTech/Textures/texButton.png -------------------------------------------------------------------------------- /GameData/RemoteTech/Textures/texButtonGray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RemoteTechnologiesGroup/RemoteTech/89cfdcffb1f8f4ea38cc2095fd8ca1eb9ffb486c/GameData/RemoteTech/Textures/texButtonGray.png -------------------------------------------------------------------------------- /GameData/RemoteTech/Textures/texButtonGreen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RemoteTechnologiesGroup/RemoteTech/89cfdcffb1f8f4ea38cc2095fd8ca1eb9ffb486c/GameData/RemoteTech/Textures/texButtonGreen.png -------------------------------------------------------------------------------- /GameData/RemoteTech/Textures/texButtonRed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RemoteTechnologiesGroup/RemoteTech/89cfdcffb1f8f4ea38cc2095fd8ca1eb9ffb486c/GameData/RemoteTech/Textures/texButtonRed.png -------------------------------------------------------------------------------- /GameData/RemoteTech/Textures/texButtonYellow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RemoteTechnologiesGroup/RemoteTech/89cfdcffb1f8f4ea38cc2095fd8ca1eb9ffb486c/GameData/RemoteTech/Textures/texButtonYellow.png -------------------------------------------------------------------------------- /GameData/RemoteTech/Textures/texCone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RemoteTechnologiesGroup/RemoteTech/89cfdcffb1f8f4ea38cc2095fd8ca1eb9ffb486c/GameData/RemoteTech/Textures/texCone.png -------------------------------------------------------------------------------- /GameData/RemoteTech/Textures/texCone.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RemoteTechnologiesGroup/RemoteTech/89cfdcffb1f8f4ea38cc2095fd8ca1eb9ffb486c/GameData/RemoteTech/Textures/texCone.xcf -------------------------------------------------------------------------------- /GameData/RemoteTech/Textures/texDish.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RemoteTechnologiesGroup/RemoteTech/89cfdcffb1f8f4ea38cc2095fd8ca1eb9ffb486c/GameData/RemoteTech/Textures/texDish.png -------------------------------------------------------------------------------- /GameData/RemoteTech/Textures/texEmpty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RemoteTechnologiesGroup/RemoteTech/89cfdcffb1f8f4ea38cc2095fd8ca1eb9ffb486c/GameData/RemoteTech/Textures/texEmpty.png -------------------------------------------------------------------------------- /GameData/RemoteTech/Textures/texFlightGreen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RemoteTechnologiesGroup/RemoteTech/89cfdcffb1f8f4ea38cc2095fd8ca1eb9ffb486c/GameData/RemoteTech/Textures/texFlightGreen.png -------------------------------------------------------------------------------- /GameData/RemoteTech/Textures/texFlightGreenDown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RemoteTechnologiesGroup/RemoteTech/89cfdcffb1f8f4ea38cc2095fd8ca1eb9ffb486c/GameData/RemoteTech/Textures/texFlightGreenDown.png -------------------------------------------------------------------------------- /GameData/RemoteTech/Textures/texFlightGreenOver.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RemoteTechnologiesGroup/RemoteTech/89cfdcffb1f8f4ea38cc2095fd8ca1eb9ffb486c/GameData/RemoteTech/Textures/texFlightGreenOver.png -------------------------------------------------------------------------------- /GameData/RemoteTech/Textures/texFlightRed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RemoteTechnologiesGroup/RemoteTech/89cfdcffb1f8f4ea38cc2095fd8ca1eb9ffb486c/GameData/RemoteTech/Textures/texFlightRed.png -------------------------------------------------------------------------------- /GameData/RemoteTech/Textures/texFlightRedDown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RemoteTechnologiesGroup/RemoteTech/89cfdcffb1f8f4ea38cc2095fd8ca1eb9ffb486c/GameData/RemoteTech/Textures/texFlightRedDown.png -------------------------------------------------------------------------------- /GameData/RemoteTech/Textures/texFlightRedOver.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RemoteTechnologiesGroup/RemoteTech/89cfdcffb1f8f4ea38cc2095fd8ca1eb9ffb486c/GameData/RemoteTech/Textures/texFlightRedOver.png -------------------------------------------------------------------------------- /GameData/RemoteTech/Textures/texFlightYellow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RemoteTechnologiesGroup/RemoteTech/89cfdcffb1f8f4ea38cc2095fd8ca1eb9ffb486c/GameData/RemoteTech/Textures/texFlightYellow.png -------------------------------------------------------------------------------- /GameData/RemoteTech/Textures/texFlightYellowDown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RemoteTechnologiesGroup/RemoteTech/89cfdcffb1f8f4ea38cc2095fd8ca1eb9ffb486c/GameData/RemoteTech/Textures/texFlightYellowDown.png -------------------------------------------------------------------------------- /GameData/RemoteTech/Textures/texFlightYellowOver.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RemoteTechnologiesGroup/RemoteTech/89cfdcffb1f8f4ea38cc2095fd8ca1eb9ffb486c/GameData/RemoteTech/Textures/texFlightYellowOver.png -------------------------------------------------------------------------------- /GameData/RemoteTech/Textures/texKnowledgeActive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RemoteTechnologiesGroup/RemoteTech/89cfdcffb1f8f4ea38cc2095fd8ca1eb9ffb486c/GameData/RemoteTech/Textures/texKnowledgeActive.png -------------------------------------------------------------------------------- /GameData/RemoteTech/Textures/texKnowledgeHover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RemoteTechnologiesGroup/RemoteTech/89cfdcffb1f8f4ea38cc2095fd8ca1eb9ffb486c/GameData/RemoteTech/Textures/texKnowledgeHover.png -------------------------------------------------------------------------------- /GameData/RemoteTech/Textures/texKnowledgeNormal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RemoteTechnologiesGroup/RemoteTech/89cfdcffb1f8f4ea38cc2095fd8ca1eb9ffb486c/GameData/RemoteTech/Textures/texKnowledgeNormal.png -------------------------------------------------------------------------------- /GameData/RemoteTech/Textures/texMultiPath.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RemoteTechnologiesGroup/RemoteTech/89cfdcffb1f8f4ea38cc2095fd8ca1eb9ffb486c/GameData/RemoteTech/Textures/texMultiPath.png -------------------------------------------------------------------------------- /GameData/RemoteTech/Textures/texNoCone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RemoteTechnologiesGroup/RemoteTech/89cfdcffb1f8f4ea38cc2095fd8ca1eb9ffb486c/GameData/RemoteTech/Textures/texNoCone.png -------------------------------------------------------------------------------- /GameData/RemoteTech/Textures/texNoOmniDish.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RemoteTechnologiesGroup/RemoteTech/89cfdcffb1f8f4ea38cc2095fd8ca1eb9ffb486c/GameData/RemoteTech/Textures/texNoOmniDish.png -------------------------------------------------------------------------------- /GameData/RemoteTech/Textures/texNoPath.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RemoteTechnologiesGroup/RemoteTech/89cfdcffb1f8f4ea38cc2095fd8ca1eb9ffb486c/GameData/RemoteTech/Textures/texNoPath.png -------------------------------------------------------------------------------- /GameData/RemoteTech/Textures/texOmni.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RemoteTechnologiesGroup/RemoteTech/89cfdcffb1f8f4ea38cc2095fd8ca1eb9ffb486c/GameData/RemoteTech/Textures/texOmni.png -------------------------------------------------------------------------------- /GameData/RemoteTech/Textures/texOmniDish.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RemoteTechnologiesGroup/RemoteTech/89cfdcffb1f8f4ea38cc2095fd8ca1eb9ffb486c/GameData/RemoteTech/Textures/texOmniDish.png -------------------------------------------------------------------------------- /GameData/RemoteTech/Textures/texOmniDish.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RemoteTechnologiesGroup/RemoteTech/89cfdcffb1f8f4ea38cc2095fd8ca1eb9ffb486c/GameData/RemoteTech/Textures/texOmniDish.xcf -------------------------------------------------------------------------------- /GameData/RemoteTech/Textures/texPath.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RemoteTechnologiesGroup/RemoteTech/89cfdcffb1f8f4ea38cc2095fd8ca1eb9ffb486c/GameData/RemoteTech/Textures/texPath.png -------------------------------------------------------------------------------- /GameData/RemoteTech/Textures/texPath.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RemoteTechnologiesGroup/RemoteTech/89cfdcffb1f8f4ea38cc2095fd8ca1eb9ffb486c/GameData/RemoteTech/Textures/texPath.xcf -------------------------------------------------------------------------------- /GameData/RemoteTech/Textures/texPlanet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RemoteTechnologiesGroup/RemoteTech/89cfdcffb1f8f4ea38cc2095fd8ca1eb9ffb486c/GameData/RemoteTech/Textures/texPlanet.png -------------------------------------------------------------------------------- /GameData/RemoteTech/Textures/texSatellite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RemoteTechnologiesGroup/RemoteTech/89cfdcffb1f8f4ea38cc2095fd8ca1eb9ffb486c/GameData/RemoteTech/Textures/texSatellite.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 5 | **master** [![Build status](https://ci.appveyor.com/api/projects/status/18ksahrxar3ghaoh/branch/master?svg=true)](https://ci.appveyor.com/project/KSP-TaxiService/remotetech-hx082/branch/master) 6 | **develop** [![Build status](https://ci.appveyor.com/api/projects/status/4kvchix4253kmc58/branch/develop?svg=true)](https://ci.appveyor.com/project/KSP-TaxiService/remotetech/branch/develop) 7 | 8 | 9 | RemoteTech 10 | ========== 11 | 12 | A community-developed continuation of the original RemoteTech mod for Kerbal Space Program. 13 | 14 | RemoteTech allows you to construct vast relay networks of communication satellites and remotely-controlled unmanned vehicles. 15 | Your unmanned vessels require an uplink to a command station to be controlled. 16 | This adds a new layer of difficulty that compensates for the lack of live crew members. 17 | 18 | 19 | Installation 20 | ------------ 21 | 22 | [Download Here](https://github.com/RemoteTechnologiesGroup/RemoteTech/releases/latest) on Github or on [SpaceDock](http://spacedock.info/mod/520/RemoteTech). 23 | Releases deemed stable are numbered (e.g. `1.8.0`). 24 | Development releases are prefixed with `build-develop`. 25 | 26 | 27 | Documentation 28 | ------------- 29 | 30 | A [detailed manual](http://remotetechnologiesgroup.github.io/RemoteTech) is available online. 31 | 32 | Questions? Try the [KSP forum thread](http://forum.kerbalspaceprogram.com/index.php?/topic/139167-113-remotetech-v171-2016-07-02/). 33 | 34 | 35 | Contributing 36 | ------------ 37 | 38 | See the [guidelines](CONTRIBUTING.md) for both bug reports and pull requests. 39 | -------------------------------------------------------------------------------- /buildscripts/UnityDebug/Mono.Cecil.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RemoteTechnologiesGroup/RemoteTech/89cfdcffb1f8f4ea38cc2095fd8ca1eb9ffb486c/buildscripts/UnityDebug/Mono.Cecil.dll -------------------------------------------------------------------------------- /buildscripts/UnityDebug/Mono.CompilerServices.SymbolWriter.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RemoteTechnologiesGroup/RemoteTech/89cfdcffb1f8f4ea38cc2095fd8ca1eb9ffb486c/buildscripts/UnityDebug/Mono.CompilerServices.SymbolWriter.dll -------------------------------------------------------------------------------- /buildscripts/UnityDebug/PlayerConnectionConfigFile: -------------------------------------------------------------------------------- 1 | listen 4294967295 1 1 -------------------------------------------------------------------------------- /buildscripts/UnityDebug/pdb2mdb.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RemoteTechnologiesGroup/RemoteTech/89cfdcffb1f8f4ea38cc2095fd8ca1eb9ffb486c/buildscripts/UnityDebug/pdb2mdb.exe -------------------------------------------------------------------------------- /buildscripts/UnityDebug/prepare-debug.bat: -------------------------------------------------------------------------------- 1 | rem Generate the MDB file needed by UnityVS and Monodevelop for debugging 2 | 3 | @echo off 4 | 5 | rem get parameters that are passed by visual studio post build event 6 | SET TargetName=%1 7 | 8 | rem make sure the initial working directory is the one containing the current script 9 | SET scriptPath=%~dp0 10 | 11 | echo Generating Unity Monodevelop Debug file... 12 | echo %TargetName%.dll -^> %TargetName%.dll.mdb 13 | "%scriptPath%\pdb2mdb.exe" %TargetName%.dll 14 | -------------------------------------------------------------------------------- /buildscripts/UnityDebug_2019/Mono.Cecil.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RemoteTechnologiesGroup/RemoteTech/89cfdcffb1f8f4ea38cc2095fd8ca1eb9ffb486c/buildscripts/UnityDebug_2019/Mono.Cecil.dll -------------------------------------------------------------------------------- /buildscripts/UnityDebug_2019/Mono.CompilerServices.SymbolWriter.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RemoteTechnologiesGroup/RemoteTech/89cfdcffb1f8f4ea38cc2095fd8ca1eb9ffb486c/buildscripts/UnityDebug_2019/Mono.CompilerServices.SymbolWriter.dll -------------------------------------------------------------------------------- /buildscripts/UnityDebug_2019/System.Core.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RemoteTechnologiesGroup/RemoteTech/89cfdcffb1f8f4ea38cc2095fd8ca1eb9ffb486c/buildscripts/UnityDebug_2019/System.Core.dll -------------------------------------------------------------------------------- /buildscripts/UnityDebug_2019/System.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RemoteTechnologiesGroup/RemoteTech/89cfdcffb1f8f4ea38cc2095fd8ca1eb9ffb486c/buildscripts/UnityDebug_2019/System.dll -------------------------------------------------------------------------------- /buildscripts/UnityDebug_2019/instructions.txt: -------------------------------------------------------------------------------- 1 | Quoted from JPLRepo 2 | 1) Install 2019.2.2f1 to utilise these two exe's to convert the pdb to mdb: 3 | \Editor\Editor\Data\MonoBleedingEdge\bin\mono.exe 4 | \Editor\Editor\Data\MonoBleedingEdge\lib\mono\4.5\pdb2mdb.exe 5 | 6 | 2) Unity No longer uses PlayerConnectionConfigFile instead you edit boot.config file (in the data directory where this file used to go) and add the line: 7 | player-connection-debug=1 8 | 9 | 3) For the game exe. You must copy the WindowsPlayer.exe (rename if you want) UnityPlayer.dll and WinPixEventRuntime.dll into the KSP install directory. 10 | 11 | 4) Execute this sequence: 12 | "C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\bin\mono.exe" "C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\4.5\pdb2mdb.exe" "$(TargetFileName)" -------------------------------------------------------------------------------- /buildscripts/UnityDebug_2019/mono-2.0-sgen.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RemoteTechnologiesGroup/RemoteTech/89cfdcffb1f8f4ea38cc2095fd8ca1eb9ffb486c/buildscripts/UnityDebug_2019/mono-2.0-sgen.dll -------------------------------------------------------------------------------- /buildscripts/UnityDebug_2019/mono.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RemoteTechnologiesGroup/RemoteTech/89cfdcffb1f8f4ea38cc2095fd8ca1eb9ffb486c/buildscripts/UnityDebug_2019/mono.exe -------------------------------------------------------------------------------- /buildscripts/UnityDebug_2019/pdb2mdb.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RemoteTechnologiesGroup/RemoteTech/89cfdcffb1f8f4ea38cc2095fd8ca1eb9ffb486c/buildscripts/UnityDebug_2019/pdb2mdb.exe -------------------------------------------------------------------------------- /buildscripts/UnityDebug_2019/prepare-debug.bat: -------------------------------------------------------------------------------- 1 | rem Generate the MDB file needed by UnityVS and Monodevelop for debugging 2 | 3 | @echo off 4 | 5 | rem get parameters that are passed by visual studio post build event 6 | SET TargetName=%1 7 | 8 | rem make sure the initial working directory is the one containing the current script 9 | SET scriptPath=%~dp0 10 | 11 | echo Generating Unity Monodevelop Debug file... 12 | echo %TargetName%.dll -^> %TargetName%.dll.mdb 13 | "%scriptPath%\mono.exe" "%scriptPath%\pdb2mdb.exe" %TargetName%.dll 14 | -------------------------------------------------------------------------------- /buildscripts/ZipPack/7za-License.txt: -------------------------------------------------------------------------------- 1 | 7-Zip Extra 2 | ~~~~~~~~~~~ 3 | License for use and distribution 4 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5 | 6 | Copyright (C) 1999-2016 Igor Pavlov. 7 | 8 | 7-Zip Extra files are under the GNU LGPL license. 9 | 10 | 11 | Notes: 12 | You can use 7-Zip Extra on any computer, including a computer in a commercial 13 | organization. You don't need to register or pay for 7-Zip. 14 | 15 | 16 | GNU LGPL information 17 | -------------------- 18 | 19 | This library is free software; you can redistribute it and/or 20 | modify it under the terms of the GNU Lesser General Public 21 | License as published by the Free Software Foundation; either 22 | version 2.1 of the License, or (at your option) any later version. 23 | 24 | This library is distributed in the hope that it will be useful, 25 | but WITHOUT ANY WARRANTY; without even the implied warranty of 26 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 27 | Lesser General Public License for more details. 28 | 29 | You can receive a copy of the GNU Lesser General Public License from 30 | http://www.gnu.org/ 31 | 32 | -------------------------------------------------------------------------------- /buildscripts/ZipPack/7za.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RemoteTechnologiesGroup/RemoteTech/89cfdcffb1f8f4ea38cc2095fd8ca1eb9ffb486c/buildscripts/ZipPack/7za.dll -------------------------------------------------------------------------------- /buildscripts/ZipPack/7za.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RemoteTechnologiesGroup/RemoteTech/89cfdcffb1f8f4ea38cc2095fd8ca1eb9ffb486c/buildscripts/ZipPack/7za.exe -------------------------------------------------------------------------------- /buildscripts/ZipPack/build-package.bat: -------------------------------------------------------------------------------- 1 | rem Generate the zip Release package. 2 | rem Highly recommend to use a Continuous Integration service to pull source codes from repository, build, test, package and deploy 3 | 4 | @echo off 5 | 6 | rem get parameters that are passed by visual studio post build event 7 | SET TargetName=%1 8 | SET Dllversion=%~n2 9 | SET KSPversion=%3 10 | 11 | rem make sure the initial working directory is the one containing the current script 12 | SET scriptPath=%~dp0 13 | SET rootPath=%scriptPath%..\..\ 14 | SET initialWD=%CD% 15 | 16 | echo Generating %TargetName% for %KSPversion% Release Package... 17 | xcopy /y "%initialWD%\%TargetName%.dll" %rootPath%GameData\%TargetName%\Plugins\%TargetName%.dll* 18 | 19 | IF EXIST %rootPath%package\ rd /s /q %rootPath%package 20 | mkdir %rootPath%package\GameData 21 | cd %rootPath%package\GameData 22 | 23 | echo Copying %rootPath%GameData files to package stage 24 | xcopy /y /E /Q %rootPath%GameData %rootPath%package\GameData 25 | 26 | echo. 27 | echo Compressing %TargetName% for %KSPversion% Release Package... 28 | IF EXIST "%rootPath%%TargetName%*_For_%KSPversion%.zip" del "%rootPath%%TargetName%*_For_%KSPversion%.zip" 29 | "%scriptPath%7za.exe" a "%rootPath%%TargetName%%Dllversion%_For_%KSPversion%.zip" %rootPath%package\GameData 30 | 31 | echo Deleting package stage 32 | rd /s /q %rootPath%package 33 | -------------------------------------------------------------------------------- /buildscripts/lib/mono/4.5/mscorlib.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RemoteTechnologiesGroup/RemoteTech/89cfdcffb1f8f4ea38cc2095fd8ca1eb9ffb486c/buildscripts/lib/mono/4.5/mscorlib.dll -------------------------------------------------------------------------------- /saves/RemoteTech KSP1_8 Testbed/RemoteTech_Settings.cfg: -------------------------------------------------------------------------------- 1 | RemoteTechSettings 2 | { 3 | RemoteTechEnabled = True 4 | CommNetEnabled = False 5 | ConsumptionMultiplier = 1 6 | RangeMultiplier = 1 7 | MissionControlRangeMultiplier = 1 8 | OmniRangeClampFactor = 100 9 | DishRangeClampFactor = 1000 10 | ActiveVesselGuid = 35b89a0d664c43c6bec8d0840afc97b2 11 | NoTargetGuid = 00000000-0000-0000-0000-000000000000 12 | SpeedOfLight = 300000000 13 | MapFilter = Omni, Dish, MultiPath 14 | EnableSignalDelay = True 15 | RangeModelType = Standard 16 | MultipleAntennaMultiplier = 0 17 | ThrottleTimeWarp = True 18 | ThrottleZeroOnNoConnection = True 19 | HideGroundStationsBehindBody = True 20 | ControlAntennaWithoutConnection = False 21 | UpgradeableMissionControlAntennas = True 22 | HideGroundStationsOnDistance = True 23 | ShowMouseOverInfoGroundStations = True 24 | AutoInsertKaCAlerts = True 25 | FCLeadTime = 180 26 | FCOffAfterExecute = False 27 | DistanceToHideGroundStations = 30000000 28 | DishConnectionColor = 0.996078372,0.701960802,0.0313725509,1 29 | OmniConnectionColor = 0.552941203,0.517647088,0.407843113,1 30 | ActiveConnectionColor = 0.65882349,1,0.0156862792,1 31 | RemoteStationColorDot = 0.996078014,0,0,1 32 | DirectConnectionColor = 0,0.749000013,0.952000022,1 33 | SignalRelayEnabled = False 34 | IgnoreLineOfSight = False 35 | FCWinPosX = 100 36 | FCWinPosY = 100 37 | FlightTermP = 2 38 | FlightTermI = 0.80000000000000004 39 | FlightTermD = 1 40 | GroundStations 41 | { 42 | STATION 43 | { 44 | Guid = 5105f5a9-d628-41c6-ad4b-21154e8fc488 45 | Name = Mission Control 46 | Latitude = -0.13133150339126601 47 | Longitude = -74.594841003417997 48 | Height = 75 49 | Body = 1 50 | MarkColor = 0.996078014,0,0,1 51 | Antennas 52 | { 53 | ANTENNA 54 | { 55 | Omni = 75000000 56 | Dish = 0 57 | CosAngle = 1 58 | UpgradeableOmni = 4E+06;3.0E+07;7.5E+07 59 | UpgradeableDish = 60 | UpgradeableCosAngle = 61 | } 62 | } 63 | } 64 | } 65 | PreSets 66 | { 67 | PRESETS = RemoteTech/Default_Settings/RemoteTechSettings 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /saves/RemoteTech KSP1_8 Testbed/Ships/SPH/Rover (Original).loadmeta: -------------------------------------------------------------------------------- 1 | shipName = Rover (Original) 2 | description = 3 | version = 1.8.1 4 | partCount = 12 5 | stageCount = 1 6 | totalCost = 5380 7 | totalMass = 0.63499999 8 | shipSize = 2.86754107,1.3399229,2.22747803 9 | type = SPH 10 | duplicatedParts = False 11 | steamPublishedFileId = 0 12 | partNames = roverBody.v2 13 | partNames = roverWheel1 14 | partNames = batteryBankMini 15 | partNames = sasModule 16 | partNames = seatExternalCmd 17 | partNames = LgRadialSolarPanel 18 | partNames = SurfAntenna 19 | partModules = ModuleCommand 20 | partModules = ModuleSAS 21 | partModules = ModuleKerbNetAccess 22 | partModules = FlagDecal 23 | partModules = ModulePartVariants 24 | partModules = ModuleSPU 25 | partModules = ModuleRTAntennaPassive 26 | partModules = ModuleTripLogger 27 | partModules = ModuleWheelBase 28 | partModules = ModuleWheelSuspension 29 | partModules = ModuleWheelSteering 30 | partModules = ModuleWheelMotor 31 | partModules = ModuleWheelBrakes 32 | partModules = ModuleWheelDamage 33 | partModules = FXModuleLookAtConstraint 34 | partModules = ModuleTestSubject 35 | partModules = ModuleReactionWheel 36 | partModules = KerbalSeat 37 | partModules = ModuleDeployableSolarPanel 38 | partModules = ModuleRTAntenna 39 | partModules = ModuleSPUPassive 40 | partModules = ModuleRTDataTransmitter 41 | saveMD5 = 28d3c76d4e62856a2fd9e4037b366821 42 | -------------------------------------------------------------------------------- /saves/RemoteTech KSP1_8 Testbed/Ships/SPH/Rover (RT).loadmeta: -------------------------------------------------------------------------------- 1 | shipName = Rover (RT) 2 | description = 3 | version = 1.8.1 4 | partCount = 12 5 | stageCount = 1 6 | totalCost = 5380 7 | totalMass = 0.63499999 8 | shipSize = 2.8669467,1.33996201,2.28858995 9 | type = SPH 10 | duplicatedParts = False 11 | steamPublishedFileId = 0 12 | partNames = roverBody.v2 13 | partNames = batteryBankMini 14 | partNames = sasModule 15 | partNames = seatExternalCmd 16 | partNames = SurfAntenna 17 | partNames = LgRadialSolarPanel 18 | partNames = roverWheel1 19 | partModules = ModuleCommand 20 | partModules = ModuleSAS 21 | partModules = ModuleKerbNetAccess 22 | partModules = FlagDecal 23 | partModules = ModulePartVariants 24 | partModules = ModuleSPU 25 | partModules = ModuleRTAntennaPassive 26 | partModules = ModuleTripLogger 27 | partModules = ModuleReactionWheel 28 | partModules = KerbalSeat 29 | partModules = ModuleRTAntenna 30 | partModules = ModuleSPUPassive 31 | partModules = ModuleRTDataTransmitter 32 | partModules = ModuleDeployableSolarPanel 33 | partModules = ModuleWheelBase 34 | partModules = ModuleWheelSuspension 35 | partModules = ModuleWheelSteering 36 | partModules = ModuleWheelMotor 37 | partModules = ModuleWheelBrakes 38 | partModules = ModuleWheelDamage 39 | partModules = FXModuleLookAtConstraint 40 | partModules = ModuleTestSubject 41 | saveMD5 = 2648c40e27c067117154bbfb4915dff0 42 | -------------------------------------------------------------------------------- /saves/RemoteTech KSP1_8 Testbed/Ships/SPH/Rover 2.loadmeta: -------------------------------------------------------------------------------- 1 | shipName = Rover 2 2 | description = 3 | version = 1.8.1 4 | partCount = 15 5 | stageCount = 1 6 | totalCost = 7810 7 | totalMass = 1.77500021 8 | shipSize = 3.08392954,1.89594269,4.1091609 9 | type = SPH 10 | duplicatedParts = False 11 | steamPublishedFileId = 0 12 | partNames = mk1pod.v2 13 | partNames = batteryBank 14 | partNames = Mk1FuselageStructural 15 | partNames = roverWheel1 16 | partNames = LgRadialSolarPanel 17 | partNames = probeCoreOcto.v2 18 | partNames = SurfAntenna 19 | partNames = advSasModule 20 | partNames = adapterSmallMiniShort 21 | partModules = ModuleCommand 22 | partModules = ModuleReactionWheel 23 | partModules = ModuleColorChanger 24 | partModules = ModuleScienceExperiment 25 | partModules = ModuleScienceContainer 26 | partModules = ModuleConductionMultiplier 27 | partModules = ModuleLiftingSurface 28 | partModules = FlagDecal 29 | partModules = ModulePartVariants 30 | partModules = ModuleTripLogger 31 | partModules = ModuleWheelBase 32 | partModules = ModuleWheelSuspension 33 | partModules = ModuleWheelSteering 34 | partModules = ModuleWheelMotor 35 | partModules = ModuleWheelBrakes 36 | partModules = ModuleWheelDamage 37 | partModules = FXModuleLookAtConstraint 38 | partModules = ModuleTestSubject 39 | partModules = ModuleDeployableSolarPanel 40 | partModules = ModuleSAS 41 | partModules = ModuleKerbNetAccess 42 | partModules = ModuleSPU 43 | partModules = ModuleRTAntennaPassive 44 | partModules = ModuleRTAntenna 45 | partModules = ModuleSPUPassive 46 | partModules = ModuleRTDataTransmitter 47 | saveMD5 = 999318bf93dc081a3fba206b33d0732a 48 | -------------------------------------------------------------------------------- /saves/RemoteTech KSP1_8 Testbed/Ships/VAB/Dish 20Mm Limit.loadmeta: -------------------------------------------------------------------------------- 1 | shipName = Dish 20Mm Limit 2 | description = 3 | version = 1.8.1 4 | partCount = 12 5 | stageCount = 1 6 | totalCost = 2310 7 | totalMass = 0.23499997 8 | shipSize = 0.819168627,1.94655991,1.19644904 9 | type = VAB 10 | duplicatedParts = False 11 | steamPublishedFileId = 0 12 | partNames = probeCoreOcto.v2 13 | partNames = batteryBankMini 14 | partNames = HighGainAntenna5 15 | partNames = SurfAntenna 16 | partNames = solarPanels5 17 | partModules = ModuleCommand 18 | partModules = ModuleReactionWheel 19 | partModules = ModuleSAS 20 | partModules = ModuleKerbNetAccess 21 | partModules = ModuleSPU 22 | partModules = ModuleRTAntennaPassive 23 | partModules = ModuleTripLogger 24 | partModules = ModuleAnimateGeneric 25 | partModules = ModuleRTAntenna 26 | partModules = ModuleSPUPassive 27 | partModules = ModuleRTDataTransmitter 28 | partModules = ModuleDeployableSolarPanel 29 | saveMD5 = fbcd996d4aad740887ec7ac1c8c2ec06 30 | -------------------------------------------------------------------------------- /saves/RemoteTech KSP1_8 Testbed/Ships/VAB/Dish 75Mm Limit.loadmeta: -------------------------------------------------------------------------------- 1 | shipName = Dish 75Mm Limit 2 | description = 3 | version = 1.8.1 4 | partCount = 8 5 | stageCount = 1 6 | totalCost = 3430 7 | totalMass = 0.24499999 8 | shipSize = 1.25999999,1.09934616,1.25999999 9 | type = VAB 10 | duplicatedParts = False 11 | steamPublishedFileId = 0 12 | partNames = probeCoreOcto.v2 13 | partNames = batteryBankMini 14 | partNames = SurfAntenna 15 | partNames = RTShortDish2 16 | partNames = solarPanels4 17 | partModules = ModuleCommand 18 | partModules = ModuleReactionWheel 19 | partModules = ModuleSAS 20 | partModules = ModuleKerbNetAccess 21 | partModules = ModuleSPU 22 | partModules = ModuleRTAntennaPassive 23 | partModules = ModuleTripLogger 24 | partModules = ModuleRTAntenna 25 | partModules = ModuleSPUPassive 26 | partModules = ModuleRTDataTransmitter 27 | partModules = ModuleDeployableSolarPanel 28 | saveMD5 = 41d955d86c09c34249c8f9f42e16bd80 29 | -------------------------------------------------------------------------------- /saves/RemoteTech KSP1_8 Testbed/Ships/VAB/Dish Gateway M.loadmeta: -------------------------------------------------------------------------------- 1 | shipName = Dish Gateway M 2 | description = 3 | version = 1.8.1 4 | partCount = 8 5 | stageCount = 1 6 | totalCost = 3730 7 | totalMass = 0.239999995 8 | shipSize = 5.78911304,1.10231018,5.78911161 9 | type = VAB 10 | duplicatedParts = False 11 | steamPublishedFileId = 0 12 | partNames = probeCoreOcto.v2 13 | partNames = batteryBankMini 14 | partNames = RTShortDish2 15 | partNames = RTLongAntenna2 16 | partNames = solarPanels4 17 | partModules = ModuleCommand 18 | partModules = ModuleReactionWheel 19 | partModules = ModuleSAS 20 | partModules = ModuleKerbNetAccess 21 | partModules = ModuleSPU 22 | partModules = ModuleRTAntennaPassive 23 | partModules = ModuleTripLogger 24 | partModules = ModuleRTAntenna 25 | partModules = ModuleSPUPassive 26 | partModules = ModuleRTDataTransmitter 27 | partModules = ModuleAnimateGeneric 28 | partModules = ModuleDeployableSolarPanel 29 | saveMD5 = d506999ed5054eaca8b4521dff84fb13 30 | -------------------------------------------------------------------------------- /saves/RemoteTech KSP1_8 Testbed/Ships/VAB/Dish Gateway.loadmeta: -------------------------------------------------------------------------------- 1 | shipName = Dish Gateway 2 | description = 3 | version = 1.8.1 4 | partCount = 13 5 | stageCount = 1 6 | totalCost = 7570 7 | totalMass = 0.51000011 8 | shipSize = 5.78984976,1.64530754,6.43571568 9 | type = VAB 10 | duplicatedParts = False 11 | steamPublishedFileId = 0 12 | partNames = probeCoreOcto.v2 13 | partNames = batteryBank 14 | partNames = RTLongDish2 15 | partNames = solarPanels4 16 | partNames = RTLongAntenna2 17 | partModules = ModuleCommand 18 | partModules = ModuleReactionWheel 19 | partModules = ModuleSAS 20 | partModules = ModuleKerbNetAccess 21 | partModules = ModuleSPU 22 | partModules = ModuleRTAntennaPassive 23 | partModules = ModuleTripLogger 24 | partModules = ModuleRTAntenna 25 | partModules = ModuleSPUPassive 26 | partModules = ModuleRTDataTransmitter 27 | partModules = ModuleDeployableSolarPanel 28 | partModules = ModuleAnimateGeneric 29 | saveMD5 = 918931d81fa07d724cd0f5e62e522ff5 30 | -------------------------------------------------------------------------------- /saves/RemoteTech KSP1_8 Testbed/Ships/VAB/Dumb Relay.loadmeta: -------------------------------------------------------------------------------- 1 | shipName = Dumb Relay 2 | description = 3 | version = 1.8.1 4 | partCount = 12 5 | stageCount = 1 6 | totalCost = 2370 7 | totalMass = 0.170000017 8 | shipSize = 0.813547969,3.71727753,0.813547969 9 | type = VAB 10 | duplicatedParts = False 11 | steamPublishedFileId = 0 12 | partNames = probeCoreOcto.v2 13 | partNames = solarPanels5 14 | partNames = batteryBankMini 15 | partNames = RTLongAntenna2 16 | partModules = ModuleCommand 17 | partModules = ModuleReactionWheel 18 | partModules = ModuleSAS 19 | partModules = ModuleKerbNetAccess 20 | partModules = ModuleSPU 21 | partModules = ModuleRTAntennaPassive 22 | partModules = ModuleTripLogger 23 | partModules = ModuleDeployableSolarPanel 24 | partModules = ModuleAnimateGeneric 25 | partModules = ModuleRTAntenna 26 | partModules = ModuleSPUPassive 27 | partModules = ModuleRTDataTransmitter 28 | saveMD5 = 8e14219dbd3904011c15e6075abec26a 29 | -------------------------------------------------------------------------------- /saves/RemoteTech KSP1_8 Testbed/Ships/VAB/Maneuver Rocket.loadmeta: -------------------------------------------------------------------------------- 1 | shipName = Maneuver Rocket 2 | description = 3 | version = 1.8.1 4 | partCount = 25 5 | stageCount = 1 6 | totalCost = 5860 7 | totalMass = 3.72499943 8 | shipSize = 3.07945251,3.36061478,4.38200426 9 | type = VAB 10 | duplicatedParts = False 11 | steamPublishedFileId = 0 12 | partNames = probeCoreOcto.v2 13 | partNames = fuelTank 14 | partNames = sasModule 15 | partNames = ksp.r.largeBatteryPack 16 | partNames = liquidEngine3.v2 17 | partNames = solarPanels3 18 | partNames = RTLongAntenna2 19 | partNames = radialRCSTank 20 | partNames = RCSBlock.v2 21 | partNames = solarPanels5 22 | partModules = ModuleCommand 23 | partModules = ModuleReactionWheel 24 | partModules = ModuleSAS 25 | partModules = ModuleKerbNetAccess 26 | partModules = ModuleSPU 27 | partModules = ModuleRTAntennaPassive 28 | partModules = ModuleTripLogger 29 | partModules = ModulePartVariants 30 | partModules = ModuleEngines 31 | partModules = ModuleGimbal 32 | partModules = ModuleJettison 33 | partModules = ModuleTestSubject 34 | partModules = ModuleSurfaceFX 35 | partModules = FXModuleAnimateThrottle 36 | partModules = ModuleDeployableSolarPanel 37 | partModules = ModuleAnimateGeneric 38 | partModules = ModuleRTAntenna 39 | partModules = ModuleSPUPassive 40 | partModules = ModuleRTDataTransmitter 41 | partModules = ModuleRCSFX 42 | partModules = FXModuleAnimateRCS 43 | saveMD5 = 6244f61c6388469c0c39d8437d4aa79c 44 | -------------------------------------------------------------------------------- /saves/RemoteTech KSP1_8 Testbed/Ships/VAB/Omni 2_5Mm Limit.loadmeta: -------------------------------------------------------------------------------- 1 | shipName = Omni 2_5Mm Limit 2 | description = 3 | version = 1.8.1 4 | partCount = 11 5 | stageCount = 1 6 | totalCost = 1710 7 | totalMass = 0.154999971 8 | shipSize = 0.818904698,2.04797363,0.818904698 9 | type = VAB 10 | duplicatedParts = False 11 | steamPublishedFileId = 0 12 | partNames = probeCoreOcto.v2 13 | partNames = batteryBankMini 14 | partNames = longAntenna 15 | partNames = solarPanels5 16 | partModules = ModuleCommand 17 | partModules = ModuleReactionWheel 18 | partModules = ModuleSAS 19 | partModules = ModuleKerbNetAccess 20 | partModules = ModuleSPU 21 | partModules = ModuleRTAntennaPassive 22 | partModules = ModuleTripLogger 23 | partModules = ModuleAnimateGeneric 24 | partModules = ModuleRTAntenna 25 | partModules = ModuleSPUPassive 26 | partModules = ModuleRTDataTransmitter 27 | partModules = ModuleDeployableSolarPanel 28 | saveMD5 = b05365f4cd409d2c409fdd8b4cba6e58 29 | -------------------------------------------------------------------------------- /saves/RemoteTech KSP1_8 Testbed/Ships/VAB/Rover Rocket.loadmeta: -------------------------------------------------------------------------------- 1 | shipName = Rover Rocket 2 | description = 3 | version = 1.8.1 4 | partCount = 2 5 | stageCount = 1 6 | totalCost = 815 7 | totalMass = 0.850000024 8 | shipSize = 1.25,1.20453739,1.25 9 | type = VAB 10 | duplicatedParts = False 11 | steamPublishedFileId = 0 12 | partNames = mk1pod.v2 13 | partNames = Separator.0 14 | partModules = ModuleCommand 15 | partModules = ModuleReactionWheel 16 | partModules = ModuleColorChanger 17 | partModules = ModuleScienceExperiment 18 | partModules = ModuleScienceContainer 19 | partModules = ModuleConductionMultiplier 20 | partModules = ModuleLiftingSurface 21 | partModules = FlagDecal 22 | partModules = ModulePartVariants 23 | partModules = ModuleTripLogger 24 | partModules = ModuleDecouple 25 | partModules = ModuleToggleCrossfeed 26 | partModules = ModuleTestSubject 27 | saveMD5 = c7c95f23830138b7283e3aab6b4da32a 28 | -------------------------------------------------------------------------------- /saves/RemoteTech KSP1_8 Testbed/Ships/VAB/Science Container.loadmeta: -------------------------------------------------------------------------------- 1 | shipName = Science Container 2 | description = 3 | version = 1.8.1 4 | partCount = 11 5 | stageCount = 1 6 | totalCost = 6410 7 | totalMass = 0.349999994 8 | shipSize = 2.55031586,1.58041573,2.30744267 9 | type = VAB 10 | duplicatedParts = False 11 | steamPublishedFileId = 0 12 | partNames = probeCoreOcto.v2 13 | partNames = batteryBankMini 14 | partNames = solarPanels3 15 | partNames = HighGainAntenna5 16 | partNames = ScienceBox 17 | partNames = sensorThermometer 18 | partNames = sensorBarometer 19 | partNames = SurfAntenna 20 | partNames = GooExperiment 21 | partModules = ModuleCommand 22 | partModules = ModuleReactionWheel 23 | partModules = ModuleSAS 24 | partModules = ModuleKerbNetAccess 25 | partModules = ModuleSPU 26 | partModules = ModuleRTAntennaPassive 27 | partModules = ModuleTripLogger 28 | partModules = ModuleDeployableSolarPanel 29 | partModules = ModuleAnimateGeneric 30 | partModules = ModuleRTAntenna 31 | partModules = ModuleSPUPassive 32 | partModules = ModuleRTDataTransmitter 33 | partModules = ModuleConductionMultiplier 34 | partModules = ModuleScienceContainer 35 | partModules = ModuleEnviroSensor 36 | partModules = ModuleScienceExperiment 37 | saveMD5 = db68bfd35f37c6616664ee119b6e28c9 38 | -------------------------------------------------------------------------------- /saves/RemoteTech KSP1_8 Testbed/persistent.loadmeta: -------------------------------------------------------------------------------- 1 | vesselCount = 17 2 | UT = 183475.71635461791 3 | gameMode = CAREER 4 | gameNull = False 5 | gameCompatible = True 6 | funds = 741178.09161949158 7 | science = 603 8 | reputationPercent = 8 9 | ongoingContracts = 0 10 | missionCurrentScore = 0 11 | missionIsStarted = False 12 | missionIsEnded = False 13 | missionHistoryId = 00000000-0000-0000-0000-000000000000 14 | missionExpansionVersion = 15 | saveMD5 = 78e483ff41c006302000fe5293ccc428 16 | -------------------------------------------------------------------------------- /src/RemoteTech/AddOns/Kerbalism.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | 4 | namespace RemoteTech.AddOns 5 | { 6 | /// Simple class to detect if Kerbalism is loaded 7 | public static class Kerbalism 8 | { 9 | private static readonly Type API; 10 | 11 | // constructor 12 | static Kerbalism() 13 | { 14 | foreach (AssemblyLoader.LoadedAssembly a in AssemblyLoader.loadedAssemblies) 15 | { 16 | if (a.name == "Kerbalism") 17 | { 18 | API = a.assembly.GetType("KERBALISM.API"); 19 | break; 20 | } 21 | } 22 | } 23 | 24 | /// Returns true if Kerbalism is detected for the current game 25 | public static bool Exists 26 | { 27 | get { return API != null; } 28 | } 29 | } 30 | } 31 | 32 | -------------------------------------------------------------------------------- /src/RemoteTech/FlightComputer/Commands/ActionGroupCommand.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace RemoteTech.FlightComputer.Commands 4 | { 5 | public class ActionGroupCommand : AbstractCommand 6 | { 7 | [Persistent] public KSPActionGroup ActionGroup; 8 | 9 | public override string Description 10 | { 11 | get { return ShortName + Environment.NewLine + base.Description; } 12 | } 13 | public override string ShortName { get { return "Toggle Action Group " + ActionGroup; } } 14 | 15 | public override bool Pop(FlightComputer f) 16 | { 17 | f.Vessel.ActionGroups.ToggleGroup(ActionGroup); 18 | if (ActionGroup == KSPActionGroup.Stage && !(f.Vessel == FlightGlobals.ActiveVessel && FlightInputHandler.fetch.stageLock)) 19 | { 20 | try 21 | { 22 | KSP.UI.Screens.StageManager.ActivateNextStage(); 23 | } 24 | catch(Exception ex) 25 | { 26 | RTLog.Notify("Exception during ActivateNextStage(): " + ex.Message, RTLogLevel.LVL4); 27 | } 28 | KSP.UI.Screens.ResourceDisplay.Instance.Refresh(); 29 | } 30 | if (ActionGroup == KSPActionGroup.RCS && f.Vessel == FlightGlobals.ActiveVessel) 31 | { 32 | FlightInputHandler.fetch.rcslock = !FlightInputHandler.RCSLock; 33 | } 34 | 35 | return false; 36 | } 37 | 38 | public static ActionGroupCommand WithGroup(KSPActionGroup group) 39 | { 40 | return new ActionGroupCommand() 41 | { 42 | ActionGroup = group, 43 | TimeStamp = RTUtil.GameTime, 44 | }; 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/RemoteTech/FlightComputer/Commands/AxisGroupCommand.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace RemoteTech.FlightComputer.Commands 4 | { 5 | public class AxisGroupCommand : AbstractCommand 6 | { 7 | #if !KSP131 8 | [Persistent] public KSPAxisGroup AxisGroup; 9 | [Persistent] public float AxisValue; 10 | #endif 11 | 12 | public override string Description 13 | { 14 | get { return ShortName + Environment.NewLine + base.Description; } 15 | } 16 | 17 | public override string ShortName 18 | { 19 | get 20 | { 21 | #if KSP131 22 | return "Unavailable in KSP 1.3.1"; 23 | #else 24 | return "Press Axis Group " + AxisGroup + " with value " + AxisValue; 25 | #endif 26 | } 27 | } 28 | 29 | public override bool Pop(FlightComputer f) 30 | { 31 | #if !KSP131 32 | for (int i = 0; i < f.Vessel.vesselModules.Count; i++) 33 | { 34 | if (f.Vessel.vesselModules[i] is AxisGroupsModule) 35 | { 36 | var agModule = f.Vessel.vesselModules[i] as AxisGroupsModule; 37 | agModule.UpdateAxisGroup(AxisGroup, AxisValue); 38 | } 39 | } 40 | #endif 41 | 42 | return false; 43 | } 44 | 45 | #if !KSP131 46 | public static AxisGroupCommand WithGroup(KSPAxisGroup group, float value) 47 | { 48 | return new AxisGroupCommand() 49 | { 50 | AxisGroup = group, 51 | AxisValue = value, 52 | TimeStamp = RTUtil.GameTime, 53 | }; 54 | } 55 | #endif 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /src/RemoteTech/FlightComputer/Commands/CancelCommand.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | 4 | namespace RemoteTech.FlightComputer.Commands 5 | { 6 | public class CancelCommand : AbstractCommand 7 | { 8 | public override double ExtraDelay { get { return base.ExtraDelay; } set { return; } } 9 | private Guid CancelCmdGuid; 10 | 11 | public override string Description { get { return "Cancelling a command." + Environment.NewLine + base.Description; } } 12 | public override string ShortName { get { return "Cancel command"; } } 13 | 14 | public override bool Pop(FlightComputer computer) 15 | { 16 | if (this.CancelCmdGuid != Guid.Empty) 17 | { 18 | this.cancelQueuedCommand(this.CancelCmdGuid, computer); 19 | } 20 | else 21 | { 22 | // we've no CancelCmdGuid for an active command. But 23 | // maybe we'll use this later 24 | this.cancelActiveCommand(this.CancelCmdGuid, computer); 25 | } 26 | 27 | return false; 28 | } 29 | 30 | public static CancelCommand WithCommand(ICommand cmd) 31 | { 32 | 33 | return new CancelCommand() 34 | { 35 | CancelCmdGuid = cmd.CmdGuid, 36 | TimeStamp = RTUtil.GameTime, 37 | }; 38 | } 39 | 40 | public static CancelCommand ResetActive() 41 | { 42 | return new CancelCommand() 43 | { 44 | CancelCmdGuid = Guid.Empty, 45 | TimeStamp = RTUtil.GameTime, 46 | }; 47 | } 48 | 49 | /// 50 | /// Load the saved CancelCommand and find the element to cancel, based on the saved queue position 51 | /// 52 | /// true - loaded successfull 53 | public override bool Load(ConfigNode n, FlightComputer computer) 54 | { 55 | if(base.Load(n, computer)) 56 | { 57 | if (n.HasValue("CancelCmdGuid")) 58 | { 59 | this.CancelCmdGuid = new Guid(n.GetValue("CancelCmdGuid")); 60 | } 61 | 62 | // old way to cancel a command 63 | if (n.HasValue("queueIndex")) 64 | { 65 | try 66 | { 67 | int queueIndex = int.Parse(n.GetValue("queueIndex")); 68 | // try to find the command to cancel 69 | this.CancelCmdGuid = computer.QueuedCommands.ElementAt(queueIndex).CmdGuid; 70 | } 71 | catch (Exception) 72 | { } 73 | } 74 | 75 | // loaded successfull 76 | if (this.CancelCmdGuid != Guid.Empty) 77 | return true; 78 | } 79 | return false; 80 | } 81 | 82 | /// 83 | /// Saves the queue index for this command to the persist 84 | /// 85 | public override void Save(ConfigNode n, FlightComputer computer) 86 | { 87 | base.Save(n, computer); 88 | n.AddValue("CancelCmdGuid", this.CancelCmdGuid); 89 | } 90 | 91 | /// 92 | /// Cancels a queued command by it's guid 93 | /// 94 | /// Guid for the command to cancel 95 | /// Current flightcomputer 96 | /// True if we canceld the command 97 | private bool cancelQueuedCommand(Guid cmdGuid, FlightComputer computer) 98 | { 99 | ICommand searchCmd = computer.QueuedCommands.Where(cmd => cmd.CmdGuid == cmdGuid).FirstOrDefault(); 100 | if (searchCmd != null) 101 | { 102 | searchCmd.CommandCanceled(computer); 103 | computer.Remove(searchCmd); 104 | return true; 105 | } 106 | 107 | return false; 108 | } 109 | 110 | /// 111 | /// Cancels the current active command. 112 | /// 113 | /// Unused right now 114 | /// Current flightcomputer 115 | /// 116 | private bool cancelActiveCommand(Guid cmdGuid, FlightComputer computer) 117 | { 118 | computer.Reset(); 119 | 120 | return true; 121 | } 122 | } 123 | } 124 | -------------------------------------------------------------------------------- /src/RemoteTech/FlightComputer/Commands/FlightControlCommand.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace RemoteTech.FlightComputer.Commands 4 | { 5 | public class FlightControlCommand : AbstractCommand 6 | { 7 | [Persistent] public bool ignorePitchOutput; 8 | [Persistent] public bool ignoreHeadingOutput; 9 | [Persistent] public bool ignoreRollOutput; 10 | 11 | private bool mAbort; 12 | private string stringReady = ""; 13 | 14 | public override string ShortName 15 | { 16 | get 17 | { 18 | return "Pitch, Heading and Roll controls"; 19 | } 20 | } 21 | 22 | public override string Description 23 | { 24 | get 25 | { 26 | return ShortName + ":" + Environment.NewLine + stringReady + base.Description; 27 | } 28 | } 29 | 30 | public static FlightControlCommand WithPHR(bool ignore_pitch, bool ignore_heading, bool ignore_roll) 31 | { 32 | return new FlightControlCommand() 33 | { 34 | ignorePitchOutput = ignore_pitch, 35 | ignoreHeadingOutput = ignore_heading, 36 | ignoreRollOutput = ignore_roll, 37 | TimeStamp = RTUtil.GameTime, 38 | }; 39 | } 40 | 41 | public override bool Pop(FlightComputer fc) 42 | { 43 | if (fc != null) 44 | { 45 | //remove active command if existing 46 | var activeCommand = FlightControlCommand.findActiveControlCmd(fc); 47 | if(activeCommand != null && activeCommand.CmdGuid != this.CmdGuid) 48 | { 49 | activeCommand.Abort(); 50 | } 51 | 52 | //build custom string 53 | var list = new string[3]; 54 | var count = 0; 55 | if (ignorePitchOutput) { list[count++] = "Pitch ignored"; } 56 | if (ignoreHeadingOutput) { list[count++] = "Heading ignored"; } 57 | if (ignoreRollOutput) { list[count++] = "Roll ignored"; } 58 | 59 | for(int i=0; i 0) { stringReady += Environment.NewLine; } 65 | 66 | return true; 67 | } 68 | return false; 69 | } 70 | 71 | public override bool Execute(FlightComputer fc, FlightCtrlState ctrlState) 72 | { 73 | SteeringHelper.FlightOutputControlMask = 0; //blank off 74 | 75 | if (mAbort || (!ignorePitchOutput && !ignoreHeadingOutput && !ignoreRollOutput)) { return true; } 76 | 77 | if (ignorePitchOutput) { SteeringHelper.FlightOutputControlMask |= SteeringHelper.FlightControlOutput.IgnorePitch; } 78 | if (ignoreHeadingOutput) { SteeringHelper.FlightOutputControlMask |= SteeringHelper.FlightControlOutput.IgnoreHeading; } 79 | if (ignoreRollOutput) { SteeringHelper.FlightOutputControlMask |= SteeringHelper.FlightControlOutput.IgnoreRoll; } 80 | 81 | return false; 82 | } 83 | 84 | public static FlightControlCommand findActiveControlCmd(FlightComputer fc) 85 | { 86 | var cmdItr = fc.ActiveCommands.GetEnumerator(); 87 | while (cmdItr.MoveNext()) 88 | { 89 | if (cmdItr.Current is FlightControlCommand) 90 | { 91 | return cmdItr.Current as FlightControlCommand; 92 | } 93 | } 94 | 95 | return null; 96 | } 97 | 98 | public override void Abort() { mAbort = true; } 99 | } 100 | } 101 | -------------------------------------------------------------------------------- /src/RemoteTech/FlightComputer/Commands/ICommand.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace RemoteTech.FlightComputer.Commands 4 | { 5 | public interface ICommand : IComparable 6 | { 7 | double TimeStamp { get; set; } 8 | double ExtraDelayScheduledTimeStamp { get; set; } //required for precise time operations 9 | double ExtraDelay { get; set; } 10 | Guid CmdGuid { get; } 11 | double Delay { get; } 12 | // The command description displayed in the flight computer 13 | String Description { get; } 14 | // An abbreviated version of the description for inline inclusion in messages 15 | String ShortName { get; } 16 | int Priority { get; } 17 | 18 | bool Pop(FlightComputer f); 19 | bool Execute(FlightComputer f, FlightCtrlState fcs); 20 | void Abort(); 21 | /// 22 | void Save(ConfigNode n, FlightComputer fc); 23 | bool Load(ConfigNode n, FlightComputer fc); 24 | /// 25 | void CommandEnqueued(FlightComputer computer); 26 | void CommandCanceled(FlightComputer computer); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/RemoteTech/FlightComputer/Commands/ManeuverCommand.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RemoteTechnologiesGroup/RemoteTech/89cfdcffb1f8f4ea38cc2095fd8ca1eb9ffb486c/src/RemoteTech/FlightComputer/Commands/ManeuverCommand.cs -------------------------------------------------------------------------------- /src/RemoteTech/FlightComputer/Commands/PIDCommand.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace RemoteTech.FlightComputer.Commands 4 | { 5 | public class PIDCommand : AbstractCommand 6 | { 7 | [Persistent] public double kp; 8 | [Persistent] public double ki; 9 | [Persistent] public double kd; 10 | 11 | public override string ShortName 12 | { 13 | get 14 | { 15 | return "Flight PID Controller parameters"; 16 | } 17 | } 18 | 19 | public override string Description 20 | { 21 | get 22 | { 23 | return ShortName +":" + Environment.NewLine + 24 | "Term P of " + kp + Environment.NewLine + 25 | "Term I of " + ki + Environment.NewLine + 26 | "Term D of " + kd + Environment.NewLine + 27 | base.Description; 28 | } 29 | } 30 | 31 | public static PIDCommand WithNewChanges(double new_kp, double new_ki, double new_kd) 32 | { 33 | return new PIDCommand() 34 | { 35 | kp = new_kp, 36 | ki = new_ki, 37 | kd = new_kd, 38 | TimeStamp = RTUtil.GameTime, 39 | }; 40 | } 41 | 42 | public override bool Pop(FlightComputer f) 43 | { 44 | if (f != null) 45 | { 46 | FlightComputer.PIDKp = kp; 47 | FlightComputer.PIDKi = ki; 48 | FlightComputer.PIDKd = kd; 49 | 50 | f.PIDController.setPIDParameters(kp, ki, kd); 51 | } 52 | return false; 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /src/RemoteTech/FlightComputer/Commands/PartActionFieldCommand.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace RemoteTech.FlightComputer.Commands 7 | { 8 | public class PartActionFieldCommand : AbstractCommand 9 | { 10 | [Persistent] 11 | public UIPartActionFieldItem FieldItem; 12 | 13 | public override string Description 14 | { 15 | get { return ShortName + Environment.NewLine + base.Description; } 16 | } 17 | 18 | public override string ShortName { get { return "Toggle field " + FieldItem.Field.name; } } 19 | 20 | 21 | public static PartActionFieldCommand FromField(UIPartActionFieldItem fieldItem) 22 | { 23 | return new PartActionFieldCommand() 24 | { 25 | FieldItem = fieldItem, 26 | TimeStamp = RTUtil.GameTime, 27 | }; 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/RemoteTech/FlightComputer/Commands/StockAutopilotCommand.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using static VesselAutopilot; 3 | 4 | namespace RemoteTech.FlightComputer.Commands 5 | { 6 | public class StockAutopilotCommand : AbstractCommand 7 | { 8 | [Persistent] public AutopilotMode AutopilotMode; 9 | public static VesselAutopilotUI UIreference = null; 10 | private static AutopilotMode savedAutopilotMode = AutopilotMode.StabilityAssist; 11 | 12 | public override string ShortName 13 | { 14 | get 15 | { 16 | return AutopilotMode.ToString(); 17 | } 18 | } 19 | 20 | public override string Description 21 | { 22 | get 23 | { 24 | return "Autopilot: " + ShortName + Environment.NewLine + base.Description; 25 | } 26 | } 27 | 28 | public override bool Pop(FlightComputer f) 29 | { 30 | if (f.Vessel.Autopilot.CanSetMode(AutopilotMode)) 31 | { 32 | f.Vessel.Autopilot.SetMode(AutopilotMode); 33 | savedAutopilotMode = AutopilotMode; // be sure to update the saved mode after setting autpilot mode 34 | return false; 35 | } 36 | return true; 37 | } 38 | 39 | public static StockAutopilotCommand WithNewMode(AutopilotMode newMode) 40 | { 41 | return new StockAutopilotCommand() 42 | { 43 | AutopilotMode = newMode, 44 | TimeStamp = RTUtil.GameTime, 45 | }; 46 | } 47 | 48 | /// 49 | /// Action to be called by a RT listener on KSP's autopilot buttons 50 | /// 51 | public static void AutopilotButtonClick(int index, FlightComputer flightCom) 52 | { 53 | var satellite = flightCom.Vessel; 54 | if (!satellite.HasLocalControl() && flightCom.InputAllowed) 55 | { 56 | //Note: the VesselAutopilotUI's OnClickButton is delayed by FlightComputer so no further action needed 57 | //Note: KSP bug #13199 (http://bugs.kerbalspaceprogram.com/issues/13199) on wrong-placed Radial In & Out buttons 58 | var currentMode = flightCom.Vessel.Autopilot.Mode; 59 | var nextMode = (AutopilotMode)index; 60 | 61 | if (currentMode != nextMode) 62 | { 63 | savedAutopilotMode = currentMode; // autopilot's stock actionlistener will set to new mode so we need to roll back to prev mode via IsAutoPilotEngaged() 64 | var newCommand = WithNewMode(nextMode); 65 | flightCom.Enqueue(newCommand); 66 | 67 | //Note: Timer of returning to prev mode doesn't really work too well in Unity and KSP architecture 68 | } 69 | } 70 | } 71 | 72 | /// 73 | /// Check if KSP's autopilot is performing one SAS function in presence of long delay 74 | /// 75 | public static bool IsAutoPilotEngaged(FlightComputer flightCom) 76 | { 77 | if (!flightCom.Vessel.Autopilot.Enabled) // autopilot is off 78 | { 79 | if(savedAutopilotMode != AutopilotMode.StabilityAssist) 80 | savedAutopilotMode = AutopilotMode.StabilityAssist; // matched to KSP's default to SAS mode when turned on 81 | return false; 82 | } 83 | 84 | if (flightCom.Vessel.Autopilot.Mode != savedAutopilotMode && flightCom.Vessel.Autopilot.CanSetMode(savedAutopilotMode)) 85 | flightCom.Vessel.Autopilot.SetMode(savedAutopilotMode); // purpose: return to the pre-click mode 86 | 87 | if (GameSettings.PITCH_DOWN.GetKey() || GameSettings.PITCH_UP.GetKey() || 88 | GameSettings.ROLL_LEFT.GetKey() || GameSettings.ROLL_RIGHT.GetKey() || 89 | GameSettings.YAW_LEFT.GetKey() || GameSettings.YAW_RIGHT.GetKey()) // player trying to manually rotate 90 | return false; 91 | 92 | if (GameSettings.TRANSLATE_FWD.GetKey() || GameSettings.TRANSLATE_BACK.GetKey() || 93 | GameSettings.TRANSLATE_LEFT.GetKey() || GameSettings.TRANSLATE_RIGHT.GetKey() || 94 | GameSettings.TRANSLATE_UP.GetKey() || GameSettings.TRANSLATE_DOWN.GetKey()) // player trying to manually translate 95 | return false; 96 | 97 | if (!GameSettings.AXIS_PITCH.IsNeutral() || 98 | !GameSettings.AXIS_ROLL.IsNeutral() || 99 | !GameSettings.AXIS_YAW.IsNeutral()) // player trying to joystick 100 | return false; 101 | 102 | return true; 103 | } 104 | } 105 | } 106 | -------------------------------------------------------------------------------- /src/RemoteTech/FlightComputer/Commands/TargetCommand.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | 4 | namespace RemoteTech.FlightComputer.Commands 5 | { 6 | public class TargetCommand : AbstractCommand 7 | { 8 | /// Defines which target we have. Can be CelestialBody or Vessel 9 | [Persistent] public String TargetType; 10 | /// Target identifier, CelestialBody=Body-id or Vessel=GUID. Depends on TargetType 11 | [Persistent] public String TargetId; 12 | 13 | public override double ExtraDelay { get { return 0.0; } set { return; } } 14 | public ITargetable Target { get; set; } 15 | public override int Priority { get { return 1; } } 16 | 17 | public override String Description 18 | { 19 | get 20 | { 21 | return ShortName + Environment.NewLine + base.Description; 22 | } 23 | } 24 | public override string ShortName { get { return "Target: " + (Target != null ? Target.GetName() : "None"); } } 25 | 26 | public override bool Pop(FlightComputer f) 27 | { 28 | f.DelayedTarget = Target; 29 | return true; 30 | } 31 | 32 | public override bool Execute(FlightComputer f, FlightCtrlState fcs) { 33 | 34 | return false; 35 | } 36 | 37 | public static TargetCommand WithTarget(ITargetable target) 38 | { 39 | return new TargetCommand() 40 | { 41 | Target = target, 42 | TimeStamp = RTUtil.GameTime, 43 | }; 44 | } 45 | 46 | /// 47 | /// Load the saved TargetCommand. Open a new ITargetable object by 48 | /// the objects id. 49 | /// 50 | /// Node with the command infos 51 | /// Current flightcomputer 52 | /// true - loaded successfull 53 | public override bool Load(ConfigNode n, FlightComputer fc) 54 | { 55 | if(base.Load(n, fc)) 56 | { 57 | switch (TargetType) 58 | { 59 | case "Vessel": 60 | { 61 | Guid Vesselid = new Guid(TargetId); 62 | Target = RTUtil.GetVesselById(Vesselid); 63 | break; 64 | } 65 | case "CelestialBody": 66 | { 67 | Target = FlightGlobals.Bodies.ElementAt(int.Parse(TargetId)); 68 | break; 69 | } 70 | default: 71 | { 72 | Target = null; 73 | break; 74 | } 75 | } 76 | return true; 77 | } 78 | return false; 79 | } 80 | 81 | /// 82 | /// Save the TargetCommand. By targeting a vessel we'll save the guid, 83 | /// by a CelestialBody we save the bodys id. 84 | /// 85 | /// Node to save in 86 | /// Current flightcomputer 87 | public override void Save(ConfigNode n, FlightComputer fc) 88 | { 89 | if (Target != null) 90 | { 91 | TargetType = Target.GetType().ToString(); 92 | 93 | switch (TargetType) 94 | { 95 | case "Vessel": 96 | { 97 | TargetId = ((Vessel)Target).id.ToString(); 98 | break; 99 | } 100 | case "CelestialBody": 101 | { 102 | TargetId = FlightGlobals.Bodies.ToList().IndexOf(((CelestialBody)Target)).ToString(); 103 | break; 104 | } 105 | default: 106 | { 107 | TargetId = null; 108 | break; 109 | } 110 | } 111 | } 112 | 113 | base.Save(n, fc); 114 | } 115 | } 116 | } 117 | -------------------------------------------------------------------------------- /src/RemoteTech/FlightComputer/DelayedCommand.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Text; 3 | using UnityEngine; 4 | 5 | namespace RemoteTech.FlightComputer 6 | { 7 | public class DelayedFlightCtrlState : IComparable 8 | { 9 | public FlightCtrlState State { get; private set; } 10 | public double TimeStamp { get; set; } 11 | 12 | public DelayedFlightCtrlState(FlightCtrlState fcs) 13 | { 14 | State = new FlightCtrlState(); 15 | State.CopyFrom(fcs); 16 | TimeStamp = RTUtil.GameTime; 17 | } 18 | 19 | public int CompareTo(DelayedFlightCtrlState dfcs) 20 | { 21 | return TimeStamp.CompareTo(dfcs.TimeStamp); 22 | } 23 | } 24 | 25 | public class DelayedManeuver : IComparable 26 | { 27 | public ManeuverNode Node { get; set; } 28 | public double TimeStamp { get; set; } 29 | 30 | public DelayedManeuver(ManeuverNode node) 31 | { 32 | Node = new ManeuverNode() 33 | { 34 | DeltaV = node.DeltaV, 35 | patch = node.patch, 36 | solver = node.solver, 37 | scaledSpaceTarget = node.scaledSpaceTarget, 38 | nextPatch = node.nextPatch, 39 | UT = node.UT, 40 | nodeRotation = node.nodeRotation, 41 | }; 42 | TimeStamp = RTUtil.GameTime; 43 | } 44 | 45 | public int CompareTo(DelayedManeuver dm) 46 | { 47 | return TimeStamp.CompareTo(dm.TimeStamp); 48 | } 49 | } 50 | } -------------------------------------------------------------------------------- /src/RemoteTech/IAntenna.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace RemoteTech 4 | { 5 | public interface IAntenna : IComparable 6 | { 7 | String Name { get; } 8 | Guid Guid { get; } 9 | bool Activated { get; set; } 10 | bool Powered { get; } 11 | bool Connected { get; } 12 | bool CanTarget { get; } 13 | Guid Target { get; set; } 14 | float Dish { get; } 15 | double CosAngle { get; } 16 | float Omni { get; } 17 | float Consumption { get; } 18 | 19 | void OnConnectionRefresh(); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/RemoteTech/ISatellite.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using RemoteTech.SimpleTypes; 5 | 6 | namespace RemoteTech 7 | { 8 | public interface ISatellite 9 | { 10 | /// Gets whether or not a satellite if visible in the Tracking station or the Flight Map view. 11 | bool Visible { get; } 12 | /// Gets or sets the name of the satellite. 13 | string Name { get; set; } 14 | /// Gets the satellite id. 15 | Guid Guid { get; } 16 | /// Gets a double precision vector for the satellite's world space position. 17 | Vector3d Position { get; } 18 | /// Gets the celestial body around which the satellite is orbiting. 19 | CelestialBody Body { get; } 20 | /// Gets the color of the ground station mark in Tracking station or Flight map view. 21 | Color MarkColor { get; } 22 | /// Gets if the satellite is actually powered or not. 23 | bool Powered { get; } 24 | /// Gets if the satellite is a RemoteTech command station. 25 | bool IsCommandStation { get; } 26 | /// Gets whether the satellite has local control or not (that is, if it is locally controlled or not). 27 | bool HasLocalControl { get; } 28 | /// Indicates whether the ISatellite corresponds to a vessel 29 | /// true if satellite is vessel or asteroid; otherwise (e.g. a ground station), false. 30 | bool isVessel { get; } 31 | /// The vessel hosting the ISatellite, if one exists. 32 | /// The vessel corresponding to this ISatellite. Returns null if !isVessel. 33 | Vessel parentVessel { get; } 34 | /// Gets a list of antennas for this satellite. 35 | IEnumerable Antennas { get; } 36 | /// Called on connection refresh to update the connections. 37 | /// List of network routes. 38 | void OnConnectionRefresh(List> routes); 39 | /// Gets if the satellite is capable to forward other signals. 40 | bool CanRelaySignal { get; } 41 | /// Indicates whether the satellite is in radio blackout. 42 | bool IsInRadioBlackout { get; set; } 43 | /// Indicates whether the manual power override is engaged. 44 | bool PowerShutdownFlag { get; set; } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/RemoteTech/ISignalProcessor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | namespace RemoteTech 5 | { 6 | public interface ISignalProcessor 7 | { 8 | String Name { get; } 9 | String VesselName { get; set; } 10 | bool VesselLoaded { get; } 11 | Guid VesselId { get; } 12 | Vector3 Position { get; } 13 | CelestialBody Body { get; } 14 | 15 | bool Visible { get; } 16 | bool Powered { get; } 17 | bool IsCommandStation { get; } 18 | bool IsMaster { get; } 19 | bool CanRelaySignal { get; } 20 | 21 | // Reserved for Flight Computer 22 | FlightComputer.FlightComputer FlightComputer { get; } 23 | Vessel Vessel { get; } 24 | } 25 | } -------------------------------------------------------------------------------- /src/RemoteTech/Modules/ModuleSPUPassive.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | namespace RemoteTech.Modules 5 | { 6 | /// 7 | /// This module allows any vessel with an antenna to participate in a RemoteTech network, even if it does not have a . 8 | /// It should be included in all RemoteTech antennas. Unlike ModuleSPU, it does not filter commands or provide a flight computer. 9 | /// 10 | public class ModuleSPUPassive : PartModule, ISignalProcessor 11 | { 12 | public string Name => $"ModuleSPUPassive({VesselName})"; 13 | public string VesselName 14 | { 15 | get { return vessel != null ? vessel.vesselName : "vessel-null"; } 16 | set { if(vessel != null) vessel.vesselName = value; } 17 | } 18 | public bool VesselLoaded => vessel != null && vessel.loaded; 19 | public Guid VesselId { get; private set; } 20 | public Vector3 Position { get { return vessel != null ? vessel.GetWorldPos3D() : new Vector3d(); } } 21 | public CelestialBody Body { get { return vessel != null ? vessel.mainBody : null; } } 22 | public bool Visible => MapViewFiltering.CheckAgainstFilter(vessel); 23 | public bool Powered => vessel != null && vessel.IsControllable; 24 | public bool IsCommandStation => false; 25 | public FlightComputer.FlightComputer FlightComputer => null; 26 | public Vessel Vessel => vessel; 27 | public bool IsMaster => false; 28 | public bool CanRelaySignal => true; 29 | 30 | [KSPField(isPersistant = true)] public bool IsRTPowered; 31 | [KSPField(isPersistant = true)] public bool IsRTSignalProcessor = true; 32 | [KSPField(isPersistant = true)] public bool IsRTCommandStation = false; 33 | 34 | public override void OnStart(StartState state) 35 | { 36 | if (state != StartState.Editor) 37 | { 38 | GameEvents.onVesselWasModified.Add(OnVesselModified); 39 | GameEvents.onPartUndock.Add(OnPartUndock); 40 | VesselId = vessel.id; 41 | if(RTCore.Instance != null) 42 | { 43 | RTCore.Instance.Satellites.Register(vessel, this); 44 | } 45 | } 46 | } 47 | 48 | private void FixedUpdate() 49 | { 50 | if (Vessel != null) 51 | { 52 | IsRTPowered = Powered; 53 | } 54 | } 55 | 56 | public void OnDestroy() 57 | { 58 | RTLog.Notify("ModuleSPUPassive: OnDestroy"); 59 | GameEvents.onVesselWasModified.Remove(OnVesselModified); 60 | GameEvents.onPartUndock.Remove(OnPartUndock); 61 | if (RTCore.Instance != null) 62 | { 63 | RTCore.Instance.Satellites.Unregister(VesselId, this); 64 | VesselId = Guid.Empty; 65 | } 66 | } 67 | 68 | public void OnPartUndock(Part p) 69 | { 70 | OnVesselModified(p.vessel); 71 | } 72 | 73 | public void OnVesselModified(Vessel v) 74 | { 75 | if (RTCore.Instance != null && vessel != null && VesselId != vessel.id) 76 | { 77 | RTCore.Instance.Satellites.Unregister(VesselId, this); 78 | VesselId = vessel.id; 79 | RTCore.Instance.Satellites.Register(vessel, this); 80 | } 81 | } 82 | 83 | public override string ToString() 84 | { 85 | return $"ModuleSPUPassive({(Vessel != null ? Vessel.vesselName : "null")}, {VesselId})"; 86 | } 87 | } 88 | } -------------------------------------------------------------------------------- /src/RemoteTech/Modules/ProtoAntenna.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | 4 | namespace RemoteTech.Modules 5 | { 6 | internal class ProtoAntenna : IAntenna 7 | { 8 | public String Name { get; private set; } 9 | public Guid Guid { get; private set; } 10 | public bool Powered { get; private set; } 11 | public bool Activated { get; set; } 12 | public bool Connected { get { return RTCore.Instance.Network.Graph [Guid].Any (l => l.Interfaces.Contains (this)); } } 13 | public float Consumption { get; private set; } 14 | 15 | public bool CanTarget { get { return Dish != -1; } } 16 | 17 | public Guid Target 18 | { 19 | get { return mDishTarget; } 20 | set 21 | { 22 | mDishTarget = value; 23 | if (mProtoModule != null) 24 | { 25 | mProtoModule.moduleValues.SetValue("RTAntennaTarget", value.ToString()); 26 | int i = mProtoPart.modules.FindIndex(x => x == mProtoModule); 27 | if (i != -1) 28 | { 29 | mProtoPart.modules[i] = new ProtoPartModuleSnapshot(mProtoModule.moduleValues); 30 | } 31 | } 32 | 33 | } 34 | } 35 | 36 | public float Dish { get; private set; } 37 | public double CosAngle { get; private set; } 38 | public float Omni { get; private set; } 39 | 40 | private readonly ProtoPartSnapshot mProtoPart; 41 | private readonly ProtoPartModuleSnapshot mProtoModule; 42 | 43 | private Guid mDishTarget; 44 | 45 | public ProtoAntenna(Vessel v, ProtoPartSnapshot p, ProtoPartModuleSnapshot ppms) 46 | { 47 | Name = p.partInfo.title; 48 | Consumption = 0; 49 | Guid = v.id; 50 | mProtoPart = p; 51 | mProtoModule = ppms; 52 | try 53 | { 54 | mDishTarget = new Guid(ppms.moduleValues.GetValue("RTAntennaTarget")); 55 | } 56 | catch (Exception ex) when (ex is ArgumentNullException || ex is FormatException || ex is OverflowException) 57 | { 58 | mDishTarget = Guid.Empty; 59 | } 60 | double temp_double; 61 | float temp_float; 62 | bool temp_bool; 63 | Dish = Single.TryParse(ppms.moduleValues.GetValue("RTDishRange"), out temp_float) ? temp_float : 0.0f; 64 | CosAngle = Double.TryParse(ppms.moduleValues.GetValue("RTDishCosAngle"), out temp_double) ? temp_double : 0.0; 65 | Omni = Single.TryParse(ppms.moduleValues.GetValue("RTOmniRange"), out temp_float) ? temp_float : 0.0f; 66 | Powered = Boolean.TryParse(ppms.moduleValues.GetValue("IsRTPowered"), out temp_bool) ? temp_bool : false; 67 | Activated = Boolean.TryParse(ppms.moduleValues.GetValue("IsRTActive"), out temp_bool) ? temp_bool : false; 68 | 69 | RTLog.Notify(ToString()); 70 | } 71 | 72 | public ProtoAntenna(String name, Guid guid, float omni) 73 | { 74 | Name = name; 75 | Guid = guid; 76 | Omni = omni; 77 | Dish = 0; 78 | Target = Guid.Empty; 79 | CosAngle = 1.0f; 80 | Activated = true; 81 | Powered = true; 82 | } 83 | 84 | public void OnConnectionRefresh() 85 | { 86 | ; 87 | } 88 | 89 | public int CompareTo(IAntenna antenna) 90 | { 91 | return Consumption.CompareTo(antenna.Consumption); 92 | } 93 | 94 | public override string ToString() 95 | { 96 | return String.Format("ProtoAntenna(Name: {0}, Guid: {1}, Dish: {2}, Omni: {3}, Target: {4}, CosAngle: {5})", Name, Guid, Dish, Omni, Target, CosAngle); 97 | } 98 | } 99 | } -------------------------------------------------------------------------------- /src/RemoteTech/Modules/ProtoSignalProcessor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | namespace RemoteTech.Modules 5 | { 6 | public class ProtoSignalProcessor : ISignalProcessor 7 | { 8 | public string Name { get { return $"ProtoSignalProcessor({VesselName})"; } } 9 | public bool Visible => MapViewFiltering.CheckAgainstFilter(Vessel); 10 | public CelestialBody Body => Vessel.mainBody; 11 | public Vector3 Position => Vessel.GetWorldPos3D(); 12 | public string VesselName 13 | { 14 | get { return Vessel.vesselName; } 15 | set { Vessel.vesselName = value; } 16 | } 17 | public bool VesselLoaded => false; 18 | public bool Powered { get; } 19 | public bool IsCommandStation { get; } 20 | public Guid VesselId => Vessel.id; 21 | public Vessel Vessel { get; } 22 | public FlightComputer.FlightComputer FlightComputer => null; 23 | public bool IsMaster => true; 24 | public bool CanRelaySignal { get; } 25 | 26 | public ProtoSignalProcessor(ProtoPartModuleSnapshot ppms, Vessel v) 27 | { 28 | Vessel = v; 29 | Powered = ppms.GetBool("IsRTPowered"); 30 | CanRelaySignal = RTSettings.Instance.SignalRelayEnabled? (ppms.HasValue("AllowSignalRelay")? ppms.GetBool("AllowSignalRelay") : true) : true; 31 | 32 | // get the crew count from the vessel 33 | var crewcount = v.GetVesselCrew().Count; 34 | 35 | // when the crew count is equal to 0 then look into the protoVessel 36 | if (crewcount == 0 && v.protoVessel.GetVesselCrew() != null) 37 | crewcount = v.protoVessel.GetVesselCrew().Count; 38 | 39 | RTLog.Notify("ProtoSignalProcessor crew count of {0} is {1}", v.vesselName, crewcount); 40 | 41 | int ppmsMinCrew; 42 | //try to get the RTCommandMinCrew value in the ProtoPartModuleSnapshot 43 | if (ppms.GetInt("RTCommandMinCrew", out ppmsMinCrew)) 44 | { 45 | IsCommandStation = Powered && v.HasCommandStation() && crewcount >= ppmsMinCrew; 46 | RTLog.Notify("ProtoSignalProcessor(Powered: {0}, HasCommandStation: {1}, Crew: {2}/{3})", 47 | Powered, v.HasCommandStation(), crewcount, ppmsMinCrew); 48 | } 49 | else 50 | { 51 | // there was no RTCommandMinCrew member in the ProtoPartModuleSnapshot 52 | IsCommandStation = false; 53 | 54 | RTLog.Notify("ProtoSignalProcessor(Powered: {0}, HasCommandStation: {1}, Crew: {2})", 55 | Powered, v.HasCommandStation(), crewcount); 56 | } 57 | } 58 | 59 | public override string ToString() 60 | { 61 | return Name; 62 | } 63 | } 64 | } -------------------------------------------------------------------------------- /src/RemoteTech/NetworkPathfinder.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using RemoteTech.SimpleTypes; 4 | 5 | namespace RemoteTech 6 | { 7 | public static class NetworkPathfinder 8 | { 9 | // All sorting related data is immutable. 10 | 11 | public static NetworkRoute Solve(T start, T goal, 12 | Func>> neighborsFunction, 13 | Func, double> costFunction, 14 | Func heuristicFunction) where T : class 15 | { 16 | var nodeMap = new Dictionary>>(); 17 | var priorityQueue = new PriorityQueue>>(); 18 | 19 | var nStart = new Node>(new NetworkLink(start, null, LinkType.None), 0, heuristicFunction.Invoke(start, goal), null, false); 20 | nodeMap[start] = nStart; 21 | priorityQueue.Enqueue(nStart); 22 | 23 | while (priorityQueue.Count > 0) 24 | { 25 | var current = priorityQueue.Dequeue(); 26 | if (current.Closed) continue; 27 | current.Closed = true; 28 | if (current.Item.Target.Equals(goal)) 29 | { 30 | // Return path and cost 31 | var reversePath = new List>(); 32 | for (var node = current; node.From != null; node = node.From) 33 | { 34 | reversePath.Add(node.Item); 35 | } 36 | reversePath.Reverse(); 37 | return new NetworkRoute(start, reversePath, current.Cost); 38 | } 39 | 40 | foreach (var link in neighborsFunction.Invoke(current.Item.Target)) 41 | { 42 | double new_cost = current.Cost + costFunction.Invoke(current.Item.Target, link); 43 | 44 | // Todo: Dennis: i use the fix from Taste83 #139 and i'll look closer if i'm more related to the Pathfinder 45 | if (new_cost == current.Cost) 46 | { 47 | continue; 48 | } 49 | 50 | // If the item has a node, it will either be in the closedSet, or the openSet 51 | if (nodeMap.ContainsKey(link.Target)) 52 | { 53 | Node> n = nodeMap[link.Target]; 54 | if (new_cost <= n.Cost) 55 | { 56 | // Cost via current is better than the old one, discard old node, queue new one. 57 | var new_node = new Node>(n.Item, new_cost, n.Heuristic, current, false); 58 | n.Closed = true; 59 | nodeMap[link.Target] = new_node; 60 | priorityQueue.Enqueue(new_node); 61 | } 62 | } 63 | else 64 | { 65 | // It is not in the openSet, create a node and add it 66 | var new_node = new Node>(link, new_cost, 67 | heuristicFunction.Invoke(link.Target, goal), current, 68 | false); 69 | priorityQueue.Enqueue(new_node); 70 | nodeMap[link.Target] = new_node; 71 | } 72 | } 73 | } 74 | return NetworkRoute.Empty(start); 75 | } 76 | 77 | private class Node : IComparable> 78 | { 79 | public Node From { get; set; } 80 | public bool Closed { get; set; } 81 | 82 | public int CompareTo(Node node) 83 | { 84 | return (Cost + Heuristic).CompareTo(node.Cost + node.Heuristic); 85 | } 86 | 87 | public readonly double Cost; 88 | public readonly double Heuristic; 89 | public readonly T Item; 90 | 91 | public Node(T item, double cost, double heuristic, Node from, bool closed) 92 | { 93 | Item = item; 94 | Cost = cost; 95 | Heuristic = heuristic; 96 | From = from; 97 | Closed = closed; 98 | } 99 | } 100 | } 101 | } -------------------------------------------------------------------------------- /src/RemoteTech/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("RemoteTech")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("RemoteTechnologiesGroup")] 12 | [assembly: AssemblyProduct("RemoteTech")] 13 | [assembly: AssemblyCopyright("Copyright © 2013-2021")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("6466071c-8d09-42b1-ab24-aa485169e609")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | 36 | // Don't include the patch revision in the AssemblyVersion - as this will break any dependent 37 | // DLLs any time it changes. Breaking on a minor revision is probably acceptable - it's 38 | // unlikely that there wouldn't be other breaking changes on a minor version change. 39 | [assembly: AssemblyVersion("1.9")] 40 | [assembly: AssemblyFileVersion("1.9.12")] 41 | 42 | // Use KSPAssembly to allow other DLLs to make this DLL a dependency in a 43 | // non-hacky way in KSP. Format is (AssemblyProduct, major, minor), and it 44 | // does not appear to have a hard requirement to match the assembly version. 45 | [assembly: KSPAssembly("RemoteTech", 1, 9)] 46 | -------------------------------------------------------------------------------- /src/RemoteTech/RTDebugUnit.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | namespace RemoteTech 6 | { 7 | [KSPAddon(KSPAddon.Startup.EveryScene, false)] 8 | public class RTDebugUnit : MonoBehaviour 9 | { 10 | private UI.DebugWindow debugWindow; 11 | 12 | public void Start() 13 | { 14 | #if DEBUG 15 | debugWindow = new UI.DebugWindow(); 16 | #endif 17 | } 18 | 19 | public void Update() 20 | { 21 | if ((Input.GetKeyDown(KeyCode.F11) || Input.GetKeyDown(KeyCode.F12)) && (HighLogic.LoadedSceneIsFlight || HighLogic.LoadedSceneHasPlanetarium)) 22 | { 23 | if (Input.GetKeyDown(KeyCode.F11)) 24 | Dump(); 25 | else 26 | debugWindow?.toggleWindow(); 27 | } 28 | } 29 | 30 | public void Dump() 31 | { 32 | var dump = new List(); 33 | dump.AddRange(DumpSatellites()); 34 | dump.Add(Environment.NewLine); 35 | dump.AddRange(DumpAntennas()); 36 | dump.Add(Environment.NewLine); 37 | dump.AddRange(DumpEdges()); 38 | dump.Add(Environment.NewLine); 39 | dump.AddRange(DumpConnectionTests()); 40 | dump.Add(Environment.NewLine); 41 | 42 | System.IO.File.WriteAllText(@"./rt_dump.txt", string.Join(Environment.NewLine, dump.ToArray())); 43 | } 44 | 45 | public string[] DumpSatellites() 46 | { 47 | var data = new List {"NetworkManager contents: "}; 48 | var i = 0; 49 | foreach (var satellite in RTCore.Instance.Network) 50 | { 51 | data.Add($" {i++}: {satellite}"); 52 | } 53 | 54 | return data.ToArray(); 55 | } 56 | 57 | public string[] DumpAntennas() 58 | { 59 | var data = new List {"AntennaManager contents: "}; 60 | var i = 0; 61 | foreach (var antenna in RTCore.Instance.Antennas) 62 | { 63 | data.Add($" {i++}: {antenna}"); 64 | } 65 | 66 | return data.ToArray(); 67 | } 68 | 69 | public string[] DumpEdges() 70 | { 71 | var data = new List {"NetworkManager.Graph contents: "}; 72 | var i = 0; 73 | foreach (var edge in RTCore.Instance.Network.Graph) 74 | { 75 | data.Add($" {i++}: {edge.Key}"); 76 | var j = 0; 77 | foreach (var target in edge.Value) 78 | { 79 | data.Add($" {j++}: {target}"); 80 | } 81 | } 82 | 83 | return data.ToArray(); 84 | } 85 | 86 | public string[] DumpConnectionTests() 87 | { 88 | var data = new List {"Forced connection checks: "}; 89 | var i = 0; 90 | foreach (var sat1 in RTCore.Instance.Network) 91 | { 92 | var j = 0; 93 | foreach (var sat2 in RTCore.Instance.Network) 94 | { 95 | if (sat1 == sat2) continue; 96 | data.Add($" {i} -> {j}: {NetworkManager.GetLink(sat1, sat2)}"); 97 | j++; 98 | } 99 | i++; 100 | } 101 | 102 | return data.ToArray(); 103 | } 104 | } 105 | } 106 | -------------------------------------------------------------------------------- /src/RemoteTech/RTEditor.cs: -------------------------------------------------------------------------------- 1 | using RemoteTech.Modules; 2 | using RemoteTech.UI; 3 | using System; 4 | using UnityEngine; 5 | using KSP.UI.Screens; 6 | 7 | namespace RemoteTech 8 | { 9 | [KSPAddon(KSPAddon.Startup.EditorAny, false)] 10 | public class RTEditor : MonoBehaviour 11 | { 12 | /// 13 | /// Start method for RTEditor 14 | /// 15 | public void Start() 16 | { 17 | GameEvents.onEditorNewShipDialogDismiss.Add(OnNewShip); 18 | GameEvents.onEditorPartPicked.Add(OnPartPicked); 19 | GameEvents.onEditorLoad.Add(OnEditorLoad); 20 | GameEvents.onEditorScreenChange.Add(OnScreenChange); 21 | GameEvents.onEditorRestart.Add(OnEditorRestart); 22 | } 23 | 24 | /// 25 | /// Unity onGUI Method to draw 26 | /// 27 | public void OnGUI() 28 | { 29 | GUI.depth = 0; // comment: necessary to make AbstractWindow's close button clickable 30 | 31 | Action windows = delegate { }; 32 | var itr = AbstractWindow.Windows.GetEnumerator(); 33 | while (itr.MoveNext()) 34 | { 35 | var windowPair = itr.Current; 36 | windows += windowPair.Value.Draw; 37 | } 38 | windows.Invoke(); 39 | } 40 | 41 | /// 42 | /// Unity OnDestroy Method to clean up 43 | /// 44 | public void OnDestroy() 45 | { 46 | GameEvents.onEditorNewShipDialogDismiss.Remove(OnNewShip); 47 | GameEvents.onEditorPartPicked.Remove(OnPartPicked); 48 | GameEvents.onEditorLoad.Remove(OnEditorLoad); 49 | GameEvents.onEditorScreenChange.Remove(OnScreenChange); 50 | GameEvents.onEditorRestart.Remove(OnEditorRestart); 51 | 52 | HideAllWindows(); 53 | } 54 | 55 | private void HideAllWindows() 56 | { 57 | Action windows = delegate { }; 58 | var itr = AbstractWindow.Windows.GetEnumerator(); 59 | while (itr.MoveNext()) 60 | { 61 | var windowPair = itr.Current; 62 | windows += windowPair.Value.Hide; 63 | } 64 | windows.Invoke(); 65 | } 66 | 67 | ///////////// 68 | // Bunch of editor events below that should hide RemoteTech window 69 | ///////////// 70 | private void OnScreenChange(EditorScreen screen) 71 | { 72 | HideAllWindows(); 73 | } 74 | 75 | private void OnEditorLoad(ShipConstruct ship, CraftBrowserDialog.LoadType loadType) 76 | { 77 | HideAllWindows(); 78 | } 79 | 80 | private void OnPartPicked(Part part) 81 | { 82 | if (part != null) 83 | { 84 | var module = part.FindModuleImplementing(); 85 | if (module != null) 86 | { 87 | HideAllWindows(); 88 | } 89 | } 90 | } 91 | 92 | private void OnNewShip() 93 | { 94 | HideAllWindows(); 95 | } 96 | 97 | private void OnEditorRestart() 98 | { 99 | HideAllWindows(); 100 | } 101 | } 102 | } 103 | -------------------------------------------------------------------------------- /src/RemoteTech/RTSpaceCentre.cs: -------------------------------------------------------------------------------- 1 | using RemoteTech.UI; 2 | using System; 3 | using System.Linq; 4 | using UnityEngine; 5 | using KSP.UI.Screens; 6 | 7 | namespace RemoteTech 8 | { 9 | [KSPAddon(KSPAddon.Startup.SpaceCentre, false)] 10 | public class RTSpaceCentre : MonoBehaviour 11 | { 12 | /// Button for KSP Stock Tool bar 13 | public static ApplicationLauncherButton LauncherButton = null; 14 | 15 | /// OptionWindow 16 | private OptionWindow _optionWindow; 17 | /// Texture for the KSP Stock Tool-bar Button 18 | private Texture2D _rtOptionBtn; 19 | 20 | /// 21 | /// Start method for RTSpaceCentre 22 | /// 23 | public void Start() 24 | { 25 | // create the option window 26 | _optionWindow = new OptionWindow(); 27 | 28 | GameEvents.onLevelWasLoaded.Add(onLevelWasLoaded); 29 | GameEvents.OnUpgradeableObjLevelChange.Add(OnUpgradeableObjLevelChange); 30 | RTSettings.OnSettingsChanged.Add(OnRtSettingsChanged); 31 | 32 | _rtOptionBtn = RTUtil.LoadImage("gitpagessat"); 33 | 34 | LauncherButton = ApplicationLauncher.Instance.AddModApplication( 35 | _optionWindow.toggleWindow, null, null, null, null, null, 36 | ApplicationLauncher.AppScenes.SPACECENTER, 37 | _rtOptionBtn); 38 | } 39 | 40 | /// 41 | /// Callback-Event when a Upgradeable object (TrackingStation) has changed 42 | /// 43 | private void OnUpgradeableObjLevelChange(Upgradeables.UpgradeableObject obj, int lvl) 44 | { 45 | if (!obj.name.Equals("TrackingStation")) 46 | return; 47 | 48 | RTLog.Verbose("OnUpgradeableObjLevelChange {0} - Level: {1}", RTLogLevel.LVL4, obj.name, lvl); 49 | ReloadUpgradableAntennas(lvl+1); 50 | } 51 | 52 | /// 53 | /// Callback-Event when the RTSettings are changed 54 | /// 55 | private void OnRtSettingsChanged() 56 | { 57 | ReloadUpgradableAntennas(); 58 | } 59 | 60 | // Note: KSP's GameEvents.onLevelWasLoaded has the lower-case 'on' instead of usual 'On' 61 | private void onLevelWasLoaded(GameScenes scene) 62 | { 63 | if (scene != GameScenes.SPACECENTER) 64 | return; 65 | 66 | if (!RTSettings.Instance.FirstStart) 67 | return; 68 | 69 | // open here the option dialog for the first start 70 | RTLog.Notify("First start of RemoteTech!"); 71 | _optionWindow.Show(); 72 | RTSettings.Instance.FirstStart = false; 73 | } 74 | 75 | /// 76 | /// Apply antenna upgrades to all ground stations. 77 | /// 78 | /// The level applied to the antennas range. 79 | private void ReloadUpgradableAntennas(int techlvl = 0) 80 | { 81 | foreach ( var satellite in RTSettings.Instance.GroundStations) 82 | { 83 | satellite.reloadUpgradeableAntennas(techlvl); 84 | } 85 | } 86 | 87 | /// 88 | /// Unity onGUI Method to draw the OptionWindow 89 | /// 90 | public void OnGUI() 91 | { 92 | Action windows = delegate { }; 93 | var windowCount = AbstractWindow.Windows.Values.Count; 94 | for (var i = 0; i < windowCount; i++) 95 | { 96 | var window = AbstractWindow.Windows.Values.ElementAt(i); 97 | windows += window.Draw; 98 | } 99 | 100 | windows.Invoke(); 101 | } 102 | 103 | /// 104 | /// Unity OnDestroy Method to clean up 105 | /// 106 | public void OnDestroy() 107 | { 108 | RTSettings.OnSettingsChanged.Remove(OnRtSettingsChanged); 109 | GameEvents.onLevelWasLoaded.Remove(onLevelWasLoaded); 110 | GameEvents.OnUpgradeableObjLevelChange.Remove(OnUpgradeableObjLevelChange); 111 | 112 | _optionWindow.Hide(); 113 | 114 | _optionWindow = null; 115 | 116 | if (LauncherButton != null) 117 | { 118 | ApplicationLauncher.Instance.RemoveModApplication(LauncherButton); 119 | } 120 | } 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /src/RemoteTech/RangeModel/RangeModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace RemoteTech.RangeModel 4 | { 5 | [Flags] 6 | public enum RangeModel 7 | { 8 | Standard, 9 | Additive, 10 | Root = Additive, 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/RemoteTech/RangeModel/RangeModelRoot.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using RemoteTech.SimpleTypes; 3 | 4 | namespace RemoteTech.RangeModel 5 | { 6 | public static class RangeModelRoot 7 | { 8 | /// Finds the maximum distance between two satellites with ranges r1 and r2. 9 | /// The maximum range at which the two satellites can communicate. 10 | private static double MaxDistance(double r1, double r2) 11 | { 12 | return Math.Min(r1, r2) + Math.Sqrt(r1 * r2); 13 | } 14 | 15 | /// Finds the maximum range between an antenna and a potential target. 16 | /// The maximum distance at which the two spacecraft could communicate. 17 | /// The antenna attempting to target. 18 | /// The satellite being targeted by . 19 | /// The satellite on which is mounted. 20 | public static double GetRangeInContext(IAntenna antenna, ISatellite target, ISatellite antennaSat) { 21 | return AbstractRangeModel.GetRangeInContext(antenna, target, antennaSat, MaxDistance); 22 | } 23 | 24 | /// Constructs a link between two satellites, if one is possible. 25 | /// The new link, or null if the two satellites cannot connect. 26 | public static NetworkLink GetLink(ISatellite satA, ISatellite satB) { 27 | return AbstractRangeModel.GetLink(satA, satB, MaxDistance); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/RemoteTech/RangeModel/RangeModelStandard.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using RemoteTech.SimpleTypes; 3 | 4 | namespace RemoteTech.RangeModel 5 | { 6 | public static class RangeModelStandard 7 | { 8 | /// Finds the maximum distance between two satellites with ranges r1 and r2. 9 | /// The maximum range at which the two satellites can communicate. 10 | private static double MaxDistance(double r1, double r2) 11 | { 12 | return Math.Min(r1, r2); 13 | } 14 | 15 | /// Finds the maximum range between an antenna and a potential target. 16 | /// The maximum distance at which the two spacecraft could communicate. 17 | /// The antenna attempting to target. 18 | /// The satellite being targeted by . 19 | /// The satellite on which is mounted. 20 | public static double GetRangeInContext(IAntenna antenna, ISatellite target, ISatellite antennaSat) { 21 | return AbstractRangeModel.GetRangeInContext(antenna, target, antennaSat, MaxDistance); 22 | } 23 | 24 | /// Constructs a link between two satellites, if one is possible. 25 | /// The new link, or null if the two satellites cannot connect. 26 | public static NetworkLink GetLink(ISatellite satA, ISatellite satB) { 27 | return AbstractRangeModel.GetLink(satA, satB, MaxDistance); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/RemoteTech/RemoteTech.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 11.00 3 | # Visual C# Express 2010 4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RemoteTech", "RemoteTech.csproj", "{42155D82-1F25-4E59-9F65-64ABC583F420}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | Debug|Any CPU = Debug|Any CPU 9 | Release|Any CPU = Release|Any CPU 10 | Release131|Any CPU = Release131|Any CPU 11 | EndGlobalSection 12 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 13 | {42155D82-1F25-4E59-9F65-64ABC583F420}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 14 | {42155D82-1F25-4E59-9F65-64ABC583F420}.Debug|Any CPU.Build.0 = Debug|Any CPU 15 | {42155D82-1F25-4E59-9F65-64ABC583F420}.Release|Any CPU.ActiveCfg = Release|Any CPU 16 | {42155D82-1F25-4E59-9F65-64ABC583F420}.Release|Any CPU.Build.0 = Release|Any CPU 17 | {42155D82-1F25-4E59-9F65-64ABC583F420}.Release131|Any CPU.ActiveCfg = Release131|Any CPU 18 | {42155D82-1F25-4E59-9F65-64ABC583F420}.Release131|Any CPU.Build.0 = Release131|Any CPU 19 | EndGlobalSection 20 | GlobalSection(SolutionProperties) = preSolution 21 | HideSolutionNode = FALSE 22 | EndGlobalSection 23 | EndGlobal 24 | -------------------------------------------------------------------------------- /src/RemoteTech/SimpleTypes/AddOn.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Diagnostics; 3 | using System.Linq; 4 | using System.Reflection; 5 | 6 | namespace RemoteTech.SimpleTypes 7 | { 8 | public abstract class AddOn 9 | { 10 | /// Holds the current assembly type 11 | protected Type AssemblyType; 12 | /// Binding flags for invoking the methods 13 | protected BindingFlags BindFlags = BindingFlags.InvokeMethod | BindingFlags.Public | BindingFlags.Static; 14 | /// Instance object for invoking instance methods 15 | protected object Instance; 16 | 17 | /// Assembly loaded? 18 | public bool AssemblyLoaded { get; } 19 | 20 | 21 | protected AddOn(string assemblyName, string assemblyType) 22 | { 23 | RTLog.Verbose("Connecting with {0} ...", RTLogLevel.Assembly, assemblyName); 24 | 25 | var loadedAssembly = AssemblyLoader.loadedAssemblies.FirstOrDefault(a => a.assembly.GetName().Name.Equals(assemblyName)); 26 | if (loadedAssembly == null) 27 | return; 28 | 29 | RTLog.Notify("Successfull connected to Assembly {0}", RTLogLevel.Assembly, assemblyName); 30 | AssemblyType = loadedAssembly.assembly.GetTypes().FirstOrDefault(t => t.FullName.Equals(assemblyType)); 31 | 32 | AssemblyLoaded = true; 33 | } 34 | 35 | /// 36 | /// Reads the current called method name and takes this method 37 | /// over to the assembly. The return value on a not successfull 38 | /// call is null. 39 | /// 40 | /// Object parameter list, given to the assembly method 41 | /// Null on a non successfull call 42 | protected object Invoke(object[] parameters) 43 | { 44 | if (!AssemblyLoaded) 45 | return null; 46 | 47 | // look 1 call behind to get the name of the method who is called 48 | var stackTrace = new StackTrace(); 49 | var stackFrame = stackTrace.GetFrame(1); 50 | 51 | try 52 | { 53 | // invoke the method 54 | var result = AssemblyType.InvokeMember(stackFrame.GetMethod().Name, BindFlags, null, Instance, parameters); 55 | RTLog.Verbose("AddOn.InvokeResult for {0} with instance: {1} is '{2}'", RTLogLevel.Assembly, stackFrame.GetMethod().Name, Instance, result); 56 | 57 | return result; 58 | } 59 | catch (Exception ex) 60 | { 61 | RTLog.Verbose("AddOn.InvokeException for {0} with instance: {1} is '{2}'", RTLogLevel.Assembly, stackFrame.GetMethod().Name, Instance, ex); 62 | } 63 | 64 | // default value is null 65 | return null; 66 | } 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /src/RemoteTech/SimpleTypes/BidirectionalEdge.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace RemoteTech.SimpleTypes 4 | { 5 | public enum LinkType 6 | { 7 | None, 8 | Dish, 9 | Omni, 10 | } 11 | 12 | public class BidirectionalEdge : IEquatable> 13 | { 14 | public bool Equals(BidirectionalEdge other) 15 | { 16 | return (A.Equals(other.A) || A.Equals(other.B)) && 17 | (B.Equals(other.A) || B.Equals(other.B)); 18 | } 19 | 20 | public readonly T A; 21 | public readonly T B; 22 | public readonly LinkType Type; 23 | 24 | public BidirectionalEdge(T a, T b, LinkType type) 25 | { 26 | A = a; 27 | B = b; 28 | Type = type; 29 | } 30 | 31 | public override int GetHashCode() 32 | { 33 | return A.GetHashCode() + B.GetHashCode(); 34 | } 35 | 36 | public override string ToString() 37 | { 38 | return String.Format("BidirectionalEdge(A: {0}, B: {1}, Type {2})", A, B, Type.ToString()); 39 | } 40 | } 41 | } -------------------------------------------------------------------------------- /src/RemoteTech/SimpleTypes/BinaryHeap.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | 4 | namespace RemoteTech.SimpleTypes 5 | { 6 | // Sadly there is no way to enforce immutability C#. 7 | // Do not modify sorting order externally! Increase/Decrease(). 8 | public class BinaryHeap : IEnumerable 9 | { 10 | public int Count { get { return mData.Count; } } 11 | 12 | public int Capacity { get { return mData.Capacity; } } 13 | 14 | public bool IsReadOnly { get { return false; } } 15 | 16 | private readonly List mData; 17 | private readonly Comparer mComparer; 18 | 19 | public BinaryHeap() : this(0) { } 20 | 21 | public BinaryHeap(int size) 22 | { 23 | mData = new List(size); 24 | mComparer = Comparer.Default; 25 | } 26 | 27 | public void Clear() 28 | { 29 | mData.Clear(); 30 | } 31 | 32 | public T Peek() 33 | { 34 | return mData[0]; 35 | } 36 | 37 | public T Remove() 38 | { 39 | T top = mData[0]; 40 | mData[0] = mData[mData.Count - 1]; 41 | mData.RemoveAt(mData.Count - 1); 42 | if (mData.Count > 0) 43 | { 44 | Decrease(0); 45 | } 46 | return top; 47 | } 48 | 49 | public void Add(T item) 50 | { 51 | mData.Add(item); 52 | Increase(mData.Count - 1); 53 | } 54 | 55 | public void Increase(int id) 56 | { 57 | T item = mData[id]; 58 | int parent_id = (id - 1) >> 1; 59 | // While the item precedes its parent and hasn't reached root. 60 | while ((parent_id >= 0) && (mComparer.Compare(item, mData[parent_id]) < 0)) 61 | { 62 | // Propagate the parent downwards. 63 | mData[id] = mData[parent_id]; 64 | id = parent_id; 65 | parent_id = (id - 1) >> 1; 66 | } 67 | // Place the item where it belongs. 68 | mData[id] = item; 69 | } 70 | 71 | 72 | public void Decrease(int id) 73 | { 74 | T item = mData[id]; 75 | while (true) 76 | { 77 | int new_id; 78 | int child1 = (id << 1) + 1; 79 | if (child1 > mData.Count - 1) 80 | { 81 | break; 82 | } 83 | int child2 = (id << 1) + 2; 84 | // Check whether to use the left or right node. 85 | if (child2 > mData.Count - 1) 86 | { 87 | new_id = child1; 88 | } 89 | else 90 | { 91 | new_id = mComparer.Compare(mData[child1], mData[child2]) < 0 ? child1 : child2; 92 | } 93 | // Propagate the child upwards if needed 94 | if (mComparer.Compare(item, mData[new_id]) > 0) 95 | { 96 | mData[id] = mData[new_id]; 97 | id = new_id; 98 | } 99 | else 100 | { 101 | break; 102 | } 103 | } 104 | // Place the item where it belongs. 105 | mData[id] = item; 106 | } 107 | 108 | public int IndexOf(T item) 109 | { 110 | return mData.IndexOf(item); 111 | } 112 | 113 | public IEnumerator GetEnumerator() 114 | { 115 | return mData.GetEnumerator(); 116 | } 117 | 118 | IEnumerator IEnumerable.GetEnumerator() 119 | { 120 | return GetEnumerator(); 121 | } 122 | } 123 | } -------------------------------------------------------------------------------- /src/RemoteTech/SimpleTypes/CachedField.cs: -------------------------------------------------------------------------------- 1 | namespace RemoteTech.SimpleTypes 2 | { 3 | public struct CachedField 4 | { 5 | public T Field; 6 | public int Frame; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /src/RemoteTech/SimpleTypes/ComputerModeMapper.cs: -------------------------------------------------------------------------------- 1 | using RemoteTech.FlightComputer.Commands; 2 | using RemoteTech.UI; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Linq; 6 | using System.Text; 7 | 8 | namespace RemoteTech.SimpleTypes 9 | { 10 | /// 11 | /// This class converts the FlightMode from a AttitudeCommand into a ComputerMode for the AttitudeFragment 12 | /// 13 | public class ComputerModeMapper 14 | { 15 | public ComputerMode computerMode; 16 | public FlightAttitude computerAttitude; 17 | 18 | public void mapFlightMode(FlightMode flightMode, FlightAttitude flightAttitude, ReferenceFrame frame) 19 | { 20 | computerMode = ComputerMode.Off; 21 | computerAttitude = flightAttitude; 22 | 23 | switch (flightMode) 24 | { 25 | case FlightMode.Off: { computerMode = ComputerMode.Off; break; } 26 | case FlightMode.KillRot: { computerMode = ComputerMode.Kill; break; } 27 | case FlightMode.AttitudeHold: 28 | { 29 | computerMode = ComputerMode.Custom; 30 | switch (frame) 31 | { 32 | case ReferenceFrame.Maneuver: { computerMode = ComputerMode.Node; break; } 33 | case ReferenceFrame.Orbit: { computerMode = ComputerMode.Orbital; break; } 34 | case ReferenceFrame.Surface: { computerMode = ComputerMode.Surface; break; } 35 | case ReferenceFrame.TargetParallel: { computerMode = ComputerMode.TargetPos; break; } 36 | case ReferenceFrame.TargetVelocity: { computerMode = ComputerMode.TargetVel; break; } 37 | } 38 | break; 39 | } 40 | } 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/RemoteTech/SimpleTypes/Dish.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace RemoteTech.SimpleTypes 4 | { 5 | public class Dish 6 | { 7 | public readonly float Range; 8 | public readonly double Radians; 9 | public readonly Guid Target; 10 | 11 | public Dish(Guid target, double radians, float distance) 12 | { 13 | Target = target; 14 | Radians = radians; 15 | Range = distance; 16 | } 17 | 18 | public override String ToString() 19 | { 20 | return String.Format("Dish(Range: {0}, Radians: {1}, Target: {2}", 21 | Range.ToString("F2"), 22 | (Radians / Math.PI * 180).ToString("F2") + "deg", 23 | String.Format("{0} ({1})", Target, RTCore.Instance.Satellites[Target] != null 24 | ? RTCore.Instance.Satellites[Target].ToString() 25 | : "Unknown")); 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /src/RemoteTech/SimpleTypes/GUITextureButtonFactory.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | namespace RemoteTech.SimpleTypes 5 | { 6 | public static class GUITextureButtonFactory 7 | { 8 | 9 | // Replaced with new texture handling mechanics. 10 | public static GUIStyle CreateFromFilename(String normal) 11 | { 12 | Texture2D tex = RTUtil.LoadImage(normal); 13 | return CreateFromTextures(tex, tex, tex, tex); 14 | } 15 | 16 | // Replaced with new texture handling mechanics. 17 | public static GUIStyle CreateFromFilename(String normal, String hover, String active, String focus) 18 | { 19 | return CreateFromTextures(RTUtil.LoadImage(normal), RTUtil.LoadImage(hover), 20 | RTUtil.LoadImage(active), RTUtil.LoadImage(focus)); 21 | } 22 | 23 | private static GUIStyle CreateFromTextures(Texture2D texNormal, Texture2D texHover, 24 | Texture2D texActive, Texture2D texFocus) 25 | { 26 | return new GUIStyle() 27 | { 28 | name = texNormal.name, 29 | normal = new GUIStyleState() { background = texNormal, textColor = Color.white }, 30 | hover = new GUIStyleState() { background = texHover, textColor = Color.white }, 31 | active = new GUIStyleState() { background = texActive, textColor = Color.white }, 32 | onNormal = new GUIStyleState() { background = texActive, textColor = Color.white }, 33 | onHover = new GUIStyleState() { background = texActive, textColor = Color.white }, 34 | onActive = new GUIStyleState() { background = texActive, textColor = Color.white }, 35 | focused = new GUIStyleState() { background = texFocus, textColor = Color.white }, 36 | onFocused = new GUIStyleState() { background = texActive, textColor = Color.white }, 37 | border = new RectOffset(0, 0, 0, 0), 38 | margin = new RectOffset(0, 0, 0, 0), 39 | padding = new RectOffset(0, 0, 0, 0), 40 | overflow = new RectOffset(0, 0, 0, 0), 41 | imagePosition = ImagePosition.ImageAbove, 42 | alignment = TextAnchor.MiddleCenter, 43 | wordWrap = true, 44 | clipping = TextClipping.Clip, 45 | contentOffset = new Vector2(0, 0), 46 | stretchWidth = false, 47 | stretchHeight = false, 48 | font = null, 49 | fontSize = 0, 50 | fontStyle = FontStyle.Normal, 51 | richText = false, 52 | }; 53 | } 54 | } 55 | } -------------------------------------------------------------------------------- /src/RemoteTech/SimpleTypes/NetworkLink.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace RemoteTech.SimpleTypes 5 | { 6 | public class NetworkLink : IEquatable> 7 | { 8 | public readonly T Target; 9 | public readonly List Interfaces; 10 | public readonly LinkType Port; 11 | 12 | public NetworkLink(T sat, List ant, LinkType port) 13 | { 14 | Target = sat; 15 | Interfaces = ant; 16 | Port = port; 17 | } 18 | 19 | public bool Equals(NetworkLink o) 20 | { 21 | if (o == null) return false; 22 | if (!Target.Equals(o.Target)) return false; 23 | return true; 24 | } 25 | 26 | public override string ToString() 27 | { 28 | return String.Format("NetworkLink(T: {0}, I: {1}, P: {2})", Target, Interfaces.ToDebugString(), Port); 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /src/RemoteTech/SimpleTypes/NetworkRoute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | 5 | namespace RemoteTech.SimpleTypes 6 | { 7 | public class NetworkRoute : IComparable> 8 | { 9 | public T Goal { get { return Exists ? Links[Links.Count - 1].Target : default(T); } } 10 | public T Start { get; private set; } 11 | public bool Exists { get { return Links.Count > 0; } } 12 | 13 | public double Length { get; private set; } 14 | public double Delay { get { return RTSettings.Instance.EnableSignalDelay 15 | ? Length / RTSettings.Instance.SpeedOfLight 16 | : 0.0; } } 17 | public List> Links { get; private set; } 18 | 19 | public NetworkRoute(T start, List> links, double dist) 20 | { 21 | if (start == null) throw new ArgumentNullException("start"); 22 | if (links == null) links = new List>(); 23 | Start = start; 24 | Links = links; 25 | Length = dist; 26 | } 27 | 28 | public bool Contains(BidirectionalEdge edge) 29 | { 30 | if (Links.Count == 0) return false; 31 | if ((Start.Equals(edge.A) && Links[0].Target.Equals(edge.B)) || 32 | (Start.Equals(edge.B) && Links[0].Target.Equals(edge.A))) return true; 33 | for (int i = 0; i < Links.Count - 1; i++) 34 | { 35 | if (Links[i].Target.Equals(edge.A) && Links[i+1].Target.Equals(edge.B)) return true; 36 | if (Links[i].Target.Equals(edge.B) && Links[i+1].Target.Equals(edge.A)) return true; 37 | } 38 | return false; 39 | } 40 | 41 | public int CompareTo(NetworkRoute other) 42 | { 43 | return Length.CompareTo(other.Length); 44 | } 45 | 46 | public override string ToString() 47 | { 48 | return String.Format("NetworkRoute(Route: {{0}}, Length: {1})", 49 | String.Join("→", Links.Select(t => t.ToString()).ToArray()), 50 | Length.ToString("F2") + "m"); 51 | } 52 | } 53 | 54 | public class NetworkRoute 55 | { 56 | public static NetworkRoute Empty(T start) 57 | { 58 | return new NetworkRoute(start, null, Single.PositiveInfinity); 59 | } 60 | } 61 | } -------------------------------------------------------------------------------- /src/RemoteTech/SimpleTypes/PriorityQueue.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | 4 | namespace RemoteTech.SimpleTypes 5 | { 6 | // PriorityQueue based on a minimum-BinaryHeap. 7 | public class PriorityQueue : IEnumerable 8 | { 9 | public int Count { get { return mHeap.Count; } } 10 | 11 | private readonly BinaryHeap mHeap; 12 | 13 | public PriorityQueue() 14 | { 15 | mHeap = new BinaryHeap(); 16 | } 17 | 18 | public void Clear() 19 | { 20 | mHeap.Clear(); 21 | } 22 | 23 | public void Enqueue(T item) 24 | { 25 | mHeap.Add(item); 26 | } 27 | 28 | public T Peek() 29 | { 30 | return mHeap.Peek(); 31 | } 32 | 33 | public T Dequeue() 34 | { 35 | return mHeap.Remove(); 36 | } 37 | 38 | public IEnumerator GetEnumerator() 39 | { 40 | return mHeap.GetEnumerator(); 41 | } 42 | 43 | IEnumerator IEnumerable.GetEnumerator() 44 | { 45 | return GetEnumerator(); 46 | } 47 | } 48 | } -------------------------------------------------------------------------------- /src/RemoteTech/UI/AntennaWindow.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | namespace RemoteTech.UI 5 | { 6 | public class AntennaWindow : AbstractWindow 7 | { 8 | public static Guid Guid = new Guid("39fe8878-d894-4ded-befb-d6e070ddc2c4"); 9 | public IAntenna Antenna { get { return mSetAntenna; } set { mSetAntenna = value; if (mAntennaFragment != null) mAntennaFragment.Antenna = value; } } 10 | public AntennaFragment mAntennaFragment; 11 | public TargetInfoWindow mTargetInfos; 12 | private IAntenna mSetAntenna; 13 | 14 | public AntennaWindow(IAntenna antenna) 15 | : base(Guid, "Antenna Configuration", new Rect(100, 100, 300, 500), WindowAlign.Floating) 16 | { 17 | mSavePosition = true; 18 | mSetAntenna = antenna; 19 | mTargetInfos = new TargetInfoWindow(this, WindowAlign.Floating); 20 | } 21 | 22 | /// 23 | /// Mouse over callback forced by the mAntennaFragment 24 | /// 25 | public void showTargetInfo() 26 | { 27 | if (mAntennaFragment != null) 28 | { 29 | if (mAntennaFragment.mouseOverEntry != null) 30 | { 31 | // set the current selected target to the targetwindow 32 | mTargetInfos.SetTarget(mAntennaFragment.mouseOverEntry, mSetAntenna); 33 | mTargetInfos.Show(); 34 | } 35 | else 36 | { 37 | // hide if we do not have any selection 38 | mTargetInfos.Hide(); 39 | } 40 | } 41 | } 42 | 43 | /// 44 | /// Mouse out callback forced by the mAntennaFragment 45 | /// 46 | public void hideTargetInfo() 47 | { 48 | mTargetInfos.Hide(); 49 | } 50 | 51 | public override void Show() 52 | { 53 | mAntennaFragment = mAntennaFragment ?? new AntennaFragment(mSetAntenna); 54 | 55 | /// Add callbacks for the onPositionChanged on the AbstractWindow 56 | onPositionChanged += mTargetInfos.CalculatePosition; 57 | 58 | /// Add the showTargetInfo callback to the on mouse over/out event 59 | mAntennaFragment.onMouseOverListEntry += showTargetInfo; 60 | mAntennaFragment.onMouseOutListEntry += hideTargetInfo; 61 | 62 | GameEvents.onVesselChange.Add(OnVesselChange); 63 | base.Show(); 64 | } 65 | 66 | public override void Hide() 67 | { 68 | // also hide the target info popup 69 | hideTargetInfo(); 70 | 71 | if (mAntennaFragment != null) 72 | { 73 | /// Remove callbacks from the onPositionChanged on the AbstractWindow 74 | onPositionChanged -= mTargetInfos.CalculatePosition; 75 | 76 | /// Remove the showTargetInfo callback from the on mouse over/out event 77 | mAntennaFragment.onMouseOverListEntry -= showTargetInfo; 78 | mAntennaFragment.onMouseOutListEntry -= hideTargetInfo; 79 | 80 | mAntennaFragment.Dispose(); mAntennaFragment = null; 81 | } 82 | 83 | GameEvents.onVesselChange.Remove(OnVesselChange); 84 | base.Hide(); 85 | } 86 | 87 | public override void Window(int uid) 88 | { 89 | if (mAntennaFragment.Antenna == null) { Hide(); return; } 90 | GUI.skin = HighLogic.Skin; 91 | 92 | // check the mouse position on every draw call 93 | mouseOverAntennaWindow(); 94 | 95 | GUILayout.BeginVertical(GUILayout.Width(300), GUILayout.Height(500)); 96 | { 97 | mAntennaFragment.Draw(); 98 | } 99 | GUILayout.EndVertical(); 100 | 101 | base.Window(uid); 102 | } 103 | 104 | /// 105 | /// Checks whether the mouse is over this window to set 106 | /// the triggerMouseOverListEntry on the AntennaFragment 107 | /// 108 | public void mouseOverAntennaWindow() 109 | { 110 | mAntennaFragment.triggerMouseOverListEntry = backupPosition.ContainsMouse(); 111 | } 112 | 113 | public void OnVesselChange(Vessel v) 114 | { 115 | Hide(); 116 | } 117 | } 118 | } 119 | -------------------------------------------------------------------------------- /src/RemoteTech/UI/FlightUIPatcher.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Linq; 3 | using KSP.UI.Screens.Flight; 4 | using RemoteTech.FlightComputer.Commands; 5 | 6 | namespace RemoteTech.UI 7 | { 8 | public class FlightUIPatcher 9 | { 10 | /// 11 | /// Action groups corresponding to the GUI buttons we want to hook / patch. 12 | /// 13 | public static KSPActionGroup[] PatchedActionGroups = { KSPActionGroup.Gear, KSPActionGroup.Brakes, KSPActionGroup.Light, KSPActionGroup.Abort }; 14 | 15 | /// 16 | /// Hook flight action group buttons: gear, brakes, light and abort buttons. 17 | /// 18 | public static void Patch() 19 | { 20 | var buttons = CollectActionGroupToggleButtons(PatchedActionGroups); 21 | for (int i = 0; i < buttons.Count; ++i) 22 | { 23 | //Remove default KSP listener (otherwise we can't delay anything) 24 | buttons[i].toggle.onToggle.RemoveListener(buttons[i].SetToggle); 25 | 26 | // set our hook 27 | KSPActionGroup actionGroup = buttons[i].group; 28 | buttons[i].toggle.onToggle.AddListener( () => ActivateActionGroup(actionGroup) ); 29 | } 30 | } 31 | 32 | /// 33 | /// Get action groups buttons depending on their group. 34 | /// 35 | /// The action group(s) in which the buttons should be. 36 | /// A list of action ActionGroupToggleButton buttons, filter by actionGroups paramter. 37 | private static List CollectActionGroupToggleButtons(KSPActionGroup[] actionGroups) 38 | { 39 | // get all action group buttons 40 | ActionGroupToggleButton[] actionGroupToggleButtons = UnityEngine.Object.FindObjectsOfType(); 41 | // filter them to only get the buttons that have a group in the actionGroups array 42 | var buttons = actionGroupToggleButtons.Where(button => actionGroups.Any(ag => button.group == ag)).ToList(); 43 | 44 | return buttons; 45 | } 46 | 47 | /// 48 | /// Called when an action group button, from the KSP GUI, is pressed. 49 | /// 50 | /// The action group that was pressed. 51 | private static void ActivateActionGroup(KSPActionGroup ag) 52 | { 53 | var satellite = RTCore.Instance.Satellites[FlightGlobals.ActiveVessel]; 54 | if (satellite != null && satellite.FlightComputer != null) 55 | { 56 | satellite.SignalProcessor.FlightComputer.Enqueue(ActionGroupCommand.WithGroup(ag)); 57 | } 58 | else if (satellite == null || (satellite != null && satellite.HasLocalControl)) 59 | { 60 | if (!FlightGlobals.ready) 61 | return; 62 | 63 | if (FlightGlobals.ActiveVessel.IsControllable) 64 | { 65 | // check if EVA or not (as we removed the default KSP listener). 66 | if(!FlightGlobals.ActiveVessel.isEVA) 67 | { 68 | FlightGlobals.ActiveVessel.ActionGroups.ToggleGroup(ag); 69 | } 70 | else // it's an EVA 71 | { 72 | if (ag == KSPActionGroup.RCS) 73 | { 74 | FlightGlobals.ActiveVessel.evaController.ToggleJetpack(); 75 | } 76 | else if (ag == KSPActionGroup.Light) 77 | { 78 | FlightGlobals.ActiveVessel.evaController.ToggleLamp(); 79 | } 80 | } 81 | } 82 | } 83 | } 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /src/RemoteTech/UI/IFragment.cs: -------------------------------------------------------------------------------- 1 | namespace RemoteTech.UI 2 | { 3 | interface IFragment 4 | { 5 | void Draw(); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/RemoteTech/UI/PowerFragment.cs: -------------------------------------------------------------------------------- 1 | using RemoteTech.FlightComputer.Commands; 2 | using System; 3 | using System.Collections; 4 | using UnityEngine; 5 | using static RemoteTech.FlightComputer.Commands.HibernationCommand; 6 | using KSP.Localization; 7 | 8 | namespace RemoteTech.UI 9 | { 10 | public class PowerFragment : IFragment 11 | { 12 | private FlightComputer.FlightComputer mFlightComputer; 13 | private Action mOnClickQueue; 14 | private PowerModes mPowerMode; 15 | 16 | public PowerFragment(FlightComputer.FlightComputer fc, Action queue) 17 | { 18 | mFlightComputer = fc; 19 | mOnClickQueue = queue; 20 | mPowerMode = PowerModes.Normal; 21 | } 22 | 23 | public void Draw() 24 | { 25 | float width3 = 156 / 3 - GUI.skin.button.margin.right * 2.0f / 3.0f; 26 | 27 | GUILayout.BeginVertical(); 28 | { 29 | GUILayout.BeginHorizontal(); 30 | { 31 | RTUtil.FakeStateButton(new GUIContent(Localizer.Format("#RT_PowerFragment_HBNT"), Localizer.Format("#RT_PowerFragment_HBNT_desc")), () => RTCore.Instance.StartCoroutine(OnPowerClick(PowerModes.Hibernate)), (int)mPowerMode, (int)PowerModes.Hibernate, GUILayout.Width(width3));//"HBNT", "Ultra-low power hibernation with all active antennas shut down." 32 | RTUtil.FakeStateButton(new GUIContent(Localizer.Format("#RT_PowerFragment_THLD"), Localizer.Format("#RT_PowerFragment_THLD_desc")), () => RTCore.Instance.StartCoroutine(OnPowerClick(PowerModes.AntennaSaver)), (int)mPowerMode, (int)PowerModes.AntennaSaver, GUILayout.Width(width3));//"THLD", "Optimally adaptive power-saving threshold control on all antennas" 33 | RTUtil.Button(new GUIContent(Localizer.Format("#RT_PowerFragment_WAKE"), Localizer.Format("#RT_PowerFragment_WAKE_desc")), () => RTCore.Instance.StartCoroutine(OnPowerClick(PowerModes.Wake)), GUILayout.Width(width3));//"WAKE", "Terminate any power-saving state." 34 | } 35 | GUILayout.EndHorizontal(); 36 | GUILayout.Space(200); 37 | 38 | GUILayout.BeginHorizontal(); 39 | { 40 | RTUtil.Button(new GUIContent(">>", Localizer.Format("#RT_PowerFragment_Queue_desc")),//"Toggles the queue and delay functionality." 41 | mOnClickQueue, GUILayout.Width(width3)); 42 | } 43 | GUILayout.EndHorizontal(); 44 | } 45 | GUILayout.EndVertical(); 46 | } 47 | 48 | private IEnumerator OnPowerClick(PowerModes nextPowerMode) 49 | { 50 | yield return null; 51 | if (mFlightComputer.InputAllowed) 52 | { 53 | switch(nextPowerMode) 54 | { 55 | case PowerModes.Hibernate: 56 | mPowerMode = PowerModes.Hibernate; 57 | mFlightComputer.Enqueue(HibernationCommand.Hibernate()); 58 | break; 59 | case PowerModes.AntennaSaver: 60 | mPowerMode = PowerModes.AntennaSaver; 61 | mFlightComputer.Enqueue(HibernationCommand.AntennaSaver()); 62 | break; 63 | case PowerModes.Wake: 64 | mPowerMode = PowerModes.Wake; 65 | mFlightComputer.Enqueue(HibernationCommand.WakeUp()); 66 | break; 67 | default: 68 | mPowerMode = PowerModes.Normal; 69 | break; 70 | } 71 | } 72 | } 73 | 74 | public void getActivePowerMode() 75 | { 76 | var activeHibCommand = HibernationCommand.findActiveHibernationCmd(mFlightComputer); 77 | if(activeHibCommand != null) 78 | { 79 | mPowerMode = activeHibCommand.PowerMode; 80 | } 81 | } 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /src/RemoteTech/UI/SatelliteFragment.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using UnityEngine; 4 | using KSP.Localization; 5 | 6 | namespace RemoteTech.UI 7 | { 8 | public class SatelliteFragment : IFragment, IDisposable 9 | { 10 | public ISatellite Satellite 11 | { 12 | get { return mSatellite; } 13 | set { if (mSatellite != value) { mSatellite = value; Antenna = null; } } 14 | } 15 | 16 | public IAntenna Antenna { get; private set; } 17 | 18 | private ISatellite mSatellite; 19 | private Vector2 mScrollPosition = Vector2.zero; 20 | 21 | public SatelliteFragment(ISatellite sat) 22 | { 23 | Satellite = sat; 24 | RTCore.Instance.Satellites.OnUnregister += Refresh; 25 | } 26 | 27 | public void Dispose() 28 | { 29 | if (RTCore.Instance != null) 30 | { 31 | RTCore.Instance.Satellites.OnUnregister -= Refresh; 32 | } 33 | } 34 | 35 | public void Draw() 36 | { 37 | if (Satellite == null) return; 38 | 39 | GUILayout.BeginHorizontal(); 40 | { 41 | GUILayout.TextField(Satellite.Name.Truncate(25), GUILayout.ExpandWidth(true)); 42 | RTUtil.Button(Localizer.Format("#RT_NetworkFB_NameButton"), () =>//"Name" 43 | { 44 | var vessel = RTUtil.GetVesselById(Satellite.Guid); 45 | if (vessel) vessel.RenameVessel(); 46 | }, GUILayout.ExpandWidth(false), GUILayout.Height(24)); 47 | } 48 | GUILayout.EndHorizontal(); 49 | 50 | mScrollPosition = GUILayout.BeginScrollView(mScrollPosition, GUILayout.ExpandHeight(true)); 51 | { 52 | Color pushColor = GUI.contentColor; 53 | TextAnchor pushAlign = GUI.skin.button.alignment; 54 | GUI.skin.button.alignment = TextAnchor.MiddleLeft; 55 | foreach (var a in Satellite.Antennas.Where(a => a.CanTarget)) 56 | { 57 | GUI.contentColor = (a.Powered) ? XKCDColors.ElectricLime : XKCDColors.Scarlet; 58 | String text = a.Name.Truncate(25) + Environment.NewLine + Localizer.Format("#RT_NetworkFB_Target") + RTUtil.TargetName(a.Target).Truncate(18);//"Target: " 59 | RTUtil.StateButton(text, Antenna, a, s => 60 | { 61 | Antenna = (s > 0) ? a : null; 62 | }); 63 | } 64 | GUI.skin.button.alignment = pushAlign; 65 | GUI.contentColor = pushColor; 66 | } 67 | GUILayout.EndScrollView(); 68 | } 69 | 70 | private void Refresh(ISatellite sat) 71 | { 72 | if (sat == Satellite) Satellite = null; 73 | } 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /src/RemoteTech/VesselExtension.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | 3 | namespace RemoteTech 4 | { 5 | public static class VesselExtension 6 | { 7 | /// 8 | /// Get whether a vessel has local control or not (that is, if it's Kerbal controlled or not). 9 | /// 10 | /// The vessel to check for. 11 | /// true if the vessel has a local control, false otherwise. 12 | public static bool HasLocalControl(this Vessel vessel) 13 | { 14 | if (vessel == null) return false; 15 | 16 | // vessel must be a control source and it must be crewed or not implementing a module processor 17 | var hasLocalControl = vessel.parts.Any(p => (p.isControlSource > Vessel.ControlLevel.NONE) && 18 | (p.protoModuleCrew.Any() || !p.FindModulesImplementing().Any() || 19 | p.FindModulesImplementing().Any(s => s.AlwaysAllowLocalControl))); 20 | if (!hasLocalControl) 21 | { 22 | // check if theres's a SPU which is a command station. 23 | // Command stations must have local control even if there's nobody in the command pod [see other checks in ModuleSPU.IsCommandStation] 24 | hasLocalControl = vessel.parts.Any(part => part.FindModulesImplementing().Any(signalProcessor => signalProcessor.IsCommandStation)); 25 | } 26 | 27 | return hasLocalControl; 28 | } 29 | } 30 | } --------------------------------------------------------------------------------