using System;
using System.Collections;
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;
[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.3.0")]
[assembly: AssemblyInformationalVersion("1.1.3+1bf094100abd356d7b8e099ae319a17e89a7812a")]
[assembly: AssemblyProduct("SteampunkItems")]
[assembly: AssemblyTitle("SteampunkItems")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.1.3.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;
}
}
}
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
{
[BepInPlugin("SteampunkItems", "SteampunkItems", "1.1.3")]
[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>(6) { "Valuable MagniGlass_SP", "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>();
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.3";
}
}
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 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>();
}
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_01ad: Unknown result type (might be due to invalid IL or missing references)
//IL_01c3: Unknown result type (might be due to invalid IL or missing references)
//IL_0155: Unknown result type (might be due to invalid IL or missing references)
//IL_016b: 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;
if (showTimer > 0f)
{
showTimer -= Time.deltaTime;
curveLerp += 10f * Time.deltaTime;
curveLerp = Mathf.Clamp01(curveLerp);
prompt.transform.localScale = scale * curveIntro.Evaluate(curveLerp);
}
else
{
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()
{
//IL_0069: 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_0070: Unknown result type (might be due to invalid IL or missing references)
//IL_0073: Unknown result type (might be due to invalid IL or missing references)
//IL_0078: 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)
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 green = Color.green;
Color val = green * num3;
val.a = 1f;
fontMaterial.SetColor("_GlowColor", val);
}
}
private void ToggleAudio()
{
if (toggle.toggleState)
{
gradientTime += Time.deltaTime * speed;
if (gradientTime > 1f)
{
gradientTime -= 1f;
}
SetRandomGradientCorners();
AnimateGlowHeartbeat();
((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 (!toggle.toggleState)
{
((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);
}
}
[PunRPC]
private void PlaySongRPC(int songIndex)
{
if (!isPlaying)
{
isPlaying = true;
audioSource.clip = songs[songIndex];
audioSource.Play();
_currentSongIndex = songIndex;
PlayParticles(songIndex);
}
}
}
public class LogPose : MonoBehaviour
{
[CompilerGenerated]
private sealed class <EmitParticles>d__12 : IEnumerator<object>, IEnumerator, IDisposable
{
private int <>1__state;
private object <>2__current;
public LogPose <>4__this;
private float <timer>5__1;
private int <steps>5__2;
private int <i>5__3;
private float <t>5__4;
private Vector3 <pos>5__5;
object IEnumerator<object>.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
object IEnumerator.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
[DebuggerHidden]
public <EmitParticles>d__12(int <>1__state)
{
this.<>1__state = <>1__state;
}
[DebuggerHidden]
void IDisposable.Dispose()
{
<>1__state = -2;
}
private bool MoveNext()
{
//IL_0045: Unknown result type (might be due to invalid IL or missing references)
//IL_004a: Unknown result type (might be due to invalid IL or missing references)
//IL_005b: Unknown result type (might be due to invalid IL or missing references)
//IL_0080: 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_0096: Unknown result type (might be due to invalid IL or missing references)
//IL_00a1: 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_00fd: Unknown result type (might be due to invalid IL or missing references)
//IL_0108: Unknown result type (might be due to invalid IL or missing references)
//IL_010d: Unknown result type (might be due to invalid IL or missing references)
//IL_0119: Unknown result type (might be due to invalid IL or missing references)
switch (<>1__state)
{
default:
return false;
case 0:
<>1__state = -1;
<timer>5__1 = 0f;
break;
case 1:
<>1__state = -1;
break;
}
if (<timer>5__1 < <>4__this.guideTimer)
{
<>4__this.startPos = ((Component)<>4__this).transform.position;
<>4__this.extractionPoint = SemiFunc.ExtractionPointGetNearest(<>4__this.startPos);
<>4__this.endPos = ((Component)<>4__this.extractionPoint).transform.position;
<>4__this.distance = Vector3.Distance(<>4__this.startPos, <>4__this.endPos);
<steps>5__2 = Mathf.CeilToInt(<>4__this.particlesPerSecond * Time.deltaTime);
<i>5__3 = 0;
while (<i>5__3 < <steps>5__2)
{
<t>5__4 = (float)<i>5__3 / (float)<steps>5__2;
<pos>5__5 = Vector3.Lerp(<>4__this.startPos, <>4__this.endPos, <t>5__4);
<>4__this.EmitAtPos(<pos>5__5, <t>5__4);
int num = <i>5__3 + 1;
<i>5__3 = num;
}
<timer>5__1 += Time.deltaTime;
<>2__current = null;
<>1__state = 1;
return true;
}
return false;
}
bool IEnumerator.MoveNext()
{
//ILSpy generated this explicit interface implementation from .override directive in MoveNext
return this.MoveNext();
}
[DebuggerHidden]
void IEnumerator.Reset()
{
throw new NotSupportedException();
}
}
[SerializeField]
private ParticleSystem ps;
private PhotonView photonView;
private PhysGrabObject physGrabObject;
private ExtractionPoint extractionPoint;
private Vector3 startPos;
private Vector3 endPos;
private bool activeExtPoint;
private float guideTimer;
private float particlesPerSecond = 100f;
private float distance;
private void Awake()
{
photonView = ((Component)this).GetComponent<PhotonView>();
physGrabObject = ((Component)this).GetComponent<PhysGrabObject>();
}
private void Update()
{
if (!physGrabObject.grabbed)
{
}
}
[IteratorStateMachine(typeof(<EmitParticles>d__12))]
private IEnumerator EmitParticles()
{
//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
return new <EmitParticles>d__12(0)
{
<>4__this = this
};
}
private void EmitAtPos(Vector3 pos, float t)
{
//IL_0003: 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)
//IL_0037: 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_0049: Unknown result type (might be due to invalid IL or missing references)
//IL_0054: Unknown result type (might be due to invalid IL or missing references)
//IL_0055: 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)
EmitParams val = default(EmitParams);
((EmitParams)(ref val)).position = pos;
((EmitParams)(ref val)).startLifetime = 1f;
((EmitParams)(ref val)).startColor = Color32.op_Implicit(new Color(1f, 1f, 1f, 1f - t));
((EmitParams)(ref val)).velocity = Vector3.zero;
EmitParams val2 = val;
ps.Emit(val2, 1);
}
}
public class MagniGlass : MonoBehaviour
{
public enum States
{
Idle,
Active
}
[CompilerGenerated]
private sealed class <ResetIndestructibleAfterDelay>d__15 : IEnumerator<object>, IEnumerator, IDisposable
{
private int <>1__state;
private object <>2__current;
public float delay;
public MagniGlass <>4__this;
object IEnumerator<object>.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
object IEnumerator.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
[DebuggerHidden]
public <ResetIndestructibleAfterDelay>d__15(int <>1__state)
{
this.<>1__state = <>1__state;
}
[DebuggerHidden]
void IDisposable.Dispose()
{
<>1__state = -2;
}
private bool MoveNext()
{
//IL_0027: Unknown result type (might be due to invalid IL or missing references)
//IL_0031: Expected O, but got Unknown
switch (<>1__state)
{
default:
return false;
case 0:
<>1__state = -1;
<>2__current = (object)new WaitForSeconds(delay);
<>1__state = 1;
return true;
case 1:
<>1__state = -1;
<>4__this.physGrabObject.OverrideIndestructible(0f);
<>4__this.resetIndestructibleCoroutine = null;
return false;
}
}
bool IEnumerator.MoveNext()
{
//ILSpy generated this explicit interface implementation from .override directive in MoveNext
return this.MoveNext();
}
[DebuggerHidden]
void IEnumerator.Reset()
{
throw new NotSupportedException();
}
}
private PhotonView photonView;
private PhysGrabObject physGrabObject;
private Transform forceGrabPoint;
private bool stateStart;
private bool wasGrabbedLastFrame = false;
private int ownerActorNumber = -1;
private Coroutine resetIndestructibleCoroutine;
public States _currentState;
private void Awake()
{
photonView = ((Component)this).GetComponent<PhotonView>();
physGrabObject = ((Component)this).GetComponent<PhysGrabObject>();
forceGrabPoint = ((Component)this).transform.Find("Force Grab Point");
}
private void Update()
{
switch (_currentState)
{
case States.Idle:
StateIdle();
break;
case States.Active:
StateActive();
break;
}
}
private void StateIdle()
{
if (stateStart)
{
stateStart = false;
}
if (physGrabObject.grabbedLocal)
{
SetState(States.Active);
}
}
private void StateActive()
{
if (stateStart)
{
stateStart = false;
}
bool grabbedLocal = physGrabObject.grabbedLocal;
int actorNumber = PhotonNetwork.LocalPlayer.ActorNumber;
if (grabbedLocal)
{
if (ownerActorNumber != actorNumber)
{
ownerActorNumber = actorNumber;
}
if (resetIndestructibleCoroutine != null)
{
((MonoBehaviour)this).StopCoroutine(resetIndestructibleCoroutine);
}
physGrabObject.OverrideIndestructible(0.5f);
resetIndestructibleCoroutine = ((MonoBehaviour)this).StartCoroutine(ResetIndestructibleAfterDelay(0.5f));
}
if (grabbedLocal && ownerActorNumber == actorNumber)
{
physGrabObject.forceGrabPoint = forceGrabPoint;
if (SemiFunc.IsMultiplayer())
{
photonView.RPC("ForcePosition", (RpcTarget)0, Array.Empty<object>());
}
else
{
ForcePosition();
}
PhysGrabber.instance.OverrideGrabDistance(0.5f);
PlayerAvatar.instance.OverridePupilSize(3f, 4, 1f, 1f, 5f, 0.5f, 0.1f);
CameraZoom.Instance.OverrideZoomSet(40f, 0.1f, 0.5f, 1f, ((Component)this).gameObject, 0);
}
if (!grabbedLocal && wasGrabbedLastFrame && ownerActorNumber == actorNumber)
{
ownerActorNumber = -1;
}
if (!grabbedLocal)
{
SetState(States.Idle);
}
wasGrabbedLastFrame = grabbedLocal;
}
private void SetState(States newState)
{
_currentState = newState;
stateStart = true;
}
[PunRPC]
public void ForcePosition()
{
//IL_0010: 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_0025: 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_002b: 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_0044: Unknown result type (might be due to invalid IL or missing references)
//IL_0045: Unknown result type (might be due to invalid IL or missing references)
//IL_0046: Unknown result type (might be due to invalid IL or missing references)
Quaternion val = Quaternion.Euler(-30f, 0f, 10f);
Quaternion val2 = Quaternion.Euler(50f, 180f, 0f);
Quaternion identity = Quaternion.identity;
if (0 == 0)
{
physGrabObject.TurnXYZ(val, val2, identity);
}
physGrabObject.OverrideGrabVerticalPosition(-0.24f);
}
[IteratorStateMachine(typeof(<ResetIndestructibleAfterDelay>d__15))]
private IEnumerator ResetIndestructibleAfterDelay(float delay)
{
//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
return new <ResetIndestructibleAfterDelay>d__15(0)
{
<>4__this = this,
delay = delay
};
}
}
}
namespace SteampunkItems.Items_SP
{
internal class Bombolver : MonoBehaviour
{
}
}
namespace SteampunkItems.Configs
{
public class ConfigEntries
{
public ConfigEntry<bool> ConfigFirstGrab { get; private set; }
public ConfigEntry<float> ConfigGrabbedMusicVolume { get; private set; }
public ConfigEntry<float> ConfigUngrabbedMusicVolume { get; private set; }
public void ConfigManager(ConfigFile configFile)
{
//IL_0048: Unknown result type (might be due to invalid IL or missing references)
//IL_0052: Expected O, but got Unknown
//IL_0082: Unknown result type (might be due to invalid IL or missing references)
//IL_008c: Expected O, but got Unknown
ConfigFirstGrab = configFile.Bind<bool>("Headset Options", "Headset | 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", "Headset | Grabbed Music Volume", 0.5f, new ConfigDescription("Allows you to change the volume when its playing while grabbed.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), Array.Empty<object>()));
ConfigUngrabbedMusicVolume = configFile.Bind<float>("Headset Options", "Headset | Ungrabbed Music Volume", 0.1f, new ConfigDescription("Allows you to change the volume when its playing on the floor.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0f, 1f), Array.Empty<object>()));
}
}
}
namespace System.Runtime.CompilerServices
{
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
internal sealed class IgnoresAccessChecksToAttribute : Attribute
{
public IgnoresAccessChecksToAttribute(string assemblyName)
{
}
}
}