197 lines
7.8 KiB
C#
197 lines
7.8 KiB
C#
using System;
|
|
using System.Linq;
|
|
using System.Runtime.CompilerServices;
|
|
using System.Threading.Tasks;
|
|
using Cpp2IlInjected;
|
|
using RecRoom.Core;
|
|
using RecRoom.Core.Creation;
|
|
using UnityEngine;
|
|
|
|
namespace RecRoom.Tools.MakerPenTools
|
|
{
|
|
// Token: 0x02002AE8 RID: 10984
|
|
[Token(Token = "0x2002AE8")]
|
|
[Serializable]
|
|
public class MakerPenToolDelete_Object : MakerPenTool
|
|
{
|
|
// Token: 0x17003377 RID: 13175
|
|
// (get) Token: 0x060126D3 RID: 75475 RVA: 0x00436DB8 File Offset: 0x00434FB8
|
|
[Token(Token = "0x17003377")]
|
|
public override string HudLabel
|
|
{
|
|
[Token(Token = "0x60126D3")]
|
|
[Address(RVA = "0x13124C0", Offset = "0x13112C0", VA = "0x1813124C0", Slot = "10")]
|
|
get
|
|
{
|
|
return "Delete";
|
|
}
|
|
}
|
|
|
|
// Token: 0x17003378 RID: 13176
|
|
// (get) Token: 0x060126D4 RID: 75476 RVA: 0x00436DCC File Offset: 0x00434FCC
|
|
[Token(Token = "0x17003378")]
|
|
public override Sprite HudSprite
|
|
{
|
|
[Token(Token = "0x60126D4")]
|
|
[Address(RVA = "0x13124F0", Offset = "0x13112F0", VA = "0x1813124F0", Slot = "11")]
|
|
get
|
|
{
|
|
return NPILADHLMKC.KGDLBEAPDFE(NPILADHLMKC.ONGOGHFGDEF.Delete);
|
|
}
|
|
}
|
|
|
|
// Token: 0x060126D5 RID: 75477 RVA: 0x00436DE0 File Offset: 0x00434FE0
|
|
[Token(Token = "0x60126D5")]
|
|
[Address(RVA = "0x13120F0", Offset = "0x1310EF0", VA = "0x1813120F0", Slot = "8")]
|
|
public override void BALOKJMBNIN()
|
|
{
|
|
int num = 0;
|
|
bool flag;
|
|
if (flag)
|
|
{
|
|
if (!HLKHHIMEICL.IKAGKELDMJH)
|
|
{
|
|
MakerPenToolDelete_Object.ABOAFNJPLIM aboafnjplim = new MakerPenToolDelete_Object.ABOAFNJPLIM();
|
|
aboafnjplim.<>4__this = this;
|
|
GIPDDLFFNGG[] array = Enumerable.ToArray<GIPDDLFFNGG>(this.creationController.<CreationContext>k__BackingField.LLFDKCNCMKF);
|
|
aboafnjplim.cachedSelection = array;
|
|
LFBMEDEMGHA activeGroup = this.creationController.<CreationContext>k__BackingField.MIDCJLJHOCI;
|
|
aboafnjplim.cachedActiveGroup = activeGroup;
|
|
PMGCJEPKFOF<CKNHLOINDFF> pmgcjepkfof = this.creationController.<CreationContext>k__BackingField.SerializeSelection();
|
|
Action<CKNHLOINDFF> action = delegate(CKNHLOINDFF data)
|
|
{
|
|
GIPDDLFFNGG[] cachedSelection = aboafnjplim.cachedSelection;
|
|
Guid currentEditContextId = NetworkedSingletonMonoBehaviour.ONCPNMDGGKG.CNEADFAOPFL;
|
|
CreationContext <CreationContext>k__BackingField = aboafnjplim.<>4__this.creationController.<CreationContext>k__BackingField;
|
|
JGLCDBNDHNB jglcdbndhnb = new JGLCDBNDHNB(cachedSelection, data, currentEditContextId, <CreationContext>k__BackingField);
|
|
aboafnjplim.<>4__this.creationController.<MakerPen>k__BackingField._undoStack.Add(jglcdbndhnb);
|
|
};
|
|
if (num < aboafnjplim)
|
|
{
|
|
num += num;
|
|
if (num == aboafnjplim)
|
|
{
|
|
goto IL_A3;
|
|
}
|
|
num++;
|
|
}
|
|
Action action2 = delegate
|
|
{
|
|
CreationController creationController2 = aboafnjplim.<>4__this.creationController;
|
|
GIPDDLFFNGG[] cachedSelection2 = aboafnjplim.cachedSelection;
|
|
CreationContext <CreationContext>k__BackingField2 = creationController2.<CreationContext>k__BackingField;
|
|
int length = cachedSelection2.Length;
|
|
bool flag2 = <CreationContext>k__BackingField2.SetSelection(length, cachedSelection2);
|
|
MakerPenToolDelete_Object <>4__this = aboafnjplim.<>4__this;
|
|
int num2 = 0;
|
|
LFBMEDEMGHA activeGroup2 = <>4__this.creationController.<CreationContext>k__BackingField.MIDCJLJHOCI;
|
|
LFBMEDEMGHA cachedActiveGroup = aboafnjplim.cachedActiveGroup;
|
|
if (activeGroup2 != cachedActiveGroup)
|
|
{
|
|
bool flag3 = aboafnjplim.<>4__this.creationController.<CreationContext>k__BackingField.PushActiveGroup(cachedActiveGroup);
|
|
}
|
|
bool flag4 = aboafnjplim.<>4__this.creationController.<CreationContext>k__BackingField.DeleteSelection();
|
|
aboafnjplim.<>4__this.creationController.<CreationContext>k__BackingField.RemoveAllFromSelection();
|
|
if (num2 != 0)
|
|
{
|
|
aboafnjplim.<>4__this.creationController.<CreationContext>k__BackingField.PopActiveGroup();
|
|
}
|
|
ANNHEFBGNFL<FGACEBOCODD> onpkmkcmmic = FFPJFMECDNG.BFPPPLIJIGC.ONPKMKCMMIC;
|
|
};
|
|
return;
|
|
}
|
|
IL_A3:
|
|
NIDFEPEKAMB nidfepekamb = new NIDFEPEKAMB();
|
|
CreationController creationController = this.creationController;
|
|
Task task = nidfepekamb.GFBIJNLKLCM(creationController);
|
|
Action<NIDFEPEKAMB> action3 = new Action(this.BHGACBGPGCC);
|
|
APANEBCNDDJ.OHLPJBFCABI<NIDFEPEKAMB>(task, action3).KOLCDBDBPFC();
|
|
return;
|
|
}
|
|
}
|
|
|
|
// Token: 0x060126D6 RID: 75478 RVA: 0x00436ECC File Offset: 0x004350CC
|
|
[Token(Token = "0x60126D6")]
|
|
[Address(RVA = "0x1312460", Offset = "0x1311260", VA = "0x181312460")]
|
|
public MakerPenToolDelete_Object()
|
|
{
|
|
}
|
|
|
|
// Token: 0x060126D7 RID: 75479 RVA: 0x00436EE0 File Offset: 0x004350E0
|
|
[Token(Token = "0x60126D7")]
|
|
[Address(RVA = "0x1312390", Offset = "0x1311190", VA = "0x181312390")]
|
|
[CompilerGenerated]
|
|
private void BHGACBGPGCC(NIDFEPEKAMB JCOFFCGLFKP)
|
|
{
|
|
Action defaultContextAction = AsyncVoidMethodBuilder.Create().m_coreState.m_defaultContextAction;
|
|
}
|
|
|
|
// Token: 0x02002AE9 RID: 10985
|
|
[Token(Token = "0x2002AE9")]
|
|
[CompilerGenerated]
|
|
private sealed class ABOAFNJPLIM
|
|
{
|
|
// Token: 0x060126D8 RID: 75480 RVA: 0x00436F04 File Offset: 0x00435104
|
|
[Token(Token = "0x60126D8")]
|
|
[Address(RVA = "0x3F5100", Offset = "0x3F3F00", VA = "0x1803F5100")]
|
|
public ABOAFNJPLIM()
|
|
{
|
|
}
|
|
|
|
// Token: 0x060126D9 RID: 75481 RVA: 0x00436F18 File Offset: 0x00435118
|
|
[Token(Token = "0x60126D9")]
|
|
[Address(RVA = "0x12FE6B0", Offset = "0x12FD4B0", VA = "0x1812FE6B0")]
|
|
internal void <OnUpdate>b__1(CKNHLOINDFF data)
|
|
{
|
|
GIPDDLFFNGG[] array = this.cachedSelection;
|
|
Guid currentEditContextId = NetworkedSingletonMonoBehaviour.ONCPNMDGGKG.CNEADFAOPFL;
|
|
CreationContext <CreationContext>k__BackingField = this.<>4__this.creationController.<CreationContext>k__BackingField;
|
|
JGLCDBNDHNB jglcdbndhnb = new JGLCDBNDHNB(array, data, currentEditContextId, <CreationContext>k__BackingField);
|
|
this.<>4__this.creationController.<MakerPen>k__BackingField._undoStack.Add(jglcdbndhnb);
|
|
}
|
|
|
|
// Token: 0x060126DA RID: 75482 RVA: 0x00436F74 File Offset: 0x00435174
|
|
[Token(Token = "0x60126DA")]
|
|
[Address(RVA = "0x12FE7D0", Offset = "0x12FD5D0", VA = "0x1812FE7D0")]
|
|
internal void <OnUpdate>b__2()
|
|
{
|
|
CreationController creationController = this.<>4__this.creationController;
|
|
GIPDDLFFNGG[] array = this.cachedSelection;
|
|
CreationContext <CreationContext>k__BackingField = creationController.<CreationContext>k__BackingField;
|
|
int length = array.Length;
|
|
bool flag = <CreationContext>k__BackingField.SetSelection(length, array);
|
|
MakerPenToolDelete_Object makerPenToolDelete_Object = this.<>4__this;
|
|
int num = 0;
|
|
LFBMEDEMGHA activeGroup = makerPenToolDelete_Object.creationController.<CreationContext>k__BackingField.MIDCJLJHOCI;
|
|
LFBMEDEMGHA lfbmedemgha = this.cachedActiveGroup;
|
|
if (activeGroup != lfbmedemgha)
|
|
{
|
|
bool flag2 = this.<>4__this.creationController.<CreationContext>k__BackingField.PushActiveGroup(lfbmedemgha);
|
|
}
|
|
bool flag3 = this.<>4__this.creationController.<CreationContext>k__BackingField.DeleteSelection();
|
|
this.<>4__this.creationController.<CreationContext>k__BackingField.RemoveAllFromSelection();
|
|
if (num != 0)
|
|
{
|
|
this.<>4__this.creationController.<CreationContext>k__BackingField.PopActiveGroup();
|
|
}
|
|
ANNHEFBGNFL<FGACEBOCODD> onpkmkcmmic = FFPJFMECDNG.BFPPPLIJIGC.ONPKMKCMMIC;
|
|
}
|
|
|
|
// Token: 0x0400BE6D RID: 48749
|
|
[FieldOffset(Offset = "0x10")]
|
|
[Token(Token = "0x400BE6D")]
|
|
public GIPDDLFFNGG[] cachedSelection;
|
|
|
|
// Token: 0x0400BE6E RID: 48750
|
|
[FieldOffset(Offset = "0x18")]
|
|
[Token(Token = "0x400BE6E")]
|
|
public LFBMEDEMGHA cachedActiveGroup;
|
|
|
|
// Token: 0x0400BE6F RID: 48751
|
|
[FieldOffset(Offset = "0x20")]
|
|
[Token(Token = "0x400BE6F")]
|
|
public MakerPenToolDelete_Object <>4__this;
|
|
}
|
|
}
|
|
}
|