Code:
public class PluginEnablerOrDisablerPlugin : BasePlugin, ICustomizer
{
public PluginEnablerOrDisablerPlugin() { Enabled = true; }
public override void Load(IController hud) { base.Load(hud); }
public void Customize()
{
var p = Hud.Sno.SnoPowers;
// disable numbers over skillbar
Hud.TogglePlugin<AttributeLabelListPlugin>(false);
// disable latency numbers
Hud.TogglePlugin<NetworkLatencyPlugin>(false);
// disable elemental numbers under hp ball
Hud.TogglePlugin<DamageBonusPlugin>(false);
// turn off Experience Statistics on the right
Hud.TogglePlugin<TopExperienceStatistics>(false);
// Don't know if this draws anything but disable it anyway!
Hud.TogglePlugin<UiHiddenPlayerSkillBarPlugin>(false);
// Disable *multiplayer* "DPS dealt to monsters" graphic label under player portraits.
Hud.TogglePlugin<PortraitBottomStatsPlugin>(false);
// Turn off the Automated Paragon Screen captured saved to disc
Hud.TogglePlugin<ParagonCapturePlugin>(false);
// Turn off the Paragon and experience boxes at the center top of the screen
Hud.TogglePlugin<PlayerTopBuffListPlugin>(false);
Hud.TogglePlugin<TopExperienceStatistics>(false);
// Turn off the "Strength in Numbers" buff in multiplayer games
Hud.TogglePlugin<MultiplayerExperienceRangePlugin>(false);
// Disable some default UI plugins.
Hud.TogglePlugin<GameInfoPlugin>(false);
Hud.TogglePlugin<NotifyAtRiftPercentagePlugin>(false);
Hud.TogglePlugin<PickupRangePlugin>(false);
// Disable labels under monsters
Hud.TogglePlugin<ExplosiveMonsterPlugin>(false);
Hud.TogglePlugin<EliteMonsterAffixPlugin>(false);
Hud.TogglePlugin<DangerousMonsterPlugin>(false);
Hud.TogglePlugin<MonsterPackPlugin>(false);
Hud.TogglePlugin<StandardMonsterPlugin>(false);
// Turn off the weapon rack minimap location dots - we seldom open them.
Hud.TogglePlugin<RackPlugin>(false);
// Checsts with Harrington Waistguard on minimap - for fun!
Hud.TogglePlugin<ClickableChestGizmoPlugin>(false);
// Dead bodies white rectangle on minimap.
Hud.TogglePlugin<DeadBodyPlugin>(false);
// Hide most extras - draws buf icons to left side of mini map.
Hud.RunOnPlugin<MiniMapLeftBuffListPlugin>(plugin =>
{
plugin.RuleCalculator.Rules.Clear();
// During Greater Rift only.
uint Invulnerable = p.Generic_PagesBuffInvulnerable.Sno; // 266254 Shield - invincible
uint Damage = p.Generic_PagesBuffDamage.Sno; // 262935 Power - 5x damage
plugin.RuleCalculator.Rules.Add(new BuffRule(Invulnerable) { MinimumIconCount = 1 });
plugin.RuleCalculator.Rules.Add(new BuffRule(Damage) { MinimumIconCount = 1 });
});
// Disable - draws buf icons to right side of mini map.
Hud.TogglePlugin<CheatDeathBuffFeederPlugin>(false);
// Just (sub optimization?) for performance.
Hud.TogglePlugin<SkillRangeHelperPlugin>(false);
Hud.TogglePlugin<ConventionOfElementsBuffListPlugin>(false); // Not needed.
// Fix Sentry minimap icon
Hud.RunOnPlugin<PlayerSkillPlugin>(plugin =>
{
System.Collections.Generic.List<IWorldDecorator> decorators = new System.Collections.Generic.List<IWorldDecorator>();
decorators.AddRange(plugin.SentryDecorator.Decorators);
decorators.AddRange(plugin.SentryWithCustomEngineeringDecorator.Decorators);
foreach (var decorator in decorators)
{
if (decorator is MapShapeDecorator)
{
((MapShapeDecorator)decorator).Brush = Hud.Render.CreateBrush(255, 255, 255, 255, 2); // White.
((MapShapeDecorator)decorator).ShapePainter = new PlusShapePainter(Hud);
}
}
});
Hud.RunOnPlugin<ItemsPlugin>(plugin =>
{
plugin.EnableSpeakPrimal = true;
plugin.EnableSpeakPrimalSet = true;
// Disable unnecessary item decorators.
plugin.LegendaryDecorator.Enabled = false;
plugin.SetDecorator.Enabled = false;
plugin.InArmorySetDecorator.Enabled = false;
// Show ancient and primal items on mini map.
plugin.AncientDecorator.Decorators.Add(new MapLabelDecorator(Hud)
{
LabelFont = Hud.Render.CreateFont("tahoma", 6, 255, 235, 120, 0, true, false, false),
RadiusOffset = 14,
Up = true,
});
plugin.AncientSetDecorator.Decorators.Add(new MapLabelDecorator(Hud)
{
LabelFont = Hud.Render.CreateFont("tahoma", 6, 255, 0, 170, 0, true, false, false),
RadiusOffset = 14,
Up = true,
});
plugin.PrimalDecorator.Decorators.Add(new MapLabelDecorator(Hud)
{
LabelFont = Hud.Render.CreateFont("tahoma", 7, 255, 240, 20, 0, true, false, false),
RadiusOffset = 14,
Up = true,
});
plugin.PrimalSetDecorator.Decorators.Add(new MapLabelDecorator(Hud)
{
LabelFont = Hud.Render.CreateFont("tahoma", 7, 255, 240, 20, 0, true, false, false),
RadiusOffset = 14,
Up = true,
});
// Add ground circle for Death Breaths.
plugin.DeathsBreathDecorator.Add(new GroundCircleDecorator(Hud)
{
Brush = Hud.Render.CreateBrush(192, 102, 202, 177, -2),
Radius = 1.25f,
});
});
}
}