using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Logging;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using Photon.Pun;
using REPOLib.Modules;
using UnityEngine;
using UnityEngine.Events;
[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("")]
[assembly: AssemblyCompany("Arkanio")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("OrgyAndHotSauce")]
[assembly: AssemblyTitle("OrgyAndHotSauce")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.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.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
internal sealed class NullableAttribute : Attribute
{
public readonly byte[] NullableFlags;
public NullableAttribute(byte P_0)
{
NullableFlags = new byte[1] { P_0 };
}
public NullableAttribute(byte[] P_0)
{
NullableFlags = P_0;
}
}
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
internal sealed class NullableContextAttribute : Attribute
{
public readonly byte Flag;
public NullableContextAttribute(byte P_0)
{
Flag = P_0;
}
}
[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 ButterValuable : MonoBehaviour
{
public float MaxSpeed;
private PhotonView photonView;
private PhysGrabObject physGrabObject;
private Rigidbody rb;
private void Start()
{
Debug.Log((object)"Butter Time !!! ");
photonView = ((Component)this).GetComponent<PhotonView>();
rb = ((Component)this).GetComponent<Rigidbody>();
physGrabObject = ((Component)this).GetComponent<PhysGrabObject>();
}
private void FixedUpdate()
{
if (!((Object)(object)photonView == (Object)null) && SemiFunc.IsMasterClientOrSingleplayer())
{
if (SemiFunc.IsMultiplayer())
{
photonView.RPC("ButterDrop", (RpcTarget)0, Array.Empty<object>());
}
else
{
ButterDrop();
}
}
}
[PunRPC]
public void ButterDrop()
{
//IL_003c: Unknown result type (might be due to invalid IL or missing references)
//IL_0041: Unknown result type (might be due to invalid IL or missing references)
if ((Object)(object)rb == (Object)null || (Object)(object)photonView == (Object)null || (Object)(object)physGrabObject == (Object)null)
{
return;
}
Vector3 velocity = rb.velocity;
float magnitude = ((Vector3)(ref velocity)).magnitude;
if (!(magnitude >= MaxSpeed))
{
return;
}
List<PhysGrabber> list = new List<PhysGrabber>(physGrabObject.playerGrabbing);
foreach (PhysGrabber item in list)
{
if (!SemiFunc.IsMultiplayer())
{
item.ReleaseObjectRPC(true, 2f);
}
item.photonView.RPC("ReleaseObjectRPC", (RpcTarget)0, new object[2] { true, 2f });
}
}
}
public class ColliderEvent : MonoBehaviour
{
public UnityEvent<Collider> OnTriggerEnterEvt;
public UnityEvent<Collider> OnTriggerStayEvt;
public UnityEvent<Collider> OnTriggerExitEvt;
public UnityEvent<Collision> OnCollisionEnterEvt;
public UnityEvent<Collision> OnCollisionStayEvt;
public UnityEvent<Collision> OnCollisionExitEvt;
private void OnCollisionEnter(Collision collision)
{
OnCollisionEnterEvt.Invoke(collision);
}
private void OnCollisionStay(Collision collision)
{
OnCollisionStayEvt.Invoke(collision);
}
private void OnCollisionExit(Collision collision)
{
OnCollisionExitEvt.Invoke(collision);
}
private void OnTriggerEnter(Collider other)
{
OnTriggerEnterEvt.Invoke(other);
}
private void OnTriggerStay(Collider other)
{
OnTriggerStayEvt.Invoke(other);
}
private void OnTriggerExit(Collider other)
{
OnTriggerExitEvt.Invoke(other);
}
}
public class ItemCursedGun : MonoBehaviour
{
[Range(0f, 100f)]
public int PercentageToMiss = 10;
private bool HasShotWrong = false;
private Transform ToFocus;
internal Rigidbody rb;
internal PhysGrabObject physGrabObject;
private ItemGun ItemGun;
public GameObject ChargeBeamPrefab;
public Transform GunMuzzle;
private ParticleSystem ChargeMuzzleParticles;
private PhotonView photonView;
public void Start()
{
Debug.Log((object)"Cursed Gun Has Spawn");
rb = ((Component)this).GetComponent<Rigidbody>();
physGrabObject = ((Component)this).GetComponent<PhysGrabObject>();
ItemGun = ((Component)this).GetComponent<ItemGun>();
photonView = ((Component)this).GetComponent<PhotonView>();
}
public void CheckLuck()
{
int num = Random.Range(0, 100);
HasShotWrong = num < PercentageToMiss;
Debug.Log((object)num);
if (HasShotWrong)
{
ToFocus = ((Component)physGrabObject.playerGrabbing[0]).transform;
physGrabObject.frozen = true;
}
if (SemiFunc.IsMultiplayer())
{
photonView.RPC("CursedMuzzleCharge", (RpcTarget)0, Array.Empty<object>());
}
else
{
CursedMuzzleCharge();
}
}
public void RotateAtShot()
{
//IL_0022: Unknown result type (might be due to invalid IL or missing references)
//IL_002d: Unknown result type (might be due to invalid IL or missing references)
//IL_0032: 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_003a: 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_004b: Unknown result type (might be due to invalid IL or missing references)
if (HasShotWrong && Object.op_Implicit((Object)(object)ToFocus))
{
Vector3 val = ToFocus.position - ((Component)this).transform.position;
Quaternion val2 = Quaternion.LookRotation(((Vector3)(ref val)).normalized);
rb.MoveRotation(val2);
}
}
public void ShotFinished()
{
//IL_0009: Unknown result type (might be due to invalid IL or missing references)
//IL_0013: Expected O, but got Unknown
HasShotWrong = false;
ToFocus = new Transform();
physGrabObject.frozen = false;
}
public void DeathShoot()
{
//IL_0033: Unknown result type (might be due to invalid IL or missing references)
//IL_0039: Unknown result type (might be due to invalid IL or missing references)
if (SemiFunc.IsMultiplayer())
{
ItemGun.photonView.RPC("ShootRPC", (RpcTarget)0, Array.Empty<object>());
}
else
{
ItemGun.ShootRPC(default(PhotonMessageInfo));
}
}
[PunRPC]
public void CursedMuzzleCharge()
{
//IL_000d: Unknown result type (might be due to invalid IL or missing references)
//IL_0018: Unknown result type (might be due to invalid IL or missing references)
GameObject val = Object.Instantiate<GameObject>(ChargeBeamPrefab, GunMuzzle.position, GunMuzzle.rotation, GunMuzzle);
val.SetActive(true);
val.GetComponent<ParticleManager>().Play(DestroyAtEnd: true);
}
}
public class HotSauceValuable : MonoBehaviour
{
[Serializable]
public struct HotSauceProjectile
{
public Vector3 BaseVelocity;
}
public GameObject? FireSaucePrefab;
public Vector3[] ProjectilesVelocity;
private PhotonView? photonView;
private void Start()
{
Debug.Log((object)"Hot Sauce is HEEEEEEEEERE !!! ");
photonView = ((Component)this).GetComponent<PhotonView>();
if ((Object)(object)FireSaucePrefab != (Object)null && !NetworkPrefabs.HasNetworkPrefab(((Object)FireSaucePrefab).name))
{
Debug.Log((object)("Prefab Name : " + ((Object)FireSaucePrefab).name));
NetworkPrefabs.RegisterNetworkPrefab(((Object)FireSaucePrefab).name, FireSaucePrefab);
}
}
public void OnBreak()
{
//IL_004e: Unknown result type (might be due to invalid IL or missing references)
//IL_0053: Unknown result type (might be due to invalid IL or missing references)
//IL_0072: Unknown result type (might be due to invalid IL or missing references)
//IL_0077: 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)
if ((Object)(object)photonView == (Object)null || (Object)(object)FireSaucePrefab == (Object)null || !SemiFunc.IsMasterClientOrSingleplayer())
{
return;
}
Debug.Log((object)"Sauce Broken");
Vector3[] projectilesVelocity = ProjectilesVelocity;
foreach (Vector3 velocity in projectilesVelocity)
{
Debug.Log((object)"I Spawned !");
GameObject val = NetworkPrefabs.SpawnNetworkPrefab(((Object)FireSaucePrefab).name, ((Component)this).transform.position, Quaternion.identity, (byte)0, (object[])null);
if ((Object)(object)val == (Object)null)
{
break;
}
Rigidbody component = val.GetComponent<Rigidbody>();
if (!((Object)(object)component == (Object)null))
{
component.velocity = velocity;
}
}
}
}
public class ParticleManager : MonoBehaviour
{
[CompilerGenerated]
private sealed class <DestroyAtTheEnd>d__5 : IEnumerator<object>, IEnumerator, IDisposable
{
private int <>1__state;
private object <>2__current;
public ParticleManager <>4__this;
object IEnumerator<object>.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
object IEnumerator.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
[DebuggerHidden]
public <DestroyAtTheEnd>d__5(int <>1__state)
{
this.<>1__state = <>1__state;
}
[DebuggerHidden]
void IDisposable.Dispose()
{
<>1__state = -2;
}
private bool MoveNext()
{
//IL_0031: Unknown result type (might be due to invalid IL or missing references)
//IL_003b: Expected O, but got Unknown
switch (<>1__state)
{
default:
return false;
case 0:
<>1__state = -1;
<>2__current = (object)new WaitForSeconds(0.1f);
<>1__state = 1;
return true;
case 1:
<>1__state = -1;
break;
case 2:
<>1__state = -1;
break;
}
if (<>4__this.AreParticleSystemPlaying())
{
<>2__current = null;
<>1__state = 2;
return true;
}
Object.Destroy((Object)(object)((Component)<>4__this).gameObject);
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();
}
}
public List<ParticleSystem> ParticleSystems = new List<ParticleSystem>();
private IEnumerator? DestroyCouroutine;
private void Awake()
{
if (ParticleSystems == null || ParticleSystems.Count == 0)
{
ParticleSystems = new List<ParticleSystem>(((Component)this).GetComponentsInChildren<ParticleSystem>());
}
}
public void Play(bool DestroyAtEnd)
{
foreach (ParticleSystem particleSystem in ParticleSystems)
{
particleSystem.Play();
}
if (DestroyCouroutine != null)
{
((MonoBehaviour)this).StopCoroutine(DestroyCouroutine);
}
if (DestroyAtEnd)
{
DestroyCouroutine = DestroyAtTheEnd();
((MonoBehaviour)this).StartCoroutine(DestroyCouroutine);
}
}
private bool AreParticleSystemPlaying()
{
foreach (ParticleSystem particleSystem in ParticleSystems)
{
if (!particleSystem.isPlaying)
{
return false;
}
}
return true;
}
[IteratorStateMachine(typeof(<DestroyAtTheEnd>d__5))]
private IEnumerator DestroyAtTheEnd()
{
//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
return new <DestroyAtTheEnd>d__5(0)
{
<>4__this = this
};
}
}
public class PaulValuable : MonoBehaviour
{
public Sound? soundSexyMusic;
public Light? portraitLight;
public float portraitLightMaxIntensity = 5f;
public float portraitLightSpeed = 3f;
private float portraitLightIntensity = 0f;
private PhysGrabObject? physGrabObject;
public ParticleSystem HeartsParticle;
public void Start()
{
physGrabObject = ((Component)this).GetComponent<PhysGrabObject>();
}
public void Update()
{
if ((Object)(object)physGrabObject == (Object)null || (Object)(object)portraitLight == (Object)null || soundSexyMusic == null)
{
return;
}
if (physGrabObject.grabbed)
{
soundSexyMusic.PlayLoop(true, 2f, 2f, 1f);
portraitLightIntensity = Mathf.Clamp(portraitLightIntensity + Time.deltaTime * portraitLightSpeed, 0f, portraitLightMaxIntensity);
portraitLight.intensity = portraitLightIntensity;
if (!HeartsParticle.isPlaying)
{
HeartsParticle.Play();
}
}
else
{
soundSexyMusic.PlayLoop(false, 2f, 2f, 1f);
portraitLightIntensity = Mathf.Clamp(portraitLightIntensity - Time.deltaTime * portraitLightSpeed, 0f, portraitLightMaxIntensity);
portraitLight.intensity = portraitLightIntensity;
if (HeartsParticle.isPlaying)
{
HeartsParticle.Stop();
}
}
}
public string GetLoveMsg()
{
List<string> list = new List<string>();
list.AddRange(new string[4] { "Paul is the best", "I Love Paul", "If i could choose between my mom and paul. It would be Paul", "Paul Is THE GOAT" });
return list[Random.Range(0, list.Count)];
}
}
public class SauceFireBehaviour : MonoBehaviour
{
[CompilerGenerated]
private sealed class <DelayedDestruction>d__25 : IEnumerator<object>, IEnumerator, IDisposable
{
private int <>1__state;
private object <>2__current;
public SauceFireBehaviour <>4__this;
object IEnumerator<object>.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
object IEnumerator.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
[DebuggerHidden]
public <DelayedDestruction>d__25(int <>1__state)
{
this.<>1__state = <>1__state;
}
[DebuggerHidden]
void IDisposable.Dispose()
{
<>1__state = -2;
}
private bool MoveNext()
{
//IL_002c: Unknown result type (might be due to invalid IL or missing references)
//IL_0036: Expected O, but got Unknown
switch (<>1__state)
{
default:
return false;
case 0:
<>1__state = -1;
<>2__current = (object)new WaitForSeconds(<>4__this.ParticleLifeTime);
<>1__state = 1;
return true;
case 1:
<>1__state = -1;
Object.Destroy((Object)(object)((Component)<>4__this).gameObject);
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();
}
}
public ParticleSystem? ParticleSystemComp;
public BoxCollider? TriggerCollider;
private PhotonView? photonView;
public float ParticleLifeTime = 3f;
public int DamagePerTick = 5;
public float TimeToHurt = 1f;
private HashSet<SauceFireBehaviour> FireSources = new HashSet<SauceFireBehaviour>();
[HideInInspector]
public string AttachedPlayerID = "";
public string FirePrefabName = "SauceFire";
[HideInInspector]
public bool isActive = true;
public float TimeToLive = 10f;
public float TimeToLiveOnPlayer = 4f;
private float CurrentTime = float.PositiveInfinity;
private IEnumerator? DestroyCoroutine;
public Color FireVignetteColor = new Color(0.9f, 0.38f, 0.06f);
public float FireVignetteIntensity = 0.5f;
public float FireSaturation = 3f;
public float FireVignetteSmoothness = 0.5f;
private void Start()
{
photonView = ((Component)this).GetComponent<PhotonView>();
}
public void OnTriggerEnterBehaviour(Collider other)
{
if ((SemiFunc.IsMasterClientOrSingleplayer() || isActive) && !((Object)(object)((Component)other).transform.parent == (Object)null))
{
GameObject gameObject = ((Component)((Component)other).transform.parent).gameObject;
PlayerAvatar val = null;
if (((Object)gameObject).name == "Controller")
{
val = gameObject.GetComponent<PlayerController>().playerAvatarScript;
Debug.Log((object)"Local Player");
}
else if (((Object)gameObject).name == "Player Avatar Controller")
{
val = gameObject.GetComponent<PlayerAvatar>();
Debug.Log((object)"Multi Player");
}
else
{
Debug.Log((object)("Not Found : " + ((Object)other).name));
}
if (!((Object)(object)val == (Object)null))
{
StickFire(((Component)val).gameObject, val.steamID);
}
}
}
public void OnTriggerExitBehaviour(Collider other)
{
if ((!SemiFunc.IsMasterClientOrSingleplayer() && !isActive) || (Object)(object)((Component)other).transform.parent == (Object)null)
{
return;
}
GameObject gameObject = ((Component)((Component)other).transform.parent).gameObject;
PlayerAvatar val = null;
if (((Object)gameObject).name == "Controller")
{
val = gameObject.GetComponent<PlayerController>().playerAvatarScript;
Debug.Log((object)"Local Player");
}
else
{
if (!(((Object)gameObject).name == "Player Avatar Controller"))
{
Debug.Log((object)("Not Found : " + ((Object)other).name));
return;
}
val = gameObject.GetComponent<PlayerAvatar>();
Debug.Log((object)"Multi Player");
}
if (!((Object)(object)val == (Object)null))
{
Transform val2 = ((Component)val).transform.Find("PlayerFire");
if ((Object)(object)val2 != (Object)null)
{
Debug.Log((object)"Found Fire On Player");
SauceFireBehaviour component = ((Component)val2).GetComponent<SauceFireBehaviour>();
component.RemoveSource(this);
RemoveSource(component);
}
}
}
public void OnFireDisable()
{
foreach (SauceFireBehaviour fireSource in FireSources)
{
fireSource.RemoveSource(this);
}
FireSources.Clear();
}
public void AddSource(SauceFireBehaviour source)
{
FireSources.Add(source);
Debug.Log((object)("Added " + ((object)source)?.ToString() + " To " + ((Object)((Component)this).gameObject).name + " | Remaining : " + FireSources.Count));
}
public void RemoveSource(SauceFireBehaviour source)
{
FireSources.Remove(source);
Debug.Log((object)("Removed " + ((object)source)?.ToString() + " From " + ((Object)((Component)this).gameObject).name + " | Remaining : " + FireSources.Count));
}
private void FixedUpdate()
{
if (!SemiFunc.IsMasterClientOrSingleplayer() || !isActive || (Object)(object)ParticleSystemComp == (Object)null || (Object)(object)photonView == (Object)null)
{
return;
}
if (FireSources.Count == 0)
{
CurrentTime = Mathf.Clamp(CurrentTime - Time.fixedDeltaTime, 0f, TimeToLive);
}
if (CurrentTime == 0f)
{
if (SemiFunc.IsMultiplayer())
{
Debug.Log((object)("Photn = " + (object)photonView));
photonView.RPC("DisableFire", (RpcTarget)0, Array.Empty<object>());
}
else
{
DisableFire();
}
OnFireDisable();
RemoveVisuals();
DestroyCoroutine = DelayedDestruction();
((MonoBehaviour)this).StartCoroutine(DestroyCoroutine);
}
}
[IteratorStateMachine(typeof(<DelayedDestruction>d__25))]
private IEnumerator DelayedDestruction()
{
//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
return new <DelayedDestruction>d__25(0)
{
<>4__this = this
};
}
[PunRPC]
public void DisableFire()
{
if (!((Object)(object)ParticleSystemComp == (Object)null))
{
ParticleSystemComp.Stop();
isActive = false;
((Object)((Component)this).gameObject).name = "Inactive PlayerFire";
Object.Destroy((Object)(object)TriggerCollider);
}
}
public void StickFire(GameObject StickToGO, string SteamID = "")
{
//IL_0083: 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_0144: Unknown result type (might be due to invalid IL or missing references)
Debug.Log((object)"Trying to stick the fire");
Transform val = StickToGO.transform.Find("PlayerFire");
if ((Object)(object)val != (Object)null)
{
Debug.Log((object)"Found Fire On Player");
SauceFireBehaviour component = ((Component)val).GetComponent<SauceFireBehaviour>();
if (component.isActive)
{
component.AddSource(this);
AddSource(component);
component.ResetTimer();
return;
}
}
Debug.Log((object)"Creating Game Object");
GameObject val2 = NetworkPrefabs.SpawnNetworkPrefab(FirePrefabName, StickToGO.transform.position, Quaternion.identity, (byte)0, (object[])null);
Debug.Log((object)("GO = " + (object)val2));
if ((Object)(object)val2 == (Object)null)
{
return;
}
Debug.Log((object)"Stick To Parent");
val2.transform.parent = StickToGO.transform;
((Object)val2).name = "PlayerFire";
SauceFireBehaviour component2 = val2.GetComponent<SauceFireBehaviour>();
Rigidbody component3 = val2.GetComponent<Rigidbody>();
Debug.Log((object)"Searching Component !");
if (!((Object)(object)component2 == (Object)null))
{
Debug.Log((object)"Disabling Rigibody if it exists");
if ((Object)(object)component3 != (Object)null)
{
component3.useGravity = false;
component3.detectCollisions = false;
component3.velocity = Vector3.zero;
}
Debug.Log((object)("Set Steam ID As Attachement : " + SteamID));
component2.AttachedPlayerID = SteamID;
component2.AddSource(this);
component2.TimeToLive = TimeToLiveOnPlayer;
AddSource(component2);
component2.ResetTimer();
if (SteamID != "")
{
component2.ApplyVisuals();
((MonoBehaviour)component2).InvokeRepeating("LaunchPlayerHurtRepeating", TimeToHurt, TimeToHurt);
}
}
}
public void LaunchPlayerHurtRepeating()
{
//IL_0036: Unknown result type (might be due to invalid IL or missing references)
if (!isActive)
{
((MonoBehaviour)this).CancelInvoke();
return;
}
PlayerAvatar val = SemiFunc.PlayerAvatarGetFromSteamID(AttachedPlayerID);
val.playerHealth.HurtOther(DamagePerTick, ((Component)this).transform.position, false, -1);
}
public void ResetTimer()
{
CurrentTime = Mathf.Max(CurrentTime, TimeToLive);
}
public void ApplyVisuals()
{
if (Object.op_Implicit((Object)(object)(photonView = ((Component)this).GetComponent<PhotonView>())))
{
if (SemiFunc.IsMultiplayer())
{
Debug.Log((object)"Applying Visuals");
photonView.RPC("ApplyVisualsRPC", (RpcTarget)0, Array.Empty<object>());
}
else
{
ApplyVisualsRPC();
}
}
}
[PunRPC]
public void ApplyVisualsRPC()
{
//IL_004d: Unknown result type (might be due to invalid IL or missing references)
PlayerAvatar val = SemiFunc.PlayerAvatarGetFromSteamID(AttachedPlayerID);
if ((Object)(object)val == (Object)null)
{
Debug.Log((object)("No players with ID : " + AttachedPlayerID));
}
else if (val.isLocal)
{
Debug.Log((object)"Applied The Visuals to local Player");
PostProcessing.Instance.VignetteOverride(FireVignetteColor, FireVignetteIntensity, FireVignetteSmoothness, 0.1f, 2f, 10f, ((Component)this).gameObject);
PostProcessing.Instance.SaturationOverride(FireSaturation, 0.1f, 2f, 10f, ((Component)this).gameObject);
}
}
public void RemoveVisuals()
{
if (Object.op_Implicit((Object)(object)(photonView = ((Component)this).GetComponent<PhotonView>())))
{
if (SemiFunc.IsMultiplayer())
{
Debug.Log((object)"Removing Visuals");
photonView.RPC("RemoveVisualsRPC", (RpcTarget)0, Array.Empty<object>());
}
else
{
RemoveVisualsRPC();
}
}
}
[PunRPC]
public void RemoveVisualsRPC()
{
//IL_004d: Unknown result type (might be due to invalid IL or missing references)
PlayerAvatar val = SemiFunc.PlayerAvatarGetFromSteamID(AttachedPlayerID);
if ((Object)(object)val == (Object)null)
{
Debug.Log((object)("No players with ID : " + AttachedPlayerID));
}
else if (val.isLocal)
{
Debug.Log((object)"Removing Visuals to local player");
PostProcessing.Instance.VignetteOverride(FireVignetteColor, FireVignetteIntensity, 0f, 0.1f, 2f, 0.1f, ((Component)this).gameObject);
PostProcessing.Instance.SaturationOverride(FireSaturation, 0.1f, 2f, 0.1f, ((Component)this).gameObject);
}
}
}
namespace OrgyAndHotSauce
{
[HarmonyPatch(typeof(PlayerController))]
internal static class ExamplePlayerControllerPatch
{
[HarmonyPrefix]
[HarmonyPatch("Start")]
private static void Start_Prefix(PlayerController __instance)
{
OrgyAndHotSauce.Logger.LogDebug((object)$"{__instance} Start Prefix");
}
[HarmonyPostfix]
[HarmonyPatch("Start")]
private static void Start_Postfix(PlayerController __instance)
{
OrgyAndHotSauce.Logger.LogDebug((object)$"{__instance} Start Postfix");
}
}
[BepInPlugin("Arkanio.OrgyAndHotSauce", "OrgyAndHotSauce", "1.0")]
[BepInDependency(/*Could not decode attribute arguments.*/)]
public class OrgyAndHotSauce : BaseUnityPlugin
{
internal static OrgyAndHotSauce Instance { get; private set; }
internal static ManualLogSource Logger => Instance._logger;
private ManualLogSource _logger => ((BaseUnityPlugin)this).Logger;
internal Harmony? Harmony { get; set; }
internal ItemCursedGun? ItemCursedGunScript { get; private set; }
internal ButterValuable? ButterValuableScript { get; private set; }
internal PaulValuable? PaulValuableScript { get; private set; }
internal HotSauceValuable? HotSauceValuableScript { get; private set; }
internal SauceFireBehaviour? SauceFireBehaviourScript { get; private set; }
internal ColliderEvent? ColliderEventScript { get; private set; }
internal ParticleManager? ParticleManagerScript { get; private set; }
private void Awake()
{
Instance = this;
((Component)this).gameObject.transform.parent = null;
((Object)((Component)this).gameObject).hideFlags = (HideFlags)61;
ItemCursedGunScript = ((Component)this).gameObject.AddComponent<ItemCursedGun>();
ButterValuableScript = ((Component)this).gameObject.AddComponent<ButterValuable>();
PaulValuableScript = ((Component)this).gameObject.AddComponent<PaulValuable>();
HotSauceValuableScript = ((Component)this).gameObject.AddComponent<HotSauceValuable>();
SauceFireBehaviourScript = ((Component)this).gameObject.AddComponent<SauceFireBehaviour>();
ColliderEventScript = ((Component)this).gameObject.AddComponent<ColliderEvent>();
ParticleManagerScript = ((Component)this).gameObject.AddComponent<ParticleManager>();
Patch();
Logger.LogInfo((object)$"{((BaseUnityPlugin)this).Info.Metadata.GUID} v{((BaseUnityPlugin)this).Info.Metadata.Version} has loaded!");
}
internal void Patch()
{
//IL_001a: 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_0021: Expected O, but got Unknown
//IL_0026: Expected O, but got Unknown
if (Harmony == null)
{
Harmony val = new Harmony(((BaseUnityPlugin)this).Info.Metadata.GUID);
Harmony val2 = val;
Harmony = val;
}
Harmony.PatchAll();
}
internal void Unpatch()
{
Harmony? harmony = Harmony;
if (harmony != null)
{
harmony.UnpatchSelf();
}
}
private void Update()
{
}
}
}