// Copyright (c) Strange Loop Games. All rights reserved.
// See LICENSE file in the project root for full license information.

using System.ComponentModel;
using Eco.Gameplay.DynamicValues;
using Eco.Gameplay.Interactions.Interactors;
using Eco.Gameplay.Items;
using Eco.Gameplay.Players;
using Eco.Shared.Graphics;
using Eco.Shared.Items;
using Eco.Shared.Localization;
using Eco.Shared.Networking;
using Eco.Shared.Serialization;
using Eco.Shared.SharedTypes;
using Eco.World.Color;

[Serialized]
[LocDisplayName("Dev Block Paint Tool")]
[LocDescription("Paint tool! It paints blocks with some developer features.")]
[Category("Hidden")]
public class DevBlockPaintToolItem : ToolItem, IInteractor
{
    private static IDynamicValue  skilledRepairCost = new ConstantValue(1);
    
    public override IDynamicValue SkilledRepairCost => skilledRepairCost;
    public override ItemCategory ItemCategory => ItemCategory.ColorTool;

    [RPC] public void Color(Player player, InteractionTriggerInfo trigger, InteractionTarget target, int color) => BlockColorManager.Obj.SetColor(target.BlockPosition!.Value, (DyeColors) color);
}
