Files
niko 8fc35183db a
2026-04-11 22:19:20 +02:00

312 lines
11 KiB
C#

using System;
using System.Collections;
using Cpp2IlInjected;
using Photon.Pun;
using UnityEngine;
// Token: 0x0200007A RID: 122
[Token(Token = "0x200007A")]
public class VendingMachine : MonoBehaviourPun
{
// Token: 0x0600033B RID: 827 RVA: 0x00011A2C File Offset: 0x0000FC2C
[Token(Token = "0x600033B")]
[Address(RVA = "0x1561D30", Offset = "0x1560B30", VA = "0x181561D30", 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];
EAHPNACBLDD<Tool, Vector3, Quaternion, Vector3, bool> postResetEvent = tool.PostResetEvent;
Action<Tool, Vector3, Quaternion, Vector3, bool> action = new Action(this.CGOKDIGICHA);
EAHPNACBLDD<Tool, Vector3, Quaternion, Vector3, bool> eahpnacbldd = EAHPNACBLDD.BPJDFPACLMK(postResetEvent, action);
num2++;
tool.PostResetEvent = eahpnacbldd;
}
}
Animator component = base.GetComponent<Animator>();
this.LDOJFIEANFB = component;
}
// Token: 0x0600033C RID: 828 RVA: 0x00011ABC File Offset: 0x0000FCBC
[Token(Token = "0x600033C")]
[Address(RVA = "0x1562520", Offset = "0x1561320", VA = "0x181562520")]
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: 0x0600033D RID: 829 RVA: 0x00011B18 File Offset: 0x0000FD18
[Token(Token = "0x600033D")]
[Address(RVA = "0x1561EB0", Offset = "0x1560CB0", VA = "0x181561EB0", 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];
EAHPNACBLDD<Tool, Vector3, Quaternion, Vector3, bool> postResetEvent = tool.PostResetEvent;
Action<Tool, Vector3, Quaternion, Vector3, bool> action = new Action(this.CGOKDIGICHA);
EAHPNACBLDD<Tool, Vector3, Quaternion, Vector3, bool> eahpnacbldd = EAHPNACBLDD.GMNMHGMFGOL(postResetEvent, action);
num2++;
tool.PostResetEvent = eahpnacbldd;
}
}
}
// Token: 0x0600033E RID: 830 RVA: 0x00011B98 File Offset: 0x0000FD98
[Token(Token = "0x600033E")]
[Address(RVA = "0x1561FF0", Offset = "0x1560DF0", VA = "0x181561FF0")]
public void OnVendingButtonPressed(int buttonIndex)
{
if (Time.time > 3f)
{
float time = Time.time;
this.FMCFHBCILDE = time;
PhotonView photonView = base.JDHMIOJKLCK;
DGLOJCGDOGG.ANJGMEDDNPE anjgmeddnpe = new DGLOJCGDOGG.ANJGMEDDNPE(this.RpcMasterRequestProductRelease);
photonView.RpcMaster(anjgmeddnpe);
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: 0x0600033F RID: 831 RVA: 0x00011C54 File Offset: 0x0000FE54
[Token(Token = "0x600033F")]
[Address(RVA = "0x15621B0", Offset = "0x1560FB0", VA = "0x1815621B0")]
[NFOMENMAOIA]
private void RpcMasterRequestProductRelease()
{
if (KKPBCOOONNK.BNNCCCFFALC)
{
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.JDHMIOJKLCK;
DGLOJCGDOGG.LFLFMIMNCON<bool> lflfmimncon = new DGLOJCGDOGG.LFLFMIMNCON(this.RpcOnProductRelease);
int num5 = 0;
photonView.RpcAll<bool>(lflfmimncon, num5 != 0);
}
}
}
// Token: 0x06000340 RID: 832 RVA: 0x00011D64 File Offset: 0x0000FF64
[Token(Token = "0x6000340")]
[Address(RVA = "0x1561CC0", Offset = "0x1560AC0", VA = "0x181561CC0")]
private IEnumerator AJKKBLHCINO(Tool PCCINMGAOCG)
{
/*
An exception occurred when decompiling this method (06000340)
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 1660
*/;
}
// Token: 0x06000341 RID: 833 RVA: 0x00011D90 File Offset: 0x0000FF90
[Token(Token = "0x6000341")]
[Address(RVA = "0x1562490", Offset = "0x1561290", VA = "0x181562490")]
[NFOMENMAOIA]
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: 0x06000342 RID: 834 RVA: 0x00011DC4 File Offset: 0x0000FFC4
[Token(Token = "0x6000342")]
[Address(RVA = "0x1561E90", Offset = "0x1560C90", VA = "0x181561E90")]
private void CGOKDIGICHA(Tool PJCELKHIBFC, Vector3 BNMOCBJEEPN, Quaternion LPHCCEOHNIN, Vector3 GMMJHABHDHE, bool ACPOOMGHPKJ)
{
this.productPool.Release(PJCELKHIBFC);
}
// Token: 0x06000343 RID: 835 RVA: 0x00011DE4 File Offset: 0x0000FFE4
[Token(Token = "0x6000343")]
[Address(RVA = "0x15626E0", Offset = "0x15614E0", VA = "0x1815626E0")]
public VendingMachine()
{
}
// Token: 0x06000344 RID: 836 RVA: 0x00011E04 File Offset: 0x00010004
// Note: this type is marked as 'beforefieldinit'.
[Token(Token = "0x6000344")]
[Address(RVA = "0x15625E0", Offset = "0x15613E0", VA = "0x1815625E0")]
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: 0x040002C2 RID: 706
[FieldOffset(Offset = "0x40")]
[Token(Token = "0x40002C2")]
[SerializeField]
private Transform productReleaseTransform;
// Token: 0x040002C3 RID: 707
[FieldOffset(Offset = "0x48")]
[Token(Token = "0x40002C3")]
[SerializeField]
private ToolPool productPool;
// Token: 0x040002C4 RID: 708
[FieldOffset(Offset = "0x50")]
[Token(Token = "0x40002C4")]
[SerializeField]
private float timeBeforeProductDrop = 1.5f;
// Token: 0x040002C5 RID: 709
[FieldOffset(Offset = "0x58")]
[Token(Token = "0x40002C5")]
[SerializeField]
[Header("Audio & Visuals")]
private RecRoomAudioClip machineFunctionAudioClip;
// Token: 0x040002C6 RID: 710
[FieldOffset(Offset = "0x60")]
[Token(Token = "0x40002C6")]
[SerializeField]
private RecRoomAudioClip productDropAudioClip;
// Token: 0x040002C7 RID: 711
[FieldOffset(Offset = "0x68")]
[Token(Token = "0x40002C7")]
[SerializeField]
private RecRoomAudioClip machineEmptyAudioClip;
// Token: 0x040002C8 RID: 712
[Token(Token = "0x40002C8")]
private const float EHGPDBHLAKB = 3f;
// Token: 0x040002C9 RID: 713
[FieldOffset(Offset = "0x70")]
[Token(Token = "0x40002C9")]
private float FMCFHBCILDE;
// Token: 0x040002CA RID: 714
[Token(Token = "0x40002CA")]
private const float LLFMDANKNGE = 5f;
// Token: 0x040002CB RID: 715
[FieldOffset(Offset = "0x74")]
[Token(Token = "0x40002CB")]
private float HJLBGIMNOJK;
// Token: 0x040002CC RID: 716
[FieldOffset(Offset = "0x78")]
[Token(Token = "0x40002CC")]
private Animator LDOJFIEANFB;
// Token: 0x040002CD RID: 717
[Token(Token = "0x40002CD")]
private static readonly int[] FDPIILCIFDN;
}