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: 0x0200320E RID: 12814
|
|
[Token(Token = "0x200320E")]
|
|
public class SandboxCircuitBeacon : MonoBehaviourPun
|
|
{
|
|
// Token: 0x06015DEC RID: 89580 RVA: 0x00517868 File Offset: 0x00515A68
|
|
[Token(Token = "0x6015DEC")]
|
|
[Address(RVA = "0x193B300", Offset = "0x193A300", VA = "0x18193B300")]
|
|
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.DMLIOOCLKKP;
|
|
this.IBMHPGNKNCA(num);
|
|
IL_CC:
|
|
if (!this.circuitNode.IsInputConnected(InputSlot.Y))
|
|
{
|
|
this.DICJIIBFIIA = (int)((ulong)0L);
|
|
this.OHOOCMKOPLO();
|
|
}
|
|
this.OHOOCMKOPLO();
|
|
}
|
|
|
|
// Token: 0x06015DED RID: 89581 RVA: 0x0051796C File Offset: 0x00515B6C
|
|
[Token(Token = "0x6015DED")]
|
|
[Address(RVA = "0x193B100", Offset = "0x193A100", VA = "0x18193B100", 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: 0x06015DEE RID: 89582 RVA: 0x005179DC File Offset: 0x00515BDC
|
|
[Token(Token = "0x6015DEE")]
|
|
[Address(RVA = "0x193A970", Offset = "0x1939970", VA = "0x18193A970")]
|
|
private void BOBBBOLPOPC()
|
|
{
|
|
this.OHOOCMKOPLO();
|
|
}
|
|
|
|
// Token: 0x06015DEF RID: 89583 RVA: 0x005179F0 File Offset: 0x00515BF0
|
|
[Token(Token = "0x6015DEF")]
|
|
[Address(RVA = "0x193ADD0", Offset = "0x1939DD0", VA = "0x18193ADD0")]
|
|
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.DMLIOOCLKKP;
|
|
this.IBMHPGNKNCA(num);
|
|
IL_6F:
|
|
if (!this.circuitNode.IsInputConnected(InputSlot.Y))
|
|
{
|
|
this.DICJIIBFIIA = (int)((ulong)0L);
|
|
this.OHOOCMKOPLO();
|
|
}
|
|
}
|
|
|
|
// Token: 0x06015DF0 RID: 89584 RVA: 0x00517A90 File Offset: 0x00515C90
|
|
[Token(Token = "0x6015DF0")]
|
|
[Address(RVA = "0x193B210", Offset = "0x193A210", VA = "0x18193B210")]
|
|
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: 0x06015DF1 RID: 89585 RVA: 0x00517AE4 File Offset: 0x00515CE4
|
|
[Token(Token = "0x6015DF1")]
|
|
[Address(RVA = "0x193AF20", Offset = "0x1939F20", VA = "0x18193AF20")]
|
|
private void OGLDMBFDGKH(int BECIIEHIPMJ)
|
|
{
|
|
GameObject gameObject = this.beamMesh.gameObject;
|
|
}
|
|
|
|
// Token: 0x06015DF2 RID: 89586 RVA: 0x00517B04 File Offset: 0x00515D04
|
|
[Token(Token = "0x6015DF2")]
|
|
[Address(RVA = "0x193AFB0", Offset = "0x1939FB0", VA = "0x18193AFB0")]
|
|
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: 0x06015DF3 RID: 89587 RVA: 0x00517B54 File Offset: 0x00515D54
|
|
[Token(Token = "0x6015DF3")]
|
|
[Address(RVA = "0x193A980", Offset = "0x1939980", VA = "0x18193A980")]
|
|
private HolographicColorPair HEAGHKOOMJD(int AOGHIJCLDDC)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (06015DF3)
|
|
|
|
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: 0x06015DF4 RID: 89588 RVA: 0x00517B84 File Offset: 0x00515D84
|
|
[Token(Token = "0x6015DF4")]
|
|
[Address(RVA = "0x193AB00", Offset = "0x1939B00", VA = "0x18193AB00")]
|
|
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: 0x06015DF5 RID: 89589 RVA: 0x00517CB4 File Offset: 0x00515EB4
|
|
[Token(Token = "0x6015DF5")]
|
|
[Address(RVA = "0x193B550", Offset = "0x193A550", VA = "0x18193B550")]
|
|
public SandboxCircuitBeacon()
|
|
{
|
|
}
|
|
|
|
// Token: 0x0400E586 RID: 58758
|
|
[Token(Token = "0x400E586")]
|
|
private const InputSlot INHGGCHKDPG = InputSlot.C;
|
|
|
|
// Token: 0x0400E587 RID: 58759
|
|
[Token(Token = "0x400E587")]
|
|
private const InputSlot DCBAFLCOHHP = InputSlot.M;
|
|
|
|
// Token: 0x0400E588 RID: 58760
|
|
[Token(Token = "0x400E588")]
|
|
private const InputSlot INFBFKEILAF = InputSlot.Y;
|
|
|
|
// Token: 0x0400E589 RID: 58761
|
|
[FieldOffset(Offset = "0x40")]
|
|
[Token(Token = "0x400E589")]
|
|
private MaterialPropertyBlock POJKKILEGBC;
|
|
|
|
// Token: 0x0400E58A RID: 58762
|
|
[FieldOffset(Offset = "0x48")]
|
|
[Token(Token = "0x400E58A")]
|
|
private HolographicColorPair KHKHEGCJGGD;
|
|
|
|
// Token: 0x0400E58B RID: 58763
|
|
[FieldOffset(Offset = "0x68")]
|
|
[Token(Token = "0x400E58B")]
|
|
private int DICJIIBFIIA;
|
|
|
|
// Token: 0x0400E58C RID: 58764
|
|
[FieldOffset(Offset = "0x6C")]
|
|
[Token(Token = "0x400E58C")]
|
|
private float DPHCBKPEDDK;
|
|
|
|
// Token: 0x0400E58D RID: 58765
|
|
[FieldOffset(Offset = "0x70")]
|
|
[Token(Token = "0x400E58D")]
|
|
[SerializeField]
|
|
private MeshRenderer beamMesh;
|
|
|
|
// Token: 0x0400E58E RID: 58766
|
|
[FieldOffset(Offset = "0x78")]
|
|
[Token(Token = "0x400E58E")]
|
|
[SerializeField]
|
|
private MeshRenderer baseMesh;
|
|
|
|
// Token: 0x0400E58F RID: 58767
|
|
[FieldOffset(Offset = "0x80")]
|
|
[Token(Token = "0x400E58F")]
|
|
[SerializeField]
|
|
private HolographicColorPair unwiredHolographicColor;
|
|
|
|
// Token: 0x0400E590 RID: 58768
|
|
[FieldOffset(Offset = "0xA0")]
|
|
[Token(Token = "0x400E590")]
|
|
[SerializeField]
|
|
private float scanlineColorLighteningFactor = 1.25f;
|
|
|
|
// Token: 0x0400E591 RID: 58769
|
|
[FieldOffset(Offset = "0xA8")]
|
|
[Token(Token = "0x400E591")]
|
|
[SerializeField]
|
|
[NKNLDEIPALE(FHBJCBPFODN.Self, false, false, false)]
|
|
private CircuitEventNodeDisplay circuitNode;
|
|
|
|
// Token: 0x0400E592 RID: 58770
|
|
[FieldOffset(Offset = "0xB0")]
|
|
[Token(Token = "0x400E592")]
|
|
[SerializeField]
|
|
[NKNLDEIPALE(FHBJCBPFODN.Self, false, false, false)]
|
|
private SandboxColorable sandboxColorable;
|
|
|
|
// Token: 0x0400E593 RID: 58771
|
|
[FieldOffset(Offset = "0xB8")]
|
|
[Token(Token = "0x400E593")]
|
|
[SerializeField]
|
|
[NKNLDEIPALE(FHBJCBPFODN.Self, false, false, false)]
|
|
private Tool tool;
|
|
}
|
|
}
|