File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ using FinePrint . Utilities ;
2+ using HarmonyLib ;
3+
4+ namespace RealSolarSystem . Harmony
5+ {
6+ [ HarmonyPatch ( typeof ( Vessel ) ) ]
7+ internal class PatchVessel
8+ {
9+ [ HarmonyPostfix ]
10+ [ HarmonyPatch ( "Start" ) ]
11+ internal static void Postfix_Start ( Vessel __instance )
12+ {
13+ if ( __instance . vesselType == VesselType . SpaceObject ||
14+ ( __instance . vesselType != VesselType . Debris &&
15+ VesselUtilities . VesselHasPartName ( "PotatoRoid" , __instance ) ) )
16+ {
17+ ClobberVesselRanges ( __instance . vesselRanges . orbit ) ;
18+ ClobberVesselRanges ( __instance . vesselRanges . subOrbital ) ;
19+ ClobberVesselRanges ( __instance . vesselRanges . escaping ) ;
20+ ClobberVesselRanges ( __instance . vesselRanges . flying ) ;
21+ ClobberVesselRanges ( __instance . vesselRanges . splashed ) ;
22+ ClobberVesselRanges ( __instance . vesselRanges . landed ) ;
23+ }
24+ }
25+
26+ private static void ClobberVesselRanges ( VesselRanges . Situation vr )
27+ {
28+ vr . load = 100000f ;
29+ vr . unload = 101000f ;
30+ vr . pack = 2600f ;
31+ vr . unpack = 2500f ;
32+ }
33+ }
34+ }
Original file line number Diff line number Diff line change 1+ using UnityEngine ;
2+
3+ namespace RealSolarSystem
4+ {
5+ [ KSPAddon ( KSPAddon . Startup . Instantly , true ) ]
6+ public class HarmonyPatcher : MonoBehaviour
7+ {
8+ internal void Start ( )
9+ {
10+ var harmony = new HarmonyLib . Harmony ( "RSS.HarmonyPatcher" ) ;
11+ harmony . PatchAll ( ) ;
12+ }
13+ }
14+ }
Original file line number Diff line number Diff line change 4444 <Compile Include =" CameraWrapper.cs" />
4545 <Compile Include =" CommNetFixer.cs" />
4646 <Compile Include =" GUI.cs" />
47+ <Compile Include =" HarmonyPatcher.cs" />
48+ <Compile Include =" Harmony\Vessel.cs" />
4749 <Compile Include =" InstallationChecker.cs" />
4850 <Compile Include =" KopernicusMods\MapSODemandLarge.cs" />
4951 <Compile Include =" KopernicusMods\PQSMod_VertexDefineCoastSmooth.cs" />
5860 <Compile Include =" Watchdogs.cs" />
5961 </ItemGroup >
6062 <ItemGroup >
63+ <Reference Include =" 0Harmony" >
64+ <Private >False</Private >
65+ </Reference >
6166 <Reference Include =" Assembly-CSharp" >
6267 <Private >False</Private >
6368 </Reference >
You can’t perform that action at this time.
0 commit comments