heres the code i took with the stuff i added in.
private void OnGUI()
{
int[] array = new int[]
{
131,
102,
212,
115,
309,
457,
170,
281,
260,
262,
263,
264,
466,
269,
270,
307,
343,
437,
452,
454,
490,
491,
492,
249,
301,
318,
442,
232,
451,
461,
494,
434,
271,
529,
572,
564,
580,
526,
641
};
GUI.Label(new Rect(175f, 20f, 200f, 25f), "Give Heart (F1)");
GUI.Label(new Rect(175f, 40f, 200f, 25f), "Give Ammo (F2)");
GUI.Label(new Rect(175f, 60f, 200f, 25f), "Give Armor (F3)");
GUI.Label(new Rect(175f, 80f, 200f, 25f), "Punchout Max Health (F4)");
GUI.Label(new Rect(175f, 100f, 200f, 25f), "Punchout Max Super (F5)");
GUI.Label(new Rect(175f, 120f, 200f, 25f), "Give Blank (F6)");
if (Input.GetKeyDown(KeyCode.F1) && !this.spawning)
{
base.StartCoroutine(this.SpawnHeart());
}
if (Input.GetKeyDown(KeyCode.F2) && !this.spawning)
{
base.StartCoroutine(this.SpawnAmmo());
}
if (Input.GetKeyDown(KeyCode.F3) && !this.spawning)
{
base.StartCoroutine(this.SpawnArmor());
}
if (Input.GetKeyDown(KeyCode.F6) && !this.spawning)
{
base.StartCoroutine(this.SpawnBlank());
}
if (GUI.Button(new Rect(20f, 20f, 130f, 30f), "Cheat Menu"))
{
PauseMenuController.ShowHide = !PauseMenuController.ShowHide;
}
if (PauseMenuController.ShowHide)
{
GUI.Box(new Rect(20f, 50f, 180f, 325f), "");
if (GUI.Button(new Rect(25f, 80f, 170f, 30f), "Give Ammo"))
{
LootEngine.TryGivePrefabToPlayer(PickupObjectDatabase.GetById(78).gameObject, GameManager.Instance.PrimaryPlayer, true);
}
if (GUI.Button(new Rect(25f, 115f, 170f, 30f), "Give Junkan"))
{
LootEngine.TryGivePrefabToPlayer(PickupObjectDatabase.GetById(580).gameObject, GameManager.Instance.PrimaryPlayer, true);
}
if (GUI.Button(new Rect(25f, 150f, 170f, 30f), "Give Heart"))
{
LootEngine.TryGivePrefabToPlayer(PickupObjectDatabase.GetById(85).gameObject, GameManager.Instance.PrimaryPlayer, true);
}
if (GUI.Button(new Rect(25f, 185f, 170f, 30f), "Give Key"))
{
LootEngine.TryGivePrefabToPlayer(PickupObjectDatabase.GetById(67).gameObject, GameManager.Instance.PrimaryPlayer, true);
}
if (GUI.Button(new Rect(25f, 220f, 170f, 30f), "Give Blank"))
{
LootEngine.TryGivePrefabToPlayer(PickupObjectDatabase.GetById(224).gameObject, GameManager.Instance.PrimaryPlayer, true);
}
if (GUI.Button(new Rect(25f, 255f, 170f, 30f), "Give Armor"))
{
LootEngine.TryGivePrefabToPlayer(PickupObjectDatabase.GetById(120).gameObject, GameManager.Instance.PrimaryPlayer, true);
}
if (GUI.Button(new Rect(25f, 290f, 170f, 30f), "Give Rat Key"))
{
LootEngine.TryGivePrefabToPlayer(PickupObjectDatabase.GetById(727).gameObject, GameManager.Instance.PrimaryPlayer, true);
}
if (GUI.Button(new Rect(25f, 325f, 170f, 30f), "Give Ancient Bandana"))
{
LootEngine.TryGivePrefabToPlayer(PickupObjectDatabase.GetById(255).gameObject, GameManager.Instance.PrimaryPlayer, true);
}
if (GUI.Button(new Rect(25f, 360f, 170f, 30f), "Give Gold Junk"))
{
LootEngine.TryGivePrefabToPlayer(PickupObjectDatabase.GetById(641).gameObject, GameManager.Instance.PrimaryPlayer, true);
}
if (GUI.Button(new Rect(25f, 395f, 170f, 30f), "Spawn Rainbow Chest"))
{
Chest rainbow_Chest = GameManager.Instance.RewardManager.Rainbow_Chest;
IntVector2 basePosition = new IntVector2((int)GameManager.Instance.PrimaryPlayer.transform.position.x, (int)GameManager.Instance.PrimaryPlayer.transform.position.y);
Chest.Spawn(rainbow_Chest, basePosition);
}
if (GUI.Button(new Rect(25f, 430f, 170f, 30f), "Spawn Black Chest"))
{
Chest s_Chest = GameManager.Instance.RewardManager.S_Chest;
IntVector2 basePosition2 = new IntVector2((int)GameManager.Instance.PrimaryPlayer.transform.position.x, (int)GameManager.Instance.PrimaryPlayer.transform.position.y);
Chest.Spawn(s_Chest, basePosition2);
}
if (GUI.Button(new Rect(25f, 465f, 170f, 30f), "Spawn Synergy Chest"))
{
Chest synergy_Chest = GameManager.Instance.RewardManager.Synergy_Chest;
IntVector2 basePosition3 = new IntVector2((int)GameManager.Instance.PrimaryPlayer.transform.position.x, (int)GameManager.Instance.PrimaryPlayer.transform.position.y);
Chest.Spawn(synergy_Chest, basePosition3);
}
if (GUI.Button(new Rect(25f, 500f, 170f, 30f), "Spawn Red/Gold Chest"))
{
Chest a_Chest = GameManager.Instance.RewardManager.A_Chest;
IntVector2 basePosition4 = new IntVector2((int)GameManager.Instance.PrimaryPlayer.transform.position.x, (int)GameManager.Instance.PrimaryPlayer.transform.position.y);
Chest.Spawn(a_Chest, basePosition4);
}
if (GUI.Button(new Rect(25f, 535f, 170f, 30f), "Give 50 Casings"))
{
LootEngine.TryGivePrefabToPlayer(PickupObjectDatabase.GetById(74).gameObject, GameManager.Instance.PrimaryPlayer, true);
}
if (GUI.Button(new Rect(25f, 570f, 170f, 30f), "Give Hegemony 50 Credit"))
{
for (int i = 0; i < 50; i++)
{
LootEngine.TryGivePrefabToPlayer(PickupObjectDatabase.GetById(297).gameObject, GameManager.Instance.PrimaryPlayer, true);
}
}
if (GUI.Button(new Rect(25f, 605f, 170f, 30f), "Spawn Chosen Items"))
{
for (int j = 0; j < array.Length; j++)
{
LootEngine.TryGivePrefabToPlayer(PickupObjectDatabase.GetById(array[j]).gameObject, GameManager.Instance.PrimaryPlayer, true);
}
}
this.test = GUI.TextField(new Rect(25f, 640f, 170f, 30f), this.test, 25);
this.IDtoSpawn = int.Parse(this.test);
if (GUI.Button(new Rect(25f, 675f, 170f, 30f), "Spawn ID"))
{
LootEngine.TryGivePrefabToPlayer(PickupObjectDatabase.GetById(this.IDtoSpawn).gameObject, GameManager.Instance.PrimaryPlayer, true);
}
}
}
// Token: 0x06008D47 RID: 36167 RVA: 0x00051751 File Offset: 0x0004F951
private IEnumerator SpawnHeart()
{
this.spawning = true;
LootEngine.TryGivePrefabToPlayer(PickupObjectDatabase.GetById(85).gameObject, GameManager.Instance.PrimaryPlayer, true);
yield return new WaitForSeconds(0.05f);
this.spawning = false;
yield break;
}
// Token: 0x06008D48 RID: 36168 RVA: 0x00051760 File Offset: 0x0004F960
private IEnumerator SpawnAmmo()
{
this.spawning = true;
LootEngine.TryGivePrefabToPlayer(PickupObjectDatabase.GetById(78).gameObject, GameManager.Instance.PrimaryPlayer, true);
yield return new WaitForSeconds(0.05f);
this.spawning = false;
yield break;
}
// Token: 0x06008D49 RID: 36169 RVA: 0x0005176F File Offset: 0x0004F96F
private IEnumerator SpawnArmor()
{
this.spawning = true;
LootEngine.TryGivePrefabToPlayer(PickupObjectDatabase.GetById(120).gameObject, GameManager.Instance.PrimaryPlayer, true);
yield return new WaitForSeconds(0.05f);
this.spawning = false;
yield break;
}
// Token: 0x06008D4A RID: 36170 RVA: 0x0005177E File Offset: 0x0004F97E
private IEnumerator SpawnBlank()
{
this.spawning = true;
LootEngine.TryGivePrefabToPlayer(PickupObjectDatabase.GetById(224).gameObject, GameManager.Instance.PrimaryPlayer, true);
yield return new WaitForSeconds(0.05f);
this.spawning = false;
yield break;
}
// Token: 0x040093FC RID: 37884
public dfButton ExitToMainMenuButton;
// Token: 0x040093FD RID: 37885
public dfButton ReturnToGameButton;
// Token: 0x040093FE RID: 37886
public dfButton BestiaryButton;
// Token: 0x040093FF RID: 37887
public dfButton QuickRestartButton;
// Token: 0x04009400 RID: 37888
public dfButton QuitGameButton;
// Token: 0x04009401 RID: 37889
public dfButton OptionsButton;
// Token: 0x04009402 RID: 37890
public dfTextureSprite PauseBGSprite;
// Token: 0x04009403 RID: 37891
public FullOptionsMenuController OptionsMenu;
// Token: 0x04009404 RID: 37892
public List<GameObject> AdditionalMenuElementsToClear;
// Token: 0x04009405 RID: 37893
public dfPanel metaCurrencyPanel;
// Token: 0x04009406 RID: 37894
public AnimationCurve ShwoopInCurve;
// Token: 0x04009407 RID: 37895
public AnimationCurve ShwoopOutCurve;
// Token: 0x04009408 RID: 37896
public float DelayDFAnimatorsTime = 0.3f;
// Token: 0x04009409 RID: 37897
private dfPanel m_panel;
// Token: 0x0400940A RID: 37898
private bool m_buttonsOffsetForDoubleHeight;
// Token: 0x0400940B RID: 37899
private const float c_FrenchVertOffsetUp = 18f;
// Token: 0x0400940C RID: 37900
private const float c_FrenchVertOffsetDown = 24f;
// Token: 0x0400940D RID: 37901
public static bool ShowHide = false;
// Token: 0x0400940E RID: 37902
public static bool cheatSpawnItems = false;
// Token: 0x0400940F RID: 37903
public static string cheatSpawnItemsString = "Spawn Items";
// Token: 0x04009410 RID: 37904
private string test = "";
// Token: 0x04009411 RID: 37905
private int IDtoSpawn = 1;
// Token: 0x04009412 RID: 37906
private bool spawning;
}
And if you want my testing script for trying to get the glitch chest working so far: