387 lines
15 KiB
C#
387 lines
15 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using Cpp2IlInjected;
|
|
using Photon.Pun;
|
|
using RecRoom.Core;
|
|
using RecRoom.Core.Creation;
|
|
using RecRoom.Core.Creation.Shapes;
|
|
using RecRoom.Core.Creation.UndoStack;
|
|
using RecRoom.Core.Rendering;
|
|
using UnityEngine;
|
|
|
|
namespace RecRoom.Tools.MakerPenTools
|
|
{
|
|
// Token: 0x02002AF8 RID: 11000
|
|
[Token(Token = "0x2002AF8")]
|
|
[Serializable]
|
|
public class MakerPenToolManipulate_Shape : MakerPenTool
|
|
{
|
|
// Token: 0x17003389 RID: 13193
|
|
// (get) Token: 0x0601271F RID: 75551 RVA: 0x00437E80 File Offset: 0x00436080
|
|
[Token(Token = "0x17003389")]
|
|
public override string HudLabel
|
|
{
|
|
[Token(Token = "0x601271F")]
|
|
[Address(RVA = "0x13158B0", Offset = "0x13146B0", VA = "0x1813158B0", Slot = "10")]
|
|
get
|
|
{
|
|
return "Manipulate Shapes";
|
|
}
|
|
}
|
|
|
|
// Token: 0x1700338A RID: 13194
|
|
// (get) Token: 0x06012720 RID: 75552 RVA: 0x00437E94 File Offset: 0x00436094
|
|
[Token(Token = "0x1700338A")]
|
|
public override Sprite HudSprite
|
|
{
|
|
[Token(Token = "0x6012720")]
|
|
[Address(RVA = "0x13158E0", Offset = "0x13146E0", VA = "0x1813158E0", Slot = "11")]
|
|
get
|
|
{
|
|
return NPILADHLMKC.KGDLBEAPDFE(NPILADHLMKC.ONGOGHFGDEF.Manipulate);
|
|
}
|
|
}
|
|
|
|
// Token: 0x06012721 RID: 75553 RVA: 0x00437EA8 File Offset: 0x004360A8
|
|
[Token(Token = "0x6012721")]
|
|
[Address(RVA = "0x13157D0", Offset = "0x13145D0", VA = "0x1813157D0", Slot = "4")]
|
|
public override void OFFLOPLJBBG(MakerPen.HJPIHGIFKEO FIBGLDDKDLB, MakerPen.KLAENPHIBEM OIHFNIFGFJB)
|
|
{
|
|
IFMKEGAIHID ifmkegaihid = new IFMKEGAIHID();
|
|
this.shapeManipulationManager = ifmkegaihid;
|
|
}
|
|
|
|
// Token: 0x06012722 RID: 75554 RVA: 0x00437EC4 File Offset: 0x004360C4
|
|
[Token(Token = "0x6012722")]
|
|
[Address(RVA = "0x1315530", Offset = "0x1314330", VA = "0x181315530", Slot = "6")]
|
|
public override void DJFDPJKOGMJ(MakerPenTool.AGPFBFDFDHB EJCLBKHJIHO, MakerPen.HJPIHGIFKEO IFNKPAHPIID)
|
|
{
|
|
base.DJFDPJKOGMJ(EJCLBKHJIHO, IFNKPAHPIID);
|
|
CreationController creationController = this.creationController;
|
|
this.hasSelectedHandle = false;
|
|
bool flag = IFNKPAHPIID == MakerPen.HJPIHGIFKEO.Object;
|
|
this.triggerSelectionNextFrame = flag;
|
|
if (creationController.<CreationContext>k__BackingField.ENEJDOAEDCJ > 1)
|
|
{
|
|
this.creationController.<CreationContext>k__BackingField.RemoveAllFromSelection();
|
|
}
|
|
}
|
|
|
|
// Token: 0x06012723 RID: 75555 RVA: 0x00437F1C File Offset: 0x0043611C
|
|
[Token(Token = "0x6012723")]
|
|
[Address(RVA = "0x1314480", Offset = "0x1313280", VA = "0x181314480", Slot = "8")]
|
|
public override void BALOKJMBNIN()
|
|
{
|
|
CreationController creationController11;
|
|
for (;;)
|
|
{
|
|
MakerPenVisuals penVisuals = this.creationController.<MakerPen>k__BackingField._penVisuals;
|
|
IFMKEGAIHID ifmkegaihid = this.shapeManipulationManager;
|
|
int num = 0;
|
|
if ((this.hasSelectedHandle ? 1 : 0) == num)
|
|
{
|
|
CreationContext <CreationContext>k__BackingField = this.creationController.<CreationContext>k__BackingField;
|
|
}
|
|
ShapeCreationContext shapeCreationContext = this.creationController.<CreationContext>k__BackingField.shapeCreationContext;
|
|
float laserMaxDistance = penVisuals.ABDDKMOLPIO;
|
|
Guid[] shape_RAYCAST_RESULTS = MakerPenTool.SHAPE_RAYCAST_RESULTS;
|
|
MakerPenVisuals penVisuals2 = this.creationController.<MakerPen>k__BackingField._penVisuals;
|
|
int num2 = 0;
|
|
int num3;
|
|
if (num3 > 0)
|
|
{
|
|
}
|
|
penVisuals2.<CCHCGAPFBIB>k__BackingField = num2;
|
|
if (this.creationController.<CreationContext>k__BackingField.shapeCreationContext.ENEJDOAEDCJ == 1 && num3 > 0)
|
|
{
|
|
ShapeCreationContext shapeCreationContext2 = this.creationController.<CreationContext>k__BackingField.shapeCreationContext;
|
|
Guid guid = MakerPenTool.SHAPE_RAYCAST_RESULTS[0];
|
|
bool flag = shapeCreationContext2.IsSelected(guid);
|
|
}
|
|
int num4 = 0;
|
|
if ((this.hasSelectedHandle ? 1 : 0) == num)
|
|
{
|
|
goto IL_11A;
|
|
}
|
|
bool flag2;
|
|
if (!flag2)
|
|
{
|
|
CreationController creationController = this.creationController;
|
|
IFMKEGAIHID ifmkegaihid2 = this.shapeManipulationManager;
|
|
ShapeCreationContext shapeCreationContext3 = creationController.<CreationContext>k__BackingField.shapeCreationContext;
|
|
int num5 = 0;
|
|
Transform transform = shapeCreationContext3.TryGetSelectedPrimitiveShapeTransform();
|
|
ShapeCreationContext shapeCreationContext4 = this.creationController.<CreationContext>k__BackingField.shapeCreationContext;
|
|
ShapeManipulationHandle shapeManipulationHandle = ifmkegaihid2.MLEHINAFHJA(num5, transform, shapeCreationContext4);
|
|
goto IL_11A;
|
|
}
|
|
IL_1F4:
|
|
ShapeManipulationHandle shapeManipulationHandle2;
|
|
if (shapeManipulationHandle2)
|
|
{
|
|
shapeManipulationHandle2.Highlight();
|
|
}
|
|
if (!this.creationController.IsSelectInputDown && (this.triggerSelectionNextFrame ? 1 : 0) == num)
|
|
{
|
|
if (!this.creationController.IsSelectInputPressed)
|
|
{
|
|
break;
|
|
}
|
|
CreationController creationController2 = this.creationController;
|
|
CreationController.PLGPMIKGDDC plgpmikgddc = this.rayOffset;
|
|
CreationController creationController3 = this.creationController;
|
|
Vector3 vector;
|
|
float z = vector.z;
|
|
Quaternion quaternion = this.penRotationOffset;
|
|
float unscaledTime = Time.unscaledTime;
|
|
float unscaledTime2 = Time.unscaledTime;
|
|
this.lastSynchronizeTime = unscaledTime2;
|
|
CreationController creationController4 = this.creationController;
|
|
MakerPen <MakerPen>k__BackingField = creationController4.<MakerPen>k__BackingField;
|
|
ShapeCreationContext shapeCreationContext5 = creationController4.<CreationContext>k__BackingField.shapeCreationContext;
|
|
}
|
|
this.triggerSelectionNextFrame = false;
|
|
bool flag3;
|
|
this.hasSelectedHandle = flag3;
|
|
ShapeCreationContext shapeCreationContext6;
|
|
if (!flag3)
|
|
{
|
|
CreationController creationController5 = this.creationController;
|
|
MakerPen <MakerPen>k__BackingField2 = creationController5.<MakerPen>k__BackingField;
|
|
creationController5.<CreationContext>k__BackingField.shapeCreationContext.RemoveAllFromSelection();
|
|
shapeCreationContext6 = this.creationController.<CreationContext>k__BackingField.shapeCreationContext;
|
|
Guid guid2 = MakerPenTool.SHAPE_RAYCAST_RESULTS[0];
|
|
bool flag4 = shapeCreationContext6.AddToSelection(guid2);
|
|
}
|
|
CreationContext <CreationContext>k__BackingField2 = this.creationController.<CreationContext>k__BackingField;
|
|
bool flag5;
|
|
if (!flag5)
|
|
{
|
|
this.hasSelectedHandle = false;
|
|
}
|
|
CreationController creationController6 = this.creationController;
|
|
CreationController creationController7 = this.creationController;
|
|
float unscaledTime3 = Time.unscaledTime;
|
|
CreationController creationController8 = this.creationController;
|
|
this.lastSynchronizeTime = unscaledTime3;
|
|
PhotonView pvCache = shapeCreationContext6.pvCache;
|
|
this.handleInfo = pvCache;
|
|
Action onDestroyEvent = shapeCreationContext6.OnDestroyEvent;
|
|
this.handleInfo.GLHHBDHELAO.y = onDestroyEvent;
|
|
bool forwardedRegistered = shapeCreationContext6.forwardedRegistered;
|
|
this.handleInfo.GOGCPNPLCEP = forwardedRegistered;
|
|
CreationContext parentCreationContext = shapeCreationContext6.parentCreationContext;
|
|
this.handleInfo.IGPENJBJADK = parentCreationContext;
|
|
int goonokpfbmj = shapeCreationContext6.GOONOKPFBMJ;
|
|
this.handleInfo.MBIEHEFDGKE = goonokpfbmj;
|
|
MakerPenVisuals penVisuals3 = creationController8.<MakerPen>k__BackingField._penVisuals;
|
|
int num6 = 0;
|
|
penVisuals3.MNADIBEHEMI = num6 != 0;
|
|
SelectionRendererEffect.Disable(this);
|
|
CreationController creationController9 = this.creationController;
|
|
NNNJFEILANM snapping = creationController9.<MakerPen>k__BackingField.Snapping;
|
|
TranslationSnappingVisualization translationSnappingVisualization = creationController9.TranslationSnappingVisualization;
|
|
CreationController creationController10 = this.creationController;
|
|
CreationContext <CreationContext>k__BackingField3 = creationController10.<CreationContext>k__BackingField;
|
|
float <GHFHFLCINKP>k__BackingField = creationController10.<MakerPen>k__BackingField.Snapping.<GHFHFLCINKP>k__BackingField;
|
|
ShapeCreationContext shapeCreationContext7 = <CreationContext>k__BackingField3.shapeCreationContext;
|
|
translationSnappingVisualization.Enable(shapeCreationContext7, <GHFHFLCINKP>k__BackingField);
|
|
creationController11 = this.creationController;
|
|
if (creationController11.<CreationContext>k__BackingField.SelectionScalingStarted != 0)
|
|
{
|
|
goto Block_14;
|
|
}
|
|
continue;
|
|
IL_11A:
|
|
IFMKEGAIHID ifmkegaihid3 = this.shapeManipulationManager;
|
|
ShapeManipulationHandle shapeManipulationHandle3;
|
|
if (num4 == 0 && shapeManipulationHandle3)
|
|
{
|
|
Transform transform2 = shapeManipulationHandle3.transform;
|
|
Vector3 vector2;
|
|
float z2 = vector2.z;
|
|
Transform extrusionPoint = this.creationController.<MakerPen>k__BackingField._penVisuals.extrusionPoint;
|
|
Vector3 vector3;
|
|
float z3 = vector3.z;
|
|
Vector3 vector4;
|
|
float z4 = vector4.z;
|
|
Transform extrusionPoint2 = this.creationController.<MakerPen>k__BackingField._penVisuals.extrusionPoint;
|
|
Vector3 vector5;
|
|
float z5 = vector5.z;
|
|
MakerPenVisuals penVisuals4 = this.creationController.<MakerPen>k__BackingField._penVisuals;
|
|
Transform extrusionPoint3 = penVisuals4.extrusionPoint;
|
|
Vector3 vector6;
|
|
float z6 = vector6.z;
|
|
Transform extrusionPoint4 = this.creationController.<MakerPen>k__BackingField._penVisuals.extrusionPoint;
|
|
Vector3 vector7;
|
|
float z7 = vector7.z;
|
|
Vector3 vector8;
|
|
float z8 = vector8.z;
|
|
Vector3 vector9;
|
|
float z9 = vector9.z;
|
|
int num7 = 0;
|
|
penVisuals4.<CCHCGAPFBIB>k__BackingField = num7;
|
|
goto IL_1F4;
|
|
}
|
|
goto IL_1F4;
|
|
}
|
|
if (this.creationController.IsSelectInputUp)
|
|
{
|
|
this.BPOEKOOILFA();
|
|
}
|
|
return;
|
|
Block_14:
|
|
MakerPenVisuals penVisuals5 = creationController11.<MakerPen>k__BackingField._penVisuals;
|
|
ShapeContainer selectedShapeContainer = this.creationController.<CreationContext>k__BackingField.shapeCreationContext.HAHLCMFENMD;
|
|
IReadOnlyList<Guid> readOnlyList = this.creationController.<CreationContext>k__BackingField.shapeCreationContext.ABNCFJMLCMP();
|
|
CreationContext <CreationContext>k__BackingField4 = this.creationController.<CreationContext>k__BackingField;
|
|
NNCBAGGPCIF nncbaggpcif = new NNCBAGGPCIF(selectedShapeContainer, readOnlyList, <CreationContext>k__BackingField4);
|
|
this.pendingUndoEntry = nncbaggpcif;
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x06012724 RID: 75556 RVA: 0x004383D8 File Offset: 0x004365D8
|
|
[Token(Token = "0x6012724")]
|
|
[Address(RVA = "0x1315320", Offset = "0x1314120", VA = "0x181315320", Slot = "7")]
|
|
public override void BDMHMGGPNME(MakerPenTool.AGPFBFDFDHB EJCLBKHJIHO)
|
|
{
|
|
base.BDMHMGGPNME(EJCLBKHJIHO);
|
|
this.triggerSelectionNextFrame = false;
|
|
this.BPOEKOOILFA();
|
|
this.shapeManipulationManager.ODDLGBNDEAN();
|
|
}
|
|
|
|
// Token: 0x06012725 RID: 75557 RVA: 0x0043840C File Offset: 0x0043660C
|
|
[Token(Token = "0x6012725")]
|
|
[Address(RVA = "0x13155A0", Offset = "0x13143A0", VA = "0x1813155A0", Slot = "17")]
|
|
public override bool IFIHNMEBGLF(Ray OPMKFDNLHKI)
|
|
{
|
|
IFMKEGAIHID ifmkegaihid = this.shapeManipulationManager;
|
|
int num = 0;
|
|
ShapeManipulationHandle shapeManipulationHandle;
|
|
return shapeManipulationHandle != num;
|
|
}
|
|
|
|
// Token: 0x06012726 RID: 75558 RVA: 0x00438430 File Offset: 0x00436630
|
|
[Token(Token = "0x6012726")]
|
|
[Address(RVA = "0x1315690", Offset = "0x1314490", VA = "0x181315690")]
|
|
private void MNHHMEACPMJ()
|
|
{
|
|
if (this.hasSelectedHandle)
|
|
{
|
|
CreationController creationController = this.creationController;
|
|
CreationController creationController2 = this.creationController;
|
|
Vector3 vector;
|
|
float z = vector.z;
|
|
Quaternion quaternion = this.penRotationOffset;
|
|
float unscaledTime = Time.unscaledTime;
|
|
float unscaledTime2 = Time.unscaledTime;
|
|
this.lastSynchronizeTime = unscaledTime2;
|
|
CreationController creationController3 = this.creationController;
|
|
MakerPen <MakerPen>k__BackingField = creationController3.<MakerPen>k__BackingField;
|
|
ShapeCreationContext shapeCreationContext = creationController3.<CreationContext>k__BackingField.shapeCreationContext;
|
|
}
|
|
}
|
|
|
|
// Token: 0x06012727 RID: 75559 RVA: 0x004384A4 File Offset: 0x004366A4
|
|
[Token(Token = "0x6012727")]
|
|
[Address(RVA = "0x1315360", Offset = "0x1314160", VA = "0x181315360")]
|
|
private void BPOEKOOILFA()
|
|
{
|
|
if (this.hasSelectedHandle)
|
|
{
|
|
ShapeCreationContext shapeCreationContext = this.creationController.<CreationContext>k__BackingField.shapeCreationContext;
|
|
}
|
|
CAHCDEBGPFG cahcdebgpfg = this.pendingUndoEntry;
|
|
if (cahcdebgpfg != 0)
|
|
{
|
|
CreationController creationController = this.creationController;
|
|
string text = cahcdebgpfg.GPJEDBDCNNP;
|
|
UndoStack undoStack = this.creationController.<MakerPen>k__BackingField._undoStack;
|
|
CAHCDEBGPFG cahcdebgpfg2 = this.pendingUndoEntry;
|
|
undoStack.Add(cahcdebgpfg2);
|
|
this.pendingUndoEntry = (ulong)0L;
|
|
}
|
|
CreationController creationController2 = this.creationController;
|
|
this.hasSelectedHandle = false;
|
|
creationController2.<MakerPen>k__BackingField._penVisuals.MNADIBEHEMI = true;
|
|
MakerPenVisuals penVisuals = this.creationController.<MakerPen>k__BackingField._penVisuals;
|
|
int num = 0;
|
|
penVisuals.<CCHCGAPFBIB>k__BackingField = num;
|
|
SelectionRendererEffect.Enable(this);
|
|
OKNNKFGFODL selectionScalingFinished = this.creationController.<CreationContext>k__BackingField.SelectionScalingFinished;
|
|
CreationController creationController3;
|
|
if (selectionScalingFinished != 0)
|
|
{
|
|
selectionScalingFinished.CNFDGDEOPPF();
|
|
creationController3 = this.creationController;
|
|
}
|
|
if (!creationController3.<MakerPen>k__BackingField.<EIINFEINIIM>k__BackingField)
|
|
{
|
|
creationController3.TranslationSnappingVisualization.Disable();
|
|
return;
|
|
}
|
|
}
|
|
|
|
// Token: 0x06012728 RID: 75560 RVA: 0x004385A0 File Offset: 0x004367A0
|
|
[Token(Token = "0x6012728")]
|
|
[Address(RVA = "0x1315850", Offset = "0x1314650", VA = "0x181315850")]
|
|
public MakerPenToolManipulate_Shape()
|
|
{
|
|
}
|
|
|
|
// Token: 0x0400BE8A RID: 48778
|
|
[FieldOffset(Offset = "0x48")]
|
|
[Token(Token = "0x400BE8A")]
|
|
[NonSerialized]
|
|
private bool hasSelectedHandle;
|
|
|
|
// Token: 0x0400BE8B RID: 48779
|
|
[FieldOffset(Offset = "0x4C")]
|
|
[Token(Token = "0x400BE8B")]
|
|
[NonSerialized]
|
|
private JNIJFOIGFGJ handleInfo;
|
|
|
|
// Token: 0x0400BE8C RID: 48780
|
|
[FieldOffset(Offset = "0x9C")]
|
|
[Token(Token = "0x400BE8C")]
|
|
[NonSerialized]
|
|
private CreationController.PLGPMIKGDDC rayOffset;
|
|
|
|
// Token: 0x0400BE8D RID: 48781
|
|
[FieldOffset(Offset = "0xAC")]
|
|
[Token(Token = "0x400BE8D")]
|
|
[NonSerialized]
|
|
private Quaternion penRotationOffset;
|
|
|
|
// Token: 0x0400BE8E RID: 48782
|
|
[FieldOffset(Offset = "0xBC")]
|
|
[Token(Token = "0x400BE8E")]
|
|
[NonSerialized]
|
|
private float lastSynchronizeTime;
|
|
|
|
// Token: 0x0400BE8F RID: 48783
|
|
[Token(Token = "0x400BE8F")]
|
|
[NonSerialized]
|
|
private const float MANIPULATION_SYNCHRONIZE_TIME_INTERVAL = 0.1f;
|
|
|
|
// Token: 0x0400BE90 RID: 48784
|
|
[FieldOffset(Offset = "0xC0")]
|
|
[Token(Token = "0x400BE90")]
|
|
[NonSerialized]
|
|
private IFMKEGAIHID shapeManipulationManager;
|
|
|
|
// Token: 0x0400BE91 RID: 48785
|
|
[FieldOffset(Offset = "0xC8")]
|
|
[Token(Token = "0x400BE91")]
|
|
[NonSerialized]
|
|
private CAHCDEBGPFG pendingUndoEntry;
|
|
|
|
// Token: 0x0400BE92 RID: 48786
|
|
[FieldOffset(Offset = "0xD0")]
|
|
[Token(Token = "0x400BE92")]
|
|
[NonSerialized]
|
|
private bool triggerSelectionNextFrame;
|
|
}
|
|
}
|