316 lines
11 KiB
C#
316 lines
11 KiB
C#
using System;
|
|
using System.Collections;
|
|
using System.Runtime.InteropServices;
|
|
using Cpp2IlInjected;
|
|
using Photon.Pun;
|
|
using RecRoom;
|
|
using RecRoom.Networking.RPC;
|
|
using UnityEngine;
|
|
|
|
// Token: 0x0200009C RID: 156
|
|
[Token(Token = "0x200009C")]
|
|
[StructLayout(3)]
|
|
public class VendingMachine : MonoBehaviourPun
|
|
{
|
|
// Token: 0x0600042A RID: 1066 RVA: 0x00015484 File Offset: 0x00013684
|
|
[Token(Token = "0x600042A")]
|
|
[Address(RVA = "0x1A13B10", Offset = "0x1A12510", VA = "0x181A13B10", Slot = "13")]
|
|
protected override void Awake()
|
|
{
|
|
base..ctor();
|
|
ToolPool toolPool = this.productPool;
|
|
int num = 0;
|
|
if (toolPool != num)
|
|
{
|
|
Tool[] pool = this.productPool.pool;
|
|
int num2 = 0;
|
|
int length = pool.Length;
|
|
if (num2 < length)
|
|
{
|
|
Tool tool = pool[num2];
|
|
ActionEvent<Tool, Vector3, Quaternion, Vector3, bool> postResetEvent = tool.PostResetEvent;
|
|
Action<Tool, Vector3, Quaternion, Vector3, bool> action = new Action(this.CGOKDIGICHA);
|
|
ActionEvent<Tool, Vector3, Quaternion, Vector3, bool> actionEvent = postResetEvent + action;
|
|
num2++;
|
|
tool.PostResetEvent = actionEvent;
|
|
}
|
|
}
|
|
Animator component = base.GetComponent<Animator>();
|
|
this.LDOJFIEANFB = component;
|
|
}
|
|
|
|
// Token: 0x0600042B RID: 1067 RVA: 0x00015514 File Offset: 0x00013714
|
|
[Token(Token = "0x600042B")]
|
|
[Address(RVA = "0x1A14300", Offset = "0x1A12D00", VA = "0x181A14300")]
|
|
private void Start()
|
|
{
|
|
ToolPool toolPool = this.productPool;
|
|
int num = 0;
|
|
if (toolPool != num)
|
|
{
|
|
Tool[] pool = this.productPool.pool;
|
|
int num2 = 0;
|
|
int length = pool.Length;
|
|
if (num2 < length)
|
|
{
|
|
Tool tool = pool[num2];
|
|
int num3 = 0;
|
|
tool.BEKODHBDOFG = num3 != 0;
|
|
num2++;
|
|
}
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600042C RID: 1068 RVA: 0x00015570 File Offset: 0x00013770
|
|
[Token(Token = "0x600042C")]
|
|
[Address(RVA = "0x1A13C90", Offset = "0x1A12690", VA = "0x181A13C90", Slot = "14")]
|
|
protected override void OnDestroy()
|
|
{
|
|
base.OnDestroy();
|
|
ToolPool toolPool = this.productPool;
|
|
int num = 0;
|
|
if (toolPool != num)
|
|
{
|
|
Tool[] pool = this.productPool.pool;
|
|
int num2 = 0;
|
|
int length = pool.Length;
|
|
if (num2 < length)
|
|
{
|
|
Tool tool = pool[num2];
|
|
ActionEvent<Tool, Vector3, Quaternion, Vector3, bool> postResetEvent = tool.PostResetEvent;
|
|
Action<Tool, Vector3, Quaternion, Vector3, bool> action = new Action(this.CGOKDIGICHA);
|
|
ActionEvent<Tool, Vector3, Quaternion, Vector3, bool> actionEvent = postResetEvent - action;
|
|
num2++;
|
|
tool.PostResetEvent = actionEvent;
|
|
}
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600042D RID: 1069 RVA: 0x000155F0 File Offset: 0x000137F0
|
|
[Token(Token = "0x600042D")]
|
|
[Address(RVA = "0x1A13DD0", Offset = "0x1A127D0", VA = "0x181A13DD0")]
|
|
public void OnVendingButtonPressed(int buttonIndex)
|
|
{
|
|
if (Time.time > 3f)
|
|
{
|
|
float time = Time.time;
|
|
this.FMCFHBCILDE = time;
|
|
PhotonView photonView = base.photonView;
|
|
RPCActions.RPCAction rpcaction = new RPCActions.RPCAction(this.RpcMasterRequestProductRelease);
|
|
photonView.RpcMaster(rpcaction);
|
|
Animator ldojfieanfb = this.LDOJFIEANFB;
|
|
int num = 0;
|
|
if (ldojfieanfb != num)
|
|
{
|
|
this.LDOJFIEANFB.enabled = true;
|
|
Animator ldojfieanfb2 = this.LDOJFIEANFB;
|
|
int num2 = VendingMachine.FDPIILCIFDN[buttonIndex];
|
|
ldojfieanfb2.SetTrigger(num2);
|
|
}
|
|
RecRoomAudioClip recRoomAudioClip = this.machineFunctionAudioClip;
|
|
if (recRoomAudioClip != 0)
|
|
{
|
|
Transform transform = base.transform;
|
|
int num3 = 0;
|
|
int num4 = 0;
|
|
SFXAudioSource sfxaudioSource = AudioManager.Play3DSFX(recRoomAudioClip, transform, num4, num3);
|
|
}
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600042E RID: 1070 RVA: 0x000156AC File Offset: 0x000138AC
|
|
[Token(Token = "0x600042E")]
|
|
[Address(RVA = "0x1A13F90", Offset = "0x1A12990", VA = "0x181A13F90")]
|
|
[PunRPC]
|
|
private void RpcMasterRequestProductRelease()
|
|
{
|
|
if (PhotonNetwork.IsMasterClient)
|
|
{
|
|
ToolPool toolPool = this.productPool;
|
|
int num = 0;
|
|
if (toolPool != num && Time.time > 5f)
|
|
{
|
|
Transform transform = this.productReleaseTransform;
|
|
int num2 = 0;
|
|
if (transform != num2)
|
|
{
|
|
Transform transform2 = this.productReleaseTransform;
|
|
}
|
|
Transform transform3 = base.transform;
|
|
Vector3 vector;
|
|
float z = vector.z;
|
|
Transform transform4 = this.productReleaseTransform;
|
|
int num3 = 0;
|
|
if (transform4 != num3)
|
|
{
|
|
Transform transform5 = this.productReleaseTransform;
|
|
}
|
|
Transform transform6 = base.transform;
|
|
ToolPool toolPool2 = this.productPool;
|
|
int num4 = 0;
|
|
Tool tool;
|
|
if (tool != num4)
|
|
{
|
|
VendingMachine.GLMIKEMDLJF glmikemdljf;
|
|
glmikemdljf.System.IDisposable.Dispose();
|
|
glmikemdljf.<>1__state = (int)((ulong)0L);
|
|
glmikemdljf.<>4__this = this;
|
|
Coroutine coroutine = base.StartCoroutine(glmikemdljf);
|
|
float time = Time.time;
|
|
this.HJLBGIMNOJK = time;
|
|
throw new NullReferenceException();
|
|
}
|
|
PhotonView photonView = base.photonView;
|
|
RPCActions.RPCAction<bool> rpcaction = new RPCActions.RPCAction(this.RpcOnProductRelease);
|
|
int num5 = 0;
|
|
photonView.RpcAll<bool>(rpcaction, num5 != 0);
|
|
}
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600042F RID: 1071 RVA: 0x000157BC File Offset: 0x000139BC
|
|
[Token(Token = "0x600042F")]
|
|
[Address(RVA = "0x1A13AA0", Offset = "0x1A124A0", VA = "0x181A13AA0")]
|
|
private IEnumerator AJKKBLHCINO(Tool PCCINMGAOCG)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600042F)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Collections.IEnumerator VendingMachine::AJKKBLHCINO(Tool)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
Block_0:
|
|
call:void(GLMIKEMDLJF::System.IDisposable.Dispose, ldloc:GLMIKEMDLJF(var_0))
|
|
stfld:VendingMachine(GLMIKEMDLJF::<>4__this, ldloc:GLMIKEMDLJF(var_0), ldloc:VendingMachine(this))
|
|
stfld:int32(GLMIKEMDLJF::<>1__state, ldloc:GLMIKEMDLJF(var_0), conv.u8:uint64[exp:int32](ldc.i8:int64[exp:uint64](0)))
|
|
stfld:Tool(GLMIKEMDLJF::productToRelease, ldloc:GLMIKEMDLJF(var_0), ldloc:Tool(PCCINMGAOCG))
|
|
}
|
|
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
|
|
--- End of inner exception stack trace ---
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
|
|
at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1663
|
|
*/;
|
|
}
|
|
|
|
// Token: 0x06000430 RID: 1072 RVA: 0x000157E8 File Offset: 0x000139E8
|
|
[Token(Token = "0x6000430")]
|
|
[Address(RVA = "0x1A14270", Offset = "0x1A12C70", VA = "0x181A14270")]
|
|
[PunRPC]
|
|
private void RpcOnProductRelease(bool IFFAIOGFJJB)
|
|
{
|
|
if (!IFFAIOGFJJB)
|
|
{
|
|
}
|
|
RecRoomAudioClip recRoomAudioClip = this.productDropAudioClip;
|
|
if (recRoomAudioClip != 0)
|
|
{
|
|
Transform transform = base.transform;
|
|
int num = 0;
|
|
int num2 = 0;
|
|
SFXAudioSource sfxaudioSource = AudioManager.Play3DSFX(recRoomAudioClip, transform, num2, num);
|
|
}
|
|
}
|
|
|
|
// Token: 0x06000431 RID: 1073 RVA: 0x0001581C File Offset: 0x00013A1C
|
|
[Token(Token = "0x6000431")]
|
|
[Address(RVA = "0x1A13C70", Offset = "0x1A12670", VA = "0x181A13C70")]
|
|
private void CGOKDIGICHA(Tool PJCELKHIBFC, Vector3 BNMOCBJEEPN, Quaternion LPHCCEOHNIN, Vector3 GMMJHABHDHE, bool ACPOOMGHPKJ)
|
|
{
|
|
this.productPool.Release(PJCELKHIBFC);
|
|
}
|
|
|
|
// Token: 0x06000432 RID: 1074 RVA: 0x0001583C File Offset: 0x00013A3C
|
|
[Token(Token = "0x6000432")]
|
|
[Address(RVA = "0x1A144C0", Offset = "0x1A12EC0", VA = "0x181A144C0")]
|
|
public VendingMachine()
|
|
{
|
|
}
|
|
|
|
// Token: 0x06000433 RID: 1075 RVA: 0x0001585C File Offset: 0x00013A5C
|
|
// Note: this type is marked as 'beforefieldinit'.
|
|
[Token(Token = "0x6000433")]
|
|
[Address(RVA = "0x1A143C0", Offset = "0x1A12DC0", VA = "0x181A143C0")]
|
|
static VendingMachine()
|
|
{
|
|
int[] array = new int[4];
|
|
int num = Animator.StringToHash("ButtonDown_1");
|
|
array[0] = num;
|
|
int num2 = Animator.StringToHash("ButtonDown_2");
|
|
array[0] = num2;
|
|
int num3 = Animator.StringToHash("ButtonDown_3");
|
|
array[1] = num3;
|
|
int num4 = Animator.StringToHash("ButtonDown_4");
|
|
array[1] = num4;
|
|
VendingMachine.FDPIILCIFDN = array;
|
|
}
|
|
|
|
// Token: 0x040003A8 RID: 936
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x40")]
|
|
[Token(Token = "0x40003A8")]
|
|
[SerializeField]
|
|
private Transform productReleaseTransform;
|
|
|
|
// Token: 0x040003A9 RID: 937
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x48")]
|
|
[Token(Token = "0x40003A9")]
|
|
[SerializeField]
|
|
private ToolPool productPool;
|
|
|
|
// Token: 0x040003AA RID: 938
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x50")]
|
|
[Token(Token = "0x40003AA")]
|
|
[SerializeField]
|
|
private float timeBeforeProductDrop = 1.5f;
|
|
|
|
// Token: 0x040003AB RID: 939
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x58")]
|
|
[Token(Token = "0x40003AB")]
|
|
[SerializeField]
|
|
[Header("Audio & Visuals")]
|
|
private RecRoomAudioClip machineFunctionAudioClip;
|
|
|
|
// Token: 0x040003AC RID: 940
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x60")]
|
|
[Token(Token = "0x40003AC")]
|
|
[SerializeField]
|
|
private RecRoomAudioClip productDropAudioClip;
|
|
|
|
// Token: 0x040003AD RID: 941
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x68")]
|
|
[Token(Token = "0x40003AD")]
|
|
[SerializeField]
|
|
private RecRoomAudioClip machineEmptyAudioClip;
|
|
|
|
// Token: 0x040003AE RID: 942
|
|
[Token(Token = "0x40003AE")]
|
|
private const float EHGPDBHLAKB = 3f;
|
|
|
|
// Token: 0x040003AF RID: 943
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x70")]
|
|
[Token(Token = "0x40003AF")]
|
|
private float FMCFHBCILDE;
|
|
|
|
// Token: 0x040003B0 RID: 944
|
|
[Token(Token = "0x40003B0")]
|
|
private const float LLFMDANKNGE = 5f;
|
|
|
|
// Token: 0x040003B1 RID: 945
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x74")]
|
|
[Token(Token = "0x40003B1")]
|
|
private float HJLBGIMNOJK;
|
|
|
|
// Token: 0x040003B2 RID: 946
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x78")]
|
|
[Token(Token = "0x40003B2")]
|
|
private Animator LDOJFIEANFB;
|
|
|
|
// Token: 0x040003B3 RID: 947
|
|
[Token(Token = "0x40003B3")]
|
|
private static readonly int[] FDPIILCIFDN;
|
|
}
|