Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 74 additions & 0 deletions Source/Vehicles/.idea/.idea.Vehicles/.idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using System.Collections.Generic;
using System.Linq;
using JetBrains.Annotations;
using Multiplayer.API;
using RimWorld;
using RimWorld.Planet;
using SmashTools;
Expand Down Expand Up @@ -1075,16 +1076,23 @@ public bool IdeoAllowsBoarding(Pawn selPawn)

public void ChangeColor()
{
Dialog_VehiclePainter.OpenColorPicker(this, delegate(Color colorOne, Color colorTwo,
var godMode = DebugSettings.godMode;
Dialog_VehiclePainter.OpenColorPicker(this, delegate (Color colorOne, Color colorTwo,
Color colorThree,
PatternDef patternDef, Vector2 displacement, float tiles)
{
patternToPaint =
new PatternData(colorOne, colorTwo, colorThree, patternDef, displacement, tiles);
if (DebugSettings.godMode)

[SyncMethod] void SyncColor(VehiclePawn self, bool godMode, Color colorOne, Color colorTwo,
Color colorThree,
PatternDef patternDef, Vector2 displacement, float tiles)
{
SetColor();
self.patternToPaint =
new PatternData(colorOne, colorTwo, colorThree, patternDef, displacement, tiles);
if (godMode)
{
self.SetColor(); }
}
SyncColor(this, godMode, colorOne, colorTwo, colorThree, patternDef, displacement, tiles);
});
}

Expand Down
25 changes: 25 additions & 0 deletions Source/Vehicles/Multiplayer.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
using Multiplayer.API;
using Verse;
using System;

namespace VehicleFramework.MultiplayerCompatibility;


[StaticConstructorOnStartup]
public static class Multiplayer
{
static Multiplayer()
{
try
{

if (!MP.enabled) return;
MP.RegisterAll();

}
catch (Exception ex)
{
Log.Warning($"Failed to initialize Multiplayer support for Vehicle Framework in Multiplayer.cs: {ex.Message}");
}
}
}
2 changes: 2 additions & 0 deletions Source/Vehicles/Vehicles.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@

<PackageReference Include="PolySharp" Version="1.*" />

<PackageReference Include="RimWorld.MultiplayerAPI" Version="0.6.0" />

<!--Local -->
<Reference Include="SmashTools">
<SpecificVersion>False</SpecificVersion>
Expand Down