Advertisement
jarppaaja

PluginEnablerOrDisablerPlugin.cs

Mar 12th, 2019
560
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 6.61 KB | None | 0 0
  1. // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  2. // *.txt files are not loaded automatically by TurboHUD
  3. // you have to change this file's extension to .cs to enable it
  4. // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  5.  
  6. using Turbo.Plugins.Default;
  7.  
  8. namespace Turbo.Plugins.User
  9. {
  10.     public class PluginEnablerOrDisablerPlugin : BasePlugin, ICustomizer
  11.     {
  12.         public PluginEnablerOrDisablerPlugin() { Enabled = true; }
  13.  
  14.         public override void Load(IController hud) { base.Load(hud); }
  15.  
  16.         public void Customize()
  17.         {
  18.             var p = Hud.Sno.SnoPowers;
  19.  
  20.             // disable numbers over skillbar
  21.             Hud.TogglePlugin<AttributeLabelListPlugin>(false);
  22.             // disable latency numbers
  23.             Hud.TogglePlugin<NetworkLatencyPlugin>(false);
  24.             // disable elemental numbers under hp ball
  25.             Hud.TogglePlugin<DamageBonusPlugin>(false);
  26.             // turn off Experience Statistics on the right
  27.             Hud.TogglePlugin<TopExperienceStatistics>(false);
  28.             // Don't know if this draws anything but disable it anyway!
  29.             Hud.TogglePlugin<UiHiddenPlayerSkillBarPlugin>(false);
  30.             // Disable *multiplayer* "DPS dealt to monsters" graphic label under player portraits.
  31.             Hud.TogglePlugin<PortraitBottomStatsPlugin>(false);
  32.  
  33.             // Turn off the Automated Paragon Screen captured saved to disc
  34.             Hud.TogglePlugin<ParagonCapturePlugin>(false);
  35.             // Turn off the Paragon and experience boxes at the center top of the screen
  36.             Hud.TogglePlugin<PlayerTopBuffListPlugin>(false);
  37.             Hud.TogglePlugin<TopExperienceStatistics>(false);
  38.  
  39.             // Turn off the "Strength in Numbers" buff in multiplayer games
  40.             Hud.TogglePlugin<MultiplayerExperienceRangePlugin>(false);
  41.  
  42.             // Disable some default UI plugins.
  43.             Hud.TogglePlugin<GameInfoPlugin>(false);
  44.             Hud.TogglePlugin<NotifyAtRiftPercentagePlugin>(false);
  45.             Hud.TogglePlugin<PickupRangePlugin>(false);
  46.  
  47.             // Disable labels under monsters
  48.             Hud.TogglePlugin<ExplosiveMonsterPlugin>(false);
  49.             Hud.TogglePlugin<EliteMonsterAffixPlugin>(false);
  50.             Hud.TogglePlugin<DangerousMonsterPlugin>(false);
  51.             Hud.TogglePlugin<MonsterPackPlugin>(false);
  52.             Hud.TogglePlugin<StandardMonsterPlugin>(false);
  53.  
  54.             // Turn off the weapon rack minimap location dots - we seldom open them.
  55.             Hud.TogglePlugin<RackPlugin>(false);
  56.  
  57.             // Checsts with Harrington Waistguard on minimap - for fun!
  58.             Hud.TogglePlugin<ClickableChestGizmoPlugin>(false);
  59.             // Dead bodies white rectangle on minimap.
  60.             Hud.TogglePlugin<DeadBodyPlugin>(false);
  61.  
  62.             // Hide most extras - draws buf icons to left side of mini map.
  63.             Hud.RunOnPlugin<MiniMapLeftBuffListPlugin>(plugin =>
  64.             {
  65.                 plugin.RuleCalculator.Rules.Clear();
  66.                 // During Greater Rift only.
  67.                 uint Invulnerable = p.Generic_PagesBuffInvulnerable.Sno;    // 266254 Shield - invincible
  68.                 uint Damage = p.Generic_PagesBuffDamage.Sno;                // 262935 Power - 5x damage
  69.                 plugin.RuleCalculator.Rules.Add(new BuffRule(Invulnerable) { MinimumIconCount = 1 });
  70.                 plugin.RuleCalculator.Rules.Add(new BuffRule(Damage) { MinimumIconCount = 1 });
  71.             });
  72.             // Disable - draws buf icons to right side of mini map.
  73.             Hud.TogglePlugin<CheatDeathBuffFeederPlugin>(false);
  74.  
  75.             // Just (sub optimization?) for performance.
  76.             Hud.TogglePlugin<SkillRangeHelperPlugin>(false);
  77.  
  78.             Hud.TogglePlugin<ConventionOfElementsBuffListPlugin>(false);    // Not needed.
  79.  
  80.             // Fix Sentry minimap icon
  81.             Hud.RunOnPlugin<PlayerSkillPlugin>(plugin =>
  82.             {
  83.                 System.Collections.Generic.List<IWorldDecorator> decorators = new System.Collections.Generic.List<IWorldDecorator>();
  84.                 decorators.AddRange(plugin.SentryDecorator.Decorators);
  85.                 decorators.AddRange(plugin.SentryWithCustomEngineeringDecorator.Decorators);
  86.  
  87.                 foreach (var decorator in decorators)
  88.                 {
  89.                     if (decorator is MapShapeDecorator)
  90.                     {
  91.                         ((MapShapeDecorator)decorator).Brush = Hud.Render.CreateBrush(255, 255, 255, 255, 2);   // White.
  92.                         ((MapShapeDecorator)decorator).ShapePainter = new PlusShapePainter(Hud);
  93.                     }
  94.                 }
  95.             });
  96.  
  97.             Hud.RunOnPlugin<ItemsPlugin>(plugin =>
  98.             {
  99.                 plugin.EnableSpeakPrimal = true;
  100.                 plugin.EnableSpeakPrimalSet = true;
  101.  
  102.                 // Disable unnecessary item decorators.
  103.                 plugin.LegendaryDecorator.Enabled = false;
  104.                 plugin.SetDecorator.Enabled = false;
  105.                 plugin.InArmorySetDecorator.Enabled = false;
  106.  
  107.                 // Show ancient and primal items on mini map.
  108.                 plugin.AncientDecorator.Decorators.Add(new MapLabelDecorator(Hud)
  109.                 {
  110.                     LabelFont = Hud.Render.CreateFont("tahoma", 6, 255, 235, 120, 0, true, false, false),
  111.                     RadiusOffset = 14,
  112.                     Up = true,
  113.                 });
  114.                 plugin.AncientSetDecorator.Decorators.Add(new MapLabelDecorator(Hud)
  115.                 {
  116.                     LabelFont = Hud.Render.CreateFont("tahoma", 6, 255, 0, 170, 0, true, false, false),
  117.                     RadiusOffset = 14,
  118.                     Up = true,
  119.                 });
  120.                 plugin.PrimalDecorator.Decorators.Add(new MapLabelDecorator(Hud)
  121.                 {
  122.                     LabelFont = Hud.Render.CreateFont("tahoma", 7, 255, 240, 20, 0, true, false, false),
  123.                     RadiusOffset = 14,
  124.                     Up = true,
  125.                 });
  126.                 plugin.PrimalSetDecorator.Decorators.Add(new MapLabelDecorator(Hud)
  127.                 {
  128.                     LabelFont = Hud.Render.CreateFont("tahoma", 7, 255, 240, 20, 0, true, false, false),
  129.                     RadiusOffset = 14,
  130.                     Up = true,
  131.                 });
  132.                 // Add ground circle for Death Breaths.
  133.                 plugin.DeathsBreathDecorator.Add(new GroundCircleDecorator(Hud)
  134.                 {
  135.                     Brush = Hud.Render.CreateBrush(192, 102, 202, 177, -2),
  136.                     Radius = 1.25f,
  137.                 });
  138.             });
  139.         }
  140.     }
  141. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement