Updated seamless

This commit is contained in:
Garrett
2023-08-25 14:19:50 -05:00
parent 91f0e57d97
commit b470ca8a36
6 changed files with 60 additions and 26 deletions

View File

@@ -50,19 +50,10 @@ namespace SeamlessClient.Components
/* Static Contructors */
public static ConstructorInfo ClientConstructor { get; private set; }
public static ConstructorInfo SyncLayerConstructor { get; private set; }
public static ConstructorInfo TransportLayerConstructor { get; private set; }
public static ConstructorInfo MySessionConstructor { get; private set; }
public static ConstructorInfo MyMultiplayerClientBaseConstructor { get; private set; }
/* Static FieldInfos and PropertyInfos */
public static PropertyInfo MySessionLayer { get; private set; }
public static FieldInfo AdminSettings { get; private set; }
public static FieldInfo MPlayerGpsCollection { get; private set; }
/* Static MethodInfos */
public static MethodInfo LoadPlayerInternal { get; private set; }
@@ -78,24 +69,13 @@ namespace SeamlessClient.Components
public static MethodInfo UnloadProceduralWorldGenerator;
public override void Patch(Harmony patcher)
{
ClientConstructor = GetConstructor(ClientType, new[] { typeof(MyGameServerItem), SyncLayerType });
SyncLayerConstructor = GetConstructor(SyncLayerType, new[] { MyTransportLayerType });
TransportLayerConstructor = GetConstructor(MyTransportLayerType, new[] { typeof(int) });
MySessionConstructor = GetConstructor(MySessionType, new[] { typeof(MySyncLayer), typeof(bool) });
MyMultiplayerClientBaseConstructor = GetConstructor(MyMultiplayerClientBase, new[] { typeof(MySyncLayer) });
/* Get Fields and Properties */
MySessionLayer = GetProperty(typeof(MySession), "SyncLayer");
AdminSettings = GetField(typeof(MySession), "m_adminSettings");
MPlayerGpsCollection = GetField(typeof(MyPlayerCollection), "m_players");
/* Get Methods */