321 lines
12 KiB
C#
321 lines
12 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using Cpp2IlInjected;
|
|
using Photon.Pun;
|
|
using RecRoom.Circuits;
|
|
using RecRoom.Core.Creation.Circuits;
|
|
using UnityEngine;
|
|
|
|
namespace RecRoom.Core.Creation
|
|
{
|
|
// Token: 0x02003121 RID: 12577
|
|
[Token(Token = "0x2003121")]
|
|
public class SandboxCircuitBeacon : MonoBehaviourPun
|
|
{
|
|
// Token: 0x06015970 RID: 88432 RVA: 0x0050CE88 File Offset: 0x0050B088
|
|
[Token(Token = "0x6015970")]
|
|
[Address(RVA = "0xEA7660", Offset = "0xEA6460", VA = "0x180EA7660")]
|
|
private void Start()
|
|
{
|
|
CircuitEventNodeDisplay circuitEventNodeDisplay = this.circuitNode;
|
|
Action action = new Action(this.NFCJMMCJNAP);
|
|
circuitEventNodeDisplay.DMKDMKIDPLC += action;
|
|
Tool tool = this.tool;
|
|
Action action2 = new Action(this.BOBBBOLPOPC);
|
|
tool.NBBKCDDPBPD += action2;
|
|
SandboxColorable sandboxColorable = this.sandboxColorable;
|
|
Action action3 = new Action(this.NFCJMMCJNAP);
|
|
sandboxColorable.JJCKDBNNKAM += action3;
|
|
if (this.circuitNode.IsInputConnected(InputSlot.C))
|
|
{
|
|
CircuitNode mbbjmcdgdmn = this.circuitNode.MBBJMCDGDMN;
|
|
if (mbbjmcdgdmn == 0)
|
|
{
|
|
goto IL_87;
|
|
}
|
|
int inputSignal = mbbjmcdgdmn.GetInputSignal(InputSlot.C);
|
|
}
|
|
this.OGLDMBFDGKH(1);
|
|
IL_87:
|
|
if (this.circuitNode.IsInputConnected(InputSlot.M))
|
|
{
|
|
CircuitNode mbbjmcdgdmn2 = this.circuitNode.MBBJMCDGDMN;
|
|
if (mbbjmcdgdmn2 == 0)
|
|
{
|
|
goto IL_CC;
|
|
}
|
|
int inputSignal2 = mbbjmcdgdmn2.GetInputSignal(InputSlot.M);
|
|
}
|
|
int num = this.sandboxColorable.EJGFMPCAIOD.IAHDANBDAAM();
|
|
this.IBMHPGNKNCA(num);
|
|
IL_CC:
|
|
if (!this.circuitNode.IsInputConnected(InputSlot.Y))
|
|
{
|
|
this.DICJIIBFIIA = (int)((ulong)0L);
|
|
this.OHOOCMKOPLO();
|
|
}
|
|
this.OHOOCMKOPLO();
|
|
}
|
|
|
|
// Token: 0x06015971 RID: 88433 RVA: 0x0050CF8C File Offset: 0x0050B18C
|
|
[Token(Token = "0x6015971")]
|
|
[Address(RVA = "0xEA7460", Offset = "0xEA6260", VA = "0x180EA7460", Slot = "14")]
|
|
protected override void OnDestroy()
|
|
{
|
|
CircuitEventNodeDisplay circuitEventNodeDisplay = this.circuitNode;
|
|
Action action = new Action(this.NFCJMMCJNAP);
|
|
circuitEventNodeDisplay.DMKDMKIDPLC -= action;
|
|
Tool tool = this.tool;
|
|
Action action2 = new Action(this.BOBBBOLPOPC);
|
|
tool.NBBKCDDPBPD -= action2;
|
|
SandboxColorable sandboxColorable = this.sandboxColorable;
|
|
Action action3 = new Action(this.NFCJMMCJNAP);
|
|
sandboxColorable.JJCKDBNNKAM -= action3;
|
|
base.OnDestroy();
|
|
}
|
|
|
|
// Token: 0x06015972 RID: 88434 RVA: 0x0050CFFC File Offset: 0x0050B1FC
|
|
[Token(Token = "0x6015972")]
|
|
[Address(RVA = "0xEA6CD0", Offset = "0xEA5AD0", VA = "0x180EA6CD0")]
|
|
private void BOBBBOLPOPC()
|
|
{
|
|
this.OHOOCMKOPLO();
|
|
}
|
|
|
|
// Token: 0x06015973 RID: 88435 RVA: 0x0050D010 File Offset: 0x0050B210
|
|
[Token(Token = "0x6015973")]
|
|
[Address(RVA = "0xEA7130", Offset = "0xEA5F30", VA = "0x180EA7130")]
|
|
private void NFCJMMCJNAP()
|
|
{
|
|
if (this.circuitNode.IsInputConnected(InputSlot.C))
|
|
{
|
|
CircuitNode mbbjmcdgdmn = this.circuitNode.MBBJMCDGDMN;
|
|
if (mbbjmcdgdmn == 0)
|
|
{
|
|
goto IL_2E;
|
|
}
|
|
int inputSignal = mbbjmcdgdmn.GetInputSignal(InputSlot.C);
|
|
}
|
|
this.OGLDMBFDGKH(1);
|
|
IL_2E:
|
|
if (this.circuitNode.IsInputConnected(InputSlot.M))
|
|
{
|
|
CircuitNode mbbjmcdgdmn2 = this.circuitNode.MBBJMCDGDMN;
|
|
if (mbbjmcdgdmn2 == 0)
|
|
{
|
|
goto IL_6F;
|
|
}
|
|
int inputSignal2 = mbbjmcdgdmn2.GetInputSignal(InputSlot.M);
|
|
}
|
|
int num = this.sandboxColorable.EJGFMPCAIOD.IAHDANBDAAM();
|
|
this.IBMHPGNKNCA(num);
|
|
IL_6F:
|
|
if (!this.circuitNode.IsInputConnected(InputSlot.Y))
|
|
{
|
|
this.DICJIIBFIIA = (int)((ulong)0L);
|
|
this.OHOOCMKOPLO();
|
|
}
|
|
}
|
|
|
|
// Token: 0x06015974 RID: 88436 RVA: 0x0050D0B0 File Offset: 0x0050B2B0
|
|
[Token(Token = "0x6015974")]
|
|
[Address(RVA = "0xEA7570", Offset = "0xEA6370", VA = "0x180EA7570")]
|
|
public void OnInputsReceived(Dictionary<InputSlot, int> updates)
|
|
{
|
|
int num = 0;
|
|
if (updates.TryGetValue(3, num) && this.circuitNode.IsInputConnected(InputSlot.C))
|
|
{
|
|
this.OGLDMBFDGKH(num);
|
|
}
|
|
if (updates.TryGetValue((uint)4, num))
|
|
{
|
|
this.IBMHPGNKNCA(num);
|
|
}
|
|
bool flag;
|
|
if (flag)
|
|
{
|
|
this.OHOOCMKOPLO();
|
|
}
|
|
}
|
|
|
|
// Token: 0x06015975 RID: 88437 RVA: 0x0050D104 File Offset: 0x0050B304
|
|
[Token(Token = "0x6015975")]
|
|
[Address(RVA = "0xEA7280", Offset = "0xEA6080", VA = "0x180EA7280")]
|
|
private void OGLDMBFDGKH(int BECIIEHIPMJ)
|
|
{
|
|
GameObject gameObject = this.beamMesh.gameObject;
|
|
}
|
|
|
|
// Token: 0x06015976 RID: 88438 RVA: 0x0050D124 File Offset: 0x0050B324
|
|
[Token(Token = "0x6015976")]
|
|
[Address(RVA = "0xEA7310", Offset = "0xEA6110", VA = "0x180EA7310")]
|
|
private void OHOOCMKOPLO()
|
|
{
|
|
Transform transform = base.transform;
|
|
Transform transform2 = this.beamMesh.transform;
|
|
Transform transform3 = this.beamMesh.transform;
|
|
MeshRenderer meshRenderer = this.beamMesh;
|
|
Vector3 vector;
|
|
float z = vector.z;
|
|
Transform transform4 = meshRenderer.transform;
|
|
}
|
|
|
|
// Token: 0x06015977 RID: 88439 RVA: 0x0050D174 File Offset: 0x0050B374
|
|
[Token(Token = "0x6015977")]
|
|
[Address(RVA = "0xEA6CE0", Offset = "0xEA5AE0", VA = "0x180EA6CE0")]
|
|
private HolographicColorPair HEAGHKOOMJD(int AOGHIJCLDDC)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (06015977)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling RecRoom.Core.Creation.HolographicColorPair RecRoom.Core.Creation.SandboxCircuitBeacon::HEAGHKOOMJD(System.Int32)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
IL_06:
|
|
stloc:Color(var_3_11, ldfld:Color(HolographicColorPair::ShaftColor, ldfld:HolographicColorPair[exp:valuetype RecRoom.Core.Creation.HolographicColorPair&](ShapeColorInfo::holographicColors, ldloc:ShapeColorInfo(var_1))))
|
|
stloc:int32(var_6_19, ldc.i4:int32(0))
|
|
stfld:native int(Object::m_CachedPtr, ldloc:SandboxCircuitBeacon[exp:Object](this), ldloc:int32[exp:native int](var_6_19))
|
|
}
|
|
|
|
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: 0x06015978 RID: 88440 RVA: 0x0050D1A4 File Offset: 0x0050B3A4
|
|
[Token(Token = "0x6015978")]
|
|
[Address(RVA = "0xEA6E60", Offset = "0xEA5C60", VA = "0x180EA6E60")]
|
|
private void IBMHPGNKNCA(int AOGHIJCLDDC)
|
|
{
|
|
ShapeColorInfo shapeColorInfo;
|
|
if (shapeColorInfo == 0)
|
|
{
|
|
}
|
|
Color shaftColor = shapeColorInfo.holographicColors.ShaftColor;
|
|
float num = this.scanlineColorLighteningFactor;
|
|
int num2 = 0;
|
|
float a = this.unwiredHolographicColor.ShaftColor.a;
|
|
int num3 = 0;
|
|
MaterialPropertyBlock pojkkilegbc = this.POJKKILEGBC;
|
|
this.KHKHEGCJGGD = num2;
|
|
this.KHKHEGCJGGD.ShaftColor = num3;
|
|
MaterialPropertyBlock materialPropertyBlock;
|
|
if (pojkkilegbc == 0)
|
|
{
|
|
materialPropertyBlock = new MaterialPropertyBlock();
|
|
this.POJKKILEGBC = materialPropertyBlock;
|
|
}
|
|
this.beamMesh.Internal_GetPropertyBlock(materialPropertyBlock);
|
|
MaterialPropertyBlock pojkkilegbc2 = this.POJKKILEGBC;
|
|
Color shaftColor2 = this.KHKHEGCJGGD.ShaftColor;
|
|
int cchofpafeho = PAMNDKEGFFG.CCHOFPAFEHO;
|
|
pojkkilegbc2.SetColor(cchofpafeho, shaftColor2);
|
|
MaterialPropertyBlock pojkkilegbc3 = this.POJKKILEGBC;
|
|
HolographicColorPair khkhegcjggd = this.KHKHEGCJGGD;
|
|
MeshRenderer meshRenderer = this.beamMesh;
|
|
MaterialPropertyBlock pojkkilegbc4 = this.POJKKILEGBC;
|
|
meshRenderer.Internal_SetPropertyBlock(pojkkilegbc4);
|
|
MeshRenderer meshRenderer2 = this.baseMesh;
|
|
MaterialPropertyBlock pojkkilegbc5 = this.POJKKILEGBC;
|
|
meshRenderer2.Internal_GetPropertyBlock(pojkkilegbc5);
|
|
MaterialPropertyBlock pojkkilegbc6 = this.POJKKILEGBC;
|
|
Color shaftColor3 = this.KHKHEGCJGGD.ShaftColor;
|
|
int cchofpafeho2 = PAMNDKEGFFG.CCHOFPAFEHO;
|
|
pojkkilegbc6.SetColor(cchofpafeho2, shaftColor3);
|
|
MeshRenderer meshRenderer3 = this.baseMesh;
|
|
MaterialPropertyBlock pojkkilegbc7 = this.POJKKILEGBC;
|
|
meshRenderer3.Internal_SetPropertyBlock(pojkkilegbc7);
|
|
}
|
|
|
|
// Token: 0x06015979 RID: 88441 RVA: 0x0050D2D4 File Offset: 0x0050B4D4
|
|
[Token(Token = "0x6015979")]
|
|
[Address(RVA = "0xEA78A0", Offset = "0xEA66A0", VA = "0x180EA78A0")]
|
|
public SandboxCircuitBeacon()
|
|
{
|
|
}
|
|
|
|
// Token: 0x0400E349 RID: 58185
|
|
[Token(Token = "0x400E349")]
|
|
private const InputSlot INHGGCHKDPG = InputSlot.C;
|
|
|
|
// Token: 0x0400E34A RID: 58186
|
|
[Token(Token = "0x400E34A")]
|
|
private const InputSlot DCBAFLCOHHP = InputSlot.M;
|
|
|
|
// Token: 0x0400E34B RID: 58187
|
|
[Token(Token = "0x400E34B")]
|
|
private const InputSlot INFBFKEILAF = InputSlot.Y;
|
|
|
|
// Token: 0x0400E34C RID: 58188
|
|
[FieldOffset(Offset = "0x40")]
|
|
[Token(Token = "0x400E34C")]
|
|
private MaterialPropertyBlock POJKKILEGBC;
|
|
|
|
// Token: 0x0400E34D RID: 58189
|
|
[FieldOffset(Offset = "0x48")]
|
|
[Token(Token = "0x400E34D")]
|
|
private HolographicColorPair KHKHEGCJGGD;
|
|
|
|
// Token: 0x0400E34E RID: 58190
|
|
[FieldOffset(Offset = "0x68")]
|
|
[Token(Token = "0x400E34E")]
|
|
private int DICJIIBFIIA;
|
|
|
|
// Token: 0x0400E34F RID: 58191
|
|
[FieldOffset(Offset = "0x6C")]
|
|
[Token(Token = "0x400E34F")]
|
|
private float DPHCBKPEDDK;
|
|
|
|
// Token: 0x0400E350 RID: 58192
|
|
[FieldOffset(Offset = "0x70")]
|
|
[Token(Token = "0x400E350")]
|
|
[SerializeField]
|
|
private MeshRenderer beamMesh;
|
|
|
|
// Token: 0x0400E351 RID: 58193
|
|
[FieldOffset(Offset = "0x78")]
|
|
[Token(Token = "0x400E351")]
|
|
[SerializeField]
|
|
private MeshRenderer baseMesh;
|
|
|
|
// Token: 0x0400E352 RID: 58194
|
|
[FieldOffset(Offset = "0x80")]
|
|
[Token(Token = "0x400E352")]
|
|
[SerializeField]
|
|
private HolographicColorPair unwiredHolographicColor;
|
|
|
|
// Token: 0x0400E353 RID: 58195
|
|
[FieldOffset(Offset = "0xA0")]
|
|
[Token(Token = "0x400E353")]
|
|
[SerializeField]
|
|
private float scanlineColorLighteningFactor = 1.25f;
|
|
|
|
// Token: 0x0400E354 RID: 58196
|
|
[FieldOffset(Offset = "0xA8")]
|
|
[Token(Token = "0x400E354")]
|
|
[SerializeField]
|
|
[DDPIINEJFMD(JIBDPHMGEGO.Self, false, false, false)]
|
|
private CircuitEventNodeDisplay circuitNode;
|
|
|
|
// Token: 0x0400E355 RID: 58197
|
|
[FieldOffset(Offset = "0xB0")]
|
|
[Token(Token = "0x400E355")]
|
|
[SerializeField]
|
|
[DDPIINEJFMD(JIBDPHMGEGO.Self, false, false, false)]
|
|
private SandboxColorable sandboxColorable;
|
|
|
|
// Token: 0x0400E356 RID: 58198
|
|
[FieldOffset(Offset = "0xB8")]
|
|
[Token(Token = "0x400E356")]
|
|
[SerializeField]
|
|
[DDPIINEJFMD(JIBDPHMGEGO.Self, false, false, false)]
|
|
private Tool tool;
|
|
}
|
|
}
|