using System.Collections.Generic;
using System.Linq;
using Turbo.Plugins.Default;

namespace Turbo.Plugins.User

{
    public class SimulacrumPlugin : BasePlugin, IInGameWorldPainter
    {
        public WorldDecoratorCollection Decorators { get; set; }



        public SimulacrumPlugin()
        {
            Enabled = true;
        }

        public override void Load(IController hud)
        {
            base.Load(hud);

            Decorators = new WorldDecoratorCollection(
                new GroundCircleDecorator(Hud)
                {
                    Brush = Hud.Render.CreateBrush(255, 255, 255, 255, 0),
                    Radius = 0.6f
                },
                new GroundCircleDecorator(Hud)
                {
                    Brush = Hud.Render.CreateBrush(255, 255, 0, 0, 0),
                    Radius = 0.4f
                });



        }

        public void PaintWorld(WorldLayer layer)
        {
            if (Hud.Game.IsInGame)
            {
                var actors = Hud.Game.Actors.Where(a => a.SnoActor.Sno == ActorSnoEnum._p6_necro_simulacrum_a_set);

                foreach (var actor in actors)
                {

                    Decorators.Paint(layer, actor, actor.FloorCoordinate, "");

                }
            }
        }
    }
}