public void CreateMenu(IOffensiveAbility ability, string displayName) { OffensiveAbilitySettings abilitySettingsMenu; if (!abilityMenus.TryGetValue(displayName, out abilitySettingsMenu)) { abilityToggler.Add(ability.Name, false); priorityChanger.Add(ability.Name); switch (ability.Name) { case "item_satanic": abilitySettingsMenu = new SatanicSettings(settingsMenu, displayName, ability.Name); break; default: abilitySettingsMenu = new OffensiveAbilitySettings(settingsMenu, displayName, ability.Name); break; } abilityMenus.Add(displayName, abilitySettingsMenu); } ability.Menu = abilitySettingsMenu; }
public void CreateMenu(IOffensiveAbility ability, string displayName) { OffensiveAbilitySettings abilitySettingsMenu; if (!abilityMenus.TryGetValue(displayName, out abilitySettingsMenu)) { abilityToggler.Add(ability.Name, false); priorityChanger.Add(ability.Name); abilitySettingsMenu = new OffensiveAbilitySettings(settingsMenu, displayName, ability.Name); abilityMenus.Add(displayName, abilitySettingsMenu); } ability.Menu = abilitySettingsMenu; }