-
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathDummy.cs
More file actions
200 lines (155 loc) · 5.1 KB
/
Copy pathDummy.cs
File metadata and controls
200 lines (155 loc) · 5.1 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
using System;
using System.Collections.Generic;
using System.Reflection;
using RimWorld;
using Verse;
namespace Multiplayer.API;
/// <summary>
/// An exception that is thrown if you try to use the API without avaiable host.
/// </summary>
public class UninitializedAPI : Exception
{
}
class Dummy : IAPI
{
public bool IsHosting => false;
public bool IsInMultiplayer => false;
public string PlayerName => null;
public bool IsExecutingSyncCommand => false;
public bool IsExecutingSyncCommandIssuedBySelf => false;
public bool CanUseDevMode => false;
public bool InInterface => false;
public Faction RealPlayerFaction => null;
public void SetThingFilterContext(ThingFilterContext context)
{
throw new UninitializedAPI();
}
public void WatchBegin()
{
throw new UninitializedAPI();
}
public void Watch(Type targetType, string fieldName, object target = null, object index = null)
{
throw new UninitializedAPI();
}
public void Watch(object target, string fieldName, object index = null)
{
throw new UninitializedAPI();
}
public void Watch(string memberPath, object target = null, object index = null)
{
throw new UninitializedAPI();
}
public void WatchEnd()
{
throw new UninitializedAPI();
}
public void RegisterAll(Assembly assembly)
{
throw new UninitializedAPI();
}
public ISyncField RegisterSyncField(Type targetType, string memberPath)
{
throw new UninitializedAPI();
}
public ISyncField RegisterSyncField(FieldInfo field)
{
throw new UninitializedAPI();
}
public ISyncMethod RegisterSyncMethod(Type type, string methodOrPropertyName, SyncType[] argTypes = null)
{
throw new UninitializedAPI();
}
public ISyncMethod RegisterSyncMethod(MethodInfo method, SyncType[] argTypes)
{
throw new UninitializedAPI();
}
public ISyncMethod RegisterSyncMethodLambda(Type parentType, string parentMethod, int lambdaOrdinal, Type[] parentArgs = null, ParentMethodType parentParentMethodType = ParentMethodType.Normal)
{
throw new UninitializedAPI();
}
public ISyncMethod RegisterSyncMethodLambdaInGetter(Type parentType, string parentMethod, int lambdaOrdinal)
{
throw new UninitializedAPI();
}
public ISyncDelegate RegisterSyncDelegate(Type inType, string nestedType, string methodName, string[] fields, Type[] args = null)
{
throw new UninitializedAPI();
}
public ISyncDelegate RegisterSyncDelegate(Type type, string nestedType, string method)
{
throw new UninitializedAPI();
}
public ISyncDelegate RegisterSyncDelegateLambda(Type parentType, string parentMethod, int lambdaOrdinal, Type[] parentArgs = null, ParentMethodType parentParentMethodType = ParentMethodType.Normal)
{
throw new UninitializedAPI();
}
public ISyncDelegate RegisterSyncDelegateLambdaInGetter(Type parentType, string parentMethod, int lambdaOrdinal)
{
throw new UninitializedAPI();
}
public ISyncDelegate RegisterSyncDelegateLocalFunc(Type parentType, string parentMethod, string localFuncName, Type[] parentArgs = null)
{
throw new UninitializedAPI();
}
public void RegisterSyncWorker<T>(SyncWorkerDelegate<T> syncWorkerDelegate, Type targetType = null, bool isImplicit = false, bool shouldConstruct = false)
{
throw new UninitializedAPI();
}
public void RegisterDialogNodeTree(Type type, string methodOrPropertyName, SyncType[] argTypes = null)
{
throw new UninitializedAPI();
}
public void RegisterDialogNodeTree(MethodInfo method)
{
throw new UninitializedAPI();
}
public void RegisterPauseLock(PauseLockDelegate pauseLock)
{
throw new UninitializedAPI();
}
public void RegisterDefaultLetterChoice(MethodInfo method, Type letterType = null)
{
throw new UninitializedAPI();
}
public Thing GetThingById(int id)
{
throw new UninitializedAPI();
}
public bool TryGetThingById(int id, out Thing value)
{
throw new UninitializedAPI();
}
public IReadOnlyList<IPlayerInfo> GetPlayers()
{
throw new UninitializedAPI();
}
public IPlayerInfo GetPlayerById(int id)
{
throw new UninitializedAPI();
}
public ISessionManager GetGlobalSessionManager()
{
throw new UninitializedAPI();
}
public ISessionManager GetLocalSessionManager(Map map)
{
throw new UninitializedAPI();
}
public void SetCurrentSessionWithTransferables(ISessionWithTransferables session)
{
throw new UninitializedAPI();
}
public bool IsMultifaction => false;
public Faction SpectatorFaction => null;
public void PushFaction(Map map, Faction faction)
{
throw new UninitializedAPI();
}
public void PopFaction(Map map = null)
{
throw new UninitializedAPI();
}
public void RepeatForWorldFactions(Action action) { }
public void RepeatForMapFactions(Map map, Action action) { }
}