├── .github
├── FUNDING.yml
└── workflows
│ └── publish-release.yml
├── About
├── PublishedFileId.txt
├── Preview.png
└── About.xml
├── References
├── Outposts.txt
├── VFEC.txt
├── VFED.txt
├── Vehicles.txt
├── AbilityUser.txt
├── CashRegister.txt
├── Gastronomy.txt
├── Inventory.txt
├── SmashTools.txt
├── Storefront.txt
├── TorannMagic.txt
├── VFEEmpire.txt
├── ZombieLand.txt
├── kentington_saveourship2_ShipsHaveInsides.txt.off
├── VFEC.dll
├── VFED.dll
├── Outposts.dll
├── Vehicles.dll
├── AbilityUser.dll
├── Gastronomy.dll
├── Inventory.dll
├── SmashTools.dll
├── Storefront.dll
├── TorannMagic.dll
├── VFEEmpire.dll
├── ZombieLand.dll
├── CashRegister.dll
└── kentington_saveourship2_ShipsHaveInsides.dll
├── Languages
├── English
│ └── Keyed
│ │ ├── Shared.xml
│ │ ├── VanillaFactionsInsectoid.xml
│ │ └── VehicleFramework.xml
└── Polish
│ └── Keyed
│ ├── Shared.xml
│ └── VehicleFramework.xml
├── release_bundler.sh
├── Source
├── Mods
│ ├── DubsPaintShop.cs
│ ├── DubsMintMinimap.cs
│ ├── MiscTraining.cs
│ ├── AutoharvesterAutocycle.cs
│ ├── RimEffectDrell.cs
│ ├── MedicinesPlus.cs
│ ├── HospitalityVendingMachines.cs
│ ├── HugsLib.cs
│ ├── EnhancedVatLearning.cs
│ ├── HarvestOrgansPostMortem.cs
│ ├── DeepStorage.cs
│ ├── VanillaPlantsAutoPlowPatch.cs
│ ├── AlphaMechs.cs
│ ├── VanillaBrewingExpanded.cs
│ ├── DeepStorageGUI.cs
│ ├── CleanPathfinding2.cs
│ ├── BetterGroundPenetratingScanner.cs
│ ├── AlmostThere.cs
│ ├── VanillaRacesSaurid.cs
│ ├── VanillaPlantsMushrooms.cs
│ ├── SparklingWorlds.cs
│ ├── GrazingLands.cs
│ ├── RimEffectExtendedCut.cs
│ ├── PrisonCommons.cs
│ ├── ToggleableShields.cs
│ ├── VanillaFactionsMedieval.cs
│ ├── VanillaRacesHussar.cs
│ ├── Reunion.cs
│ ├── PocketSand.cs
│ ├── VanillaAnimalsEndangered.cs
│ ├── Windows.cs
│ ├── RunandGun.cs
│ ├── VanillaRacesExpandedLycanthrope.cs
│ ├── VanillaAnimalsWaste.cs
│ ├── AnimaObelisk.cs
│ ├── VPESkipdoorPathing.cs
│ ├── CustomPrisonerInteractions.cs
│ ├── VanillaHelixienGas.cs
│ ├── SmallVehicleAddons.cs
│ ├── VanillaFurnitureExpandedPower.cs
│ ├── ClutterStructures.cs
│ ├── StuffedFloors.cs
│ ├── PerspectiveBuildings.cs
│ ├── SimplyMoreBridges.cs
│ ├── VanillaFactionsVikings.cs
│ ├── PowerSwitch.cs
│ ├── GeneRipper.cs
│ ├── VanillaOutpostsExpanded.cs
│ ├── VanillaPlantsMorePlants.cs
│ ├── MechFramework.cs
│ ├── BiomesCaverns.cs
│ ├── VanillaNutrientPasteExpanded.cs
│ ├── VanillaFurnitureExpandedFarming.cs
│ ├── VanillaTemperatureExpanded.cs
│ ├── Tacticowl.cs
│ ├── AnimalLogic.cs
│ ├── FertileFields.cs
│ ├── Desynchronized.cs
│ ├── VanillaIdeologyDryads.cs
│ ├── VanillaRacesPhytokin.cs
│ ├── VanillaSocialInteractions.cs
│ ├── CleaningArea.cs
│ ├── OneBedToSleepWithAll.cs
│ ├── VanillaFactionsSettlers.cs
│ ├── LightsOut.cs
│ ├── PerspectiveOres.cs
│ ├── CutPlantsBeforeBuilding.cs
│ ├── HuntForMe.cs
│ ├── VanillaAnimalsCaves.cs
│ ├── RimFridge.cs
│ ├── MinifyEverything.cs
│ ├── ChoiceOfPsycasts.cs
│ ├── BiotechMechStuffElongatedMechanoidUpgrades.cs
│ ├── VanillaPsycastsExpandedPuppeteer.cs
│ ├── LinkedPlanters.cs
│ ├── VanillaFurnitureExpanded.cs
│ ├── VanillaRecyclingExpanded.cs
│ ├── BiomesPollutedLands.cs
│ ├── AlphaBiomes.cs
│ ├── PickupAndHaul.cs
│ ├── VanillaSkillsExpanded.cs
│ ├── VanillaPsycastsExpandedHemosage.cs
│ ├── VanillaVehiclesExpanded.cs
│ ├── DubsCentralHeating.cs
│ ├── DubsMintMenu.cs
│ ├── Immortals.cs
│ ├── AutoExtractGenes.cs
│ ├── QualityBuilder.cs
│ ├── RimEffectCore.cs
│ ├── VanillaRacesSanguophage.cs
│ ├── EccentricTechFusionPower.cs
│ ├── AutomaticParking.cs
│ ├── HospitalityCasino.cs
│ ├── ReinforcedMechanoids2.cs
│ ├── VanillaEventsExpanded.cs
│ ├── AncientMiningIndustry.cs
│ ├── ExtendedBioengineeringForVFEInsectoids.cs
│ ├── BiomesCore.cs
│ ├── AvoidFriendlyFire.cs
│ ├── VanillaTraitsExpanded.cs
│ ├── RPGStyleInventory.cs
│ ├── TimeOfDAySwitch.cs
│ ├── MiscRobots.cs
│ ├── VanillaFishingExpanded.cs
│ ├── FollowMe.cs
│ ├── BiotechExpansionMythic.cs
│ ├── VanillaRacesFungoid.cs
│ ├── BadHygiene.cs
│ ├── NonUnoPinata.cs
│ ├── VanillaFurnitureExpandedSecurity.cs
│ ├── FortificationsIndustrial.cs
│ ├── SmartFarming.cs
│ ├── ReGrowthCore.cs
│ ├── ExosuitFramework.cs
│ ├── RimsentialSpaceports.cs
│ ├── VanillaFactionsMechanoid.cs
│ ├── SignsAndComments.cs
│ ├── HealerMechSerumChoice.cs
│ ├── Pharmacist.cs
│ ├── MedicalTab.cs
│ └── AlphaAnimals.cs
├── Properties
│ └── AssemblyInfo.cs
├── Multiplayer_Compat.csproj
├── CodeFinder.cs
└── Extensions.cs
├── LICENSE
├── Multiplayer_Compat.sln
└── Source_Referenced
├── Multiplayer_Compat_Referenced.csproj
└── HemogenExtractor.cs
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | ko_fi: sokyran
2 |
--------------------------------------------------------------------------------
/About/PublishedFileId.txt:
--------------------------------------------------------------------------------
1 | 1629973374
2 |
--------------------------------------------------------------------------------
/References/Outposts.txt:
--------------------------------------------------------------------------------
1 | D62DCA10D455F19FF2520A038DCDC11A0585C7F8
--------------------------------------------------------------------------------
/References/VFEC.txt:
--------------------------------------------------------------------------------
1 | 1D3B8B299E2720EF1A58E0DC172CDBF46A90F78D
--------------------------------------------------------------------------------
/References/VFED.txt:
--------------------------------------------------------------------------------
1 | D7209F463476A902E87925CDEC1A359D3681E1D1
--------------------------------------------------------------------------------
/References/Vehicles.txt:
--------------------------------------------------------------------------------
1 | C247E42DE0895065905D94E69604E1A5B42EBD04
--------------------------------------------------------------------------------
/References/AbilityUser.txt:
--------------------------------------------------------------------------------
1 | 018EB6AABB5223A1F76F03A0DD8E9F31E9FC7621
--------------------------------------------------------------------------------
/References/CashRegister.txt:
--------------------------------------------------------------------------------
1 | 51DBDB6DF2F049BA65531EA4E7EE3F89294733E0
--------------------------------------------------------------------------------
/References/Gastronomy.txt:
--------------------------------------------------------------------------------
1 | 4F26F754ABFCD66B172D5F9DB1F0A1BDE0D205FF
--------------------------------------------------------------------------------
/References/Inventory.txt:
--------------------------------------------------------------------------------
1 | 2CAF9AB8B7DE9F0347A53E1F688395533DA5B163
--------------------------------------------------------------------------------
/References/SmashTools.txt:
--------------------------------------------------------------------------------
1 | 8CA63772CD5B47E61E32EA1CE55E91F7183ABB0E
--------------------------------------------------------------------------------
/References/Storefront.txt:
--------------------------------------------------------------------------------
1 | 69142435ECCD6BFCB83714C642F80A55E0776791
--------------------------------------------------------------------------------
/References/TorannMagic.txt:
--------------------------------------------------------------------------------
1 | 25A6D01C84C64F02846D29BC4454F9B294B5E228
--------------------------------------------------------------------------------
/References/VFEEmpire.txt:
--------------------------------------------------------------------------------
1 | DBF938E6018DEFD18A5447945112687C556D3055
--------------------------------------------------------------------------------
/References/ZombieLand.txt:
--------------------------------------------------------------------------------
1 | 31E313C3571E960E6C803C6BFE0AA2ADB3E6E9CB
--------------------------------------------------------------------------------
/About/Preview.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rwmt/Multiplayer-Compatibility/HEAD/About/Preview.png
--------------------------------------------------------------------------------
/References/kentington_saveourship2_ShipsHaveInsides.txt.off:
--------------------------------------------------------------------------------
1 | E6688F4A560D3EC53D39755DCA2A6E92E0FE970D
--------------------------------------------------------------------------------
/References/VFEC.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rwmt/Multiplayer-Compatibility/HEAD/References/VFEC.dll
--------------------------------------------------------------------------------
/References/VFED.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rwmt/Multiplayer-Compatibility/HEAD/References/VFED.dll
--------------------------------------------------------------------------------
/References/Outposts.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rwmt/Multiplayer-Compatibility/HEAD/References/Outposts.dll
--------------------------------------------------------------------------------
/References/Vehicles.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rwmt/Multiplayer-Compatibility/HEAD/References/Vehicles.dll
--------------------------------------------------------------------------------
/References/AbilityUser.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rwmt/Multiplayer-Compatibility/HEAD/References/AbilityUser.dll
--------------------------------------------------------------------------------
/References/Gastronomy.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rwmt/Multiplayer-Compatibility/HEAD/References/Gastronomy.dll
--------------------------------------------------------------------------------
/References/Inventory.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rwmt/Multiplayer-Compatibility/HEAD/References/Inventory.dll
--------------------------------------------------------------------------------
/References/SmashTools.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rwmt/Multiplayer-Compatibility/HEAD/References/SmashTools.dll
--------------------------------------------------------------------------------
/References/Storefront.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rwmt/Multiplayer-Compatibility/HEAD/References/Storefront.dll
--------------------------------------------------------------------------------
/References/TorannMagic.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rwmt/Multiplayer-Compatibility/HEAD/References/TorannMagic.dll
--------------------------------------------------------------------------------
/References/VFEEmpire.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rwmt/Multiplayer-Compatibility/HEAD/References/VFEEmpire.dll
--------------------------------------------------------------------------------
/References/ZombieLand.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rwmt/Multiplayer-Compatibility/HEAD/References/ZombieLand.dll
--------------------------------------------------------------------------------
/References/CashRegister.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rwmt/Multiplayer-Compatibility/HEAD/References/CashRegister.dll
--------------------------------------------------------------------------------
/References/kentington_saveourship2_ShipsHaveInsides.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rwmt/Multiplayer-Compatibility/HEAD/References/kentington_saveourship2_ShipsHaveInsides.dll
--------------------------------------------------------------------------------
/Languages/English/Keyed/Shared.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Switch to map
6 |
7 |
--------------------------------------------------------------------------------
/Languages/English/Keyed/VanillaFactionsInsectoid.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Teleporter loading session
5 |
6 |
--------------------------------------------------------------------------------
/Languages/Polish/Keyed/Shared.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Przełącz na mapę
6 |
7 |
8 |
--------------------------------------------------------------------------------
/release_bundler.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | set -e
4 |
5 | dotnet build -c Release
6 |
7 | rm -rf Multiplayer-Compatibility/
8 | mkdir -p Multiplayer-Compatibility
9 |
10 | cp -r About Assemblies Referenced Languages Multiplayer-Compatibility
11 |
12 | # Zip for Github releases
13 | rm -f Multiplayer-Compatibility.zip
14 | zip -r -q Multiplayer-Compatibility.zip Multiplayer-Compatibility
15 |
16 | echo "Ok, $PWD/Multiplayer-Compatibility.zip ready"
17 |
--------------------------------------------------------------------------------
/Source/Mods/DubsPaintShop.cs:
--------------------------------------------------------------------------------
1 | using Verse;
2 |
3 | namespace Multiplayer.Compat
4 | {
5 | /// Dubs Paint Shop by Dubwise
6 | ///
7 | [MpCompatFor("dubwise.dubspaintshop")]
8 | internal class DubsPaintShop
9 | {
10 | public DubsPaintShop(ModContentPack mod) => LongEventHandler.ExecuteWhenFinished(() => DubsMintMenu.Patch("DubRoss.MP_Util"));
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/Source/Mods/DubsMintMinimap.cs:
--------------------------------------------------------------------------------
1 | using Verse;
2 |
3 | namespace Multiplayer.Compat
4 | {
5 | /// Dubs Mint Minimap by Dubwise
6 | ///
7 | [MpCompatFor("dubwise.dubsmintminimap")]
8 | internal class DubsMintMinimap
9 | {
10 | public DubsMintMinimap(ModContentPack mod) => LongEventHandler.ExecuteWhenFinished(() => DubsMintMenu.Patch("DubsMintMinimap.MP_Util"));
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/Source/Mods/MiscTraining.cs:
--------------------------------------------------------------------------------
1 | using Verse;
2 |
3 | namespace Multiplayer.Compat
4 | {
5 | /// Misc. Training by HaploX1
6 | ///
7 | [MpCompatFor("Haplo.Miscellaneous.Training")]
8 | class MiscTraining
9 | {
10 | public MiscTraining(ModContentPack mod)
11 | {
12 | PatchingUtilities.PatchPushPopRand("TrainingFacility.JobDriver_Archery:ShootArrow");
13 | }
14 | }
15 | }
--------------------------------------------------------------------------------
/Source/Mods/AutoharvesterAutocycle.cs:
--------------------------------------------------------------------------------
1 | using Verse;
2 |
3 | namespace Multiplayer.Compat
4 | {
5 | /// Autoharvester Auto-cycle by FluffyKittens
6 | ///
7 | [MpCompatFor("FluffyKittens.Autoharvester")]
8 | internal class AutoharvesterAutocycle
9 | {
10 | public AutoharvesterAutocycle(ModContentPack mod)
11 | => MpCompat.RegisterLambdaMethod("AutoHarvesterCycle.CycleComp", "CompGetGizmosExtra", 0, 1, 2, 3);
12 | }
13 | }
--------------------------------------------------------------------------------
/Source/Mods/RimEffectDrell.cs:
--------------------------------------------------------------------------------
1 | using Verse;
2 |
3 | namespace Multiplayer.Compat
4 | {
5 | /// Rim-Effect: Drell by Vanilla Expanded Team and Co.
6 | ///
7 | ///
8 | [MpCompatFor("RimEffect.Drell")]
9 | public class RimEffectDrell
10 | {
11 | public RimEffectDrell(ModContentPack mod)
12 | => MpCompat.RegisterLambdaMethod("REDrell.Comp_Drell", "CompGetGizmosExtra", 0, 1);
13 | }
14 | }
--------------------------------------------------------------------------------
/Languages/English/Keyed/VehicleFramework.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Vehicle caravan forming session
5 | Vehicle cargo loading session
6 | Aerial vehicle landing session
7 |
8 |
9 | Vehicles waiting to land
10 |
11 |
--------------------------------------------------------------------------------
/Source/Mods/MedicinesPlus.cs:
--------------------------------------------------------------------------------
1 | using Verse;
2 |
3 | namespace Multiplayer.Compat
4 | {
5 | /// Medicines+ by Atlas, TedDraws
6 | ///
7 | ///
8 | [MpCompatFor("TedDraws.MedicinesPlus.AT")]
9 | internal class MedicinesPlus
10 | {
11 | public MedicinesPlus(ModContentPack mod)
12 | => PatchingUtilities.PatchSystemRand("AT_MedicinesPlus.Hediff_HypnotolAddiction:PostRemoved", false);
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/Source/Mods/HospitalityVendingMachines.cs:
--------------------------------------------------------------------------------
1 | using Verse;
2 |
3 | namespace Multiplayer.Compat
4 | {
5 | ///
6 | /// Hospitality: Vending machines by Adamas
7 | ///
8 | ///
9 | ///
10 | [MpCompatFor("Adamas.VendingMachines")]
11 | public class HospitalityVendingMachines
12 | {
13 | public HospitalityVendingMachines(ModContentPack mod)
14 | => HospitalityCasino.InitializeGizmos("VendingMachines");
15 | }
16 | }
--------------------------------------------------------------------------------
/Source/Mods/HugsLib.cs:
--------------------------------------------------------------------------------
1 | using Verse;
2 |
3 | namespace Multiplayer.Compat;
4 |
5 | /// HugsLib by UnlimitedHugs
6 | ///
7 | ///
8 | [MpCompatFor("UnlimitedHugs.HugsLib")]
9 | public class HugsLib
10 | {
11 | public HugsLib(ModContentPack mod)
12 | {
13 | // Stop the long event from running when it could break stuff.
14 | PatchingUtilities.CancelCallIfLongEventsAreUnsafe("HugsLib.HugsLibController:OnMapInitFinalized");
15 | }
16 | }
--------------------------------------------------------------------------------
/Source/Mods/EnhancedVatLearning.cs:
--------------------------------------------------------------------------------
1 | using Verse;
2 |
3 | namespace Multiplayer.Compat
4 | {
5 | /// Enhanced Vat Learning by SmArtKar, Elseud
6 | ///
7 | ///
8 | [MpCompatFor("smartkar.enhancedvatlearning")]
9 | public class EnhancedVatLearning
10 | {
11 | public EnhancedVatLearning(ModContentPack mod)
12 | => PatchingUtilities.PatchSystemRandCtor("EnhancedVatLearning.HediffComp_EnhancedLearning", false);
13 | }
14 | }
--------------------------------------------------------------------------------
/Languages/Polish/Keyed/VehicleFramework.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Sesja formowania karawany pojazdów
5 | Sesja ładowania ładunku pojazdu
6 | Sesja lądowania pojazdu powietrznego
7 |
8 |
9 | Pojazdy oczekujące na lądowanie
10 |
11 |
12 |
--------------------------------------------------------------------------------
/Source/Mods/HarvestOrgansPostMortem.cs:
--------------------------------------------------------------------------------
1 | using Verse;
2 |
3 | namespace Multiplayer.Compat
4 | {
5 | ///
6 | /// Harvest Organs Post Mortem by Smuffle
7 | ///
8 | ///
9 | ///
10 | [MpCompatFor("Smuffle.HarvestOrgansPostMortem")]
11 | public class HarvestOrgansPostMortem
12 | {
13 | public HarvestOrgansPostMortem(ModContentPack mod)
14 | => PatchingUtilities.PatchSystemRand("Autopsy.NewMedicalRecipesUtility:TraverseBody");
15 | }
16 | }
--------------------------------------------------------------------------------
/Source/Mods/DeepStorage.cs:
--------------------------------------------------------------------------------
1 | using HarmonyLib;
2 | using Multiplayer.API;
3 | using Verse;
4 |
5 | namespace Multiplayer.Compat
6 | {
7 | /// Deep Storage by LWM
8 | ///
9 | ///
10 | [MpCompatFor("LWM.DeepStorage")]
11 | class DeepStorage
12 | {
13 | public DeepStorage(ModContentPack mod)
14 | => MP.RegisterSyncMethod(AccessTools.TypeByName("LWM.DeepStorage.ITab_DeepStorage_Inventory"), "EjectTarget").CancelIfAnyArgNull();
15 | }
16 | }
--------------------------------------------------------------------------------
/Source/Mods/VanillaPlantsAutoPlowPatch.cs:
--------------------------------------------------------------------------------
1 | using HarmonyLib;
2 | using Multiplayer.API;
3 | using Verse;
4 |
5 | namespace Multiplayer.Compat
6 | {
7 | /// Vanilla Plants Expanded - Auto Plow Patch by Archoran
8 | ///
9 | [MpCompatFor("Archoran.Utils.VPEAutoPlow")]
10 | class VanillaPlantsAutoPlowPatch
11 | {
12 | public VanillaPlantsAutoPlowPatch(ModContentPack mod)
13 | => MP.RegisterSyncDelegateLambda(AccessTools.TypeByName("VPEAutoPlow.Patch_Zone_Growing_GetGizmos"), "Add_AllowAutoPlow_Gizmo", 1);
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Source/Mods/AlphaMechs.cs:
--------------------------------------------------------------------------------
1 | using HarmonyLib;
2 | using Multiplayer.API;
3 | using Verse;
4 |
5 | namespace Multiplayer.Compat
6 | {
7 | /// Alpha Mechs by Sarg Bjornson
8 | ///
9 | ///
10 | [MpCompatFor("sarg.alphamechs")]
11 | public class AlphaMechs
12 | {
13 | public AlphaMechs(ModContentPack mod)
14 | {
15 | // Gizmos
16 | MP.RegisterSyncMethod(AccessTools.DeclaredMethod("AlphaMechs.Pawn_HemogenVat:EjectContents"));
17 | }
18 | }
19 | }
--------------------------------------------------------------------------------
/Source/Mods/VanillaBrewingExpanded.cs:
--------------------------------------------------------------------------------
1 | using Verse;
2 |
3 | namespace Multiplayer.Compat
4 | {
5 | /// Vanilla Brewing Expanded by Oskar Potocki, Sarg Bjornson, Chowder
6 | ///
7 | ///
8 | [MpCompatFor("VanillaExpanded.VBrewE")]
9 | class VanillaBrewingExpanded
10 | {
11 | public VanillaBrewingExpanded(ModContentPack mod)
12 | {
13 | PatchingUtilities.PatchSystemRandCtor("VanillaBrewingExpanded.Hediff_ConsumedCocktail");
14 | }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Source/Mods/DeepStorageGUI.cs:
--------------------------------------------------------------------------------
1 | using HarmonyLib;
2 | using Multiplayer.API;
3 | using Verse;
4 |
5 | namespace Multiplayer.Compat
6 | {
7 | /// Netrve's DeepStorage GUI by Netrve
8 | ///
9 | ///
10 | [MpCompatFor("netrve.dsgui")]
11 | [MpCompatFor("Mlie.NetrvesDeepStorageGUI")]
12 | class DeepStorageGUI
13 | {
14 | public DeepStorageGUI(ModContentPack mod)
15 | => MP.RegisterSyncMethod(AccessTools.TypeByName("DSGUI.DSGUI_TabItem"), "EjectTarget").CancelIfAnyArgNull();
16 | }
17 | }
--------------------------------------------------------------------------------
/Source/Mods/CleanPathfinding2.cs:
--------------------------------------------------------------------------------
1 | using HarmonyLib;
2 | using Multiplayer.API;
3 | using Verse;
4 |
5 | namespace Multiplayer.Compat
6 | {
7 | /// Clean Pathfinding 2 by Owlchemist
8 | ///
9 | ///
10 | [MpCompatFor("Owlchemist.CleanPathfinding")]
11 | public class CleanPathfinding2
12 | {
13 | public CleanPathfinding2(ModContentPack mod)
14 | // Switch door type gizmo
15 | => MP.RegisterSyncMethod(AccessTools.DeclaredMethod("CleanPathfinding.MapComponent_DoorPathing:SwitchDoorType"));
16 | }
17 | }
--------------------------------------------------------------------------------
/Source/Mods/BetterGroundPenetratingScanner.cs:
--------------------------------------------------------------------------------
1 | using Multiplayer.API;
2 | using Verse;
3 |
4 | namespace Multiplayer.Compat
5 | {
6 | /// Better ground-penetrating scanner by Kikohi
7 | ///
8 | [MpCompatFor("kikohi.BetterGroundPenetratingScanner")]
9 | public class BetterGroundPenetratingScanner
10 | {
11 | public BetterGroundPenetratingScanner(ModContentPack mod)
12 | {
13 | // Select random outcome (2) or specific one (3)
14 | MpCompat.RegisterLambdaDelegate("BGPScanner.CompBetterDeepScanner", "PostSpawnSetup", 2, 3).SetContext(SyncContext.MapSelected);
15 | }
16 | }
17 | }
--------------------------------------------------------------------------------
/Source/Mods/AlmostThere.cs:
--------------------------------------------------------------------------------
1 | using RimWorld.Planet;
2 | using Verse;
3 |
4 | namespace Multiplayer.Compat
5 | {
6 | /// Almost There! by Roolo
7 | ///
8 | ///
9 | [MpCompatFor("roolo.AlmostThere")]
10 | [MpCompatFor("Chad.Almostthere1.5")]
11 | public class AlmostThere
12 | {
13 | public AlmostThere(ModContentPack mod)
14 | {
15 | // Toggle: almost there (1), never rest (3), force rest (5)
16 | MpCompat.RegisterLambdaMethod("AlmostThere.AlmostThereWorldObjectComp", nameof(WorldObjectComp.GetGizmos), 1, 3, 5);
17 | }
18 | }
19 | }
--------------------------------------------------------------------------------
/Source/Mods/VanillaRacesSaurid.cs:
--------------------------------------------------------------------------------
1 | using Verse;
2 |
3 | namespace Multiplayer.Compat
4 | {
5 | ///
6 | /// Vanilla Races Expanded - Saurid by Oskar Potocki, Neronix17
7 | ///
8 | ///
9 | ///
10 | [MpCompatFor("vanillaracesexpanded.saurid")]
11 | public class VanillaRacesSaurid
12 | {
13 | public VanillaRacesSaurid(ModContentPack mod)
14 | {
15 | // Hatch now (0), regenerate child (1)
16 | MpCompat.RegisterLambdaMethod("VRESaurids.Comp_HumanHatcher", "CompGetGizmosExtra", 0, 1).SetDebugOnly();
17 | }
18 | }
19 | }
--------------------------------------------------------------------------------
/Source/Mods/VanillaPlantsMushrooms.cs:
--------------------------------------------------------------------------------
1 | using Verse;
2 |
3 | namespace Multiplayer.Compat
4 | {
5 | /// Vanilla Plants Expanded - Mushrooms by Taranchuk, Sarg Bjornson, Oskar Potocki
6 | ///
7 | ///
8 | [MpCompatFor("VanillaExpanded.VPlantsEMushrooms")]
9 | public class VanillaPlantsMushrooms
10 | {
11 | public VanillaPlantsMushrooms(ModContentPack mod)
12 | {
13 | // Toggle allow cut (1), allow sow (3)
14 | MpCompat.RegisterLambdaMethod("VanillaPlantsExpandedMushrooms.Zone_GrowingMushroom", "GetGizmos", 1, 3);
15 | }
16 | }
17 | }
--------------------------------------------------------------------------------
/Source/Mods/SparklingWorlds.cs:
--------------------------------------------------------------------------------
1 | using HarmonyLib;
2 | using Multiplayer.API;
3 | using Verse;
4 |
5 | namespace Multiplayer.Compat
6 | {
7 | /// Sparkling Worlds by Albion
8 | ///
9 | ///
10 | [MpCompatFor("Albion.SparklingWorlds.Full")]
11 | [MpCompatFor("Albion.SparklingWorlds.Core")]
12 | public class SparklingWorlds
13 | {
14 | public SparklingWorlds(ModContentPack mod)
15 | {
16 | LongEventHandler.ExecuteWhenFinished(() => MP.RegisterSyncMethod(AccessTools.TypeByName("SparklingWorlds.CompOrbitalLaunchSW"), "TryLaunch"));
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/Source/Mods/GrazingLands.cs:
--------------------------------------------------------------------------------
1 | using HarmonyLib;
2 | using Verse;
3 |
4 | namespace Multiplayer.Compat
5 | {
6 | /// Grazing Lands by avilmask
7 | ///
8 | ///
9 | [MpCompatFor("avilmask.GrazingLands")]
10 | public class GrazingLands
11 | {
12 | public GrazingLands(ModContentPack mod)
13 | {
14 | var type = AccessTools.TypeByName("GrazingLands.PlantPropertiesPatch");
15 | type = AccessTools.Inner(type, "Plant_IngestedCalculateAmounts_GrazingLandsPatch");
16 | PatchingUtilities.PatchSystemRand(AccessTools.Method(type, "Prefix"), false);
17 | }
18 | }
19 | }
--------------------------------------------------------------------------------
/Source/Mods/RimEffectExtendedCut.cs:
--------------------------------------------------------------------------------
1 | using Verse;
2 |
3 | namespace Multiplayer.Compat
4 | {
5 | /// Rim-Effect: Extended Cut by Vanilla Expanded Team and Co.
6 | ///
7 | ///
8 | [MpCompatFor("RimEffect.ExtendedCut")]
9 | public class RimEffectExtendedCut
10 | {
11 | public RimEffectExtendedCut(ModContentPack mod)
12 | {
13 | MpCompat.RegisterLambdaDelegate("RimEffectExtendedCut.Building_WarzoneTable", "GetBattleSetOptions", 0);
14 | MpCompat.RegisterLambdaMethod("RimEffectExtendedCut.CompPowerOutDoorLamp", "CompGetGizmosExtra", 0, 1).SetDebugOnly();
15 | }
16 | }
17 | }
--------------------------------------------------------------------------------
/Source/Mods/PrisonCommons.cs:
--------------------------------------------------------------------------------
1 | using Verse;
2 |
3 | namespace Multiplayer.Compat
4 | {
5 | /// Prison Commons by Ben Lubar
6 | ///
7 | ///
8 | [MpCompatFor("me.lubar.PrisonCommons")]
9 | [MpCompatFor("me.lubar.PrisonCommons.temp")]
10 | [MpCompatFor("Mlie.PrisonCommons")]
11 | internal class PrisonCommons
12 | {
13 | public PrisonCommons(ModContentPack mod)
14 | => LongEventHandler.ExecuteWhenFinished(LatePatch);
15 |
16 | private static void LatePatch()
17 | => MpCompat.RegisterLambdaMethod("RimWorld.CompPrisonCommons", "CompGetGizmosExtra", 1);
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/Source/Mods/ToggleableShields.cs:
--------------------------------------------------------------------------------
1 | using HarmonyLib;
2 | using Multiplayer.API;
3 | using Verse;
4 |
5 | namespace Multiplayer.Compat
6 | {
7 | /// Toggleable Shields by Owlchemist
8 | ///
9 | ///
10 | [MpCompatFor("Owlchemist.ToggleableShields")]
11 | internal class ToggleableShields
12 | {
13 | public ToggleableShields(ModContentPack mod) => LongEventHandler.ExecuteWhenFinished(LatePatch);
14 |
15 | private static void LatePatch()
16 | => MP.RegisterSyncMethod(AccessTools.DeclaredMethod("ToggleableShields.Patch_Gizmo_EnergyShieldStatus_GizmoOnGUI:ToggleShields"));
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/Source/Mods/VanillaFactionsMedieval.cs:
--------------------------------------------------------------------------------
1 | using Verse;
2 |
3 | namespace Multiplayer.Compat
4 | {
5 | /// Vanilla Factions Expanded - Medieval by Oskar Potocki, XeoNovaDan
6 | ///
7 | ///
8 | [MpCompatFor("OskarPotocki.VanillaFactionsExpanded.MedievalModule")]
9 | public class VanillaFactionsMedieval
10 | {
11 | // Archery target uses RNG - but only when the player is looking at it. Which may not be the case in MP for all players.
12 | public VanillaFactionsMedieval(ModContentPack mod)
13 | => PatchingUtilities.PatchPushPopRand("VFEMedieval.JobDriver_PlayArchery:ThrowObjectAt");
14 | }
15 | }
--------------------------------------------------------------------------------
/Source/Mods/VanillaRacesHussar.cs:
--------------------------------------------------------------------------------
1 | using Verse;
2 |
3 | namespace Multiplayer.Compat
4 | {
5 | /// Vanilla Races Expanded - Hussar by Oskar Potocki, xrushha, Taranchuk, Sarg
6 | ///
7 | ///
8 | [MpCompatFor("vanillaracesexpanded.hussar")]
9 | public class VanillaRacesHussar
10 | {
11 | public VanillaRacesHussar(ModContentPack mod)
12 | {
13 | // Trigger queued mental break when undrafted, which will happen right after clicking but before it's synced.
14 | PatchingUtilities.PatchCancelInInterface("VREHussars.Pawn_DraftController_Drafted_Patch:Postfix");
15 | }
16 | }
17 | }
--------------------------------------------------------------------------------
/Source/Mods/Reunion.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Verse;
3 |
4 | namespace Multiplayer.Compat
5 | {
6 | /// Reunion by Kyrun
7 | ///
8 | ///
9 | [MpCompatFor("Kyrun.Reunion")]
10 | public class Reunion
11 | {
12 | public Reunion(ModContentPack mod)
13 | {
14 | var methods = new[]
15 | {
16 | "Kyrun.Reunion.GameComponent:GetRandomAllyForSpawning",
17 | "Kyrun.Reunion.GameComponent:TryScheduleNextEvent",
18 | "Kyrun.Reunion.GameComponent:DecideAndDoEvent",
19 | };
20 | PatchingUtilities.PatchUnityRand(methods);
21 | }
22 | }
23 | }
--------------------------------------------------------------------------------
/Source/Mods/PocketSand.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using HarmonyLib;
3 | using Multiplayer.API;
4 | using Verse;
5 |
6 | namespace Multiplayer.Compat
7 | {
8 | /// Pocket Sand by Reisen
9 | ///
10 | [MpCompatFor("usagirei.pocketsand")]
11 | public class PocketSandCompat
12 | {
13 | public PocketSandCompat(ModContentPack mod)
14 | {
15 | LongEventHandler.ExecuteWhenFinished(LateLoad);
16 | }
17 |
18 | static void LateLoad()
19 | {
20 | Type type = AccessTools.TypeByName("PocketSand.PawnExtensions");
21 |
22 | MP.RegisterSyncMethod(type, "EquipFromInventory");
23 | MP.RegisterSyncMethod(type, "DropFromInventory");
24 | }
25 | }
26 | }
--------------------------------------------------------------------------------
/Source/Mods/VanillaAnimalsEndangered.cs:
--------------------------------------------------------------------------------
1 | using HarmonyLib;
2 | using Multiplayer.API;
3 | using Verse;
4 |
5 | namespace Multiplayer.Compat
6 | {
7 | /// Vanilla Animals Expanded - Endangered by Oskar Potocki, Sarg Bjornson, Erin, Taranchuk
8 | ///
9 | ///
10 | [MpCompatFor("VanillaExpanded.VAEEndAndExt")]
11 | class VanillaAnimalsEndangered
12 | {
13 | public VanillaAnimalsEndangered(ModContentPack mod)
14 | {
15 | var type = AccessTools.TypeByName("VanillaAnimalsExpandedEndangered.Pawn_GetGizmos_Patch");
16 |
17 | MP.RegisterSyncDelegateLambda(type, "Postfix", 1);
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/Source/Mods/Windows.cs:
--------------------------------------------------------------------------------
1 | using HarmonyLib;
2 | using Verse;
3 |
4 | namespace Multiplayer.Compat
5 | {
6 | /// Windows by Owlchemist, jptrrs
7 | ///
8 | ///
9 | [MpCompatFor("Owlchemist.Windows")]
10 | internal class Windows
11 | {
12 | public Windows(ModContentPack mod)
13 | {
14 | var type = AccessTools.TypeByName("OpenTheWindows.Building_Window");
15 | MpCompat.RegisterLambdaMethod(type, "GetGizmos", 3, 5);
16 |
17 | type = AccessTools.TypeByName("OpenTheWindows.CompWindow");
18 | MpCompat.RegisterLambdaMethod(type, "CompGetGizmosExtra", 1);
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/Source/Mods/RunandGun.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Verse;
3 | using HarmonyLib;
4 | using Multiplayer.API;
5 |
6 | namespace Multiplayer.Compat
7 | {
8 | /// RunAndGun by roolo
9 | ///
10 | ///
11 | [MpCompatFor("roolo.RunAndGun")]
12 | class RunandGun
13 | {
14 | public RunandGun(ModContentPack mod)
15 | {
16 | Type type = AccessTools.TypeByName("RunAndGun.Harmony.Pawn_DraftController_GetGizmos_Patch");
17 |
18 | MP.RegisterSyncDelegateLambda(type, "Postfix", 1);
19 |
20 | PatchingUtilities.PatchSystemRand("RunAndGun.Harmony.MentalStateHandler_TryStartMentalState:shouldRunAndGun", false);
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/Source/Mods/VanillaRacesExpandedLycanthrope.cs:
--------------------------------------------------------------------------------
1 | using HarmonyLib;
2 | using Verse;
3 |
4 | namespace Multiplayer.Compat
5 | {
6 | /// Vanilla Races Expanded - Lycanthrope by Oskar Potocki, Sarg Bjornson
7 | ///
8 | ///
9 | [MpCompatFor("vanillaracesexpanded.lycanthrope")]
10 | public class VanillaRacesExpandedLycanthrope
11 | {
12 | public VanillaRacesExpandedLycanthrope(ModContentPack mod)
13 | {
14 | AccessTools.DeclaredField("VanillaRacesExpandedLycanthrope.VanillaRacesExpandedLycanthrope_InteractionWorker_Interacted_Patch:random")
15 | .SetValue(null, PatchingUtilities.RandRedirector.Instance);
16 | }
17 | }
18 | }
--------------------------------------------------------------------------------
/Source/Mods/VanillaAnimalsWaste.cs:
--------------------------------------------------------------------------------
1 | using Verse;
2 |
3 | namespace Multiplayer.Compat
4 | {
5 | /// Vanilla Animals Expanded — Waste Animals by Oskar Potocki, Sarg Bjornson, Sir Van
6 | ///
7 | ///
8 | [MpCompatFor("VanillaExpanded.VAEWaste")]
9 | public class VanillaAnimalsWaste
10 | {
11 | public VanillaAnimalsWaste(ModContentPack mod)
12 | => PatchingUtilities.PatchSystemRand(new[]
13 | {
14 | "VanillaAnimalsExpandedWaste.HediffComp_Toxflu:CompPostPostRemoved",
15 | "VanillaAnimalsExpandedWaste.VanillaAnimalsExpandedWaste_InteractionWorker_Interacted_Patch:Toxflu",
16 | }, false);
17 | }
18 | }
--------------------------------------------------------------------------------
/Source/Mods/AnimaObelisk.cs:
--------------------------------------------------------------------------------
1 | using System.Linq;
2 | using HarmonyLib;
3 | using Verse;
4 |
5 | namespace Multiplayer.Compat
6 | {
7 | /// Anima Obelisk by DimonSever000
8 | ///
9 | [MpCompatFor("DimonSever000.AnimaObelisk.Specific")]
10 | internal class AnimaObelisk
11 | {
12 | public AnimaObelisk(ModContentPack mod)
13 | {
14 | var type = AccessTools.TypeByName("PsyObelisk.Things.ThingComp_PsyObelisk");
15 | PatchingUtilities.PatchUnityRand(AccessTools.Method(type, "GlowAround"), false);
16 | var syncMethods = MpCompat.RegisterLambdaMethod(type, "CompGetGizmosExtra", Enumerable.Range(0, 8).ToArray()); // 0 to 7
17 | syncMethods.Skip(2).SetDebugOnly();
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/Source/Mods/VPESkipdoorPathing.cs:
--------------------------------------------------------------------------------
1 | using Verse;
2 |
3 | namespace Multiplayer.Compat
4 | {
5 | /// VPE Skipdoor Pathing by V337
6 | /// You should probably use Better VPE Skipdoor Pathing instead, as it has less issues:
7 | ///
8 | ///
9 | [MpCompatFor("v337.VPESkipdoorPathing")]
10 | public class VPESkipdoorPathing
11 | {
12 | public VPESkipdoorPathing(ModContentPack mod)
13 | {
14 | // Toggle use while drafted gizmo
15 | MpCompat.RegisterLambdaMethod("VPESkipdoorPathing.CompSkipdoorPathing", nameof(ThingComp.CompGetGizmosExtra), 1);
16 | }
17 | }
18 | }
--------------------------------------------------------------------------------
/Source/Mods/CustomPrisonerInteractions.cs:
--------------------------------------------------------------------------------
1 | using System.Linq;
2 | using HarmonyLib;
3 | using Verse;
4 |
5 | namespace Multiplayer.Compat
6 | {
7 | /// Custom Prisoner Interactions by Mlie
8 | ///
9 | ///
10 | [MpCompatFor("Mlie.CustomPrisonerInteractions")]
11 | public class CustomPrisonerInteractions
12 | {
13 | public CustomPrisonerInteractions(ModContentPack mod)
14 | {
15 | var type = AccessTools.TypeByName("CustomPrisonerInteractions.ITab_Pawn_Visitor_FillTab");
16 | MpCompat.RegisterLambdaDelegate(type, "Prefix", Enumerable.Range(0, 11).ToArray()); // 0 to 10
17 | MpCompat.RegisterLambdaDelegate(type, "Postfix", 0);
18 | }
19 | }
20 | }
--------------------------------------------------------------------------------
/Source/Mods/VanillaHelixienGas.cs:
--------------------------------------------------------------------------------
1 | using Verse;
2 |
3 | namespace Multiplayer.Compat
4 | {
5 | /// Vanilla Helixien Gas Expanded by Oskar Potocki, Kikohi
6 | ///
7 | ///
8 | [MpCompatFor("VanillaExpanded.HelixienGas")]
9 | public class VanillaHelixienGasExpanded
10 | {
11 | public VanillaHelixienGasExpanded(ModContentPack mod)
12 | {
13 | // Fill gizmo
14 | MpCompat.RegisterLambdaMethod("VHelixienGasE.Building_GasGeyser", "GetGizmos", 0);
15 | // GenView.ShouldSpawnMotesAt call with RNG calls, need to push/pop
16 | PatchingUtilities.PatchPushPopRand("VHelixienGasE.IntermittentGasSprayer:ThrowGasPuffUp");
17 | }
18 | }
19 | }
--------------------------------------------------------------------------------
/.github/workflows/publish-release.yml:
--------------------------------------------------------------------------------
1 | name: Publish release
2 |
3 | on:
4 | workflow_dispatch:
5 | push:
6 | branches:
7 | - master
8 | paths-ignore:
9 | - 'README.md'
10 |
11 | jobs:
12 | build:
13 | name: Build workshop
14 | runs-on: ubuntu-latest
15 | steps:
16 | - name: Checkout Repository
17 | uses: actions/checkout@v3
18 |
19 | - name: Setup Dotnet
20 | uses: actions/setup-dotnet@v2
21 | with:
22 | dotnet-version: 8.0.x
23 |
24 | - name: Run workshop bundler
25 | run: ./release_bundler.sh
26 |
27 | - uses: "marvinpinto/action-automatic-releases@latest"
28 | with:
29 | repo_token: "${{ secrets.GITHUB_TOKEN }}"
30 | prerelease: false
31 | automatic_release_tag: "latest"
32 | title: "Multiplayer Compatibility"
33 | files: |
34 | Multiplayer-Compatibility.zip
35 |
--------------------------------------------------------------------------------
/Source/Mods/SmallVehicleAddons.cs:
--------------------------------------------------------------------------------
1 | using HarmonyLib;
2 | using Multiplayer.API;
3 | using Verse;
4 |
5 | namespace Multiplayer.Compat;
6 |
7 | /// Small Vehicle Add-ons by いのしし_3
8 | ///
9 | [MpCompatFor("Inoshishi3.SmallVehicleAddons")]
10 | public class SmallVehicleAddons
11 | {
12 | public SmallVehicleAddons(ModContentPack mod)
13 | {
14 | // Quickly add all nearby items to transferables
15 | MP.RegisterSyncMethod(AccessTools.DeclaredMethod("SmallVehicleAddons.CompFastCargo:AddItemsToTheVehicleTransferables"));
16 | // Honk the car horn
17 | MP.RegisterSyncMethod(AccessTools.DeclaredMethod("SmallVehicleAddons.CompHonk:DoHonkHonk"));
18 | // Toggle car lights on/off
19 | MP.RegisterSyncMethod(AccessTools.DeclaredMethod("SmallVehicleAddons.CompLights:ToggleDeployment"));
20 | }
21 | }
--------------------------------------------------------------------------------
/Source/Mods/VanillaFurnitureExpandedPower.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using HarmonyLib;
3 | using Multiplayer.API;
4 | using UnityEngine;
5 | using Verse;
6 |
7 | namespace Multiplayer.Compat
8 | {
9 | /// Vanilla Furniture Expanded - Power by Oskar Potocki and Sarg Bjornson
10 | ///
11 | ///
12 | /// Contribution to Multiplayer Compatibility by Sokyran and Reshiram
13 | [MpCompatFor("VanillaExpanded.VFEPower")]
14 | class VanillaPowerExpanded
15 | {
16 | public VanillaPowerExpanded(ModContentPack mod)
17 | {
18 | // Violence generator
19 | var type = AccessTools.TypeByName("VanillaPowerExpanded.CompSoulsPowerPlant");
20 | MpCompat.RegisterLambdaMethod(type, "CompGetGizmosExtra", 1); // Toggle on/off
21 | }
22 | }
23 | }
--------------------------------------------------------------------------------
/Source/Mods/ClutterStructures.cs:
--------------------------------------------------------------------------------
1 | using HarmonyLib;
2 | using Verse;
3 |
4 | namespace Multiplayer.Compat
5 | {
6 | /// Clutter Structures by mrofa and neronix17
7 | ///
8 | ///
9 | [MpCompatFor("neronix17.clutterstructures")]
10 | class ClutterStructures
11 | {
12 | public ClutterStructures(ModContentPack mod)
13 | {
14 | MpCompat.harmony.Patch(
15 | AccessTools.Method("Clutter_StructureWall.StructureDefGenerator:StuffGeneratrs"),
16 | postfix: new HarmonyMethod(typeof(ClutterStructures), nameof(GetClutterStructureDefPostfix))
17 | );
18 | }
19 |
20 | static void GetClutterStructureDefPostfix(ThingDef Wallzie)
21 | {
22 | DefDatabase.Add(Wallzie);
23 | }
24 | }
25 | }
--------------------------------------------------------------------------------
/Source/Mods/StuffedFloors.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Reflection;
3 |
4 | using HarmonyLib;
5 | using Verse;
6 |
7 | namespace Multiplayer.Compat
8 | {
9 |
10 | /// Stuffed Floors by Fluffy
11 | ///
12 | ///
13 | [MpCompatFor("fluffy.stuffedfloors")]
14 | class StuffedFloorsCompat
15 | {
16 | public StuffedFloorsCompat(ModContentPack mod)
17 | {
18 | MpCompat.harmony.Patch(
19 | AccessTools.Method("StuffedFloors.FloorTypeDef:GetStuffedTerrainDef"),
20 | postfix: new HarmonyMethod(typeof(StuffedFloorsCompat), nameof(GetStuffedTerrainDefPosfix))
21 | );
22 | }
23 |
24 | static void GetStuffedTerrainDefPosfix(TerrainDef __result)
25 | {
26 | DefDatabase.Add(__result);
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/Source/Mods/PerspectiveBuildings.cs:
--------------------------------------------------------------------------------
1 | using HarmonyLib;
2 | using Multiplayer.API;
3 | using Verse;
4 |
5 | namespace Multiplayer.Compat
6 | {
7 | /// Perspective: Buildings by Owlchemist
8 | ///
9 | ///
10 | [MpCompatFor("Owlchemist.PerspectiveBuildings")]
11 | [MpCompatFor("Mlie.PerspectiveBuildings")]
12 | internal class PerspectiveBuildings
13 | {
14 | public PerspectiveBuildings(ModContentPack mod)
15 | {
16 | LongEventHandler.ExecuteWhenFinished(LatePatch);
17 | }
18 |
19 | private static void LatePatch()
20 | {
21 | var type = AccessTools.TypeByName("Perspective.CompOffsetter");
22 | MP.RegisterSyncMethod(type, "SetCurrentOffset");
23 | MP.RegisterSyncMethod(type, "SetMirroredState");
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Source/Mods/SimplyMoreBridges.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Reflection;
3 |
4 | using HarmonyLib;
5 | using Verse;
6 |
7 | namespace Multiplayer.Compat
8 | {
9 | /// Simply More Bridges by Lanilor
10 | ///
11 | ///
12 | [MpCompatFor("Mlie.SimplyMoreBridges")]
13 | class SimplyMoreBridgesCompat
14 | {
15 | public SimplyMoreBridgesCompat(ModContentPack mod)
16 | {
17 | MpCompat.harmony.Patch(
18 | AccessTools.Method("SimplyMoreBridges.GenerateBridges:GenerateBridgeDef"),
19 | postfix: new HarmonyMethod(typeof(SimplyMoreBridgesCompat), nameof(GenerateBridgeDefPostfix))
20 | );
21 | }
22 |
23 | static void GenerateBridgeDefPostfix(TerrainDef __result)
24 | {
25 | DefDatabase.Add(__result);
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/Source/Mods/VanillaFactionsVikings.cs:
--------------------------------------------------------------------------------
1 | using HarmonyLib;
2 | using Verse;
3 |
4 | namespace Multiplayer.Compat
5 | {
6 | /// Vanilla Factions Expanded - Vikings by Oskar Potocki, Erin, Sarg Bjornson, erdelf, Kikohi, Taranchuk, Helixien, Chowder
7 | ///
8 | ///
9 | [MpCompatFor("OskarPotocki.VFE.Vikings")]
10 | class VanillaFactionsVikings
11 | {
12 | public VanillaFactionsVikings(ModContentPack mod)
13 | {
14 | // Debug stuff
15 | var type = AccessTools.TypeByName("VFEV.Apiary");
16 | MpCompat.RegisterLambdaMethod(type, "GetGizmos", 0, 1).SetDebugOnly();
17 |
18 | // This method seems unused... But I guess it's better to be safe than sorry.
19 | PatchingUtilities.PatchSystemRand(AccessTools.Method(type, "ResetTend"), false);
20 | }
21 | }
22 | }
--------------------------------------------------------------------------------
/Source/Mods/PowerSwitch.cs:
--------------------------------------------------------------------------------
1 | using HarmonyLib;
2 | using Multiplayer.API;
3 | using Verse;
4 |
5 | namespace Multiplayer.Compat
6 | {
7 |
8 | /// PowerSwitch by Haplo
9 | ///
10 | ///
11 | [MpCompatFor("Haplo.PowerSwitch")]
12 | public class PowerSwitch
13 | {
14 | public PowerSwitch(ModContentPack mod)
15 | {
16 | var type = AccessTools.TypeByName("PowerSwitch.Building_PowerSwitchMod");
17 |
18 | MP.RegisterSyncMethod(type, "switchPowerOnOff");
19 | MP.RegisterSyncMethod(type, "SwitchEnemyOnActiveOnOff");
20 | MP.RegisterSyncMethod(type, "SwitchEnemyOffActiveOnOff");
21 | MP.RegisterSyncMethod(type, "SwitchPawnActiveOnOff");
22 | MP.RegisterSyncMethod(type, "TimerOffClicked");
23 | MP.RegisterSyncMethod(type, "TimerOnClicked");
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Source/Mods/GeneRipper.cs:
--------------------------------------------------------------------------------
1 | using HarmonyLib;
2 | using Multiplayer.API;
3 | using Verse;
4 |
5 | namespace Multiplayer.Compat
6 | {
7 | /// Gene Ripper by Obi Vayne Kenobi
8 | ///
9 | [MpCompatFor("DanielWedemeyer.GeneRipper")]
10 | public class GeneRipper
11 | {
12 | public GeneRipper(ModContentPack mod)
13 | {
14 | // It's loading resources, must patch later.
15 | LongEventHandler.ExecuteWhenFinished(LatePatch);
16 | }
17 |
18 | static void LatePatch()
19 | {
20 | var type = AccessTools.TypeByName("GeneRipper.Building_GeneRipper");
21 | // Dialog accept
22 | MpCompat.RegisterLambdaDelegate(type, "SelectPawn", 1);
23 |
24 | // Command finish, debug
25 | MP.RegisterSyncMethod(type, "Finish");
26 |
27 | // Command cancel
28 | MP.RegisterSyncMethod(type, "Cancel");
29 | }
30 | }
31 | }
--------------------------------------------------------------------------------
/Source/Mods/VanillaOutpostsExpanded.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using HarmonyLib;
7 | using Multiplayer.API;
8 | using Verse;
9 |
10 | namespace Multiplayer.Compat
11 | {
12 | /// Vanilla Outposts Expanded by legodude17, Oskar Potocki, Chowder, Kikohi
13 | ///
14 | ///
15 | [MpCompatFor("vanillaexpanded.outposts")]
16 | internal class VanillaOutpostsExpanded
17 | {
18 | public VanillaOutpostsExpanded(ModContentPack mod) => LongEventHandler.ExecuteWhenFinished(LatePatch);
19 |
20 | public void LatePatch()
21 | {
22 | MP.RegisterSyncMethod(AccessTools.TypeByName("VOE.Outpost_Artillery"), "Fire");
23 | MpCompat.RegisterLambdaDelegate("VOE.Outpost_Defensive", "GetGizmos", 3);
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Source/Mods/VanillaPlantsMorePlants.cs:
--------------------------------------------------------------------------------
1 | using Verse;
2 |
3 | namespace Multiplayer.Compat
4 | {
5 | /// Vanilla Plants Expanded - More Plants by Sarg Bjornson, Oskar Potocki
6 | ///
7 | ///
8 | [MpCompatFor("VanillaExpanded.VPlantsEMore")]
9 | internal class VanillaPlantsMorePlants
10 | {
11 | public VanillaPlantsMorePlants(ModContentPack mod)
12 | {
13 | PatchingUtilities.PatchSystemRand("VanillaPlantsExpandedMorePlants.Plant_SowsAdjacent:SpawnSetup", false);
14 | PatchingUtilities.PatchSystemRand("VanillaPlantsExpandedMorePlants.Plant_TransformOnMaturity:TickLong", false);
15 |
16 | MpCompat.RegisterLambdaMethod("VanillaPlantsExpandedMorePlants.Zone_GrowingAquatic", "GetGizmos", 1, 3);
17 | MpCompat.RegisterLambdaMethod("VanillaPlantsExpandedMorePlants.Zone_GrowingSandy", "GetGizmos", 1, 3);
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/Source/Mods/MechFramework.cs:
--------------------------------------------------------------------------------
1 | using HarmonyLib;
2 | using Multiplayer.API;
3 | using Verse;
4 |
5 | namespace Multiplayer.Compat
6 | {
7 | /// Mech Framework by andery233xj
8 | ///
9 | ///
10 | [MpCompatFor("Aoba.AMP")]
11 | [MpCompatFor("Aoba.WalkerGears")] // 1.3, not updated yet
12 | // Couldn't find any more mods using it, but more may exist.
13 | public class MechFramework
14 | {
15 | // Just in case multiple mods using it are active
16 | private static bool patchOnce = false;
17 |
18 | public MechFramework(ModContentPack mod)
19 | {
20 | if (patchOnce)
21 | return;
22 |
23 | patchOnce = true;
24 | LongEventHandler.ExecuteWhenFinished(LatePatch);
25 | }
26 |
27 | private static void LatePatch()
28 | => MP.RegisterSyncMethod(AccessTools.DeclaredMethod("WalkerGear.WalkerGear_Core:GetOut"));
29 | }
30 | }
--------------------------------------------------------------------------------
/Source/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 |
4 | // Information about this assembly is defined by the following attributes.
5 | // Change them to the values specific to your project.
6 |
7 | [assembly: AssemblyTitle("Multiplayer_Compat_DubsMintMenus")]
8 | [assembly: AssemblyDescription("")]
9 | [assembly: AssemblyConfiguration("")]
10 | [assembly: AssemblyCompany("")]
11 | [assembly: AssemblyProduct("")]
12 | [assembly: AssemblyCopyright("notfood")]
13 | [assembly: AssemblyTrademark("")]
14 | [assembly: AssemblyCulture("")]
15 |
16 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
17 | // The form "{Major}.{Minor}.*" will automatically update the build and revision,
18 | // and "{Major}.{Minor}.{Build}.*" will update just the revision.
19 |
20 | [assembly: AssemblyVersion("1.1.0.0")]
21 |
22 | // The following attributes are used to specify the signing key for the assembly,
23 | // if desired. See the Mono documentation for more information about signing.
24 |
25 | //[assembly: AssemblyDelaySign(false)]
26 | //[assembly: AssemblyKeyFile("")]
27 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2019 Meru
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/Source/Mods/BiomesCaverns.cs:
--------------------------------------------------------------------------------
1 | using Verse;
2 |
3 | namespace Multiplayer.Compat
4 | {
5 | /// Biomes! Caverns by The Biomes Mod Team
6 | ///
7 | ///
8 | [MpCompatFor("BiomesTeam.BiomesCaverns")]
9 | public class BiomesCaverns
10 | {
11 | public BiomesCaverns(ModContentPack mod)
12 | {
13 | // Gizmos
14 | {
15 | // Create drill pod blueprint
16 | MpCompat.RegisterLambdaDelegate("BiomesCaverns.Patches.Building_PodLauncher_GetGizmos_Patch", "DrillPodGizmo", 0);
17 | // (Dev) set progress to 100%
18 | MpCompat.RegisterLambdaMethod("Building_MushroomFermentingBarrel", nameof(Building.GetGizmos), 0).SetDebugOnly();
19 | }
20 |
21 | // RNG + GenView.ShouldSpawnMotesAt/mote saturation check
22 | {
23 | PatchingUtilities.PatchPushPopRand("Caveworld_Flora_Unleashed.FruitingBody_Gleamcap:ThrowPoisonSmoke");
24 | }
25 | }
26 | }
27 | }
--------------------------------------------------------------------------------
/Source/Mods/VanillaNutrientPasteExpanded.cs:
--------------------------------------------------------------------------------
1 | using Verse;
2 |
3 | namespace Multiplayer.Compat
4 | {
5 | /// Vanilla Nutrient Paste Expanded by Oskar Potocki, Kikohi
6 | ///
7 | ///
8 | [MpCompatFor("VanillaExpanded.VNutrientE")]
9 | public class VanillaNutrientPasteExpanded
10 | {
11 | public VanillaNutrientPasteExpanded(ModContentPack mod)
12 | {
13 | LongEventHandler.ExecuteWhenFinished(LatePatch);
14 |
15 | // Drop 5/10/20 meals
16 | MpCompat.RegisterLambdaDelegate("VNPE.Building_NutrientPasteDispenser_GetGizmos", "Postfix", 0, 1, 2);
17 | }
18 |
19 | private static void LatePatch()
20 | {
21 | // Drop 5/10/20 meals
22 | MpCompat.RegisterLambdaMethod("VNPE.Building_NutrientPasteTap", "GetGizmos", 0, 1, 2);
23 |
24 | // Drain
25 | MpCompat.RegisterLambdaMethod("VNPE.CompRegisterIngredients", "CompGetGizmosExtra", 0);
26 | }
27 | }
28 | }
--------------------------------------------------------------------------------
/Source/Mods/VanillaFurnitureExpandedFarming.cs:
--------------------------------------------------------------------------------
1 | using HarmonyLib;
2 | using Multiplayer.API;
3 | using Verse;
4 |
5 | namespace Multiplayer.Compat
6 | {
7 | /// Vanilla Furniture Expanded - Farming by Oskar Potocki and dninemfive
8 | ///
9 | ///
10 | /// contribution to Multiplayer Compatibility by Cody Spring
11 | [MpCompatFor("VanillaExpanded.VFEFarming")]
12 | class VFEF
13 | {
14 | public VFEF(ModContentPack mod)
15 | {
16 | //RNG Fix
17 | {
18 | var methods = new[] {
19 | "VFEF.MoteSprinkler:NewMote",
20 | "VFEF.MoteSprinkler:ThrowWaterSpray",
21 | };
22 |
23 | PatchingUtilities.PatchPushPopRand(methods);
24 | }
25 |
26 | // Gizmo fix
27 | {
28 | // Toggle should scarecrow affect tamed/player animals
29 | MpCompat.RegisterLambdaMethod("VFEF.Building_Scarecrow", "GetGizmos", 1);
30 | }
31 | }
32 | }
33 | }
--------------------------------------------------------------------------------
/Source/Mods/VanillaTemperatureExpanded.cs:
--------------------------------------------------------------------------------
1 | using HarmonyLib;
2 | using Multiplayer.API;
3 | using Verse;
4 |
5 | namespace Multiplayer.Compat;
6 |
7 | /// Vanilla Temperature Expanded by Oskar Potocki, xrushha, Arquebus, Taranchuk
8 | ///
9 | ///
10 | [MpCompatFor("VanillaExpanded.Temperature")]
11 | public class VanillaTemperatureExpanded
12 | {
13 | public VanillaTemperatureExpanded(ModContentPack mod)
14 | {
15 | LongEventHandler.ExecuteWhenFinished(LatePatch);
16 |
17 | // Unlink/relink
18 | MpCompat.RegisterLambdaDelegate("VanillaTemperatureExpanded.Comps.CompAcTempControl", nameof(ThingComp.CompGetGizmosExtra), 0);
19 | }
20 |
21 | private static void LatePatch()
22 | {
23 | var type = AccessTools.TypeByName("VanillaTemperatureExpanded.Buildings.Building_AcControlUnit");
24 | // Change temperature by +/- 1/10
25 | MP.RegisterSyncMethod(type, "InterfaceChangeTargetNetworkTemperature");
26 | // Reset temperature
27 | MP.RegisterSyncMethodLambda(type, nameof(Thing.GetGizmos), 2);
28 | }
29 | }
--------------------------------------------------------------------------------
/Source/Mods/Tacticowl.cs:
--------------------------------------------------------------------------------
1 | using Verse;
2 |
3 | namespace Multiplayer.Compat
4 | {
5 | /// Tacticowl by Roolo, Owlchemist
6 | ///
7 | ///
8 | // The workshop link will need updating once it goes out of beta, as it's going to get a new page while this one will be taken down
9 | [MpCompatFor("Owlchemist.Tacticowl")]
10 | public class Tacticowl
11 | {
12 | public Tacticowl(ModContentPack mod)
13 | {
14 | // May be worth keeping an eye on those patches while the mod is still in the beta, as stuff may break easily
15 | // Search and Destroy
16 | MpCompat.RegisterLambdaDelegate("Tacticowl.Patch_GetGizmos", "CreateGizmo_SearchAndDestroy_Melee", 1);
17 | MpCompat.RegisterLambdaDelegate("Tacticowl.Patch_GetGizmos", "CreateGizmo_SearchAndDestroy_Ranged", 1);
18 |
19 | // Run and Gun
20 | MpCompat.RegisterLambdaDelegate("Tacticowl.Patch_PawnGetGizmos", "Postfix", 1);
21 | PatchingUtilities.PatchSystemRand("Tacticowl.Patch_TryStartMentalState:Postfix", false);
22 | }
23 | }
24 | }
--------------------------------------------------------------------------------
/Source/Mods/AnimalLogic.cs:
--------------------------------------------------------------------------------
1 | using HarmonyLib;
2 | using RimWorld;
3 | using Verse;
4 |
5 | namespace Multiplayer.Compat
6 | {
7 | /// Animals logic by Oblitus
8 | ///
9 | ///
10 | /// Beds are already watched, they just lack ownership. Adding it in the button desyncs. This is a better place.
11 | [MpCompatFor("Oblitus.AnimalsLogic")]
12 | public class AnimalLogicCompat
13 | {
14 | public AnimalLogicCompat(ModContentPack mod)
15 | {
16 | MpCompat.harmony.Patch(
17 | AccessTools.Method(typeof(PawnComponentsUtility), nameof(PawnComponentsUtility.CreateInitialComponents)),
18 | postfix: new HarmonyMethod(typeof(AnimalLogicCompat), nameof(CreateInitialComponentsPostfix))
19 | );
20 | }
21 |
22 | static void CreateInitialComponentsPostfix(Pawn pawn)
23 | {
24 | if (pawn.RaceProps.Animal && pawn.ownership == null) {
25 | pawn.ownership = new Pawn_Ownership(pawn);
26 | }
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/Source/Mods/FertileFields.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using HarmonyLib;
3 | using Multiplayer.API;
4 | using Verse;
5 |
6 | namespace Multiplayer.Compat
7 | {
8 | /// Fertile Fields by Jamaican Castle
9 | ///
10 | [MpCompatFor("jamaicancastle.RF.fertilefields")]
11 | [MpCompatFor("greysuki.RF.fertilefields")]
12 | class FertileFieldsCompat
13 | {
14 | public FertileFieldsCompat(ModContentPack mod)
15 | {
16 | LongEventHandler.ExecuteWhenFinished(LatePatch);
17 |
18 | {
19 | // RNG
20 | PatchingUtilities.PatchSystemRand("RFF_Code.Building_CompostBin:PlaceProduct");
21 | }
22 |
23 | Type type = AccessTools.TypeByName("RFF_Code.GrowZoneManager");
24 |
25 | MP.RegisterSyncMethod(type, "ToggleReturnToSoil");
26 | MP.RegisterSyncMethod(type, "ToggleDesignateReplacements");
27 | }
28 |
29 | private static void LatePatch()
30 | {
31 | // Dev: set progress to 1
32 | MpCompat.RegisterLambdaMethod("RFF_Code.Building_CompostBarrel", nameof(Building.GetGizmos), 0).SetDebugOnly();
33 | }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/Source/Mods/Desynchronized.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Verse;
3 |
4 | namespace Multiplayer.Compat
5 | {
6 | /// Desynchronized by Vectorial1024s and emipa606
7 | ///
8 | ///
9 | /// contribution to Multiplayer Compatibility by Ari
10 | [MpCompatFor("Mlie.Desynchronized")]
11 | public class Desynchronized
12 | {
13 | public Desynchronized(ModContentPack mod)
14 | {
15 | var rngFixMethods = new[]
16 | {
17 | "Desynchronized.TNDBS.Pawn_NewsKnowledgeTracker:ForgetRandom",
18 | "Desynchronized.TNDBS.Pawn_NewsKnowledgeTracker:ForgetRandomly",
19 | "Desynchronized.TNDBS.Utilities.NewsSpreadUtility:SelectNewsRandomly",
20 | "Desynchronized.TNDBS.Utilities.NewsSpreadUtility:SelectNewsDistinctly",
21 | "Desynchronized.Patches.NewsTransmit.PostFix_InteractionWorker:ExecuteNewsTarnsmission",
22 | "Desynchronized.TNDBS.TaleNewsPawnDied:CalculateNewsImportanceForPawn",
23 | };
24 | PatchingUtilities.PatchPushPopRand(rngFixMethods);
25 | }
26 | }
27 | }
--------------------------------------------------------------------------------
/Source/Mods/VanillaIdeologyDryads.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using HarmonyLib;
7 | using Multiplayer.API;
8 | using Multiplayer.Compat;
9 | using Verse;
10 |
11 | namespace Multiplayer.Compat
12 | {
13 | /// Vanilla Ideology Expanded - Dryads by Oskar Potocki, Sarg Bjornson, Taranchuk, Reann Shepard
14 | ///
15 | ///
16 | [MpCompatFor("VanillaExpanded.Ideo.Dryads")]
17 | internal class VanillaIdeologyDryads
18 | {
19 | public VanillaIdeologyDryads(ModContentPack mod)
20 | {
21 | // RNG
22 | PatchingUtilities.PatchSystemRandCtor("VanillaIdeologyExpanded_Dryads.HediffComp_PeriodicWounds");
23 |
24 | // Gizmos
25 | MP.RegisterSyncMethod(AccessTools.TypeByName("VanillaIdeologyExpanded_Dryads.CompPawnMerge"), "SetDryadAwakenPod");
26 | MpCompat.RegisterLambdaMethod("VanillaIdeologyExpanded_Dryads.CompSpawnAwakened", "CompGetGizmosExtra", 0).SetDebugOnly();
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/Source/Mods/VanillaRacesPhytokin.cs:
--------------------------------------------------------------------------------
1 | using HarmonyLib;
2 | using Multiplayer.API;
3 | using Verse;
4 |
5 | namespace Multiplayer.Compat
6 | {
7 | ///
8 | /// Vanilla Races Expanded - Phytokin by Oskar Potocki, Sarg Bjornson, Allie, Erin, Sir Van, Reann Shepard
9 | ///
10 | ///
11 | ///
12 | [MpCompatFor("vanillaracesexpanded.phytokin")]
13 | public class VanillaRacesPhytokin
14 | {
15 | public VanillaRacesPhytokin(ModContentPack mod)
16 | {
17 | // Dev mode gizmos
18 | // Reset dryad counter (in case of counter breaking)
19 | MpCompat.RegisterLambdaDelegate("VanillaRacesExpandedPhytokin.CompDryadCounter", "CompGetGizmosExtra", 0).SetDebugOnly();
20 |
21 | var type = AccessTools.TypeByName("VanillaRacesExpandedPhytokin.CompVariablePollutionPump");
22 | // Force pump now
23 | MP.RegisterSyncMethod(type, "Pump").SetDebugOnly(); // Also called while ticking
24 | // Set next pump time
25 | MpCompat.RegisterLambdaDelegate(type, "CompGetGizmosExtra", 1).SetDebugOnly();
26 | }
27 | }
28 | }
--------------------------------------------------------------------------------
/Source/Mods/VanillaSocialInteractions.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using HarmonyLib;
3 | using Verse;
4 |
5 | namespace Multiplayer.Compat
6 | {
7 | /// Vanilla Social Interactions Expanded by Oskar Potocki, Taranchuk
8 | ///
9 | ///
10 | [MpCompatFor("VanillaExpanded.VanillaSocialInteractionsExpanded")]
11 | public class VanillaSocialInteractions
12 | {
13 | private static AccessTools.FieldRef averageOpinionCacheField;
14 |
15 | public VanillaSocialInteractions(ModContentPack mod)
16 | {
17 | // Clear cache
18 | var field = AccessTools.DeclaredField("VanillaSocialInteractionsExpanded.VSIE_Utils:averageOpinionOfCache");
19 | averageOpinionCacheField = AccessTools.StaticFieldRefAccess(field);
20 |
21 | MpCompat.harmony.Patch(AccessTools.DeclaredMethod(typeof(GameComponentUtility), nameof(GameComponentUtility.FinalizeInit)),
22 | postfix: new HarmonyMethod(typeof(VanillaSocialInteractions), nameof(ClearCache)));
23 | }
24 |
25 | private static void ClearCache() => averageOpinionCacheField().Clear();
26 | }
27 | }
--------------------------------------------------------------------------------
/Source/Mods/CleaningArea.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using HarmonyLib;
3 | using Multiplayer.API;
4 | using Verse;
5 |
6 | namespace Multiplayer.Compat
7 | {
8 | /// Cleaning Area by Hatti
9 | ///
10 | [MpCompatFor("hatti.cleaningarea")]
11 | [MpCompatFor("s1.cleaningareatemp")]
12 | public class CleaningArea
13 | {
14 | static Type CleaningAreaMapComponentType;
15 |
16 | public CleaningArea(ModContentPack mod)
17 | {
18 | Type type = CleaningAreaMapComponentType = AccessTools.TypeByName("CleaningArea.CleaningArea_MapComponent") ??
19 | AccessTools.TypeByName("CleaningAreaTemp.CleaningArea_MapComponent");
20 |
21 | MP.RegisterSyncMethod(AccessTools.PropertySetter(type, "cleaningArea"));
22 | MP.RegisterSyncWorker(SyncWorkerForCleaningArea, type);
23 | }
24 |
25 | static void SyncWorkerForCleaningArea(SyncWorker sw, ref MapComponent comp)
26 | {
27 | if (sw.isWriting) {
28 | sw.Write(comp.map);
29 | } else {
30 | comp = sw.Read