using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Configuration;
using Microsoft.CodeAnalysis;
using Photon.Pun;
using REPOLib.Modules;
using SteampunkItems.Configs;
using TMPro;
using UnityEngine;
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: AssemblyCompany("s1ckboy")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyCopyright("Copyright © 2025 s1ckboy")]
[assembly: AssemblyFileVersion("1.1.7.0")]
[assembly: AssemblyInformationalVersion("1.1.7+0529f1b72bda22fedb3676f8e83b1b90f99823b0")]
[assembly: AssemblyProduct("SteampunkItems")]
[assembly: AssemblyTitle("SteampunkItems")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.1.7.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
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;
}
}
}
namespace SteampunkItems
{
[BepInPlugin("SteampunkItems", "SteampunkItems", "1.1.7")]
[BepInDependency(/*Could not decode attribute arguments.*/)]
public class Plugins : BaseUnityPlugin
{
public static ConfigFile ConfigFile { get; private set; }
public static ConfigEntries ModConfig { get; private set; }
private void Awake()
{
ConfigFile = ((BaseUnityPlugin)this).Config;
ModConfig = new ConfigEntries();
string directoryName = Path.GetDirectoryName(((BaseUnityPlugin)this).Info.Location);
string text = Path.Combine(directoryName, "steampunkitems");
AssetBundle val = AssetBundle.LoadFromFile(text);
if ((Object)(object)val == (Object)null)
{
((BaseUnityPlugin)this).Logger.LogError((object)"Failed to load SteampunkItems assetbundle.");
return;
}
List<string> list = new List<string>(5) { "Valuable Telescope_SP", "Valuable Stopwatch_SP", "Valuable HeadSet_SP", "Valuable Chronometer_SP", "Valuable Logpose_SP" };
List<string> valuableAssetNames = new List<string>(1) { "Valuables - Generic" };
foreach (string item in list)
{
RegisterValuable(val, item, valuableAssetNames);
}
List<string> list2 = new List<string>(1) { "Item Melee Pickaxe_SP" };
foreach (string item2 in list2)
{
RegisterItem(val, item2);
}
ModConfig.ConfigManager(ConfigFile);
}
private void RegisterValuable(AssetBundle assetBundle, string valuableName, List<string> valuableAssetNames)
{
GameObject val = assetBundle.LoadAsset<GameObject>(valuableName);
Valuables.RegisterValuable(val, valuableAssetNames);
}
private void RegisterItem(AssetBundle assetBundle, string itemName)
{
Item val = assetBundle.LoadAsset<Item>(itemName);
Items.RegisterItem(val);
}
}
public static class MyPluginInfo
{
public const string PLUGIN_GUID = "SteampunkItems";
public const string PLUGIN_NAME = "SteampunkItems";
public const string PLUGIN_VERSION = "1.1.7";
}
}
namespace SteampunkItems.Valuables_SP
{
public class Headset : MonoBehaviour
{
public AudioSource audioSource;
public List<ParticleSystem> particles = new List<ParticleSystem>();
public List<AudioClip> songs = new List<AudioClip>();
public AnimationCurve curveIntro;
public AnimationCurve curveOutro;
public Gradient topLeft;
public Gradient topRight;
public Gradient bottomLeft;
public Gradient bottomRight;
private PhotonView photonView;
private PhysGrabObject physGrabObject;
private ItemToggle toggle;
private TextMeshPro prompt;
private Vector3 dir;
private Vector3 scale;
private VertexGradient vg;
private readonly float speed = 0.2f;
private float gradientTime;
private float showTimer;
private float curveLerp;
private int _currentSongIndex;
private bool isPlaying;
private bool isFirstGrab = true;
private string promptInteract;
private string lastBlacklistString = null;
private List<int> blacklistedSongs = new List<int>();
private List<AudioClip> ogSongs = new List<AudioClip>();
private List<ParticleSystem> ogParts = new List<ParticleSystem>();
private void Awake()
{
//IL_0014: Unknown result type (might be due to invalid IL or missing references)
//IL_0019: Unknown result type (might be due to invalid IL or missing references)
//IL_002a: Unknown result type (might be due to invalid IL or missing references)
//IL_002f: Unknown result type (might be due to invalid IL or missing references)
prompt = ((Component)this).GetComponentInChildren<TextMeshPro>();
vg = ((TMP_Text)prompt).colorGradient;
scale = prompt.transform.localScale;
promptInteract = InputManager.instance.InputDisplayReplaceTags("[interact]");
toggle = ((Component)this).GetComponent<ItemToggle>();
photonView = ((Component)this).GetComponent<PhotonView>();
physGrabObject = ((Component)this).GetComponent<PhysGrabObject>();
((Behaviour)prompt).enabled = Plugins.ModConfig.ConfigPromptEnable.Value;
ogSongs = new List<AudioClip>(songs);
ogParts = new List<ParticleSystem>(particles);
if (SemiFunc.IsMasterClientOrSingleplayer())
{
ApplyBlacklist(Plugins.ModConfig.ConfigBlacklistedSongs.Value);
photonView.RPC("SyncBlacklistRPC", (RpcTarget)1, new object[1] { Plugins.ModConfig.ConfigBlacklistedSongs.Value });
}
}
private void Update()
{
//IL_00dc: Unknown result type (might be due to invalid IL or missing references)
//IL_00f2: Unknown result type (might be due to invalid IL or missing references)
//IL_00f7: Unknown result type (might be due to invalid IL or missing references)
//IL_0197: Unknown result type (might be due to invalid IL or missing references)
//IL_01ad: Unknown result type (might be due to invalid IL or missing references)
if (physGrabObject.grabbed)
{
showTimer = 0.1f;
if (physGrabObject.grabbedLocal)
{
audioSource.volume = Plugins.ModConfig.ConfigGrabbedMusicVolume.Value;
}
if (isFirstGrab && Plugins.ModConfig.ConfigFirstGrab.Value)
{
toggle.toggleState = true;
isFirstGrab = false;
}
ToggleAudio();
}
else
{
AudioSource obj = audioSource;
obj.volume -= Time.deltaTime * 0.25f;
audioSource.volume = Mathf.Max(audioSource.volume, Plugins.ModConfig.ConfigUngrabbedMusicVolume.Value);
}
prompt.transform.forward = dir;
dir = ((Component)PhysGrabber.instance).transform.forward;
string value = Plugins.ModConfig.ConfigBlacklistedSongs.Value;
if (SemiFunc.IsMasterClientOrSingleplayer() && value != lastBlacklistString)
{
lastBlacklistString = value;
UpdateBlacklist(value);
}
if (showTimer > 0f)
{
showTimer -= Time.deltaTime;
curveLerp += 10f * Time.deltaTime;
curveLerp = Mathf.Clamp01(curveLerp);
prompt.transform.localScale = scale * curveIntro.Evaluate(curveLerp);
}
else
{
PromptGone();
}
}
private void PromptGone()
{
//IL_0036: Unknown result type (might be due to invalid IL or missing references)
//IL_004c: Unknown result type (might be due to invalid IL or missing references)
curveLerp -= 10f * Time.deltaTime;
curveLerp = Mathf.Clamp01(curveLerp);
prompt.transform.localScale = scale * curveOutro.Evaluate(curveLerp);
}
private void SetRandomGradientCorners()
{
//IL_0035: Unknown result type (might be due to invalid IL or missing references)
//IL_003a: 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_0062: 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)
//IL_00ad: Unknown result type (might be due to invalid IL or missing references)
//IL_00b2: Unknown result type (might be due to invalid IL or missing references)
//IL_00be: Unknown result type (might be due to invalid IL or missing references)
if (!((Object)(object)prompt == (Object)null))
{
vg.topLeft = topLeft.Evaluate((gradientTime + 0f) % 1f);
vg.topRight = topRight.Evaluate((gradientTime + 0.25f) % 1f);
vg.bottomLeft = bottomLeft.Evaluate((gradientTime + 0.5f) % 1f);
vg.bottomRight = bottomRight.Evaluate((gradientTime + 0.75f) % 1f);
((TMP_Text)prompt).colorGradient = vg;
}
}
private void AnimateGlowHeartbeat(Color baseGlowColor)
{
//IL_0069: 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_0070: Unknown result type (might be due to invalid IL or missing references)
//IL_0084: Unknown result type (might be due to invalid IL or missing references)
if (!((Object)(object)prompt == (Object)null))
{
Material fontMaterial = ((TMP_Text)prompt).fontMaterial;
fontMaterial.EnableKeyword("GLOW_ON");
float num = 0.02f;
float num2 = 0.2f;
float num3 = num + (num2 - num) * (0.5f + 0.5f * Mathf.Sin(Time.time * 15f));
fontMaterial.SetFloat("_GlowPower", num3);
Color val = baseGlowColor * num3;
val.a = 1f;
fontMaterial.SetColor("_GlowColor", val);
}
}
private void ToggleAudio()
{
//IL_002d: Unknown result type (might be due to invalid IL or missing references)
//IL_013c: Unknown result type (might be due to invalid IL or missing references)
//IL_0127: Unknown result type (might be due to invalid IL or missing references)
if (toggle.toggleState && songs.Count > 0)
{
((Graphic)prompt).color = Color.white;
gradientTime += Time.deltaTime * speed;
if (gradientTime > 1f)
{
gradientTime -= 1f;
}
SetRandomGradientCorners();
((TMP_Text)prompt).enableVertexGradient = true;
((TMP_Text)prompt).text = "Toggle music OFF [" + promptInteract + "]";
int num = Random.Range(0, songs.Count);
if (SemiFunc.IsMultiplayer())
{
photonView.RPC("PlaySongRPC", (RpcTarget)0, new object[1] { num });
}
else
{
PlaySongRPC(num);
}
}
else if (songs.Count == 0)
{
((TMP_Text)prompt).text = "NO MORE SONGS TO PLAY";
((Graphic)prompt).color = Color.red;
}
else
{
((Graphic)prompt).color = Color.white;
((TMP_Text)prompt).enableVertexGradient = false;
((TMP_Text)prompt).text = "Toggle music ON [" + promptInteract + "]";
isPlaying = false;
StopParticles();
audioSource.Stop();
}
}
private void PlayParticles(int songIndex)
{
StopParticles();
if (songIndex < particles.Count)
{
particles[songIndex].Play();
}
}
private void StopParticles()
{
foreach (ParticleSystem particle in particles)
{
particle.Stop(true, (ParticleSystemStopBehavior)0);
}
}
private void ApplyBlacklist(string blacklistString)
{
songs = new List<AudioClip>(ogSongs);
particles = new List<ParticleSystem>(ogParts);
if (string.IsNullOrWhiteSpace(blacklistString))
{
return;
}
string[] array = blacklistString.Split(',');
HashSet<int> hashSet = new HashSet<int>();
string[] array2 = array;
foreach (string text in array2)
{
string text2 = text.Trim();
if (string.IsNullOrEmpty(text2))
{
continue;
}
if (int.TryParse(text2, out var result))
{
if (result >= 0 && result < ogSongs.Count)
{
hashSet.Add(result);
}
else
{
Debug.LogWarning((object)$"Blacklist index {result} out of range. Valid range is 0 to {ogSongs.Count - 1}.");
}
}
else
{
Debug.LogWarning((object)$"Blacklist entry '{text2}' is not valid, please use integers from 0 to {ogSongs.Count - 1} (you baakaa)");
}
}
List<AudioClip> list = new List<AudioClip>();
List<ParticleSystem> list2 = new List<ParticleSystem>();
for (int j = 0; j < ogSongs.Count; j++)
{
if (!hashSet.Contains(j))
{
list.Add(ogSongs[j]);
if (j < ogParts.Count)
{
list2.Add(ogParts[j]);
}
}
}
songs = list;
particles = list2;
if (songs.Count == 0)
{
Debug.LogWarning((object)"All song-particle pairs have been blacklisted.");
}
}
public void UpdateBlacklist(string blacklistString)
{
if (SemiFunc.IsMasterClientOrSingleplayer())
{
ApplyBlacklist(blacklistString);
photonView.RPC("SyncBlacklistRPC", (RpcTarget)1, new object[1] { blacklistString });
}
}
[PunRPC]
private void SyncBlacklistRPC(string blacklistString)
{
ApplyBlacklist(blacklistString);
}
[PunRPC]
private void PlaySongRPC(int songIndex)
{
if (songs == null || songs.Count == 0)
{
Debug.LogWarning((object)"Every song is blacklisted...");
}
else if (songIndex < 0 || songIndex >= songs.Count)
{
Debug.LogWarning((object)$"Invalid song index {songIndex}. Valid range is 0 to {songs.Count - 1}.");
}
else if (!isPlaying)
{
isPlaying = true;
audioSource.clip = songs[songIndex];
audioSource.Play();
_currentSongIndex = songIndex;
PlayParticles(songIndex);
}
}
}
public class Stopwatch : MonoBehaviour
{
private enum States
{
Idle,
Active
}
public Transform particleSystemTransform;
public ParticleSystem particleSystemSwirl;
public ParticleSystem particleSystemGlitter;
public MeshRenderer meshRenderer;
public Transform secNeedle;
public Transform minNeedle;
public Transform hourNeedle;
private Quaternion secTargetRot;
private Quaternion minTargetRot;
private Quaternion hourTargetRot;
private float secNeedleSpeed;
private float minNeedleSpeed;
private float hourNeedleSpeed;
private Vector2 minNeedleSpeedRange = new Vector2(30f, 90f);
private Vector2 hourNeedleSpeedRange = new Vector2(10f, 40f);
private Vector2 secNeedleSpeedRange = new Vector2(60f, 180f);
private float PlayerSpeed;
private float LookSpeed;
private float ZoomSet;
private float Saturation;
public Light light;
public Sound soundLoop;
private PhysGrabObject physGrabObject;
private PhotonView photonView;
private Color color;
private States currentState;
private bool stateStart;
private float soundPitchLerp;
private int particleFocus;
private void Awake()
{
physGrabObject = ((Component)this).GetComponent<PhysGrabObject>();
photonView = ((Component)this).GetComponent<PhotonView>();
}
private void Update()
{
float num = Mathf.Lerp(2f, 0.5f, soundPitchLerp);
soundLoop.PlayLoop(currentState == States.Active, 0.8f, 0.8f, num);
switch (currentState)
{
case States.Idle:
StateIdle();
break;
case States.Active:
StateActive();
break;
}
}
private void StateIdle()
{
//IL_00be: Unknown result type (might be due to invalid IL or missing references)
if (stateStart)
{
particleSystemGlitter.Stop();
particleSystemSwirl.Stop();
stateStart = false;
}
if (physGrabObject.grabbed)
{
SetState(States.Active);
}
light.intensity = Mathf.Lerp(light.intensity, 0f, Time.deltaTime * 10f);
soundPitchLerp = Mathf.Lerp(soundPitchLerp, 0f, Time.deltaTime * 10f);
ColorUtility.TryParseHtmlString(Plugins.ModConfig.ConfigStopwatchOFFMaterial.Value, ref color);
((Renderer)meshRenderer).material.SetColor("_EmissionColor", color);
if (light.intensity < 0.01f)
{
((Component)light).gameObject.SetActive(false);
}
}
private void StateActive()
{
//IL_0106: Unknown result type (might be due to invalid IL or missing references)
//IL_0116: Unknown result type (might be due to invalid IL or missing references)
if (stateStart)
{
particleSystemGlitter.Play();
particleSystemSwirl.Play();
stateStart = false;
((Component)light).gameObject.SetActive(true);
GenerateNewNeedleTargets();
}
if (!((Component)light).gameObject.activeSelf)
{
((Component)light).gameObject.SetActive(true);
}
if (((Component)particleSystemTransform).gameObject.activeSelf)
{
HasValidTarget();
}
soundPitchLerp = Mathf.Lerp(soundPitchLerp, 1f, Time.deltaTime * 2f);
light.intensity = Mathf.Lerp(light.intensity, 4f, Time.deltaTime * 2f);
ColorUtility.TryParseHtmlString(Plugins.ModConfig.ConfigStopwatchONMaterial.Value, ref color);
((Renderer)meshRenderer).material.SetColor("_EmissionColor", color * light.intensity);
foreach (PhysGrabber item in physGrabObject.playerGrabbing)
{
if (Object.op_Implicit((Object)(object)item) && !item.isLocal)
{
item.playerAvatar.voiceChat.OverridePitch(Plugins.ModConfig.ConfigOthersVoicePitchMultiplier.Value, 1f, 2f, 0.1f, 0f, 0f);
}
}
if (SemiFunc.IsMasterClientOrSingleplayer())
{
physGrabObject.OverrideDrag(Plugins.ModConfig.ConfigOverrideDrag.Value, 0.1f);
physGrabObject.OverrideAngularDrag(Plugins.ModConfig.ConfigOverrideAngularDrag.Value, 0.1f);
PlayerSpeed = Plugins.ModConfig.ConfigOverridePlayerSpeed.Value;
LookSpeed = Plugins.ModConfig.ConfigOverridePlayerLookSpeed.Value;
ZoomSet = Plugins.ModConfig.ConfigOverrideStopwatchZoomSet.Value;
Saturation = Plugins.ModConfig.ConfigSaturationOverride.Value;
photonView.RPC("SyncConfigValuesRPC", (RpcTarget)1, new object[4] { PlayerSpeed, ZoomSet, LookSpeed, Saturation });
if (!physGrabObject.grabbed)
{
SetState(States.Idle);
}
}
if (physGrabObject.grabbedLocal)
{
PlayerAvatar.instance.voiceChat.OverridePitch(Plugins.ModConfig.ConfigOwnVoicePitchMultiplier.Value, 1f, 2f, 0.1f, 0f, 0f);
PlayerAvatar.instance.OverridePupilSize(Plugins.ModConfig.ConfigOverrideStopwatchPupilSize.Value, 4, 1f, 1f, 5f, 0.5f, 0.1f);
PlayerController.instance.OverrideSpeed(PlayerSpeed, 0.1f);
PlayerController.instance.OverrideLookSpeed(PlayerSpeed + LookSpeed, 2f, 1f, 0.1f);
PlayerController.instance.OverrideAnimationSpeed(0.2f, 1f, 2f, 0.1f);
PlayerController.instance.OverrideTimeScale(0.1f, 0.1f);
physGrabObject.OverrideTorqueStrength(0.6f, 0.1f);
CameraZoom.Instance.OverrideZoomSet(ZoomSet, 0.1f, 0.5f, 1f, ((Component)this).gameObject, 0);
PostProcessing.Instance.SaturationOverride(Saturation, 0.1f, 0.5f, 0.1f, ((Component)this).gameObject);
RotateNeedleTowards(minNeedle, ref minTargetRot, minNeedleSpeed);
RotateNeedleTowards(hourNeedle, ref hourTargetRot, hourNeedleSpeed);
RotateNeedleTowards(secNeedle, ref secTargetRot, secNeedleSpeed);
}
}
private void HasValidTarget()
{
List<PhysGrabber> playerGrabbing = physGrabObject.playerGrabbing;
if (playerGrabbing.Count > particleFocus)
{
PhysGrabber val = playerGrabbing[particleFocus];
if (Object.op_Implicit((Object)(object)val))
{
Transform headLookAtTransform = val.playerAvatar.playerAvatarVisuals.headLookAtTransform;
if (Object.op_Implicit((Object)(object)headLookAtTransform))
{
particleSystemTransform.LookAt(headLookAtTransform);
}
particleFocus++;
}
else
{
particleFocus = 0;
}
}
else
{
particleFocus = 0;
}
}
private void GenerateNewNeedleTargets()
{
//IL_001b: Unknown result type (might be due to invalid IL or missing references)
//IL_0020: 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_0044: Unknown result type (might be due to invalid IL or missing references)
//IL_0063: 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)
minTargetRot = Quaternion.Euler(0f, 0f, Random.Range(0f, 360f));
hourTargetRot = Quaternion.Euler(0f, 0f, Random.Range(0f, 360f));
secTargetRot = Quaternion.Euler(0f, 0f, Random.Range(0f, 360f));
minNeedleSpeed = Random.Range(minNeedleSpeedRange.x, minNeedleSpeedRange.y);
hourNeedleSpeed = Random.Range(hourNeedleSpeedRange.x, hourNeedleSpeedRange.y);
secNeedleSpeed = Random.Range(secNeedleSpeedRange.x, secNeedleSpeedRange.y);
}
private void RotateNeedleTowards(Transform needle, ref Quaternion target, float speed)
{
//IL_0003: 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_0015: Unknown result type (might be due to invalid IL or missing references)
//IL_0021: Unknown result type (might be due to invalid IL or missing references)
//IL_0027: 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_005c: Unknown result type (might be due to invalid IL or missing references)
needle.localRotation = Quaternion.RotateTowards(needle.localRotation, target, speed * Time.deltaTime);
if (Quaternion.Angle(needle.localRotation, target) < 1f)
{
target = Quaternion.Euler(0f, 0f, Random.Range(0f, 360f));
speed = Random.Range(30f, 90f);
}
}
private void SetState(States state)
{
if (SemiFunc.IsMasterClientOrSingleplayer() && !SemiFunc.IsMultiplayer())
{
SetStateRPC(state);
return;
}
photonView.RPC("SetStateRPC", (RpcTarget)0, new object[1] { state });
}
[PunRPC]
private void SetStateRPC(States state)
{
currentState = state;
stateStart = true;
}
[PunRPC]
private void SyncConfigValuesRPC(float playerSpeed, float zoomSet, float lookSpeed, float saturation)
{
PlayerSpeed = playerSpeed;
ZoomSet = zoomSet;
LookSpeed = lookSpeed;
Saturation = saturation;
}
}
}
namespace SteampunkItems.Items_SP
{
internal class Bombolver : MonoBehaviour
{
}
public class Pickaxe : MonoBehaviour
{
public Animator animator;
private PhysGrabObject physGrabObject;
private PhotonView photonView;
private bool isGrabbed = false;
private bool wasGrabbedOnPreviousUpdate;
private void Awake()
{
physGrabObject = ((Component)this).GetComponent<PhysGrabObject>();
photonView = ((Component)this).GetComponent<PhotonView>();
}
private void Update()
{
if ((Object)(object)physGrabObject != (Object)null)
{
isGrabbed = physGrabObject.grabbed;
}
if (SemiFunc.IsMultiplayer())
{
if (isGrabbed != wasGrabbedOnPreviousUpdate)
{
photonView.RPC("SetAnimationState", (RpcTarget)0, new object[1] { isGrabbed });
}
}
else if (isGrabbed != wasGrabbedOnPreviousUpdate)
{
SetAnimationState(isGrabbed);
}
wasGrabbedOnPreviousUpdate = isGrabbed;
}
[PunRPC]
public void SetAnimationState(bool grab)
{
if (grab)
{
animator.SetBool("Grab", true);
animator.SetBool("Release", false);
}
else
{
animator.SetBool("Release", true);
animator.SetBool("Grab", false);
}
}
}
}
namespace SteampunkItems.Configs
{
public class ConfigEntries
{
public ConfigEntry<bool> ConfigPromptEnable { get; private set; }
public ConfigEntry<bool> ConfigFirstGrab { get; private set; }
public ConfigEntry<float> ConfigGrabbedMusicVolume { get; private set; }
public ConfigEntry<float> ConfigUngrabbedMusicVolume { get; private set; }
public ConfigEntry<string> ConfigBlacklistedSongs { get; private set; }
public ConfigEntry<string> ConfigStopwatchONMaterial { get; private set; }
public ConfigEntry<string> ConfigStopwatchOFFMaterial { get; private set; }
public ConfigEntry<float> ConfigOwnVoicePitchMultiplier { get; private set; }
public ConfigEntry<float> ConfigOthersVoicePitchMultiplier { get; private set; }
public ConfigEntry<float> ConfigOverridePlayerSpeed { get; private set; }
public ConfigEntry<float> ConfigOverridePlayerLookSpeed { get; private set; }
public ConfigEntry<float> ConfigOverrideStopwatchZoomSet { get; private set; }
public ConfigEntry<float> ConfigSaturationOverride { get; private set; }
public ConfigEntry<float> ConfigOverrideStopwatchPupilSize { get; private set; }
public ConfigEntry<float> ConfigOverrideDrag { get; private set; }
public ConfigEntry<float> ConfigOverrideAngularDrag { get; private set; }
public void ConfigManager(ConfigFile configFile)
{
//IL_0065: Unknown result type (might be due to invalid IL or missing references)
//IL_006f: Expected O, but got Unknown
//IL_009f: Unknown result type (might be due to invalid IL or missing references)
//IL_00a9: Expected O, but got Unknown
//IL_013c: Unknown result type (might be due to invalid IL or missing references)
//IL_0146: Expected O, but got Unknown
//IL_0176: Unknown result type (might be due to invalid IL or missing references)
//IL_0180: Expected O, but got Unknown
//IL_01b0: Unknown result type (might be due to invalid IL or missing references)
//IL_01ba: Expected O, but got Unknown
//IL_01ea: Unknown result type (might be due to invalid IL or missing references)
//IL_01f4: Expected O, but got Unknown
//IL_0224: Unknown result type (might be due to invalid IL or missing references)
//IL_022e: Expected O, but got Unknown
//IL_025e: Unknown result type (might be due to invalid IL or missing references)
//IL_0268: Expected O, but got Unknown
//IL_0298: Unknown result type (might be due to invalid IL or missing references)
//IL_02a2: Expected O, but got Unknown
//IL_02d2: Unknown result type (might be due to invalid IL or missing references)
//IL_02dc: Expected O, but got Unknown
//IL_030c: Unknown result type (might be due to invalid IL or missing references)
//IL_0316: Expected O, but got Unknown
ConfigPromptEnable = configFile.Bind<bool>("Headset Options", "Tool tip | Text", true, "Allows you to disable tool tip");
ConfigFirstGrab = configFile.Bind<bool>("Headset Options", "Music | First Grab", true, "Allows you to disable first grab feature where a random music-particle pair is toggled on.");
ConfigGrabbedMusicVolume = configFile.Bind<float>("Headset Options", "Music | Grabbed Volume", 0.5f, new ConfigDescription("Allows you to change the volume when its playing while grabbed (default: 0.5).", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), Array.Empty<object>()));
ConfigUngrabbedMusicVolume = configFile.Bind<float>("Headset Options", "Music | Ungrabbed Volume", 0.1f, new ConfigDescription("Allows you to change the volume when its playing on the floor (default: 0.1).", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), Array.Empty<object>()));
ConfigBlacklistedSongs = configFile.Bind<string>("Headset Options", "Music | Blacklisted Song-Particle pair", "", "Allows you to remove song-particle pairs. There are 8 pairs (0-7), if you want to remove first, third, and fourth you would need to type '0, 2, 3'.");
ConfigStopwatchONMaterial = configFile.Bind<string>("Stopwatch Options", "Material | Color ON", "#420069", "Allows you to change the material's color in HEX format while not grabbing the valuable (Default: #FFFFFF)");
ConfigStopwatchOFFMaterial = configFile.Bind<string>("Stopwatch Options", "Material | Color OFF", "#690420", "Allows you to change the material's color in HEX format while grabbing the valuable (Default: #FFFFF)");
ConfigOwnVoicePitchMultiplier = configFile.Bind<float>("Stopwatch Options", "Sounds | Own Voice Pitch Multiplier", 0.65f, new ConfigDescription("Allows you to adjust the pitch multiplier for your own voice while grabbing the valuable (default: 0.65).", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0.55f, 1.15f), Array.Empty<object>()));
ConfigOthersVoicePitchMultiplier = configFile.Bind<float>("Stopwatch Options", "Sounds | Other Grabbers Pitch Multiplier", 0.65f, new ConfigDescription("Allows you to adjust the pitch multiplier for other players' voices while grabbing the valuable (default: 0.65).", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0.55f, 1.15f), Array.Empty<object>()));
ConfigOverridePlayerSpeed = configFile.Bind<float>("Stopwatch Options", "Overrides | Speed", 0.5f, new ConfigDescription("Allows you to adjust override speed (LOOKSPEED SCALES WITH THIS) for the player while grabbing the valuable (default: 0.5).", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0.35f, 2f), Array.Empty<object>()));
ConfigOverridePlayerLookSpeed = configFile.Bind<float>("Stopwatch Options", "Overrides | Look Speed", 0.5f, new ConfigDescription("Allows you to adjust override look speed (Playerspeed + LookSpeedConfig = overall lookspeed) override for the player while grabbing the valuable (default: 0.5).", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0.1f, 2f), Array.Empty<object>()));
ConfigOverrideStopwatchZoomSet = configFile.Bind<float>("Stopwatch Options", "Overrides | Zoom", 50f, new ConfigDescription("Allows you to adjust override zoom for the player while grabbing the valuable [NOTE: 30 is closer, 100 is farther] (default: 50).", (AcceptableValueBase)(object)new AcceptableValueRange<float>(30f, 100f), Array.Empty<object>()));
ConfigSaturationOverride = configFile.Bind<float>("Stopwatch Options", "Overrides | Saturation", 50f, new ConfigDescription("Allows you to adjust override saturation for the player while grabbing the valuable (default: 50).", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0.1f, 100f), Array.Empty<object>()));
ConfigOverrideStopwatchPupilSize = configFile.Bind<float>("Stopwatch Options", "Overrides | Pupil Size", 3f, new ConfigDescription("Allow you to adjust override pupil size for the player while grabbing the valuable (default: 3).", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0.1f, 5f), Array.Empty<object>()));
ConfigOverrideDrag = configFile.Bind<float>("Stopwatch Options", "Overrides | Drag", 20f, new ConfigDescription("Allow you to adjust override drag value for the player while grabbing the valuable (default: 20).", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0.1f, 25f), Array.Empty<object>()));
ConfigOverrideAngularDrag = configFile.Bind<float>("Stopwatch Options", "Overrides | Angular Drag", 40f, new ConfigDescription("Allow you to adjust override angular drag value for the player while grabbing the valuable (default: 40).", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0.1f, 45f), Array.Empty<object>()));
}
}
}
namespace System.Runtime.CompilerServices
{
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
internal sealed class IgnoresAccessChecksToAttribute : Attribute
{
public IgnoresAccessChecksToAttribute(string assemblyName)
{
}
}
}