forked from rwmt/MultiplayerAPI
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIAPI.cs
More file actions
64 lines (48 loc) · 2.88 KB
/
Copy pathIAPI.cs
File metadata and controls
64 lines (48 loc) · 2.88 KB
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
using System;
using System.Collections.Generic;
using System.Reflection;
using RimWorld;
using Verse;
namespace Multiplayer.API;
public interface IAPI
{
bool IsHosting { get; }
bool IsInMultiplayer { get; }
string PlayerName { get; }
bool IsExecutingSyncCommand { get; }
bool IsExecutingSyncCommandIssuedBySelf { get; }
bool CanUseDevMode { get; }
bool InInterface { get; }
Faction RealPlayerFaction { get; }
void SetThingFilterContext(ThingFilterContext context);
void WatchBegin();
void Watch(Type targetType, string fieldName, object target = null, object index = null);
void Watch(object target, string fieldName, object index = null);
void Watch(string memberPath, object target = null, object index = null);
void WatchEnd();
void RegisterAll(Assembly assembly);
ISyncField RegisterSyncField(Type targetType, string memberPath);
ISyncField RegisterSyncField(FieldInfo field);
ISyncMethod RegisterSyncMethod(Type type, string methodOrPropertyName, SyncType[] argTypes = null);
ISyncMethod RegisterSyncMethod(MethodInfo method, SyncType[] argTypes);
ISyncMethod RegisterSyncMethodLambda(Type parentType, string parentMethod, int lambdaOrdinal, Type[] parentArgs = null, ParentMethodType parentParentMethodType = ParentMethodType.Normal);
ISyncMethod RegisterSyncMethodLambdaInGetter(Type parentType, string parentMethod, int lambdaOrdinal);
ISyncDelegate RegisterSyncDelegate(Type type, string nestedType, string method);
ISyncDelegate RegisterSyncDelegate(Type inType, string nestedType, string methodName, string[] fields, Type[] args = null);
ISyncDelegate RegisterSyncDelegateLambda(Type parentType, string parentMethod, int lambdaOrdinal, Type[] parentArgs = null, ParentMethodType parentParentMethodType = ParentMethodType.Normal);
ISyncDelegate RegisterSyncDelegateLambdaInGetter(Type parentType, string parentMethod, int lambdaOrdinal);
ISyncDelegate RegisterSyncDelegateLocalFunc(Type parentType, string parentMethod, string localFuncName, Type[] parentArgs = null);
void RegisterSyncWorker<T>(SyncWorkerDelegate<T> syncWorkerDelegate, Type targetType = null, bool isImplicit = false, bool shouldConstruct = false);
void RegisterDialogNodeTree(Type type, string methodOrPropertyName, SyncType[] argTypes = null);
void RegisterDialogNodeTree(MethodInfo method);
[Obsolete($"Use {nameof(Session)} instead.")]
void RegisterPauseLock(PauseLockDelegate pauseLock);
void RegisterDefaultLetterChoice(MethodInfo method, Type letterType = null);
Thing GetThingById(int id);
bool TryGetThingById(int id, out Thing value);
IReadOnlyList<IPlayerInfo> GetPlayers();
IPlayerInfo GetPlayerById(int id);
ISessionManager GetGlobalSessionManager();
ISessionManager GetLocalSessionManager(Map map);
void SetCurrentSessionWithTransferables(ISessionWithTransferables session);
}