Decompiled source of The Femmployee Mod v1.1.6
plugins/FemmployeeMod.dll
Decompiled a month ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using System.Text.RegularExpressions; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using FemmployeeMod; using FemmployeeMod.NetcodePatcher; using FemmployeeMod.UIScripts; using GameNetcodeStuff; using HarmonyLib; using LethalCompanyInputUtils.Api; using LethalLib.Modules; using Microsoft.CodeAnalysis; using ModelReplacement; using ModelReplacement.Monobehaviors; using Newtonsoft.Json; using TMPro; using Unity.Collections; using Unity.Netcode; using UnityEngine; using UnityEngine.InputSystem; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: IgnoresAccessChecksTo("AmazingAssets.TerrainToMesh")] [assembly: IgnoresAccessChecksTo("Assembly-CSharp-firstpass")] [assembly: IgnoresAccessChecksTo("Assembly-CSharp")] [assembly: IgnoresAccessChecksTo("ClientNetworkTransform")] [assembly: IgnoresAccessChecksTo("DissonanceVoip")] [assembly: IgnoresAccessChecksTo("Facepunch Transport for Netcode for GameObjects")] [assembly: IgnoresAccessChecksTo("Facepunch.Steamworks.Win64")] [assembly: IgnoresAccessChecksTo("ModelReplacementAPI")] [assembly: IgnoresAccessChecksTo("Unity.AI.Navigation")] [assembly: IgnoresAccessChecksTo("Unity.Animation.Rigging")] [assembly: IgnoresAccessChecksTo("Unity.Animation.Rigging.DocCodeExamples")] [assembly: IgnoresAccessChecksTo("Unity.Burst")] [assembly: IgnoresAccessChecksTo("Unity.Burst.Unsafe")] [assembly: IgnoresAccessChecksTo("Unity.Collections")] [assembly: IgnoresAccessChecksTo("Unity.Collections.LowLevel.ILSupport")] [assembly: IgnoresAccessChecksTo("Unity.InputSystem")] [assembly: IgnoresAccessChecksTo("Unity.InputSystem.ForUI")] [assembly: IgnoresAccessChecksTo("Unity.Jobs")] [assembly: IgnoresAccessChecksTo("Unity.Mathematics")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.Common")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.MetricTypes")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStats")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStatsMonitor.Component")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStatsMonitor.Configuration")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStatsMonitor.Implementation")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStatsReporting")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetworkProfiler.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetworkSolutionInterface")] [assembly: IgnoresAccessChecksTo("Unity.Netcode.Components")] [assembly: IgnoresAccessChecksTo("Unity.Netcode.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.Networking.Transport")] [assembly: IgnoresAccessChecksTo("Unity.ProBuilder.Csg")] [assembly: IgnoresAccessChecksTo("Unity.ProBuilder")] [assembly: IgnoresAccessChecksTo("Unity.ProBuilder.KdTree")] [assembly: IgnoresAccessChecksTo("Unity.ProBuilder.Poly2Tri")] [assembly: IgnoresAccessChecksTo("Unity.ProBuilder.Stl")] [assembly: IgnoresAccessChecksTo("Unity.Profiling.Core")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.Core.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.Core.ShaderLibrary")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.HighDefinition.Config.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.HighDefinition.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.ShaderGraph.ShaderGraphLibrary")] [assembly: IgnoresAccessChecksTo("Unity.Services.Authentication")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Analytics")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Configuration")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Device")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Environments")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Environments.Internal")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Internal")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Networking")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Registration")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Scheduler")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Telemetry")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Threading")] [assembly: IgnoresAccessChecksTo("Unity.Services.QoS")] [assembly: IgnoresAccessChecksTo("Unity.Services.Relay")] [assembly: IgnoresAccessChecksTo("Unity.TextMeshPro")] [assembly: IgnoresAccessChecksTo("Unity.Timeline")] [assembly: IgnoresAccessChecksTo("Unity.VisualEffectGraph.Runtime")] [assembly: IgnoresAccessChecksTo("UnityEngine.ARModule")] [assembly: IgnoresAccessChecksTo("UnityEngine.NVIDIAModule")] [assembly: IgnoresAccessChecksTo("UnityEngine.UI")] [assembly: AssemblyCompany("FemmployeeMod")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+55b9d28209570b910197477e6497d7e6537b4e26")] [assembly: AssemblyProduct("FemmployeeMod")] [assembly: AssemblyTitle("FemmployeeMod")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] [module: NetcodePatchedAssembly] internal class <Module> { static <Module>() { NetworkVariableSerializationTypes.InitializeSerializer_FixedString<FixedString64Bytes>(); NetworkVariableSerializationTypes.InitializeEqualityChecker_UnmanagedIEquatable<FixedString64Bytes>(); NetworkVariableSerializationTypes.InitializeSerializer_UnmanagedINetworkSerializable<BlendshapeValuePair>(); NetworkVariableSerializationTypes.InitializeEqualityChecker_UnmanagedIEquatable<BlendshapeValuePair>(); NetworkVariableSerializationTypes.InitializeSerializer_ManagedINetworkSerializable<NetworkMaterialProperties>(); NetworkVariableSerializationTypes.InitializeEqualityChecker_ManagedClassEquals<NetworkMaterialProperties>(); NetworkVariableSerializationTypes.InitializeSerializer_UnmanagedByMemcpy<bool>(); NetworkVariableSerializationTypes.InitializeEqualityChecker_UnmanagedIEquatable<bool>(); } } namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } [CreateAssetMenu(fileName = "FemmployeePart", menuName = "FemmployeeMod/FemmployeePart", order = 1)] public class FemmployeePart : ScriptableObject { public Mesh mesh; public Material[] materials; } [CreateAssetMenu(fileName = "FemmployeePartsInitializationList", menuName = "FemmployeeMod/FemmployeePartsInitializationList", order = 1)] public class FemmployeePartsInitializationList : ScriptableObject { public List<FemmployeePart[]> fullPartsList = new List<FemmployeePart[]>(); public FemmployeePart[] headParts; public FemmployeePart[] chestParts; public FemmployeePart[] armsParts; public FemmployeePart[] waistParts; public FemmployeePart[] legsParts; public void Awake() { fullPartsList.Add(headParts); fullPartsList.Add(chestParts); fullPartsList.Add(armsParts); fullPartsList.Add(waistParts); fullPartsList.Add(legsParts); } } [Serializable] public struct BlendshapeValuePair : INetworkSerializable, IEquatable<BlendshapeValuePair> { public float ShapeValue; public int ShapeID; public BlendshapeValuePair(float floatValue, int shapeID) { ShapeValue = floatValue; ShapeID = shapeID; } public unsafe void NetworkSerialize<T>(BufferSerializer<T> serializer) where T : IReaderWriter { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) ((BufferSerializer<float>*)(&serializer))->SerializeValue<float>(ref ShapeValue, default(ForPrimitives)); ((BufferSerializer<int>*)(&serializer))->SerializeValue<int>(ref ShapeID, default(ForPrimitives)); } public bool Equals(BlendshapeValuePair other) { return ShapeValue.Equals(other.ShapeValue) && ShapeID.Equals(other.ShapeID); } public override bool Equals(object obj) { if (obj is BlendshapeValuePair) { return Equals((BlendshapeValuePair)obj); } return false; } public override int GetHashCode() { int num = 17; num = num * 23 + ShapeValue.GetHashCode(); return num * 23 + ShapeID.GetHashCode(); } public static bool operator ==(BlendshapeValuePair left, BlendshapeValuePair right) { return left.Equals(right); } public static bool operator !=(BlendshapeValuePair left, BlendshapeValuePair right) { return !(left == right); } } namespace FemmployeeMod { public class FemmployeeSettings : MonoBehaviour { public PlayerControllerB controller; public GameObject replacementModel; public FemmployeePart[] previewBodyParts; public SkinnedMeshRenderer[] bodyRegionMeshRenderers; public NetworkedSettings networkedSettings; public List<Dictionary<string, FemmployeePart>> partsList = new List<Dictionary<string, FemmployeePart>>(); public Dictionary<string, FemmployeePart> headPartsCollection = new Dictionary<string, FemmployeePart>(); public Dictionary<string, FemmployeePart> chestPartsCollection = new Dictionary<string, FemmployeePart>(); public Dictionary<string, FemmployeePart> armsPartsCollection = new Dictionary<string, FemmployeePart>(); public Dictionary<string, FemmployeePart> waistPartsCollection = new Dictionary<string, FemmployeePart>(); public Dictionary<string, FemmployeePart> legsPartsCollection = new Dictionary<string, FemmployeePart>(); public string suitName { get; set; } = ""; } public class FemmployeeSuitPreview : MonoBehaviour { public Camera modelViewCamera; public GameObject previewModel; public FemmployeeSettings settings; public Slider previewSpinSlider; public void Update() { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) float value = previewSpinSlider.value; Quaternion rotation = Quaternion.Euler(0f, value, 0f); previewModel.transform.rotation = rotation; } public void LoadSaveData(Femmployee playerFemmployee) { //IL_03b7: Unknown result type (might be due to invalid IL or missing references) //IL_046c: Unknown result type (might be due to invalid IL or missing references) settings.bodyRegionMeshRenderers[0].sharedMesh = playerFemmployee.settings.partsList[0][playerFemmployee.settings.networkedSettings.headSync].mesh; ((Renderer)settings.bodyRegionMeshRenderers[0]).materials = playerFemmployee.settings.partsList[0][playerFemmployee.settings.networkedSettings.headSync].materials; settings.bodyRegionMeshRenderers[1].sharedMesh = playerFemmployee.settings.partsList[1][playerFemmployee.settings.networkedSettings.chestSync].mesh; ((Renderer)settings.bodyRegionMeshRenderers[1]).materials = playerFemmployee.settings.partsList[1][playerFemmployee.settings.networkedSettings.chestSync].materials; settings.bodyRegionMeshRenderers[2].sharedMesh = playerFemmployee.settings.partsList[2][playerFemmployee.settings.networkedSettings.armsSync].mesh; ((Renderer)settings.bodyRegionMeshRenderers[2]).materials = playerFemmployee.settings.partsList[2][playerFemmployee.settings.networkedSettings.armsSync].materials; settings.bodyRegionMeshRenderers[3].sharedMesh = playerFemmployee.settings.partsList[3][playerFemmployee.settings.networkedSettings.waistSync].mesh; ((Renderer)settings.bodyRegionMeshRenderers[3]).materials = playerFemmployee.settings.partsList[3][playerFemmployee.settings.networkedSettings.waistSync].materials; settings.bodyRegionMeshRenderers[4].sharedMesh = playerFemmployee.settings.partsList[4][playerFemmployee.settings.networkedSettings.legSync].mesh; ((Renderer)settings.bodyRegionMeshRenderers[4]).materials = playerFemmployee.settings.partsList[4][playerFemmployee.settings.networkedSettings.legSync].materials; NetworkList<BlendshapeValuePair>[] array = new NetworkList<BlendshapeValuePair>[5] { playerFemmployee.settings.networkedSettings.headBlendshapeValues, playerFemmployee.settings.networkedSettings.chestBlendshapeValues, playerFemmployee.settings.networkedSettings.armsBlendshapeValues, playerFemmployee.settings.networkedSettings.waistBlendshapeValues, playerFemmployee.settings.networkedSettings.legsBlendshapeValues }; for (int i = 0; i < 5; i++) { SkinnedMeshRenderer component = ((Component)settings.bodyRegionMeshRenderers[i]).GetComponent<SkinnedMeshRenderer>(); if ((Object)(object)component != (Object)null && component.sharedMesh.blendShapeCount > 0) { for (int j = 0; j < array[i].Count; j++) { component.SetBlendShapeWeight(i, array[i][j].ShapeValue); } } } SkinnedMeshRenderer[] bodyRegionMeshRenderers = settings.bodyRegionMeshRenderers; foreach (SkinnedMeshRenderer val in bodyRegionMeshRenderers) { Material[] materials = ((Renderer)val).materials; foreach (Material val2 in materials) { if (((Object)val2).name == "Suit (Instance)") { val2.color = playerFemmployee.settings.networkedSettings.suitMaterialValues.Value.colorValue; val2.SetFloat("_Metallic", playerFemmployee.settings.networkedSettings.suitMaterialValues.Value.metallicValue); val2.SetFloat("_Smoothness", playerFemmployee.settings.networkedSettings.suitMaterialValues.Value.smoothnessValue); } } Material[] materials2 = ((Renderer)val).materials; foreach (Material val3 in materials2) { if (((Object)val3).name == "Skin (Instance)") { val3.color = playerFemmployee.settings.networkedSettings.skinMaterialValues.Value.colorValue; val3.SetFloat("_Metallic", playerFemmployee.settings.networkedSettings.skinMaterialValues.Value.metallicValue); val3.SetFloat("_Smoothness", playerFemmployee.settings.networkedSettings.skinMaterialValues.Value.smoothnessValue); } } } } public void SetPreviewRegion(int dropdownID, string selectionKeyName, Femmployee playerFemmployee) { //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Unknown result type (might be due to invalid IL or missing references) playerFemmployee.settings.previewBodyParts[dropdownID] = settings.partsList[dropdownID][selectionKeyName]; settings.bodyRegionMeshRenderers[dropdownID].sharedMesh = playerFemmployee.settings.previewBodyParts[dropdownID].mesh; ((Renderer)settings.bodyRegionMeshRenderers[dropdownID]).materials = playerFemmployee.settings.previewBodyParts[dropdownID].materials; if (Tools.CheckIsServer()) { switch (dropdownID) { case 0: playerFemmployee.settings.networkedSettings.headSync = selectionKeyName; break; case 1: playerFemmployee.settings.networkedSettings.chestSync = selectionKeyName; break; case 2: playerFemmployee.settings.networkedSettings.armsSync = selectionKeyName; break; case 3: playerFemmployee.settings.networkedSettings.waistSync = selectionKeyName; break; case 4: playerFemmployee.settings.networkedSettings.legSync = selectionKeyName; break; default: FemmployeeModBase.mls.LogWarning((object)"Invalid dropdown ID"); return; } } else { playerFemmployee.settings.networkedSettings.SetNetworkVarServerRpc(dropdownID, selectionKeyName); } SetMaterialSettings(playerFemmployee.settings.networkedSettings.suitMaterialValues.Value.colorValue, playerFemmployee.settings.networkedSettings.suitMaterialValues.Value.metallicValue, playerFemmployee.settings.networkedSettings.suitMaterialValues.Value.smoothnessValue, playerFemmployee.settings.networkedSettings.skinMaterialValues.Value.colorValue, playerFemmployee.settings.networkedSettings.skinMaterialValues.Value.metallicValue, playerFemmployee.settings.networkedSettings.skinMaterialValues.Value.smoothnessValue, playerFemmployee); } public void SetPreviewBlendshape(int id, float value, BlendshapeData[] blendshapes, Femmployee playerFemmployee) { for (int i = 0; i < blendshapes.Length; i++) { BlendshapeData blendshapeData = blendshapes[i]; int originalRegionID = blendshapeData.OriginalRegionID; int blendShapeIndex = settings.bodyRegionMeshRenderers[originalRegionID].sharedMesh.GetBlendShapeIndex(blendshapeData.BlendshapeName); if (blendShapeIndex != -1) { settings.bodyRegionMeshRenderers[originalRegionID].SetBlendShapeWeight(blendShapeIndex, value); playerFemmployee.settings.networkedSettings.SetBlendshapeValue(value, blendshapes); } } } public void SetMaterialSettings(Color suitColorValue, float suitMetallicValue, float suitSmoothnessValue, Color skinColorValue, float skinMetallicValue, float skinSmoothnessValue, Femmployee playerFemmployee) { //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) SkinnedMeshRenderer[] bodyRegionMeshRenderers = settings.bodyRegionMeshRenderers; foreach (SkinnedMeshRenderer val in bodyRegionMeshRenderers) { Material[] materials = ((Renderer)val).materials; foreach (Material val2 in materials) { if (((Object)val2).name == "Suit (Instance)") { val2.color = suitColorValue; val2.SetFloat("_Metallic", suitMetallicValue); val2.SetFloat("_Smoothness", suitSmoothnessValue); } if (((Object)val2).name == "Skin (Instance)") { val2.color = skinColorValue; val2.SetFloat("_Metallic", skinMetallicValue); val2.SetFloat("_Smoothness", skinSmoothnessValue); } } } if (Tools.CheckIsServer()) { playerFemmployee.settings.networkedSettings.SetMaterialData(suitColorValue, suitMetallicValue, suitSmoothnessValue, skinColorValue, skinMetallicValue, skinSmoothnessValue); } else { playerFemmployee.settings.networkedSettings.SetMaterialDataServerRpc(suitColorValue, suitMetallicValue, suitSmoothnessValue, skinColorValue, skinMetallicValue, skinSmoothnessValue); } } } public struct BlendshapeData { public int OriginalRegionID; public int ControllingRegionID; public string BlendshapeName; } public class FemmployeeViewmodel : MonoBehaviour { public FemmployeeSettings settings; public void Start() { settings = ((Component)this).gameObject.GetComponent<FemmployeeSettings>(); } } public class NetworkedSettings : NetworkBehaviour { public FemmployeeSettings settings; private NetworkVariable<FixedString64Bytes> _headSync = new NetworkVariable<FixedString64Bytes>(default(FixedString64Bytes), (NetworkVariableReadPermission)0, (NetworkVariableWritePermission)0) { Value = FixedString64Bytes.op_Implicit("") }; private NetworkVariable<FixedString64Bytes> _chestSync = new NetworkVariable<FixedString64Bytes>(default(FixedString64Bytes), (NetworkVariableReadPermission)0, (NetworkVariableWritePermission)0) { Value = FixedString64Bytes.op_Implicit("") }; private NetworkVariable<FixedString64Bytes> _armsSync = new NetworkVariable<FixedString64Bytes>(default(FixedString64Bytes), (NetworkVariableReadPermission)0, (NetworkVariableWritePermission)0) { Value = FixedString64Bytes.op_Implicit("") }; private NetworkVariable<FixedString64Bytes> _waistSync = new NetworkVariable<FixedString64Bytes>(default(FixedString64Bytes), (NetworkVariableReadPermission)0, (NetworkVariableWritePermission)0) { Value = FixedString64Bytes.op_Implicit("") }; private NetworkVariable<FixedString64Bytes> _legSync = new NetworkVariable<FixedString64Bytes>(default(FixedString64Bytes), (NetworkVariableReadPermission)0, (NetworkVariableWritePermission)0) { Value = FixedString64Bytes.op_Implicit("") }; public NetworkList<BlendshapeValuePair> headBlendshapeValues = new NetworkList<BlendshapeValuePair>(); public NetworkList<BlendshapeValuePair> chestBlendshapeValues = new NetworkList<BlendshapeValuePair>(); public NetworkList<BlendshapeValuePair> armsBlendshapeValues = new NetworkList<BlendshapeValuePair>(); public NetworkList<BlendshapeValuePair> waistBlendshapeValues = new NetworkList<BlendshapeValuePair>(); public NetworkList<BlendshapeValuePair> legsBlendshapeValues = new NetworkList<BlendshapeValuePair>(); public NetworkVariable<NetworkMaterialProperties> suitMaterialValues = new NetworkVariable<NetworkMaterialProperties>((NetworkMaterialProperties)null, (NetworkVariableReadPermission)0, (NetworkVariableWritePermission)0); public NetworkVariable<NetworkMaterialProperties> skinMaterialValues = new NetworkVariable<NetworkMaterialProperties>((NetworkMaterialProperties)null, (NetworkVariableReadPermission)0, (NetworkVariableWritePermission)0); public NetworkVariable<int> playerID; public NetworkVariable<bool> hasInitialized; public FemmployeeConfigUI localUI; public string headSync { get { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) FixedString64Bytes value = _headSync.Value; return ((FixedString64Bytes)(ref value)).Value; } internal set { //IL_0008: Unknown result type (might be due to invalid IL or missing references) _headSync.Value = new FixedString64Bytes(value); } } public string chestSync { get { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) FixedString64Bytes value = _chestSync.Value; return ((FixedString64Bytes)(ref value)).Value; } internal set { //IL_0008: Unknown result type (might be due to invalid IL or missing references) _chestSync.Value = new FixedString64Bytes(value); } } public string armsSync { get { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) FixedString64Bytes value = _armsSync.Value; return ((FixedString64Bytes)(ref value)).Value; } internal set { //IL_0008: Unknown result type (might be due to invalid IL or missing references) _armsSync.Value = new FixedString64Bytes(value); } } public string waistSync { get { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) FixedString64Bytes value = _waistSync.Value; return ((FixedString64Bytes)(ref value)).Value; } internal set { //IL_0008: Unknown result type (might be due to invalid IL or missing references) _waistSync.Value = new FixedString64Bytes(value); } } public string legSync { get { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) FixedString64Bytes value = _legSync.Value; return ((FixedString64Bytes)(ref value)).Value; } internal set { //IL_0008: Unknown result type (might be due to invalid IL or missing references) _legSync.Value = new FixedString64Bytes(value); } } public override void OnNetworkSpawn() { //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) ((NetworkBehaviour)this).OnNetworkSpawn(); if (Tools.CheckIsServer()) { playerID.Value = -1; NetworkMaterialProperties networkMaterialProperties = new NetworkMaterialProperties(); networkMaterialProperties.colorValue = FemmployeeConfigUI.instance.suitMaterialSettings.defaultColorValue; networkMaterialProperties.metallicValue = FemmployeeConfigUI.instance.suitMaterialSettings.defaultMetallicValue; networkMaterialProperties.smoothnessValue = FemmployeeConfigUI.instance.suitMaterialSettings.defaultSmoothnessValue; suitMaterialValues.Value = networkMaterialProperties; NetworkMaterialProperties networkMaterialProperties2 = new NetworkMaterialProperties(); networkMaterialProperties2.colorValue = FemmployeeConfigUI.instance.skinMaterialSettings.defaultColorValue; networkMaterialProperties2.metallicValue = FemmployeeConfigUI.instance.skinMaterialSettings.defaultMetallicValue; networkMaterialProperties2.smoothnessValue = FemmployeeConfigUI.instance.skinMaterialSettings.defaultSmoothnessValue; skinMaterialValues.Value = networkMaterialProperties2; } ((MonoBehaviour)this).StartCoroutine(waitForIDSync()); } public IEnumerator waitForIDSync() { yield return (object)new WaitUntil((Func<bool>)(() => playerID.Value != -1)); ((MonoBehaviour)this).StartCoroutine(WaitForFemmployeeComponent(playerID.Value)); } [ClientRpc] public void AssignValuesClientRpc(int _playerID) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1272767705u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, _playerID); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1272767705u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { ((MonoBehaviour)this).StartCoroutine(WaitForFemmployeeComponent(_playerID)); } } } private IEnumerator WaitForFemmployeeComponent(int _playerID) { yield return (object)new WaitUntil((Func<bool>)(() => (Object)(object)((Component)StartOfRound.Instance.allPlayerScripts[_playerID]).GetComponent<Femmployee>() != (Object)null)); AssignValuesToComponents(_playerID); } public void AssignValuesToComponents(int _playerID) { settings = ((Component)StartOfRound.Instance.allPlayerScripts[_playerID]).GetComponent<Femmployee>().settings; settings.networkedSettings = this; ((Object)this).name = ((Object)this).name + " || Player: " + _playerID; localUI = ((Component)StartOfRound.Instance.allPlayerScripts[playerID.Value]).GetComponent<Femmployee>().localModdedUI; if (Tools.CheckIsServer()) { headSync = ((Object)settings.bodyRegionMeshRenderers[0].sharedMesh).name; chestSync = ((Object)settings.bodyRegionMeshRenderers[1].sharedMesh).name; armsSync = ((Object)settings.bodyRegionMeshRenderers[2].sharedMesh).name; waistSync = ((Object)settings.bodyRegionMeshRenderers[3].sharedMesh).name; legSync = ((Object)settings.bodyRegionMeshRenderers[4].sharedMesh).name; hasInitialized.Value = true; } if ((Object)(object)settings.controller == (Object)(object)GameNetworkManager.Instance.localPlayerController && File.Exists(FemmployeeModBase.saveFilePath)) { LoadSuitData(SuitDataParser(File.ReadAllText(FemmployeeModBase.saveFilePath))); } else { FemmployeeModBase.mls.LogWarning((object)"Suit data file not found! A new file will be generated next time you apply suit settings."); } ((MonoBehaviour)this).StartCoroutine(waitToAssign()); } public IEnumerator waitToAssign() { yield return (object)new WaitForSeconds(0.5f); ApplySettings(); } [ServerRpc(RequireOwnership = false)] public void SetNetworkVarServerRpc(int id, string value) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(1759863977u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, id); bool flag = value != null; ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val2)).WriteValueSafe(value, false); } ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1759863977u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { switch (id) { case 0: headSync = value; break; case 1: chestSync = value; break; case 2: armsSync = value; break; case 3: waistSync = value; break; case 4: legSync = value; break; default: FemmployeeModBase.mls.LogWarning((object)"Invalid dropdown ID"); break; } } } public void ApplySettings() { if (((NetworkBehaviour)this).IsServer) { ApplySettingsClientRpc(); } else { ApplySettingsServerRpc(); } } [ServerRpc(RequireOwnership = false)] public void ApplySettingsServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2348116511u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2348116511u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ApplySettingsClientRpc(); } } } [ClientRpc] public void ApplySettingsClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2903334129u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2903334129u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { ((Component)StartOfRound.Instance.allPlayerScripts[playerID.Value]).GetComponent<Femmployee>().ApplySwapRegions(); } } } public void SetBlendshapeValue(float value, BlendshapeData[] blendshapes) { List<BlendshapeValuePair> list = new List<BlendshapeValuePair>(); List<BlendshapeValuePair> list2 = new List<BlendshapeValuePair>(); List<BlendshapeValuePair> list3 = new List<BlendshapeValuePair>(); List<BlendshapeValuePair> list4 = new List<BlendshapeValuePair>(); List<BlendshapeValuePair> list5 = new List<BlendshapeValuePair>(); for (int i = 0; i < blendshapes.Length; i++) { BlendshapeData blendshapeData = blendshapes[i]; int originalRegionID = blendshapeData.OriginalRegionID; int blendShapeIndex = settings.bodyRegionMeshRenderers[originalRegionID].sharedMesh.GetBlendShapeIndex(blendshapeData.BlendshapeName); if (blendShapeIndex == -1) { continue; } BlendshapeValuePair item = new BlendshapeValuePair(value, blendShapeIndex); switch (originalRegionID) { case 0: list.Add(item); break; case 1: list2.Add(item); break; case 2: list3.Add(item); break; case 3: list4.Add(item); break; case 4: list5.Add(item); break; default: FemmployeeModBase.mls.LogWarning((object)"Invalid region ID"); break; } if (Tools.CheckIsServer()) { switch (originalRegionID) { case 0: AddValuesToList(headBlendshapeValues, list); break; case 1: AddValuesToList(chestBlendshapeValues, list2); break; case 2: AddValuesToList(armsBlendshapeValues, list3); break; case 3: AddValuesToList(waistBlendshapeValues, list4); break; case 4: AddValuesToList(legsBlendshapeValues, list5); break; } } else { if (1 == 0) { } List<BlendshapeValuePair> blendshapeList = originalRegionID switch { 0 => list, 1 => list2, 2 => list3, 3 => list4, 4 => list5, _ => new List<BlendshapeValuePair>(), }; if (1 == 0) { } var (shapeValues, shapeIDs) = ConvertBlendshapeListToArrays(blendshapeList); SetBlendshapeNetworkVarServerRpc(originalRegionID, shapeValues, shapeIDs); } } static void AddValuesToList(NetworkList<BlendshapeValuePair> settingsList, List<BlendshapeValuePair> blendshapeValues) { foreach (BlendshapeValuePair blendshapeValue in blendshapeValues) { bool flag = false; for (int j = 0; j < settingsList.Count; j++) { if (settingsList[j].ShapeID == blendshapeValue.ShapeID) { settingsList[j] = blendshapeValue; flag = true; break; } } if (!flag) { settingsList.Add(blendshapeValue); } } } } private (float[] shapeValues, int[] shapeIDs) ConvertBlendshapeListToArrays(List<BlendshapeValuePair> blendshapeList) { int count = blendshapeList.Count; float[] array = new float[count]; int[] array2 = new int[count]; for (int i = 0; i < count; i++) { array[i] = blendshapeList[i].ShapeValue; array2[i] = blendshapeList[i].ShapeID; } return (array, array2); } [ServerRpc(RequireOwnership = false)] public void SetBlendshapeNetworkVarServerRpc(int id, float[] shapeValues, int[] shapeIDs) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(1024183679u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, id); bool flag = shapeValues != null; ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val2)).WriteValueSafe<float>(shapeValues, default(ForPrimitives)); } bool flag2 = shapeIDs != null; ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag2, default(ForPrimitives)); if (flag2) { ((FastBufferWriter)(ref val2)).WriteValueSafe<int>(shapeIDs, default(ForPrimitives)); } ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1024183679u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { switch (id) { case 0: AddValuesToList(headBlendshapeValues, shapeValues, shapeIDs); break; case 1: AddValuesToList(chestBlendshapeValues, shapeValues, shapeIDs); break; case 2: AddValuesToList(armsBlendshapeValues, shapeValues, shapeIDs); break; case 3: AddValuesToList(waistBlendshapeValues, shapeValues, shapeIDs); break; case 4: AddValuesToList(legsBlendshapeValues, shapeValues, shapeIDs); break; } } static void AddValuesToList(NetworkList<BlendshapeValuePair> list, float[] values, int[] ids) { for (int i = 0; i < values.Length; i++) { bool flag3 = false; for (int j = 0; j < list.Count; j++) { if (list[j].ShapeID == ids[i]) { list[j] = new BlendshapeValuePair(values[i], ids[i]); flag3 = true; break; } } if (!flag3) { list.Add(new BlendshapeValuePair(values[i], ids[i])); } } } } [ServerRpc(RequireOwnership = false)] public void ResetBlendshapeNetworkVarServerRPC(int TargetList) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(939713145u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, TargetList); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 939713145u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ResetBlendshapeNetworkVar(TargetList); } } } public void ResetBlendshapeNetworkVar(int targetList) { if ((Object)(object)settings?.networkedSettings == (Object)null) { Debug.LogError((object)"Settings or networkedSettings are null"); return; } List<NetworkList<BlendshapeValuePair>> list = new List<NetworkList<BlendshapeValuePair>> { settings.networkedSettings.headBlendshapeValues, settings.networkedSettings.chestBlendshapeValues, settings.networkedSettings.armsBlendshapeValues, settings.networkedSettings.waistBlendshapeValues, settings.networkedSettings.legsBlendshapeValues }; if (targetList < 0 || targetList >= list.Count) { Debug.LogError((object)$"Invalid targetList index: {targetList}"); } else { list[targetList].Clear(); } } [ServerRpc(RequireOwnership = false)] public void SetMaterialDataServerRpc(Color suitColorValue, float suitMetallicValue, float suitSmoothnessValue, Color skinColorValue, float skinMetallicValue, float skinSmoothnessValue) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(1865529678u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref suitColorValue); ((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref suitMetallicValue, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref suitSmoothnessValue, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref skinColorValue); ((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref skinMetallicValue, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref skinSmoothnessValue, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1865529678u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { SetMaterialData(suitColorValue, skinMetallicValue, suitSmoothnessValue, skinColorValue, skinMetallicValue, skinSmoothnessValue); } } } public void SetMaterialData(Color suitColorValue, float suitMetallicValue, float suitSmoothnessValue, Color skinColorValue, float skinMetallicValue, float skinSmoothnessValue) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) NetworkMaterialProperties value = new NetworkMaterialProperties { colorValue = skinColorValue, metallicValue = skinMetallicValue, smoothnessValue = skinSmoothnessValue }; NetworkMaterialProperties value2 = new NetworkMaterialProperties { colorValue = suitColorValue, metallicValue = suitMetallicValue, smoothnessValue = suitSmoothnessValue }; suitMaterialValues.Value = value2; skinMaterialValues.Value = value; } public void SaveSuitData() { List<BlendshapeSlider>[] array = new List<BlendshapeSlider>[5]; for (int i = 0; i < 5; i++) { array[i] = new List<BlendshapeSlider>(); foreach (BlendshapeSlider item in localUI.AllSliders[i]) { if (item.objectID == i) { array[i].Add(item); } } } Femmployee.FemmployeeSaveData femmployeeSaveData = new Femmployee.FemmployeeSaveData { PartsList = new Femmployee.PartsList { HeadSync = headSync, ChestSync = chestSync, ArmsSync = armsSync, WaistSync = waistSync, LegSync = legSync }, SliderValues = { { "Head Sliders", Tools.RetriveSliderData(array[0]) }, { "Chest Sliders", Tools.RetriveSliderData(array[1]) }, { "Arms Sliders", Tools.RetriveSliderData(array[2]) }, { "Waist Sliders", Tools.RetriveSliderData(array[3]) }, { "Legs Sliders", Tools.RetriveSliderData(array[4]) } }, MultiplierValue = localUI.sliderMultiplier, Multiplier = localUI.isMultiplierEnabled, suitMaterialData = new Femmployee.MaterialData { colorValueR = suitMaterialValues.Value.colorValue.r, colorValueG = suitMaterialValues.Value.colorValue.g, colorValueB = suitMaterialValues.Value.colorValue.b, metallicValue = suitMaterialValues.Value.metallicValue, smoothnessValue = suitMaterialValues.Value.smoothnessValue }, skinMaterialData = new Femmployee.MaterialData { colorValueR = skinMaterialValues.Value.colorValue.r, colorValueG = skinMaterialValues.Value.colorValue.g, colorValueB = skinMaterialValues.Value.colorValue.b, metallicValue = skinMaterialValues.Value.metallicValue, smoothnessValue = skinMaterialValues.Value.smoothnessValue } }; string contents = JsonConvert.SerializeObject((object)femmployeeSaveData, (Formatting)(FemmployeeModBase.useSaveFileFormatting.Value ? 1 : 0)); File.WriteAllText(FemmployeeModBase.saveFilePath, contents); } public Femmployee.FemmployeeSaveData SuitDataParser(string _suitData) { Femmployee.FemmployeeSaveData femmployeeSaveData = JsonConvert.DeserializeObject<Femmployee.FemmployeeSaveData>(_suitData); int num = (localUI.isMultiplierEnabled ? (localUI.sliderMultiplier * 100) : 100); Femmployee.FemmployeeSaveData femmployeeSaveData2 = femmployeeSaveData; foreach (KeyValuePair<string, Dictionary<string, float>> sliderValue in femmployeeSaveData2.SliderValues) { foreach (KeyValuePair<string, float> item in sliderValue.Value) { Mathf.Clamp(item.Value, 0f, (float)num); } } return femmployeeSaveData2; } public void LoadSuitData(Femmployee.FemmployeeSaveData suitData) { //IL_03bb: Unknown result type (might be due to invalid IL or missing references) //IL_03f7: Unknown result type (might be due to invalid IL or missing references) //IL_03f9: Unknown result type (might be due to invalid IL or missing references) //IL_03fd: Unknown result type (might be due to invalid IL or missing references) //IL_0439: Unknown result type (might be due to invalid IL or missing references) //IL_043b: Unknown result type (might be due to invalid IL or missing references) //IL_043e: Unknown result type (might be due to invalid IL or missing references) //IL_0456: Unknown result type (might be due to invalid IL or missing references) string[] array = new string[5] { "HeadSync", "ChestSync", "ArmsSync", "WaistSync", "LegSync" }; if ((Object)(object)settings.controller == (Object)(object)GameNetworkManager.Instance.localPlayerController) { for (int i = 0; i < array.Length; i++) { string partSync = (string)suitData.PartsList.GetType().GetProperty(array[i]).GetValue(suitData.PartsList); localUI.regionDropdowns[i].value = localUI.regionDropdowns[i].options.FindIndex((OptionData option) => option.text == partSync); } localUI.isMultiplierEnabled = suitData.Multiplier; localUI.sliderMultiplier = suitData.MultiplierValue; localUI.multiplierDropdown.value = suitData.MultiplierValue - 1; localUI.multiplierToggle.isOn = suitData.Multiplier; localUI.suitMaterialSettings.RGBSliders[0].value = suitData.suitMaterialData.colorValueR; localUI.suitMaterialSettings.RGBSliders[1].value = suitData.suitMaterialData.colorValueG; localUI.suitMaterialSettings.RGBSliders[2].value = suitData.suitMaterialData.colorValueB; localUI.suitMaterialSettings.metallicSlider.value = suitData.suitMaterialData.metallicValue; localUI.suitMaterialSettings.smoothnessSlider.value = suitData.suitMaterialData.smoothnessValue; localUI.skinMaterialSettings.RGBSliders[0].value = suitData.skinMaterialData.colorValueR; localUI.skinMaterialSettings.RGBSliders[1].value = suitData.skinMaterialData.colorValueG; localUI.skinMaterialSettings.RGBSliders[2].value = suitData.skinMaterialData.colorValueB; localUI.skinMaterialSettings.metallicSlider.value = suitData.skinMaterialData.metallicValue; localUI.skinMaterialSettings.smoothnessSlider.value = suitData.skinMaterialData.smoothnessValue; for (int j = 0; j < 5; j++) { string key = array[j].Replace("Sync", "") + " Sliders"; foreach (BlendshapeSlider item in localUI.AllSliders[j]) { if (item.objectID == j) { item.shapeSlider.maxValue = item.DefaultSliderMax * (float)suitData.MultiplierValue; item.shapeSlider.value = suitData.SliderValues[key][item.blendshapes[0].BlendshapeName]; } } } } if (Tools.CheckIsServer()) { headSync = suitData.PartsList.HeadSync; chestSync = suitData.PartsList.ChestSync; armsSync = suitData.PartsList.ArmsSync; waistSync = suitData.PartsList.WaistSync; legSync = suitData.PartsList.LegSync; Color val = default(Color); val.r = suitData.suitMaterialData.colorValueR; val.g = suitData.suitMaterialData.colorValueG; val.b = suitData.suitMaterialData.colorValueB; Color suitColorValue = val; val = default(Color); val.r = suitData.skinMaterialData.colorValueR; val.g = suitData.skinMaterialData.colorValueG; val.b = suitData.skinMaterialData.colorValueB; Color skinColorValue = val; SetMaterialData(suitColorValue, suitData.suitMaterialData.metallicValue, suitData.suitMaterialData.smoothnessValue, skinColorValue, suitData.skinMaterialData.metallicValue, suitData.skinMaterialData.smoothnessValue); } else { string suitDataString = JsonConvert.SerializeObject((object)suitData, (Formatting)(FemmployeeModBase.useSaveFileFormatting.Value ? 1 : 0)); LoadSuitSaveDataServerRpc(suitDataString); } } [ServerRpc(RequireOwnership = false)] public void LoadSuitSaveDataServerRpc(string suitDataString) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2172041260u, val, (RpcDelivery)0); bool flag = suitDataString != null; ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val2)).WriteValueSafe(suitDataString, false); } ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2172041260u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { Femmployee.FemmployeeSaveData suitData = JsonConvert.DeserializeObject<Femmployee.FemmployeeSaveData>(suitDataString); LoadSuitData(suitData); } } public void SelfDestruct() { ((Component)this).GetComponent<NetworkObject>().Despawn(true); } protected override void __initializeVariables() { if (_headSync == null) { throw new Exception("NetworkedSettings._headSync cannot be null. All NetworkVariableBase instances must be initialized."); } ((NetworkVariableBase)_headSync).Initialize((NetworkBehaviour)(object)this); ((NetworkBehaviour)this).__nameNetworkVariable((NetworkVariableBase)(object)_headSync, "_headSync"); base.NetworkVariableFields.Add((NetworkVariableBase)(object)_headSync); if (_chestSync == null) { throw new Exception("NetworkedSettings._chestSync cannot be null. All NetworkVariableBase instances must be initialized."); } ((NetworkVariableBase)_chestSync).Initialize((NetworkBehaviour)(object)this); ((NetworkBehaviour)this).__nameNetworkVariable((NetworkVariableBase)(object)_chestSync, "_chestSync"); base.NetworkVariableFields.Add((NetworkVariableBase)(object)_chestSync); if (_armsSync == null) { throw new Exception("NetworkedSettings._armsSync cannot be null. All NetworkVariableBase instances must be initialized."); } ((NetworkVariableBase)_armsSync).Initialize((NetworkBehaviour)(object)this); ((NetworkBehaviour)this).__nameNetworkVariable((NetworkVariableBase)(object)_armsSync, "_armsSync"); base.NetworkVariableFields.Add((NetworkVariableBase)(object)_armsSync); if (_waistSync == null) { throw new Exception("NetworkedSettings._waistSync cannot be null. All NetworkVariableBase instances must be initialized."); } ((NetworkVariableBase)_waistSync).Initialize((NetworkBehaviour)(object)this); ((NetworkBehaviour)this).__nameNetworkVariable((NetworkVariableBase)(object)_waistSync, "_waistSync"); base.NetworkVariableFields.Add((NetworkVariableBase)(object)_waistSync); if (_legSync == null) { throw new Exception("NetworkedSettings._legSync cannot be null. All NetworkVariableBase instances must be initialized."); } ((NetworkVariableBase)_legSync).Initialize((NetworkBehaviour)(object)this); ((NetworkBehaviour)this).__nameNetworkVariable((NetworkVariableBase)(object)_legSync, "_legSync"); base.NetworkVariableFields.Add((NetworkVariableBase)(object)_legSync); if (headBlendshapeValues == null) { throw new Exception("NetworkedSettings.headBlendshapeValues cannot be null. All NetworkVariableBase instances must be initialized."); } ((NetworkVariableBase)headBlendshapeValues).Initialize((NetworkBehaviour)(object)this); ((NetworkBehaviour)this).__nameNetworkVariable((NetworkVariableBase)(object)headBlendshapeValues, "headBlendshapeValues"); base.NetworkVariableFields.Add((NetworkVariableBase)(object)headBlendshapeValues); if (chestBlendshapeValues == null) { throw new Exception("NetworkedSettings.chestBlendshapeValues cannot be null. All NetworkVariableBase instances must be initialized."); } ((NetworkVariableBase)chestBlendshapeValues).Initialize((NetworkBehaviour)(object)this); ((NetworkBehaviour)this).__nameNetworkVariable((NetworkVariableBase)(object)chestBlendshapeValues, "chestBlendshapeValues"); base.NetworkVariableFields.Add((NetworkVariableBase)(object)chestBlendshapeValues); if (armsBlendshapeValues == null) { throw new Exception("NetworkedSettings.armsBlendshapeValues cannot be null. All NetworkVariableBase instances must be initialized."); } ((NetworkVariableBase)armsBlendshapeValues).Initialize((NetworkBehaviour)(object)this); ((NetworkBehaviour)this).__nameNetworkVariable((NetworkVariableBase)(object)armsBlendshapeValues, "armsBlendshapeValues"); base.NetworkVariableFields.Add((NetworkVariableBase)(object)armsBlendshapeValues); if (waistBlendshapeValues == null) { throw new Exception("NetworkedSettings.waistBlendshapeValues cannot be null. All NetworkVariableBase instances must be initialized."); } ((NetworkVariableBase)waistBlendshapeValues).Initialize((NetworkBehaviour)(object)this); ((NetworkBehaviour)this).__nameNetworkVariable((NetworkVariableBase)(object)waistBlendshapeValues, "waistBlendshapeValues"); base.NetworkVariableFields.Add((NetworkVariableBase)(object)waistBlendshapeValues); if (legsBlendshapeValues == null) { throw new Exception("NetworkedSettings.legsBlendshapeValues cannot be null. All NetworkVariableBase instances must be initialized."); } ((NetworkVariableBase)legsBlendshapeValues).Initialize((NetworkBehaviour)(object)this); ((NetworkBehaviour)this).__nameNetworkVariable((NetworkVariableBase)(object)legsBlendshapeValues, "legsBlendshapeValues"); base.NetworkVariableFields.Add((NetworkVariableBase)(object)legsBlendshapeValues); if (suitMaterialValues == null) { throw new Exception("NetworkedSettings.suitMaterialValues cannot be null. All NetworkVariableBase instances must be initialized."); } ((NetworkVariableBase)suitMaterialValues).Initialize((NetworkBehaviour)(object)this); ((NetworkBehaviour)this).__nameNetworkVariable((NetworkVariableBase)(object)suitMaterialValues, "suitMaterialValues"); base.NetworkVariableFields.Add((NetworkVariableBase)(object)suitMaterialValues); if (skinMaterialValues == null) { throw new Exception("NetworkedSettings.skinMaterialValues cannot be null. All NetworkVariableBase instances must be initialized."); } ((NetworkVariableBase)skinMaterialValues).Initialize((NetworkBehaviour)(object)this); ((NetworkBehaviour)this).__nameNetworkVariable((NetworkVariableBase)(object)skinMaterialValues, "skinMaterialValues"); base.NetworkVariableFields.Add((NetworkVariableBase)(object)skinMaterialValues); if (playerID == null) { throw new Exception("NetworkedSettings.playerID cannot be null. All NetworkVariableBase instances must be initialized."); } ((NetworkVariableBase)playerID).Initialize((NetworkBehaviour)(object)this); ((NetworkBehaviour)this).__nameNetworkVariable((NetworkVariableBase)(object)playerID, "playerID"); base.NetworkVariableFields.Add((NetworkVariableBase)(object)playerID); if (hasInitialized == null) { throw new Exception("NetworkedSettings.hasInitialized cannot be null. All NetworkVariableBase instances must be initialized."); } ((NetworkVariableBase)hasInitialized).Initialize((NetworkBehaviour)(object)this); ((NetworkBehaviour)this).__nameNetworkVariable((NetworkVariableBase)(object)hasInitialized, "hasInitialized"); base.NetworkVariableFields.Add((NetworkVariableBase)(object)hasInitialized); ((NetworkBehaviour)this).__initializeVariables(); } [RuntimeInitializeOnLoadMethod] internal static void InitializeRPCS_NetworkedSettings() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Expected O, but got Unknown //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Expected O, but got Unknown //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Expected O, but got Unknown //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Expected O, but got Unknown //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Expected O, but got Unknown NetworkManager.__rpc_func_table.Add(1272767705u, new RpcReceiveHandler(__rpc_handler_1272767705)); NetworkManager.__rpc_func_table.Add(1759863977u, new RpcReceiveHandler(__rpc_handler_1759863977)); NetworkManager.__rpc_func_table.Add(2348116511u, new RpcReceiveHandler(__rpc_handler_2348116511)); NetworkManager.__rpc_func_table.Add(2903334129u, new RpcReceiveHandler(__rpc_handler_2903334129)); NetworkManager.__rpc_func_table.Add(1024183679u, new RpcReceiveHandler(__rpc_handler_1024183679)); NetworkManager.__rpc_func_table.Add(939713145u, new RpcReceiveHandler(__rpc_handler_939713145)); NetworkManager.__rpc_func_table.Add(1865529678u, new RpcReceiveHandler(__rpc_handler_1865529678)); NetworkManager.__rpc_func_table.Add(2172041260u, new RpcReceiveHandler(__rpc_handler_2172041260)); } private static void __rpc_handler_1272767705(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int num = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref num); target.__rpc_exec_stage = (__RpcExecStage)2; ((NetworkedSettings)(object)target).AssignValuesClientRpc(num); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1759863977(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int id = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref id); bool flag = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref flag, default(ForPrimitives)); string value = null; if (flag) { ((FastBufferReader)(ref reader)).ReadValueSafe(ref value, false); } target.__rpc_exec_stage = (__RpcExecStage)1; ((NetworkedSettings)(object)target).SetNetworkVarServerRpc(id, value); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2348116511(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((NetworkedSettings)(object)target).ApplySettingsServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2903334129(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)2; ((NetworkedSettings)(object)target).ApplySettingsClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1024183679(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int id = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref id); bool flag = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref flag, default(ForPrimitives)); float[] shapeValues = null; if (flag) { ((FastBufferReader)(ref reader)).ReadValueSafe<float>(ref shapeValues, default(ForPrimitives)); } bool flag2 = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref flag2, default(ForPrimitives)); int[] shapeIDs = null; if (flag2) { ((FastBufferReader)(ref reader)).ReadValueSafe<int>(ref shapeIDs, default(ForPrimitives)); } target.__rpc_exec_stage = (__RpcExecStage)1; ((NetworkedSettings)(object)target).SetBlendshapeNetworkVarServerRpc(id, shapeValues, shapeIDs); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_939713145(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int targetList = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref targetList); target.__rpc_exec_stage = (__RpcExecStage)1; ((NetworkedSettings)(object)target).ResetBlendshapeNetworkVarServerRPC(targetList); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1865529678(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Color suitColorValue = default(Color); ((FastBufferReader)(ref reader)).ReadValueSafe(ref suitColorValue); float suitMetallicValue = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe<float>(ref suitMetallicValue, default(ForPrimitives)); float suitSmoothnessValue = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe<float>(ref suitSmoothnessValue, default(ForPrimitives)); Color skinColorValue = default(Color); ((FastBufferReader)(ref reader)).ReadValueSafe(ref skinColorValue); float skinMetallicValue = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe<float>(ref skinMetallicValue, default(ForPrimitives)); float skinSmoothnessValue = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe<float>(ref skinSmoothnessValue, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((NetworkedSettings)(object)target).SetMaterialDataServerRpc(suitColorValue, suitMetallicValue, suitSmoothnessValue, skinColorValue, skinMetallicValue, skinSmoothnessValue); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2172041260(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool flag = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref flag, default(ForPrimitives)); string suitDataString = null; if (flag) { ((FastBufferReader)(ref reader)).ReadValueSafe(ref suitDataString, false); } target.__rpc_exec_stage = (__RpcExecStage)1; ((NetworkedSettings)(object)target).LoadSuitSaveDataServerRpc(suitDataString); target.__rpc_exec_stage = (__RpcExecStage)0; } } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "NetworkedSettings"; } } public static class Tools { public static void LogAll(object obj) { Type type = obj.GetType(); string name = type.Name; FieldInfo[] fields = type.GetFields(BindingFlags.Instance | BindingFlags.Public); FieldInfo[] array = fields; foreach (FieldInfo fieldInfo in array) { FemmployeeModBase.mls.LogWarning((object)$"Class: {name}, Variable: {fieldInfo.Name}, Value: {fieldInfo.GetValue(obj)}"); } } public static bool CheckIsServer() { if (NetworkManager.Singleton.IsServer) { return true; } return false; } public static Dictionary<string, float> RetriveSliderData(List<BlendshapeSlider> sliders) { Dictionary<string, float> dictionary = new Dictionary<string, float>(); foreach (BlendshapeSlider slider in sliders) { if (!dictionary.ContainsKey(slider.blendshapes[0].BlendshapeName)) { dictionary.Add(slider.blendshapes[0].BlendshapeName, slider.shapeSlider.value); } } return dictionary; } } public static class MyPluginInfo { public const string PLUGIN_GUID = "FemmployeeMod"; public const string PLUGIN_NAME = "FemmployeeMod"; public const string PLUGIN_VERSION = "1.0.0"; } } namespace FemmployeeMod.UIScripts { public class BlendshapeSlider : MonoBehaviour { public FemmployeeConfigUI configUI; public int objectID; public GameObject targetElement; public Slider shapeSlider; public float DefaultSliderMax = 100f; public BlendshapeData[] blendshapes; public void OnDestroy() { if ((Object)(object)shapeSlider != (Object)null) { configUI.AllSliders[objectID].Remove(this); } } public void SliderValueChange(float value) { configUI.femmployeeSuitPreview.SetPreviewBlendshape(objectID, value, blendshapes, configUI.localFemmployeeGo.GetComponent<Femmployee>()); } } public class FemmployeeConfigUI : MonoBehaviour { public GameObject localFemmployeeGo; public TMP_Dropdown[] regionDropdowns; public TMP_Dropdown multiplierDropdown; public FemmployeeUIMaterialSettings suitMaterialSettings; public FemmployeeUIMaterialSettings skinMaterialSettings; public Toggle multiplierToggle; public List<BlendshapeSlider>[] AllSliders = new List<BlendshapeSlider>[5]; public bool isUIOpen; public FemmployeeSuitPreview femmployeeSuitPreview; public Slider previewSpinSlider; public GameObject menuRoot; public GameObject mainMenu; public GameObject settingsMenu; public int sliderMultiplier; public bool isMultiplierEnabled; public static FemmployeeConfigUI instance; public void Awake() { SetupKeybindCallbacks(); for (int i = 0; i < AllSliders.Length; i++) { AllSliders[i] = new List<BlendshapeSlider>(); } instance = this; } public void Start() { //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Expected O, but got Unknown if ((Object)(object)femmployeeSuitPreview == (Object)null) { GameObject val = (GameObject)Object.Instantiate(Assets.MainAssetBundle.LoadAsset("FemmployeeSuitPreviewPrefab.prefab"), new Vector3(400f, -100f, 400f), Quaternion.identity); femmployeeSuitPreview = val.GetComponent<FemmployeeSuitPreview>(); femmployeeSuitPreview.previewSpinSlider = previewSpinSlider; } sliderMultiplier = 1; TMP_Dropdown[] array = regionDropdowns; foreach (TMP_Dropdown val2 in array) { PopulateSliders(((Component)val2).GetComponent<RegionDropdown>()); } } public void Update() { if (!isUIOpen) { return; } TMP_Dropdown[] array = regionDropdowns; foreach (TMP_Dropdown val in array) { if (val.IsExpanded) { ((Component)val).GetComponent<RegionDropdown>().targetElement.SetActive(false); } else { ((Component)val).GetComponent<RegionDropdown>().targetElement.SetActive(true); } } } public void PopulateDropdowns() { //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Expected O, but got Unknown TMP_Dropdown[] array = regionDropdowns; foreach (TMP_Dropdown val in array) { val.ClearOptions(); } for (int j = 0; j < regionDropdowns.Length; j++) { if (j < femmployeeSuitPreview.settings.partsList.Count) { foreach (KeyValuePair<string, FemmployeePart> item in femmployeeSuitPreview.settings.partsList[j]) { regionDropdowns[j].options.Add(new OptionData(item.Key)); } } else { FemmployeeModBase.mls.LogWarning((object)$"No parts found for region {j}"); } } } public void SetMultiplier(int value) { for (int i = 0; i < 5; i++) { foreach (BlendshapeSlider item in AllSliders[i]) { item.shapeSlider.maxValue = item.DefaultSliderMax * (float)value; } } } public void PopulateSliders(RegionDropdown sender) { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Expected O, but got Unknown foreach (Transform item in sender.targetElement.transform) { Transform val = item; Object.Destroy((Object)(object)((Component)val).gameObject); } AllSliders[sender.objectID].Clear(); List<BlendshapeData> list = new List<BlendshapeData>(); GameObject val2 = (GameObject)Assets.MainAssetBundle.LoadAsset("BlendshapeSlider.prefab"); GameObject targetElement = sender.targetElement; string[] array = new string[5] { "Head", "Chest", "Arms", "Waist", "Leg" }; SkinnedMeshRenderer[] bodyRegionMeshRenderers = femmployeeSuitPreview.settings.bodyRegionMeshRenderers; foreach (SkinnedMeshRenderer val3 in bodyRegionMeshRenderers) { int originalRegionID = Array.IndexOf(femmployeeSuitPreview.settings.bodyRegionMeshRenderers, val3); for (int j = 0; j < val3.sharedMesh.blendShapeCount; j++) { string blendShapeName = val3.sharedMesh.GetBlendShapeName(j); string[] array2 = blendShapeName.Split('_'); if (array2.Length > 2 && int.TryParse(array2[1], out var _) && array2[2] == array[sender.objectID]) { list.Add(new BlendshapeData { OriginalRegionID = originalRegionID, ControllingRegionID = sender.objectID, BlendshapeName = blendShapeName }); } } } Dictionary<int, List<BlendshapeData>> dictionary = (from shape in list group shape by shape.BlendshapeName.Split('_')[1]).ToDictionary((IGrouping<string, BlendshapeData> g) => int.Parse(g.Key), (IGrouping<string, BlendshapeData> g) => g.ToList()); foreach (KeyValuePair<int, List<BlendshapeData>> item2 in dictionary) { GameObject val4 = Object.Instantiate<GameObject>(val2, targetElement.transform); BlendshapeSlider component = val4.GetComponent<BlendshapeSlider>(); component.configUI = this; component.blendshapes = item2.Value.ToArray(); component.objectID = sender.objectID; component.shapeSlider.maxValue = component.DefaultSliderMax * (float)sliderMultiplier; int blendShapeIndex = femmployeeSuitPreview.settings.bodyRegionMeshRenderers[item2.Value[0].OriginalRegionID].sharedMesh.GetBlendShapeIndex(item2.Value[0].BlendshapeName); component.shapeSlider.value = femmployeeSuitPreview.settings.bodyRegionMeshRenderers[component.objectID].GetBlendShapeWeight(blendShapeIndex); string blendshapeName = item2.Value[0].BlendshapeName; string text = Regex.Replace(blendshapeName, "_.*$", ""); component.targetElement.GetComponent<TMP_Text>().text = text; ((Object)component).name = $"BlendshapeSlider_{item2.Key}"; AllSliders[sender.objectID].Add(component); } } public void OnDestroy() { FemmployeeModBase.InputActionsInstance.FemmployeeUIToggle.performed -= FemmployeeUIToggle; } public void SetupKeybindCallbacks() { FemmployeeModBase.InputActionsInstance.FemmployeeUIToggle.performed += FemmployeeUIToggle; } public void FemmployeeUIToggle(CallbackContext UIOpenContext) { Femmployee femmployee = default(Femmployee); if (((CallbackContext)(ref UIOpenContext)).performed && ((Component)GameNetworkManager.Instance.localPlayerController).TryGetComponent<Femmployee>(ref femmployee)) { isUIOpen = !isUIOpen; menuRoot.SetActive(isUIOpen); mainMenu.SetActive(isUIOpen); settingsMenu.SetActive(false); ((Component)femmployeeSuitPreview.modelViewCamera).gameObject.SetActive(isUIOpen); Cursor.lockState = (CursorLockMode)((!isUIOpen) ? 1 : 0); Cursor.visible = isUIOpen; GameNetworkManager.Instance.localPlayerController.disableLookInput = isUIOpen; GameNetworkManager.Instance.localPlayerController.inTerminalMenu = isUIOpen; } } public void ApplyChanges() { localFemmployeeGo.GetComponent<Femmployee>().settings.networkedSettings.ApplySettings(); localFemmployeeGo.GetComponent<Femmployee>().settings.networkedSettings.SaveSuitData(); } public void ToggleMultiplier(bool value) { isMultiplierEnabled = value; if (!value) { SetMultiplier(1); sliderMultiplier = 1; multiplierDropdown.value = 0; } } public void SetSliderMultiplier(int value) { sliderMultiplier = value + 1; SetMultiplier(sliderMultiplier); } public void RegionDropdownSelection(RegionDropdown sender, string selectionKeyName) { int objectID = sender.objectID; femmployeeSuitPreview.SetPreviewRegion(objectID, selectionKeyName, localFemmployeeGo.GetComponent<Femmployee>()); PopulateSliders(sender); } public void MultiplierDropdownSelection(int value) { if (isMultiplierEnabled) { SetSliderMultiplier(value); } } public void SendColorData() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) femmployeeSuitPreview.SetMaterialSettings(suitMaterialSettings.colorValue, suitMaterialSettings.metallicValue, suitMaterialSettings.smoothnessValue, skinMaterialSettings.colorValue, skinMaterialSettings.metallicValue, skinMaterialSettings.smoothnessValue, localFemmployeeGo.GetComponent<Femmployee>()); } } public class FemmployeeUIMaterialSettings : MonoBehaviour { public FemmployeeConfigUI localFemmployeeConfigUI; public Slider[] RGBSliders; public Slider metallicSlider; public Slider smoothnessSlider; public Color colorValue; public float metallicValue; public float smoothnessValue; public Color defaultColorValue; public float defaultMetallicValue = 0f; public float defaultSmoothnessValue = 0f; public string materialName; public void SetColorValue(float value) { colorValue.r = RGBSliders[0].value; colorValue.g = RGBSliders[1].value; colorValue.b = RGBSliders[2].value; localFemmployeeConfigUI.SendColorData(); } public void SetMetallicValue(float value) { metallicValue = metallicSlider.value; localFemmployeeConfigUI.SendColorData(); } public void SetSmoothnessSlider(float value) { smoothnessValue = smoothnessSlider.value; localFemmployeeConfigUI.SendColorData(); } public void ResetColorValue(bool value) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) colorValue = defaultColorValue; RGBSliders[0].value = defaultColorValue.r; RGBSliders[1].value = defaultColorValue.g; RGBSliders[2].value = defaultColorValue.b; } public void ResetMetallicsSlider(bool value) { metallicValue = defaultMetallicValue; metallicSlider.value = defaultMetallicValue; } public void ResetSmoothnessSlider(bool value) { smoothnessValue = defaultSmoothnessValue; smoothnessSlider.value = defaultSmoothnessValue; } } public class MenuButton : MonoBehaviour { public int objectID; public GameObject targetElement; public bool shouldDisable; public GameObject[] disableList; public void ButtonTrigger() { targetElement.SetActive(!targetElement.activeSelf); if (shouldDisable) { GameObject[] array = disableList; foreach (GameObject val in array) { val.SetActive(false); } } } } public class MultiplierToggle : MonoBehaviour { public FemmployeeConfigUI configUI; public GameObject targetElement; public void ToggleInteract(bool value) { GameObject obj = targetElement; if (obj != null) { obj.SetActive(value); } configUI.ToggleMultiplier(value); } } public class RegionDropdown : MonoBehaviour { public FemmployeeConfigUI configUI; public int objectID; public GameObject targetElement; public bool shouldDisable; public GameObject[] disableList; public void DropdownTrigger(int selectionIndex) { TMP_Dropdown component = ((Component)this).GetComponent<TMP_Dropdown>(); configUI.RegionDropdownSelection(this, component.options[component.value].text); } } } namespace ModelReplacement { public class Femmployee : BodyReplacementBase { public class FemmployeeSaveData { public PartsList PartsList { get; set; } public Dictionary<string, Dictionary<string, float>> SliderValues { get; set; } = new Dictionary<string, Dictionary<string, float>>(); public int MultiplierValue { get; set; } public bool Multiplier { get; set; } public MaterialData suitMaterialData { get; set; } public MaterialData skinMaterialData { get; set; } } public class PartsList { public string HeadSync { get; set; } public string ChestSync { get; set; } public string ArmsSync { get; set; } public string WaistSync { get; set; } public string LegSync { get; set; } } public class MaterialData { public float colorValueR { get; set; } public float colorValueG { get; set; } public float colorValueB { get; set; } public float metallicValue { get; set; } public float smoothnessValue { get; set; } } public FemmployeeSettings settings; public FemmployeeConfigUI localModdedUI; public FemmployeeViewmodel localViewModel; public override GameObject LoadAssetsAndReturnModel() { string text = "Femmployee"; return Assets.MainAssetBundle.LoadAsset<GameObject>(text); } public override void Awake() { ((BodyReplacementBase)this).Awake(); } public override void OnDestroy() { ((BodyReplacementBase)this).OnDestroy(); if (Tools.CheckIsServer()) { settings.networkedSettings.SelfDestruct(); } } public override void Start() { settings = base.replacementModel.GetComponent<FemmployeeSettings>(); settings.controller = ((BodyReplacementBase)this).controller; settings.replacementModel = base.replacementModel; settings.suitName = ((BodyReplacementBase)this).suitName; if (Tools.CheckIsServer()) { GameObject val = Object.Instantiate<GameObject>(FemmployeeModBase.networkedSettingsGo); NetworkObject component = val.GetComponent<NetworkObject>(); NetworkedSettings component2 = val.GetComponent<NetworkedSettings>(); component.Spawn(false); component.TrySetParent(base.replacementModel.gameObject, false); component2.playerID.Value = (int)((BodyReplacementBase)this).controller.playerClientId; } localModdedUI = Object.FindObjectOfType<FemmployeeConfigUI>(); InitializeParts(); if (!((Object)(object)((BodyReplacementBase)this).controller != (Object)(object)GameNetworkManager.Instance.localPlayerController)) { localModdedUI.femmployeeSuitPreview.settings.partsList = settings.partsList; localModdedUI.localFemmployeeGo = ((Component)this).gameObject; localModdedUI.PopulateDropdowns(); ((MonoBehaviour)this).StartCoroutine(WaitForNetworkSettingsInitialization()); } } private IEnumerator WaitForNetworkSettingsInitialization() { yield return (object)new WaitUntil((Func<bool>)(() => (Object)(object)settings.networkedSettings != (Object)null)); yield return (object)new WaitUntil((Func<bool>)(() => settings.networkedSettings.hasInitialized.Value)); yield return (object)new WaitForSeconds(0.2f); localModdedUI.femmployeeSuitPreview.LoadSaveData(this); } private void InitializeParts() { ScriptableObject[] array = Assets.MainAssetBundle.LoadAllAssets<ScriptableObject>(); ScriptableObject[] array2 = array; foreach (ScriptableObject val in array2) { if (!(val is FemmployeePartsInitializationList femmployeePartsInitializationList)) { continue; } for (int j = 0; j < femmployeePartsInitializationList.fullPartsList.Count; j++) { Dictionary<string, FemmployeePart> dictionary = new Dictionary<string, FemmployeePart>(); FemmployeePart[] array3 = femmployeePartsInitializationList.fullPartsList[j]; foreach (FemmployeePart femmployeePart in array3) { dictionary.Add(((Object)femmployeePart).name, femmployeePart); } settings.partsList.Add(dictionary); } } } public void ApplySwapRegions() { int num = (localModdedUI.isMultiplierEnabled ? (localModdedUI.sliderMultiplier * 100) : 100); ApplyMeshesAndMaterials(); List<NetworkList<BlendshapeValuePair>> list = new List<NetworkList<BlendshapeValuePair>> { settings.networkedSettings.headBlendshapeValues, settings.networkedSettings.chestBlendshapeValues, settings.networkedSettings.armsBlendshapeValues, settings.networkedSettings.waistBlendshapeValues, settings.networkedSettings.legsBlendshapeValues }; for (int i = 0; i < list.Count; i++) { SkinnedMeshRenderer val = settings.bodyRegionMeshRenderers[i]; foreach (BlendshapeValuePair item in list[i]) { float num2 = Mathf.Clamp(item.ShapeValue, 0f, (float)num); val.SetBlendShapeWeight(item.ShapeID, num2); } } ApplyMaterialProperties(); } private void ApplyMeshesAndMaterials() { for (int i = 0; i < settings.bodyRegionMeshRenderers.Length; i++) { settings.bodyRegionMeshRenderers[i].sharedMesh = settings.partsList[i][GetSyncValue(i)].mesh; ((Renderer)settings.bodyRegionMeshRenderers[i]).materials = settings.partsList[i][GetSyncValue(i)].materials; } if (!ModelReplacementAPI.EnforceViewModelGeneration.Value) { FemmployeeModBase.mls.LogWarning((object)"'Generate Viewmodels by default' is disabled! Skipping viewmodel generation"); } else if (!((Object)(object)((BodyReplacementBase)this).controller != (Object)(object)GameNetworkManager.Instance.localPlayerController)) { ApplyLocalViewmodel(); } } private void ApplyLocalViewmodel() { FemmployeeSettings component = base.replacementViewModel.GetComponent<FemmployeeSettings>(); component.bodyRegionMeshRenderers[2].sharedMesh = settings.partsList[2][GetSyncValue(2)].mesh; ((Renderer)component.bodyRegionMeshRenderers[2]).materials = settings.partsList[2][GetSyncValue(2)].materials; Object.Destroy((Object)(object)base.replacementViewModel); base.replacementViewModel = ((BodyReplacementBase)this).LoadViewModelreplacement(); ((BodyReplacementBase)this).viewModelAvatar.AssignViewModelReplacement(((Component)((BodyReplacementBase)this).controller).gameObject, base.replacementViewModel); ((BodyReplacementBase)this).SetAvatarRenderers(true); ((ManagerBase)base.viewState).ReportBodyReplacementAddition((BodyReplacementBase)(object)this); ((ManagerBase)base.cosmeticManager).ReportBodyReplacementAddition((BodyReplacementBase)(object)this); } private string GetSyncValue(int index) { return index switch { 0 => settings.networkedSettings.headSync, 1 => settings.networkedSettings.chestSync, 2 => settings.networkedSettings.armsSync, 3 => settings.networkedSettings.waistSync, 4 => settings.networkedSettings.legSync, _ => string.Empty, }; } private void ApplyMaterialProperties() { //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) SkinnedMeshRenderer[] bodyRegionMeshRenderers = settings.bodyRegionMeshRenderers; foreach (SkinnedMeshRenderer val in bodyRegionMeshRenderers) { Material[] materials = ((Renderer)val).materials; foreach (Material val2 in materials) { if (((Object)val2).name == "Suit (Instance)") { val2.color = settings.networkedSettings.suitMaterialValues.Value.colorValue; val2.SetFloat("_Metallic", settings.networkedSettings.suitMaterialValues.Value.metallicValue); val2.SetFloat("_Smoothness", settings.networkedSettings.suitMaterialValues.Value.smoothnessValue); } if (((Object)val2).name == "Skin (Instance)") { val2.color = settings.networkedSettings.skinMaterialValues.Value.colorValue; val2.SetFloat("_Metallic", settings.networkedSettings.skinMaterialValues.Value.metallicValue); val2.SetFloat("_Smoothness", settings.networkedSettings.skinMaterialValues.Value.smoothnessValue); } } } if (ModelReplacementAPI.EnforceViewModelGeneration.Value && !((Object)(object)((BodyReplacementBase)this).controller != (Object)(object)GameNetworkManager.Instance.localPlayerController)) { ApplyViewmodelMaterialProperties(); } } private void ApplyViewmodelMaterialProperties() { //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) FemmployeeSettings component = base.replacementViewModel.GetComponent<FemmployeeSettings>(); Material[] materials = ((Renderer)component.bodyRegionMeshRenderers[2]).materials; foreach (Material val in materials) { if (((Object)val).name == "Suit (Instance)") { val.color = settings.networkedSettings.suitMaterialValues.Value.colorValue; val.SetFloat("_Metallic", settings.networkedSettings.suitMaterialValues.Value.metallicValue); val.SetFloat("_Smoothness", settings.networkedSettings.suitMaterialValues.Value.smoothnessValue); } if (((Object)val).name == "Skin (Instance)") { val.color = settings.networkedSettings.skinMaterialValues.Value.colorValue; val.SetFloat("_Metallic", settings.networkedSettings.skinMaterialValues.Value.metallicValue); val.SetFloat("_Smoothness", settings.networkedSettings.skinMaterialValues.Value.smoothnessValue); } } } } [BepInPlugin("com.TiltedHat.FemmployeeMod", "Femmployee Mod", "1.1.6")] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] public class FemmployeeModBase : BaseUnityPlugin { public static FemmployeeModBase instance; internal static InputClass InputActionsInstance = new InputClass(); public static ManualLogSource mls; public static ConfigFile config; public static GameObject networkedSettingsGo; public static string saveFilePath = Path.Combine(Paths.BepInExRootPath, "plugins", "TiltedTomb-The_Femmployee_Mod", "FemmployeeSaveData.json"); public static ConfigEntry<bool> useSaveFileFormatting; private static void InitConfig() { useSaveFileFormatting = config.Bind<bool>("Femmployee Mod Settings", "Use Save File formatting", false, "Enable for save file debugging. makes the mod generate the JSON with Formatting.Indented true."); } private void Awake() { //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Expected O, but got Unknown //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Expected O, but got Unknown config = ((BaseUnityPlugin)this).Config; InitConfig(); if ((Object)(object)instance == (Object)null) { instance = this; } Type[] types = Assembly.GetExecutingAssembly().GetTypes(); Type[] array = types; foreach (Type type in array) { MethodInfo[] methods = type.GetMethods(BindingFlags.Instance | BindingFlags.Static | BindingFlags.NonPublic); MethodInfo[] array2 = methods; foreach (MethodInfo methodInfo in array2) { object[] customAttributes = methodInfo.GetCustomAttributes(typeof(RuntimeInitializeOnLoadMethodAttribute), inherit: false); if (customAttributes.Length != 0) { methodInfo.Invoke(null, null); } } } Assets.PopulateAssets(); ModelReplacementAPI.RegisterSuitModelReplacement("Femmployee", typeof(Femmployee)); Harmony val = new Harmony("com.TiltedHat.FemmployeeMod"); val.PatchAll(); ((BaseUnityPlugin)this).Logger.LogInfo((object)"Plugin com.TiltedHat.FemmployeeMod is loaded!"); mls = ((BaseUnityPlugin)this).Logger; networkedSettingsGo = (GameObject)Assets.MainAssetBundle.LoadAsset("NetworkedSettings.prefab"); NetworkPrefabs.RegisterNetworkPrefab(networkedSettingsGo); } } public static class Assets { public static string mainAssetBundleName = "femmployeemodbundle"; public static AssetBundle MainAssetBundle = null; private static string GetAssemblyName() { return Assembly.GetExecutingAssembly().GetName().Name.Replace(" ", "_"); } public static void PopulateAssets() { if ((Object)(object)MainAssetBundle == (Object)null) { Console.WriteLine(GetAssemblyName() + "." + mainAssetBundleName); using Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream(GetAssemblyName() + "." + mainAssetBundleName); MainAssetBundle = AssetBundle.LoadFromStream(stream); } } } [HarmonyPatch(typeof(StartOfRound))] internal class StartOfRoundPatch { [HarmonyPatch("Start")] [HarmonyPostfix] private static void UICreationPatch() { AssetBundle mainAssetBundle = Assets.MainAssetBundle; GameObject val = mainAssetBundle.LoadAsset<GameObject>("ModdedUI.prefab"); Object.Instantiate<GameObject>(val); } } public class InputClass : LcInputActions { [InputAction("<Keyboard>/backslash", Name = "Femmployee UI")] public InputAction FemmployeeUIToggle { get; set; } } public class NetworkMaterialProperties : INetworkSerializable { public Color colorValue; public float metallicValue; public float smoothnessValue; public unsafe void NetworkSerialize<T>(BufferSerializer<T> serializer) where T : IReaderWriter { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) serializer.SerializeValue(ref colorValue); ((BufferSerializer<float>*)(&serializer))->SerializeValue<float>(ref metallicValue, default(ForPrimitives)); ((BufferSerializer<float>*)(&serializer))->SerializeValue<float>(ref smoothnessValue, default(ForPrimitives)); } } } namespace System.Runtime.CompilerServices { [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)] internal sealed class IgnoresAccessChecksToAttr