Skip to content
Snippets Groups Projects
Multiplayer.cs 1.03 KiB
Newer Older
using Multiplayer.API;
using Verse;
using Harmony;

namespace rjw
{
	[StaticConstructorOnStartup]
	public static class RJW_Multiplayer
	{
		static RJW_Multiplayer()
		{
			if (!MP.enabled) return;

			// This is where the magic happens and your attributes
			// auto register, similar to Harmony's PatchAll.
			MP.RegisterAll();

			var type = AccessTools.TypeByName("rjw.RJWdesignations");

			Log.Message("rjw MP compat " + type.Name);
			//MP.RegisterSyncMethod(type, "Comfort");
			/*
			MP.RegisterSyncMethod(type, "<GetGizmos>Service");
			MP.RegisterSyncMethod(type, "<GetGizmos>BreedingHuman");
			MP.RegisterSyncMethod(type, "<GetGizmos>BreedingAnimal");
			MP.RegisterSyncMethod(type, "<GetGizmos>Breeder");
			MP.RegisterSyncMethod(type, "<GetGizmos>Milking");
			MP.RegisterSyncMethod(type, "<GetGizmos>Hero");
			*/


			// You can choose to not auto register and do it manually
			// with the MP.Register* methods.

			// Use MP.IsInMultiplayer to act upon it in other places
			// user can have it enabled and not be in session
		}
	}
}