// Token: 0x0600378D RID: 14221 public static void ParseRebinding() { RandomizerRebinding.ActionMap = new Hashtable(); RandomizerRebinding.ActionMap.Add("Jump", Core.Input.Jump); RandomizerRebinding.ActionMap.Add("SpiritFlame", Core.Input.SpiritFlame); RandomizerRebinding.ActionMap.Add("Bash", Core.Input.Bash); RandomizerRebinding.ActionMap.Add("SoulFlame", Core.Input.SoulFlame); RandomizerRebinding.ActionMap.Add("ChargeJump", Core.Input.ChargeJump); RandomizerRebinding.ActionMap.Add("Glide", Core.Input.Glide); RandomizerRebinding.ActionMap.Add("Dash", Core.Input.RightShoulder); RandomizerRebinding.ActionMap.Add("Grenade", Core.Input.LeftShoulder); RandomizerRebinding.ActionMap.Add("Left", Core.Input.Left); RandomizerRebinding.ActionMap.Add("Right", Core.Input.Right); RandomizerRebinding.ActionMap.Add("Up", Core.Input.Up); RandomizerRebinding.ActionMap.Add("Down", Core.Input.Down); RandomizerRebinding.ActionMap.Add("LeftStick", Core.Input.LeftStick); RandomizerRebinding.ActionMap.Add("RightStick", Core.Input.RightStick); RandomizerRebinding.ActionMap.Add("Start", Core.Input.Start); RandomizerRebinding.ActionMap.Add("Select", Core.Input.Select); if (!File.Exists("RandomizerRebinding.txt")) { RandomizerRebinding.WriteDefaultFile(); } try { string[] array = File.ReadAllLines("RandomizerRebinding.txt"); RandomizerRebinding.ReplayMessage = RandomizerRebinding.ParseLine(array[4]); RandomizerRebinding.ReturnToStart = RandomizerRebinding.ParseLine(array[5]); RandomizerRebinding.ReloadSeed = RandomizerRebinding.ParseLine(array[6]); RandomizerRebinding.ToggleChaos = RandomizerRebinding.ParseLine(array[7]); RandomizerRebinding.ChaosVerbosity = RandomizerRebinding.ParseLine(array[8]); RandomizerRebinding.ForceChaosEffect = RandomizerRebinding.ParseLine(array[9]); RandomizerRebinding.ShowProgress = RandomizerRebinding.ParseLine(array[10]); RandomizerRebinding.ColorShift = RandomizerRebinding.ParseLine(array[11]); RandomizerRebinding.DoubleBash = RandomizerRebinding.ParseLine(array[12]); } catch (Exception) { RandomizerRebinding.LoadDefaultBinds(); } }
// Token: 0x060039AA RID: 14762 public static void ParseRebinding() { if (!File.Exists("RandomizerRebinding.txt")) { RandomizerRebinding.WriteDefaultFile(); } try { string[] expr_1C = File.ReadAllLines("RandomizerRebinding.txt"); RandomizerRebinding.ReplayMessage = RandomizerRebinding.StringToKeyBinding(expr_1C[2]); RandomizerRebinding.ReturnToStart = RandomizerRebinding.StringToKeyBinding(expr_1C[3]); RandomizerRebinding.ReloadSeed = RandomizerRebinding.StringToKeyBinding(expr_1C[4]); RandomizerRebinding.ToggleChaos = RandomizerRebinding.StringToKeyBinding(expr_1C[5]); RandomizerRebinding.ChaosVerbosity = RandomizerRebinding.StringToKeyBinding(expr_1C[6]); RandomizerRebinding.ForceChaosEffect = RandomizerRebinding.StringToKeyBinding(expr_1C[7]); RandomizerRebinding.ShowProgress = RandomizerRebinding.StringToKeyBinding(expr_1C[8]); } catch (Exception) { RandomizerRebinding.LoadDefaultBinds(); } }
// Token: 0x060037B5 RID: 14261 public static void ParseRebinding() { try { ActionMap = new Hashtable() { { "Jump", Core.Input.Jump }, { "SpiritFlame", Core.Input.SpiritFlame }, { "Bash", Core.Input.Bash }, { "SoulFlame", Core.Input.SoulFlame }, { "ChargeJump", Core.Input.ChargeJump }, { "Glide", Core.Input.Glide }, { "Dash", Core.Input.RightShoulder }, { "Grenade", Core.Input.LeftShoulder }, { "Left", Core.Input.Left }, { "Right", Core.Input.Right }, { "Up", Core.Input.Up }, { "Down", Core.Input.Down }, { "LeftStick", Core.Input.LeftStick }, { "RightStick", Core.Input.RightStick }, { "Start", Core.Input.Start }, { "Select", Core.Input.Select } }; DefaultBinds = new Dictionary <string, string>() { { "Replay Message", "LeftAlt+T, RightAlt+T" }, { "Return to Start", "LeftAlt+R, RightAlt+R" }, { "Reload Seed", "LeftAlt+L, RightAlt+L" }, { "Toggle Chaos", "LeftAlt+K, RightAlt+K" }, { "Chaos Verbosity", "LeftAlt+V, RightAlt+V" }, { "Force Chaos Effect", "LeftAlt+F, RightAlt+F" }, { "Show Progress", "LeftAlt+P, RightAlt+P" }, { "Color Shift", "LeftAlt+C, RightAlt+C" }, { "Double Bash", "Grenade" }, { "Show Bonuses", "LeftAlt+B, RightAlt+B" }, { "Bonus Switch", "LeftAlt+Q, RightAlt+Q" }, { "Bonus Toggle", "LeftAlt+Mouse1, RightAlt+Mouse1" }, { "Reset Grenade Aim", "" }, { "List Trees", "LeftAlt+Alpha1, RightAlt+Alpha1" }, { "List Map Altars", "LeftAlt+Alpha2, RightAlt+Alpha2" }, { "List Teleporters", "LeftAlt+Alpha3, RightAlt+Alpha3" }, { "List Relics", "LeftAlt+Alpha4, RightAlt+Alpha4" }, { "Show Stats", "LeftAlt+Alpha5, RightAlt+Alpha5" }, { "Bonus 1", "" }, { "Bonus 2", "" }, { "Bonus 3", "" }, { "Bonus 4", "" }, { "Bonus 5", "" }, { "Bonus 6", "" }, { "Bonus 7", "" }, { "Bonus 8", "" }, { "Bonus 9", "" }, }; if (!File.Exists("RandomizerRebinding.txt")) { RandomizerRebinding.WriteDefaultFile(); } string[] lines = File.ReadAllLines("RandomizerRebinding.txt"); ArrayList unseenBinds = new ArrayList(RandomizerRebinding.DefaultBinds.Keys); List <string> writeList = new List <string>(); Hashtable binds = new Hashtable(); // parse step 1: read binds from file foreach (string line in lines) { if (!line.Contains(":")) { continue; } string[] parts = line.Split(':'); string key = parts[0].Trim(); if (!DefaultBinds.ContainsKey(key)) { continue; } string bind = parts[1].Trim(); AssignBind(key, bind, writeList); unseenBinds.Remove(key); } // parse step 2: load defaults for missing binds foreach (string missingKey in unseenBinds) { AssignBind(missingKey, null, writeList); } if (writeList.Count > 0) { List <string> warnList = new List <string>(); foreach (string writeKey in writeList) { if (DefaultBinds[writeKey] != "") { warnList.Add(writeKey); } } if (warnList.Count > 0) { Randomizer.printInfo("Default Binds written for these missing binds: " + String.Join(", ", warnList.ToArray()) + ".", 480); } string writeText = ""; foreach (string writeKey in writeList) { writeText += Environment.NewLine + writeKey + ": " + DefaultBinds[writeKey]; } File.AppendAllText("RandomizerRebinding.txt", writeText); } } catch (Exception e) { Randomizer.LogError("Error parsing bindings: " + e.Message); } }