using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Logging;
using FistVR;
using OtherLoader;
using ProBuilder2.Common;
using ProBuilder2.MeshOperations;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.Windows.Speech;
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
public class AttachableMeleeForegripInterface : AttachableMeleeWeaponInterface
{
public Transform ForePosePoint;
public FVRFireArm OverrideFirearm;
private AttachableForegrip tempGrip;
public bool doesBracing = true;
private bool hasAddedForegrip = false;
public override void UpdateInteraction(FVRViveHand hand)
{
((FVRFireArmAttachmentInterface)this).UpdateInteraction(hand);
if (!hasAddedForegrip)
{
FVRPhysicalObject parent = ((FVRFireArmAttachmentInterface)this).Attachment.curMount.GetRootMount().Parent;
AttachForegripAdd((FVRFireArm)(object)((parent is FVRFireArm) ? parent : null));
}
}
public override void OnAttach()
{
((AttachableMeleeWeaponInterface)this).OnAttach();
FVRPhysicalObject parent = ((FVRFireArmAttachmentInterface)this).Attachment.curMount.GetRootMount().Parent;
AttachForegripAdd((FVRFireArm)(object)((parent is FVRFireArm) ? parent : null));
}
public override void OnDetach()
{
((AttachableMeleeWeaponInterface)this).OnDetach();
DetatchForegripAdd();
}
public override void BeginInteraction(FVRViveHand hand)
{
//IL_005b: Unknown result type (might be due to invalid IL or missing references)
//IL_0065: Expected O, but got Unknown
FVRFireArm val = OverrideFirearm;
if ((Object)(object)val == (Object)null)
{
FVRPhysicalObject rootObject = ((FVRFireArmAttachmentInterface)this).Attachment.GetRootObject();
val = (FVRFireArm)(object)((rootObject is FVRFireArm) ? rootObject : null);
}
if ((Object)(object)val != (Object)null && (Object)(object)val.Foregrip != (Object)null)
{
FVRAlternateGrip component = val.Foregrip.GetComponent<FVRAlternateGrip>();
hand.ForceSetInteractable((FVRInteractiveObject)(object)component);
tempGrip = new AttachableForegrip();
component.BeginInteractionFromAttachedGrip(tempGrip, hand);
}
}
public void AttachForegripAdd(FVRFireArm gun)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_000c: Expected O, but got Unknown
tempGrip = new AttachableForegrip();
tempGrip.DoesBracing = doesBracing;
OverrideFirearm = gun;
hasAddedForegrip = true;
}
public void DetatchForegripAdd()
{
hasAddedForegrip = false;
OverrideFirearm = null;
tempGrip = null;
}
public virtual void PassHandInput(FVRViveHand hand, FVRInteractiveObject o)
{
}
}
public class FallingCrate : MonoBehaviour
{
private void Start()
{
}
private void Update()
{
}
}
public class NonVerbalPuller : MonoBehaviour
{
public TrapThrower House;
public LayerMask CheckForAim;
public float FillTime;
public float FillMultiplier;
public float FillAmount;
public Image fillBar;
private float m_fillDelayTimer = 0f;
public AudioClip pullConfirmation;
private void Start()
{
}
private void Update()
{
//IL_008e: Unknown result type (might be due to invalid IL or missing references)
//IL_0099: Unknown result type (might be due to invalid IL or missing references)
//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
//IL_0138: 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_0150: Unknown result type (might be due to invalid IL or missing references)
if (House.isPlaying)
{
fillBar.fillAmount = FillAmount;
if (m_fillDelayTimer <= 0f)
{
FVRFireArm val = null;
bool flag = false;
if ((Object)(object)GM.CurrentMovementManager.Hands[1].CurrentInteractable != (Object)null)
{
Component component = ((Component)GM.CurrentMovementManager.Hands[1].CurrentInteractable).GetComponent(typeof(FVRFireArm));
val = (FVRFireArm)(object)((component is FVRFireArm) ? component : null);
RaycastHit val2 = default(RaycastHit);
if ((Object)(object)val != (Object)null && Physics.Raycast(val.MuzzlePos.position, val.MuzzlePos.forward, ref val2, 100f, LayerMask.op_Implicit(CheckForAim)) && ((Object)((Component)((RaycastHit)(ref val2)).collider).gameObject).name == "Non-Verbal Puller")
{
flag = true;
}
}
if ((Object)(object)GM.CurrentMovementManager.Hands[0].CurrentInteractable != (Object)null)
{
Component component2 = ((Component)GM.CurrentMovementManager.Hands[0].CurrentInteractable).GetComponent(typeof(FVRFireArm));
val = (FVRFireArm)(object)((component2 is FVRFireArm) ? component2 : null);
RaycastHit val3 = default(RaycastHit);
if ((Object)(object)val != (Object)null && Physics.Raycast(val.MuzzlePos.position, val.MuzzlePos.forward, ref val3, 100f, LayerMask.op_Implicit(CheckForAim)) && ((Object)((Component)((RaycastHit)(ref val3)).collider).gameObject).name == "Non-Verbal Puller")
{
flag = true;
}
}
if (!flag)
{
if (FillAmount > 0f)
{
FillAmount -= Time.deltaTime * FillMultiplier;
}
else
{
FillAmount = 0f;
}
}
else if (flag)
{
FillAmount += Time.deltaTime * FillMultiplier;
}
}
else if (m_fillDelayTimer >= 0f)
{
m_fillDelayTimer -= Time.deltaTime;
}
}
if (FillAmount >= 1f)
{
filled();
}
}
public void filled()
{
House.LaunchSoundSource.PlayOneShot(pullConfirmation, 0.4f);
m_fillDelayTimer = 2f;
fillBar.fillAmount = 0f;
FillAmount = 0f;
((MonoBehaviour)House).StartCoroutine(House.TickToThrow(House.timeToFire));
}
}
public class NonverbalSkeetPuller : MonoBehaviour
{
public SkeetRange House;
public LayerMask CheckForAim;
public float FillTime;
public float FillMultiplier;
public float FillAmount;
public Image fillBar;
private float m_fillDelayTimer = 0f;
public AudioClip pullConfirmation;
private void Start()
{
}
private void Update()
{
//IL_009e: Unknown result type (might be due to invalid IL or missing references)
//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
//IL_0148: Unknown result type (might be due to invalid IL or missing references)
//IL_0153: Unknown result type (might be due to invalid IL or missing references)
//IL_0160: Unknown result type (might be due to invalid IL or missing references)
if (House.isPlaying || House.isPracticing)
{
fillBar.fillAmount = FillAmount;
if (m_fillDelayTimer <= 0f)
{
FVRFireArm val = null;
bool flag = false;
if ((Object)(object)GM.CurrentMovementManager.Hands[1].CurrentInteractable != (Object)null)
{
Component component = ((Component)GM.CurrentMovementManager.Hands[1].CurrentInteractable).GetComponent(typeof(FVRFireArm));
val = (FVRFireArm)(object)((component is FVRFireArm) ? component : null);
RaycastHit val2 = default(RaycastHit);
if ((Object)(object)val != (Object)null && Physics.Raycast(val.MuzzlePos.position, val.MuzzlePos.forward, ref val2, 100f, LayerMask.op_Implicit(CheckForAim)) && ((Object)((Component)((RaycastHit)(ref val2)).collider).gameObject).name == "Non-Verbal Puller")
{
flag = true;
}
}
if ((Object)(object)GM.CurrentMovementManager.Hands[0].CurrentInteractable != (Object)null)
{
Component component2 = ((Component)GM.CurrentMovementManager.Hands[0].CurrentInteractable).GetComponent(typeof(FVRFireArm));
val = (FVRFireArm)(object)((component2 is FVRFireArm) ? component2 : null);
RaycastHit val3 = default(RaycastHit);
if ((Object)(object)val != (Object)null && Physics.Raycast(val.MuzzlePos.position, val.MuzzlePos.forward, ref val3, 100f, LayerMask.op_Implicit(CheckForAim)) && ((Object)((Component)((RaycastHit)(ref val3)).collider).gameObject).name == "Non-Verbal Puller")
{
flag = true;
}
}
if (!flag)
{
if (FillAmount > 0f)
{
FillAmount -= Time.deltaTime * FillMultiplier;
}
else
{
FillAmount = 0f;
}
}
else if (flag)
{
FillAmount += Time.deltaTime * FillMultiplier;
}
}
else if (m_fillDelayTimer >= 0f)
{
m_fillDelayTimer -= Time.deltaTime;
}
}
if (FillAmount >= 1f)
{
filled();
}
}
public void filled()
{
House.LoudSpeaker.PlayOneShot(pullConfirmation, 0.4f);
m_fillDelayTimer = 2f;
fillBar.fillAmount = 0f;
FillAmount = 0f;
((MonoBehaviour)House).StartCoroutine(House.TickToThrow(House.timeToFire));
}
}
public class PlayerMarker : MonoBehaviour
{
public GameObject OutsideMesh;
public void OnTriggerEnter(Collider other)
{
if (((Component)other).gameObject.layer == 15)
{
OutsideMesh.SetActive(false);
}
}
public void OnTriggerExit(Collider other)
{
if (((Component)other).gameObject.layer == 15)
{
OutsideMesh.SetActive(true);
}
}
}
public class SkeetFieldCollider : MonoBehaviour
{
public SkeetRange House;
public void OnTriggerEnter(Collider other)
{
House.TargetReachedGround(((Component)((Component)other).gameObject.transform.parent).gameObject);
}
}
public class SkeetRange : MonoBehaviour
{
public enum WhereToThrowFrom
{
high,
low,
both
}
public bool isInSequence = false;
public bool isPlaying = false;
public int ThrowCount = 0;
public int currentThrows = 0;
public int currentScore = 0;
private int lastScore = 0;
public FVRObject[] Things;
public int m_currentThingToThrow = 0;
public List<UberShatterable> targets;
public List<WhereToThrowFrom> Sequence;
private WhereToThrowFrom currentThrowPos;
public SkeetTablet Tablet;
[Header("Throw Positions")]
public Transform HighHouseTrap;
public Transform LowHouseTrap;
public Transform CrossPoint;
[Header("Audio Things")]
public List<AudioClip> StationChangingVoiceLines;
public List<AudioClip> FinalOption;
public AudioSource HighHouseSource;
public AudioSource LowHouseSource;
public AudioClip ThrowSound;
public AudioSource LoudSpeaker;
public AudioClip StartSound;
public AudioClip FinishSound;
public string[] wordsToRecognize;
[Header("Throwing Modifiers")]
public float timeToFire = 0.3f;
public float velocityRange = 1f;
public float m_VelocityBase = 18f;
public float AngularRangeX;
public float AngularRangeY = 1f;
public float rigidbodyDrag = 1f;
public float UpwardForce = 1f;
private GravityMode gravityType;
[Header("Marker")]
public GameObject Marker;
public List<Transform> MarkerLocations;
[Header("Debug")]
public bool isDebug = false;
public WhereToThrowFrom debugThrowLocation;
[Header("Practice Stuff")]
private WhereToThrowFrom PRL;
public bool isPracticing = false;
private void Start()
{
HighHouseTrap.LookAt(CrossPoint);
LowHouseTrap.LookAt(CrossPoint);
}
private void M_Recognizer_OnPhraseRecognized(PhraseRecognizedEventArgs args)
{
}
public void Recognized(float TimeTooken)
{
if (!isInSequence)
{
float num = timeToFire;
num -= TimeTooken;
((MonoBehaviour)this).StartCoroutine(TickToThrow(num));
}
}
public void RecognizedPractice(float TimeTooken)
{
float num = timeToFire;
num -= TimeTooken;
Debug.Log((object)"recognized practice");
((MonoBehaviour)this).StartCoroutine(PacticeTickToThrow(num));
}
private void Update()
{
if (isDebug)
{
((MonoBehaviour)this).StartCoroutine(TickToThrow(0f));
}
if (!isPlaying)
{
return;
}
if (lastScore != currentScore)
{
Tablet.Score.text = currentScore.ToString();
lastScore = currentScore;
}
if (isInSequence && targets.Count == 0)
{
SequenceUpdate();
}
foreach (UberShatterable target in targets)
{
if ((Object)(object)target == (Object)null || target.HasShattered())
{
currentScore++;
targets.Remove(target);
break;
}
}
}
public IEnumerator TickToThrow(float time)
{
Debug.Log((object)"TickToThrow");
if (time > 0f)
{
yield return (object)new WaitForSeconds(time);
TimeIsUp();
}
else if (time <= 0f)
{
TimeIsUp();
}
yield return null;
}
public void TimeIsUp()
{
Debug.Log((object)"TimeIsUp");
if (isPlaying && !isDebug)
{
ThrowThing(currentThrowPos);
}
else if (isDebug)
{
ThrowThing(debugThrowLocation);
}
}
private void ThrowThing(WhereToThrowFrom pos)
{
//IL_0031: 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_0076: 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)
//IL_00aa: 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_00ca: Unknown result type (might be due to invalid IL or missing references)
//IL_018a: Unknown result type (might be due to invalid IL or missing references)
//IL_0195: Unknown result type (might be due to invalid IL or missing references)
//IL_01cf: Unknown result type (might be due to invalid IL or missing references)
//IL_01e5: Unknown result type (might be due to invalid IL or missing references)
//IL_0203: Unknown result type (might be due to invalid IL or missing references)
//IL_0219: Unknown result type (might be due to invalid IL or missing references)
//IL_0223: Unknown result type (might be due to invalid IL or missing references)
//IL_02e3: Unknown result type (might be due to invalid IL or missing references)
//IL_02ee: Unknown result type (might be due to invalid IL or missing references)
//IL_032a: Unknown result type (might be due to invalid IL or missing references)
//IL_0342: Unknown result type (might be due to invalid IL or missing references)
//IL_0360: Unknown result type (might be due to invalid IL or missing references)
//IL_0378: Unknown result type (might be due to invalid IL or missing references)
//IL_0382: Unknown result type (might be due to invalid IL or missing references)
//IL_041d: Unknown result type (might be due to invalid IL or missing references)
//IL_0428: Unknown result type (might be due to invalid IL or missing references)
//IL_0464: Unknown result type (might be due to invalid IL or missing references)
//IL_047c: Unknown result type (might be due to invalid IL or missing references)
//IL_049a: Unknown result type (might be due to invalid IL or missing references)
//IL_04b2: Unknown result type (might be due to invalid IL or missing references)
//IL_04bc: Unknown result type (might be due to invalid IL or missing references)
isInSequence = true;
Debug.Log((object)"ThrowThing");
switch (pos)
{
case WhereToThrowFrom.high:
{
GameObject val4 = Object.Instantiate<GameObject>(((AnvilAsset)Things[m_currentThingToThrow]).GetGameObject(), HighHouseTrap.position, HighHouseTrap.rotation);
val4.transform.Rotate(new Vector3(Random.Range(0f - AngularRangeX, AngularRangeX), Random.Range(0f - AngularRangeY, AngularRangeY), 0f));
val4.GetComponent<Rigidbody>().velocity = val4.transform.forward * (m_VelocityBase + Random.Range(0f - velocityRange, velocityRange));
val4.GetComponent<Rigidbody>().angularVelocity = val4.transform.up * 10f;
val4.GetComponent<Rigidbody>().drag = rigidbodyDrag;
val4.AddComponent<KillAfter>().DieTime = 12f;
HighHouseSource.pitch = Random.Range(0.97f, 1.03f);
HighHouseSource.PlayOneShot(ThrowSound, 0.4f);
HighHouseSource.pitch = 1f;
UberShatterable component4 = val4.GetComponent<UberShatterable>();
targets.Add(component4);
currentThrows++;
ThrowCount++;
break;
}
case WhereToThrowFrom.low:
{
GameObject val3 = Object.Instantiate<GameObject>(((AnvilAsset)Things[m_currentThingToThrow]).GetGameObject(), LowHouseTrap.position, LowHouseTrap.rotation);
val3.transform.Rotate(new Vector3(Random.Range(0f - AngularRangeX, AngularRangeX), Random.Range(0f - AngularRangeY, AngularRangeY), 0f));
val3.GetComponent<Rigidbody>().velocity = val3.transform.forward * (m_VelocityBase + Random.Range(0f - velocityRange, velocityRange));
val3.GetComponent<Rigidbody>().angularVelocity = val3.transform.up * 10f;
val3.GetComponent<Rigidbody>().drag = rigidbodyDrag;
val3.AddComponent<KillAfter>().DieTime = 12f;
LowHouseSource.pitch = Random.Range(0.97f, 1.03f);
LowHouseSource.PlayOneShot(ThrowSound, 0.4f);
HighHouseSource.pitch = 1f;
UberShatterable component3 = val3.GetComponent<UberShatterable>();
targets.Add(component3);
currentThrows++;
ThrowCount++;
break;
}
case WhereToThrowFrom.both:
{
GameObject val = Object.Instantiate<GameObject>(((AnvilAsset)Things[m_currentThingToThrow]).GetGameObject(), HighHouseTrap.position, HighHouseTrap.rotation);
val.transform.Rotate(new Vector3(Random.Range(0f - AngularRangeX, AngularRangeX), Random.Range(0f - AngularRangeY, AngularRangeY), 0f));
val.GetComponent<Rigidbody>().velocity = val.transform.forward * (m_VelocityBase + Random.Range(0f - velocityRange, velocityRange));
val.GetComponent<Rigidbody>().angularVelocity = val.transform.up * 10f;
val.GetComponent<Rigidbody>().drag = rigidbodyDrag;
val.AddComponent<KillAfter>().DieTime = 12f;
HighHouseSource.pitch = Random.Range(0.97f, 1.03f);
HighHouseSource.PlayOneShot(ThrowSound, 0.4f);
HighHouseSource.pitch = 1f;
UberShatterable component = val.GetComponent<UberShatterable>();
targets.Add(component);
GameObject val2 = Object.Instantiate<GameObject>(((AnvilAsset)Things[m_currentThingToThrow]).GetGameObject(), LowHouseTrap.position, LowHouseTrap.rotation);
val2.transform.Rotate(new Vector3(Random.Range(0f - AngularRangeX, AngularRangeX), Random.Range(0f - AngularRangeY, AngularRangeY), 0f));
val2.GetComponent<Rigidbody>().velocity = val2.transform.forward * (m_VelocityBase + Random.Range(0f - velocityRange, velocityRange));
val2.GetComponent<Rigidbody>().angularVelocity = val2.transform.up * 10f;
val2.GetComponent<Rigidbody>().drag = rigidbodyDrag;
val2.AddComponent<KillAfter>().DieTime = 12f;
LowHouseSource.pitch = Random.Range(0.97f, 1.03f);
LowHouseSource.PlayOneShot(ThrowSound, 0.4f);
HighHouseSource.pitch = 1f;
UberShatterable component2 = val2.GetComponent<UberShatterable>();
targets.Add(component2);
currentThrows++;
ThrowCount++;
ThrowCount++;
break;
}
}
isInSequence = true;
Tablet.ThrowCount.text = ThrowCount.ToString();
}
public void SequenceUpdate()
{
Debug.Log((object)"SequenceUpdate");
isInSequence = false;
if (currentThrows < Sequence.Count - 1)
{
currentThrowPos = Sequence[currentThrows];
NextStation();
}
else if (currentThrows == 24 && currentScore == 24)
{
currentThrowPos = Sequence[Sequence.Count - 1];
}
else
{
FinishGame();
}
}
public void StartGame()
{
//IL_0017: Unknown result type (might be due to invalid IL or missing references)
//IL_001c: Unknown result type (might be due to invalid IL or missing references)
//IL_002c: 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_006c: Unknown result type (might be due to invalid IL or missing references)
TrapThrower.I.StartStopRecognizer(start: true);
gravityType = GM.Options.SimulationOptions.ObjectGravityMode;
GM.Options.SimulationOptions.ObjectGravityMode = (GravityMode)1;
isPlaying = true;
Marker.SetActive(true);
Marker.transform.SetPositionAndRotation(MarkerLocations[0].position, MarkerLocations[0].rotation);
ThrowCount = 0;
currentThrows = 0;
currentScore = 0;
currentThrowPos = WhereToThrowFrom.high;
LoudSpeaker.PlayOneShot(StartSound, 0.4f);
Tablet.Score.text = currentScore.ToString();
Tablet.ThrowCount.text = currentThrows.ToString();
Tablet.GameScreenMainMenu.SetActive(false);
}
public void FinishGame()
{
//IL_0062: Unknown result type (might be due to invalid IL or missing references)
//IL_0067: Unknown result type (might be due to invalid IL or missing references)
Marker.SetActive(false);
isPlaying = false;
TrapThrower.I.StartStopRecognizer(start: false);
Tablet.GameScreenMainMenu.SetActive(true);
Tablet.addScore(currentScore);
LoudSpeaker.PlayOneShot(FinishSound, 0.4f);
GM.Options.SimulationOptions.ObjectGravityMode = gravityType;
}
public int chooseVoiceLIne()
{
return Random.Range(0, StationChangingVoiceLines.Count - 1);
}
public void NextStation()
{
//IL_0037: Unknown result type (might be due to invalid IL or missing references)
//IL_0048: Unknown result type (might be due to invalid IL or missing references)
//IL_009d: Unknown result type (might be due to invalid IL or missing references)
//IL_00ae: 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_0115: 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)
//IL_017c: Unknown result type (might be due to invalid IL or missing references)
//IL_01d2: Unknown result type (might be due to invalid IL or missing references)
//IL_01e3: Unknown result type (might be due to invalid IL or missing references)
//IL_0239: Unknown result type (might be due to invalid IL or missing references)
//IL_024a: Unknown result type (might be due to invalid IL or missing references)
//IL_02a0: Unknown result type (might be due to invalid IL or missing references)
//IL_02b1: Unknown result type (might be due to invalid IL or missing references)
if (currentThrows != 0)
{
if (ThrowCount == 4)
{
Marker.transform.SetPositionAndRotation(MarkerLocations[1].position, MarkerLocations[1].rotation);
LoudSpeaker.PlayOneShot(StationChangingVoiceLines[chooseVoiceLIne()], 1f);
}
else if (ThrowCount == 8)
{
Marker.transform.SetPositionAndRotation(MarkerLocations[2].position, MarkerLocations[2].rotation);
LoudSpeaker.PlayOneShot(StationChangingVoiceLines[chooseVoiceLIne()], 1f);
}
else if (ThrowCount == 10)
{
Marker.transform.SetPositionAndRotation(MarkerLocations[3].position, MarkerLocations[3].rotation);
LoudSpeaker.PlayOneShot(StationChangingVoiceLines[chooseVoiceLIne()], 1f);
}
else if (ThrowCount == 12)
{
Marker.transform.SetPositionAndRotation(MarkerLocations[4].position, MarkerLocations[4].rotation);
LoudSpeaker.PlayOneShot(StationChangingVoiceLines[chooseVoiceLIne()], 1f);
}
else if (ThrowCount == 14)
{
Marker.transform.SetPositionAndRotation(MarkerLocations[5].position, MarkerLocations[5].rotation);
LoudSpeaker.PlayOneShot(StationChangingVoiceLines[chooseVoiceLIne()], 1f);
}
else if (ThrowCount == 18)
{
Marker.transform.SetPositionAndRotation(MarkerLocations[6].position, MarkerLocations[6].rotation);
LoudSpeaker.PlayOneShot(StationChangingVoiceLines[chooseVoiceLIne()], 1f);
}
else if (ThrowCount == 22)
{
Marker.transform.SetPositionAndRotation(MarkerLocations[7].position, MarkerLocations[7].rotation);
LoudSpeaker.PlayOneShot(StationChangingVoiceLines[chooseVoiceLIne()], 1f);
}
else if (ThrowCount == 24)
{
LoudSpeaker.PlayOneShot(FinalOption[chooseVoiceLIne()], 1f);
}
}
}
public void TargetReachedGround(GameObject target)
{
UberShatterable component = target.GetComponent<UberShatterable>();
if ((Object)(object)component != (Object)null && targets.Contains(component))
{
targets.Remove(component);
}
}
public void StartPractice()
{
//IL_0034: 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)
//IL_0049: Unknown result type (might be due to invalid IL or missing references)
isPracticing = true;
TrapThrower.I.StartStopRecognizer(start: true);
Tablet.changeTab(Tablet.PracticeTab);
gravityType = GM.Options.SimulationOptions.ObjectGravityMode;
GM.Options.SimulationOptions.ObjectGravityMode = (GravityMode)1;
isInSequence = true;
isInSequence = false;
}
public void StopPractice()
{
//IL_0034: 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)
isPracticing = false;
Tablet.changeTab(Tablet.MainMenu);
TrapThrower.I.StartStopRecognizer(start: false);
GM.Options.SimulationOptions.ObjectGravityMode = gravityType;
}
public void ChangePracticeThrowPosition(WhereToThrowFrom pos)
{
PRL = pos;
switch (pos)
{
case WhereToThrowFrom.high:
Tablet.CurrentThrowPos.text = "Currently throwing from the high house";
break;
case WhereToThrowFrom.low:
Tablet.CurrentThrowPos.text = "Currently throwing from the low house";
break;
case WhereToThrowFrom.both:
Tablet.CurrentThrowPos.text = "Currently throwing from both houses";
break;
}
}
public IEnumerator PacticeTickToThrow(float time)
{
Debug.Log((object)"TickToThrow practice");
if (time > 0f)
{
yield return (object)new WaitForSeconds(time);
PracticeThrow(PRL);
}
else if (time <= 0f)
{
PracticeThrow(PRL);
}
yield return null;
}
public void PracticeThrow(WhereToThrowFrom pos)
{
//IL_0020: 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_0065: 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)
//IL_0099: 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_00b9: Unknown result type (might be due to invalid IL or missing references)
//IL_014a: 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_018f: Unknown result type (might be due to invalid IL or missing references)
//IL_01a5: 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_01d9: Unknown result type (might be due to invalid IL or missing references)
//IL_01e3: Unknown result type (might be due to invalid IL or missing references)
//IL_0274: Unknown result type (might be due to invalid IL or missing references)
//IL_027f: Unknown result type (might be due to invalid IL or missing references)
//IL_02b9: Unknown result type (might be due to invalid IL or missing references)
//IL_02cf: Unknown result type (might be due to invalid IL or missing references)
//IL_02ed: Unknown result type (might be due to invalid IL or missing references)
//IL_0303: Unknown result type (might be due to invalid IL or missing references)
//IL_030d: Unknown result type (might be due to invalid IL or missing references)
//IL_0390: Unknown result type (might be due to invalid IL or missing references)
//IL_039b: Unknown result type (might be due to invalid IL or missing references)
//IL_03d5: Unknown result type (might be due to invalid IL or missing references)
//IL_03eb: Unknown result type (might be due to invalid IL or missing references)
//IL_0409: Unknown result type (might be due to invalid IL or missing references)
//IL_041f: Unknown result type (might be due to invalid IL or missing references)
//IL_0429: Unknown result type (might be due to invalid IL or missing references)
switch (pos)
{
case WhereToThrowFrom.high:
{
GameObject val4 = Object.Instantiate<GameObject>(((AnvilAsset)Things[m_currentThingToThrow]).GetGameObject(), HighHouseTrap.position, HighHouseTrap.rotation);
val4.transform.Rotate(new Vector3(Random.Range(0f - AngularRangeX, AngularRangeX), Random.Range(0f - AngularRangeY, AngularRangeY), 0f));
val4.GetComponent<Rigidbody>().velocity = val4.transform.forward * (m_VelocityBase + Random.Range(0f - velocityRange, velocityRange));
val4.GetComponent<Rigidbody>().angularVelocity = val4.transform.up * 10f;
val4.GetComponent<Rigidbody>().drag = rigidbodyDrag;
val4.AddComponent<KillAfter>().DieTime = 12f;
HighHouseSource.pitch = Random.Range(0.97f, 1.03f);
HighHouseSource.PlayOneShot(ThrowSound, 0.4f);
HighHouseSource.pitch = 1f;
break;
}
case WhereToThrowFrom.low:
{
GameObject val3 = Object.Instantiate<GameObject>(((AnvilAsset)Things[m_currentThingToThrow]).GetGameObject(), LowHouseTrap.position, LowHouseTrap.rotation);
val3.transform.Rotate(new Vector3(Random.Range(0f - AngularRangeX, AngularRangeX), Random.Range(0f - AngularRangeY, AngularRangeY), 0f));
val3.GetComponent<Rigidbody>().velocity = val3.transform.forward * (m_VelocityBase + Random.Range(0f - velocityRange, velocityRange));
val3.GetComponent<Rigidbody>().angularVelocity = val3.transform.up * 10f;
val3.GetComponent<Rigidbody>().drag = rigidbodyDrag;
val3.AddComponent<KillAfter>().DieTime = 12f;
LowHouseSource.pitch = Random.Range(0.97f, 1.03f);
LowHouseSource.PlayOneShot(ThrowSound, 0.4f);
HighHouseSource.pitch = 1f;
break;
}
case WhereToThrowFrom.both:
{
GameObject val = Object.Instantiate<GameObject>(((AnvilAsset)Things[m_currentThingToThrow]).GetGameObject(), HighHouseTrap.position, HighHouseTrap.rotation);
val.transform.Rotate(new Vector3(Random.Range(0f - AngularRangeX, AngularRangeX), Random.Range(0f - AngularRangeY, AngularRangeY), 0f));
val.GetComponent<Rigidbody>().velocity = val.transform.forward * (m_VelocityBase + Random.Range(0f - velocityRange, velocityRange));
val.GetComponent<Rigidbody>().angularVelocity = val.transform.up * 10f;
val.GetComponent<Rigidbody>().drag = rigidbodyDrag;
val.AddComponent<KillAfter>().DieTime = 12f;
HighHouseSource.pitch = Random.Range(0.97f, 1.03f);
HighHouseSource.PlayOneShot(ThrowSound, 0.4f);
HighHouseSource.pitch = 1f;
GameObject val2 = Object.Instantiate<GameObject>(((AnvilAsset)Things[m_currentThingToThrow]).GetGameObject(), LowHouseTrap.position, LowHouseTrap.rotation);
val2.transform.Rotate(new Vector3(Random.Range(0f - AngularRangeX, AngularRangeX), Random.Range(0f - AngularRangeY, AngularRangeY), 0f));
val2.GetComponent<Rigidbody>().velocity = val2.transform.forward * (m_VelocityBase + Random.Range(0f - velocityRange, velocityRange));
val2.GetComponent<Rigidbody>().angularVelocity = val2.transform.up * 10f;
val2.GetComponent<Rigidbody>().drag = rigidbodyDrag;
val2.AddComponent<KillAfter>().DieTime = 12f;
LowHouseSource.pitch = Random.Range(0.97f, 1.03f);
LowHouseSource.PlayOneShot(ThrowSound, 0.4f);
HighHouseSource.pitch = 1f;
break;
}
}
}
}
public class SkeetTablet : MonoBehaviour
{
public SkeetRange range;
public Text Score;
public Text ThrowCount;
public GameObject MainMenu;
public GameObject ActiveGameScreen;
public GameObject GameScreenMainMenu;
public List<GameObject> tabs;
public List<string> Previous10Scores;
public Text ScoreDisplay;
[Header("practice stuff")]
public GameObject PracticeTab;
public Text CurrentThrowPos;
private void Start()
{
}
private void Update()
{
}
public void startSequence()
{
foreach (GameObject tab in tabs)
{
if ((Object)(object)tab != (Object)(object)ActiveGameScreen)
{
tab.SetActive(false);
}
else if ((Object)(object)tab == (Object)(object)ActiveGameScreen)
{
tab.SetActive(true);
}
}
range.StartGame();
}
public void changeTab(GameObject tablet)
{
foreach (GameObject tab in tabs)
{
if ((Object)(object)tab != (Object)(object)tablet)
{
tab.SetActive(false);
}
else
{
tab.SetActive(true);
}
}
}
public void addScore(int score)
{
for (int num = 9; num > 0; num--)
{
Previous10Scores[num] = Previous10Scores[num - 1];
}
Previous10Scores[0] = score.ToString();
ScoreDisplay.text = ListToText(Previous10Scores);
}
private string ListToText(List<string> list)
{
string text = "";
foreach (string item in list)
{
text = text + item.ToString() + "\n";
}
return text;
}
}
public class SkeetTabletButton : MonoBehaviour
{
public int arrayPositionOfSpawnable;
public SkeetRange House;
public SkeetTablet tablet;
public GameObject TabToChangeTo;
[Header("What location will this button make the clay throw from. requires the House to be filled out")]
public SkeetRange.WhereToThrowFrom practiceThrowLocation;
public void changeThrowingItem()
{
House.m_currentThingToThrow = arrayPositionOfSpawnable;
}
public void changeTab()
{
tablet.changeTab(TabToChangeTo);
}
public void changePracticeThrowLocation()
{
House.ChangePracticeThrowPosition(practiceThrowLocation);
}
}
public class TrapCollider : MonoBehaviour
{
public TrapThrower House;
public GameObject OutsideMesh;
private bool isPlayerin = false;
public void OnTriggerEnter(Collider other)
{
if (((Component)other).gameObject.layer == 15)
{
OutsideMesh.SetActive(false);
House.isPlayerInCollider = true;
}
}
public void OnTriggerExit(Collider other)
{
if (((Component)other).gameObject.layer == 15)
{
OutsideMesh.SetActive(true);
House.isPlayerInCollider = false;
}
}
}
public class TrapField : MonoBehaviour
{
public TrapThrower House;
private void Start()
{
}
private void Update()
{
}
public void OnTriggerEnter(Collider other)
{
House.TargetReachedGround(((Component)((Component)other).gameObject.transform.parent).gameObject);
}
}
public class TrapTablet : MonoBehaviour
{
public TrapThrower House;
public Text Score;
public Text ThrowCount;
public GameObject MainMenu;
public GameObject ActiveGameScreen;
public GameObject GameScreenMainMenu;
public List<GameObject> tabs;
public List<string> Previous10Scores;
public Text ScoreDisplay;
public bool hasFinishedGame = false;
private void Start()
{
}
private void Update()
{
if (!hasFinishedGame && House.currentThrows >= 25)
{
hasFinishedGame = true;
House.FinishGame();
}
}
public void startSequence()
{
foreach (GameObject tab in tabs)
{
if ((Object)(object)tab != (Object)(object)ActiveGameScreen)
{
tab.SetActive(false);
}
else if ((Object)(object)tab == (Object)(object)ActiveGameScreen)
{
tab.SetActive(true);
}
}
House.StartGame();
}
public void changeTab(GameObject tablet)
{
foreach (GameObject tab in tabs)
{
if ((Object)(object)tab != (Object)(object)tablet)
{
tab.SetActive(false);
}
else
{
tab.SetActive(true);
}
}
}
public void addScore(int score)
{
for (int num = 9; num > 0; num--)
{
Previous10Scores[num] = Previous10Scores[num - 1];
}
Previous10Scores[0] = score.ToString();
ScoreDisplay.text = ListToText(Previous10Scores);
}
private string ListToText(List<string> list)
{
string text = "";
foreach (string item in list)
{
text = text + item.ToString() + "\n";
}
return text;
}
}
public class TrapTabletButton : MonoBehaviour
{
public int arrayPositionOfSpawnable;
public TrapThrower House;
public TrapTablet tablet;
public GameObject TabToChangeTo;
public void changeThrowingItem()
{
House.m_currentThingToThrow = arrayPositionOfSpawnable;
}
public void changeTab()
{
tablet.changeTab(TabToChangeTo);
}
}
public class TrapThrower : MonoBehaviour
{
public enum ShotgunGames
{
TRAP,
SKEET,
WOBBLETRAP
}
public string[] wordsToRecognize;
public bool isPlaying = false;
public TrapTablet Tablet;
public ShotgunGames GameType;
public Transform LaunchPos1;
public Transform LaunchPos2;
public FVRObject[] Things;
public int m_currentThingToThrow = 0;
public AudioSource LoudSpeaker;
public AudioSource LaunchSoundSource;
public AudioClip LaunchSound;
public float velocityRange = 1f;
public float m_VelocityBase = 18f;
public float AngularRangeX;
public float AngulatRangeY = 5f;
public KeywordRecognizer m_Recognizer;
public static TrapThrower I;
public float timeToFire = 1f;
public List<UberShatterable> targets;
public int currentScore = 0;
private int lastScore = 0;
public int currentThrows = 0;
public bool waitingForFinish = false;
public AudioClip StartBuzzer;
public AudioClip FinishBuzzer;
public List<AudioClip> FiveThrowVoiceLines;
[Header("Tutorial stuff")]
public bool isTutorial = false;
public bool isPlayerInCollider = false;
public GameObject PlaceMarker;
public List<Transform> TRAPcolliderPoints;
public List<AudioClip> EnterTheCollisionBox;
public bool isdebug = false;
public float debugTime = 1f;
public float rigidbodyDrag = 1f;
public float UpwardForce = 1f;
private GravityMode gravityType;
public SkeetRange SkeetRange;
private bool isKeywordListenerUsed = false;
private void Start()
{
//IL_000f: Unknown result type (might be due to invalid IL or missing references)
//IL_0019: Expected O, but got Unknown
//IL_0026: Unknown result type (might be due to invalid IL or missing references)
//IL_0030: Expected O, but got Unknown
I = this;
m_Recognizer = new KeywordRecognizer(wordsToRecognize, (ConfidenceLevel)2);
((PhraseRecognizer)m_Recognizer).OnPhraseRecognized += new PhraseRecognizedDelegate(M_Recognizer_OnPhraseRecognized);
}
public void StartStopRecognizer(bool start)
{
if (start && !isKeywordListenerUsed)
{
((PhraseRecognizer)m_Recognizer).Start();
isKeywordListenerUsed = true;
}
else if (!start)
{
((PhraseRecognizer)m_Recognizer).Stop();
isKeywordListenerUsed = false;
}
else if (start && isKeywordListenerUsed)
{
Debug.Log((object)"Keyword Listener is already in use. Please report how you got this message to Arpy");
}
}
private void M_Recognizer_OnPhraseRecognized(PhraseRecognizedEventArgs args)
{
if (SkeetRange.isPlaying)
{
SkeetRange skeetRange = SkeetRange;
TimeSpan phraseDuration = args.phraseDuration;
skeetRange.Recognized(phraseDuration.Seconds);
return;
}
if (SkeetRange.isPracticing)
{
SkeetRange skeetRange2 = SkeetRange;
TimeSpan phraseDuration2 = args.phraseDuration;
skeetRange2.RecognizedPractice(phraseDuration2.Seconds);
return;
}
Debug.Log((object)"recognized");
float num = timeToFire;
float num2 = num;
TimeSpan phraseDuration3 = args.phraseDuration;
num = num2 - (float)phraseDuration3.Seconds;
((MonoBehaviour)this).StartCoroutine(TickToThrow(num));
}
private void Update()
{
//IL_00c3: Unknown result type (might be due to invalid IL or missing references)
//IL_00d8: Unknown result type (might be due to invalid IL or missing references)
//IL_00e3: Unknown result type (might be due to invalid IL or missing references)
if (isdebug)
{
((MonoBehaviour)this).StartCoroutine(TickToThrow(debugTime));
}
if (lastScore != currentScore)
{
Tablet.Score.text = currentScore.ToString();
lastScore = currentScore;
}
if (isPlaying)
{
}
foreach (UberShatterable target in targets)
{
if ((Object)(object)target == (Object)null || target.HasShattered())
{
currentScore++;
targets.Remove(target);
break;
}
if ((int)gravityType == 0)
{
((Component)target).gameObject.GetComponent<Rigidbody>().AddForce(Vector3.up * UpwardForce, (ForceMode)0);
}
}
}
public void LateUpdate()
{
if (waitingForFinish && targets.Count == 0)
{
waitingForFinish = false;
Tablet.hasFinishedGame = false;
LoudSpeaker.PlayOneShot(FinishBuzzer, 0.3f);
}
}
private void ThrowThing()
{
//IL_0019: Unknown result type (might be due to invalid IL or missing references)
//IL_0024: 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_0043: Unknown result type (might be due to invalid IL or missing references)
//IL_007d: Unknown result type (might be due to invalid IL or missing references)
//IL_0093: Unknown result type (might be due to invalid IL or missing references)
//IL_00b1: 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)
//IL_00d1: Unknown result type (might be due to invalid IL or missing references)
GameObject val = Object.Instantiate<GameObject>(((AnvilAsset)Things[m_currentThingToThrow]).GetGameObject(), Vector3.Lerp(LaunchPos1.position, LaunchPos2.position, Random.Range(0f, 1f)), LaunchPos1.rotation);
val.transform.Rotate(new Vector3(Random.Range(0f - AngularRangeX, AngularRangeX), Random.Range(0f - AngulatRangeY, AngulatRangeY), 0f));
val.GetComponent<Rigidbody>().velocity = val.transform.forward * (m_VelocityBase + Random.Range(0f - velocityRange, velocityRange));
val.GetComponent<Rigidbody>().angularVelocity = val.transform.up * 10f;
val.GetComponent<Rigidbody>().drag = rigidbodyDrag;
val.AddComponent<KillAfter>().DieTime = 12f;
LaunchSoundSource.pitch = Random.Range(0.97f, 1.03f);
LaunchSoundSource.PlayOneShot(LaunchSound, 0.4f);
UberShatterable component = val.GetComponent<UberShatterable>();
targets.Add(component);
currentThrows++;
NextStation();
Tablet.ThrowCount.text = currentThrows.ToString();
}
public void TimeIsUp()
{
if (isPlaying && !isdebug)
{
if (!isTutorial && GameType == ShotgunGames.TRAP)
{
ThrowThing();
}
}
else if (isdebug)
{
ThrowThing();
}
}
public IEnumerator TickToThrow(float time)
{
if (time > 0f)
{
yield return (object)new WaitForSeconds(time);
TimeIsUp();
}
else if (time <= 0f)
{
TimeIsUp();
}
yield return null;
}
public void TargetReachedGround(GameObject target)
{
UberShatterable component = target.GetComponent<UberShatterable>();
if ((Object)(object)component != (Object)null && targets.Contains(component))
{
targets.Remove(component);
}
}
public void StartGame()
{
//IL_000c: 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_00bb: Unknown result type (might be due to invalid IL or missing references)
//IL_00cc: Unknown result type (might be due to invalid IL or missing references)
gravityType = GM.Options.SimulationOptions.ObjectGravityMode;
isPlaying = true;
currentScore = 0;
Tablet.Score.text = currentScore.ToString();
currentThrows = 0;
Tablet.ThrowCount.text = currentThrows.ToString();
Tablet.GameScreenMainMenu.SetActive(false);
LoudSpeaker.pitch = Random.Range(0.97f, 1.03f);
PlaceMarker.SetActive(true);
PlaceMarker.transform.SetPositionAndRotation(TRAPcolliderPoints[0].position, TRAPcolliderPoints[0].rotation);
LoudSpeaker.PlayOneShot(StartBuzzer, 0.4f);
StartStopRecognizer(start: true);
}
public void FinishGame()
{
PlaceMarker.SetActive(false);
isPlaying = false;
StartStopRecognizer(start: false);
Tablet.GameScreenMainMenu.SetActive(true);
Tablet.addScore(currentScore);
waitingForFinish = true;
}
public int chooseVoiceLIne()
{
return Random.Range(0, FiveThrowVoiceLines.Count - 1);
}
public void NextStation()
{
//IL_0043: 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_00c4: Unknown result type (might be due to invalid IL or missing references)
//IL_00d5: Unknown result type (might be due to invalid IL or missing references)
//IL_0145: Unknown result type (might be due to invalid IL or missing references)
//IL_0156: Unknown result type (might be due to invalid IL or missing references)
//IL_01c6: Unknown result type (might be due to invalid IL or missing references)
//IL_01d7: Unknown result type (might be due to invalid IL or missing references)
if (GameType == ShotgunGames.TRAP && currentThrows != 0)
{
if (currentThrows == 5)
{
PlaceMarker.transform.SetPositionAndRotation(TRAPcolliderPoints[1].position, TRAPcolliderPoints[1].rotation);
LoudSpeaker.pitch = Random.Range(0.97f, 1.03f);
LoudSpeaker.PlayOneShot(FiveThrowVoiceLines[chooseVoiceLIne()], 1f);
}
else if (currentThrows == 10)
{
PlaceMarker.transform.SetPositionAndRotation(TRAPcolliderPoints[2].position, TRAPcolliderPoints[2].rotation);
LoudSpeaker.pitch = Random.Range(0.97f, 1.03f);
LoudSpeaker.PlayOneShot(FiveThrowVoiceLines[chooseVoiceLIne()], 1f);
}
else if (currentThrows == 15)
{
PlaceMarker.transform.SetPositionAndRotation(TRAPcolliderPoints[3].position, TRAPcolliderPoints[3].rotation);
LoudSpeaker.pitch = Random.Range(0.97f, 1.03f);
LoudSpeaker.PlayOneShot(FiveThrowVoiceLines[chooseVoiceLIne()], 1f);
}
else if (currentThrows == 20)
{
PlaceMarker.transform.SetPositionAndRotation(TRAPcolliderPoints[4].position, TRAPcolliderPoints[4].rotation);
LoudSpeaker.pitch = Random.Range(0.97f, 1.03f);
LoudSpeaker.PlayOneShot(FiveThrowVoiceLines[chooseVoiceLIne()], 1f);
}
}
}
}
public static class ConsoleProDebug
{
private static bool _checkedConsoleClearMethod = false;
private static MethodInfo _consoleClearMethod = null;
private static bool _checkedConsoleWindowType = false;
private static Type _consoleWindowType = null;
private static MethodInfo ConsoleClearMethod
{
get
{
if ((object)_consoleClearMethod == null || !_checkedConsoleClearMethod)
{
_checkedConsoleClearMethod = true;
if ((object)ConsoleWindowType == null)
{
return null;
}
_consoleClearMethod = ConsoleWindowType.GetMethod("ClearEntries", BindingFlags.Static | BindingFlags.Public);
}
return _consoleClearMethod;
}
}
private static Type ConsoleWindowType
{
get
{
if ((object)_consoleWindowType == null || !_checkedConsoleWindowType)
{
_checkedConsoleWindowType = true;
Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies();
for (int i = 0; i < assemblies.Length; i++)
{
Type[] types = assemblies[i].GetTypes();
for (int j = 0; j < types.Length; j++)
{
if (types[j].Name == "ConsolePro3Window")
{
_consoleWindowType = types[j];
}
}
}
}
return _consoleWindowType;
}
}
public static void Clear()
{
if ((object)ConsoleClearMethod != null)
{
ConsoleClearMethod.Invoke(null, null);
}
}
public static void LogToFilter(string inLog, string inFilterName)
{
Debug.Log((object)(inLog + "\nCPAPI:{\"cmd\":\"Filter\" \"name\":\"" + inFilterName + "\"}"));
}
public static void Watch(string inName, string inValue)
{
Debug.Log((object)(inName + " : " + inValue + "\nCPAPI:{\"cmd\":\"Watch\" \"name\":\"" + inName + "\"}"));
}
}
public class ClippingPlane : MonoBehaviour
{
public Material mat;
private void Update()
{
//IL_0009: Unknown result type (might be due to invalid IL or missing references)
//IL_0014: 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_0027: Unknown result type (might be due to invalid IL or missing references)
//IL_0031: 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_0040: 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_0065: Unknown result type (might be due to invalid IL or missing references)
Plane val = default(Plane);
((Plane)(ref val))..ctor(((Component)this).transform.up, ((Component)this).transform.position);
Vector4 val2 = default(Vector4);
((Vector4)(ref val2))..ctor(((Plane)(ref val)).normal.x, ((Plane)(ref val)).normal.y, ((Plane)(ref val)).normal.z, ((Plane)(ref val)).distance);
mat.SetVector("_Plane", val2);
}
}
public class LootPickupDetector : MonoBehaviour
{
private void Start()
{
}
private void Update()
{
}
}
namespace Arpy.ArpysBackpacks;
[BepInPlugin("Arpy.ArpysBackpacks", "ArpysBackpacks", "1.1.1")]
[BepInProcess("h3vr.exe")]
[Description("Built with MeatKit")]
[BepInDependency("h3vr.otherloader", "1.3.0")]
public class ArpysBackpacksPlugin : BaseUnityPlugin
{
private static readonly string BasePath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
internal static ManualLogSource Logger;
private void Awake()
{
Logger = ((BaseUnityPlugin)this).Logger;
LoadAssets();
}
private void LoadAssets()
{
OtherLoader.RegisterDirectLoad(BasePath, "Arpy.ArpysBackpacks", "", "", "backpacksbyarpy", "");
}
}
public class ExtrudeRandomEdges : MonoBehaviour
{
private pb_Object pb;
private pb_Face lastExtrudedFace = null;
public float distance = 1f;
private void Start()
{
pb = pb_ShapeGenerator.PlaneGenerator(1f, 1f, 0, 0, (Axis)2, false);
pb.SetFaceMaterial(pb.faces, pb_Constant.DefaultMaterial);
lastExtrudedFace = pb.faces[0];
}
private void OnGUI()
{
if (GUILayout.Button("Extrude Random Edge", (GUILayoutOption[])(object)new GUILayoutOption[0]))
{
ExtrudeEdge();
}
}
private void ExtrudeEdge()
{
//IL_0096: 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_00b4: Unknown result type (might be due to invalid IL or missing references)
//IL_00d0: Unknown result type (might be due to invalid IL or missing references)
//IL_00d5: Unknown result type (might be due to invalid IL or missing references)
//IL_00df: Unknown result type (might be due to invalid IL or missing references)
//IL_00fc: Unknown result type (might be due to invalid IL or missing references)
//IL_0101: Unknown result type (might be due to invalid IL or missing references)
//IL_0106: Unknown result type (might be due to invalid IL or missing references)
//IL_0122: Unknown result type (might be due to invalid IL or missing references)
//IL_0124: Unknown result type (might be due to invalid IL or missing references)
//IL_016c: Unknown result type (might be due to invalid IL or missing references)
//IL_0174: Unknown result type (might be due to invalid IL or missing references)
pb_Face sourceFace = lastExtrudedFace;
List<pb_WingedEdge> wingedEdges = pb_WingedEdge.GetWingedEdges(pb, false);
IEnumerable<pb_WingedEdge> source = wingedEdges.Where((pb_WingedEdge x) => x.face == sourceFace);
List<pb_Edge> list = (from x in source
where x.opposite == null
select x into y
select y.edge.local).ToList();
int index = Random.Range(0, list.Count);
pb_Edge val = list[index];
Vector3 val2 = (pb.vertices[val.x] + pb.vertices[val.y]) * 0.5f - pb_Math.Average<int>((IList<int>)sourceFace.distinctIndices, (Func<int, Vector3>)((int x) => pb.vertices[x]), (IList<int>)null);
((Vector3)(ref val2)).Normalize();
pb_Edge[] selectedEdges = default(pb_Edge[]);
pbMeshOps.Extrude(pb, (pb_Edge[])(object)new pb_Edge[1] { val }, 0f, false, true, ref selectedEdges);
lastExtrudedFace = pb.faces.Last();
pb.SetSelectedEdges((IEnumerable<pb_Edge>)selectedEdges);
pb_Object_Utility.TranslateVertices(pb, pb.SelectedTriangles, val2 * distance);
pb.ToMesh();
pb.Refresh((RefreshMask)255);
}
}
public class HighlightNearestFace : MonoBehaviour
{
public float travel = 50f;
public float speed = 0.2f;
private pb_Object target;
private pb_Face nearest = null;
private void Start()
{
//IL_0061: 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_00c0: Unknown result type (might be due to invalid IL or missing references)
//IL_00c5: Unknown result type (might be due to invalid IL or missing references)
target = pb_ShapeGenerator.PlaneGenerator(travel, travel, 25, 25, (Axis)2, false);
target.SetFaceMaterial(target.faces, pb_Constant.DefaultMaterial);
((Component)target).transform.position = new Vector3(travel * 0.5f, 0f, travel * 0.5f);
target.ToMesh();
target.Refresh((RefreshMask)255);
Camera main = Camera.main;
((Component)main).transform.position = new Vector3(25f, 40f, 0f);
((Component)main).transform.localRotation = Quaternion.Euler(new Vector3(65f, 0f, 0f));
}
private void Update()
{
//IL_0048: 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_008a: Unknown result type (might be due to invalid IL or missing references)
//IL_00a2: 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)
//IL_00f3: Unknown result type (might be due to invalid IL or missing references)
//IL_013d: Unknown result type (might be due to invalid IL or missing references)
float num = Time.time * speed;
Vector3 position = default(Vector3);
((Vector3)(ref position))..ctor(Mathf.PerlinNoise(num, num) * travel, 2f, Mathf.PerlinNoise(num + 1f, num + 1f) * travel);
((Component)this).transform.position = position;
if ((Object)(object)target == (Object)null)
{
Debug.LogWarning((object)"Missing the ProBuilder Mesh target!");
return;
}
Vector3 val = ((Component)target).transform.InverseTransformPoint(((Component)this).transform.position);
if (nearest != null)
{
target.SetFaceColor(nearest, Color.white);
}
int num2 = target.faces.Length;
float num3 = float.PositiveInfinity;
nearest = target.faces[0];
for (int i = 0; i < num2; i++)
{
float num4 = Vector3.Distance(val, FaceCenter(target, target.faces[i]));
if (num4 < num3)
{
num3 = num4;
nearest = target.faces[i];
}
}
target.SetFaceColor(nearest, Color.blue);
target.RefreshColors();
}
private Vector3 FaceCenter(pb_Object pb, pb_Face face)
{
//IL_0008: Unknown result type (might be due to invalid IL or missing references)
//IL_000d: 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)
//IL_00bf: 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)
Vector3[] vertices = pb.vertices;
Vector3 zero = Vector3.zero;
int[] distinctIndices = face.distinctIndices;
foreach (int num in distinctIndices)
{
zero.x += vertices[num].x;
zero.y += vertices[num].y;
zero.z += vertices[num].z;
}
float num2 = face.distinctIndices.Length;
zero.x /= num2;
zero.y /= num2;
zero.z /= num2;
return zero;
}
}
public class TempRecoilProfile : FVRFireArmRecoilProfile
{
public float StoredVerticalRotPerShot;
public float StoredHorizontalRotPerShot;
public float StoredMaxVerticalRot;
public float StoredMaxHorizontalRot;
public float StoredVerticalRotRecovery;
public float StoredHorizontalRotRecovery;
public float StoredZLinearPerShot;
public float StoredZLinearMax;
public float StoredZLinearRecovery;
public float StoredXYLinearPerShot;
public float StoredXYLinearMax;
public float StoredXYLinearRecovery;
public bool StoredIsConstantRecoil;
public float StoredVerticalRotPerShot_Bipodded;
public float StoredHorizontalRotPerShot_Bipodded;
public float StoredMaxVerticalRot_Bipodded;
public float StoredMaxHorizontalRot_Bipodded;
public Vector4 StoredRecoveryStabilizationFactors_Foregrip = new Vector4(1f, 1f, 0.8f, 0.8f);
public Vector4 StoredRecoveryStabilizationFactors_Twohand = new Vector4(0.5f, 0.8f, 0.3f, 0.75f);
public Vector4 StoredRecoveryStabilizationFactors_None = new Vector4(0.25f, 0.5f, 0.25f, 0.25f);
public float StoredMassDriftIntensity = 0.1f;
public Vector4 StoredMassDriftFactors = new Vector4(0.25f, 0.6f, 1f, 0.1f);
public float StoredMaxMassDriftMagnitude = 5f;
public float StoredMaxMassMaxRotation = 20f;
public float StoredMassDriftRecoveryFactor = 5f;
}
public class ImRight : MonoBehaviour
{
public Minigun mini1;
public Minigun mini2;
public Minigun mini3;
public Minigun mini4;
public bool isfiring = false;
private void Start()
{
}
private void Update()
{
mini1.DestabilizedShots = 0;
mini2.DestabilizedShots = 0;
mini3.DestabilizedShots = 0;
mini4.DestabilizedShots = 0;
if (isfiring)
{
mini1.Fire();
mini2.Fire();
mini3.Fire();
mini4.Fire();
}
}
}