Can i disable only the ground decorators from HeroClasses in the "Default/Players/OtherPlayersPlugin.cs" using the plugin customization?
It has sections for each HeroClass like this:
Code:
DecoratorByClass.Add(HeroClass.Barbarian, new WorldDecoratorCollection(
new MapLabelDecorator(Hud)
{
LabelFont = Hud.Render.CreateFont("tahoma", 6f, 200, 255, 60, 60, false, false, 128, 0, 0, 0, true),
Up = true,
},
new GroundLabelDecorator(Hud)
{
BackgroundBrush = groundLabelBackgroundBrush,
BorderBrush = Hud.Render.CreateBrush(200, 250, 10, 10, 1),
TextFont = Hud.Render.CreateFont("tahoma", 6f, 200, 255, 60, 60, false, false, 128, 0, 0, 0, true),
}
));
tried both:
Hud.GetPlugin<OtherPlayersPlugin>().HeroClass.Barbarian.ToggleDecorators<GroundLabelDecorator>(false);
and
Hud.GetPlugin<OtherPlayersPlugin>().Barbarian.ToggleDecorators<GroundLabelDecorator>(false);
both cause exceptions, like:
Code:
...PluginCustomizationPlugin.cs(34,40) : error CS1061: 'OtherPlayersPlugin' does not contain a definition for 'HeroClass' and no accessible extension method 'HeroClass' accepting a first argument of type 'OtherPlayersPlugin' could be found (are you missing a using directive or an assembly reference?)
even after adding all namespaces, that the OtherPlayersPlugin.cs file was using.
usually i just disable whole plugins and use my edited copies, but it is recommended to customize something like that using the "PluginCustomizationPlugin.cs", rather than using potencially outdated copy of a default plugin.