Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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
}
}
}